diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..62c67b4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +## How to contribute + +Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating you agree to abide by its terms. + +We appreciate you taking the time to contribute to Octokit or any of the projects in Octokit's ecosystem. Especially as a new contributor, you have a valuable perspective: you will find things confusing and run into problems that no longer occur to the maintainers. Please share them with us so we can make the experience for future contributors the best it can be. + +Thank you 💖 + +There are two types of contributions: issues and pull requests (PRs). Issues are used to track bugs and feature requests, while PRs contribute new content to the repository. + +## Creating an issue + +Before you create a new issue: +1. Search the [project's issues](https://github.com/octokit/go-sdk-enterprise-cloud/issues) to see if a similar issue already exists. If so, please add onto that issue rather than creating a new one. +1. If submitting a bug report, include steps and a minimal code sample that will reproduce the issue. +1. If submitting a feature request, please share the motivation for the new feature, what alternatives you considered, and any implementation suggestions. + +## Creating a pull request + +First, is your code a change to the generated source code present in `pkg/github`? If so, you'll want to go to [octokit/source-generator](https://github.com/octokit/source-generator) to modify the generation process. + +If your changes do need to be made here, fork the repository. If you're not sure how to do so, please read [the linked docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo). Then clone your fork and `cd` to that directory locally. + +Ensure that the `go build ./...` and `go test ./...` commands each succeed and result in no changes to the repository. Make your code changes (adding tests and documentation as necessary) and confirm the above validation steps still pass. If you'd like to debug the project, you can use VSCode's tooling to do so. When you're satisfied with your changes, follow [GitHub's docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to create your PR. diff --git a/README.md b/README.md index 8b13789..fca5b10 100644 --- a/README.md +++ b/README.md @@ -1 +1,78 @@ +# github.com/octokit/go-sdk-enterprise-cloud +An "alpha" version of a generated Go SDK from [GitHub's OpenAPI spec](https://github.com/github/rest-api-description), built on [Kiota](https://github.com/microsoft/kiota). + +## How do I use it? + +See example client instantiations and requests in [example_test.go](pkg/example_test.go) or in the [cmd/ directory](cmd/). + +⚠️ **Note**: This SDK is not yet stable. Breaking changes may occur at any time. + +### Building and testing + +- Build the SDK: `go build ./...` +- Test the SDK: `go test ./...` + - Measure test coverage by package (e.g. `authentication`): `go test -v -coverpkg=./pkg/authentication -coverprofile=auth.cov ./pkg/authentication` + - Test coverage may be viewed in VS Code by running the command `Go: Toggle Test Coverage In Current Package` + - Alternately, you may run `go tool cover -html auth.cov -o auth.html` and open the generated `auth.html` file in a browser to view test coverage + +### Authentication + +This SDK supports [Personal Access Tokens (classic)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic), [fine-grained Personal Access Tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens), and [GitHub Apps](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) authentication. + +In order to use either type of Personal Access token, you can use the `WithTokenAuthentication("YOUR_TOKEN_HERE")` functional option when constructing a client, like so: + +```go +client, err := pkg.NewApiClient( + pkg.WithTokenAuthentication(os.Getenv("GITHUB_TOKEN")), +) +if err != nil { + log.Fatalf("error creating client: %v", err) +} +``` + +In order to authenticate as a GitHub App, you can use the `WithGitHubAppAuthentication` functional option: + +```go +client, err := pkg.NewApiClient( + pkg.WithGitHubAppAuthentication("/path/to/your/pem/file.pem", "your-client-ID", yourInstallationIDInt), +) +if err != nil { + log.Fatalf("error creating client: %v", err) +} +``` + +To see more detailed examples, view [the cmd/ directory in this repo](cmd/). + +⚠️ **Note**: There are [three types](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) of GitHub App authentication: +1. [As the App itself (meta endpoints)](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28) +1. [As an App installation](https://docs.github.com/en/rest/authentication/endpoints-available-for-github-app-installation-access-tokens?apiVersion=2022-11-28) +1. On behalf of a user + +Authenticating on behalf of a user is not supported in an SDK, as it requires a UI authentication flow with redirects. This SDK supports authenticating as the App itself and as an App installation. + +Note that the SDK **does not yet** support authenticating as the App itself and as an App installation using the same client transparently to the user. Authenticating as the App itself requires [creating a JSON Web Token (JWT)](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app) and using that as token authentication. For helpers to create and sign a JWT in Go, you may use the [golang-jwt/jwt](https://github.com/golang-jwt/jwt) library. + +Authenticating as an App installation can be done using the `WithGitHubAppAuthentication` functional option. Future work is planned to make the App meta endpoints vs. App installation endpoints auth schemes transparent to the user and only require one client setup. + +## Why a generated SDK? + +We want to... +1. provide 100% coverage of the API in our SDK +2. use this as a building block for future SDK tooling. + +## Why Go? + +We don't currently support a Go SDK and we wanted a narrow scope for the initial effort without worrying about cutting over users of an existing SDK. + +## How can I report on my experience or issues with the SDK? + +Please use this project's [issues](https://github.com/octokit/go-sdk-enterprise-cloud/issues)! + +## Releasing this project + +Periodically (based on the frequency of [this workflow](https://github.com/octokit/source-generator/blob/main/.github/workflows/build-go.yml)), the source-generator repository will ingest the latest version of [GitHub's OpenAPI spec](https://github.com/github/rest-api-description) and generate a new version of this SDK. If there is a diff, a PR (similar to [this one](https://github.com/octokit/go-sdk-enterprise-cloud/pull/22)) will be generated. + +When reviewing the PR, analyze the diff and determine whether the changes are breaking (for which a major version number must be incremented), feature additions (for which a minor version number must be incremented), or bug fixes or docs changes (for which a patch number must be incremented). For more details about how to select an appropriate semantic version, see [semver.org](https://semver.org/). In many/most cases, due to the scale of GitHub's specification and the rate of change on it, the diff will be large and the changes will be technically breaking. This will mean incrementing a major version number. If a major version is being incremented, it must be changed in the [go.mod](./go.mod) file as described in [these docs](https://go.dev/doc/modules/release-workflow#breaking). + +When changes are analyzed, change the PR title appropriately (see [this PR](https://github.com/octokit/go-sdk-enterprise-cloud/pull/40) for an example) and merge it. Then go to [repository releases](https://github.com/octokit/go-sdk-enterprise-cloud/releases), tag the release with the chosen version, title it with the chosen version, use the "Generate release notes" button to see what PRs will be included in the release, and manually edit the release notes grouping the changes under the headings `Features`, `Fixes`, `Maintenance`, and `Documentation` when appropriate. After clicking "Publish Release", the new version will be available for use! diff --git a/cmd/app-example/main.go b/cmd/app-example/main.go new file mode 100644 index 0000000..8e0df2f --- /dev/null +++ b/cmd/app-example/main.go @@ -0,0 +1,49 @@ +package main + +import ( + "context" + "log" + "os" + "strconv" + "time" + + abs "github.com/microsoft/kiota-abstractions-go" + "github.com/octokit/go-sdk-enterprise-cloud/pkg" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/installation" +) + +func main() { + installationID, err := strconv.ParseInt(os.Getenv("INSTALLATION_ID"), 10, 64) + if err != nil { + log.Fatalf("error parsing installation ID from string to int64: %v", err) + } + + client, err := pkg.NewApiClient( + pkg.WithUserAgent("my-user-agent"), + pkg.WithRequestTimeout(5*time.Second), + pkg.WithBaseUrl("https://api.github.com"), + pkg.WithGitHubAppAuthentication(os.Getenv("PATH_TO_PEM_FILE"), os.Getenv("CLIENT_ID"), installationID), + ) + + // equally valid: + //client, err := pkg.NewApiClient() + if err != nil { + log.Fatalf("error creating client: %v", err) + } + + queryParams := &installation.RepositoriesRequestBuilderGetQueryParameters{} + requestConfig := &abs.RequestConfiguration[installation.RepositoriesRequestBuilderGetQueryParameters]{ + QueryParameters: queryParams, + } + repos, err := client.Installation().Repositories().Get(context.Background(), requestConfig) + if err != nil { + log.Fatalf("error getting repositories: %v", err) + } + + if len(repos.GetRepositories()) > 0 { + log.Printf("Repositories:\n") + for _, repo := range repos.GetRepositories() { + log.Printf("%v\n", *repo.GetFullName()) + } + } +} diff --git a/cmd/token-example/main.go b/cmd/token-example/main.go new file mode 100644 index 0000000..ac83aea --- /dev/null +++ b/cmd/token-example/main.go @@ -0,0 +1,37 @@ +package main + +import ( + "context" + "fmt" + "log" + "os" + "time" + + abs "github.com/microsoft/kiota-abstractions-go" + "github.com/octokit/go-sdk-enterprise-cloud/pkg" +) + +func main() { + client, err := pkg.NewApiClient( + pkg.WithUserAgent("my-user-agent"), + pkg.WithRequestTimeout(5*time.Second), + pkg.WithBaseUrl("https://api.github.com"), + pkg.WithTokenAuthentication(os.Getenv("GITHUB_TOKEN")), + ) + + // equally valid: + //client, err := pkg.NewApiClient() + if err != nil { + log.Fatalf("error creating client: %v", err) + } + + queryParams := &abs.DefaultQueryParameters{} + requestConfig := &abs.RequestConfiguration[abs.DefaultQueryParameters]{ + QueryParameters: queryParams, + } + zen, err := client.Zen().Get(context.Background(), requestConfig) + if err != nil { + log.Fatalf("error getting repositories: %v", err) + } + fmt.Printf("GitHub Zen principle: %v\n", *zen) +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4b03e1e --- /dev/null +++ b/go.mod @@ -0,0 +1,30 @@ +module github.com/octokit/go-sdk-enterprise-cloud + +go 1.21.5 + +require ( + github.com/kfcampbell/ghinstallation v0.0.6 + github.com/microsoft/kiota-abstractions-go v1.6.0 + github.com/microsoft/kiota-http-go v1.3.3 + github.com/microsoft/kiota-serialization-form-go v1.0.0 + github.com/microsoft/kiota-serialization-json-go v1.0.7 + github.com/microsoft/kiota-serialization-multipart-go v1.0.0 + github.com/microsoft/kiota-serialization-text-go v1.0.0 +) + +require ( + github.com/cjlapao/common-go v0.0.39 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/octokit/go-sdk v0.0.13 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/std-uritemplate/std-uritemplate/go v0.0.55 // indirect + github.com/stretchr/testify v1.9.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..d45efa4 --- /dev/null +++ b/go.sum @@ -0,0 +1,52 @@ +github.com/cjlapao/common-go v0.0.39 h1:bAAUrj2B9v0kMzbAOhzjSmiyDy+rd56r2sy7oEiQLlA= +github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9l4UWaddwOA= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kfcampbell/ghinstallation v0.0.6 h1:L4QkjRqNosJ6Kyetymq7FswY1wUxMQO+fyYXJAWl0WY= +github.com/kfcampbell/ghinstallation v0.0.6/go.mod h1:UXWfCKaLwF+AiyCo8gxE5oA0VMQsAmCdRXgTyyRdUnA= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/microsoft/kiota-abstractions-go v1.6.0 h1:qbGBNMU0/o5myKbikCBXJFohVCFrrpx2cO15Rta2WyA= +github.com/microsoft/kiota-abstractions-go v1.6.0/go.mod h1:7YH20ZbRWXGfHSSvdHkdztzgCB9mRdtFx13+hrYIEpo= +github.com/microsoft/kiota-http-go v1.3.3 h1:FKjK5BLFONu5eIBxtrkirkixFQmcPwitZ8iwZHKbESo= +github.com/microsoft/kiota-http-go v1.3.3/go.mod h1:IWw/PwtBs/GYz+Pa75gPW7MFNFv0aKPFsLw5WqzL1SE= +github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= +github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= +github.com/microsoft/kiota-serialization-json-go v1.0.7 h1:yMbckSTPrjZdM4EMXgzLZSA3CtDaUBI350u0VoYRz7Y= +github.com/microsoft/kiota-serialization-json-go v1.0.7/go.mod h1:1krrY7DYl3ivPIzl4xTaBpew6akYNa8/Tal8g+kb0cc= +github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJympbXNaeV07K0d46IfuEd5v9+pBs= +github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so= +github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA= +github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M= +github.com/octokit/go-sdk v0.0.13 h1:DdJfWFeGUoFRHY82dxquRdBl9GvE1Vk7g2dVOjMyGpQ= +github.com/octokit/go-sdk v0.0.13/go.mod h1:T65KGdB1QQvRbvd9MmuNGieldRyxMj45omX1vizOUu4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/std-uritemplate/std-uritemplate/go v0.0.55 h1:muSH037g97K7U2f94G9LUuE8tZlJsoSSrPsO9V281WY= +github.com/std-uritemplate/std-uritemplate/go v0.0.55/go.mod h1:rG/bqh/ThY4xE5de7Rap3vaDkYUT76B0GPJ0loYeTTc= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/authentication/request.go b/pkg/authentication/request.go new file mode 100644 index 0000000..4f0a8e1 --- /dev/null +++ b/pkg/authentication/request.go @@ -0,0 +1,49 @@ +package authentication + +import ( + "fmt" + + abs "github.com/microsoft/kiota-abstractions-go" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/headers" +) + +// Request provides a wrapper around Kiota's abs.RequestInformation type +type Request struct { + *abs.RequestInformation +} + +// WithTokenAuthentication sets the Authorization header to the given token, +// prepended by the AuthType +func (r *Request) WithTokenAuthentication(token string) { + if r.Headers.ContainsKey(headers.AuthorizationKey) { + r.Headers.Remove(headers.AuthorizationKey) + } + r.Headers.Add(headers.AuthorizationKey, fmt.Sprintf("%v %v", headers.AuthType, token)) +} + +// WithUserAgent allows the caller to set the User-Agent string for each request +func (r *Request) WithUserAgent(userAgent string) { + if r.Headers.ContainsKey(headers.UserAgentKey) { + r.Headers.Remove(headers.UserAgentKey) + } + r.Headers.Add(headers.UserAgentKey, userAgent) +} + +// WithDefaultUserAgent sets the default User-Agent string for each request +func (r *Request) WithDefaultUserAgent() { + r.WithUserAgent(headers.UserAgentValue) +} + +// WithAPIVersion sets the API version header for each request +func (r *Request) WithAPIVersion(version string) { + if r.Headers.ContainsKey(headers.APIVersionKey) { + r.Headers.Remove(headers.APIVersionKey) + } + r.Headers.Add(headers.APIVersionKey, version) +} + +// WithDefaultAPIVersion sets the API version header to the default (the version used +// to generate the code) for each request +func (r *Request) WithDefaultAPIVersion() { + r.WithAPIVersion(headers.APIVersionValue) +} diff --git a/pkg/authentication/token_provider.go b/pkg/authentication/token_provider.go new file mode 100644 index 0000000..d610c8d --- /dev/null +++ b/pkg/authentication/token_provider.go @@ -0,0 +1,89 @@ +package authentication + +import ( + "context" + + abs "github.com/microsoft/kiota-abstractions-go" +) + +// TokenProvider may use a token to authenticate each request. It also can be +// used to configure UserAgent strings, API Versions, and other request configuration. +// Note that GitHub App authentication is set at the client transport level. See the +// docs for pkg.NewApiClient for more. +type TokenProvider struct { + options []TokenProviderOption +} + +// TokenProviderOption provides a functional option +// for configuring a TokenProvider. +type TokenProviderOption func(*TokenProvider, *Request) + +// WithTokenAuthentication sets the AuthorizationToken for each request to the given token. +func WithTokenAuthentication(token string) TokenProviderOption { + return func(t *TokenProvider, r *Request) { + r.WithTokenAuthentication(token) + } +} + +// WithDefaultUserAgent sets the User-Agent string sent for requests to the default +// for this SDK. +func WithDefaultUserAgent() TokenProviderOption { + return func(t *TokenProvider, r *Request) { + r.WithDefaultUserAgent() + } +} + +// WithUserAgent sets the User-Agent string sent with each request. +func WithUserAgent(userAgent string) TokenProviderOption { + return func(t *TokenProvider, r *Request) { + r.WithUserAgent(userAgent) + } +} + +// WithDefaultAPIVersion sets the API version header sent with each request. +func WithDefaultAPIVersion() TokenProviderOption { + return func(t *TokenProvider, r *Request) { + r.WithDefaultAPIVersion() + } +} + +// WithAPIVersion sets the API version header sent with each request. +func WithAPIVersion(version string) TokenProviderOption { + return func(t *TokenProvider, r *Request) { + r.WithAPIVersion(version) + } +} + +// TODO(kfcampbell): implement new constructor with allowedHosts + +// NewTokenProvider creates an instance of TokenProvider with the specified token and options. +func NewTokenProvider(options ...TokenProviderOption) *TokenProvider { + provider := &TokenProvider{ + options: options, + } + return provider +} + +// defaultHandlers contains our "sensible defaults" for TokenProvider initialization +var defaultHandlers = []TokenProviderOption{WithDefaultUserAgent(), WithDefaultAPIVersion()} + +// AuthenticateRequest applies the default options for each request, then the user's options +// (if present in the TokenProvider). User options are guaranteed to be run in the order they +// were input. +func (t *TokenProvider) AuthenticateRequest(context context.Context, request *abs.RequestInformation, additionalAuthenticationContext map[string]interface{}) error { + reqWrapper := &Request{RequestInformation: request} + + if reqWrapper.Headers == nil { + reqWrapper.Headers = abs.NewRequestHeaders() + } + + for _, option := range defaultHandlers { + option(t, reqWrapper) + } + + // apply user options after defaults + for _, option := range t.options { + option(t, reqWrapper) + } + return nil +} diff --git a/pkg/authentication/token_provider_test.go b/pkg/authentication/token_provider_test.go new file mode 100644 index 0000000..d5c52cb --- /dev/null +++ b/pkg/authentication/token_provider_test.go @@ -0,0 +1,184 @@ +package authentication_test + +import ( + "context" + "fmt" + "log" + "os" + "strings" + "testing" + + abstractions "github.com/microsoft/kiota-abstractions-go" + http "github.com/microsoft/kiota-http-go" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/authentication" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/github" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/headers" +) + +func TestTokenIsSetInAuthenticatedRequest(t *testing.T) { + token := "help i'm trapped in a Go binary" + provider := authentication.NewTokenProvider(authentication.WithTokenAuthentication(token)) + + reqInfo := abstractions.NewRequestInformation() + addtlContext := make(map[string]interface{}) + + err := provider.AuthenticateRequest(context.Background(), reqInfo, addtlContext) + if err != nil { + t.Errorf("there should be no error when calling AuthenticateRequest") + } + + if len(reqInfo.Headers.Get(headers.AuthorizationKey)) != 1 { + t.Errorf("there should be exactly one authorization key") + } + + receivedToken := reqInfo.Headers.Get(headers.AuthorizationKey)[0] + if !strings.Contains(receivedToken, token) { + t.Errorf("received token doesn't match up with given token") + } +} + +// TODO(kfcampbell): this code could be refactored to use table-based tests +func TestDefaultRequestOptions(t *testing.T) { + token := "this is not the token you're looking for" + provider := authentication.NewTokenProvider(authentication.WithTokenAuthentication(token)) + reqInfo := abstractions.NewRequestInformation() + addtlContext := make(map[string]interface{}) + + err := provider.AuthenticateRequest(context.Background(), reqInfo, addtlContext) + if err != nil { + t.Errorf("there should be no error when calling AuthenticateRequest") + } + + apiVersions := reqInfo.Headers.Get(headers.APIVersionKey) + if len(apiVersions) != 1 { + t.Errorf("exactly one API version should be present in the request") + } + + if apiVersions[0] != headers.APIVersionValue { + t.Errorf("default API version is set incorrectly") + } + + userAgents := reqInfo.Headers.Get(headers.UserAgentKey) + if len(userAgents) != 1 { + t.Errorf("exactly one user agent string should be present in the request") + } + + if userAgents[0] != headers.UserAgentValue { + t.Errorf("default user agent string is set incorrectly") + } +} + +func TestOverwritingDefaultRequestOptions(t *testing.T) { + token := "i'm totally a real token" + apiVersion := "i'm totally a real API version" + userAgent := "i'm totally a real user agent" + provider := authentication.NewTokenProvider( + authentication.WithTokenAuthentication(token), + authentication.WithAPIVersion(apiVersion), + authentication.WithUserAgent(userAgent)) + + reqInfo := abstractions.NewRequestInformation() + addtlContext := make(map[string]interface{}) + + err := provider.AuthenticateRequest(context.Background(), reqInfo, addtlContext) + if err != nil { + t.Errorf("should be no error when calling authenticated request") + } + + apiVersions := reqInfo.Headers.Get(headers.APIVersionKey) + if len(apiVersions) != 1 { + t.Errorf("exactly one API version should be present in the request") + } + + if apiVersions[0] != apiVersion { + t.Errorf("default API version is set incorrectly") + } + + userAgents := reqInfo.Headers.Get(headers.UserAgentKey) + if len(userAgents) != 1 { + t.Errorf("exactly one user agent string should be present in the request") + } + + if userAgents[0] != userAgent { + t.Errorf("default user agent string is set incorrectly") + } + +} + +func TestAnonymousAuthIsAllowed(t *testing.T) { + provider := authentication.NewTokenProvider() + reqInfo := abstractions.NewRequestInformation() + addtlContext := make(map[string]interface{}) + + err := provider.AuthenticateRequest(context.Background(), reqInfo, addtlContext) + if err != nil { + t.Errorf("should be no error when calling authenticated request") + } + + authorizations := reqInfo.Headers.Get(headers.AuthorizationKey) + if len(authorizations) != 0 { + t.Errorf("no authorization header should be present in the request") + } +} + +func TestTokenSetInRequestIsNotOverwritten(t *testing.T) { + providerToken := "dit dit dit / dat dat dat / dit dit dit" + provider := authentication.NewTokenProvider( + authentication.WithTokenAuthentication(providerToken), + ) + + requestToken := "dit dit dit dit / dit / dit dat dit dit / dit dat dat dit" + requestHeaders := abstractions.NewRequestHeaders() + requestHeaders.Add(headers.AuthType, requestToken) + + reqInfo := abstractions.NewRequestInformation() + reqInfo.Headers = requestHeaders + addtlContext := make(map[string]interface{}) + + err := provider.AuthenticateRequest(context.Background(), reqInfo, addtlContext) + if err != nil { + t.Errorf("AuthenticateRequest should not error") + } + reqInfoToken := reqInfo.Headers.Get(headers.AuthorizationKey)[0] + + if !strings.Contains(reqInfoToken, providerToken) { + t.Errorf("received token doesn't match up with given token") + } +} + +// TODO(kfcampbell): make a more permanent decision about how to structure +// and separately run unit vs. integration tests +func TestHappyPathIntegration(t *testing.T) { + token := os.Getenv("GITHUB_TOKEN") + if token == "" { + t.Skip("in order to run integration tests, ensure a valid GITHUB_TOKEN exists in the environment") + } + + provider := authentication.NewTokenProvider( + authentication.WithTokenAuthentication(token), + ) + + adapter, err := http.NewNetHttpRequestAdapter(provider) + if err != nil { + log.Fatalf("Error creating request adapter: %v", err) + } + headers := abstractions.NewRequestHeaders() + _ = headers.TryAdd("Accept", "application/vnd.github.v3+json") + + client := github.NewApiClient(adapter) + + // Create a new instance of abstractions.RequestConfiguration + requestConfig := &abstractions.RequestConfiguration[user.EmailsRequestBuilderGetQueryParameters]{ + Headers: headers, + } + + userEmails, err := client.User().Emails().Get(context.Background(), requestConfig) + if err != nil { + log.Fatalf("%v\n", err) + } + + for _, v := range userEmails { + fmt.Printf("%v\n", *v.GetEmail()) + } +} diff --git a/pkg/client.go b/pkg/client.go new file mode 100644 index 0000000..ab5ac7c --- /dev/null +++ b/pkg/client.go @@ -0,0 +1,186 @@ +package pkg + +import ( + "fmt" + "net/http" + "time" + + "github.com/kfcampbell/ghinstallation" + kiotaHttp "github.com/microsoft/kiota-http-go" + auth "github.com/octokit/go-sdk-enterprise-cloud/pkg/authentication" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/github" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/handlers" +) + +// NewApiClient is a convenience constructor to create a new instance of a +// Client (wrapper of *github.ApiClient) with the provided option functions. +// By default, it includes a rate limiting middleware. +func NewApiClient(optionFuncs ...ClientOptionFunc) (*Client, error) { + options := GetDefaultClientOptions() + for _, optionFunc := range optionFuncs { + optionFunc(options) + } + + rateLimitHandler := handlers.NewRateLimitHandler() + middlewares := options.Middleware + middlewares = append(middlewares, rateLimitHandler) + defaultTransport := kiotaHttp.GetDefaultTransport() + netHttpClient := &http.Client{ + Transport: defaultTransport, + } + + if options.RequestTimeout != 0 { + netHttpClient.Timeout = options.RequestTimeout + } + + if (options.GitHubAppID != 0 || options.GitHubAppClientID != "") && options.GitHubAppInstallationID != 0 && options.GitHubAppPemFilePath != "" { + existingTransport := netHttpClient.Transport + var appTransport *ghinstallation.Transport + var err error + + if options.GitHubAppClientID != "" { + appTransport, err = ghinstallation.NewKeyFromFile(existingTransport, options.GitHubAppClientID, options.GitHubAppInstallationID, options.GitHubAppPemFilePath) + } else { + appTransport, err = ghinstallation.NewKeyFromFileWithAppID(existingTransport, options.GitHubAppID, options.GitHubAppInstallationID, options.GitHubAppPemFilePath) + } + + if err != nil { + return nil, fmt.Errorf("failed to create transport from GitHub App: %v", err) + } + + netHttpClient.Transport = appTransport + } + + // Middleware must be applied after App transport is set, otherwise App token will fail to be + // renewed with a 400 Bad Request error (even though the request is identical to a successful one.) + finalTransport := kiotaHttp.NewCustomTransportWithParentTransport(netHttpClient.Transport, middlewares...) + netHttpClient.Transport = finalTransport + + tokenProviderOptions := []auth.TokenProviderOption{ + auth.WithAPIVersion(options.APIVersion), + auth.WithUserAgent(options.UserAgent), + } + + // If a PAT is provided and GitHub App information is not, configure token authentication + if options.Token != "" && (options.GitHubAppInstallationID == 0 && options.GitHubAppPemFilePath == "") { + tokenProviderOptions = append(tokenProviderOptions, auth.WithTokenAuthentication(options.Token)) + } + + tokenProvider := auth.NewTokenProvider(tokenProviderOptions...) + + adapter, err := kiotaHttp.NewNetHttpRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient(tokenProvider, nil, nil, netHttpClient) + if err != nil { + return nil, fmt.Errorf("failed to create request adapter: %v", err) + } + if options.BaseURL != "" { + adapter.SetBaseUrl(options.BaseURL) + } + + client := github.NewApiClient(adapter) + sdkClient := &Client{ + ApiClient: client, + } + + return sdkClient, nil +} + +// Client wraps github.ApiClient so that we may provide neater constructors and ease of use +type Client struct { + *github.ApiClient +} + +// ClientOptions contains every setting we could possibly want to set for the token provider, +// the netHttpClient, the middleware, and the adapter. If we can possibly override it, it should +// be in this struct. +// In the constructor, when helper functions apply options, they'll be applied to this struct. +// Then later in the constructor when that chain of objects is put together, all configuration +// will be drawn from this (hydrated) struct. +type ClientOptions struct { + UserAgent string + APIVersion string + RequestTimeout time.Duration + Middleware []kiotaHttp.Middleware + BaseURL string + + // Token should be left blank if GitHub App auth or an unauthenticated client is desired. + Token string + + // GitHubAppPemFilePath should be left blank if token auth or an unauthenticated client is desired. + GitHubAppPemFilePath string + // GitHubAppID should be left blank if token auth or an unauthenticated client is desired. + // Deprecated: Use GitHubAppClientID instead. + GitHubAppID int64 + // GitHubAppClientID should be left blank if token auth or an unauthenticated client is desired. + GitHubAppClientID string + // GitHubAppInstallationID should be left blank if token auth or an unauthenticated client is desired. + GitHubAppInstallationID int64 +} + +// GetDefaultClientOptions returns a new instance of ClientOptions with default values. +// This is used in the NewApiClient constructor before applying user-defined custom options. +func GetDefaultClientOptions() *ClientOptions { + return &ClientOptions{ + UserAgent: "octokit/go-sdk", + APIVersion: "2022-11-28", + Middleware: kiotaHttp.GetDefaultMiddlewares(), + } +} + +// ClientOptionFunc provides a functional pattern for client configuration +type ClientOptionFunc func(*ClientOptions) + +// WithUserAgent configures the client with the given user agent string. +func WithUserAgent(userAgent string) ClientOptionFunc { + return func(c *ClientOptions) { + c.UserAgent = userAgent + } +} + +// WithRequestTimeout configures the client with the given request timeout. +func WithRequestTimeout(timeout time.Duration) ClientOptionFunc { + return func(c *ClientOptions) { + c.RequestTimeout = timeout + } +} + +// WithBaseUrl configures the client with the given base URL. +func WithBaseUrl(baseURL string) ClientOptionFunc { + return func(c *ClientOptions) { + c.BaseURL = baseURL + } +} + +// WithTokenAuthentication configures the client with the given +// Personal Authorization Token. +func WithTokenAuthentication(token string) ClientOptionFunc { + return func(c *ClientOptions) { + c.Token = token + } +} + +// WithAPIVersion configures the client with the given API version. +func WithAPIVersion(version string) ClientOptionFunc { + return func(c *ClientOptions) { + c.APIVersion = version + } +} + +// WithGitHubAppAuthenticationUsingAppID configures the client with the given GitHub App +// auth. Deprecated: Use WithGitHubAppAuthentication instead, which takes in a clientID +// string instead of an appID integer. +func WithGitHubAppAuthenticationUsingAppID(pemFilePath string, appID int64, installationID int64) ClientOptionFunc { + return func(c *ClientOptions) { + c.GitHubAppPemFilePath = pemFilePath + c.GitHubAppID = appID + c.GitHubAppInstallationID = installationID + } +} + +// WithGitHubAppAuthentication configures the client with the given GitHub App auth. +func WithGitHubAppAuthentication(pemFilePath string, clientID string, installationID int64) ClientOptionFunc { + return func(c *ClientOptions) { + c.GitHubAppPemFilePath = pemFilePath + c.GitHubAppClientID = clientID + c.GitHubAppInstallationID = installationID + } +} diff --git a/pkg/client_test.go b/pkg/client_test.go new file mode 100644 index 0000000..58c4a1e --- /dev/null +++ b/pkg/client_test.go @@ -0,0 +1,135 @@ +package pkg + +import ( + "os" + "testing" + + "github.com/octokit/go-sdk-enterprise-cloud/pkg/headers" +) + +const ( + installationID = 1234 + clientID = "testClientID" + pemFileName = "testPemFile" + token = "testToken" + appID = 123 +) + +// test key taken from Go source code at +// https://go.dev/src/crypto/rsa/rsa_test.go +var key = []byte(`-----BEGIN TESTING KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDNoyFUYeDuqw+k +iyv47iBy/udbWmQdpbUZ8JobHv8uQrvL7sQN6l83teHgNJsXqtiLF3MC+K+XI6Dq +hxUWfQwLip8WEnv7Jx/+53S8yp/CS4Jw86Q1bQHbZjFDpcoqSuwAxlegw18HNZCY +fpipYnA1lYCm+MTjtgXJQbjA0dwUGCf4BDMqt+76Jk3XZF5975rftbkGoT9eu8Jt +Xs5F5Xkwd8q3fkQz+fpLW4u9jrfFyQ61RRFkYrCjlhtGjYIzBHGgQM4n/sNXhiy5 +h0tA7Xa6NyYrN/OXe/Y1K8Rz/tzlvbMoxgZgtBuKo1N3m8ckFi7hUVK2eNv7GoAb +teTTPrg/AgMBAAECggEAAnfsVpmsL3R0Bh4gXRpPeM63H6e1a8B8kyVwiO9o0cXX +gKp9+P39izfB0Kt6lyCj/Wg+wOQT7rg5qy1yIw7fBHGmcjquxh3uN0s3YZ+Vcym6 +SAY5f0vh/OyJN9r3Uv8+Pc4jtb7So7QDzdWeZurssBmUB0avAMRdGNFGP5SyILcz +l3Q59hTxQ4czRHKjZ06L1/sA+tFVbO1j39FN8nMOU/ovLF4lAmZTkQ6AP6n6XPHP +B8Nq7jSYz6RDO200jzp6UsdrnjjkJRbzOxN/fn+ckCP+WYuq+y/d05ET9PdVa4qI +Jyr80D9QgHmfztcecvYwoskGnkb2F4Tmp0WnAj/xVQKBgQD4TrMLyyHdbAr5hoSi +p+r7qBQxnHxPe2FKO7aqagi4iPEHauEDgwPIcsOYota1ACiSs3BaESdJAClbqPYd +HDI4c2DZ6opux6WYkSju+tVXYW6qarR3fzrP3fUCdz2c2NfruWOqq8YmjzAhTNPm +YzvtzTdwheNYV0Vi71t1SfZmfQKBgQDUAgSUcrgXdGDnSbaNe6KwjY5oZWOQfZe2 +DUhqfN/JRFZj+EMfIIh6OQXnZqkp0FeRdfRAFl8Yz8ESHEs4j+TikLJEeOdfmYLS +TWxlMPDTUGbUvSf4g358NJ8TlfYA7dYpSTNPXMRSLtsz1palmaDBTE/V2xKtTH6p +VglRNRUKawKBgCPqBh2TkN9czC2RFkgMb4FcqycN0jEQ0F6TSnVVhtNiAzKmc8s1 +POvWJZJDIzjkv/mP+JUeXAdD/bdjNc26EU126rA6KzGgsMPjYv9FymusDPybGGUc +Qt5j5RcpNgEkn/5ZPyAlXjCfjz+RxChTfAyGHRmqU9qoLMIFir3pJ7llAoGBAMNH +sIxENwlzqyafoUUlEq/pU7kZWuJmrO2FwqRDraYoCiM/NCRhxRQ/ng6NY1gejepw +abD2alXiV4alBSxubne6rFmhvA00y2mG40c6Ezmxn2ZpbX3dMQ6bMcPKp7QnXtLc +mCSL4FGK02ImUNDsd0RVVFw51DRId4rmsuJYMK9NAoGAKlYdc4784ixTD2ZICIOC +ZWPxPAyQUEA7EkuUhAX1bVNG6UJTYA8kmGcUCG4jPTgWzi00IyUUr8jK7efyU/zs +qiJuVs1bia+flYIQpysMl1VzZh8gW1nkB4SVPm5l2wBvVJDIr9Mc6rueC/oVNkh2 +fLVGuFoTVIu2bF0cWAjNNMg= +-----END TESTING KEY-----`) + +func TestNewApiClientUnauthenticatedHappyPath(t *testing.T) { + client, err := NewApiClient( + WithAPIVersion(headers.APIVersionValue), + ) + if err != nil { + t.Fatalf("error creating client: %v", err) + } + if client == nil { + t.Fatalf("client is nil") + } +} + +func TestNewApiClientTokenAuthHappyPath(t *testing.T) { + client, err := NewApiClient(WithTokenAuthentication(token)) + if err != nil { + t.Fatalf("error creating client: %v", err) + } + if client == nil { + t.Fatalf("client is nil") + } +} + +func TestNewApiClientAppAuthHappyPath(t *testing.T) { + tmpfile, err := os.CreateTemp("", pemFileName) + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpfile.Name()) + + if _, err := tmpfile.Write(key); err != nil { + t.Fatal(err) + } + if err := tmpfile.Close(); err != nil { + t.Fatal(err) + } + + client, err := NewApiClient(WithGitHubAppAuthentication(tmpfile.Name(), clientID, installationID)) + if err != nil { + t.Fatalf("error creating client: %v", err) + } + if client == nil { + t.Fatalf("client is nil") + } +} + +func TestNewApiClientAppAuthErrorGettingKeyFromFile(t *testing.T) { + client, err := NewApiClient(WithGitHubAppAuthentication("pem/file/does/not/exist.pem", clientID, installationID)) + if err == nil { + t.Fatalf("expected error creating client") + } + if client != nil { + t.Fatalf("client is not nil") + } +} + +func TestNewApiClientAppAuthWithAppIDHappyPath(t *testing.T) { + tmpfile, err := os.CreateTemp("", pemFileName) + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpfile.Name()) + + if _, err := tmpfile.Write(key); err != nil { + t.Fatal(err) + } + if err := tmpfile.Close(); err != nil { + t.Fatal(err) + } + + client, err := NewApiClient(WithGitHubAppAuthenticationUsingAppID(tmpfile.Name(), appID, installationID)) + if err != nil { + t.Fatalf("error creating client: %v", err) + } + if client == nil { + t.Fatalf("client is nil") + } +} + +func TestNewApiClientAppAuthWithAppIDErrorGettingKeyFromFile(t *testing.T) { + client, err := NewApiClient(WithGitHubAppAuthenticationUsingAppID("pem/file/does/not/exist.pem", appID, installationID)) + if err == nil { + t.Fatalf("expected error creating client") + } + if client != nil { + t.Fatalf("client is not nil") + } +} diff --git a/pkg/example_test.go b/pkg/example_test.go new file mode 100644 index 0000000..9a3c8b0 --- /dev/null +++ b/pkg/example_test.go @@ -0,0 +1,134 @@ +package pkg_test + +import ( + "context" + "fmt" + "log" + "os" + "time" + + abs "github.com/microsoft/kiota-abstractions-go" + kiotaHttp "github.com/microsoft/kiota-http-go" + "github.com/octokit/go-sdk-enterprise-cloud/pkg" + auth "github.com/octokit/go-sdk-enterprise-cloud/pkg/authentication" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/github" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/octocat" +) + +// ExampleApiClient_Octocat constructs an unauthenticated API client +// and makes a simple API request. +func ExampleApiClient_Octocat() { + client, err := pkg.NewApiClient( + pkg.WithUserAgent("octokit/go-sdk.example-functions"), + pkg.WithRequestTimeout(5*time.Second), + pkg.WithBaseUrl("https://api.github.com"), + pkg.WithTokenAuthentication(os.Getenv("GITHUB_TOKEN")), + ) + + // equally valid: + //client, err := pkg.NewApiClient() + if err != nil { + log.Fatalf("error creating client: %v", err) + } + + s := "Salutations" + + // create headers that accept json back; GitHub's OpenAPI definition says + // octet-stream but that's not actually what the API returns in this case + headers := abs.NewRequestHeaders() + _ = headers.TryAdd("Accept", "application/vnd.github.v3+json") + + octocatRequestConfig := &abs.RequestConfiguration[octocat.OctocatRequestBuilderGetQueryParameters]{ + QueryParameters: &octocat.OctocatRequestBuilderGetQueryParameters{ + S: &s, + }, + Headers: headers, + } + + cat, err := client.Octocat().Get(context.Background(), octocatRequestConfig) + if err != nil { + log.Fatalf("error getting octocat: %v", err) + } + fmt.Printf("%v\n", string(cat)) + // Output: + // MMM. .MMM + // MMMMMMMMMMMMMMMMMMM + // MMMMMMMMMMMMMMMMMMM _____________ + // MMMMMMMMMMMMMMMMMMMMM | | + // MMMMMMMMMMMMMMMMMMMMMMM | Salutations | + // MMMMMMMMMMMMMMMMMMMMMMMM |_ _________| + // MMMM::- -:::::::- -::MMMM |/ + // MM~:~ 00~:::::~ 00~:~MM + // .. MMMMM::.00:::+:::.00::MMMMM .. + // .MM::::: ._. :::::MM. + // MMMM;:::::;MMMM + // -MM MMMMMMM + // ^ M+ MMMMMMMMM + // MMMMMMM MM MM MM + // MM MM MM MM + // MM MM MM MM + // .~~MM~MM~MM~MM~~. + // ~~~~MM:~MM~~~MM~:MM~~~~ + // ~~~~~~==~==~~~==~==~~~~~~ + // ~~~~~~==~==~==~==~~~~~~ + // :~==~==~==~==~~ +} + +// ExampleApiClient_Octocat_withoutConvenienceConstructor shows how to +// initialize an unauthenticated API client without using the helpers +// provided in pkg/client.go, then makes a simple API request. +func ExampleApiClient_Octocat_withoutConvenienceConstructor() { + tokenProvider := auth.NewTokenProvider( + // to create an authenticated provider, uncomment the below line and pass in your token + // auth.WithTokenAuthentication("ghp_your_token"), + auth.WithUserAgent("octokit/go-sdk.example-functions"), + ) + adapter, err := kiotaHttp.NewNetHttpRequestAdapter(tokenProvider) + if err != nil { + log.Fatalf("Error creating request adapter: %v", err) + } + + client := github.NewApiClient(adapter) + + s := "Salutations" + + // create headers that accept json back; GitHub's OpenAPI definition says + // octet-stream but that's not actually what the API returns in this case + headers := abs.NewRequestHeaders() + _ = headers.TryAdd("Accept", "application/vnd.github.v3+json") + + octocatRequestConfig := &abs.RequestConfiguration[octocat.OctocatRequestBuilderGetQueryParameters]{ + QueryParameters: &octocat.OctocatRequestBuilderGetQueryParameters{ + S: &s, + }, + Headers: headers, + } + + cat, err := client.Octocat().Get(context.Background(), octocatRequestConfig) + if err != nil { + log.Fatalf("error getting octocat: %v", err) + } + fmt.Printf("%v\n", string(cat)) + // Output: + // MMM. .MMM + // MMMMMMMMMMMMMMMMMMM + // MMMMMMMMMMMMMMMMMMM _____________ + // MMMMMMMMMMMMMMMMMMMMM | | + // MMMMMMMMMMMMMMMMMMMMMMM | Salutations | + // MMMMMMMMMMMMMMMMMMMMMMMM |_ _________| + // MMMM::- -:::::::- -::MMMM |/ + // MM~:~ 00~:::::~ 00~:~MM + // .. MMMMM::.00:::+:::.00::MMMMM .. + // .MM::::: ._. :::::MM. + // MMMM;:::::;MMMM + // -MM MMMMMMM + // ^ M+ MMMMMMMMM + // MMMMMMM MM MM MM + // MM MM MM MM + // MM MM MM MM + // .~~MM~MM~MM~MM~~. + // ~~~~MM:~MM~~~MM~:MM~~~~ + // ~~~~~~==~==~~~==~==~~~~~~ + // ~~~~~~==~==~==~==~~~~~~ + // :~==~==~==~==~~ +} diff --git a/pkg/github/.kiota.log b/pkg/github/.kiota.log new file mode 100644 index 0000000..def3d62 --- /dev/null +++ b/pkg/github/.kiota.log @@ -0,0 +1,22410 @@ +Trace: KiotaBuilder configuration: {"Generation":{"ShouldGetApiManifest":false,"SkipGeneration":false,"Operation":null,"OpenAPIFilePath":"/home/runner/work/source-generator/source-generator/schemas/ghec.json","ApiManifestPath":"/home/runner/work/source-generator/source-generator/apimanifest.json","OutputPath":"/home/runner/work/source-generator/source-generator/stage/go/go-sdk-enterprise-cloud/pkg/github","ClientClassName":"ApiClient","ClientNamespaceName":"github.com/octokit/go-sdk-enterprise-cloud/pkg/github","NamespaceNameSeparator":".","ModelsNamespaceName":"github.com/octokit/go-sdk-enterprise-cloud/pkg/github.models","Language":5,"PluginTypes":[],"ApiRootUrl":null,"UsesBackingStore":false,"ExcludeBackwardCompatible":true,"IncludeBackwardCompatible":false,"IncludeAdditionalData":true,"Serializers":["Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory","Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory","Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory","Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory"],"Deserializers":["Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory","Microsoft.Kiota.Serialization.Text.TextParseNodeFactory","Microsoft.Kiota.Serialization.Form.FormParseNodeFactory"],"ShouldWriteNamespaceIndices":false,"ShouldWriteBarrelsIfClassExists":false,"CleanOutput":false,"StructuredMimeTypes":["application/json","text/plain;q=0.9","application/x-www-form-urlencoded;q=0.2","multipart/form-data;q=0.1"],"IncludePatterns":[],"ExcludePatterns":[],"PatternsOverride":[],"ClearCache":false,"DisabledValidationRules":[],"MaxDegreeOfParallelism":-1,"IsPluginConfiguration":false},"Search":{"APIsGuruListUrl":"https://raw.githubusercontent.com/APIs-guru/openapi-directory/gh-pages/v2/list.json","GitHub":{"AppId":"Iv1.9ed2bcb878c90617","ApiBaseUrl":"https://api.github.com","BlockListUrl":"https://raw.githubusercontent.com/microsoft/kiota/main/resources/index-block-list.yml","AppManagement":"https://aka.ms/kiota/install/github"},"ClearCache":false},"Download":{"OutputPath":"./output/result.json","CleanOutput":false,"ClearCache":false},"Languages":{"CLI":{"MaturityLevel":1,"Dependencies":[{"Name":"Microsoft.Kiota.Abstractions","Version":"1.8.4"},{"Name":"Microsoft.Kiota.Http.HttpClientLibrary","Version":"1.4.0"},{"Name":"Microsoft.Kiota.Serialization.Form","Version":"1.1.6"},{"Name":"Microsoft.Kiota.Serialization.Json","Version":"1.2.3"},{"Name":"Microsoft.Kiota.Authentication.Azure","Version":"1.1.5"},{"Name":"Microsoft.Kiota.Serialization.Text","Version":"1.1.5"},{"Name":"Microsoft.Kiota.Cli.Commons","Version":"1.1.1"}],"DependencyInstallCommand":"dotnet add package {0} --version {1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"CSharp":{"MaturityLevel":2,"Dependencies":[{"Name":"Microsoft.Kiota.Abstractions","Version":"1.8.4"},{"Name":"Microsoft.Kiota.Http.HttpClientLibrary","Version":"1.4.0"},{"Name":"Microsoft.Kiota.Serialization.Form","Version":"1.1.6"},{"Name":"Microsoft.Kiota.Serialization.Json","Version":"1.2.3"},{"Name":"Microsoft.Kiota.Authentication.Azure","Version":"1.1.5"},{"Name":"Microsoft.Kiota.Serialization.Text","Version":"1.1.5"},{"Name":"Microsoft.Kiota.Serialization.Multipart","Version":"1.1.4"}],"DependencyInstallCommand":"dotnet add package {0} --version {1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Go":{"MaturityLevel":2,"Dependencies":[{"Name":"github.com/microsoft/kiota-abstractions-go","Version":"v1.6.0"},{"Name":"github.com/microsoft/kiota-http-go","Version":"v1.3.3"},{"Name":"github.com/microsoft/kiota-serialization-form-go","Version":"v1.0.0"},{"Name":"github.com/microsoft/kiota-serialization-json-go","Version":"v1.0.7"},{"Name":"github.com/microsoft/kiota-authentication-azure-go","Version":"v1.0.2"},{"Name":"github.com/microsoft/kiota-serialization-text-go","Version":"v1.0.0"},{"Name":"github.com/microsoft/kiota-serialization-multipart-go","Version":"v1.0.0"}],"DependencyInstallCommand":"go get {0}@{1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Java":{"MaturityLevel":2,"Dependencies":[{"Name":"com.microsoft.kiota:microsoft-kiota-abstractions","Version":"1.1.9"},{"Name":"com.microsoft.kiota:microsoft-kiota-http-okHttp","Version":"1.1.9"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-form","Version":"1.1.9"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-json","Version":"1.1.9"},{"Name":"com.microsoft.kiota:microsoft-kiota-authentication-azure","Version":"1.1.9"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-text","Version":"1.1.9"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-multipart","Version":"1.1.9"},{"Name":"jakarta.annotation:jakarta.annotation-api","Version":"3.0.0"}],"DependencyInstallCommand":"{0}:{1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"PHP":{"MaturityLevel":2,"Dependencies":[{"Name":"microsoft/kiota-abstractions","Version":"1.3.1"},{"Name":"microsoft/kiota-http-guzzle","Version":"1.3.0"},{"Name":"microsoft/kiota-serialization-json","Version":"1.1.0"},{"Name":"microsoft/kiota-authentication-phpleague","Version":"1.1.0"},{"Name":"microsoft/kiota-serialization-text","Version":"1.0.1"}],"DependencyInstallCommand":"composer require {0}:{1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Python":{"MaturityLevel":2,"Dependencies":[{"Name":"microsoft-kiota-abstractions","Version":"1.3.2"},{"Name":"microsoft-kiota-http","Version":"1.3.1"},{"Name":"microsoft-kiota-serialization-json","Version":"1.2.0"},{"Name":"microsoft-kiota-authentication-azure","Version":"1.0.0"},{"Name":"microsoft-kiota-serialization-text","Version":"1.0.0"},{"Name":"microsoft-kiota-serialization-form","Version":"0.1.0"},{"Name":"microsoft-kiota-serialization-multipart","Version":"0.1.0"}],"DependencyInstallCommand":"pip install {0}=={1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Ruby":{"MaturityLevel":0,"Dependencies":[{"Name":"microsoft_kiota_abstractions","Version":"0.14.4"},{"Name":"microsoft_kiota_faraday","Version":"0.15.0"},{"Name":"microsoft_kiota_serialization_json","Version":"0.9.1"},{"Name":"microsoft_kiota_authentication_oauth","Version":"0.8.0"}],"DependencyInstallCommand":"gem install \u0022{0}\u0022 -v \u0022{1}\u0022","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Swift":{"MaturityLevel":0,"Dependencies":[],"DependencyInstallCommand":"","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"TypeScript":{"MaturityLevel":1,"Dependencies":[{"Name":"@microsoft/kiota-abstractions","Version":"1.0.0-preview.51"},{"Name":"@microsoft/kiota-http-fetchlibrary","Version":"1.0.0-preview.50"},{"Name":"@microsoft/kiota-serialization-form","Version":"1.0.0-preview.40"},{"Name":"@microsoft/kiota-serialization-json","Version":"1.0.0-preview.51"},{"Name":"@microsoft/kiota-authentication-azure","Version":"1.0.0-preview.46"},{"Name":"@microsoft/kiota-serialization-text","Version":"1.0.0-preview.48"},{"Name":"@microsoft/kiota-serialization-multipart","Version":"1.0.0-preview.29"}],"DependencyInstallCommand":"npm install {0}@{1} -SE","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]}},"Update":{"OrgName":"microsoft","RepoName":"kiota","Disabled":false}} +Debug: KiotaBuilder kiota version 1.14.0 +Information: KiotaBuilder loaded description from local source +Trace: KiotaBuilder 22ms: Read OpenAPI file /home/runner/work/source-generator/source-generator/schemas/ghec.json +Debug: KiotaBuilder step 1 - reading the stream - took 00:00:00.0261139 +Trace: KiotaBuilder Parsing OpenAPI file +Warning: KiotaBuilder OpenAPI warning: #/ - The schema webhook-pull-request-review-request-removed is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema issue-event-for-issue is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema webhook-pull-request-review-requested is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema timeline-issue-events is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema /repos/{owner}/{repo}/contents/{path} is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema /user is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema /user/{account_id} is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/ - The schema /users/{username} is a polymorphic type but does not define a discriminator. This will result in a serialization errors. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/github_reviewed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/nvd_published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/credits/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories/get/responses/200/content/application~1json/examples/default/value/0/credits/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/github_reviewed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/nvd_published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/credits/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/credits/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1hook~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installation-requests/get/responses/200/content/application~1json/examples/exampleKey1/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installation-requests/get/responses/200/content/application~1json/examples/exampleKey1/value/0/requester/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installation-requests/get/responses/200/content/application~1json/examples/exampleKey1/value/0/requester/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installation-requests/get/responses/200/content/application~1json/examples/exampleKey1/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations/get/responses/200/content/application~1json/examples/default/value/0/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}/get/responses/200/content/application~1json/examples/default/value/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1app~1installations~1{installation_id}~1access_tokens/post/responses/201/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/post/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/post/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/patch/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/installation/account/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/installation/account/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1applications~1{client_id}~1token~1scoped/post/responses/200/content/application~1json/examples/default/value/installation/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1apps~1{app_slug}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1apps~1{app_slug}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1apps~1{app_slug}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1apps~1{app_slug}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1apps~1{app_slug}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/public_repo - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/invitations_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/students_are_repo_admins - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/feedback_pull_requests_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/max_teams - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/max_members - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/submitted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/passing - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/deadline - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/classroom/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}/get/responses/200/content/application~1json/examples/default/value/classroom/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}~1accepted_assignments/get/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}~1grades/get/responses/200/content/application~1json/examples/default/value/0/points_awarded - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}~1grades/get/responses/200/content/application~1json/examples/default/value/0/points_available - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}~1grades/get/responses/200/content/application~1json/examples/default/value/1/points_awarded - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1assignments~1{assignment_id}~1grades/get/responses/200/content/application~1json/examples/default/value/1/points_available - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1classrooms/get/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1classrooms~1{classroom_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1classrooms~1{classroom_id}/get/responses/200/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1classrooms~1{classroom_id}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1classrooms~1{classroom_id}~1assignments/get/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprise-installation~1{enterprise_or_org}~1server-statistics/get/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1cache~1usage/get/responses/200/content/application~1json/examples/default/value/total_active_caches_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1cache~1usage/get/responses/200/content/application~1json/examples/default/value/total_active_caches_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1oidc~1customization~1issuer/put/requestBody/content/application~1json/examples/default/value/include_enterprise_slug - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1organizations/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1organizations/get/responses/200/content/application~1json/examples/default/value/organizations/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1selected-actions/get/responses/200/content/application~1json/examples/default/value/github_owned_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1selected-actions/get/responses/200/content/application~1json/examples/default/value/verified_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1selected-actions/put/requestBody/content/application~1json/examples/selected_actions/value/github_owned_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1selected-actions/put/requestBody/content/application~1json/examples/selected_actions/value/verified_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1workflow/get/responses/200/content/application~1json/examples/default/value/can_approve_pull_request_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1permissions~1workflow/put/requestBody/content/application~1json/examples/default/value/can_approve_pull_request_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1organizations/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1organizations/get/responses/200/content/application~1json/examples/default/value/organizations/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1registration-token/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1remove-token/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1announcement/get/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1announcement/get/responses/200/content/application~1json/examples/default/value/user_dismissible - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1announcement/patch/requestBody/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1announcement/patch/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1announcement/patch/responses/200/content/application~1json/examples/default/value/user_dismissible - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1audit-log/get/responses/200/content/application~1json/examples/default/value/0/@timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1audit-log/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1audit-log/get/responses/200/content/application~1json/examples/default/value/1/@timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1audit-log/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1audit-log/get/responses/200/content/application~1json/examples/default/value/2/@timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1audit-log/get/responses/200/content/application~1json/examples/default/value/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code_security_and_analysis/get/responses/200/content/application~1json/examples/default/value/advanced_security_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code_security_and_analysis/get/responses/200/content/application~1json/examples/default/value/dependabot_alerts_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code_security_and_analysis/get/responses/200/content/application~1json/examples/default/value/secret_scanning_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code_security_and_analysis/get/responses/200/content/application~1json/examples/default/value/secret_scanning_push_protection_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1code_security_and_analysis/get/responses/200/content/application~1json/examples/default/value/secret_scanning_validity_checks_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/total_seats - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/pending_cancellation_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/last_activity_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/pending_cancellation_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/last_activity_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/day - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_chat_acceptances - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_chat_turns - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_active_chat_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/day - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_chat_acceptances - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_chat_turns - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_active_chat_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/total_minutes_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/total_paid_minutes_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/included_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/UBUNTU - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/MACOS - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/WINDOWS - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/total_advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/maximum_advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/purchased_advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/repositories/0/advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/repositories/1/advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/total_gigabytes_bandwidth_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/total_paid_gigabytes_bandwidth_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/included_gigabytes_bandwidth - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/days_left_in_billing_cycle - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/estimated_paid_storage_for_month - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1enterprises~1{enterprise}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/estimated_storage_for_month - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1events/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/files/hello_world.rb/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/get/responses/200/content/application~1json/examples/default/value/0/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/files/README.md/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/files/README.md/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/history/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/history/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/history/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/history/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/history/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/history/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists/post/responses/201/content/application~1json/examples/default/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/files/hello_world.rb/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1public/get/responses/200/content/application~1json/examples/default/value/0/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/files/hello_world.rb/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1starred/get/responses/200/content/application~1json/examples/default/value/0/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/files/README.md/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/files/README.md/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/history/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/history/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/history/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/history/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/history/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/history/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/get/responses/200/content/application~1json/examples/default/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/files/README.md/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/files/README.md/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/history/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/history/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/history/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/history/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/history/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/history/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/updateGist/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/history/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/history/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/history/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/history/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/history/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/history/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/deleteFile/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/files/goodbye.py/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/files/goodbye.py/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/history/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/history/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/history/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/history/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/history/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/history/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}/patch/responses/200/content/application~1json/examples/renameFile/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1commits/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1commits/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1commits/get/responses/200/content/application~1json/examples/default/value/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1commits/get/responses/200/content/application~1json/examples/default/value/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1commits/get/responses/200/content/application~1json/examples/default/value/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1commits/get/responses/200/content/application~1json/examples/default/value/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/get/responses/200/content/application~1json/examples/default/value/0/files/hello_world.rb/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/files/hello_world.rb/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1forks/post/responses/201/content/application~1json/examples/default/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/files/README.md/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/files/README.md/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/history/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/history/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/history/0/committed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/history/0/change_status/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/history/0/change_status/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/history/0/change_status/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1gists~1{gist_id}~1{sha}/get/responses/200/content/application~1json/examples/default/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1installation~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1licenses~1{license}/get/responses/200/content/application~1json/examples/default/value/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1markdown~1raw/post/requestBody/content/text~1plain/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1markdown~1raw/post/requestBody/content/text~1x-markdown/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/on_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans/get/responses/200/content/application~1json/examples/default/value/0/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans/get/responses/200/content/application~1json/examples/default/value/0/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans/get/responses/200/content/application~1json/examples/default/value/0/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/on_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_pending_change/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/on_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1accounts~1{account_id}/get/responses/200/content/application~1json/examples/default/value/marketplace_purchase/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans/get/responses/200/content/application~1json/examples/default/value/0/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans/get/responses/200/content/application~1json/examples/default/value/0/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans/get/responses/200/content/application~1json/examples/default/value/0/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_pending_change/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/on_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1marketplace_listing~1stubbed~1plans~1{plan_id}~1accounts/get/responses/200/content/application~1json/examples/default/value/0/marketplace_purchase/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1meta/get/responses/200/content/application~1json/examples/default/value/verifiable_password_authentication - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1networks~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications/get/responses/200/content/application~1json/examples/default/value/0/unread - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}/get/responses/200/content/application~1json/examples/default/value/unread - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}~1subscription/get/responses/200/content/application~1json/examples/default/value/subscribed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}~1subscription/get/responses/200/content/application~1json/examples/default/value/ignored - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}~1subscription/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}~1subscription/put/responses/200/content/application~1json/examples/default/value/subscribed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}~1subscription/put/responses/200/content/application~1json/examples/default/value/ignored - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1notifications~1threads~1{thread_id}~1subscription/put/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1organizations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/total_private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/owned_private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/private_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/disk_usage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/collaborators - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/plan/space - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/plan/private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/plan/filled_seats - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/plan/seats - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/two_factor_requirement_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_private_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_internal_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_public_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_create_private_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/members_can_fork_private_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/archived_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/dependency_graph_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/dependabot_alerts_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/dependabot_security_updates_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/advanced_security_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/secret_scanning_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/secret_scanning_push_protection_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/secret_scanning_push_protection_custom_link_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/get/responses/200/content/application~1json/examples/default-response/value/secret_scanning_validity_checks_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/total_private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/owned_private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/private_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/disk_usage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/collaborators - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/plan/space - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/plan/private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/plan/filled_seats - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/plan/seats - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/two_factor_requirement_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_private_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_internal_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_public_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_create_private_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/members_can_fork_private_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/archived_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/dependency_graph_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/dependabot_alerts_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/dependabot_security_updates_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/advanced_security_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/secret_scanning_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/secret_scanning_push_protection_enabled_for_new_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/secret_scanning_push_protection_custom_link_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/secret_scanning_validity_checks_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage/get/responses/200/content/application~1json/examples/default/value/total_active_caches_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage/get/responses/200/content/application~1json/examples/default/value/total_active_caches_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage-by-repository/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage-by-repository/get/responses/200/content/application~1json/examples/default/value/repository_cache_usages/0/active_caches_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage-by-repository/get/responses/200/content/application~1json/examples/default/value/repository_cache_usages/0/active_caches_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage-by-repository/get/responses/200/content/application~1json/examples/default/value/repository_cache_usages/1/active_caches_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1cache~1usage-by-repository/get/responses/200/content/application~1json/examples/default/value/repository_cache_usages/1/active_caches_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1oidc~1customization~1sub/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1selected-actions/get/responses/200/content/application~1json/examples/default/value/github_owned_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1selected-actions/get/responses/200/content/application~1json/examples/default/value/verified_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1selected-actions/put/requestBody/content/application~1json/examples/selected_actions/value/github_owned_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1selected-actions/put/requestBody/content/application~1json/examples/selected_actions/value/verified_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1workflow/get/responses/200/content/application~1json/examples/default/value/can_approve_pull_request_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1permissions~1workflow/put/requestBody/content/application~1json/examples/default/value/can_approve_pull_request_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/inherited - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/0/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/inherited - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/1/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/inherited - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/get/responses/200/content/application~1json/examples/default/value/runner_groups/2/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/inherited - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups/post/responses/201/content/application~1json/examples/default/value/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/inherited - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/get/responses/200/content/application~1json/examples/default/value/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/inherited - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/allows_public_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/restricted_to_workflows - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}/patch/responses/200/content/application~1json/examples/default/value/workflow_restrictions_read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runner-groups~1{runner_group_id}~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1registration-token/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1remove-token/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1actions~1variables~1{name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1announcement/get/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1announcement/get/responses/200/content/application~1json/examples/default/value/user_dismissible - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1announcement/patch/requestBody/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1announcement/patch/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1announcement/patch/responses/200/content/application~1json/examples/default/value/user_dismissible - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1attestations~1{subject_digest}/get/responses/200/content/application~1json/examples/default/value/attestations/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1attestations~1{subject_digest}/get/responses/200/content/application~1json/examples/default/value/attestations/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1audit-log/get/responses/200/content/application~1json/examples/default/value/0/@timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1audit-log/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1audit-log/get/responses/200/content/application~1json/examples/default/value/1/@timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1audit-log/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1audit-log/get/responses/200/content/application~1json/examples/default/value/2/@timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1audit-log/get/responses/200/content/application~1json/examples/default/value/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1blocks/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1blocks/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1defaults/get/responses/200/content/application~1json/examples/default/value/0/configuration/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1defaults/get/responses/200/content/application~1json/examples/default/value/0/configuration/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1defaults/get/responses/200/content/application~1json/examples/default/value/0/configuration/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1defaults/get/responses/200/content/application~1json/examples/default/value/1/configuration/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1defaults/get/responses/200/content/application~1json/examples/default/value/1/configuration/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1defaults/get/responses/200/content/application~1json/examples/default/value/1/configuration/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1{configuration_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1{configuration_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1{configuration_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1{configuration_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1{configuration_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1code-security~1configurations~1{configuration_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing/get/responses/200/content/application~1json/examples/default/value/seat_breakdown/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing/get/responses/200/content/application~1json/examples/default/value/seat_breakdown/added_this_cycle - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing/get/responses/200/content/application~1json/examples/default/value/seat_breakdown/pending_invitation - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing/get/responses/200/content/application~1json/examples/default/value/seat_breakdown/pending_cancellation - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing/get/responses/200/content/application~1json/examples/default/value/seat_breakdown/active_this_cycle - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing/get/responses/200/content/application~1json/examples/default/value/seat_breakdown/inactive_this_cycle - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/total_seats - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/pending_cancellation_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/0/last_activity_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/pending_cancellation_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1billing~1seats/get/responses/200/content/application~1json/examples/default/value/seats/1/last_activity_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/day - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_chat_acceptances - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_chat_turns - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/total_active_chat_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/0/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/1/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/0/breakdown/2/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/day - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_chat_acceptances - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_chat_turns - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/total_active_chat_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/0/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/1/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/suggestions_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/acceptances_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/lines_suggested - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/lines_accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1copilot~1usage/get/responses/200/content/application~1json/examples/default/value/1/breakdown/2/active_users - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/0/credential_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/0/credential_authorized_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/0/credential_accessed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/0/authorized_credential_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/1/credential_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/1/credential_authorized_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/1/credential_accessed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1credential-authorizations/get/responses/200/content/application~1json/examples/default/value/1/authorized_credential_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/0/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/0/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/1/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/1/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/get/responses/200/content/application~1json/examples/default/value/custom_roles/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom-repository-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1custom_roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1dependabot~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-group~1{group_id}/get/responses/200/content/application~1json/examples/default/value/group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-group~1{group_id}/get/responses/200/content/application~1json/examples/default/value/teams/0/team_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-group~1{group_id}/get/responses/200/content/application~1json/examples/default/value/teams/1/team_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-group~1{group_id}/get/responses/200/content/application~1json/examples/default/value/members/0/member_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-group~1{group_id}/get/responses/200/content/application~1json/examples/default/value/members/1/member_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-groups/get/responses/200/content/application~1json/examples/default/value/groups/0/group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1external-groups/get/responses/200/content/application~1json/examples/default/value/groups/1/group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1failed_invitations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1failed_invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1failed_invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1failed_invitations/get/responses/200/content/application~1json/examples/default/value/0/team_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/post/responses/201/content/application~1json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installation/get/responses/200/content/application~1json/examples/default/value/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1interaction-limits/put/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/team_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/post/responses/201/content/application~1json/examples/default/value/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/post/responses/201/content/application~1json/examples/default/value/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations/post/responses/201/content/application~1json/examples/default/value/team_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1invitations~1{invitation_id}~1teams/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1copilot/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1copilot/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1copilot/get/responses/200/content/application~1json/examples/default/value/pending_cancellation_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1members~1{username}~1copilot/get/responses/200/content/application~1json/examples/default/value/last_activity_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1memberships~1{username}/get/responses/200/content/application~1json/examples/response-if-user-has-an-active-admin-membership-with-organization/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1memberships~1{username}/get/responses/200/content/application~1json/examples/response-if-user-has-an-active-admin-membership-with-organization/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1memberships~1{username}/get/responses/200/content/application~1json/examples/response-if-user-has-an-active-admin-membership-with-organization/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1memberships~1{username}/put/responses/200/content/application~1json/examples/response-if-user-already-had-membership-with-organization/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1memberships~1{username}/put/responses/200/content/application~1json/examples/response-if-user-already-had-membership-with-organization/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1memberships~1{username}/put/responses/200/content/application~1json/examples/response-if-user-already-had-membership-with-organization/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/lock_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/exclude_attachments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/exclude_releases - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/exclude_owner_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/lock_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/exclude_attachments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/exclude_releases - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/exclude_owner_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/lock_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/exclude_attachments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/exclude_releases - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/exclude_owner_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/0/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/0/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/1/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/1/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/get/responses/200/content/application~1json/examples/default/value/roles/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}~1teams/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}~1users/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1organization-roles~1{role_id}~1users/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1outside_collaborators/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1outside_collaborators/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1outside_collaborators~1{username}/put/requestBody/content/application~1json/examples/204/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1outside_collaborators~1{username}/put/responses/202/content/application~1json/examples/202/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/0/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/1/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests/get/responses/200/content/application~1json/examples/default/value/0/token_expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-token-requests~1{pat_request_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens/get/responses/200/content/application~1json/examples/default/value/0/token_expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1personal-access-tokens~1{pat_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1projects/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1properties~1schema/get/responses/200/content/application~1json/examples/default/value/0/required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1properties~1schema/patch/responses/200/content/application~1json/examples/default/value/0/required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1properties~1schema~1{custom_property_name}/get/responses/200/content/application~1json/examples/default/value/required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1properties~1schema~1{custom_property_name}/put/responses/200/content/application~1json/examples/default/value/required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1properties~1values/get/responses/200/content/application~1json/examples/default/value/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1public_members/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1public_members/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1repos/post/responses/201/content/application~1json/examples/default/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/post/responses/201/content/application~1json/examples/default/value/bypass_actors/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/rule_evaluations/0/rule_source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/rule_evaluations/2/rule_source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/bypass_actors/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/bypass_actors/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/submission/accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1security-managers/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/total_minutes_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/total_paid_minutes_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/included_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/UBUNTU - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/MACOS - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/WINDOWS - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/total_advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/maximum_advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/purchased_advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/repositories/0/advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1advanced-security/get/responses/200/content/application~1json/examples/default/value/repositories/1/advanced_security_committers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/total_gigabytes_bandwidth_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/total_paid_gigabytes_bandwidth_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/included_gigabytes_bandwidth - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/days_left_in_billing_cycle - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/estimated_paid_storage_for_month - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/estimated_storage_for_month - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams/post/responses/201/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/get/responses/200/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/200/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}/patch/responses/201/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/get/responses/200/content/application~1json/examples/default/value/groups/0/group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/get/responses/200/content/application~1json/examples/default/value/groups/1/group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/patch/responses/200/content/application~1json/examples/default/value/group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/patch/responses/200/content/application~1json/examples/default/value/teams/0/team_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/patch/responses/200/content/application~1json/examples/default/value/teams/1/team_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/patch/responses/200/content/application~1json/examples/default/value/members/0/member_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1external-groups/patch/responses/200/content/application~1json/examples/default/value/members/1/member_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/team_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1members/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1members/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/permissions/read - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/permissions/write - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/permissions/read - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/permissions/write - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/permissions/maintain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/permissions/triage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-repository-permissions/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1teams/get/responses/200/content/application~1json/examples/response-if-child-teams-exist/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1orgs~1{org}~1teams~1{team_slug}~1teams/get/responses/200/content/application~1json/examples/response-if-child-teams-exist/value/0/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/get/responses/200/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/patch/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/patch/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}/patch/responses/200/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1cards~1{card_id}~1moves/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1cards/post/responses/201/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1columns~1{column_id}~1moves/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/patch/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/patch/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1collaborators~1{username}~1permission/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1collaborators~1{username}~1permission/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1columns/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1columns/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1projects~1{project_id}~1columns/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/core/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/core/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/core/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/core/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/search/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/search/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/search/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/search/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/graphql/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/graphql/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/graphql/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/graphql/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/integration_manifest/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/integration_manifest/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/integration_manifest/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/integration_manifest/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/source_import/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/source_import/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/source_import/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/source_import/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_scanning_upload/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_scanning_upload/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_scanning_upload/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_scanning_upload/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/actions_runner_registration/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/actions_runner_registration/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/actions_runner_registration/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/actions_runner_registration/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/scim/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/scim/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/scim/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/scim/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/dependency_snapshots/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/dependency_snapshots/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/dependency_snapshots/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/dependency_snapshots/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_search/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_search/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_search/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/resources/code_search/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/rate/limit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/rate/used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/rate/remaining - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1rate_limit/get/responses/200/content/application~1json/examples/default/value/rate/reset - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/default-response/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}/patch/responses/200/content/application~1json/examples/default/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/workflow_run/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/workflow_run/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/workflow_run/head_repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/workflow_run/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/workflow_run/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/workflow_run/head_repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/workflow_run/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/workflow_run/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1artifacts~1{artifact_id}/get/responses/200/content/application~1json/examples/default/value/workflow_run/head_repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1cache~1usage/get/responses/200/content/application~1json/examples/default/value/active_caches_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1cache~1usage/get/responses/200/content/application~1json/examples/default/value/active_caches_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/get/responses/200/content/application~1json/examples/default/value/actions_caches/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/get/responses/200/content/application~1json/examples/default/value/actions_caches/0/last_accessed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/get/responses/200/content/application~1json/examples/default/value/actions_caches/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/get/responses/200/content/application~1json/examples/default/value/actions_caches/0/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/delete/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/delete/responses/200/content/application~1json/examples/default/value/actions_caches/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/delete/responses/200/content/application~1json/examples/default/value/actions_caches/0/last_accessed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/delete/responses/200/content/application~1json/examples/default/value/actions_caches/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1caches/delete/responses/200/content/application~1json/examples/default/value/actions_caches/0/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/run_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/1/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/1/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/2/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/2/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/2/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/3/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/3/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/3/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/4/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/4/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/4/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/5/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/5/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/5/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/6/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/6/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/6/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/7/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/7/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/7/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/8/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/8/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/8/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/9/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/9/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/steps/9/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/runner_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}/get/responses/200/content/application~1json/examples/default/value/runner_group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1jobs~1{job_id}~1rerun/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1oidc~1customization~1sub/get/responses/200/content/application~1json/examples/default/value/use_default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1oidc~1customization~1sub/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-variables/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-variables/get/responses/200/content/application~1json/examples/default/value/variables/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-variables/get/responses/200/content/application~1json/examples/default/value/variables/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-variables/get/responses/200/content/application~1json/examples/default/value/variables/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1organization-variables/get/responses/200/content/application~1json/examples/default/value/variables/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions/get/responses/200/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions~1selected-actions/get/responses/200/content/application~1json/examples/default/value/github_owned_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions~1selected-actions/get/responses/200/content/application~1json/examples/default/value/verified_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions~1selected-actions/put/requestBody/content/application~1json/examples/selected_actions/value/github_owned_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions~1selected-actions/put/requestBody/content/application~1json/examples/selected_actions/value/verified_allowed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions~1workflow/get/responses/200/content/application~1json/examples/default/value/can_approve_pull_request_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1permissions~1workflow/put/requestBody/content/application~1json/examples/default/value/can_approve_pull_request_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/0/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners/get/responses/200/content/application~1json/examples/default/value/runners/1/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1registration-token/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1remove-token/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runners~1{runner_id}/get/responses/200/content/application~1json/examples/default/value/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/check_suite_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/run_number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/workflow_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/run_attempt - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/run_started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/triggering_actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/triggering_actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/check_suite_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/run_number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/workflow_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/run_attempt - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/run_started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/triggering_actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/triggering_actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/head_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/head_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/head_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/head_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}/get/responses/200/content/application~1json/examples/default/value/head_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1approvals/get/responses/200/content/application~1json/examples/default/value/0/environments/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1approvals/get/responses/200/content/application~1json/examples/default/value/0/environments/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1approvals/get/responses/200/content/application~1json/examples/default/value/0/environments/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1approvals/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1approvals/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1approve/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/workflow_run/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/workflow_run/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/0/workflow_run/head_repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/workflow_run/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/workflow_run/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1artifacts/get/responses/200/content/application~1json/examples/default/value/artifacts/1/workflow_run/head_repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/check_suite_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/run_number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/workflow_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/run_attempt - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/run_started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/triggering_actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/triggering_actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/head_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/head_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/head_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/head_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}/get/responses/200/content/application~1json/examples/default/value/head_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/run_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/1/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/1/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/2/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/2/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/2/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/3/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/3/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/3/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/4/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/4/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/4/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/5/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/5/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/5/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/6/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/6/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/6/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/7/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/7/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/7/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/8/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/8/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/8/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/9/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/9/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/9/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/runner_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1attempts~1{attempt_number}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/runner_group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1cancel/post/responses/202/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1force-cancel/post/responses/202/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/run_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/1/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/1/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/2/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/2/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/2/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/3/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/3/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/3/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/4/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/4/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/4/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/5/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/5/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/5/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/6/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/6/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/6/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/7/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/7/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/7/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/8/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/8/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/8/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/9/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/9/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/steps/9/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/runner_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1jobs/get/responses/200/content/application~1json/examples/default/value/jobs/0/runner_group_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/get/responses/200/content/application~1json/examples/default/value/0/environment/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/get/responses/200/content/application~1json/examples/default/value/0/wait_timer - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/get/responses/200/content/application~1json/examples/default/value/0/wait_timer_started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/get/responses/200/content/application~1json/examples/default/value/0/current_user_can_approve - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/transient_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1pending_deployments/post/responses/200/content/application~1json/examples/default/value/0/production_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1rerun/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1rerun-failed-jobs/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/UBUNTU/total_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/UBUNTU/jobs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/UBUNTU/job_runs/0/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/UBUNTU/job_runs/0/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/total_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/jobs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/0/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/0/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/1/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/1/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/2/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/2/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/3/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/job_runs/3/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/total_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/jobs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/job_runs/0/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/job_runs/0/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/job_runs/1/job_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/job_runs/1/duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1runs~1{run_id}~1timing/get/responses/200/content/application~1json/examples/default/value/run_duration_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables/get/responses/200/content/application~1json/examples/default/value/variables/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables~1{name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1variables~1{name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/workflows/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/workflows/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/workflows/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/workflows/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/workflows/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows/get/responses/200/content/application~1json/examples/default/value/workflows/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/check_suite_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/run_number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/workflow_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/run_attempt - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/run_started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/triggering_actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/triggering_actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1runs/get/responses/200/content/application~1json/examples/default/value/workflow_runs/0/head_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/UBUNTU/total_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/MACOS/total_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1timing/get/responses/200/content/application~1json/examples/default/value/billable/WINDOWS/total_ms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1activity/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1assignees/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1assignees/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1attestations~1{subject_digest}/get/responses/200/content/application~1json/examples/default/value/attestations/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1attestations~1{subject_digest}/get/responses/200/content/application~1json/examples/default/value/attestations/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1autolinks/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1autolinks/get/responses/200/content/application~1json/examples/default/value/0/is_alphanumeric - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1autolinks/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1autolinks/post/responses/201/content/application~1json/examples/default/value/is_alphanumeric - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1autolinks~1{autolink_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1autolinks~1{autolink_id}/get/responses/200/content/application~1json/examples/default/value/is_alphanumeric - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches/get/responses/200/content/application~1json/examples/default/value/0/protected - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}/get/responses/200/content/application~1json/examples/default/value/commit/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}/get/responses/200/content/application~1json/examples/default/value/commit/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}/get/responses/200/content/application~1json/examples/default/value/protected - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}/get/responses/200/content/application~1json/examples/default/value/protection/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/enforce_admins/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/apps/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/apps/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/apps/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismissal_restrictions/apps/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismiss_stale_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/require_code_owner_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/required_approving_review_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/require_last_push_approval - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/restrictions/users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/restrictions/users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/restrictions/teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/restrictions/apps/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/restrictions/apps/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_linear_history/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/allow_force_pushes/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/allow_deletions/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/required_conversation_resolution/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/lock_branch/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/get/responses/200/content/application~1json/examples/default/value/allow_fork_syncing/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_status_checks/strict - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_status_checks/checks/0/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/dismiss_stale_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/require_code_owner_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/required_approving_review_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_pull_request_reviews/require_last_push_approval - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_signatures/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/enforce_admins/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_linear_history/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/allow_force_pushes/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/allow_deletions/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/block_creations/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/required_conversation_resolution/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/lock_branch/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/responses/200/content/application~1json/examples/default/value/allow_fork_syncing/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1enforce_admins/get/responses/200/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1enforce_admins/post/responses/200/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/dismiss_stale_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/require_code_owner_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/required_approving_review_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/get/responses/200/content/application~1json/examples/default/value/require_last_push_approval - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismissal_restrictions/apps/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/dismiss_stale_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/require_code_owner_reviews - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/required_approving_review_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_pull_request_reviews/patch/responses/200/content/application~1json/examples/default/value/require_last_push_approval - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_signatures/get/responses/200/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_signatures/post/responses/200/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_status_checks/get/responses/200/content/application~1json/examples/default/value/strict - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1required_status_checks/patch/responses/200/content/application~1json/examples/default/value/strict - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions/get/responses/200/content/application~1json/examples/default/value/users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions/get/responses/200/content/application~1json/examples/default/value/users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions/get/responses/200/content/application~1json/examples/default/value/teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions/get/responses/200/content/application~1json/examples/default/value/apps/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions/get/responses/200/content/application~1json/examples/default/value/apps/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/post/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/post/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/post/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/post/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/post/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/put/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/put/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/put/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/put/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/put/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/delete/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/delete/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/delete/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/delete/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1apps/delete/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1teams/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1teams/post/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1teams/put/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1teams/delete/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/post/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/post/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/put/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/put/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/delete/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection~1restrictions~1users/delete/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1rename/post/responses/201/content/application~1json/examples/default/value/commit/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1rename/post/responses/201/content/application~1json/examples/default/value/commit/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1rename/post/responses/201/content/application~1json/examples/default/value/protected - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/output/annotations_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/check_suite/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/pull_requests/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/pull_requests/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/pull_requests/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-completed-conclusion/value/pull_requests/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/output/annotations_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/check_suite/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/pull_requests/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/pull_requests/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/pull_requests/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs/post/responses/201/content/application~1json/examples/example-of-in-progress-conclusion/value/pull_requests/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/output/annotations_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/check_suite/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/pull_requests/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/pull_requests/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/pull_requests/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/get/responses/200/content/application~1json/examples/default/value/pull_requests/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/output/annotations_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/check_suite/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/pull_requests/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/pull_requests/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/pull_requests/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}/patch/responses/200/content/application~1json/examples/default/value/pull_requests/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}~1annotations/get/responses/200/content/application~1json/examples/default/value/0/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}~1annotations/get/responses/200/content/application~1json/examples/default/value/0/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}~1annotations/get/responses/200/content/application~1json/examples/default/value/0/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}~1annotations/get/responses/200/content/application~1json/examples/default/value/0/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-runs~1{check_run_id}~1rerequest/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/repository/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/200/content/application~1json/examples/default/value/latest_check_runs_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/repository/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites/post/responses/201/content/application~1json/examples/default/value/latest_check_runs_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/preferences/auto_trigger_checks/0/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/preferences/auto_trigger_checks/0/setting - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/preferences/auto_trigger_checks/1/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/preferences/auto_trigger_checks/1/setting - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1preferences/patch/responses/200/content/application~1json/examples/default/value/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}/get/responses/200/content/application~1json/examples/default/value/latest_check_runs_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/output/annotations_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/check_suite/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1check-suites~1{check_suite_id}~1rerequest/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/most_recent_instance/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/0/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/0/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/0/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/0/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/1/location/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/1/location/end_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/1/location/start_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1alerts~1{alert_number}~1instances/get/responses/200/content/application~1json/examples/default/value/1/location/end_column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/0/results_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/0/rules_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/0/deletable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/1/results_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/1/rules_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses/get/responses/200/content/application~1json/examples/default/value/1/deletable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses~1{analysis_id}/get/responses/200/content/application~1json/examples/response/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses~1{analysis_id}/get/responses/200/content/application~1json/examples/response/value/results_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses~1{analysis_id}/get/responses/200/content/application~1json/examples/response/value/rules_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses~1{analysis_id}/get/responses/200/content/application~1json/examples/response/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1analyses~1{analysis_id}/get/responses/200/content/application~1json/examples/response/value/deletable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/1/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/1/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/1/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases~1{language}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases~1{language}/get/responses/200/content/application~1json/examples/default/value/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases~1{language}/get/responses/200/content/application~1json/examples/default/value/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases~1{language}/get/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases~1{language}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1databases~1{language}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/controller_repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/controller_repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/controller_repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/controller_repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/controller_repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/actions_workflow_run_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/scanned_repositories/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/scanned_repositories/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/scanned_repositories/0/result_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/scanned_repositories/0/artifact_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/access_mismatch_repos/repository_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/access_mismatch_repos/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/access_mismatch_repos/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/access_mismatch_repos/repositories/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/access_mismatch_repos/repositories/1/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/not_found_repos/repository_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/no_codeql_db_repos/repository_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/no_codeql_db_repos/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/no_codeql_db_repos/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/no_codeql_db_repos/repositories/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/no_codeql_db_repos/repositories/1/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/over_limit_repos/repository_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/over_limit_repos/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/over_limit_repos/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/over_limit_repos/repositories/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}/get/responses/200/content/application~1json/examples/default/value/skipped_repositories/over_limit_repos/repositories/1/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/artifact_size_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1codeql~1variant-analyses~1{codeql_variant_analysis_id}~1repos~1{repo_owner}~1{repo_name}/get/responses/200/content/application~1json/examples/default/value/result_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1default-setup/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1default-setup/patch - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1default-setup/patch/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1default-setup/patch/responses/202/content/application~1json/examples/default/value/run_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1code-scanning~1sarifs/post/requestBody/content/application~1json/schema/properties/checkout_uri - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codeowners~1errors/get/responses/200/content/application~1json/examples/default/value/errors/0/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codeowners~1errors/get/responses/200/content/application~1json/examples/default/value/errors/0/column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codeowners~1errors/get/responses/200/content/application~1json/examples/default/value/errors/1/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codeowners~1errors/get/responses/200/content/application~1json/examples/default/value/errors/1/column - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/201/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces/post/responses/202/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1devcontainers/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/machines/0/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/machines/0/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/machines/0/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/machines/1/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/machines/1/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1machines/get/responses/200/content/application~1json/examples/default/value/machines/1/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1new/get/responses/200/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1new/get/responses/200/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1permissions_check/get/responses/200/content/application~1json/examples/default/value/accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1codespaces~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/permissions/triage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/permissions/maintain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/invitee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/invitee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/responses/201/content/application~1json/examples/new-invitation-is-created/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}~1permission/get/responses/200/content/application~1json/examples/response-if-user-has-admin-permissions/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}~1permission/get/responses/200/content/application~1json/examples/response-if-user-has-admin-permissions/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits/get/responses/200/content/application~1json/examples/default/value/0/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits/get/responses/200/content/application~1json/examples/default/value/0/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1branches-where-head/get/responses/200/content/application~1json/examples/default/value/0/protected - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1comments/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{commit_sha}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/stats/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/stats/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/stats/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/files/0/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/files/0/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}/get/responses/200/content/application~1json/examples/default/value/files/0/changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/started_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/output/annotations_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/check_suite/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-runs/get/responses/200/content/application~1json/examples/default/value/check_runs/0/pull_requests/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/repository/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/head_commit/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1check-suites/get/responses/200/content/application~1json/examples/default/value/check_suites/0/latest_check_runs_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/statuses/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/statuses/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/statuses/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/statuses/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/statuses/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/statuses/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1status/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1commits~1{ref}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1community~1profile/get/responses/200/content/application~1json/examples/default/value/health_percentage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1community~1profile/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1community~1profile/get/responses/200/content/application~1json/examples/default/value/content_reports_enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/base_commit/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/base_commit/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/merge_base_commit/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/merge_base_commit/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/ahead_by - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/behind_by - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/total_commits - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/commits/0/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/commits/0/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/files/0/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/files/0/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1compare~1{basehead}/get/responses/200/content/application~1json/examples/default/value/files/0/changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/get/responses/200/content/application~1vnd.github.object/examples/response-if-content-is-a-file/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/get/responses/200/content/application~1vnd.github.object/examples/response-if-content-is-a-directory/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/get/responses/200/content/application~1vnd.github.object/examples/response-if-content-is-a-directory/value/entries/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/get/responses/200/content/application~1vnd.github.object/examples/response-if-content-is-a-directory/value/entries/1/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/put/responses/200/content/application~1json/examples/example-for-updating-a-file/value/content/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/put/responses/200/content/application~1json/examples/example-for-updating-a-file/value/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/put/responses/201/content/application~1json/examples/example-for-creating-a-file/value/content/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/put/responses/201/content/application~1json/examples/example-for-creating-a-file/value/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contents~1{path}/delete/responses/200/content/application~1json/examples/default/value/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contributors/get/responses/200/content/application~1json/examples/response-if-repository-contains-content/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contributors/get/responses/200/content/application~1json/examples/response-if-repository-contains-content/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1contributors/get/responses/200/content/application~1json/examples/response-if-repository-contains-content/value/0/contributions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/0/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts/get/responses/200/content/application~1json/examples/default/value/1/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/security_advisory/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/security_advisory/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/security_advisory/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/security_advisory/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/dismissed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/dismissed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/dismissed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/fixed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependabot~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependency-graph~1sbom/get/responses/200/content/application~1json/examples/default/value/sbom/packages/0/filesAnalyzed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependency-graph~1snapshots/post/requestBody/content/application~1json/examples/example-of-a-dependency-submission/value/version - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependency-graph~1snapshots/post/requestBody/content/application~1json/examples/example-of-a-dependency-submission/value/scanned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1dependency-graph~1snapshots/post/responses/201/content/application~1json/examples/example-of-a-dependency-submission/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/transient_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/get/responses/200/content/application~1json/examples/default/value/0/production_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/transient_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments/post/responses/201/content/application~1json/examples/simple-example/value/production_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/transient_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}/get/responses/200/content/application~1json/examples/default/value/production_environment - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses~1{status_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses~1{status_id}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses~1{status_id}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses~1{status_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1deployments~1{deployment_id}~1statuses~1{status_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments/get/responses/200/content/application~1json/examples/default/value/environments/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments/get/responses/200/content/application~1json/examples/default/value/environments/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments/get/responses/200/content/application~1json/examples/default/value/environments/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments/get/responses/200/content/application~1json/examples/default/value/environments/0/deployment_branch_policy/protected_branches - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments/get/responses/200/content/application~1json/examples/default/value/environments/0/deployment_branch_policy/custom_branch_policies - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/get/responses/200/content/application~1json/examples/default/value/deployment_branch_policy/protected_branches - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/get/responses/200/content/application~1json/examples/default/value/deployment_branch_policy/custom_branch_policies - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/put/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/put/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/put/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/put/responses/200/content/application~1json/examples/default/value/deployment_branch_policy/protected_branches - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}/put/responses/200/content/application~1json/examples/default/value/deployment_branch_policy/custom_branch_policies - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies/get/responses/200/content/application~1json/examples/default/value/branch_policies/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies/get/responses/200/content/application~1json/examples/default/value/branch_policies/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies/post/responses/200/content/application~1json/examples/example-wildcard/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies/post/responses/200/content/application~1json/examples/example-single-branch/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies/post/responses/200/content/application~1json/examples/example-single-tag/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies~1{branch_policy_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment-branch-policies~1{branch_policy_id}/put/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules/post/responses/201/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules/post/responses/201/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules~1apps/get/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules~1{protection_rule_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules~1{protection_rule_id}/get/responses/200/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1deployment_protection_rules~1{protection_rule_id}/get/responses/200/content/application~1json/examples/default/value/app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables/get/responses/200/content/application~1json/examples/default/value/variables/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables/get/responses/200/content/application~1json/examples/default/value/variables/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables/get/responses/200/content/application~1json/examples/default/value/variables/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables/get/responses/200/content/application~1json/examples/default/value/variables/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables/post/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables~1{name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1environments~1{environment_name}~1variables~1{name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1events/get/responses/200/content/application~1json/examples/200-response/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/get/responses/200/content/application~1json/examples/default/value/0/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1forks/post/responses/202/content/application~1json/examples/default/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1blobs~1{file_sha}/get/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1commits/post/responses/201/content/application~1json/examples/default/value/author/date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1commits/post/responses/201/content/application~1json/examples/default/value/committer/date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1commits/post/responses/201/content/application~1json/examples/default/value/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1commits~1{commit_sha}/get/responses/200/content/application~1json/examples/default/value/author/date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1commits~1{commit_sha}/get/responses/200/content/application~1json/examples/default/value/committer/date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1commits~1{commit_sha}/get/responses/200/content/application~1json/examples/default/value/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1tags/post/responses/201/content/application~1json/examples/default/value/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1tags~1{tag_sha}/get/responses/200/content/application~1json/examples/default/value/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees/post/responses/201/content/application~1json/examples/default/value/tree/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees/post/responses/201/content/application~1json/examples/default/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees~1{tree_sha}/get/responses/200/content/application~1json/examples/default-response/value/tree/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees~1{tree_sha}/get/responses/200/content/application~1json/examples/default-response/value/tree/2/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees~1{tree_sha}/get/responses/200/content/application~1json/examples/default-response/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees~1{tree_sha}/get/responses/200/content/application~1json/examples/response-recursively-retrieving-a-tree/value/tree/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1git~1trees~1{tree_sha}/get/responses/200/content/application~1json/examples/response-recursively-retrieving-a-tree/value/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/get/responses/200/content/application~1json/examples/default/value/0/last_response/code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/post/responses/201/content/application~1json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks/post/responses/201/content/application~1json/examples/default/value/last_response/code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/get/responses/200/content/application~1json/examples/default/value/last_response/code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}/patch/responses/200/content/application~1json/examples/default/value/last_response/code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/0/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries/get/responses/200/content/application~1json/examples/default/value/1/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/delivered_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/redelivery - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/status_code - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/installation_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1hooks~1{hook_id}~1deliveries~1{delivery_id}/get/responses/200/content/application~1json/examples/default/value/throttled_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/get/responses/200/content/application~1json/examples/default/value/use_lfs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/get/responses/200/content/application~1json/examples/default/value/has_large_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/get/responses/200/content/application~1json/examples/default/value/large_files_size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/get/responses/200/content/application~1json/examples/default/value/large_files_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/get/responses/200/content/application~1json/examples/default/value/authors_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/put/responses/201/content/application~1json/examples/default/value/use_lfs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/put/responses/201/content/application~1json/examples/default/value/has_large_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/put/responses/201/content/application~1json/examples/default/value/large_files_size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/put/responses/201/content/application~1json/examples/default/value/large_files_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/put/responses/201/content/application~1json/examples/default/value/authors_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/put/responses/201/content/application~1json/examples/default/value/commit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/requestBody/content/application~1json/examples/example-3/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-1/value/use_lfs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-2/value/use_lfs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-2/value/has_large_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-2/value/large_files_size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-2/value/large_files_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-2/value/authors_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-2/value/commit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-3/value/use_lfs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-3/value/has_large_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-3/value/large_files_size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-3/value/large_files_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-3/value/authors_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import/patch/responses/200/content/application~1json/examples/example-3/value/commit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1authors/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1authors/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1authors/get/responses/200/content/application~1json/examples/default/value/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1authors~1{author_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1large_files/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1large_files/get/responses/200/content/application~1json/examples/default/value/1/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1large_files/get/responses/200/content/application~1json/examples/default/value/2/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1lfs/patch/responses/200/content/application~1json/examples/default/value/use_lfs - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1lfs/patch/responses/200/content/application~1json/examples/default/value/has_large_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1lfs/patch/responses/200/content/application~1json/examples/default/value/large_files_size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1lfs/patch/responses/200/content/application~1json/examples/default/value/large_files_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1import~1lfs/patch/responses/200/content/application~1json/examples/default/value/authors_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1installation/get/responses/200/content/application~1json/examples/default/value/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1interaction-limits/put/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/invitee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/invitee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/invitee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/invitee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1invitations~1{invitation_id}/patch/responses/200/content/application~1json/examples/default/value/expired - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/closed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/get/responses/200/content/application~1json/examples/default/value/0/closed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/closed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues/post/responses/201/content/application~1json/examples/default/value/closed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events/get/responses/200/content/application~1json/examples/default/value/0/issue/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/actor/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/performed_via_github_app/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/performed_via_github_app/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/performed_via_github_app/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/performed_via_github_app/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/performed_via_github_app/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1events~1{event_id}/get/responses/200/content/application~1json/examples/default/value/issue/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/closed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/get/responses/200/content/application~1json/examples/default/value/closed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/closed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}/patch/responses/200/content/application~1json/examples/default/value/closed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/closed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/post/responses/201/content/application~1json/examples/default/value/closed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/closed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1assignees/delete/responses/200/content/application~1json/examples/default/value/closed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1comments/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/get/responses/200/content/application~1json/examples/default/value/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/get/responses/200/content/application~1json/examples/default/value/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/post/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/post/responses/200/content/application~1json/examples/default/value/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/post/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/post/responses/200/content/application~1json/examples/default/value/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/put/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/put/responses/200/content/application~1json/examples/default/value/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/put/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels/put/responses/200/content/application~1json/examples/default/value/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels~1{name}/delete/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1labels~1{name}/delete/responses/200/content/application~1json/examples/default/value/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1issues~1{issue_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys/get/responses/200/content/application~1json/examples/default/value/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys/get/responses/200/content/application~1json/examples/default/value/0/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys/post/responses/201/content/application~1json/examples/default/value/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys/post/responses/201/content/application~1json/examples/default/value/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels/get/responses/200/content/application~1json/examples/default/value/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels/get/responses/200/content/application~1json/examples/default/value/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels/post/responses/201/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels~1{name}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels~1{name}/get/responses/200/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels~1{name}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1labels~1{name}/patch/responses/200/content/application~1json/examples/default/value/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1languages/get/responses/200/content/application~1json/examples/default/value/C - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1languages/get/responses/200/content/application~1json/examples/default/value/Python - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1license/get/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/stats/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/stats/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/stats/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/files/0/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/files/0/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1merges/post/responses/201/content/application~1json/examples/default/value/files/0/changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/get/responses/200/content/application~1json/examples/default/value/0/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones/post/responses/201/content/application~1json/examples/default/value/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/get/responses/200/content/application~1json/examples/default/value/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}/patch/responses/200/content/application~1json/examples/default/value/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}~1labels/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}~1labels/get/responses/200/content/application~1json/examples/default/value/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}~1labels/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1milestones~1{milestone_number}~1labels/get/responses/200/content/application~1json/examples/default/value/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1notifications/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1notifications/get/responses/200/content/application~1json/examples/default/value/0/unread - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/get/responses/200/content/application~1json/examples/default/value/custom_404 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/get/responses/200/content/application~1json/examples/default/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/get/responses/200/content/application~1json/examples/default/value/pending_domain_unverified_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/get/responses/200/content/application~1json/examples/default/value/https_certificate/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/get/responses/200/content/application~1json/examples/default/value/https_enforced - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/post/responses/201/content/application~1json/examples/default/value/custom_404 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/post/responses/201/content/application~1json/examples/default/value/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/post/responses/201/content/application~1json/examples/default/value/pending_domain_unverified_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/post/responses/201/content/application~1json/examples/default/value/https_certificate/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages/post/responses/201/content/application~1json/examples/default/value/https_enforced - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds/get/responses/200/content/application~1json/examples/default/value/0/pusher/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds/get/responses/200/content/application~1json/examples/default/value/0/pusher/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds/get/responses/200/content/application~1json/examples/default/value/0/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1latest/get/responses/200/content/application~1json/examples/default/value/pusher/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1latest/get/responses/200/content/application~1json/examples/default/value/pusher/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1latest/get/responses/200/content/application~1json/examples/default/value/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1latest/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1latest/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1{build_id}/get/responses/200/content/application~1json/examples/default/value/pusher/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1{build_id}/get/responses/200/content/application~1json/examples/default/value/pusher/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1{build_id}/get/responses/200/content/application~1json/examples/default/value/duration - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1{build_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1builds~1{build_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/dns_resolves - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_proxied - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_cloudflare_ip - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_fastly_ip - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_old_ip_address - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_a_record - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/has_cname_record - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/has_mx_records_present - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_valid_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_apex_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/should_be_a_record - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_cname_to_github_user_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_cname_to_pages_dot_github_dot_com - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_cname_to_fastly - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_pointed_to_github_pages_ip - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_non_github_pages_ip_present - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_pages_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_served_by_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_valid - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/responds_to_https - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/enforces_https - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/domain/is_https_eligible - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/dns_resolves - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_proxied - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_cloudflare_ip - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_fastly_ip - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_old_ip_address - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_a_record - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/has_cname_record - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/has_mx_records_present - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_valid_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_apex_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/should_be_a_record - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_cname_to_github_user_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_cname_to_pages_dot_github_dot_com - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_cname_to_fastly - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_pointed_to_github_pages_ip - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_non_github_pages_ip_present - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_pages_domain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_served_by_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_valid - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/responds_to_https - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/enforces_https - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/200/content/application~1json/examples/default/value/alt_domain/is_https_eligible - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pages~1health/get/responses/202/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1projects/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/get/responses/200/content/application~1json/examples/default/value/0/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/requestBody/content/application~1json/schema/properties/head_repo - The format repo.nwo is not supported by Kiota for the type string and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/merged - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/mergeable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/rebaseable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/merged_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/merged_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/review_comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/maintainer_can_modify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/commits - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls/post/responses/201/content/application~1json/examples/default/value/changed_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/original_start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/get/responses/200/content/application~1json/examples/default/value/original_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/original_start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}/patch/responses/200/content/application~1json/examples/default/value/original_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1comments~1{comment_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/merged - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/mergeable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/rebaseable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/merged_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/merged_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/review_comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/maintainer_can_modify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/commits - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/get/responses/200/content/application~1json/examples/default/value/changed_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/merged - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/mergeable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/rebaseable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/merged_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/merged_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/review_comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/maintainer_can_modify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/commits - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}/patch/responses/200/content/application~1json/examples/default/value/changed_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/201/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1codespaces/post/responses/202/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/original_start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments/post/responses/201/content/application~1json/examples/example-for-a-multi-line-comment/value/original_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/original_start_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1comments~1{comment_id}~1replies/post/responses/201/content/application~1json/examples/default/value/original_line - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1commits/get/responses/200/content/application~1json/examples/default/value/0/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1commits/get/responses/200/content/application~1json/examples/default/value/0/commit/verification/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1files/get/responses/200/content/application~1json/examples/default/value/0/additions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1files/get/responses/200/content/application~1json/examples/default/value/0/deletions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1files/get/responses/200/content/application~1json/examples/default/value/0/changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1merge/put/responses/200/content/application~1json/examples/response-if-merge-was-successful/value/merged - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/get/responses/200/content/application~1json/examples/default/value/users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/get/responses/200/content/application~1json/examples/default/value/users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/get/responses/200/content/application~1json/examples/default/value/teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_reviewers/2/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/post/responses/201/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/labels/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/merged_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/assignees/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/assignees/1/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/requested_reviewers/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/requested_reviewers/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/requested_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/head/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/base/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1requested_reviewers/delete/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/get/responses/200/content/application~1json/examples/default/value/0/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews/post/responses/200/content/application~1json/examples/default/value/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/get/responses/200/content/application~1json/examples/default/value/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/put/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/put/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/put/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/put/responses/200/content/application~1json/examples/default/value/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/delete/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/delete/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/delete/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}/delete/responses/200/content/application~1json/examples/default/value/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/pull_request_review_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/original_position - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/in_reply_to_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1dismissals/put/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1dismissals/put/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1dismissals/put/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1dismissals/put/responses/200/content/application~1json/examples/default/value/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1events/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1events/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1events/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1pulls~1{pull_number}~1reviews~1{review_id}~1events/post/responses/200/content/application~1json/examples/default/value/submitted_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1readme/get/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1readme~1{dir}/get/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/prerelease - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/get/responses/200/content/application~1json/examples/default/value/0/assets/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/prerelease - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases/post/responses/201/content/application~1json/examples/default/value/assets/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/get/responses/200/content/application~1json/examples/default/value/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1assets~1{asset_id}/patch/responses/200/content/application~1json/examples/default/value/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/prerelease - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1latest/get/responses/200/content/application~1json/examples/default/value/assets/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/prerelease - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1tags~1{tag}/get/responses/200/content/application~1json/examples/default/value/assets/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/prerelease - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/get/responses/200/content/application~1json/examples/default/value/assets/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/draft - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/prerelease - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/responses/200/content/application~1json/examples/default/value/assets/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/get/responses/200/content/application~1json/examples/default/value/0/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/requestBody/content/application~1octet-stream/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/download_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/uploader/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1assets/post/responses/201/content/application~1json/examples/response-for-successful-upload/value/uploader/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/post/responses/201/content/application~1json/examples/default/value/bypass_actors/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites/get/responses/200/content/application~1json/examples/default/value/1/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/repository_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/rule_evaluations/0/rule_source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1rule-suites~1{rule_suite_id}/get/responses/200/content/application~1json/examples/default/value/rule_evaluations/2/rule_source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/bypass_actors/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/bypass_actors/0/actor_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1rulesets~1{ruleset_id}/put/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/resolved_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/0/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts/get/responses/200/content/application~1json/examples/default/value/1/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/get/responses/200/content/application~1json/examples/default/value/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/resolved_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/resolved_by/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/resolved_by/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/push_protection_bypassed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1secret-scanning~1alerts~1{alert_number}/patch/responses/200/content/application~1json/examples/default/value/push_protection_bypassed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/0/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/submission/accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/get/responses/200/content/application~1json/examples/default/value/1/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories/post/responses/201/content/application~1json/examples/default/value/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/submission/accepted - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1reports/post/responses/201/content/application~1json/examples/default/value/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/get/responses/200/content/application~1json/examples/default/value/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/requestBody/content/application~1json/examples/update_vvrs/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/default/value/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/published_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/withdrawn_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/cvss/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/credits_detailed/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/credits_detailed/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/collaborating_users/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/collaborating_users/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}/patch/responses/200/content/application~1json/examples/add_credit/value/collaborating_teams/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1security-advisories~1{ghsa_id}~1forks/post/responses/202/content/application~1json/examples/default/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1code_frequency/get - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1code_frequency/get/responses/200/content/application~1json/examples/default/value/0/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1code_frequency/get/responses/200/content/application~1json/examples/default/value/0/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1code_frequency/get/responses/200/content/application~1json/examples/default/value/0/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/3 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/4 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/5 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/days/6 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1commit_activity/get/responses/200/content/application~1json/examples/default/value/0/week - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/total - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/weeks/0/w - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/weeks/0/a - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/weeks/0/d - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1contributors/get/responses/200/content/application~1json/examples/default/value/0/weeks/0/c - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/3 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/4 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/5 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/6 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/7 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/8 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/9 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/10 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/11 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/12 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/13 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/14 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/15 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/16 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/17 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/18 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/19 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/20 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/21 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/22 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/23 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/24 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/25 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/26 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/27 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/28 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/29 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/30 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/31 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/32 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/33 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/34 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/35 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/36 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/37 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/38 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/39 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/40 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/41 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/42 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/43 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/44 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/45 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/46 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/47 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/48 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/49 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/50 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/all/51 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/3 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/4 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/5 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/6 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/7 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/8 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/9 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/10 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/11 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/12 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/13 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/14 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/15 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/16 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/17 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/18 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/19 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/20 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/21 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/22 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/23 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/24 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/25 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/26 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/27 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/28 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/29 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/30 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/31 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/32 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/33 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/34 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/35 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/36 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/37 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/38 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/39 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/40 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/41 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/42 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/43 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/44 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/45 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/46 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/47 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/48 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/49 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/50 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1participation/get/responses/200/content/application~1json/examples/default/value/owner/51 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/0/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/0/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/0/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/1/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/1/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/1/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/2/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/2/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1stats~1punch_card/get/responses/200/content/application~1json/examples/default/value/2/2 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1statuses~1{sha}/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1statuses~1{sha}/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1statuses~1{sha}/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscribers/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscribers/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscription/get/responses/200/content/application~1json/examples/response-if-you-subscribe-to-the-repository/value/subscribed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscription/get/responses/200/content/application~1json/examples/response-if-you-subscribe-to-the-repository/value/ignored - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscription/get/responses/200/content/application~1json/examples/response-if-you-subscribe-to-the-repository/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscription/put/responses/200/content/application~1json/examples/default/value/subscribed - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscription/put/responses/200/content/application~1json/examples/default/value/ignored - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1subscription/put/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1tags~1protection/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1tags~1protection/post/responses/201/content/application~1json/examples/default/value/enabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1teams/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/0/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/0/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/0/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/1/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/1/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/1/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/2/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/2/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/2/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/3/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/3/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/3/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/4/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/4/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/4/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/5/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/5/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/5/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/6/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/6/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/6/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/7/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/7/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/7/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/8/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/8/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/8/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/9/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/9/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/9/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/10/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/10/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/10/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/11/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/11/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/11/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/12/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/12/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/12/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/13/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/13/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/13/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/14/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/14/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1clones/get/responses/200/content/application~1json/examples/default/value/clones/14/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/0/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/0/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/1/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/1/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/2/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/2/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/3/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/3/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/4/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/4/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/5/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/5/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/6/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/6/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/7/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/7/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/8/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/8/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/9/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1paths/get/responses/200/content/application~1json/examples/default/value/9/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/0/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/0/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/1/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/1/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/2/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/2/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/3/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1popular~1referrers/get/responses/200/content/application~1json/examples/default/value/3/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/0/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/0/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/0/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/1/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/1/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/1/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/2/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/2/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/2/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/3/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/3/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/3/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/4/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/4/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/4/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/5/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/5/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/5/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/6/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/6/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/6/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/7/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/7/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/7/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/8/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/8/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/8/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/9/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/9/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/9/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/10/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/10/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/10/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/11/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/11/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/11/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/12/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/12/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/12/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/13/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/13/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/13/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/14/timestamp - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/14/count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1traffic~1views/get/responses/200/content/application~1json/examples/default/value/views/14/uniques - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{owner}~1{repo}~1transfer/post/responses/202/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repos~1{template_owner}~1{template_repo}~1generate/post/responses/201/content/application~1json/examples/default/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repositories/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repositories/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1repositories/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Groups/get/responses/200/content/application~1scim+json/examples/default/value/totalResults - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Groups/get/responses/200/content/application~1scim+json/examples/default/value/startIndex - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Groups/get/responses/200/content/application~1scim+json/examples/default/value/itemsPerPage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Groups~1{scim_group_id}/patch/requestBody/content/application~1json/examples/addMembers/value/Operations/0/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/get/responses/200/content/application~1scim+json/examples/default/value/totalResults - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/get/responses/200/content/application~1scim+json/examples/default/value/startIndex - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/get/responses/200/content/application~1scim+json/examples/default/value/itemsPerPage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/post/requestBody/content/application~1json/examples/user/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/post/requestBody/content/application~1json/examples/user/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/post/requestBody/content/application~1json/examples/user/value/roles/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/post/requestBody/content/application~1json/examples/enterpriseOwner/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/post/requestBody/content/application~1json/examples/enterpriseOwner/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users/post/requestBody/content/application~1json/examples/enterpriseOwner/value/roles/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users~1{scim_user_id}/put/requestBody/content/application~1json/examples/user/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users~1{scim_user_id}/put/requestBody/content/application~1json/examples/user/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users~1{scim_user_id}/put/requestBody/content/application~1json/examples/user/value/roles/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1enterprises~1{enterprise}~1Users~1{scim_user_id}/patch/requestBody/content/application~1json/examples/disableUser/value/Operations/0/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/totalResults - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/itemsPerPage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/startIndex - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/Resources/0/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/Resources/0/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/Resources/0/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-with-filter/value/Resources/0/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/totalResults - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/itemsPerPage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/startIndex - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/0/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/0/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/0/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/0/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/1/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/1/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/1/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/get/responses/200/content/application~1scim+json/examples/response-without-filter/value/Resources/1/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/post/responses/201/content/application~1scim+json/examples/default/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/post/responses/201/content/application~1scim+json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/post/responses/201/content/application~1scim+json/examples/default/value/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users/post/responses/201/content/application~1scim+json/examples/default/value/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/get/responses/200/content/application~1scim+json/examples/default/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/get/responses/200/content/application~1scim+json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/get/responses/200/content/application~1scim+json/examples/default/value/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/get/responses/200/content/application~1scim+json/examples/default/value/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/put/responses/200/content/application~1scim+json/examples/default/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/put/responses/200/content/application~1scim+json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/put/responses/200/content/application~1scim+json/examples/default/value/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/put/responses/200/content/application~1scim+json/examples/default/value/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/patch/responses/200/content/application~1scim+json/examples/default/value/emails/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/patch/responses/200/content/application~1scim+json/examples/default/value/active - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/patch/responses/200/content/application~1scim+json/examples/default/value/meta/created - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1scim~1v2~1organizations~1{org}~1Users~1{scim_user_id}/patch/responses/200/content/application~1scim+json/examples/default/value/meta/lastModified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/items/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/items/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/items/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/items/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/items/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1code/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/commit/author/date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/commit/comment_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1commits/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1issues/get/responses/200/content/application~1json/examples/default/value/items/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/items/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/items/0/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/items/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/items/1/default - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1labels/get/responses/200/content/application~1json/examples/default/value/items/1/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1repositories/get/responses/200/content/application~1json/examples/default/value/items/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/0/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/0/curated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/1/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/1/curated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/1/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/2/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/2/curated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/2/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/3/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/3/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/3/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/3/curated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/3/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/4/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/4/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/4/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/4/curated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/4/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/5/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/5/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/5/featured - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/5/curated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1topics/get/responses/200/content/application~1json/examples/default/value/items/5/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1users/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1users/get/responses/200/content/application~1json/examples/default/value/incomplete_results - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1users/get/responses/200/content/application~1json/examples/default/value/items/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1users/get/responses/200/content/application~1json/examples/default/value/items/0/score - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1search~1users/get/responses/200/content/application~1json/examples/default/value/items/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/get/responses/200/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/200/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}/patch/responses/201/content/application~1json/examples/default/value/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/get/responses/200/content/application~1json/examples/default/value/0/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions/post/responses/201/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/get/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/comments_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/pinned - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/get/responses/200/content/application~1json/examples/default/value/0/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments/post/responses/201/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/get/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/author/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/author/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/last_edited_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/+1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/-1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/laugh - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/confused - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/heart - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/hooray - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/eyes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}/patch/responses/200/content/application~1json/examples/default/value/reactions/rocket - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1comments~1{comment_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1discussions~1{discussion_number}~1reactions/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1invitations/get/responses/200/content/application~1json/examples/default/value/0/team_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1members/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1members/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/permissions/read - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/permissions/write - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/permissions/read - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/permissions/write - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1projects~1{project_id}/get/responses/200/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/permissions/maintain - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/permissions/triage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1repos~1{owner}~1{repo}/get/responses/200/content/application~1json/examples/alternative-response-with-extra-repository-information/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1teams/get/responses/200/content/application~1json/examples/response-if-child-teams-exist/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1teams~1{team_id}~1teams/get/responses/200/content/application~1json/examples/response-if-child-teams-exist/value/0/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/hireable - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/private_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/total_private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/owned_private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/disk_usage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/collaborators - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/two_factor_authentication - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/plan/space - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/plan/private_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user/patch/responses/200/content/application~1json/examples/default/value/plan/collaborators - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1blocks/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1blocks/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/0/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/1/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/get/responses/200/content/application~1json/examples/default/value/codespaces/2/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/201/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces/post/responses/202/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets/get/responses/200/content/application~1json/examples/default/value/secrets/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}/put/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/put/requestBody/content/application~1json/examples/default/value/selected_repository_ids/0 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1secrets~1{secret_name}~1repositories/put/requestBody/content/application~1json/examples/default/value/selected_repository_ids/1 - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/get/responses/200/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}/patch/responses/200/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1exports/post/responses/202/content/application~1json/examples/default/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1exports~1{export_id}/get/responses/200/content/application~1json/examples/default/value/completed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/machines/0/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/machines/0/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/machines/0/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/machines/1/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/machines/1/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1machines/get/responses/200/content/application~1json/examples/default/value/machines/1/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/repository/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1publish/post/responses/201/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1start/post/responses/200/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/billable_owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/billable_owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/machine/storage_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/machine/memory_in_bytes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/machine/cpus - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/prebuild - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/last_used_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/ahead - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/behind - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/has_unpushed_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/git_status/has_uncommitted_changes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/idle_timeout_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/retention_period_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1codespaces~1{codespace_name}~1stop/post/responses/200/content/application~1json/examples/default/value/retention_expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1email~1visibility/patch/responses/200/content/application~1json/examples/default/value/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1email~1visibility/patch/responses/200/content/application~1json/examples/default/value/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/get/responses/200/content/application~1json/examples/default/value/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/get/responses/200/content/application~1json/examples/default/value/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/post/responses/201/content/application~1json/examples/default/value/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/post/responses/201/content/application~1json/examples/default/value/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/post/responses/201/content/application~1json/examples/default/value/1/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/post/responses/201/content/application~1json/examples/default/value/1/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/post/responses/201/content/application~1json/examples/default/value/2/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1emails/post/responses/201/content/application~1json/examples/default/value/2/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1followers/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1followers/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1following/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1following/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/emails/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/emails/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/subkeys/0/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys/post/responses/201/content/application~1json/examples/default/value/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/emails/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/subkeys/0/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1gpg_keys~1{gpg_key_id}/get/responses/200/content/application~1json/examples/default/value/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/0/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations/get/responses/200/content/application~1json/examples/default/value/installations/1/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1installations~1{installation_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1interaction-limits/put/responses/200/content/application~1json/examples/default/value/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/assignees/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/milestone/due_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/locked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/closed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1issues/get/responses/200/content/application~1json/examples/default/value/0/repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/0/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/1/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/get/responses/200/content/application~1json/examples/default/value/1/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/post/responses/201/content/application~1json/examples/default/value/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys/post/responses/201/content/application~1json/examples/default/value/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1keys~1{key_id}/get/responses/200/content/application~1json/examples/default/value/read_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/next_billing_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/on_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/free_trial_ends_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/account/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases/get/responses/200/content/application~1json/examples/default/value/0/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/next_billing_date - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/unit_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/on_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/free_trial_ends_on - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/account/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/plan/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/plan/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/plan/monthly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/plan/yearly_price_in_cents - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1marketplace_purchases~1stubbed/get/responses/200/content/application~1json/examples/default/value/0/plan/has_free_trial - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs/get/responses/200/content/application~1json/examples/default/value/0/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs/get/responses/200/content/application~1json/examples/default/value/0/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs/get/responses/200/content/application~1json/examples/default/value/0/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs/get/responses/200/content/application~1json/examples/default/value/1/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs/get/responses/200/content/application~1json/examples/default/value/1/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs/get/responses/200/content/application~1json/examples/default/value/1/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/user/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1memberships~1orgs~1{org}/patch/responses/200/content/application~1json/examples/default/value/user/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/lock_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/exclude_attachments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/exclude_releases - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/exclude_owner_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/lock_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/exclude_attachments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/exclude_releases - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/exclude_owner_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/lock_repositories - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/exclude_attachments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/exclude_releases - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/exclude_owner_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/org_metadata_only - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/repositories/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1migrations~1{migration_id}~1repositories/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1orgs/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/0/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/1/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1projects/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1projects/post/responses/201/content/application~1json/examples/default/value/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1projects/post/responses/201/content/application~1json/examples/default/value/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1projects/post/responses/201/content/application~1json/examples/default/value/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1projects/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1projects/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1public_emails/get/responses/200/content/application~1json/examples/default/value/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1public_emails/get/responses/200/content/application~1json/examples/default/value/0/primary - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/get/responses/200/content/application~1json/examples/default/value/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/template_repository/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/allow_forking - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/web_commit_signoff_required - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/subscribers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/network_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/organization/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/parent/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repos/post/responses/201/content/application~1json/examples/default/value/source/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/invitee/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/invitee/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/inviter/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1repository_invitations/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys/post/responses/201/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys/post/responses/201/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys~1{ssh_signing_key_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1ssh_signing_keys~1{ssh_signing_key_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1json/examples/default-response/value/0/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/starred_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/allow_rebase_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/allow_squash_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/allow_auto_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/delete_branch_on_merge - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/allow_merge_commit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/forks - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/open_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1starred/get/responses/200/content/application~1vnd.github.v3.star+json/examples/alternative-response-with-star-creation-timestamps/value/0/repo/watchers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/members_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/repos_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/is_verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/has_organization_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/has_repository_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/public_repos - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/public_gists - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/followers - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/following - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1user~1teams/get/responses/200/content/application~1json/examples/default/value/0/organization/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1attestations~1{subject_digest}/get - The operation describes multiple response schemas that are divergent. Only the schema of the lowest success status code will be used. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1attestations~1{subject_digest}/get/responses/200/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1attestations~1{subject_digest}/get/responses/201/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1docker~1conflicts/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1orgs~1{org}/get/responses/200/content/application~1json/examples/default/value/1/org/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1events~1public/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1followers/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1followers/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1following/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1following/get/responses/200/content/application~1json/examples/default/value/0/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/files/hello_world.rb/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/comments - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gists/get/responses/200/content/application~1json/examples/default/value/0/truncated - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/emails/0/verified - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/primary_key_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/subkeys/0/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_sign - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_encrypt_comms - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_encrypt_storage - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/can_certify - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/expires_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1gpg_keys/get/responses/200/content/application~1json/examples/default/value/0/revoked - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/app_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/target_id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/has_multiple_single_files - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1installation/get/responses/200/content/application~1json/examples/default/value/suspended_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1orgs/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/0/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/1/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/1/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/1/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/version_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}/get/responses/200/content/application~1json/examples/default/value/repository/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/1/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/2/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions/get/responses/200/content/application~1json/examples/default/value/2/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1packages~1{package_type}~1{package_name}~1versions~1{package_version_id}/get/responses/200/content/application~1json/examples/default/value/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1projects/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1projects/get/responses/200/content/application~1json/examples/default/value/0/number - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1projects/get/responses/200/content/application~1json/examples/default/value/0/creator/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1projects/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1projects/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events/get/responses/200/content/application~1json/examples/default/value/1/org/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/0/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/0/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/0/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/1/actor/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/1/repo/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/1/public - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1received_events~1public/get/responses/200/content/application~1json/examples/default/value/1/org/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1repos/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/total_minutes_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/total_paid_minutes_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/included_minutes - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/UBUNTU - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/MACOS - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1actions/get/responses/200/content/application~1json/examples/default/value/minutes_used_breakdown/WINDOWS - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/total_gigabytes_bandwidth_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/total_paid_gigabytes_bandwidth_used - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1packages/get/responses/200/content/application~1json/examples/default/value/included_gigabytes_bandwidth - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/days_left_in_billing_cycle - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/estimated_paid_storage_for_month - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1settings~1billing~1shared-storage/get/responses/200/content/application~1json/examples/default/value/estimated_storage_for_month - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1ssh_signing_keys/get/responses/200/content/application~1json/examples/default/value/1/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/owner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/owner/site_admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/private - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/fork - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/forks_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/stargazers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/watchers_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/size - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/open_issues_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/is_template - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_issues - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_projects - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_wiki - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_pages - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_downloads - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/has_discussions - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/archived - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/disabled - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/pushed_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/created_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/updated_at - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/permissions/admin - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/permissions/push - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/paths/~1users~1{username}~1subscriptions/get/responses/200/content/application~1json/examples/default/value/0/permissions/pull - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/current_user_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/current_user_authorizations_html_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/authorizations_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/code_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/commit_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/emails_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/emojis_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/feeds_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/followers_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/hub_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/issue_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/label_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/organization_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/organization_repositories_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/organization_teams_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/public_gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/rate_limit_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/repository_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/repository_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/current_user_repositories_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/starred_gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/topic_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/user_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/user_organizations_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/user_repositories_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/root/properties/user_search_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/global-advisory/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/global-advisory/properties/repository_advisory_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/global-advisory/properties/source_code_location - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/integration/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/integration/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-config-url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise/properties/website_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/installation/properties/access_tokens_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/installation/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/installation/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-license-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-license-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-scoped-installation/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/authorization/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/authorization/properties/app/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/authorization/properties/note_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-classroom-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-classroom-organization/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-classroom-user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-classroom-user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-of-conduct/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-of-conduct/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-simple/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-simple/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/announcement-expiration/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/alert-url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/alert-html-url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/alert-instances-url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-team-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-team-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-team-simple/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization/properties/blog - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise-team/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise-team/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/dependabot-alert-security-advisory/properties/references/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-secret-scanning-alert/properties/locations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-integration/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-integration/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/reaction-rollup/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/labels/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-comment/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/event/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/feed/properties/current_user_organization_urls/items - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/git_pull_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/git_push_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/base-gist/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/public-user/properties/notification_email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-history/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/forks/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/git_pull_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/git_push_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-simple/properties/fork_of/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/gist-commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/marketplace-listing-plan/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/marketplace-listing-plan/properties/accounts_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/api-overview/properties/domains/properties/website/items/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/api-overview/properties/domains/properties/codespaces/items/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/api-overview/properties/domains/properties/copilot/items/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/api-overview/properties/domains/properties/packages/items/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/api-overview/properties/domains/properties/actions/items/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/minimal-repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/thread-subscription/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/thread-subscription/properties/thread_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/thread-subscription/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/blog - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-full/properties/billing_email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-actions-secret/properties/selected_repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-actions-variable/properties/selected_repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-security-configuration/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-security-configuration/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-codespace-machine/properties/storage_in_bytes/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-codespace-machine/properties/memory_in_bytes/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/web_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/machines_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/start_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/stop_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/publish_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace/properties/pulls_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespaces-org-secret/properties/selected_repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-dependabot-secret/properties/selected_repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-minimal-repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/org-hook/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/org-hook/properties/ping_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/org-hook/properties/deliveries_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/org-membership/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/org-membership/properties/organization_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/migration/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/migration/properties/archive_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-role-assignment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-role-assignment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-role-assignment/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-simple/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-role-assignment/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project/properties/owner_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project/properties/columns_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-of-conduct-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-of-conduct-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/full-repository/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-advisory/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-advisory/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/blog - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-organization/properties/billing_email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-full/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-full/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-full/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion/properties/team_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion-comment/properties/discussion_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion-comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-discussion-comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-membership/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/team-repository/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-card/properties/column_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-card/properties/content_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-column/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-column/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/project-column/properties/cards_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-simple-commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch-admin-enforced/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch-pull-request-review/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-restriction-policy/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-restriction-policy/properties/users_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-restriction-policy/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-restriction-policy/properties/apps_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-protection/properties/required_signatures/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/short-branch/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/short-branch/properties/protection_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/diff-entry/properties/blob_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/diff-entry/properties/raw_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/diff-entry/properties/contents_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/commit/properties/tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/parents/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit/properties/parents/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-with-protection/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/branch-with-protection/properties/protection_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/status-check-policy/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/status-check-policy/properties/contexts_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/required_pull_request_reviews/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/required_pull_request_reviews/properties/dismissal_restrictions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/required_pull_request_reviews/properties/dismissal_restrictions/properties/users_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/required_pull_request_reviews/properties/dismissal_restrictions/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/required_signatures/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/protected-branch/properties/enforce_admins/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-simple/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-simple/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/check-run/properties/output/properties/annotations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-scanning-analysis-url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-scanning-analysis-deletion/properties/next_analysis_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-scanning-analysis-deletion/properties/confirm_delete_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-scanning-codeql-database/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-scanning-sarifs-receipt/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-scanning-sarifs-status/properties/analyses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-machine/properties/storage_in_bytes/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-machine/properties/memory_in_bytes/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/collaborator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-collaborator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-simple/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-commit-status/properties/target_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-commit-status/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-commit-status/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/combined-commit-status/properties/commit_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/combined-commit-status/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-code-of-conduct-simple/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-code-of-conduct-simple/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-community-health-file/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-community-health-file/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comparison/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comparison/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comparison/properties/permalink_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comparison/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-comparison/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/entries/items/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-tree/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-directory/items/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-file/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-symlink/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/submodule_git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/content-submodule/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-status/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-status/properties/target_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-status/properties/deployment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-status/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-status/properties/environment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/deployment-status/properties/log_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/blob/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-commit/properties/tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-commit/properties/parents/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-commit/properties/parents/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-commit/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-ref/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-ref/properties/object/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-tag/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-tag/properties/object/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/git-tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/hook/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/hook/properties/test_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/hook/properties/ping_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/hook/properties/deliveries_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/import/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/import/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/import/properties/authors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/import/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/porter-author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/porter-author/properties/import_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/labels/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-event-project-card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-event-project-card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-event/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/added-to-project-issue-event/properties/project_card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/added-to-project-issue-event/properties/project_card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/moved-column-in-project-issue-event/properties/project_card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/moved-column-in-project-issue-event/properties/project_card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/removed-from-project-issue-event/properties/project_card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/removed-from-project-issue-event/properties/project_card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/converted-note-to-issue-issue-event/properties/project_card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/converted-note-to-issue-issue-event/properties/project_card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/label/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-comment-event/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-comment-event/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-comment-event/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-committed-event/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-committed-event/properties/tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-committed-event/properties/parents/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-committed-event/properties/parents/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-committed-event/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-reviewed-event/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/timeline-reviewed-event/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review-comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review-comment/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review-comment/properties/_links/properties/self/properties/href - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review-comment/properties/_links/properties/html/properties/href - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review-comment/properties/_links/properties/pull_request/properties/href - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/_links/properties/git - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/_links/properties/html - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/license-content/properties/_links/properties/self - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page-build/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page-build-status/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page-deployment/properties/status_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page-deployment/properties/page_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/page-deployment/properties/preview_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/pull-request-review/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/review-comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/review-comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/review-comment/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release-asset/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release-asset/properties/browser_download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release/properties/assets_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release/properties/tarball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release/properties/zipball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/release/properties/discussion_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-alert/properties/locations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-issue-title/properties/issue_title_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-issue-body/properties/issue_body_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-issue-comment/properties/issue_comment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-discussion-title/properties/discussion_title_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-discussion-body/properties/discussion_body_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-discussion-comment/properties/discussion_comment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-pull-request-title/properties/pull_request_title_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-pull-request-body/properties/pull_request_body_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-pull-request-comment/properties/pull_request_comment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-pull-request-review/properties/pull_request_review_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-location-pull-request-review-comment/properties/pull_request_review_comment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/contributor-activity/properties/weeks/example/0/w - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-subscription/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-subscription/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/tag/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/tag/properties/zipball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/tag/properties/tarball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/scim-user/properties/meta/properties/location - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-search-result-item/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-search-result-item/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/code-search-result-item/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-search-result-item/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-search-result-item/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-search-result-item/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-search-result-item/properties/commit/properties/tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/commit-search-result-item/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/issue-search-result-item/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/label-search-result-item/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repo-search-result-item/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/topic-search-result-item/properties/logo_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/user-search-result-item/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/private-user/properties/notification_email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespaces-secret/properties/selected_repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/web_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/machines_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/start_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/stop_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/publish_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/codespace-with-full-repository/properties/pulls_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/email/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/marketplace-account/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/marketplace-account/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/marketplace-account/properties/organization_billing_email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise-webhooks/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise-webhooks/properties/website_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/enterprise-webhooks/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-simple-webhooks/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-simple-webhooks/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/organization-simple-webhooks/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/repository-webhooks/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/simple-user-webhooks/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/exemption-request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/check-run-with-simple-check-suite/properties/output/properties/annotations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_deploy_key/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_workflow/properties/badge_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_workflow/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_workflow/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_reviewers/items/properties/reviewer/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_answer/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/answer_chosen_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/discussion/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_comment/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_label/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_comment/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_issue_2/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_user_mannequin/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/nullable-repository-webhooks/properties/homepage - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_milestone_3/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/organization_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_membership/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/column_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/content_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/columns_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/owner_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_column/properties/cards_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_column/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_project_column/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_pull_request_5/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/_links/properties/pull_request/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review_comment/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/_links/properties/pull_request/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_review/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/browser_download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/uploader/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/assets_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/discussion_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/tarball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/upload_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release/properties/zipball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/browser_download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/uploader/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/assets_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/discussion_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/tarball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/upload_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_release_1/properties/zipball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/dismisser/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_alert/properties/external_reference - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/secret-scanning-alert-webhook/properties/locations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_security_advisory/properties/references/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_sponsorship/properties/sponsorable/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhooks_team_1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/check_runs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/check_runs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/check_runs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/dismissed_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-closed-by-user/properties/alert/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-created/properties/alert/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-created/properties/alert/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/dismissed_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/instances_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-reopened/properties/alert/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-reopened/properties/alert/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-reopened-by-user/properties/alert/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-code-scanning-alert-reopened-by-user/properties/alert/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-commit-comment-created/properties/comment/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/deployment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-created/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-protection-rule-requested/properties/deployment_callback_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-approved/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-rejected/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/reviewers/items/properties/reviewer/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-review-requested/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/check_run/properties/details_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/check_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/check_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/deployment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/environment_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/log_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-deployment-status-created/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-fork/properties/forkee/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-gollum/properties/pages/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/comment/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-created/properties/issue/allOf/1/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/1/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/1/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-deleted/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-demilestoned/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-edited/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-labeled/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-locked/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-milestoned/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/changes/properties/old_repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-opened/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-reopened/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-transferred/properties/changes/properties/new_repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/external_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/repository_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/timeline_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-issues-unlocked/properties/issue/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-added/properties/sender/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-membership-removed/properties/sender/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-meta-deleted/properties/hook/properties/config/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/invitation_teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-organization-member-invited/properties/invitation/properties/inviter/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/package_files/items/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/package_version/properties/release/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/registry/properties/about_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-published/properties/package/properties/registry/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/package_files/items/properties/download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/release/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/package_version/properties/source_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/registry/properties/about_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-package-updated/properties/package/properties/registry/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/pusher/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-page-build/properties/build/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-ping/properties/hook/properties/deliveries_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-ping/properties/hook/properties/ping_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-ping/properties/hook/properties/test_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-ping/properties/hook/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/column_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/content_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-deleted/properties/project_card/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/column_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/content_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/project_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-project-card-moved/properties/project_card/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-assigned/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-disabled/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-auto-merge-enabled/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-dequeued/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-enqueued/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-locked/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/_links/properties/pull_request/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/comment/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-created/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-deleted/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-comment-edited/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/_links/properties/pull_request/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-dismissed/properties/review/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-edited/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/0/properties/requested_reviewer/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-request-removed/oneOf/1/properties/requested_team/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/0/properties/requested_reviewer/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-requested/oneOf/1/properties/requested_team/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-submitted/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/_links/properties/pull_request/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-resolved/properties/thread/properties/comments/items/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/_links/properties/pull_request/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/pull_request_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-review-thread-unresolved/properties/thread/properties/comments/items/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-synchronize/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unassigned/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlabeled/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/commits/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/html/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/issue/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/review_comment/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/review_comments/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/self/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/_links/properties/statuses/properties/href - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignee/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/assignees/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/auto_merge/properties/enabled_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/base/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/commits_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/diff_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/head/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/issue_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/labels/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/merged_by/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/creator/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/labels_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/milestone/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/patch_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_reviewers/items/oneOf/1/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/parent/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/repositories_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/requested_teams/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/review_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/review_comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/statuses_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-pull-request-unlocked/properties/pull_request/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/commits/items/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/commits/items/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/commits/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/head_commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/pusher/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-push/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/browser_download_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/uploader/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/assets_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/discussion_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/reactions/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/tarball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/upload_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-release-prereleased/properties/release/properties/zipball_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/issues_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/public_members_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/organization/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-transferred/properties/changes/properties/owner/properties/from/properties/user/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/dismisser/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-dismiss/properties/alert/properties/external_reference - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/dismisser/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-repository-vulnerability-alert-resolve/properties/alert/properties/external_reference - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-security-advisory-withdrawn/properties/security_advisory/properties/references/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/branches/items/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/author/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/comments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/commit/properties/author/allOf/0/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/commit/properties/committer/allOf/0/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/commit/properties/tree/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/committer/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/parents/items/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/parents/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-status/properties/commit/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-added-to-repository/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-created/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-deleted/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-edited/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/clone_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/git_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/license/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/mirror_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/svn_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-team-removed-from-repository/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-completed/properties/workflow_job/allOf/0/properties/check_run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-completed/properties/workflow_job/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-completed/properties/workflow_job/allOf/0/properties/run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-completed/properties/workflow_job/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-in-progress/properties/workflow_job/allOf/0/properties/check_run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-in-progress/properties/workflow_job/allOf/0/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-in-progress/properties/workflow_job/allOf/0/properties/run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-in-progress/properties/workflow_job/allOf/0/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-queued/properties/workflow_job/properties/check_run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-queued/properties/workflow_job/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-queued/properties/workflow_job/properties/run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-queued/properties/workflow_job/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-waiting/properties/workflow_job/properties/check_run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-waiting/properties/workflow_job/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-waiting/properties/workflow_job/properties/run_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-job-waiting/properties/workflow_job/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/artifacts_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/cancel_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/check_suite_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/head_repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/jobs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/logs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/previous_attempt_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/rerun_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-completed/properties/workflow_run/properties/workflow_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/artifacts_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/cancel_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/check_suite_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/head_repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/jobs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/logs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/previous_attempt_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/rerun_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/workflow_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/artifacts_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/cancel_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/check_suite_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_commit/properties/author/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_commit/properties/committer/properties/email - The format email is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/head_repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/jobs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/logs_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/previous_attempt_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/base/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/head/properties/repo/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/archive_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/assignees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/blobs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/branches_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/collaborators_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/comments_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/compare_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/contents_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/contributors_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/deployments_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/downloads_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/forks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/git_commits_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/git_refs_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/git_tags_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/hooks_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/issue_comment_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/issue_events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/issues_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/keys_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/labels_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/languages_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/merges_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/milestones_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/notifications_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/owner/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/pulls_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/releases_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/stargazers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/statuses_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/subscribers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/subscription_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/tags_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/teams_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/trees_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/repository/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/rerun_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/avatar_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/events_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/followers_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/following_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/gists_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/html_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/organizations_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/received_events_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/repos_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/starred_url - The format uri-template is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/subscriptions_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/triggering_actor/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/workflow_url - The format uri is not supported by Kiota and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/headers/x-rate-limit-limit/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/headers/x-rate-limit-remaining/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/headers/x-rate-limit-reset/example - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/headers/x-rate-limit-reset/schema - The format timestamp is not supported by Kiota for the type integer and the string type will be used. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/accepted/content/application~1json/examples/default/value - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_jitconfig/content/application~1json/examples/default/value/runner/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_jitconfig/content/application~1json/examples/default/value/runner/busy - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_jitconfig/content/application~1json/examples/default/value/runner/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_jitconfig/content/application~1json/examples/default/value/runner/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_jitconfig/content/application~1json/examples/default/value/runner/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_jitconfig/content/application~1json/examples/default/value/runner/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels/content/application~1json/examples/default/value/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels/content/application~1json/examples/default/value/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels/content/application~1json/examples/default/value/labels/3/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels_readonly/content/application~1json/examples/default/value/total_count - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels_readonly/content/application~1json/examples/default/value/labels/0/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels_readonly/content/application~1json/examples/default/value/labels/1/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/actions_runner_labels_readonly/content/application~1json/examples/default/value/labels/2/id - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/billing_usage_report/content/application~1json/examples/default/value/usageItems/0/quantity - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/billing_usage_report/content/application~1json/examples/default/value/usageItems/0/pricePerUnit - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/billing_usage_report/content/application~1json/examples/default/value/usageItems/0/grossAmount - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/billing_usage_report/content/application~1json/examples/default/value/usageItems/0/discountAmount - Data and type mismatch found. +Warning: KiotaBuilder OpenAPI warning: #/components/responses/billing_usage_report/content/application~1json/examples/default/value/usageItems/0/netAmount - Data and type mismatch found. +Trace: KiotaBuilder 2539ms: Parsed OpenAPI successfully. 695 paths found. +Debug: KiotaBuilder step 2 - parsing the document - took 00:00:02.6627769 +Debug: KiotaBuilder step 3 - updating generation configuration from kiota extension - took 00:00:00.0002763 +Debug: KiotaBuilder step 4 - filtering API paths with patterns - took 00:00:00.0080160 +Debug: KiotaBuilder step 5 - checking whether the output should be updated - took 00:00:00.2368511 +Trace: KiotaBuilder 18ms: Created UriSpace tree +Debug: KiotaBuilder step 6 - create uri space - took 00:00:00.0185268 +Debug: KiotaBuilder InitializeInheritanceIndex 00:00:00.0047669 +Trace: KiotaBuilder Creating class ApiClient +Trace: KiotaBuilder Creating property advisories of advisoriesRequestBuilder +Trace: KiotaBuilder Creating property app of appRequestBuilder +Trace: KiotaBuilder Creating property appManifests of appManifestsRequestBuilder +Trace: KiotaBuilder Creating property applications of applicationsRequestBuilder +Trace: KiotaBuilder Creating property apps of appsRequestBuilder +Trace: KiotaBuilder Creating property assignments of assignmentsRequestBuilder +Trace: KiotaBuilder Creating property classrooms of classroomsRequestBuilder +Trace: KiotaBuilder Creating property codes_of_conduct of codes_of_conductRequestBuilder +Trace: KiotaBuilder Creating property emojis of emojisRequestBuilder +Trace: KiotaBuilder Creating property enterpriseInstallation of enterpriseInstallationRequestBuilder +Trace: KiotaBuilder Creating property enterprises of enterprisesRequestBuilder +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating property feeds of feedsRequestBuilder +Trace: KiotaBuilder Creating property gists of gistsRequestBuilder +Trace: KiotaBuilder Creating property gitignore of gitignoreRequestBuilder +Trace: KiotaBuilder Creating property installation of installationRequestBuilder +Trace: KiotaBuilder Creating property issues of issuesRequestBuilder +Trace: KiotaBuilder Creating property licenses of licensesRequestBuilder +Trace: KiotaBuilder Creating property markdown of markdownRequestBuilder +Trace: KiotaBuilder Creating property marketplace_listing of marketplace_listingRequestBuilder +Trace: KiotaBuilder Creating property meta of metaRequestBuilder +Trace: KiotaBuilder Creating property networks of networksRequestBuilder +Trace: KiotaBuilder Creating property notifications of notificationsRequestBuilder +Trace: KiotaBuilder Creating property octocat of octocatRequestBuilder +Trace: KiotaBuilder Creating property organizations of organizationsRequestBuilder +Trace: KiotaBuilder Creating property orgs of orgsRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating property rate_limit of rate_limitRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating property scim of scimRequestBuilder +Trace: KiotaBuilder Creating property search of searchRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating property user of userRequestBuilder +Trace: KiotaBuilder Creating property users of usersRequestBuilder +Trace: KiotaBuilder Creating property versions of versionsRequestBuilder +Trace: KiotaBuilder Creating property zen of zenRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class appRequestBuilder +Trace: KiotaBuilder Creating class advisoriesRequestBuilder +Trace: KiotaBuilder Creating class appsRequestBuilder +Trace: KiotaBuilder Creating property hook of hookRequestBuilder +Trace: KiotaBuilder Creating class applicationsRequestBuilder +Trace: KiotaBuilder Creating property installationRequests of installationRequestsRequestBuilder +Trace: KiotaBuilder Creating property installations of installationsRequestBuilder +Trace: KiotaBuilder Creating class appManifestsRequestBuilder +Trace: KiotaBuilder Creating indexer WithGhsa_-indexer +Trace: KiotaBuilder Creating indexer WithApp_slug-indexer +Trace: KiotaBuilder Creating indexer WithClient_-indexer +Trace: KiotaBuilder Creating indexer WithCode-indexer +Trace: KiotaBuilder Creating class WithApp_slugItemRequestBuilder +Trace: KiotaBuilder Creating class WithCodeItemRequestBuilder +Trace: KiotaBuilder Creating property conversions of conversionsRequestBuilder +Trace: KiotaBuilder Creating class WithClient_ItemRequestBuilder +Trace: KiotaBuilder Creating property grant of grantRequestBuilder +Trace: KiotaBuilder Creating property token of tokenRequestBuilder +Trace: KiotaBuilder Creating class grantRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class assignmentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAssignment_-indexer +Trace: KiotaBuilder Creating class WithAssignment_ItemRequestBuilder +Trace: KiotaBuilder Creating property accepted_assignments of accepted_assignmentsRequestBuilder +Trace: KiotaBuilder Creating property grades of gradesRequestBuilder +Trace: KiotaBuilder Creating class conversionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class hookRequestBuilder +Trace: KiotaBuilder Creating property config of configRequestBuilder +Trace: KiotaBuilder Creating property deliveries of deliveriesRequestBuilder +Trace: KiotaBuilder Creating class configRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class classroomsRequestBuilder +Trace: KiotaBuilder Creating indexer WithClassroom_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithClassroom_ItemRequestBuilder +Trace: KiotaBuilder Creating property assignments of assignmentsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class assignmentsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codes_of_conductRequestBuilder +Trace: KiotaBuilder Creating indexer WithKey-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deliveriesRequestBuilder +Trace: KiotaBuilder Creating class accepted_assignmentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithDelivery_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithGhsa_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class emojisRequestBuilder +Trace: KiotaBuilder Creating class gradesRequestBuilder +Trace: KiotaBuilder Creating class WithDelivery_ItemRequestBuilder +Trace: KiotaBuilder Creating property attempts of attemptsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class enterpriseInstallationRequestBuilder +Trace: KiotaBuilder Creating class enterprisesRequestBuilder +Trace: KiotaBuilder Creating indexer WithEnterprise-indexer +Trace: KiotaBuilder Creating indexer WithEnterprise_or_org-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithEnterpriseItemRequestBuilder +Trace: KiotaBuilder Creating property actions of actionsRequestBuilder +Trace: KiotaBuilder Creating property announcement of announcementRequestBuilder +Trace: KiotaBuilder Creating class attemptsRequestBuilder +Trace: KiotaBuilder Creating property auditLog of auditLogRequestBuilder +Trace: KiotaBuilder Creating class WithEnterprise_or_orgItemRequestBuilder +Trace: KiotaBuilder Creating property codeScanning of codeScanningRequestBuilder +Trace: KiotaBuilder Creating property serverStatistics of serverStatisticsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property code_security_and_analysis of code_security_and_analysisRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property consumedLicenses of consumedLicensesRequestBuilder +Trace: KiotaBuilder Creating property copilot of copilotRequestBuilder +Trace: KiotaBuilder Creating class serverStatisticsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class installationRequestsRequestBuilder +Trace: KiotaBuilder Creating property dependabot of dependabotRequestBuilder +Trace: KiotaBuilder Creating property licenseSyncStatus of licenseSyncStatusRequestBuilder +Trace: KiotaBuilder Creating property secretScanning of secretScanningRequestBuilder +Trace: KiotaBuilder Creating property settings of settingsRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecurity_product-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class tokenRequestBuilder +Trace: KiotaBuilder Creating property scoped of scopedRequestBuilder +Trace: KiotaBuilder Creating class actionsRequestBuilder +Trace: KiotaBuilder Creating property cache of cacheRequestBuilder +Trace: KiotaBuilder Creating property oidc of oidcRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property permissions of permissionsRequestBuilder +Trace: KiotaBuilder Creating property runnerGroups of runnerGroupsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property runners of runnersRequestBuilder +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating class cacheRequestBuilder +Trace: KiotaBuilder Creating property usage of usageRequestBuilder +Trace: KiotaBuilder Creating class usageRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class oidcRequestBuilder +Trace: KiotaBuilder Creating property customization of customizationRequestBuilder +Trace: KiotaBuilder Creating class customizationRequestBuilder +Trace: KiotaBuilder Creating property issuer of issuerRequestBuilder +Trace: KiotaBuilder Creating class issuerRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class permissionsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property organizations of organizationsRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property selectedActions of selectedActionsRequestBuilder +Trace: KiotaBuilder Creating property workflow of workflowRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class scopedRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class organizationsRequestBuilder +Trace: KiotaBuilder Creating class gistsRequestBuilder +Trace: KiotaBuilder Creating property public of publicRequestBuilder +Trace: KiotaBuilder Creating property starred of starredRequestBuilder +Trace: KiotaBuilder Creating indexer WithOrg_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class installationsRequestBuilder +Trace: KiotaBuilder Creating indexer WithInstallation_-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOrg_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class feedsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithInstallation_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property access_tokens of access_tokensRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property suspended of suspendedRequestBuilder +Trace: KiotaBuilder Creating class selectedActionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class access_tokensRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class gitignoreRequestBuilder +Trace: KiotaBuilder Creating property templates of templatesRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class workflowRequestBuilder +Trace: KiotaBuilder Creating class templatesRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class suspendedRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class runnerGroupsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRunner_group_-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class installationRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating class issuesRequestBuilder +Trace: KiotaBuilder Creating property token of tokenRequestBuilder +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class licensesRequestBuilder +Trace: KiotaBuilder Creating indexer WithLicense-indexer +Trace: KiotaBuilder Creating class tokenRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class markdownRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property raw of rawRequestBuilder +Trace: KiotaBuilder Creating class WithLicenseItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rawRequestBuilder +Trace: KiotaBuilder Creating indexer WithGist_-indexer +Trace: KiotaBuilder Creating class WithKeyItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class marketplace_listingRequestBuilder +Trace: KiotaBuilder Creating class notificationsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property accounts of accountsRequestBuilder +Trace: KiotaBuilder Creating property threads of threadsRequestBuilder +Trace: KiotaBuilder Creating property plans of plansRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property stubbed of stubbedRequestBuilder +Trace: KiotaBuilder Creating class metaRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class networksRequestBuilder +Trace: KiotaBuilder Creating indexer WithOwner-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOwnerItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepo-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class publicRequestBuilder +Trace: KiotaBuilder Creating class WithRepoItemRequestBuilder +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating class threadsRequestBuilder +Trace: KiotaBuilder Creating indexer WithThread_-indexer +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating class accountsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAccount_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAccount_ItemRequestBuilder +Trace: KiotaBuilder Creating class organizationsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithOrganization_-indexer +Trace: KiotaBuilder Creating class starredRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOrganization_ItemRequestBuilder +Trace: KiotaBuilder Creating property custom_roles of custom_rolesRequestBuilder +Trace: KiotaBuilder Creating class plansRequestBuilder +Trace: KiotaBuilder Creating indexer WithPlan_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class custom_rolesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithGist_ItemRequestBuilder +Trace: KiotaBuilder Creating class WithThread_ItemRequestBuilder +Trace: KiotaBuilder Creating property subscription of subscriptionRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property commits of commitsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property forks of forksRequestBuilder +Trace: KiotaBuilder Creating class WithPlan_ItemRequestBuilder +Trace: KiotaBuilder Creating property accounts of accountsRequestBuilder +Trace: KiotaBuilder Creating class orgsRequestBuilder +Trace: KiotaBuilder Creating indexer WithOrg-indexer +Trace: KiotaBuilder Creating property star of starRequestBuilder +Trace: KiotaBuilder Creating class accountsRequestBuilder +Trace: KiotaBuilder Creating class WithOrgItemRequestBuilder +Trace: KiotaBuilder Creating property actions of actionsRequestBuilder +Trace: KiotaBuilder Creating property announcement of announcementRequestBuilder +Trace: KiotaBuilder Creating property attestations of attestationsRequestBuilder +Trace: KiotaBuilder Creating property auditLog of auditLogRequestBuilder +Trace: KiotaBuilder Creating property blocks of blocksRequestBuilder +Trace: KiotaBuilder Creating property codeScanning of codeScanningRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property codeSecurity of codeSecurityRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property codespaces of codespacesRequestBuilder +Trace: KiotaBuilder Creating property copilot of copilotRequestBuilder +Trace: KiotaBuilder Creating property credentialAuthorizations of credentialAuthorizationsRequestBuilder +Trace: KiotaBuilder Creating class stubbedRequestBuilder +Trace: KiotaBuilder Creating property accounts of accountsRequestBuilder +Trace: KiotaBuilder Creating property plans of plansRequestBuilder +Trace: KiotaBuilder Creating property customRepositoryRoles of customRepositoryRolesRequestBuilder +Trace: KiotaBuilder Creating property custom_roles of custom_rolesRequestBuilder +Trace: KiotaBuilder Creating property dependabot of dependabotRequestBuilder +Trace: KiotaBuilder Creating property docker of dockerRequestBuilder +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating property externalGroup of externalGroupRequestBuilder +Trace: KiotaBuilder Creating class accountsRequestBuilder +Trace: KiotaBuilder Creating property externalGroups of externalGroupsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAccount_-indexer +Trace: KiotaBuilder Creating property failed_invitations of failed_invitationsRequestBuilder +Trace: KiotaBuilder Creating property fine_grained_permissions of fine_grained_permissionsRequestBuilder +Trace: KiotaBuilder Creating property hooks of hooksRequestBuilder +Trace: KiotaBuilder Creating indexer WithSha-indexer +Trace: KiotaBuilder Creating class WithAccount_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class plansRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithPlan_-indexer +Trace: KiotaBuilder Creating class WithRunner_group_ItemRequestBuilder +Trace: KiotaBuilder Creating property organizations of organizationsRequestBuilder +Trace: KiotaBuilder Creating property runners of runnersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPlan_ItemRequestBuilder +Trace: KiotaBuilder Creating property accounts of accountsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class accountsRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class organizationsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithOrg_-indexer +Trace: KiotaBuilder Creating class subscriptionRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOrg_ItemRequestBuilder +Trace: KiotaBuilder Creating class octocatRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class runnersRequestBuilder +Trace: KiotaBuilder Creating indexer WithRunner_-indexer +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating property columns of columnsRequestBuilder +Trace: KiotaBuilder Creating indexer WithProject_-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class columnsRequestBuilder +Trace: KiotaBuilder Creating property cards of cardsRequestBuilder +Trace: KiotaBuilder Creating property installation of installationRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property installations of installationsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property interactionLimits of interactionLimitsRequestBuilder +Trace: KiotaBuilder Creating property invitations of invitationsRequestBuilder +Trace: KiotaBuilder Creating property issues of issuesRequestBuilder +Trace: KiotaBuilder Creating property members of membersRequestBuilder +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating property memberships of membershipsRequestBuilder +Trace: KiotaBuilder Creating property migrations of migrationsRequestBuilder +Trace: KiotaBuilder Creating property organizationFineGrainedPermissions of organizationFineGrainedPermissionsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property organizationRoles of organizationRolesRequestBuilder +Trace: KiotaBuilder Creating property outside_collaborators of outside_collaboratorsRequestBuilder +Trace: KiotaBuilder Creating property packages of packagesRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property personalAccessTokenRequests of personalAccessTokenRequestsRequestBuilder +Trace: KiotaBuilder Creating indexer Owner-indexer +Trace: KiotaBuilder Creating property personalAccessTokens of personalAccessTokensRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating property properties of propertiesRequestBuilder +Trace: KiotaBuilder Creating property public_members of public_membersRequestBuilder +Trace: KiotaBuilder Creating class OwnerItemRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating indexer Repo-indexer +Trace: KiotaBuilder Creating property repositoryFineGrainedPermissions of repositoryFineGrainedPermissionsRequestBuilder +Trace: KiotaBuilder Creating property rulesets of rulesetsRequestBuilder +Trace: KiotaBuilder Creating property secretScanning of secretScanningRequestBuilder +Trace: KiotaBuilder Creating indexer WithColumn_-indexer +Trace: KiotaBuilder Creating property securityAdvisories of securityAdvisoriesRequestBuilder +Trace: KiotaBuilder Creating property securityManagers of securityManagersRequestBuilder +Trace: KiotaBuilder Creating property settings of settingsRequestBuilder +Trace: KiotaBuilder Creating property teamSync of teamSyncRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecurity_product-indexer +Trace: KiotaBuilder Creating class cardsRequestBuilder +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithComment_-indexer +Trace: KiotaBuilder Creating class RepoItemRequestBuilder +Trace: KiotaBuilder Creating property actions of actionsRequestBuilder +Trace: KiotaBuilder Creating property activity of activityRequestBuilder +Trace: KiotaBuilder Creating property assignees of assigneesRequestBuilder +Trace: KiotaBuilder Creating property attestations of attestationsRequestBuilder +Trace: KiotaBuilder Creating property autolinks of autolinksRequestBuilder +Trace: KiotaBuilder Creating property automatedSecurityFixes of automatedSecurityFixesRequestBuilder +Trace: KiotaBuilder Creating property branches of branchesRequestBuilder +Trace: KiotaBuilder Creating property checkRuns of checkRunsRequestBuilder +Trace: KiotaBuilder Creating property checkSuites of checkSuitesRequestBuilder +Trace: KiotaBuilder Creating property codeScanning of codeScanningRequestBuilder +Trace: KiotaBuilder Creating property codeowners of codeownersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property codespaces of codespacesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property collaborators of collaboratorsRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property commits of commitsRequestBuilder +Trace: KiotaBuilder Creating property community of communityRequestBuilder +Trace: KiotaBuilder Creating property compare of compareRequestBuilder +Trace: KiotaBuilder Creating property contents of contentsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property contributors of contributorsRequestBuilder +Trace: KiotaBuilder Creating property dependabot of dependabotRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property dependencyGraph of dependencyGraphRequestBuilder +Trace: KiotaBuilder Creating property deployments of deploymentsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property dispatches of dispatchesRequestBuilder +Trace: KiotaBuilder Creating property environments of environmentsRequestBuilder +Warning: KiotaBuilder Could not create error type for 422 in orgs/update +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating property forks of forksRequestBuilder +Trace: KiotaBuilder Creating property git of gitRequestBuilder +Trace: KiotaBuilder Creating property hooks of hooksRequestBuilder +Trace: KiotaBuilder Creating property import of importRequestBuilder +Trace: KiotaBuilder Creating class WithComment_ItemRequestBuilder +Trace: KiotaBuilder Creating property installation of installationRequestBuilder +Trace: KiotaBuilder Creating property interactionLimits of interactionLimitsRequestBuilder +Trace: KiotaBuilder Creating property invitations of invitationsRequestBuilder +Trace: KiotaBuilder Creating property issues of issuesRequestBuilder +Trace: KiotaBuilder Creating property keys of keysRequestBuilder +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating property languages of languagesRequestBuilder +Trace: KiotaBuilder Creating property lfs of lfsRequestBuilder +Trace: KiotaBuilder Creating property license of licenseRequestBuilder +Trace: KiotaBuilder Creating property mergeUpstream of mergeUpstreamRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property merges of mergesRequestBuilder +Trace: KiotaBuilder Creating property milestones of milestonesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property notifications of notificationsRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property pages of pagesRequestBuilder +Trace: KiotaBuilder Creating property privateVulnerabilityReporting of privateVulnerabilityReportingRequestBuilder +Trace: KiotaBuilder Creating indexer WithCard_-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithCard_ItemRequestBuilder +Trace: KiotaBuilder Creating property moves of movesRequestBuilder +Trace: KiotaBuilder Creating class actionsRequestBuilder +Trace: KiotaBuilder Creating class commitsRequestBuilder +Trace: KiotaBuilder Creating property cache of cacheRequestBuilder +Trace: KiotaBuilder Creating property oidc of oidcRequestBuilder +Trace: KiotaBuilder Creating property permissions of permissionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property runnerGroups of runnerGroupsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property runners of runnersRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating property variables of variablesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class cacheRequestBuilder +Trace: KiotaBuilder Creating property usage of usageRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property usageByRepository of usageByRepositoryRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRunner_ItemRequestBuilder +Trace: KiotaBuilder Creating class movesRequestBuilder +Trace: KiotaBuilder Creating class usageRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usageByRepositoryRequestBuilder +Trace: KiotaBuilder Creating class runnersRequestBuilder +Trace: KiotaBuilder Creating property downloads of downloadsRequestBuilder +Trace: KiotaBuilder Creating property generateJitconfig of generateJitconfigRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating property registrationToken of registrationTokenRequestBuilder +Trace: KiotaBuilder Creating property properties of propertiesRequestBuilder +Trace: KiotaBuilder Creating property pulls of pullsRequestBuilder +Trace: KiotaBuilder Creating property removeToken of removeTokenRequestBuilder +Trace: KiotaBuilder Creating property readme of readmeRequestBuilder +Trace: KiotaBuilder Creating property releases of releasesRequestBuilder +Trace: KiotaBuilder Creating property rules of rulesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRunner_-indexer +Trace: KiotaBuilder Creating property rulesets of rulesetsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property secretScanning of secretScanningRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property securityAdvisories of securityAdvisoriesRequestBuilder +Trace: KiotaBuilder Creating property stargazers of stargazersRequestBuilder +Trace: KiotaBuilder Creating property stats of statsRequestBuilder +Trace: KiotaBuilder Creating property statuses of statusesRequestBuilder +Trace: KiotaBuilder Creating property subscribers of subscribersRequestBuilder +Trace: KiotaBuilder Creating class oidcRequestBuilder +Trace: KiotaBuilder Creating property subscription of subscriptionRequestBuilder +Trace: KiotaBuilder Creating property tags of tagsRequestBuilder +Trace: KiotaBuilder Creating property customization of customizationRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property tarball of tarballRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating property topics of topicsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property traffic of trafficRequestBuilder +Trace: KiotaBuilder Creating property transfer of transferRequestBuilder +Trace: KiotaBuilder Creating property vulnerabilityAlerts of vulnerabilityAlertsRequestBuilder +Trace: KiotaBuilder Creating property zipball of zipballRequestBuilder +Trace: KiotaBuilder Creating property generate of generateRequestBuilder +Trace: KiotaBuilder Creating class downloadsRequestBuilder +Trace: KiotaBuilder Creating class customizationRequestBuilder +Trace: KiotaBuilder Creating property sub of subRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class subRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class generateJitconfigRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class permissionsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating property selectedActions of selectedActionsRequestBuilder +Trace: KiotaBuilder Creating property workflow of workflowRequestBuilder +Trace: KiotaBuilder Creating class registrationTokenRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class removeTokenRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRunner_ItemRequestBuilder +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating class actionsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property artifacts of artifactsRequestBuilder +Trace: KiotaBuilder Creating property cache of cacheRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property caches of cachesRequestBuilder +Trace: KiotaBuilder Creating property jobs of jobsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property oidc of oidcRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property organizationSecrets of organizationSecretsRequestBuilder +Trace: KiotaBuilder Creating property organizationVariables of organizationVariablesRequestBuilder +Trace: KiotaBuilder Creating property permissions of permissionsRequestBuilder +Trace: KiotaBuilder Creating property runners of runnersRequestBuilder +Trace: KiotaBuilder Creating property runs of runsRequestBuilder +Trace: KiotaBuilder Creating class selectedActionsRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property variables of variablesRequestBuilder +Trace: KiotaBuilder Creating property workflows of workflowsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class artifactsRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithArtifact_-indexer +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class workflowRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class forksRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithColumn_ItemRequestBuilder +Trace: KiotaBuilder Creating property cards of cardsRequestBuilder +Trace: KiotaBuilder Creating property moves of movesRequestBuilder +Trace: KiotaBuilder Creating class starRequestBuilder +Trace: KiotaBuilder Creating class runnerGroupsRequestBuilder +Trace: KiotaBuilder Creating indexer WithRunner_group_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithShaItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTeam_-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTeam_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property discussions of discussionsRequestBuilder +Trace: KiotaBuilder Creating property invitations of invitationsRequestBuilder +Trace: KiotaBuilder Creating property members of membersRequestBuilder +Trace: KiotaBuilder Creating class WithRunner_group_ItemRequestBuilder +Trace: KiotaBuilder Creating property memberships of membershipsRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating property runners of runnersRequestBuilder +Trace: KiotaBuilder Creating property teamSync of teamSyncRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class cardsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Warning: KiotaBuilder Could not create error type for 422 in projects/create-card +Trace: KiotaBuilder Creating class discussionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithDiscussion_number-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class movesRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class runnersRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRunner_-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithProject_ItemRequestBuilder +Trace: KiotaBuilder Creating property collaborators of collaboratorsRequestBuilder +Trace: KiotaBuilder Creating property columns of columnsRequestBuilder +Trace: KiotaBuilder Creating class announcementRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithDiscussion_numberItemRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating class WithRunner_ItemRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class auditLogRequestBuilder +Trace: KiotaBuilder Creating class runnersRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property downloads of downloadsRequestBuilder +Trace: KiotaBuilder Creating property generateJitconfig of generateJitconfigRequestBuilder +Trace: KiotaBuilder Creating property registrationToken of registrationTokenRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property removeToken of removeTokenRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRunner_-indexer +Trace: KiotaBuilder Creating class collaboratorsRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class downloadsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codeScanningRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating property permission of permissionRequestBuilder +Trace: KiotaBuilder Creating class generateJitconfigRequestBuilder +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class permissionRequestBuilder +Trace: KiotaBuilder Creating class registrationTokenRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class removeTokenRequestBuilder +Trace: KiotaBuilder Creating class columnsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRunner_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rate_limitRequestBuilder +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating class code_security_and_analysisRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class userRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property blocks of blocksRequestBuilder +Trace: KiotaBuilder Creating property codespaces of codespacesRequestBuilder +Trace: KiotaBuilder Creating property docker of dockerRequestBuilder +Trace: KiotaBuilder Creating property email of emailRequestBuilder +Trace: KiotaBuilder Creating property emails of emailsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property followers of followersRequestBuilder +Trace: KiotaBuilder Creating property following of followingRequestBuilder +Trace: KiotaBuilder Creating property gpg_keys of gpg_keysRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class consumedLicensesRequestBuilder +Trace: KiotaBuilder Creating property installations of installationsRequestBuilder +Trace: KiotaBuilder Creating property interactionLimits of interactionLimitsRequestBuilder +Trace: KiotaBuilder Creating property issues of issuesRequestBuilder +Trace: KiotaBuilder Creating property keys of keysRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property marketplace_purchases of marketplace_purchasesRequestBuilder +Trace: KiotaBuilder Creating property memberships of membershipsRequestBuilder +Trace: KiotaBuilder Creating property migrations of migrationsRequestBuilder +Trace: KiotaBuilder Creating property orgs of orgsRequestBuilder +Trace: KiotaBuilder Creating property packages of packagesRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property public_emails of public_emailsRequestBuilder +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property repository_invitations of repository_invitationsRequestBuilder +Trace: KiotaBuilder Creating property social_accounts of social_accountsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property ssh_signing_keys of ssh_signing_keysRequestBuilder +Trace: KiotaBuilder Creating class copilotRequestBuilder +Trace: KiotaBuilder Creating property starred of starredRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property billing of billingRequestBuilder +Trace: KiotaBuilder Creating property subscriptions of subscriptionsRequestBuilder +Trace: KiotaBuilder Creating property usage of usageRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAccount_-indexer +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating class billingRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating property seats of seatsRequestBuilder +Trace: KiotaBuilder Creating class seatsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeUnionType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class blocksRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithArtifact_ItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithArchive_format-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithComment_number-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithArchive_formatItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class cacheRequestBuilder +Trace: KiotaBuilder Creating property usage of usageRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usageRequestBuilder +Trace: KiotaBuilder Creating class WithComment_numberItemRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating class cachesRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithCache_-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class variablesRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating class invitationsRequestBuilder +Trace: KiotaBuilder Creating class WithCache_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usageRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class dependabotRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating class codespacesRequestBuilder +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating indexer WithCodespace_name-indexer +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class announcementRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class licenseSyncStatusRequestBuilder +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class attestationsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithSubject_digest-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class secretScanningRequestBuilder +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating class WithSubject_digestItemRequestBuilder +Trace: KiotaBuilder Creating class jobsRequestBuilder +Trace: KiotaBuilder Creating indexer WithJob_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membersRequestBuilder +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithJob_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property logs of logsRequestBuilder +Trace: KiotaBuilder Creating property rerun of rerunRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class auditLogRequestBuilder +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class logsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membershipsRequestBuilder +Trace: KiotaBuilder Creating class blocksRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating class rerunRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class oidcRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property customization of customizationRequestBuilder +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class customizationRequestBuilder +Trace: KiotaBuilder Creating property sub of subRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating indexer WithProject_-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class subRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codeScanningRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating class WithProject_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithOwner-indexer +Trace: KiotaBuilder Creating class codeSecurityRequestBuilder +Trace: KiotaBuilder Creating property configurations of configurationsRequestBuilder +Trace: KiotaBuilder Creating class organizationSecretsRequestBuilder +Trace: KiotaBuilder Creating class configurationsRequestBuilder +Trace: KiotaBuilder Creating property defaults of defaultsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithConfiguration_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class organizationVariablesRequestBuilder +Trace: KiotaBuilder Creating class settingsRequestBuilder +Trace: KiotaBuilder Creating property billing of billingRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class billingRequestBuilder +Trace: KiotaBuilder Creating property actions of actionsRequestBuilder +Trace: KiotaBuilder Creating property advancedSecurity of advancedSecurityRequestBuilder +Trace: KiotaBuilder Creating property costCenters of costCentersRequestBuilder +Trace: KiotaBuilder Creating property packages of packagesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property sharedStorage of sharedStorageRequestBuilder +Trace: KiotaBuilder Creating class permissionsRequestBuilder +Trace: KiotaBuilder Creating property usage of usageRequestBuilder +Trace: KiotaBuilder Creating property access of accessRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property selectedActions of selectedActionsRequestBuilder +Trace: KiotaBuilder Creating property workflow of workflowRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class actionsRequestBuilder +Trace: KiotaBuilder Creating class defaultsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class accessRequestBuilder +Trace: KiotaBuilder Creating class WithConfiguration_ItemRequestBuilder +Trace: KiotaBuilder Creating property attach of attachRequestBuilder +Trace: KiotaBuilder Creating property defaults of defaultsRequestBuilder +Trace: KiotaBuilder Creating class advancedSecurityRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class selectedActionsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class costCentersRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithCost_center_-indexer +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithCost_center_ItemRequestBuilder +Trace: KiotaBuilder Creating class attachRequestBuilder +Trace: KiotaBuilder Creating property resource of resourceRequestBuilder +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class resourceRequestBuilder +Trace: KiotaBuilder Creating class defaultsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class packagesRequestBuilder +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating class WithOwnerItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepo-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepoItemRequestBuilder +Trace: KiotaBuilder Creating class sharedStorageRequestBuilder +Trace: KiotaBuilder Creating class WithCodespace_nameItemRequestBuilder +Trace: KiotaBuilder Creating property exports of exportsRequestBuilder +Trace: KiotaBuilder Creating property machines of machinesRequestBuilder +Trace: KiotaBuilder Creating property publish of publishRequestBuilder +Trace: KiotaBuilder Creating property start of startRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property stop of stopRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usageRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class exportsRequestBuilder +Trace: KiotaBuilder Creating indexer WithExport_-indexer +Trace: KiotaBuilder Creating class WithSecurity_productItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithEnablement-indexer +Trace: KiotaBuilder Creating class teamSyncRequestBuilder +Trace: KiotaBuilder Creating property groupMappings of groupMappingsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithEnablementItemRequestBuilder +Trace: KiotaBuilder Creating class groupMappingsRequestBuilder +Trace: KiotaBuilder Creating class WithExport_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class machinesRequestBuilder +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class publishRequestBuilder +Trace: KiotaBuilder Creating class codespacesRequestBuilder +Trace: KiotaBuilder Creating property access of accessRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating class versionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class accessRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property selected_users of selected_usersRequestBuilder +Trace: KiotaBuilder Creating class zenRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class startRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class selected_usersRequestBuilder +Trace: KiotaBuilder Creating class activityRequestBuilder +Trace: KiotaBuilder Creating class workflowRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class stopRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class runnersRequestBuilder +Trace: KiotaBuilder Creating property downloads of downloadsRequestBuilder +Trace: KiotaBuilder Creating property generateJitconfig of generateJitconfigRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property registrationToken of registrationTokenRequestBuilder +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property removeToken of removeTokenRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating indexer WithRunner_-indexer +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class assigneesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithAssignee-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class dockerRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property conflicts of conflictsRequestBuilder +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating class WithAssigneeItemRequestBuilder +Trace: KiotaBuilder Creating class conflictsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class attestationsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithSubject_digest-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class downloadsRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSubject_digestItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class generateJitconfigRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class autolinksRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithAutolink_-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class copilotRequestBuilder +Trace: KiotaBuilder Creating property billing of billingRequestBuilder +Trace: KiotaBuilder Creating property usage of usageRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class billingRequestBuilder +Trace: KiotaBuilder Creating property seats of seatsRequestBuilder +Trace: KiotaBuilder Creating property selected_teams of selected_teamsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property selected_users of selected_usersRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAutolink_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class seatsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class registrationTokenRequestBuilder +Trace: KiotaBuilder Creating class automatedSecurityFixesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class emailRequestBuilder +Trace: KiotaBuilder Creating property visibility of visibilityRequestBuilder +Trace: KiotaBuilder Creating class branchesRequestBuilder +Trace: KiotaBuilder Creating indexer WithBranch-indexer +Trace: KiotaBuilder Creating class visibilityRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class selected_teamsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class emailsRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithBranchItemRequestBuilder +Trace: KiotaBuilder Creating property protection of protectionRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property rename of renameRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class selected_usersRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class followersRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usageRequestBuilder +Trace: KiotaBuilder Creating class followingRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class protectionRequestBuilder +Trace: KiotaBuilder Creating property enforce_admins of enforce_adminsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property required_pull_request_reviews of required_pull_request_reviewsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property required_signatures of required_signaturesRequestBuilder +Trace: KiotaBuilder Creating property required_status_checks of required_status_checksRequestBuilder +Trace: KiotaBuilder Creating property restrictions of restrictionsRequestBuilder +Trace: KiotaBuilder Creating class credentialAuthorizationsRequestBuilder +Trace: KiotaBuilder Creating indexer WithCredential_-indexer +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class gpg_keysRequestBuilder +Trace: KiotaBuilder Creating class WithCredential_ItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithGpg_key_-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class removeTokenRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class customRepositoryRolesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRole_-indexer +Trace: KiotaBuilder Creating class enforce_adminsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRunner_ItemRequestBuilder +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class required_pull_request_reviewsRequestBuilder +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRole_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class required_signaturesRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class custom_rolesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRole_-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithGpg_key_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRole_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class installationsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithInstallation_-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class dependabotRequestBuilder +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating class runsRequestBuilder +Trace: KiotaBuilder Creating indexer WithRun_-indexer +Trace: KiotaBuilder Creating class required_status_checksRequestBuilder +Trace: KiotaBuilder Creating property contexts of contextsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithInstallation_ItemRequestBuilder +Trace: KiotaBuilder Creating class contextsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class restrictionsRequestBuilder +Trace: KiotaBuilder Creating property apps of appsRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating property users of usersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating class WithRun_ItemRequestBuilder +Trace: KiotaBuilder Creating property approvals of approvalsRequestBuilder +Trace: KiotaBuilder Creating class appsRequestBuilder +Trace: KiotaBuilder Creating property approve of approveRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property artifacts of artifactsRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property attempts of attemptsRequestBuilder +Trace: KiotaBuilder Creating property cancel of cancelRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property deployment_protection_rule of deployment_protection_ruleRequestBuilder +Trace: KiotaBuilder Creating property forceCancel of forceCancelRequestBuilder +Trace: KiotaBuilder Creating property jobs of jobsRequestBuilder +Trace: KiotaBuilder Creating property logs of logsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property pending_deployments of pending_deploymentsRequestBuilder +Trace: KiotaBuilder Creating property rerun of rerunRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property rerunFailedJobs of rerunFailedJobsRequestBuilder +Trace: KiotaBuilder Creating property timing of timingRequestBuilder +Trace: KiotaBuilder Creating class interactionLimitsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating class issuesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class approvalsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class keysRequestBuilder +Trace: KiotaBuilder Creating indexer WithKey_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class approveRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usersRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithKey_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class artifactsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class attemptsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAttempt_number-indexer +Trace: KiotaBuilder Creating class marketplace_purchasesRequestBuilder +Trace: KiotaBuilder Creating property stubbed of stubbedRequestBuilder +Trace: KiotaBuilder Creating class renameRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAttempt_numberItemRequestBuilder +Trace: KiotaBuilder Creating property jobs of jobsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property logs of logsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class stubbedRequestBuilder +Trace: KiotaBuilder Creating class checkRunsRequestBuilder +Trace: KiotaBuilder Creating indexer WithCheck_run_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class jobsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membershipsRequestBuilder +Trace: KiotaBuilder Creating property orgs of orgsRequestBuilder +Trace: KiotaBuilder Creating class logsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class orgsRequestBuilder +Trace: KiotaBuilder Creating indexer WithOrg-indexer +Trace: KiotaBuilder Creating class WithCheck_run_ItemRequestBuilder +Trace: KiotaBuilder Creating property annotations of annotationsRequestBuilder +Trace: KiotaBuilder Creating class cancelRequestBuilder +Trace: KiotaBuilder Creating property rerequest of rerequestRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating class WithOrgItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepository_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deployment_protection_ruleRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class annotationsRequestBuilder +Trace: KiotaBuilder Creating class migrationsRequestBuilder +Trace: KiotaBuilder Creating indexer WithMigration_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rerequestRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithMigration_ItemRequestBuilder +Trace: KiotaBuilder Creating property archive of archiveRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating class forceCancelRequestBuilder +Trace: KiotaBuilder Creating class checkSuitesRequestBuilder +Trace: KiotaBuilder Creating property preferences of preferencesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithCheck_suite_-indexer +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class jobsRequestBuilder +Trace: KiotaBuilder Creating class archiveRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepository_ItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class logsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepo_name-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class dockerRequestBuilder +Trace: KiotaBuilder Creating property conflicts of conflictsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepo_nameItemRequestBuilder +Trace: KiotaBuilder Creating property lock of lockRequestBuilder +Trace: KiotaBuilder Creating class conflictsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class preferencesRequestBuilder +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class lockRequestBuilder +Trace: KiotaBuilder Creating class pending_deploymentsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithCheck_suite_ItemRequestBuilder +Trace: KiotaBuilder Creating property checkRuns of checkRunsRequestBuilder +Trace: KiotaBuilder Creating property rerequest of rerequestRequestBuilder +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class checkRunsRequestBuilder +Trace: KiotaBuilder Creating class orgsRequestBuilder +Trace: KiotaBuilder Creating class rerunRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class packagesRequestBuilder +Trace: KiotaBuilder Creating class rerequestRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_type-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rerunFailedJobsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codeScanningRequestBuilder +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating property analyses of analysesRequestBuilder +Trace: KiotaBuilder Creating property codeql of codeqlRequestBuilder +Trace: KiotaBuilder Creating class WithPackage_typeItemRequestBuilder +Trace: KiotaBuilder Creating property defaultSetup of defaultSetupRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_name-indexer +Trace: KiotaBuilder Creating property sarifs of sarifsRequestBuilder +Trace: KiotaBuilder Creating class timingRequestBuilder +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating class WithPackage_nameItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithAlert_number-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property restore of restoreRequestBuilder +Trace: KiotaBuilder Creating property versions of versionsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class restoreRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAlert_numberItemRequestBuilder +Trace: KiotaBuilder Creating property instances of instancesRequestBuilder +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating class versionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_version_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPackage_version_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property restore of restoreRequestBuilder +Trace: KiotaBuilder Creating class instancesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class externalGroupRequestBuilder +Trace: KiotaBuilder Creating indexer WithGroup_-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class analysesRequestBuilder +Trace: KiotaBuilder Creating indexer WithAnalysis_-indexer +Trace: KiotaBuilder Creating class WithGroup_ItemRequestBuilder +Trace: KiotaBuilder Creating class restoreRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class variablesRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class externalGroupsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class failed_invitationsRequestBuilder +Trace: KiotaBuilder Creating class public_emailsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating class fine_grained_permissionsRequestBuilder +Trace: KiotaBuilder Creating class workflowsRequestBuilder +Trace: KiotaBuilder Creating indexer WithWorkflow_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class hooksRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithHook_-indexer +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithWorkflow_ItemRequestBuilder +Trace: KiotaBuilder Creating property disable of disableRequestBuilder +Trace: KiotaBuilder Creating property dispatches of dispatchesRequestBuilder +Trace: KiotaBuilder Creating property enable of enableRequestBuilder +Trace: KiotaBuilder Creating property runs of runsRequestBuilder +Trace: KiotaBuilder Creating property timing of timingRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repository_invitationsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithInvitation_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class disableRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithHook_ItemRequestBuilder +Trace: KiotaBuilder Creating property config of configRequestBuilder +Trace: KiotaBuilder Creating property deliveries of deliveriesRequestBuilder +Trace: KiotaBuilder Creating property pings of pingsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithInvitation_ItemRequestBuilder +Trace: KiotaBuilder Creating class dispatchesRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class enableRequestBuilder +Trace: KiotaBuilder Creating class WithAnalysis_ItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class social_accountsRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class runsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codeqlRequestBuilder +Trace: KiotaBuilder Creating property databases of databasesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property variantAnalyses of variantAnalysesRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class timingRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class databasesRequestBuilder +Trace: KiotaBuilder Creating indexer WithLanguage-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class ssh_signing_keysRequestBuilder +Trace: KiotaBuilder Creating indexer WithSsh_signing_key_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codeownersRequestBuilder +Trace: KiotaBuilder Creating property errors of errorsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithLanguageItemRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class errorsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSsh_signing_key_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class variantAnalysesRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithCodeql_variant_analysis_-indexer +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class codespacesRequestBuilder +Trace: KiotaBuilder Creating property devcontainers of devcontainersRequestBuilder +Trace: KiotaBuilder Creating property machines of machinesRequestBuilder +Trace: KiotaBuilder Creating property new of newRequestBuilder +Trace: KiotaBuilder Creating property permissions_check of permissions_checkRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating class starredRequestBuilder +Trace: KiotaBuilder Creating indexer WithOwner-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOwnerItemRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepo-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class devcontainersRequestBuilder +Trace: KiotaBuilder Creating class WithRepoItemRequestBuilder +Trace: KiotaBuilder Creating class WithCodeql_variant_analysis_ItemRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class configRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class installationsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class machinesRequestBuilder +Trace: KiotaBuilder Creating class interactionLimitsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deliveriesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithDelivery_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class newRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithDelivery_ItemRequestBuilder +Trace: KiotaBuilder Creating class invitationsRequestBuilder +Trace: KiotaBuilder Creating property attempts of attemptsRequestBuilder +Trace: KiotaBuilder Creating indexer WithInvitation_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class permissions_checkRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class attemptsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class subscriptionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithInvitation_ItemRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating class pingsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating class installationRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAccount_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeUnionType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class issuesRequestBuilder +Trace: KiotaBuilder Creating class personalAccessTokenRequestsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPat_request_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usersRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membersRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating property attestations of attestationsRequestBuilder +Trace: KiotaBuilder Creating property docker of dockerRequestBuilder +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating property followers of followersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property following of followingRequestBuilder +Trace: KiotaBuilder Creating property gists of gistsRequestBuilder +Trace: KiotaBuilder Creating property gpg_keys of gpg_keysRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property hovercard of hovercardRequestBuilder +Trace: KiotaBuilder Creating property installation of installationRequestBuilder +Trace: KiotaBuilder Creating property keys of keysRequestBuilder +Trace: KiotaBuilder Creating property orgs of orgsRequestBuilder +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating property packages of packagesRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property received_events of received_eventsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating property settings of settingsRequestBuilder +Trace: KiotaBuilder Creating property social_accounts of social_accountsRequestBuilder +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating property ssh_signing_keys of ssh_signing_keysRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property starred of starredRequestBuilder +Trace: KiotaBuilder Creating property subscriptions of subscriptionsRequestBuilder +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeUnionType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating property codespaces of codespacesRequestBuilder +Trace: KiotaBuilder Creating property copilot of copilotRequestBuilder +Trace: KiotaBuilder Creating class collaboratorsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class attestationsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithSubject_digest-indexer +Trace: KiotaBuilder Creating class codespacesRequestBuilder +Trace: KiotaBuilder Creating indexer WithCodespace_name-indexer +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating property permission of permissionRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepo_owner-indexer +Trace: KiotaBuilder Creating class WithSubject_digestItemRequestBuilder +Trace: KiotaBuilder Creating class WithCodespace_nameItemRequestBuilder +Trace: KiotaBuilder Creating property stop of stopRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepo_ownerItemRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepo_name-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class stopRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepo_nameItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class copilotRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class defaultSetupRequestBuilder +Trace: KiotaBuilder Creating class WithPat_request_ItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membershipsRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating class permissionRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class personalAccessTokensRequestBuilder +Trace: KiotaBuilder Creating indexer WithPat_-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class migrationsRequestBuilder +Trace: KiotaBuilder Creating indexer WithMigration_-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithComment_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPat_ItemRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating class WithMigration_ItemRequestBuilder +Trace: KiotaBuilder Creating property archive of archiveRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating class WithComment_ItemRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating class archiveRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRepo_name-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRepo_nameItemRequestBuilder +Trace: KiotaBuilder Creating property lock of lockRequestBuilder +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class propertiesRequestBuilder +Trace: KiotaBuilder Creating property schema of schemaRequestBuilder +Trace: KiotaBuilder Creating property values of valuesRequestBuilder +Trace: KiotaBuilder Creating class lockRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commitsRequestBuilder +Trace: KiotaBuilder Creating indexer Commit_sha-indexer +Trace: KiotaBuilder Creating class schemaRequestBuilder +Trace: KiotaBuilder Creating indexer WithCustom_property_name-indexer +Trace: KiotaBuilder Creating class dockerRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property conflicts of conflictsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class Commit_shaItemRequestBuilder +Trace: KiotaBuilder Creating property branchesWhereHead of branchesWhereHeadRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property pulls of pullsRequestBuilder +Trace: KiotaBuilder Creating property checkRuns of checkRunsRequestBuilder +Trace: KiotaBuilder Creating property checkSuites of checkSuitesRequestBuilder +Trace: KiotaBuilder Creating property status of statusRequestBuilder +Trace: KiotaBuilder Creating property statuses of statusesRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class conflictsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithCustom_property_nameItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class branchesWhereHeadRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating class sarifsRequestBuilder +Trace: KiotaBuilder Creating property orgs of orgsRequestBuilder +Trace: KiotaBuilder Creating property public of publicRequestBuilder +Trace: KiotaBuilder Creating indexer WithSarif_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class valuesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class orgsRequestBuilder +Trace: KiotaBuilder Creating indexer WithOrg-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSarif_ItemRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOrgItemRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class publicRequestBuilder +Trace: KiotaBuilder Creating class compareRequestBuilder +Trace: KiotaBuilder Creating class public_membersRequestBuilder +Trace: KiotaBuilder Creating indexer WithBasehead-indexer +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithBaseheadItemRequestBuilder +Trace: KiotaBuilder Creating class followersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating class contentsRequestBuilder +Trace: KiotaBuilder Creating class organizationFineGrainedPermissionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPath-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPathItemRequestBuilder +Trace: KiotaBuilder Creating class organizationRolesRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating property users of usersRequestBuilder +Trace: KiotaBuilder Creating indexer WithRole_-indexer +Trace: KiotaBuilder Creating class repositoryFineGrainedPermissionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeUnionType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rulesetsRequestBuilder +Trace: KiotaBuilder Creating property ruleSuites of ruleSuitesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRuleset_-indexer +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTeam_slug-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTeam_slugItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithRole_-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class contributorsRequestBuilder +Trace: KiotaBuilder Creating class WithRole_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class followingRequestBuilder +Trace: KiotaBuilder Creating indexer WithTarget_user-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTarget_userItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class gistsRequestBuilder +Trace: KiotaBuilder Creating class pullsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class gpg_keysRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class hovercardRequestBuilder +Trace: KiotaBuilder Creating class ruleSuitesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRule_suite_-indexer +Trace: KiotaBuilder Creating class dependabotRequestBuilder +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAlert_number-indexer +Trace: KiotaBuilder Creating class installationRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRule_suite_ItemRequestBuilder +Trace: KiotaBuilder Creating class keysRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRuleset_ItemRequestBuilder +Trace: KiotaBuilder Creating class WithAlert_numberItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class orgsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class packagesRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithPackage_type-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class secretScanningRequestBuilder +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating class WithPackage_typeItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_name-indexer +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPackage_nameItemRequestBuilder +Trace: KiotaBuilder Creating property restore of restoreRequestBuilder +Trace: KiotaBuilder Creating property versions of versionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class securityAdvisoriesRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class restoreRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class usersRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating class versionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_version_-indexer +Trace: KiotaBuilder Creating class checkRunsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithRole_-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPackage_version_ItemRequestBuilder +Trace: KiotaBuilder Creating property restore of restoreRequestBuilder +Trace: KiotaBuilder Creating class WithRole_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class checkSuitesRequestBuilder +Trace: KiotaBuilder Creating class WithRole_ItemRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating property users of usersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class restoreRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class statusRequestBuilder +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class securityManagersRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class received_eventsRequestBuilder +Trace: KiotaBuilder Creating property public of publicRequestBuilder +Trace: KiotaBuilder Creating class statusesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTeam_slug-indexer +Trace: KiotaBuilder Creating class publicRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class communityRequestBuilder +Trace: KiotaBuilder Creating property profile of profileRequestBuilder +Trace: KiotaBuilder Creating class WithTeam_slugItemRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class profileRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class settingsRequestBuilder +Trace: KiotaBuilder Creating property billing of billingRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class settingsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property billing of billingRequestBuilder +Trace: KiotaBuilder Creating class billingRequestBuilder +Trace: KiotaBuilder Creating property actions of actionsRequestBuilder +Trace: KiotaBuilder Creating property advancedSecurity of advancedSecurityRequestBuilder +Trace: KiotaBuilder Creating property packages of packagesRequestBuilder +Trace: KiotaBuilder Creating property sharedStorage of sharedStorageRequestBuilder +Trace: KiotaBuilder Creating class billingRequestBuilder +Trace: KiotaBuilder Creating property actions of actionsRequestBuilder +Trace: KiotaBuilder Creating property packages of packagesRequestBuilder +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating property sharedStorage of sharedStorageRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class actionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class actionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class forksRequestBuilder +Trace: KiotaBuilder Creating class advancedSecurityRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class packagesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class dependencyGraphRequestBuilder +Trace: KiotaBuilder Creating property compare of compareRequestBuilder +Trace: KiotaBuilder Creating class sharedStorageRequestBuilder +Trace: KiotaBuilder Creating property sbom of sbomRequestBuilder +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating property snapshots of snapshotsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class social_accountsRequestBuilder +Trace: KiotaBuilder Creating class compareRequestBuilder +Trace: KiotaBuilder Creating class usersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithBasehead-indexer +Trace: KiotaBuilder Creating class ssh_signing_keysRequestBuilder +Trace: KiotaBuilder Creating class gitRequestBuilder +Trace: KiotaBuilder Creating property blobs of blobsRequestBuilder +Trace: KiotaBuilder Creating property commits of commitsRequestBuilder +Trace: KiotaBuilder Creating property matchingRefs of matchingRefsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property ref of refRequestBuilder +Trace: KiotaBuilder Creating property refs of refsRequestBuilder +Trace: KiotaBuilder Creating property tags of tagsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property trees of treesRequestBuilder +Trace: KiotaBuilder Creating class WithBaseheadItemRequestBuilder +Trace: KiotaBuilder Creating class packagesRequestBuilder +Trace: KiotaBuilder Creating class starredRequestBuilder +Trace: KiotaBuilder Creating class blobsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithFile_sha-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeIntersectionType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class sharedStorageRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class subscriptionsRequestBuilder +Trace: KiotaBuilder Creating class WithFile_shaItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamSyncRequestBuilder +Trace: KiotaBuilder Creating property groups of groupsRequestBuilder +Trace: KiotaBuilder Creating class commitsRequestBuilder +Trace: KiotaBuilder Creating indexer WithCommit_sha-indexer +Trace: KiotaBuilder Creating class matchingRefsRequestBuilder +Trace: KiotaBuilder Creating indexer WithRef-indexer +Trace: KiotaBuilder Creating class groupsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRefItemRequestBuilder +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTeam_slug-indexer +Trace: KiotaBuilder Creating class WithCommit_shaItemRequestBuilder +Trace: KiotaBuilder Creating class outside_collaboratorsRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class refRequestBuilder +Trace: KiotaBuilder Creating indexer WithRef-indexer +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating class WithTeam_slugItemRequestBuilder +Trace: KiotaBuilder Creating property discussions of discussionsRequestBuilder +Trace: KiotaBuilder Creating property externalGroups of externalGroupsRequestBuilder +Trace: KiotaBuilder Creating property invitations of invitationsRequestBuilder +Trace: KiotaBuilder Creating property members of membersRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property memberships of membershipsRequestBuilder +Trace: KiotaBuilder Creating property projects of projectsRequestBuilder +Trace: KiotaBuilder Creating property repos of reposRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property teamSync of teamSyncRequestBuilder +Trace: KiotaBuilder Creating property teams of teamsRequestBuilder +Trace: KiotaBuilder Creating class WithRefItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class packagesRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_type-indexer +Trace: KiotaBuilder Creating class refsRequestBuilder +Trace: KiotaBuilder Creating indexer WithRef-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class discussionsRequestBuilder +Trace: KiotaBuilder Creating class sbomRequestBuilder +Trace: KiotaBuilder Creating class tagsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTag_sha-indexer +Trace: KiotaBuilder Creating class WithPackage_typeItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_name-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPackage_nameItemRequestBuilder +Trace: KiotaBuilder Creating property restore of restoreRequestBuilder +Trace: KiotaBuilder Creating property versions of versionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class snapshotsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTag_shaItemRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRefItemRequestBuilder +Trace: KiotaBuilder Creating class treesRequestBuilder +Trace: KiotaBuilder Creating indexer WithTree_sha-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deploymentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithDeployment_-indexer +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class restoreRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTree_shaItemRequestBuilder +Trace: KiotaBuilder Creating class WithDeployment_ItemRequestBuilder +Trace: KiotaBuilder Creating property statuses of statusesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class interactionLimitsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithDiscussion_number-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class versionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPackage_version_-indexer +Trace: KiotaBuilder Creating class hooksRequestBuilder +Trace: KiotaBuilder Creating indexer WithHook_-indexer +Trace: KiotaBuilder Creating class invitationsRequestBuilder +Trace: KiotaBuilder Creating indexer WithInvitation_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithDiscussion_numberItemRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithPackage_version_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property restore of restoreRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithInvitation_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithHook_ItemRequestBuilder +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating property config of configRequestBuilder +Trace: KiotaBuilder Creating property deliveries of deliveriesRequestBuilder +Trace: KiotaBuilder Creating indexer WithComment_number-indexer +Trace: KiotaBuilder Creating property pings of pingsRequestBuilder +Trace: KiotaBuilder Creating property tests of testsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class restoreRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class issuesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithIssue_number-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class configRequestBuilder +Trace: KiotaBuilder Creating class WithComment_numberItemRequestBuilder +Trace: KiotaBuilder Creating class WithSecurity_productItemRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithEnablement-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithEnablementItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deliveriesRequestBuilder +Trace: KiotaBuilder Creating indexer WithDelivery_-indexer +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithComment_-indexer +Trace: KiotaBuilder Creating class WithDelivery_ItemRequestBuilder +Trace: KiotaBuilder Creating property attempts of attemptsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class attemptsRequestBuilder +Trace: KiotaBuilder Creating class statusesRequestBuilder +Trace: KiotaBuilder Creating class WithComment_ItemRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithStatus_-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class pingsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating class WithStatus_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class testsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating class importRequestBuilder +Trace: KiotaBuilder Creating property authors of authorsRequestBuilder +Trace: KiotaBuilder Creating property large_files of large_filesRequestBuilder +Trace: KiotaBuilder Creating property lfs of lfsRequestBuilder +Trace: KiotaBuilder Creating class dispatchesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class environmentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithEnvironment_name-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class authorsRequestBuilder +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating indexer WithAuthor_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAuthor_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class externalGroupsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class invitationsRequestBuilder +Trace: KiotaBuilder Creating class large_filesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class lfsRequestBuilder +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class installationRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithEnvironment_nameItemRequestBuilder +Trace: KiotaBuilder Creating property deploymentBranchPolicies of deploymentBranchPoliciesRequestBuilder +Trace: KiotaBuilder Creating property deployment_protection_rules of deployment_protection_rulesRequestBuilder +Trace: KiotaBuilder Creating class keysRequestBuilder +Trace: KiotaBuilder Creating indexer WithKey_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property secrets of secretsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property variables of variablesRequestBuilder +Trace: KiotaBuilder Creating class WithKey_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membersRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class membershipsRequestBuilder +Trace: KiotaBuilder Creating indexer WithUsername-indexer +Trace: KiotaBuilder Creating class deploymentBranchPoliciesRequestBuilder +Trace: KiotaBuilder Creating indexer WithBranch_policy_-indexer +Trace: KiotaBuilder Creating class WithUsernameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating indexer WithProject_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithProject_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithBranch_policy_ItemRequestBuilder +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating indexer WithEvent_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deployment_protection_rulesRequestBuilder +Trace: KiotaBuilder Creating property apps of appsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithProtection_rule_-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithEvent_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reposRequestBuilder +Trace: KiotaBuilder Creating class languagesRequestBuilder +Trace: KiotaBuilder Creating indexer WithOwner-indexer +Trace: KiotaBuilder Creating class WithIssue_numberItemRequestBuilder +Trace: KiotaBuilder Creating property assignees of assigneesRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating property lock of lockRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property timeline of timelineRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamSyncRequestBuilder +Trace: KiotaBuilder Creating property groupMappings of groupMappingsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class lfsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class groupMappingsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class appsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class licenseRequestBuilder +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithProtection_rule_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class mergeUpstreamRequestBuilder +Trace: KiotaBuilder Creating class notificationsRequestBuilder +Trace: KiotaBuilder Creating class secretsRequestBuilder +Trace: KiotaBuilder Creating property publicKey of publicKeyRequestBuilder +Trace: KiotaBuilder Creating indexer WithSecret_name-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class mergesRequestBuilder +Trace: KiotaBuilder Creating class publicKeyRequestBuilder +Trace: KiotaBuilder Creating class pagesRequestBuilder +Trace: KiotaBuilder Creating property builds of buildsRequestBuilder +Trace: KiotaBuilder Creating property deployments of deploymentsRequestBuilder +Trace: KiotaBuilder Creating property health of healthRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithOwnerItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithRepo-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithSecret_nameItemRequestBuilder +Trace: KiotaBuilder Creating class assigneesRequestBuilder +Trace: KiotaBuilder Creating class WithRepoItemRequestBuilder +Trace: KiotaBuilder Creating indexer WithAssignee-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class projectsRequestBuilder +Trace: KiotaBuilder Creating class privateVulnerabilityReportingRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class variablesRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class milestonesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithMilestone_number-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class propertiesRequestBuilder +Trace: KiotaBuilder Creating property values of valuesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class pullsRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPull_number-indexer +Trace: KiotaBuilder Creating class WithAssigneeItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class valuesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class buildsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property latest of latestRequestBuilder +Trace: KiotaBuilder Creating indexer WithBuild_-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class readmeRequestBuilder +Trace: KiotaBuilder Creating indexer WithDir-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating class latestRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithDirItemRequestBuilder +Trace: KiotaBuilder Creating class WithBuild_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class deploymentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithPages_deployment_-indexer +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithMilestone_numberItemRequestBuilder +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rulesetsRequestBuilder +Trace: KiotaBuilder Creating property ruleSuites of ruleSuitesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRuleset_-indexer +Trace: KiotaBuilder Creating class WithPages_deployment_ItemRequestBuilder +Trace: KiotaBuilder Creating property cancel of cancelRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating class releasesRequestBuilder +Trace: KiotaBuilder Creating property assets of assetsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property generateNotes of generateNotesRequestBuilder +Trace: KiotaBuilder Creating property latest of latestRequestBuilder +Trace: KiotaBuilder Creating property tags of tagsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRelease_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class cancelRequestBuilder +Trace: KiotaBuilder Creating class statsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property code_frequency of code_frequencyRequestBuilder +Trace: KiotaBuilder Creating property commit_activity of commit_activityRequestBuilder +Trace: KiotaBuilder Creating property contributors of contributorsRequestBuilder +Trace: KiotaBuilder Creating property participation of participationRequestBuilder +Trace: KiotaBuilder Creating property punch_card of punch_cardRequestBuilder +Trace: KiotaBuilder Creating class ruleSuitesRequestBuilder +Trace: KiotaBuilder Creating indexer WithRule_suite_-indexer +Trace: KiotaBuilder Creating class healthRequestBuilder +Trace: KiotaBuilder Creating class code_frequencyRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commit_activityRequestBuilder +Trace: KiotaBuilder Creating class trafficRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property clones of clonesRequestBuilder +Trace: KiotaBuilder Creating property popular of popularRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property views of viewsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRule_suite_ItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class contributorsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRuleset_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class participationRequestBuilder +Trace: KiotaBuilder Creating class assetsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithAsset_-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class punch_cardRequestBuilder +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithAsset_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class secretScanningRequestBuilder +Trace: KiotaBuilder Creating property alerts of alertsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class alertsRequestBuilder +Trace: KiotaBuilder Creating indexer WithAlert_number-indexer +Trace: KiotaBuilder Creating class generateNotesRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithComment_-indexer +Trace: KiotaBuilder Creating class WithAlert_numberItemRequestBuilder +Trace: KiotaBuilder Creating property locations of locationsRequestBuilder +Trace: KiotaBuilder Creating class latestRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeIntersectionType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class tagsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTag-indexer +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating class clonesRequestBuilder +Trace: KiotaBuilder Creating indexer WithName-indexer +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class statusesRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithSha-indexer +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithShaItemRequestBuilder +Trace: KiotaBuilder Creating class locationsRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithNameItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class subscribersRequestBuilder +Trace: KiotaBuilder Creating class lockRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class subscriptionRequestBuilder +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTagItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class popularRequestBuilder +Trace: KiotaBuilder Creating property paths of pathsRequestBuilder +Trace: KiotaBuilder Creating property referrers of referrersRequestBuilder +Trace: KiotaBuilder Creating class WithRelease_ItemRequestBuilder +Trace: KiotaBuilder Creating property assets of assetsRequestBuilder +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class securityAdvisoriesRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class pathsRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property reports of reportsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithGhsa_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class assetsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class tagsRequestBuilder +Trace: KiotaBuilder Creating property protection of protectionRequestBuilder +Trace: KiotaBuilder Creating class WithComment_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating property reactions of reactionsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class referrersRequestBuilder +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reactionsRequestBuilder +Trace: KiotaBuilder Creating indexer WithReaction_-indexer +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class viewsRequestBuilder +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating class transferRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class rulesRequestBuilder +Trace: KiotaBuilder Creating property branches of branchesRequestBuilder +Trace: KiotaBuilder Creating class WithPull_numberItemRequestBuilder +Trace: KiotaBuilder Creating property codespaces of codespacesRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property commits of commitsRequestBuilder +Trace: KiotaBuilder Creating property files of filesRequestBuilder +Trace: KiotaBuilder Creating property merge of mergeRequestBuilder +Trace: KiotaBuilder Creating property requested_reviewers of requested_reviewersRequestBuilder +Trace: KiotaBuilder Creating property reviews of reviewsRequestBuilder +Trace: KiotaBuilder Creating property updateBranch of updateBranchRequestBuilder +Trace: KiotaBuilder Creating class vulnerabilityAlertsRequestBuilder +Trace: KiotaBuilder Creating class branchesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithBranch-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithBranchItemRequestBuilder +Trace: KiotaBuilder Creating class codespacesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class zipballRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithRef-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRefItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithReaction_ItemRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class generateRequestBuilder +Trace: KiotaBuilder Creating class timelineRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class protectionRequestBuilder +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating indexer WithTag_protection_-indexer +Trace: KiotaBuilder Creating indexer WithComment_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithTag_protection_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeIntersectionType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithComment_ItemRequestBuilder +Trace: KiotaBuilder Creating property replies of repliesRequestBuilder +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class commitsRequestBuilder +Trace: KiotaBuilder Creating class repliesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class tarballRequestBuilder +Trace: KiotaBuilder Creating indexer WithRef-indexer +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class filesRequestBuilder +Trace: KiotaBuilder Creating class mergeRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithRefItemRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reportsRequestBuilder +Trace: KiotaBuilder Creating class requested_reviewersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class teamsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class reviewsRequestBuilder +Trace: KiotaBuilder Creating class WithGhsa_ItemRequestBuilder +Trace: KiotaBuilder Creating property cve of cveRequestBuilder +Trace: KiotaBuilder Creating property forks of forksRequestBuilder +Trace: KiotaBuilder Creating indexer WithReview_-indexer +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class topicsRequestBuilder +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class cveRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class forksRequestBuilder +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithReview_ItemRequestBuilder +Trace: KiotaBuilder Creating property comments of commentsRequestBuilder +Trace: KiotaBuilder Creating property dismissals of dismissalsRequestBuilder +Trace: KiotaBuilder Creating property events of eventsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class stargazersRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeIntersectionType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class dismissalsRequestBuilder +Trace: KiotaBuilder Creating class eventsRequestBuilder +Trace: KiotaBuilder Creating class commentsRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class updateBranchRequestBuilder +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class scimRequestBuilder +Trace: KiotaBuilder Creating property v2 of v2RequestBuilder +Trace: KiotaBuilder Creating class v2RequestBuilder +Trace: KiotaBuilder Creating property enterprises of enterprisesRequestBuilder +Trace: KiotaBuilder Creating property organizations of organizationsRequestBuilder +Trace: KiotaBuilder Creating class organizationsRequestBuilder +Trace: KiotaBuilder Creating indexer WithOrg-indexer +Trace: KiotaBuilder Creating class enterprisesRequestBuilder +Trace: KiotaBuilder Creating indexer WithEnterprise-indexer +Trace: KiotaBuilder Creating class WithOrgItemRequestBuilder +Trace: KiotaBuilder Creating property Users of UsersRequestBuilder +Trace: KiotaBuilder Creating class WithEnterpriseItemRequestBuilder +Trace: KiotaBuilder Creating property Groups of GroupsRequestBuilder +Trace: KiotaBuilder Creating property Users of UsersRequestBuilder +Trace: KiotaBuilder Creating class UsersRequestBuilder +Trace: KiotaBuilder Creating indexer WithScim_user_-indexer +Trace: KiotaBuilder Creating class GroupsRequestBuilder +Trace: KiotaBuilder Creating indexer WithScim_group_-indexer +Trace: KiotaBuilder Creating class UsersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating indexer WithScim_user_-indexer +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithScim_user_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithScim_group_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Post of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPostRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class WithScim_user_ItemRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Put of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPutRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Patch of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToPatchRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Delete of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToDeleteRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class searchRequestBuilder +Trace: KiotaBuilder Creating property code of codeRequestBuilder +Trace: KiotaBuilder Creating property commits of commitsRequestBuilder +Trace: KiotaBuilder Creating property issues of issuesRequestBuilder +Trace: KiotaBuilder Creating property labels of labelsRequestBuilder +Trace: KiotaBuilder Creating property repositories of repositoriesRequestBuilder +Trace: KiotaBuilder Creating property topics of topicsRequestBuilder +Trace: KiotaBuilder Creating property users of usersRequestBuilder +Trace: KiotaBuilder Creating class codeRequestBuilder +Trace: KiotaBuilder Creating class issuesRequestBuilder +Trace: KiotaBuilder Creating class commitsRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class labelsRequestBuilder +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating class repositoriesRequestBuilder +Trace: KiotaBuilder Creating class topicsRequestBuilder +Trace: KiotaBuilder Creating class usersRequestBuilder +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method Get of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Trace: KiotaBuilder Creating method ToGetRequestInformation of Kiota.Builder.CodeDOM.CodeType +Debug: KiotaBuilder CreateRequestBuilderClass 00:00:00 +Debug: KiotaBuilder MapTypeDefinitions 00:00:00.4303778 +Information: KiotaBuilder Removing unused model contentDirectory as it is not referenced by the client API surface +Debug: KiotaBuilder TrimInheritedModels 00:00:00 +Debug: KiotaBuilder CleanUpInternalState 00:00:00 +Trace: KiotaBuilder 0ms: Created source model with 39 classes +Debug: KiotaBuilder step 7 - create source model - took 00:00:01.4027104 +Debug: KiotaBuilder 1973ms: Language refinement applied +Debug: KiotaBuilder step 8 - refine by language - took 00:00:01.9745094 +Trace: KiotaBuilder 1903ms: Files written to /home/runner/work/source-generator/source-generator/stage/go/go-sdk-enterprise-cloud/pkg/github +Debug: KiotaBuilder step 9 - writing files - took 00:00:01.9050300 +Information: KiotaBuilder loaded description from local source +Trace: KiotaBuilder 11ms: Read OpenAPI file /home/runner/work/source-generator/source-generator/schemas/ghec.json +Debug: KiotaBuilder step 10 - writing lock file - took 00:00:00.2532085 +Debug: KiotaBuilder Api manifest path: /home/runner/work/source-generator/source-generator/apimanifest.json diff --git a/pkg/github/advisories/advisories_request_builder.go b/pkg/github/advisories/advisories_request_builder.go new file mode 100644 index 0000000..ec8f89c --- /dev/null +++ b/pkg/github/advisories/advisories_request_builder.go @@ -0,0 +1,113 @@ +package advisories + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// AdvisoriesRequestBuilder builds and executes requests for operations under \advisories +type AdvisoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// AdvisoriesRequestBuilderGetQueryParameters lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." +type AdvisoriesRequestBuilderGetQueryParameters struct { + // If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.If the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.Example: `affects=package1,package2@1.0.0,package3@^2.0.0` or `affects[]=package1&affects[]=package2@1.0.0` + Affects *string `uriparametername:"affects"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned. + Cve_id *string `uriparametername:"cve_id"` + // If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.Example: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22` + Cwes *string `uriparametername:"cwes"` + // The direction to sort the results by. + Direction *GetDirectionQueryParameterType `uriparametername:"direction"` + // If specified, only advisories for these ecosystems will be returned. + Ecosystem *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecurityAdvisoryEcosystems `uriparametername:"ecosystem"` + // If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned. + Ghsa_id *string `uriparametername:"ghsa_id"` + // Whether to only return advisories that have been withdrawn. + Is_withdrawn *bool `uriparametername:"is_withdrawn"` + // If specified, only show advisories that were updated or published on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/enterprise-cloud@latest//search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + Modified *string `uriparametername:"modified"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // If specified, only return advisories that were published on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/enterprise-cloud@latest//search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + Published *string `uriparametername:"published"` + // If specified, only advisories with these severities will be returned. + Severity *GetSeverityQueryParameterType `uriparametername:"severity"` + // The property to sort the results by. + Sort *GetSortQueryParameterType `uriparametername:"sort"` + // If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware. + Type *GetTypeQueryParameterType `uriparametername:"type"` + // If specified, only return advisories that were updated on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/enterprise-cloud@latest//search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + Updated *string `uriparametername:"updated"` +} +// ByGhsa_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.advisories.item collection +// returns a *WithGhsa_ItemRequestBuilder when successful +func (m *AdvisoriesRequestBuilder) ByGhsa_id(ghsa_id string)(*WithGhsa_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ghsa_id != "" { + urlTplParams["ghsa_id"] = ghsa_id + } + return NewWithGhsa_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewAdvisoriesRequestBuilderInternal instantiates a new AdvisoriesRequestBuilder and sets the default values. +func NewAdvisoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AdvisoriesRequestBuilder) { + m := &AdvisoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", pathParameters), + } + return m +} +// NewAdvisoriesRequestBuilder instantiates a new AdvisoriesRequestBuilder and sets the default values. +func NewAdvisoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AdvisoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAdvisoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." +// returns a []GlobalAdvisoryable when successful +// returns a ValidationErrorSimple error when the service returns a 422 status code +// returns a BasicError error when the service returns a 429 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/global-advisories#list-global-security-advisories +func (m *AdvisoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[AdvisoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GlobalAdvisoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGlobalAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GlobalAdvisoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GlobalAdvisoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." +// returns a *RequestInformation when successful +func (m *AdvisoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[AdvisoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *AdvisoriesRequestBuilder when successful +func (m *AdvisoriesRequestBuilder) WithUrl(rawUrl string)(*AdvisoriesRequestBuilder) { + return NewAdvisoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/advisories/get_direction_query_parameter_type.go b/pkg/github/advisories/get_direction_query_parameter_type.go new file mode 100644 index 0000000..2f7b45b --- /dev/null +++ b/pkg/github/advisories/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package advisories +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/advisories/get_severity_query_parameter_type.go b/pkg/github/advisories/get_severity_query_parameter_type.go new file mode 100644 index 0000000..42a5152 --- /dev/null +++ b/pkg/github/advisories/get_severity_query_parameter_type.go @@ -0,0 +1,45 @@ +package advisories +import ( + "errors" +) +type GetSeverityQueryParameterType int + +const ( + UNKNOWN_GETSEVERITYQUERYPARAMETERTYPE GetSeverityQueryParameterType = iota + LOW_GETSEVERITYQUERYPARAMETERTYPE + MEDIUM_GETSEVERITYQUERYPARAMETERTYPE + HIGH_GETSEVERITYQUERYPARAMETERTYPE + CRITICAL_GETSEVERITYQUERYPARAMETERTYPE +) + +func (i GetSeverityQueryParameterType) String() string { + return []string{"unknown", "low", "medium", "high", "critical"}[i] +} +func ParseGetSeverityQueryParameterType(v string) (any, error) { + result := UNKNOWN_GETSEVERITYQUERYPARAMETERTYPE + switch v { + case "unknown": + result = UNKNOWN_GETSEVERITYQUERYPARAMETERTYPE + case "low": + result = LOW_GETSEVERITYQUERYPARAMETERTYPE + case "medium": + result = MEDIUM_GETSEVERITYQUERYPARAMETERTYPE + case "high": + result = HIGH_GETSEVERITYQUERYPARAMETERTYPE + case "critical": + result = CRITICAL_GETSEVERITYQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSeverityQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSeverityQueryParameterType(values []GetSeverityQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSeverityQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/advisories/get_sort_query_parameter_type.go b/pkg/github/advisories/get_sort_query_parameter_type.go new file mode 100644 index 0000000..d1b6602 --- /dev/null +++ b/pkg/github/advisories/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package advisories +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + UPDATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + PUBLISHED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"updated", "published"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := UPDATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "published": + result = PUBLISHED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/advisories/get_type_query_parameter_type.go b/pkg/github/advisories/get_type_query_parameter_type.go new file mode 100644 index 0000000..528f5a5 --- /dev/null +++ b/pkg/github/advisories/get_type_query_parameter_type.go @@ -0,0 +1,39 @@ +package advisories +import ( + "errors" +) +type GetTypeQueryParameterType int + +const ( + REVIEWED_GETTYPEQUERYPARAMETERTYPE GetTypeQueryParameterType = iota + MALWARE_GETTYPEQUERYPARAMETERTYPE + UNREVIEWED_GETTYPEQUERYPARAMETERTYPE +) + +func (i GetTypeQueryParameterType) String() string { + return []string{"reviewed", "malware", "unreviewed"}[i] +} +func ParseGetTypeQueryParameterType(v string) (any, error) { + result := REVIEWED_GETTYPEQUERYPARAMETERTYPE + switch v { + case "reviewed": + result = REVIEWED_GETTYPEQUERYPARAMETERTYPE + case "malware": + result = MALWARE_GETTYPEQUERYPARAMETERTYPE + case "unreviewed": + result = UNREVIEWED_GETTYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTypeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/advisories/with_ghsa_item_request_builder.go b/pkg/github/advisories/with_ghsa_item_request_builder.go new file mode 100644 index 0000000..ea10561 --- /dev/null +++ b/pkg/github/advisories/with_ghsa_item_request_builder.go @@ -0,0 +1,61 @@ +package advisories + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithGhsa_ItemRequestBuilder builds and executes requests for operations under \advisories\{ghsa_id} +type WithGhsa_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithGhsa_ItemRequestBuilderInternal instantiates a new WithGhsa_ItemRequestBuilder and sets the default values. +func NewWithGhsa_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithGhsa_ItemRequestBuilder) { + m := &WithGhsa_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/advisories/{ghsa_id}", pathParameters), + } + return m +} +// NewWithGhsa_ItemRequestBuilder instantiates a new WithGhsa_ItemRequestBuilder and sets the default values. +func NewWithGhsa_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithGhsa_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithGhsa_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. +// returns a GlobalAdvisoryable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/global-advisories#get-a-global-security-advisory +func (m *WithGhsa_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GlobalAdvisoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGlobalAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GlobalAdvisoryable), nil +} +// ToGetRequestInformation gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. +// returns a *RequestInformation when successful +func (m *WithGhsa_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithGhsa_ItemRequestBuilder when successful +func (m *WithGhsa_ItemRequestBuilder) WithUrl(rawUrl string)(*WithGhsa_ItemRequestBuilder) { + return NewWithGhsa_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/api_client.go b/pkg/github/api_client.go new file mode 100644 index 0000000..5584fc6 --- /dev/null +++ b/pkg/github/api_client.go @@ -0,0 +1,284 @@ +package github + +import ( + "context" + i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488 "github.com/microsoft/kiota-serialization-json-go" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347 "github.com/microsoft/kiota-serialization-form-go" + i56887720f41ac882814261620b1c8459c4a992a0207af547c4453dd39fabc426 "github.com/microsoft/kiota-serialization-multipart-go" + i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83 "github.com/microsoft/kiota-serialization-text-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i0e5325290c7e23cc5414cfd9f36afcd9381c4c829b153c16d3602d8a09a76097 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/assignments" + i16880d3d9bd87a455cb21c63b579f516725525172d4ed43e76c1dcaac227fccb "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/applications" + i1d5a943e46ca4f66cd96631b86159e0ef2457fcd852b66dacdb3c858df33182f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/octocat" + i1e25f49239426bd2e69db174edad2b458de62223f6832633c4998e12a9822fd0 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user" + i1e3443d9c5c69a04268b19683e154a6bbfd9a9d5686c4991f80bac8da6456e47 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/markdown" + i1eb6a2fb0597aa7d41d07a09a94d44536dcc47a43c6ef4a1a956d1da25922e34 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/feeds" + i254b88d85fa7ce5a32692c895c370345be9a48bb510e34140ed0c8bd2d58e9ea "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/issues" + i2f58036685f6c1f423db5a62a4598667c8697cf896e332d260bbb3401974d900 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/organizations" + i301f9521617e10f16fb5803f8394b4a480faef6d52fba9b682e61ff12e94fe8f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/codes_of_conduct" + i4529ca8f37d8f2b18d8f9373b5cd997766265c2303aac50efff298d9d09ced95 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/appmanifests" + i46fa65f2fec1c7d8df8b30be6e00b3463d79c7958500cb3d5f9d302af25efc73 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/licenses" + i5c334645ff8e9a239fc143c168dbd2092f4e549380d4efbf777031dde1cda9df "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/enterprises" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i66dcdb7ca1167d24b7d506e0bbd1c8498fe9d30e0e57362b58349dd6372d006b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/installation" + i66f747cc7e39f2550b27f76f1deff6b4eb7ef9fe9508531a28f5daa16f21bd0c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos" + i6bf3c616c968bb26cf2a84862431cdac244fdb101616c891cb1ffe3bb76bb2e5 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/emojis" + i7a2ac49b9b6f48e07dbfe8e254384c6396f35f44d01fec4711a22ac9a846ab3b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/scim" + i7d8b5c61b014f2f88333c6c173317637dad387c73a9c94ad43a7dade0b698a94 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/gitignore" + i8269710af64afe801d4aaf314420eb5a9431ca6c92099cba46ab7d619772625a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/apps" + i8b33911a23a371a3dd3402d12b368b9c76c3ed37d700eadf51c8f1dd2562fe36 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/events" + i8c3efe8d3f9bba02f3585224c19bc147b1c29223805959ad6e1883c376334208 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repositories" + i90003368361fb7e2691b82c9f74809cb3242042523904b39d0f52be6ba92cd7d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/gists" + i99d59e0a5895ad617ab4b55390645d2cf8383766f4f778a81418377d4d39beed "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/networks" + ia5bb264fddfde83ccb9d99948319a2698ced77553c1949540db583fa7308e6af "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/notifications" + ia6c97dde936cb5002ff38a8156751d4474a56efe1498de27839265eb17c35e08 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/advisories" + ia78ddb5870800bf7cef21851ecf22ff5e1dd993fd9fd4ad35d61f54673b524e8 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/teams" + iabe36f6f42302b9f7d51550f4ff0b71c3bd55f8a80a38c0b53c57cd5cc5b72d8 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/marketplace_listing" + iace6d2df5b046b2621ed8938a2a7fb06adee52ac123cbb2c016a2118a97499d8 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/meta" + iad80f7bb8538b815146b487f10b1d16c4e083c86d3018f0a8f7382b939f4e634 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/zen" + ic8f695ba1188395d15025a672763a6fdf96121c1a19790a0cbc49f0422e9b21f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/classrooms" + icf6d9662ff8797fed51869213f4ae097e019afa5b10437df7f2be842bafb7983 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/enterpriseinstallation" + id8aedfc95cc545f984105f50cf0ac5fdd0d8e5ab227e4a886d53228f435f8aca "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs" + ie3b347c690ae9117f3a4da4f0e042e20664ce00896fa0a94cdd22b3a98748b55 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/users" + ie4198ced272c261cf44838663bf9483c5a9a9df8fe18cc7420e64a31cd4f7bf8 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/rate_limit" + iee46eecc378acacb4378b35f14d2d75f182b1e9ad75681c6ca7ba5a8e05c3fef "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/projects" + iee5528fa1e80ae7995219d33e93e20141e576831230b8e485aa5202568338b41 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/app" + if21e1a09c882b708cc2897e803a9731133fa5a954e4da837faea5a6611051822 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search" + ifc535ad0dacf3b171683de34966458c4e8276e5eb0e62ac8f374245a8faad8f8 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/versions" +) + +// ApiClient the main entry point of the SDK, exposes the configuration and the fluent API. +type ApiClient struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Advisories the advisories property +// returns a *AdvisoriesRequestBuilder when successful +func (m *ApiClient) Advisories()(*ia6c97dde936cb5002ff38a8156751d4474a56efe1498de27839265eb17c35e08.AdvisoriesRequestBuilder) { + return ia6c97dde936cb5002ff38a8156751d4474a56efe1498de27839265eb17c35e08.NewAdvisoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// App the app property +// returns a *AppRequestBuilder when successful +func (m *ApiClient) App()(*iee5528fa1e80ae7995219d33e93e20141e576831230b8e485aa5202568338b41.AppRequestBuilder) { + return iee5528fa1e80ae7995219d33e93e20141e576831230b8e485aa5202568338b41.NewAppRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Applications the applications property +// returns a *ApplicationsRequestBuilder when successful +func (m *ApiClient) Applications()(*i16880d3d9bd87a455cb21c63b579f516725525172d4ed43e76c1dcaac227fccb.ApplicationsRequestBuilder) { + return i16880d3d9bd87a455cb21c63b579f516725525172d4ed43e76c1dcaac227fccb.NewApplicationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AppManifests the appManifests property +// returns a *AppManifestsRequestBuilder when successful +func (m *ApiClient) AppManifests()(*i4529ca8f37d8f2b18d8f9373b5cd997766265c2303aac50efff298d9d09ced95.AppManifestsRequestBuilder) { + return i4529ca8f37d8f2b18d8f9373b5cd997766265c2303aac50efff298d9d09ced95.NewAppManifestsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Apps the apps property +// returns a *AppsRequestBuilder when successful +func (m *ApiClient) Apps()(*i8269710af64afe801d4aaf314420eb5a9431ca6c92099cba46ab7d619772625a.AppsRequestBuilder) { + return i8269710af64afe801d4aaf314420eb5a9431ca6c92099cba46ab7d619772625a.NewAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Assignments the assignments property +// returns a *AssignmentsRequestBuilder when successful +func (m *ApiClient) Assignments()(*i0e5325290c7e23cc5414cfd9f36afcd9381c4c829b153c16d3602d8a09a76097.AssignmentsRequestBuilder) { + return i0e5325290c7e23cc5414cfd9f36afcd9381c4c829b153c16d3602d8a09a76097.NewAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Classrooms the classrooms property +// returns a *ClassroomsRequestBuilder when successful +func (m *ApiClient) Classrooms()(*ic8f695ba1188395d15025a672763a6fdf96121c1a19790a0cbc49f0422e9b21f.ClassroomsRequestBuilder) { + return ic8f695ba1188395d15025a672763a6fdf96121c1a19790a0cbc49f0422e9b21f.NewClassroomsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codes_of_conduct the codes_of_conduct property +// returns a *Codes_of_conductRequestBuilder when successful +func (m *ApiClient) Codes_of_conduct()(*i301f9521617e10f16fb5803f8394b4a480faef6d52fba9b682e61ff12e94fe8f.Codes_of_conductRequestBuilder) { + return i301f9521617e10f16fb5803f8394b4a480faef6d52fba9b682e61ff12e94fe8f.NewCodes_of_conductRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewApiClient instantiates a new ApiClient and sets the default values. +func NewApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ApiClient) { + m := &ApiClient{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}", map[string]string{}), + } + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488.NewJsonSerializationWriterFactory() }) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83.NewTextSerializationWriterFactory() }) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347.NewFormSerializationWriterFactory() }) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i56887720f41ac882814261620b1c8459c4a992a0207af547c4453dd39fabc426.NewMultipartSerializationWriterFactory() }) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488.NewJsonParseNodeFactory() }) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83.NewTextParseNodeFactory() }) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347.NewFormParseNodeFactory() }) + if m.BaseRequestBuilder.RequestAdapter.GetBaseUrl() == "" { + m.BaseRequestBuilder.RequestAdapter.SetBaseUrl("https://api.github.com") + } + m.BaseRequestBuilder.PathParameters["baseurl"] = m.BaseRequestBuilder.RequestAdapter.GetBaseUrl() + return m +} +// Emojis the emojis property +// returns a *EmojisRequestBuilder when successful +func (m *ApiClient) Emojis()(*i6bf3c616c968bb26cf2a84862431cdac244fdb101616c891cb1ffe3bb76bb2e5.EmojisRequestBuilder) { + return i6bf3c616c968bb26cf2a84862431cdac244fdb101616c891cb1ffe3bb76bb2e5.NewEmojisRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// EnterpriseInstallation the enterpriseInstallation property +// returns a *EnterpriseInstallationRequestBuilder when successful +func (m *ApiClient) EnterpriseInstallation()(*icf6d9662ff8797fed51869213f4ae097e019afa5b10437df7f2be842bafb7983.EnterpriseInstallationRequestBuilder) { + return icf6d9662ff8797fed51869213f4ae097e019afa5b10437df7f2be842bafb7983.NewEnterpriseInstallationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Enterprises the enterprises property +// returns a *EnterprisesRequestBuilder when successful +func (m *ApiClient) Enterprises()(*i5c334645ff8e9a239fc143c168dbd2092f4e549380d4efbf777031dde1cda9df.EnterprisesRequestBuilder) { + return i5c334645ff8e9a239fc143c168dbd2092f4e549380d4efbf777031dde1cda9df.NewEnterprisesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Events the events property +// returns a *EventsRequestBuilder when successful +func (m *ApiClient) Events()(*i8b33911a23a371a3dd3402d12b368b9c76c3ed37d700eadf51c8f1dd2562fe36.EventsRequestBuilder) { + return i8b33911a23a371a3dd3402d12b368b9c76c3ed37d700eadf51c8f1dd2562fe36.NewEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Feeds the feeds property +// returns a *FeedsRequestBuilder when successful +func (m *ApiClient) Feeds()(*i1eb6a2fb0597aa7d41d07a09a94d44536dcc47a43c6ef4a1a956d1da25922e34.FeedsRequestBuilder) { + return i1eb6a2fb0597aa7d41d07a09a94d44536dcc47a43c6ef4a1a956d1da25922e34.NewFeedsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get Hypermedia links to resources accessible in GitHub's REST API +// returns a Rootable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/meta/meta#github-api-root +func (m *ApiClient) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Rootable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRootFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Rootable), nil +} +// Gists the gists property +// returns a *GistsRequestBuilder when successful +func (m *ApiClient) Gists()(*i90003368361fb7e2691b82c9f74809cb3242042523904b39d0f52be6ba92cd7d.GistsRequestBuilder) { + return i90003368361fb7e2691b82c9f74809cb3242042523904b39d0f52be6ba92cd7d.NewGistsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Gitignore the gitignore property +// returns a *GitignoreRequestBuilder when successful +func (m *ApiClient) Gitignore()(*i7d8b5c61b014f2f88333c6c173317637dad387c73a9c94ad43a7dade0b698a94.GitignoreRequestBuilder) { + return i7d8b5c61b014f2f88333c6c173317637dad387c73a9c94ad43a7dade0b698a94.NewGitignoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installation the installation property +// returns a *InstallationRequestBuilder when successful +func (m *ApiClient) Installation()(*i66dcdb7ca1167d24b7d506e0bbd1c8498fe9d30e0e57362b58349dd6372d006b.InstallationRequestBuilder) { + return i66dcdb7ca1167d24b7d506e0bbd1c8498fe9d30e0e57362b58349dd6372d006b.NewInstallationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Issues the issues property +// returns a *IssuesRequestBuilder when successful +func (m *ApiClient) Issues()(*i254b88d85fa7ce5a32692c895c370345be9a48bb510e34140ed0c8bd2d58e9ea.IssuesRequestBuilder) { + return i254b88d85fa7ce5a32692c895c370345be9a48bb510e34140ed0c8bd2d58e9ea.NewIssuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Licenses the licenses property +// returns a *LicensesRequestBuilder when successful +func (m *ApiClient) Licenses()(*i46fa65f2fec1c7d8df8b30be6e00b3463d79c7958500cb3d5f9d302af25efc73.LicensesRequestBuilder) { + return i46fa65f2fec1c7d8df8b30be6e00b3463d79c7958500cb3d5f9d302af25efc73.NewLicensesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Markdown the markdown property +// returns a *MarkdownRequestBuilder when successful +func (m *ApiClient) Markdown()(*i1e3443d9c5c69a04268b19683e154a6bbfd9a9d5686c4991f80bac8da6456e47.MarkdownRequestBuilder) { + return i1e3443d9c5c69a04268b19683e154a6bbfd9a9d5686c4991f80bac8da6456e47.NewMarkdownRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Marketplace_listing the marketplace_listing property +// returns a *Marketplace_listingRequestBuilder when successful +func (m *ApiClient) Marketplace_listing()(*iabe36f6f42302b9f7d51550f4ff0b71c3bd55f8a80a38c0b53c57cd5cc5b72d8.Marketplace_listingRequestBuilder) { + return iabe36f6f42302b9f7d51550f4ff0b71c3bd55f8a80a38c0b53c57cd5cc5b72d8.NewMarketplace_listingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Meta the meta property +// returns a *MetaRequestBuilder when successful +func (m *ApiClient) Meta()(*iace6d2df5b046b2621ed8938a2a7fb06adee52ac123cbb2c016a2118a97499d8.MetaRequestBuilder) { + return iace6d2df5b046b2621ed8938a2a7fb06adee52ac123cbb2c016a2118a97499d8.NewMetaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Networks the networks property +// returns a *NetworksRequestBuilder when successful +func (m *ApiClient) Networks()(*i99d59e0a5895ad617ab4b55390645d2cf8383766f4f778a81418377d4d39beed.NetworksRequestBuilder) { + return i99d59e0a5895ad617ab4b55390645d2cf8383766f4f778a81418377d4d39beed.NewNetworksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Notifications the notifications property +// returns a *NotificationsRequestBuilder when successful +func (m *ApiClient) Notifications()(*ia5bb264fddfde83ccb9d99948319a2698ced77553c1949540db583fa7308e6af.NotificationsRequestBuilder) { + return ia5bb264fddfde83ccb9d99948319a2698ced77553c1949540db583fa7308e6af.NewNotificationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Octocat the octocat property +// returns a *OctocatRequestBuilder when successful +func (m *ApiClient) Octocat()(*i1d5a943e46ca4f66cd96631b86159e0ef2457fcd852b66dacdb3c858df33182f.OctocatRequestBuilder) { + return i1d5a943e46ca4f66cd96631b86159e0ef2457fcd852b66dacdb3c858df33182f.NewOctocatRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Organizations the organizations property +// returns a *OrganizationsRequestBuilder when successful +func (m *ApiClient) Organizations()(*i2f58036685f6c1f423db5a62a4598667c8697cf896e332d260bbb3401974d900.OrganizationsRequestBuilder) { + return i2f58036685f6c1f423db5a62a4598667c8697cf896e332d260bbb3401974d900.NewOrganizationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Orgs the orgs property +// returns a *OrgsRequestBuilder when successful +func (m *ApiClient) Orgs()(*id8aedfc95cc545f984105f50cf0ac5fdd0d8e5ab227e4a886d53228f435f8aca.OrgsRequestBuilder) { + return id8aedfc95cc545f984105f50cf0ac5fdd0d8e5ab227e4a886d53228f435f8aca.NewOrgsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Projects the projects property +// returns a *ProjectsRequestBuilder when successful +func (m *ApiClient) Projects()(*iee46eecc378acacb4378b35f14d2d75f182b1e9ad75681c6ca7ba5a8e05c3fef.ProjectsRequestBuilder) { + return iee46eecc378acacb4378b35f14d2d75f182b1e9ad75681c6ca7ba5a8e05c3fef.NewProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rate_limit the rate_limit property +// returns a *Rate_limitRequestBuilder when successful +func (m *ApiClient) Rate_limit()(*ie4198ced272c261cf44838663bf9483c5a9a9df8fe18cc7420e64a31cd4f7bf8.Rate_limitRequestBuilder) { + return ie4198ced272c261cf44838663bf9483c5a9a9df8fe18cc7420e64a31cd4f7bf8.NewRate_limitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repos the repos property +// returns a *ReposRequestBuilder when successful +func (m *ApiClient) Repos()(*i66f747cc7e39f2550b27f76f1deff6b4eb7ef9fe9508531a28f5daa16f21bd0c.ReposRequestBuilder) { + return i66f747cc7e39f2550b27f76f1deff6b4eb7ef9fe9508531a28f5daa16f21bd0c.NewReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repositories the repositories property +// returns a *RepositoriesRequestBuilder when successful +func (m *ApiClient) Repositories()(*i8c3efe8d3f9bba02f3585224c19bc147b1c29223805959ad6e1883c376334208.RepositoriesRequestBuilder) { + return i8c3efe8d3f9bba02f3585224c19bc147b1c29223805959ad6e1883c376334208.NewRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Scim the scim property +// returns a *ScimRequestBuilder when successful +func (m *ApiClient) Scim()(*i7a2ac49b9b6f48e07dbfe8e254384c6396f35f44d01fec4711a22ac9a846ab3b.ScimRequestBuilder) { + return i7a2ac49b9b6f48e07dbfe8e254384c6396f35f44d01fec4711a22ac9a846ab3b.NewScimRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Search the search property +// returns a *SearchRequestBuilder when successful +func (m *ApiClient) Search()(*if21e1a09c882b708cc2897e803a9731133fa5a954e4da837faea5a6611051822.SearchRequestBuilder) { + return if21e1a09c882b708cc2897e803a9731133fa5a954e4da837faea5a6611051822.NewSearchRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +// returns a *TeamsRequestBuilder when successful +func (m *ApiClient) Teams()(*ia78ddb5870800bf7cef21851ecf22ff5e1dd993fd9fd4ad35d61f54673b524e8.TeamsRequestBuilder) { + return ia78ddb5870800bf7cef21851ecf22ff5e1dd993fd9fd4ad35d61f54673b524e8.NewTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation get Hypermedia links to resources accessible in GitHub's REST API +// returns a *RequestInformation when successful +func (m *ApiClient) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// User the user property +// returns a *UserRequestBuilder when successful +func (m *ApiClient) User()(*i1e25f49239426bd2e69db174edad2b458de62223f6832633c4998e12a9822fd0.UserRequestBuilder) { + return i1e25f49239426bd2e69db174edad2b458de62223f6832633c4998e12a9822fd0.NewUserRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Users the users property +// returns a *UsersRequestBuilder when successful +func (m *ApiClient) Users()(*ie3b347c690ae9117f3a4da4f0e042e20664ce00896fa0a94cdd22b3a98748b55.UsersRequestBuilder) { + return ie3b347c690ae9117f3a4da4f0e042e20664ce00896fa0a94cdd22b3a98748b55.NewUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Versions the versions property +// returns a *VersionsRequestBuilder when successful +func (m *ApiClient) Versions()(*ifc535ad0dacf3b171683de34966458c4e8276e5eb0e62ac8f374245a8faad8f8.VersionsRequestBuilder) { + return ifc535ad0dacf3b171683de34966458c4e8276e5eb0e62ac8f374245a8faad8f8.NewVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Zen the zen property +// returns a *ZenRequestBuilder when successful +func (m *ApiClient) Zen()(*iad80f7bb8538b815146b487f10b1d16c4e083c86d3018f0a8f7382b939f4e634.ZenRequestBuilder) { + return iad80f7bb8538b815146b487f10b1d16c4e083c86d3018f0a8f7382b939f4e634.NewZenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/app/app_request_builder.go b/pkg/github/app/app_request_builder.go new file mode 100644 index 0000000..135a0a1 --- /dev/null +++ b/pkg/github/app/app_request_builder.go @@ -0,0 +1,72 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// AppRequestBuilder builds and executes requests for operations under \app +type AppRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewAppRequestBuilderInternal instantiates a new AppRequestBuilder and sets the default values. +func NewAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AppRequestBuilder) { + m := &AppRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app", pathParameters), + } + return m +} +// NewAppRequestBuilder instantiates a new AppRequestBuilder and sets the default values. +func NewAppRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AppRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAppRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a Integrationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-the-authenticated-app +func (m *AppRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable), nil +} +// Hook the hook property +// returns a *HookRequestBuilder when successful +func (m *AppRequestBuilder) Hook()(*HookRequestBuilder) { + return NewHookRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// InstallationRequests the installationRequests property +// returns a *InstallationRequestsRequestBuilder when successful +func (m *AppRequestBuilder) InstallationRequests()(*InstallationRequestsRequestBuilder) { + return NewInstallationRequestsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installations the installations property +// returns a *InstallationsRequestBuilder when successful +func (m *AppRequestBuilder) Installations()(*InstallationsRequestBuilder) { + return NewInstallationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *AppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *AppRequestBuilder when successful +func (m *AppRequestBuilder) WithUrl(rawUrl string)(*AppRequestBuilder) { + return NewAppRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/hook_config_patch_request_body.go b/pkg/github/app/hook_config_patch_request_body.go new file mode 100644 index 0000000..725b058 --- /dev/null +++ b/pkg/github/app/hook_config_patch_request_body.go @@ -0,0 +1,168 @@ +package app + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type HookConfigPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string +} +// NewHookConfigPatchRequestBody instantiates a new HookConfigPatchRequestBody and sets the default values. +func NewHookConfigPatchRequestBody()(*HookConfigPatchRequestBody) { + m := &HookConfigPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookConfigPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookConfigPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookConfigPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookConfigPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *HookConfigPatchRequestBody) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookConfigPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *HookConfigPatchRequestBody) GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *HookConfigPatchRequestBody) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *HookConfigPatchRequestBody) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *HookConfigPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookConfigPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *HookConfigPatchRequestBody) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *HookConfigPatchRequestBody) SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *HookConfigPatchRequestBody) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *HookConfigPatchRequestBody) SetUrl(value *string)() { + m.url = value +} +type HookConfigPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/app/hook_config_request_builder.go b/pkg/github/app/hook_config_request_builder.go new file mode 100644 index 0000000..5ccd1a1 --- /dev/null +++ b/pkg/github/app/hook_config_request_builder.go @@ -0,0 +1,88 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// HookConfigRequestBuilder builds and executes requests for operations under \app\hook\config +type HookConfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewHookConfigRequestBuilderInternal instantiates a new HookConfigRequestBuilder and sets the default values. +func NewHookConfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookConfigRequestBuilder) { + m := &HookConfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook/config", pathParameters), + } + return m +} +// NewHookConfigRequestBuilder instantiates a new HookConfigRequestBuilder and sets the default values. +func NewHookConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookConfigRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewHookConfigRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a WebhookConfigable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/webhooks#get-a-webhook-configuration-for-an-app +func (m *HookConfigRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable), nil +} +// Patch updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a WebhookConfigable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/webhooks#update-a-webhook-configuration-for-an-app +func (m *HookConfigRequestBuilder) Patch(ctx context.Context, body HookConfigPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable), nil +} +// ToGetRequestInformation returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *HookConfigRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *HookConfigRequestBuilder) ToPatchRequestInformation(ctx context.Context, body HookConfigPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *HookConfigRequestBuilder when successful +func (m *HookConfigRequestBuilder) WithUrl(rawUrl string)(*HookConfigRequestBuilder) { + return NewHookConfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/hook_deliveries_item_attempts_post_response.go b/pkg/github/app/hook_deliveries_item_attempts_post_response.go new file mode 100644 index 0000000..8ca2fc5 --- /dev/null +++ b/pkg/github/app/hook_deliveries_item_attempts_post_response.go @@ -0,0 +1,51 @@ +package app + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type HookDeliveriesItemAttemptsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewHookDeliveriesItemAttemptsPostResponse instantiates a new HookDeliveriesItemAttemptsPostResponse and sets the default values. +func NewHookDeliveriesItemAttemptsPostResponse()(*HookDeliveriesItemAttemptsPostResponse) { + m := &HookDeliveriesItemAttemptsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDeliveriesItemAttemptsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDeliveriesItemAttemptsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDeliveriesItemAttemptsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDeliveriesItemAttemptsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDeliveriesItemAttemptsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *HookDeliveriesItemAttemptsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookDeliveriesItemAttemptsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type HookDeliveriesItemAttemptsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/app/hook_deliveries_item_attempts_request_builder.go b/pkg/github/app/hook_deliveries_item_attempts_request_builder.go new file mode 100644 index 0000000..b00641c --- /dev/null +++ b/pkg/github/app/hook_deliveries_item_attempts_request_builder.go @@ -0,0 +1,63 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// HookDeliveriesItemAttemptsRequestBuilder builds and executes requests for operations under \app\hook\deliveries\{delivery_id}\attempts +type HookDeliveriesItemAttemptsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewHookDeliveriesItemAttemptsRequestBuilderInternal instantiates a new HookDeliveriesItemAttemptsRequestBuilder and sets the default values. +func NewHookDeliveriesItemAttemptsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesItemAttemptsRequestBuilder) { + m := &HookDeliveriesItemAttemptsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook/deliveries/{delivery_id}/attempts", pathParameters), + } + return m +} +// NewHookDeliveriesItemAttemptsRequestBuilder instantiates a new HookDeliveriesItemAttemptsRequestBuilder and sets the default values. +func NewHookDeliveriesItemAttemptsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesItemAttemptsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewHookDeliveriesItemAttemptsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post redeliver a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a HookDeliveriesItemAttemptsPostResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/webhooks#redeliver-a-delivery-for-an-app-webhook +func (m *HookDeliveriesItemAttemptsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(HookDeliveriesItemAttemptsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateHookDeliveriesItemAttemptsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(HookDeliveriesItemAttemptsPostResponseable), nil +} +// ToPostRequestInformation redeliver a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *HookDeliveriesItemAttemptsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *HookDeliveriesItemAttemptsRequestBuilder when successful +func (m *HookDeliveriesItemAttemptsRequestBuilder) WithUrl(rawUrl string)(*HookDeliveriesItemAttemptsRequestBuilder) { + return NewHookDeliveriesItemAttemptsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/hook_deliveries_request_builder.go b/pkg/github/app/hook_deliveries_request_builder.go new file mode 100644 index 0000000..9ad17af --- /dev/null +++ b/pkg/github/app/hook_deliveries_request_builder.go @@ -0,0 +1,85 @@ +package app + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// HookDeliveriesRequestBuilder builds and executes requests for operations under \app\hook\deliveries +type HookDeliveriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// HookDeliveriesRequestBuilderGetQueryParameters returns a list of webhook deliveries for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +type HookDeliveriesRequestBuilderGetQueryParameters struct { + // Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. + Cursor *string `uriparametername:"cursor"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + Redelivery *bool `uriparametername:"redelivery"` +} +// ByDelivery_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.app.hook.deliveries.item collection +// returns a *HookDeliveriesWithDelivery_ItemRequestBuilder when successful +func (m *HookDeliveriesRequestBuilder) ByDelivery_id(delivery_id int32)(*HookDeliveriesWithDelivery_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["delivery_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(delivery_id), 10) + return NewHookDeliveriesWithDelivery_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewHookDeliveriesRequestBuilderInternal instantiates a new HookDeliveriesRequestBuilder and sets the default values. +func NewHookDeliveriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesRequestBuilder) { + m := &HookDeliveriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*,redelivery*}", pathParameters), + } + return m +} +// NewHookDeliveriesRequestBuilder instantiates a new HookDeliveriesRequestBuilder and sets the default values. +func NewHookDeliveriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewHookDeliveriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a list of webhook deliveries for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a []HookDeliveryItemable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/webhooks#list-deliveries-for-an-app-webhook +func (m *HookDeliveriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[HookDeliveriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookDeliveryItemFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable) + } + } + return val, nil +} +// ToGetRequestInformation returns a list of webhook deliveries for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *HookDeliveriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[HookDeliveriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *HookDeliveriesRequestBuilder when successful +func (m *HookDeliveriesRequestBuilder) WithUrl(rawUrl string)(*HookDeliveriesRequestBuilder) { + return NewHookDeliveriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/hook_deliveries_with_delivery_item_request_builder.go b/pkg/github/app/hook_deliveries_with_delivery_item_request_builder.go new file mode 100644 index 0000000..6f747a4 --- /dev/null +++ b/pkg/github/app/hook_deliveries_with_delivery_item_request_builder.go @@ -0,0 +1,68 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// HookDeliveriesWithDelivery_ItemRequestBuilder builds and executes requests for operations under \app\hook\deliveries\{delivery_id} +type HookDeliveriesWithDelivery_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Attempts the attempts property +// returns a *HookDeliveriesItemAttemptsRequestBuilder when successful +func (m *HookDeliveriesWithDelivery_ItemRequestBuilder) Attempts()(*HookDeliveriesItemAttemptsRequestBuilder) { + return NewHookDeliveriesItemAttemptsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewHookDeliveriesWithDelivery_ItemRequestBuilderInternal instantiates a new HookDeliveriesWithDelivery_ItemRequestBuilder and sets the default values. +func NewHookDeliveriesWithDelivery_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesWithDelivery_ItemRequestBuilder) { + m := &HookDeliveriesWithDelivery_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook/deliveries/{delivery_id}", pathParameters), + } + return m +} +// NewHookDeliveriesWithDelivery_ItemRequestBuilder instantiates a new HookDeliveriesWithDelivery_ItemRequestBuilder and sets the default values. +func NewHookDeliveriesWithDelivery_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesWithDelivery_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewHookDeliveriesWithDelivery_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a HookDeliveryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/webhooks#get-a-delivery-for-an-app-webhook +func (m *HookDeliveriesWithDelivery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookDeliveryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryable), nil +} +// ToGetRequestInformation returns a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *HookDeliveriesWithDelivery_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *HookDeliveriesWithDelivery_ItemRequestBuilder when successful +func (m *HookDeliveriesWithDelivery_ItemRequestBuilder) WithUrl(rawUrl string)(*HookDeliveriesWithDelivery_ItemRequestBuilder) { + return NewHookDeliveriesWithDelivery_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/hook_request_builder.go b/pkg/github/app/hook_request_builder.go new file mode 100644 index 0000000..60ac8c4 --- /dev/null +++ b/pkg/github/app/hook_request_builder.go @@ -0,0 +1,33 @@ +package app + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// HookRequestBuilder builds and executes requests for operations under \app\hook +type HookRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Config the config property +// returns a *HookConfigRequestBuilder when successful +func (m *HookRequestBuilder) Config()(*HookConfigRequestBuilder) { + return NewHookConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewHookRequestBuilderInternal instantiates a new HookRequestBuilder and sets the default values. +func NewHookRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookRequestBuilder) { + m := &HookRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook", pathParameters), + } + return m +} +// NewHookRequestBuilder instantiates a new HookRequestBuilder and sets the default values. +func NewHookRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewHookRequestBuilderInternal(urlParams, requestAdapter) +} +// Deliveries the deliveries property +// returns a *HookDeliveriesRequestBuilder when successful +func (m *HookRequestBuilder) Deliveries()(*HookDeliveriesRequestBuilder) { + return NewHookDeliveriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/app/installation_requests_request_builder.go b/pkg/github/app/installation_requests_request_builder.go new file mode 100644 index 0000000..de6e858 --- /dev/null +++ b/pkg/github/app/installation_requests_request_builder.go @@ -0,0 +1,71 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationRequestsRequestBuilder builds and executes requests for operations under \app\installation-requests +type InstallationRequestsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// InstallationRequestsRequestBuilderGetQueryParameters lists all the pending installation requests for the authenticated GitHub App. +type InstallationRequestsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewInstallationRequestsRequestBuilderInternal instantiates a new InstallationRequestsRequestBuilder and sets the default values. +func NewInstallationRequestsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationRequestsRequestBuilder) { + m := &InstallationRequestsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/installation-requests{?page*,per_page*}", pathParameters), + } + return m +} +// NewInstallationRequestsRequestBuilder instantiates a new InstallationRequestsRequestBuilder and sets the default values. +func NewInstallationRequestsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationRequestsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationRequestsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all the pending installation requests for the authenticated GitHub App. +// returns a []IntegrationInstallationRequestable when successful +// returns a BasicError error when the service returns a 401 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#list-installation-requests-for-the-authenticated-app +func (m *InstallationRequestsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationRequestsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IntegrationInstallationRequestable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationInstallationRequestFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IntegrationInstallationRequestable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IntegrationInstallationRequestable) + } + } + return val, nil +} +// ToGetRequestInformation lists all the pending installation requests for the authenticated GitHub App. +// returns a *RequestInformation when successful +func (m *InstallationRequestsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationRequestsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationRequestsRequestBuilder when successful +func (m *InstallationRequestsRequestBuilder) WithUrl(rawUrl string)(*InstallationRequestsRequestBuilder) { + return NewInstallationRequestsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/installations_item_access_tokens_post_request_body.go b/pkg/github/app/installations_item_access_tokens_post_request_body.go new file mode 100644 index 0000000..8e36e21 --- /dev/null +++ b/pkg/github/app/installations_item_access_tokens_post_request_body.go @@ -0,0 +1,151 @@ +package app + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type InstallationsItemAccess_tokensPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions granted to the user access token. + permissions i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable + // List of repository names that the token should have access to + repositories []string + // List of repository IDs that the token should have access to + repository_ids []int32 +} +// NewInstallationsItemAccess_tokensPostRequestBody instantiates a new InstallationsItemAccess_tokensPostRequestBody and sets the default values. +func NewInstallationsItemAccess_tokensPostRequestBody()(*InstallationsItemAccess_tokensPostRequestBody) { + m := &InstallationsItemAccess_tokensPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInstallationsItemAccess_tokensPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstallationsItemAccess_tokensPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstallationsItemAccess_tokensPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *InstallationsItemAccess_tokensPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *InstallationsItemAccess_tokensPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAppPermissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable)) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetRepositoryIds(res) + } + return nil + } + return res +} +// GetPermissions gets the permissions property value. The permissions granted to the user access token. +// returns a AppPermissionsable when successful +func (m *InstallationsItemAccess_tokensPostRequestBody) GetPermissions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable) { + return m.permissions +} +// GetRepositories gets the repositories property value. List of repository names that the token should have access to +// returns a []string when successful +func (m *InstallationsItemAccess_tokensPostRequestBody) GetRepositories()([]string) { + return m.repositories +} +// GetRepositoryIds gets the repository_ids property value. List of repository IDs that the token should have access to +// returns a []int32 when successful +func (m *InstallationsItemAccess_tokensPostRequestBody) GetRepositoryIds()([]int32) { + return m.repository_ids +} +// Serialize serializes information the current object +func (m *InstallationsItemAccess_tokensPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + err := writer.WriteCollectionOfStringValues("repositories", m.GetRepositories()) + if err != nil { + return err + } + } + if m.GetRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("repository_ids", m.GetRepositoryIds()) + 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 *InstallationsItemAccess_tokensPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPermissions sets the permissions property value. The permissions granted to the user access token. +func (m *InstallationsItemAccess_tokensPostRequestBody) SetPermissions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable)() { + m.permissions = value +} +// SetRepositories sets the repositories property value. List of repository names that the token should have access to +func (m *InstallationsItemAccess_tokensPostRequestBody) SetRepositories(value []string)() { + m.repositories = value +} +// SetRepositoryIds sets the repository_ids property value. List of repository IDs that the token should have access to +func (m *InstallationsItemAccess_tokensPostRequestBody) SetRepositoryIds(value []int32)() { + m.repository_ids = value +} +type InstallationsItemAccess_tokensPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPermissions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable) + GetRepositories()([]string) + GetRepositoryIds()([]int32) + SetPermissions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable)() + SetRepositories(value []string)() + SetRepositoryIds(value []int32)() +} diff --git a/pkg/github/app/installations_item_access_tokens_request_builder.go b/pkg/github/app/installations_item_access_tokens_request_builder.go new file mode 100644 index 0000000..c2d75ae --- /dev/null +++ b/pkg/github/app/installations_item_access_tokens_request_builder.go @@ -0,0 +1,71 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsItemAccess_tokensRequestBuilder builds and executes requests for operations under \app\installations\{installation_id}\access_tokens +type InstallationsItemAccess_tokensRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewInstallationsItemAccess_tokensRequestBuilderInternal instantiates a new InstallationsItemAccess_tokensRequestBuilder and sets the default values. +func NewInstallationsItemAccess_tokensRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemAccess_tokensRequestBuilder) { + m := &InstallationsItemAccess_tokensRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/installations/{installation_id}/access_tokens", pathParameters), + } + return m +} +// NewInstallationsItemAccess_tokensRequestBuilder instantiates a new InstallationsItemAccess_tokensRequestBuilder and sets the default values. +func NewInstallationsItemAccess_tokensRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemAccess_tokensRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsItemAccess_tokensRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a InstallationTokenable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#create-an-installation-access-token-for-an-app +func (m *InstallationsItemAccess_tokensRequestBuilder) Post(ctx context.Context, body InstallationsItemAccess_tokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InstallationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationTokenFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InstallationTokenable), nil +} +// ToPostRequestInformation creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *InstallationsItemAccess_tokensRequestBuilder) ToPostRequestInformation(ctx context.Context, body InstallationsItemAccess_tokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsItemAccess_tokensRequestBuilder when successful +func (m *InstallationsItemAccess_tokensRequestBuilder) WithUrl(rawUrl string)(*InstallationsItemAccess_tokensRequestBuilder) { + return NewInstallationsItemAccess_tokensRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/installations_item_suspended_request_builder.go b/pkg/github/app/installations_item_suspended_request_builder.go new file mode 100644 index 0000000..eb0db08 --- /dev/null +++ b/pkg/github/app/installations_item_suspended_request_builder.go @@ -0,0 +1,84 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsItemSuspendedRequestBuilder builds and executes requests for operations under \app\installations\{installation_id}\suspended +type InstallationsItemSuspendedRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewInstallationsItemSuspendedRequestBuilderInternal instantiates a new InstallationsItemSuspendedRequestBuilder and sets the default values. +func NewInstallationsItemSuspendedRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemSuspendedRequestBuilder) { + m := &InstallationsItemSuspendedRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/installations/{installation_id}/suspended", pathParameters), + } + return m +} +// NewInstallationsItemSuspendedRequestBuilder instantiates a new InstallationsItemSuspendedRequestBuilder and sets the default values. +func NewInstallationsItemSuspendedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemSuspendedRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsItemSuspendedRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a GitHub App installation suspension.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#unsuspend-an-app-installation +func (m *InstallationsItemSuspendedRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub Enterprise Cloud API or webhook events is blocked for that account.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#suspend-an-app-installation +func (m *InstallationsItemSuspendedRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a GitHub App installation suspension.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *InstallationsItemSuspendedRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub Enterprise Cloud API or webhook events is blocked for that account.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *InstallationsItemSuspendedRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsItemSuspendedRequestBuilder when successful +func (m *InstallationsItemSuspendedRequestBuilder) WithUrl(rawUrl string)(*InstallationsItemSuspendedRequestBuilder) { + return NewInstallationsItemSuspendedRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/installations_request_builder.go b/pkg/github/app/installations_request_builder.go new file mode 100644 index 0000000..a516b5f --- /dev/null +++ b/pkg/github/app/installations_request_builder.go @@ -0,0 +1,82 @@ +package app + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsRequestBuilder builds and executes requests for operations under \app\installations +type InstallationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// InstallationsRequestBuilderGetQueryParameters the permissions the installation has are included under the `permissions` key.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +type InstallationsRequestBuilderGetQueryParameters struct { + Outdated *string `uriparametername:"outdated"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// ByInstallation_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.app.installations.item collection +// returns a *InstallationsWithInstallation_ItemRequestBuilder when successful +func (m *InstallationsRequestBuilder) ByInstallation_id(installation_id int32)(*InstallationsWithInstallation_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["installation_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(installation_id), 10) + return NewInstallationsWithInstallation_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewInstallationsRequestBuilderInternal instantiates a new InstallationsRequestBuilder and sets the default values. +func NewInstallationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsRequestBuilder) { + m := &InstallationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/installations{?outdated*,page*,per_page*,since*}", pathParameters), + } + return m +} +// NewInstallationsRequestBuilder instantiates a new InstallationsRequestBuilder and sets the default values. +func NewInstallationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the permissions the installation has are included under the `permissions` key.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a []Installationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#list-installations-for-the-authenticated-app +func (m *InstallationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) + } + } + return val, nil +} +// ToGetRequestInformation the permissions the installation has are included under the `permissions` key.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *InstallationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsRequestBuilder when successful +func (m *InstallationsRequestBuilder) WithUrl(rawUrl string)(*InstallationsRequestBuilder) { + return NewInstallationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/app/installations_with_installation_item_request_builder.go b/pkg/github/app/installations_with_installation_item_request_builder.go new file mode 100644 index 0000000..f5ac1dd --- /dev/null +++ b/pkg/github/app/installations_with_installation_item_request_builder.go @@ -0,0 +1,98 @@ +package app + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsWithInstallation_ItemRequestBuilder builds and executes requests for operations under \app\installations\{installation_id} +type InstallationsWithInstallation_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Access_tokens the access_tokens property +// returns a *InstallationsItemAccess_tokensRequestBuilder when successful +func (m *InstallationsWithInstallation_ItemRequestBuilder) Access_tokens()(*InstallationsItemAccess_tokensRequestBuilder) { + return NewInstallationsItemAccess_tokensRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewInstallationsWithInstallation_ItemRequestBuilderInternal instantiates a new InstallationsWithInstallation_ItemRequestBuilder and sets the default values. +func NewInstallationsWithInstallation_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsWithInstallation_ItemRequestBuilder) { + m := &InstallationsWithInstallation_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/installations/{installation_id}", pathParameters), + } + return m +} +// NewInstallationsWithInstallation_ItemRequestBuilder instantiates a new InstallationsWithInstallation_ItemRequestBuilder and sets the default values. +func NewInstallationsWithInstallation_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsWithInstallation_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsWithInstallation_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#suspend-an-app-installation)" endpoint.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#delete-an-installation-for-the-authenticated-app +func (m *InstallationsWithInstallation_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get enables an authenticated GitHub App to find an installation's information using the installation id.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a Installationable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-installation-for-the-authenticated-app +func (m *InstallationsWithInstallation_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable), nil +} +// Suspended the suspended property +// returns a *InstallationsItemSuspendedRequestBuilder when successful +func (m *InstallationsWithInstallation_ItemRequestBuilder) Suspended()(*InstallationsItemSuspendedRequestBuilder) { + return NewInstallationsItemSuspendedRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#suspend-an-app-installation)" endpoint.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *InstallationsWithInstallation_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation enables an authenticated GitHub App to find an installation's information using the installation id.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *InstallationsWithInstallation_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsWithInstallation_ItemRequestBuilder when successful +func (m *InstallationsWithInstallation_ItemRequestBuilder) WithUrl(rawUrl string)(*InstallationsWithInstallation_ItemRequestBuilder) { + return NewInstallationsWithInstallation_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/applications/applications_request_builder.go b/pkg/github/applications/applications_request_builder.go new file mode 100644 index 0000000..d77cdce --- /dev/null +++ b/pkg/github/applications/applications_request_builder.go @@ -0,0 +1,35 @@ +package applications + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ApplicationsRequestBuilder builds and executes requests for operations under \applications +type ApplicationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByClient_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.applications.item collection +// returns a *WithClient_ItemRequestBuilder when successful +func (m *ApplicationsRequestBuilder) ByClient_id(client_id string)(*WithClient_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if client_id != "" { + urlTplParams["client_id"] = client_id + } + return NewWithClient_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewApplicationsRequestBuilderInternal instantiates a new ApplicationsRequestBuilder and sets the default values. +func NewApplicationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ApplicationsRequestBuilder) { + m := &ApplicationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/applications", pathParameters), + } + return m +} +// NewApplicationsRequestBuilder instantiates a new ApplicationsRequestBuilder and sets the default values. +func NewApplicationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ApplicationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewApplicationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/applications/item_grant_delete_request_body.go b/pkg/github/applications/item_grant_delete_request_body.go new file mode 100644 index 0000000..e994217 --- /dev/null +++ b/pkg/github/applications/item_grant_delete_request_body.go @@ -0,0 +1,80 @@ +package applications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemGrantDeleteRequestBody struct { + // The OAuth access token used to authenticate to the GitHub API. + access_token *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemGrantDeleteRequestBody instantiates a new ItemGrantDeleteRequestBody and sets the default values. +func NewItemGrantDeleteRequestBody()(*ItemGrantDeleteRequestBody) { + m := &ItemGrantDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemGrantDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemGrantDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemGrantDeleteRequestBody(), nil +} +// GetAccessToken gets the access_token property value. The OAuth access token used to authenticate to the GitHub API. +// returns a *string when successful +func (m *ItemGrantDeleteRequestBody) GetAccessToken()(*string) { + return m.access_token +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemGrantDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemGrantDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessToken(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemGrantDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_token", m.GetAccessToken()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessToken sets the access_token property value. The OAuth access token used to authenticate to the GitHub API. +func (m *ItemGrantDeleteRequestBody) SetAccessToken(value *string)() { + m.access_token = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemGrantDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemGrantDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessToken()(*string) + SetAccessToken(value *string)() +} diff --git a/pkg/github/applications/item_grant_request_builder.go b/pkg/github/applications/item_grant_request_builder.go new file mode 100644 index 0000000..8620b6a --- /dev/null +++ b/pkg/github/applications/item_grant_request_builder.go @@ -0,0 +1,61 @@ +package applications + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemGrantRequestBuilder builds and executes requests for operations under \applications\{client_id}\grant +type ItemGrantRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemGrantRequestBuilderInternal instantiates a new ItemGrantRequestBuilder and sets the default values. +func NewItemGrantRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGrantRequestBuilder) { + m := &ItemGrantRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/applications/{client_id}/grant", pathParameters), + } + return m +} +// NewItemGrantRequestBuilder instantiates a new ItemGrantRequestBuilder and sets the default values. +func NewItemGrantRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGrantRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGrantRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete oAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/oauth-applications#delete-an-app-authorization +func (m *ItemGrantRequestBuilder) Delete(ctx context.Context, body ItemGrantDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation oAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). +// returns a *RequestInformation when successful +func (m *ItemGrantRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemGrantDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemGrantRequestBuilder when successful +func (m *ItemGrantRequestBuilder) WithUrl(rawUrl string)(*ItemGrantRequestBuilder) { + return NewItemGrantRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/applications/item_token_delete_request_body.go b/pkg/github/applications/item_token_delete_request_body.go new file mode 100644 index 0000000..3e3ee81 --- /dev/null +++ b/pkg/github/applications/item_token_delete_request_body.go @@ -0,0 +1,80 @@ +package applications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTokenDeleteRequestBody struct { + // The OAuth access token used to authenticate to the GitHub API. + access_token *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTokenDeleteRequestBody instantiates a new ItemTokenDeleteRequestBody and sets the default values. +func NewItemTokenDeleteRequestBody()(*ItemTokenDeleteRequestBody) { + m := &ItemTokenDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTokenDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTokenDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTokenDeleteRequestBody(), nil +} +// GetAccessToken gets the access_token property value. The OAuth access token used to authenticate to the GitHub API. +// returns a *string when successful +func (m *ItemTokenDeleteRequestBody) GetAccessToken()(*string) { + return m.access_token +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTokenDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTokenDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessToken(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemTokenDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_token", m.GetAccessToken()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessToken sets the access_token property value. The OAuth access token used to authenticate to the GitHub API. +func (m *ItemTokenDeleteRequestBody) SetAccessToken(value *string)() { + m.access_token = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTokenDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTokenDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessToken()(*string) + SetAccessToken(value *string)() +} diff --git a/pkg/github/applications/item_token_patch_request_body.go b/pkg/github/applications/item_token_patch_request_body.go new file mode 100644 index 0000000..4119cfa --- /dev/null +++ b/pkg/github/applications/item_token_patch_request_body.go @@ -0,0 +1,80 @@ +package applications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTokenPatchRequestBody struct { + // The access_token of the OAuth or GitHub application. + access_token *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTokenPatchRequestBody instantiates a new ItemTokenPatchRequestBody and sets the default values. +func NewItemTokenPatchRequestBody()(*ItemTokenPatchRequestBody) { + m := &ItemTokenPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTokenPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTokenPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTokenPatchRequestBody(), nil +} +// GetAccessToken gets the access_token property value. The access_token of the OAuth or GitHub application. +// returns a *string when successful +func (m *ItemTokenPatchRequestBody) GetAccessToken()(*string) { + return m.access_token +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTokenPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTokenPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessToken(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemTokenPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_token", m.GetAccessToken()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessToken sets the access_token property value. The access_token of the OAuth or GitHub application. +func (m *ItemTokenPatchRequestBody) SetAccessToken(value *string)() { + m.access_token = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTokenPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTokenPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessToken()(*string) + SetAccessToken(value *string)() +} diff --git a/pkg/github/applications/item_token_post_request_body.go b/pkg/github/applications/item_token_post_request_body.go new file mode 100644 index 0000000..fc2a4c5 --- /dev/null +++ b/pkg/github/applications/item_token_post_request_body.go @@ -0,0 +1,80 @@ +package applications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTokenPostRequestBody struct { + // The access_token of the OAuth or GitHub application. + access_token *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTokenPostRequestBody instantiates a new ItemTokenPostRequestBody and sets the default values. +func NewItemTokenPostRequestBody()(*ItemTokenPostRequestBody) { + m := &ItemTokenPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTokenPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTokenPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTokenPostRequestBody(), nil +} +// GetAccessToken gets the access_token property value. The access_token of the OAuth or GitHub application. +// returns a *string when successful +func (m *ItemTokenPostRequestBody) GetAccessToken()(*string) { + return m.access_token +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTokenPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTokenPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessToken(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemTokenPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_token", m.GetAccessToken()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessToken sets the access_token property value. The access_token of the OAuth or GitHub application. +func (m *ItemTokenPostRequestBody) SetAccessToken(value *string)() { + m.access_token = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTokenPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTokenPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessToken()(*string) + SetAccessToken(value *string)() +} diff --git a/pkg/github/applications/item_token_request_builder.go b/pkg/github/applications/item_token_request_builder.go new file mode 100644 index 0000000..e9bd413 --- /dev/null +++ b/pkg/github/applications/item_token_request_builder.go @@ -0,0 +1,138 @@ +package applications + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTokenRequestBuilder builds and executes requests for operations under \applications\{client_id}\token +type ItemTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTokenRequestBuilderInternal instantiates a new ItemTokenRequestBuilder and sets the default values. +func NewItemTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTokenRequestBuilder) { + m := &ItemTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/applications/{client_id}/token", pathParameters), + } + return m +} +// NewItemTokenRequestBuilder instantiates a new ItemTokenRequestBuilder and sets the default values. +func NewItemTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete oAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/oauth-applications#delete-an-app-token +func (m *ItemTokenRequestBuilder) Delete(ctx context.Context, body ItemTokenDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Patch oAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. +// returns a Authorizationable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/oauth-applications#reset-a-token +func (m *ItemTokenRequestBuilder) Patch(ctx context.Context, body ItemTokenPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Authorizationable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthorizationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Authorizationable), nil +} +// Post oAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. +// returns a Authorizationable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/oauth-applications#check-a-token +func (m *ItemTokenRequestBuilder) Post(ctx context.Context, body ItemTokenPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Authorizationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthorizationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Authorizationable), nil +} +// Scoped the scoped property +// returns a *ItemTokenScopedRequestBuilder when successful +func (m *ItemTokenRequestBuilder) Scoped()(*ItemTokenScopedRequestBuilder) { + return NewItemTokenScopedRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation oAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. +// returns a *RequestInformation when successful +func (m *ItemTokenRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemTokenDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPatchRequestInformation oAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`. +// returns a *RequestInformation when successful +func (m *ItemTokenRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTokenPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation oAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`. +// returns a *RequestInformation when successful +func (m *ItemTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTokenPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTokenRequestBuilder when successful +func (m *ItemTokenRequestBuilder) WithUrl(rawUrl string)(*ItemTokenRequestBuilder) { + return NewItemTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/applications/item_token_scoped_post_request_body.go b/pkg/github/applications/item_token_scoped_post_request_body.go new file mode 100644 index 0000000..d1ebc76 --- /dev/null +++ b/pkg/github/applications/item_token_scoped_post_request_body.go @@ -0,0 +1,238 @@ +package applications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemTokenScopedPostRequestBody struct { + // The access token used to authenticate to the GitHub API. + access_token *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions granted to the user access token. + permissions i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable + // The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified. + repositories []string + // The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified. + repository_ids []int32 + // The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified. + target *string + // The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified. + target_id *int32 +} +// NewItemTokenScopedPostRequestBody instantiates a new ItemTokenScopedPostRequestBody and sets the default values. +func NewItemTokenScopedPostRequestBody()(*ItemTokenScopedPostRequestBody) { + m := &ItemTokenScopedPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTokenScopedPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTokenScopedPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTokenScopedPostRequestBody(), nil +} +// GetAccessToken gets the access_token property value. The access token used to authenticate to the GitHub API. +// returns a *string when successful +func (m *ItemTokenScopedPostRequestBody) GetAccessToken()(*string) { + return m.access_token +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTokenScopedPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTokenScopedPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessToken(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAppPermissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable)) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetRepositoryIds(res) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + res["target_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTargetId(val) + } + return nil + } + return res +} +// GetPermissions gets the permissions property value. The permissions granted to the user access token. +// returns a AppPermissionsable when successful +func (m *ItemTokenScopedPostRequestBody) GetPermissions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable) { + return m.permissions +} +// GetRepositories gets the repositories property value. The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified. +// returns a []string when successful +func (m *ItemTokenScopedPostRequestBody) GetRepositories()([]string) { + return m.repositories +} +// GetRepositoryIds gets the repository_ids property value. The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified. +// returns a []int32 when successful +func (m *ItemTokenScopedPostRequestBody) GetRepositoryIds()([]int32) { + return m.repository_ids +} +// GetTarget gets the target property value. The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified. +// returns a *string when successful +func (m *ItemTokenScopedPostRequestBody) GetTarget()(*string) { + return m.target +} +// GetTargetId gets the target_id property value. The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified. +// returns a *int32 when successful +func (m *ItemTokenScopedPostRequestBody) GetTargetId()(*int32) { + return m.target_id +} +// Serialize serializes information the current object +func (m *ItemTokenScopedPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_token", m.GetAccessToken()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + err := writer.WriteCollectionOfStringValues("repositories", m.GetRepositories()) + if err != nil { + return err + } + } + if m.GetRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("repository_ids", m.GetRepositoryIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("target_id", m.GetTargetId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessToken sets the access_token property value. The access token used to authenticate to the GitHub API. +func (m *ItemTokenScopedPostRequestBody) SetAccessToken(value *string)() { + m.access_token = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTokenScopedPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPermissions sets the permissions property value. The permissions granted to the user access token. +func (m *ItemTokenScopedPostRequestBody) SetPermissions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable)() { + m.permissions = value +} +// SetRepositories sets the repositories property value. The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified. +func (m *ItemTokenScopedPostRequestBody) SetRepositories(value []string)() { + m.repositories = value +} +// SetRepositoryIds sets the repository_ids property value. The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified. +func (m *ItemTokenScopedPostRequestBody) SetRepositoryIds(value []int32)() { + m.repository_ids = value +} +// SetTarget sets the target property value. The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified. +func (m *ItemTokenScopedPostRequestBody) SetTarget(value *string)() { + m.target = value +} +// SetTargetId sets the target_id property value. The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified. +func (m *ItemTokenScopedPostRequestBody) SetTargetId(value *int32)() { + m.target_id = value +} +type ItemTokenScopedPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessToken()(*string) + GetPermissions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable) + GetRepositories()([]string) + GetRepositoryIds()([]int32) + GetTarget()(*string) + GetTargetId()(*int32) + SetAccessToken(value *string)() + SetPermissions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AppPermissionsable)() + SetRepositories(value []string)() + SetRepositoryIds(value []int32)() + SetTarget(value *string)() + SetTargetId(value *int32)() +} diff --git a/pkg/github/applications/item_token_scoped_request_builder.go b/pkg/github/applications/item_token_scoped_request_builder.go new file mode 100644 index 0000000..c6e257c --- /dev/null +++ b/pkg/github/applications/item_token_scoped_request_builder.go @@ -0,0 +1,71 @@ +package applications + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTokenScopedRequestBuilder builds and executes requests for operations under \applications\{client_id}\token\scoped +type ItemTokenScopedRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTokenScopedRequestBuilderInternal instantiates a new ItemTokenScopedRequestBuilder and sets the default values. +func NewItemTokenScopedRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTokenScopedRequestBuilder) { + m := &ItemTokenScopedRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/applications/{client_id}/token/scoped", pathParameters), + } + return m +} +// NewItemTokenScopedRequestBuilder instantiates a new ItemTokenScopedRequestBuilder and sets the default values. +func NewItemTokenScopedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTokenScopedRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTokenScopedRequestBuilderInternal(urlParams, requestAdapter) +} +// Post use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specifywhich repositories the token can access and which permissions are granted to thetoken.Invalid tokens will return `404 NOT FOUND`. +// returns a Authorizationable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#create-a-scoped-access-token +func (m *ItemTokenScopedRequestBuilder) Post(ctx context.Context, body ItemTokenScopedPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Authorizationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthorizationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Authorizationable), nil +} +// ToPostRequestInformation use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specifywhich repositories the token can access and which permissions are granted to thetoken.Invalid tokens will return `404 NOT FOUND`. +// returns a *RequestInformation when successful +func (m *ItemTokenScopedRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTokenScopedPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTokenScopedRequestBuilder when successful +func (m *ItemTokenScopedRequestBuilder) WithUrl(rawUrl string)(*ItemTokenScopedRequestBuilder) { + return NewItemTokenScopedRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/applications/with_client_item_request_builder.go b/pkg/github/applications/with_client_item_request_builder.go new file mode 100644 index 0000000..8867db6 --- /dev/null +++ b/pkg/github/applications/with_client_item_request_builder.go @@ -0,0 +1,33 @@ +package applications + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithClient_ItemRequestBuilder builds and executes requests for operations under \applications\{client_id} +type WithClient_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithClient_ItemRequestBuilderInternal instantiates a new WithClient_ItemRequestBuilder and sets the default values. +func NewWithClient_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithClient_ItemRequestBuilder) { + m := &WithClient_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/applications/{client_id}", pathParameters), + } + return m +} +// NewWithClient_ItemRequestBuilder instantiates a new WithClient_ItemRequestBuilder and sets the default values. +func NewWithClient_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithClient_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithClient_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Grant the grant property +// returns a *ItemGrantRequestBuilder when successful +func (m *WithClient_ItemRequestBuilder) Grant()(*ItemGrantRequestBuilder) { + return NewItemGrantRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Token the token property +// returns a *ItemTokenRequestBuilder when successful +func (m *WithClient_ItemRequestBuilder) Token()(*ItemTokenRequestBuilder) { + return NewItemTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/appmanifests/app_manifests_request_builder.go b/pkg/github/appmanifests/app_manifests_request_builder.go new file mode 100644 index 0000000..6fdfdc1 --- /dev/null +++ b/pkg/github/appmanifests/app_manifests_request_builder.go @@ -0,0 +1,35 @@ +package appmanifests + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// AppManifestsRequestBuilder builds and executes requests for operations under \app-manifests +type AppManifestsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCode gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.appManifests.item collection +// returns a *WithCodeItemRequestBuilder when successful +func (m *AppManifestsRequestBuilder) ByCode(code string)(*WithCodeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if code != "" { + urlTplParams["code"] = code + } + return NewWithCodeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewAppManifestsRequestBuilderInternal instantiates a new AppManifestsRequestBuilder and sets the default values. +func NewAppManifestsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AppManifestsRequestBuilder) { + m := &AppManifestsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app-manifests", pathParameters), + } + return m +} +// NewAppManifestsRequestBuilder instantiates a new AppManifestsRequestBuilder and sets the default values. +func NewAppManifestsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AppManifestsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAppManifestsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/appmanifests/item_conversions_post_response.go b/pkg/github/appmanifests/item_conversions_post_response.go new file mode 100644 index 0000000..4472c02 --- /dev/null +++ b/pkg/github/appmanifests/item_conversions_post_response.go @@ -0,0 +1,40 @@ +package appmanifests + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemConversionsPostResponse struct { + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integration +} +// NewItemConversionsPostResponse instantiates a new ItemConversionsPostResponse and sets the default values. +func NewItemConversionsPostResponse()(*ItemConversionsPostResponse) { + m := &ItemConversionsPostResponse{ + Integration: *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.NewIntegration(), + } + return m +} +// CreateItemConversionsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemConversionsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemConversionsPostResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemConversionsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Integration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ItemConversionsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Integration.Serialize(writer) + if err != nil { + return err + } + return nil +} +type ItemConversionsPostResponseable interface { + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/appmanifests/item_conversions_request_builder.go b/pkg/github/appmanifests/item_conversions_request_builder.go new file mode 100644 index 0000000..067daed --- /dev/null +++ b/pkg/github/appmanifests/item_conversions_request_builder.go @@ -0,0 +1,63 @@ +package appmanifests + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemConversionsRequestBuilder builds and executes requests for operations under \app-manifests\{code}\conversions +type ItemConversionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemConversionsRequestBuilderInternal instantiates a new ItemConversionsRequestBuilder and sets the default values. +func NewItemConversionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemConversionsRequestBuilder) { + m := &ItemConversionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app-manifests/{code}/conversions", pathParameters), + } + return m +} +// NewItemConversionsRequestBuilder instantiates a new ItemConversionsRequestBuilder and sets the default values. +func NewItemConversionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemConversionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemConversionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. +// returns a ItemConversionsPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#create-a-github-app-from-a-manifest +func (m *ItemConversionsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemConversionsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemConversionsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemConversionsPostResponseable), nil +} +// ToPostRequestInformation use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. +// returns a *RequestInformation when successful +func (m *ItemConversionsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemConversionsRequestBuilder when successful +func (m *ItemConversionsRequestBuilder) WithUrl(rawUrl string)(*ItemConversionsRequestBuilder) { + return NewItemConversionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/appmanifests/with_code_item_request_builder.go b/pkg/github/appmanifests/with_code_item_request_builder.go new file mode 100644 index 0000000..4748a6b --- /dev/null +++ b/pkg/github/appmanifests/with_code_item_request_builder.go @@ -0,0 +1,28 @@ +package appmanifests + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithCodeItemRequestBuilder builds and executes requests for operations under \app-manifests\{code} +type WithCodeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithCodeItemRequestBuilderInternal instantiates a new WithCodeItemRequestBuilder and sets the default values. +func NewWithCodeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithCodeItemRequestBuilder) { + m := &WithCodeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app-manifests/{code}", pathParameters), + } + return m +} +// NewWithCodeItemRequestBuilder instantiates a new WithCodeItemRequestBuilder and sets the default values. +func NewWithCodeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithCodeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithCodeItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Conversions the conversions property +// returns a *ItemConversionsRequestBuilder when successful +func (m *WithCodeItemRequestBuilder) Conversions()(*ItemConversionsRequestBuilder) { + return NewItemConversionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/apps/apps_request_builder.go b/pkg/github/apps/apps_request_builder.go new file mode 100644 index 0000000..92b6aca --- /dev/null +++ b/pkg/github/apps/apps_request_builder.go @@ -0,0 +1,35 @@ +package apps + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// AppsRequestBuilder builds and executes requests for operations under \apps +type AppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByApp_slug gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.apps.item collection +// returns a *WithApp_slugItemRequestBuilder when successful +func (m *AppsRequestBuilder) ByApp_slug(app_slug string)(*WithApp_slugItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if app_slug != "" { + urlTplParams["app_slug"] = app_slug + } + return NewWithApp_slugItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewAppsRequestBuilderInternal instantiates a new AppsRequestBuilder and sets the default values. +func NewAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AppsRequestBuilder) { + m := &AppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/apps", pathParameters), + } + return m +} +// NewAppsRequestBuilder instantiates a new AppsRequestBuilder and sets the default values. +func NewAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAppsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/apps/with_app_slug_item_request_builder.go b/pkg/github/apps/with_app_slug_item_request_builder.go new file mode 100644 index 0000000..41f8487 --- /dev/null +++ b/pkg/github/apps/with_app_slug_item_request_builder.go @@ -0,0 +1,63 @@ +package apps + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithApp_slugItemRequestBuilder builds and executes requests for operations under \apps\{app_slug} +type WithApp_slugItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithApp_slugItemRequestBuilderInternal instantiates a new WithApp_slugItemRequestBuilder and sets the default values. +func NewWithApp_slugItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithApp_slugItemRequestBuilder) { + m := &WithApp_slugItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/apps/{app_slug}", pathParameters), + } + return m +} +// NewWithApp_slugItemRequestBuilder instantiates a new WithApp_slugItemRequestBuilder and sets the default values. +func NewWithApp_slugItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithApp_slugItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithApp_slugItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). +// returns a Integrationable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app +func (m *WithApp_slugItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable), nil +} +// ToGetRequestInformation **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). +// returns a *RequestInformation when successful +func (m *WithApp_slugItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithApp_slugItemRequestBuilder when successful +func (m *WithApp_slugItemRequestBuilder) WithUrl(rawUrl string)(*WithApp_slugItemRequestBuilder) { + return NewWithApp_slugItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/assignments/assignments_request_builder.go b/pkg/github/assignments/assignments_request_builder.go new file mode 100644 index 0000000..9c39f30 --- /dev/null +++ b/pkg/github/assignments/assignments_request_builder.go @@ -0,0 +1,34 @@ +package assignments + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// AssignmentsRequestBuilder builds and executes requests for operations under \assignments +type AssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAssignment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.assignments.item collection +// returns a *WithAssignment_ItemRequestBuilder when successful +func (m *AssignmentsRequestBuilder) ByAssignment_id(assignment_id int32)(*WithAssignment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["assignment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(assignment_id), 10) + return NewWithAssignment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AssignmentsRequestBuilder) { + m := &AssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/assignments", pathParameters), + } + return m +} +// NewAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/assignments/item_accepted_assignments_request_builder.go b/pkg/github/assignments/item_accepted_assignments_request_builder.go new file mode 100644 index 0000000..663bca4 --- /dev/null +++ b/pkg/github/assignments/item_accepted_assignments_request_builder.go @@ -0,0 +1,67 @@ +package assignments + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemAccepted_assignmentsRequestBuilder builds and executes requests for operations under \assignments\{assignment_id}\accepted_assignments +type ItemAccepted_assignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAccepted_assignmentsRequestBuilderGetQueryParameters lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +type ItemAccepted_assignmentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemAccepted_assignmentsRequestBuilderInternal instantiates a new ItemAccepted_assignmentsRequestBuilder and sets the default values. +func NewItemAccepted_assignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAccepted_assignmentsRequestBuilder) { + m := &ItemAccepted_assignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/assignments/{assignment_id}/accepted_assignments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemAccepted_assignmentsRequestBuilder instantiates a new ItemAccepted_assignmentsRequestBuilder and sets the default values. +func NewItemAccepted_assignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAccepted_assignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAccepted_assignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +// returns a []ClassroomAcceptedAssignmentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/classroom/classroom#list-accepted-assignments-for-an-assignment +func (m *ItemAccepted_assignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAccepted_assignmentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAcceptedAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateClassroomAcceptedAssignmentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAcceptedAssignmentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAcceptedAssignmentable) + } + } + return val, nil +} +// ToGetRequestInformation lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +// returns a *RequestInformation when successful +func (m *ItemAccepted_assignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAccepted_assignmentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAccepted_assignmentsRequestBuilder when successful +func (m *ItemAccepted_assignmentsRequestBuilder) WithUrl(rawUrl string)(*ItemAccepted_assignmentsRequestBuilder) { + return NewItemAccepted_assignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/assignments/item_grades_request_builder.go b/pkg/github/assignments/item_grades_request_builder.go new file mode 100644 index 0000000..f8fcf09 --- /dev/null +++ b/pkg/github/assignments/item_grades_request_builder.go @@ -0,0 +1,64 @@ +package assignments + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemGradesRequestBuilder builds and executes requests for operations under \assignments\{assignment_id}\grades +type ItemGradesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemGradesRequestBuilderInternal instantiates a new ItemGradesRequestBuilder and sets the default values. +func NewItemGradesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGradesRequestBuilder) { + m := &ItemGradesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/assignments/{assignment_id}/grades", pathParameters), + } + return m +} +// NewItemGradesRequestBuilder instantiates a new ItemGradesRequestBuilder and sets the default values. +func NewItemGradesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGradesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGradesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +// returns a []ClassroomAssignmentGradeable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/classroom/classroom#get-assignment-grades +func (m *ItemGradesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAssignmentGradeable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateClassroomAssignmentGradeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAssignmentGradeable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAssignmentGradeable) + } + } + return val, nil +} +// ToGetRequestInformation gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +// returns a *RequestInformation when successful +func (m *ItemGradesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemGradesRequestBuilder when successful +func (m *ItemGradesRequestBuilder) WithUrl(rawUrl string)(*ItemGradesRequestBuilder) { + return NewItemGradesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/assignments/with_assignment_item_request_builder.go b/pkg/github/assignments/with_assignment_item_request_builder.go new file mode 100644 index 0000000..f433ac0 --- /dev/null +++ b/pkg/github/assignments/with_assignment_item_request_builder.go @@ -0,0 +1,71 @@ +package assignments + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithAssignment_ItemRequestBuilder builds and executes requests for operations under \assignments\{assignment_id} +type WithAssignment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Accepted_assignments the accepted_assignments property +// returns a *ItemAccepted_assignmentsRequestBuilder when successful +func (m *WithAssignment_ItemRequestBuilder) Accepted_assignments()(*ItemAccepted_assignmentsRequestBuilder) { + return NewItemAccepted_assignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithAssignment_ItemRequestBuilderInternal instantiates a new WithAssignment_ItemRequestBuilder and sets the default values. +func NewWithAssignment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAssignment_ItemRequestBuilder) { + m := &WithAssignment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/assignments/{assignment_id}", pathParameters), + } + return m +} +// NewWithAssignment_ItemRequestBuilder instantiates a new WithAssignment_ItemRequestBuilder and sets the default values. +func NewWithAssignment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAssignment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithAssignment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +// returns a ClassroomAssignmentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/classroom/classroom#get-an-assignment +func (m *WithAssignment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateClassroomAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ClassroomAssignmentable), nil +} +// Grades the grades property +// returns a *ItemGradesRequestBuilder when successful +func (m *WithAssignment_ItemRequestBuilder) Grades()(*ItemGradesRequestBuilder) { + return NewItemGradesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. +// returns a *RequestInformation when successful +func (m *WithAssignment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithAssignment_ItemRequestBuilder when successful +func (m *WithAssignment_ItemRequestBuilder) WithUrl(rawUrl string)(*WithAssignment_ItemRequestBuilder) { + return NewWithAssignment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/classrooms/classrooms_request_builder.go b/pkg/github/classrooms/classrooms_request_builder.go new file mode 100644 index 0000000..7f31ad8 --- /dev/null +++ b/pkg/github/classrooms/classrooms_request_builder.go @@ -0,0 +1,78 @@ +package classrooms + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ClassroomsRequestBuilder builds and executes requests for operations under \classrooms +type ClassroomsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ClassroomsRequestBuilderGetQueryParameters lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. +type ClassroomsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByClassroom_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.classrooms.item collection +// returns a *WithClassroom_ItemRequestBuilder when successful +func (m *ClassroomsRequestBuilder) ByClassroom_id(classroom_id int32)(*WithClassroom_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["classroom_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(classroom_id), 10) + return NewWithClassroom_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewClassroomsRequestBuilderInternal instantiates a new ClassroomsRequestBuilder and sets the default values. +func NewClassroomsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ClassroomsRequestBuilder) { + m := &ClassroomsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/classrooms{?page*,per_page*}", pathParameters), + } + return m +} +// NewClassroomsRequestBuilder instantiates a new ClassroomsRequestBuilder and sets the default values. +func NewClassroomsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ClassroomsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewClassroomsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. +// returns a []SimpleClassroomable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/classroom/classroom#list-classrooms +func (m *ClassroomsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ClassroomsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleClassroomable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleClassroomFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleClassroomable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleClassroomable) + } + } + return val, nil +} +// ToGetRequestInformation lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. +// returns a *RequestInformation when successful +func (m *ClassroomsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ClassroomsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ClassroomsRequestBuilder when successful +func (m *ClassroomsRequestBuilder) WithUrl(rawUrl string)(*ClassroomsRequestBuilder) { + return NewClassroomsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/classrooms/item_assignments_request_builder.go b/pkg/github/classrooms/item_assignments_request_builder.go new file mode 100644 index 0000000..2913f60 --- /dev/null +++ b/pkg/github/classrooms/item_assignments_request_builder.go @@ -0,0 +1,67 @@ +package classrooms + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemAssignmentsRequestBuilder builds and executes requests for operations under \classrooms\{classroom_id}\assignments +type ItemAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAssignmentsRequestBuilderGetQueryParameters lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. +type ItemAssignmentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemAssignmentsRequestBuilderInternal instantiates a new ItemAssignmentsRequestBuilder and sets the default values. +func NewItemAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAssignmentsRequestBuilder) { + m := &ItemAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/classrooms/{classroom_id}/assignments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemAssignmentsRequestBuilder instantiates a new ItemAssignmentsRequestBuilder and sets the default values. +func NewItemAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. +// returns a []SimpleClassroomAssignmentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/classroom/classroom#list-assignments-for-a-classroom +func (m *ItemAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAssignmentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleClassroomAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleClassroomAssignmentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleClassroomAssignmentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleClassroomAssignmentable) + } + } + return val, nil +} +// ToGetRequestInformation lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. +// returns a *RequestInformation when successful +func (m *ItemAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAssignmentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAssignmentsRequestBuilder when successful +func (m *ItemAssignmentsRequestBuilder) WithUrl(rawUrl string)(*ItemAssignmentsRequestBuilder) { + return NewItemAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/classrooms/with_classroom_item_request_builder.go b/pkg/github/classrooms/with_classroom_item_request_builder.go new file mode 100644 index 0000000..caa9911 --- /dev/null +++ b/pkg/github/classrooms/with_classroom_item_request_builder.go @@ -0,0 +1,66 @@ +package classrooms + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithClassroom_ItemRequestBuilder builds and executes requests for operations under \classrooms\{classroom_id} +type WithClassroom_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Assignments the assignments property +// returns a *ItemAssignmentsRequestBuilder when successful +func (m *WithClassroom_ItemRequestBuilder) Assignments()(*ItemAssignmentsRequestBuilder) { + return NewItemAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithClassroom_ItemRequestBuilderInternal instantiates a new WithClassroom_ItemRequestBuilder and sets the default values. +func NewWithClassroom_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithClassroom_ItemRequestBuilder) { + m := &WithClassroom_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/classrooms/{classroom_id}", pathParameters), + } + return m +} +// NewWithClassroom_ItemRequestBuilder instantiates a new WithClassroom_ItemRequestBuilder and sets the default values. +func NewWithClassroom_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithClassroom_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithClassroom_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom. +// returns a Classroomable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/classroom/classroom#get-a-classroom +func (m *WithClassroom_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Classroomable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateClassroomFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Classroomable), nil +} +// ToGetRequestInformation gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom. +// returns a *RequestInformation when successful +func (m *WithClassroom_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithClassroom_ItemRequestBuilder when successful +func (m *WithClassroom_ItemRequestBuilder) WithUrl(rawUrl string)(*WithClassroom_ItemRequestBuilder) { + return NewWithClassroom_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/codes_of_conduct/codes_of_conduct_request_builder.go b/pkg/github/codes_of_conduct/codes_of_conduct_request_builder.go new file mode 100644 index 0000000..a4dff8c --- /dev/null +++ b/pkg/github/codes_of_conduct/codes_of_conduct_request_builder.go @@ -0,0 +1,72 @@ +package codes_of_conduct + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Codes_of_conductRequestBuilder builds and executes requests for operations under \codes_of_conduct +type Codes_of_conductRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByKey gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.codes_of_conduct.item collection +// returns a *WithKeyItemRequestBuilder when successful +func (m *Codes_of_conductRequestBuilder) ByKey(key string)(*WithKeyItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if key != "" { + urlTplParams["key"] = key + } + return NewWithKeyItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCodes_of_conductRequestBuilderInternal instantiates a new Codes_of_conductRequestBuilder and sets the default values. +func NewCodes_of_conductRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Codes_of_conductRequestBuilder) { + m := &Codes_of_conductRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/codes_of_conduct", pathParameters), + } + return m +} +// NewCodes_of_conductRequestBuilder instantiates a new Codes_of_conductRequestBuilder and sets the default values. +func NewCodes_of_conductRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Codes_of_conductRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodes_of_conductRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns array of all GitHub's codes of conduct. +// returns a []CodeOfConductable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codes-of-conduct/codes-of-conduct#get-all-codes-of-conduct +func (m *Codes_of_conductRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeOfConductable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeOfConductFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeOfConductable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeOfConductable) + } + } + return val, nil +} +// ToGetRequestInformation returns array of all GitHub's codes of conduct. +// returns a *RequestInformation when successful +func (m *Codes_of_conductRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Codes_of_conductRequestBuilder when successful +func (m *Codes_of_conductRequestBuilder) WithUrl(rawUrl string)(*Codes_of_conductRequestBuilder) { + return NewCodes_of_conductRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/codes_of_conduct/with_key_item_request_builder.go b/pkg/github/codes_of_conduct/with_key_item_request_builder.go new file mode 100644 index 0000000..9b0e9fa --- /dev/null +++ b/pkg/github/codes_of_conduct/with_key_item_request_builder.go @@ -0,0 +1,61 @@ +package codes_of_conduct + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithKeyItemRequestBuilder builds and executes requests for operations under \codes_of_conduct\{key} +type WithKeyItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithKeyItemRequestBuilderInternal instantiates a new WithKeyItemRequestBuilder and sets the default values. +func NewWithKeyItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithKeyItemRequestBuilder) { + m := &WithKeyItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/codes_of_conduct/{key}", pathParameters), + } + return m +} +// NewWithKeyItemRequestBuilder instantiates a new WithKeyItemRequestBuilder and sets the default values. +func NewWithKeyItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithKeyItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithKeyItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns information about the specified GitHub code of conduct. +// returns a CodeOfConductable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codes-of-conduct/codes-of-conduct#get-a-code-of-conduct +func (m *WithKeyItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeOfConductable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeOfConductFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeOfConductable), nil +} +// ToGetRequestInformation returns information about the specified GitHub code of conduct. +// returns a *RequestInformation when successful +func (m *WithKeyItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithKeyItemRequestBuilder when successful +func (m *WithKeyItemRequestBuilder) WithUrl(rawUrl string)(*WithKeyItemRequestBuilder) { + return NewWithKeyItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/emojis/emojis_get_response.go b/pkg/github/emojis/emojis_get_response.go new file mode 100644 index 0000000..fa4455a --- /dev/null +++ b/pkg/github/emojis/emojis_get_response.go @@ -0,0 +1,51 @@ +package emojis + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type EmojisGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewEmojisGetResponse instantiates a new EmojisGetResponse and sets the default values. +func NewEmojisGetResponse()(*EmojisGetResponse) { + m := &EmojisGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEmojisGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmojisGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmojisGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EmojisGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmojisGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *EmojisGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *EmojisGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type EmojisGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/emojis/emojis_request_builder.go b/pkg/github/emojis/emojis_request_builder.go new file mode 100644 index 0000000..f50b4cb --- /dev/null +++ b/pkg/github/emojis/emojis_request_builder.go @@ -0,0 +1,56 @@ +package emojis + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// EmojisRequestBuilder builds and executes requests for operations under \emojis +type EmojisRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewEmojisRequestBuilderInternal instantiates a new EmojisRequestBuilder and sets the default values. +func NewEmojisRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmojisRequestBuilder) { + m := &EmojisRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/emojis", pathParameters), + } + return m +} +// NewEmojisRequestBuilder instantiates a new EmojisRequestBuilder and sets the default values. +func NewEmojisRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmojisRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEmojisRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all the emojis available to use on GitHub Enterprise Cloud. +// returns a EmojisGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/emojis/emojis#get-emojis +func (m *EmojisRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(EmojisGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateEmojisGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(EmojisGetResponseable), nil +} +// ToGetRequestInformation lists all the emojis available to use on GitHub Enterprise Cloud. +// returns a *RequestInformation when successful +func (m *EmojisRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *EmojisRequestBuilder when successful +func (m *EmojisRequestBuilder) WithUrl(rawUrl string)(*EmojisRequestBuilder) { + return NewEmojisRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterpriseinstallation/enterprise_installation_request_builder.go b/pkg/github/enterpriseinstallation/enterprise_installation_request_builder.go new file mode 100644 index 0000000..aba6039 --- /dev/null +++ b/pkg/github/enterpriseinstallation/enterprise_installation_request_builder.go @@ -0,0 +1,35 @@ +package enterpriseinstallation + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// EnterpriseInstallationRequestBuilder builds and executes requests for operations under \enterprise-installation +type EnterpriseInstallationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByEnterprise_or_org gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterpriseInstallation.item collection +// returns a *WithEnterprise_or_orgItemRequestBuilder when successful +func (m *EnterpriseInstallationRequestBuilder) ByEnterprise_or_org(enterprise_or_org string)(*WithEnterprise_or_orgItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if enterprise_or_org != "" { + urlTplParams["enterprise_or_org"] = enterprise_or_org + } + return NewWithEnterprise_or_orgItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewEnterpriseInstallationRequestBuilderInternal instantiates a new EnterpriseInstallationRequestBuilder and sets the default values. +func NewEnterpriseInstallationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EnterpriseInstallationRequestBuilder) { + m := &EnterpriseInstallationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprise-installation", pathParameters), + } + return m +} +// NewEnterpriseInstallationRequestBuilder instantiates a new EnterpriseInstallationRequestBuilder and sets the default values. +func NewEnterpriseInstallationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EnterpriseInstallationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEnterpriseInstallationRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterpriseinstallation/item_server_statistics_request_builder.go b/pkg/github/enterpriseinstallation/item_server_statistics_request_builder.go new file mode 100644 index 0000000..18ed3bd --- /dev/null +++ b/pkg/github/enterpriseinstallation/item_server_statistics_request_builder.go @@ -0,0 +1,67 @@ +package enterpriseinstallation + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemServerStatisticsRequestBuilder builds and executes requests for operations under \enterprise-installation\{enterprise_or_org}\server-statistics +type ItemServerStatisticsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServerStatisticsRequestBuilderGetQueryParameters returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days.To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation.OAuth app tokens and personal access tokens (classic) need: - the `read:enterprise` scope if you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics - the `read:org` scope if you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics +type ItemServerStatisticsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events before this cursor. + Date_end *string `uriparametername:"date_end"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events after this cursor. + Date_start *string `uriparametername:"date_start"` +} +// NewItemServerStatisticsRequestBuilderInternal instantiates a new ItemServerStatisticsRequestBuilder and sets the default values. +func NewItemServerStatisticsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServerStatisticsRequestBuilder) { + m := &ItemServerStatisticsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprise-installation/{enterprise_or_org}/server-statistics{?date_end*,date_start*}", pathParameters), + } + return m +} +// NewItemServerStatisticsRequestBuilder instantiates a new ItemServerStatisticsRequestBuilder and sets the default values. +func NewItemServerStatisticsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServerStatisticsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServerStatisticsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days.To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation.OAuth app tokens and personal access tokens (classic) need: - the `read:enterprise` scope if you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics - the `read:org` scope if you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics +// returns a []ServerStatisticsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/admin-stats#get-github-enterprise-server-statistics +func (m *ItemServerStatisticsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemServerStatisticsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ServerStatisticsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateServerStatisticsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ServerStatisticsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ServerStatisticsable) + } + } + return val, nil +} +// ToGetRequestInformation returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days.To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation.OAuth app tokens and personal access tokens (classic) need: - the `read:enterprise` scope if you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics - the `read:org` scope if you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics +// returns a *RequestInformation when successful +func (m *ItemServerStatisticsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemServerStatisticsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemServerStatisticsRequestBuilder when successful +func (m *ItemServerStatisticsRequestBuilder) WithUrl(rawUrl string)(*ItemServerStatisticsRequestBuilder) { + return NewItemServerStatisticsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterpriseinstallation/with_enterprise_or_org_item_request_builder.go b/pkg/github/enterpriseinstallation/with_enterprise_or_org_item_request_builder.go new file mode 100644 index 0000000..7ca2bda --- /dev/null +++ b/pkg/github/enterpriseinstallation/with_enterprise_or_org_item_request_builder.go @@ -0,0 +1,28 @@ +package enterpriseinstallation + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithEnterprise_or_orgItemRequestBuilder builds and executes requests for operations under \enterprise-installation\{enterprise_or_org} +type WithEnterprise_or_orgItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithEnterprise_or_orgItemRequestBuilderInternal instantiates a new WithEnterprise_or_orgItemRequestBuilder and sets the default values. +func NewWithEnterprise_or_orgItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithEnterprise_or_orgItemRequestBuilder) { + m := &WithEnterprise_or_orgItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprise-installation/{enterprise_or_org}", pathParameters), + } + return m +} +// NewWithEnterprise_or_orgItemRequestBuilder instantiates a new WithEnterprise_or_orgItemRequestBuilder and sets the default values. +func NewWithEnterprise_or_orgItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithEnterprise_or_orgItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithEnterprise_or_orgItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ServerStatistics the serverStatistics property +// returns a *ItemServerStatisticsRequestBuilder when successful +func (m *WithEnterprise_or_orgItemRequestBuilder) ServerStatistics()(*ItemServerStatisticsRequestBuilder) { + return NewItemServerStatisticsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/enterprises_request_builder.go b/pkg/github/enterprises/enterprises_request_builder.go new file mode 100644 index 0000000..71a120b --- /dev/null +++ b/pkg/github/enterprises/enterprises_request_builder.go @@ -0,0 +1,35 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// EnterprisesRequestBuilder builds and executes requests for operations under \enterprises +type EnterprisesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByEnterprise gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item collection +// returns a *WithEnterpriseItemRequestBuilder when successful +func (m *EnterprisesRequestBuilder) ByEnterprise(enterprise string)(*WithEnterpriseItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if enterprise != "" { + urlTplParams["enterprise"] = enterprise + } + return NewWithEnterpriseItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewEnterprisesRequestBuilderInternal instantiates a new EnterprisesRequestBuilder and sets the default values. +func NewEnterprisesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EnterprisesRequestBuilder) { + m := &EnterprisesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises", pathParameters), + } + return m +} +// NewEnterprisesRequestBuilder instantiates a new EnterprisesRequestBuilder and sets the default values. +func NewEnterprisesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EnterprisesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEnterprisesRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/item/actions/runnergroups/item/with_runner_group_patch_request_body_visibility.go b/pkg/github/enterprises/item/actions/runnergroups/item/with_runner_group_patch_request_body_visibility.go new file mode 100644 index 0000000..82643b4 --- /dev/null +++ b/pkg/github/enterprises/item/actions/runnergroups/item/with_runner_group_patch_request_body_visibility.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// Visibility of a runner group. You can select all organizations or select individual organizations. +type WithRunner_group_PatchRequestBody_visibility int + +const ( + SELECTED_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY WithRunner_group_PatchRequestBody_visibility = iota + ALL_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY +) + +func (i WithRunner_group_PatchRequestBody_visibility) String() string { + return []string{"selected", "all"}[i] +} +func ParseWithRunner_group_PatchRequestBody_visibility(v string) (any, error) { + result := SELECTED_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + switch v { + case "selected": + result = SELECTED_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + case "all": + result = ALL_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown WithRunner_group_PatchRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeWithRunner_group_PatchRequestBody_visibility(values []WithRunner_group_PatchRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithRunner_group_PatchRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/actions/runnergroups/runner_groups_post_request_body_visibility.go b/pkg/github/enterprises/item/actions/runnergroups/runner_groups_post_request_body_visibility.go new file mode 100644 index 0000000..7928448 --- /dev/null +++ b/pkg/github/enterprises/item/actions/runnergroups/runner_groups_post_request_body_visibility.go @@ -0,0 +1,37 @@ +package runnergroups +import ( + "errors" +) +// Visibility of a runner group. You can select all organizations or select individual organization. +type RunnerGroupsPostRequestBody_visibility int + +const ( + SELECTED_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY RunnerGroupsPostRequestBody_visibility = iota + ALL_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY +) + +func (i RunnerGroupsPostRequestBody_visibility) String() string { + return []string{"selected", "all"}[i] +} +func ParseRunnerGroupsPostRequestBody_visibility(v string) (any, error) { + result := SELECTED_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + switch v { + case "selected": + result = SELECTED_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + case "all": + result = ALL_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown RunnerGroupsPostRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeRunnerGroupsPostRequestBody_visibility(values []RunnerGroupsPostRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RunnerGroupsPostRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/auditlog/get_include_query_parameter_type.go b/pkg/github/enterprises/item/auditlog/get_include_query_parameter_type.go new file mode 100644 index 0000000..6ebf915 --- /dev/null +++ b/pkg/github/enterprises/item/auditlog/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +package auditlog +import ( + "errors" +) +type GetIncludeQueryParameterType int + +const ( + WEB_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + GIT_GETINCLUDEQUERYPARAMETERTYPE + ALL_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"web", "git", "all"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WEB_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "web": + result = WEB_GETINCLUDEQUERYPARAMETERTYPE + case "git": + result = GIT_GETINCLUDEQUERYPARAMETERTYPE + case "all": + result = ALL_GETINCLUDEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetIncludeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/auditlog/get_order_query_parameter_type.go b/pkg/github/enterprises/item/auditlog/get_order_query_parameter_type.go new file mode 100644 index 0000000..d1c51d7 --- /dev/null +++ b/pkg/github/enterprises/item/auditlog/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package auditlog +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/codescanning/alerts/get_direction_query_parameter_type.go b/pkg/github/enterprises/item/codescanning/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/enterprises/item/codescanning/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/codescanning/alerts/get_sort_query_parameter_type.go b/pkg/github/enterprises/item/codescanning/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/enterprises/item/codescanning/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/dependabot/alerts/get_direction_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/enterprises/item/dependabot/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go new file mode 100644 index 0000000..906bdb7 --- /dev/null +++ b/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetScopeQueryParameterType int + +const ( + DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE GetScopeQueryParameterType = iota + RUNTIME_GETSCOPEQUERYPARAMETERTYPE +) + +func (i GetScopeQueryParameterType) String() string { + return []string{"development", "runtime"}[i] +} +func ParseGetScopeQueryParameterType(v string) (any, error) { + result := DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE + switch v { + case "development": + result = DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE + case "runtime": + result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetScopeQueryParameterType(values []GetScopeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetScopeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go b/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go b/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go b/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go new file mode 100644 index 0000000..382957f --- /dev/null +++ b/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + RESOLVED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "resolved"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "resolved": + result = RESOLVED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item_actions_cache_request_builder.go b/pkg/github/enterprises/item_actions_cache_request_builder.go new file mode 100644 index 0000000..7338548 --- /dev/null +++ b/pkg/github/enterprises/item_actions_cache_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsCacheRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\cache +type ItemActionsCacheRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsCacheRequestBuilderInternal instantiates a new ItemActionsCacheRequestBuilder and sets the default values. +func NewItemActionsCacheRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheRequestBuilder) { + m := &ItemActionsCacheRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/cache", pathParameters), + } + return m +} +// NewItemActionsCacheRequestBuilder instantiates a new ItemActionsCacheRequestBuilder and sets the default values. +func NewItemActionsCacheRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsCacheRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemActionsCacheUsageRequestBuilder when successful +func (m *ItemActionsCacheRequestBuilder) Usage()(*ItemActionsCacheUsageRequestBuilder) { + return NewItemActionsCacheUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_actions_cache_usage_request_builder.go b/pkg/github/enterprises/item_actions_cache_usage_request_builder.go new file mode 100644 index 0000000..8831cba --- /dev/null +++ b/pkg/github/enterprises/item_actions_cache_usage_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsCacheUsageRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\cache\usage +type ItemActionsCacheUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsCacheUsageRequestBuilderInternal instantiates a new ItemActionsCacheUsageRequestBuilder and sets the default values. +func NewItemActionsCacheUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheUsageRequestBuilder) { + m := &ItemActionsCacheUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/cache/usage", pathParameters), + } + return m +} +// NewItemActionsCacheUsageRequestBuilder instantiates a new ItemActionsCacheUsageRequestBuilder and sets the default values. +func NewItemActionsCacheUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsCacheUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the total GitHub Actions cache usage for an enterprise.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a ActionsCacheUsageOrgEnterpriseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#get-github-actions-cache-usage-for-an-enterprise +func (m *ItemActionsCacheUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageOrgEnterpriseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsCacheUsageOrgEnterpriseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageOrgEnterpriseable), nil +} +// ToGetRequestInformation gets the total GitHub Actions cache usage for an enterprise.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsCacheUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsCacheUsageRequestBuilder when successful +func (m *ItemActionsCacheUsageRequestBuilder) WithUrl(rawUrl string)(*ItemActionsCacheUsageRequestBuilder) { + return NewItemActionsCacheUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_oidc_customization_issuer_request_builder.go b/pkg/github/enterprises/item_actions_oidc_customization_issuer_request_builder.go new file mode 100644 index 0000000..a7f35bb --- /dev/null +++ b/pkg/github/enterprises/item_actions_oidc_customization_issuer_request_builder.go @@ -0,0 +1,56 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsOidcCustomizationIssuerRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\oidc\customization\issuer +type ItemActionsOidcCustomizationIssuerRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsOidcCustomizationIssuerRequestBuilderInternal instantiates a new ItemActionsOidcCustomizationIssuerRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationIssuerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationIssuerRequestBuilder) { + m := &ItemActionsOidcCustomizationIssuerRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/oidc/customization/issuer", pathParameters), + } + return m +} +// NewItemActionsOidcCustomizationIssuerRequestBuilder instantiates a new ItemActionsOidcCustomizationIssuerRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationIssuerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationIssuerRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsOidcCustomizationIssuerRequestBuilderInternal(urlParams, requestAdapter) +} +// Put sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/oidc#set-the-github-actions-oidc-custom-issuer-policy-for-an-enterprise +func (m *ItemActionsOidcCustomizationIssuerRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsOidcCustomIssuerPolicyForEnterpriseable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPutRequestInformation sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsOidcCustomizationIssuerRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsOidcCustomIssuerPolicyForEnterpriseable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsOidcCustomizationIssuerRequestBuilder when successful +func (m *ItemActionsOidcCustomizationIssuerRequestBuilder) WithUrl(rawUrl string)(*ItemActionsOidcCustomizationIssuerRequestBuilder) { + return NewItemActionsOidcCustomizationIssuerRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_oidc_customization_request_builder.go b/pkg/github/enterprises/item_actions_oidc_customization_request_builder.go new file mode 100644 index 0000000..70b3e9c --- /dev/null +++ b/pkg/github/enterprises/item_actions_oidc_customization_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsOidcCustomizationRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\oidc\customization +type ItemActionsOidcCustomizationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsOidcCustomizationRequestBuilderInternal instantiates a new ItemActionsOidcCustomizationRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationRequestBuilder) { + m := &ItemActionsOidcCustomizationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/oidc/customization", pathParameters), + } + return m +} +// NewItemActionsOidcCustomizationRequestBuilder instantiates a new ItemActionsOidcCustomizationRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsOidcCustomizationRequestBuilderInternal(urlParams, requestAdapter) +} +// Issuer the issuer property +// returns a *ItemActionsOidcCustomizationIssuerRequestBuilder when successful +func (m *ItemActionsOidcCustomizationRequestBuilder) Issuer()(*ItemActionsOidcCustomizationIssuerRequestBuilder) { + return NewItemActionsOidcCustomizationIssuerRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_actions_oidc_request_builder.go b/pkg/github/enterprises/item_actions_oidc_request_builder.go new file mode 100644 index 0000000..492e320 --- /dev/null +++ b/pkg/github/enterprises/item_actions_oidc_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsOidcRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\oidc +type ItemActionsOidcRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsOidcRequestBuilderInternal instantiates a new ItemActionsOidcRequestBuilder and sets the default values. +func NewItemActionsOidcRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcRequestBuilder) { + m := &ItemActionsOidcRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/oidc", pathParameters), + } + return m +} +// NewItemActionsOidcRequestBuilder instantiates a new ItemActionsOidcRequestBuilder and sets the default values. +func NewItemActionsOidcRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsOidcRequestBuilderInternal(urlParams, requestAdapter) +} +// Customization the customization property +// returns a *ItemActionsOidcCustomizationRequestBuilder when successful +func (m *ItemActionsOidcRequestBuilder) Customization()(*ItemActionsOidcCustomizationRequestBuilder) { + return NewItemActionsOidcCustomizationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_actions_permissions_organizations_get_response.go b/pkg/github/enterprises/item_actions_permissions_organizations_get_response.go new file mode 100644 index 0000000..22914ff --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_organizations_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsPermissionsOrganizationsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The organizations property + organizations []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable + // The total_count property + total_count *float64 +} +// NewItemActionsPermissionsOrganizationsGetResponse instantiates a new ItemActionsPermissionsOrganizationsGetResponse and sets the default values. +func NewItemActionsPermissionsOrganizationsGetResponse()(*ItemActionsPermissionsOrganizationsGetResponse) { + m := &ItemActionsPermissionsOrganizationsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsPermissionsOrganizationsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsPermissionsOrganizationsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsPermissionsOrganizationsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsPermissionsOrganizationsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsPermissionsOrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + } + } + m.SetOrganizations(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetOrganizations gets the organizations property value. The organizations property +// returns a []OrganizationSimpleable when successful +func (m *ItemActionsPermissionsOrganizationsGetResponse) GetOrganizations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) { + return m.organizations +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsPermissionsOrganizationsGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsPermissionsOrganizationsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOrganizations())) + for i, v := range m.GetOrganizations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("organizations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsPermissionsOrganizationsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOrganizations sets the organizations property value. The organizations property +func (m *ItemActionsPermissionsOrganizationsGetResponse) SetOrganizations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable)() { + m.organizations = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsPermissionsOrganizationsGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsPermissionsOrganizationsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + GetTotalCount()(*float64) + SetOrganizations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/enterprises/item_actions_permissions_organizations_put_request_body.go b/pkg/github/enterprises/item_actions_permissions_organizations_put_request_body.go new file mode 100644 index 0000000..49f5b73 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_organizations_put_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsPermissionsOrganizationsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of organization IDs to enable for GitHub Actions. + selected_organization_ids []int32 +} +// NewItemActionsPermissionsOrganizationsPutRequestBody instantiates a new ItemActionsPermissionsOrganizationsPutRequestBody and sets the default values. +func NewItemActionsPermissionsOrganizationsPutRequestBody()(*ItemActionsPermissionsOrganizationsPutRequestBody) { + m := &ItemActionsPermissionsOrganizationsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsPermissionsOrganizationsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsPermissionsOrganizationsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsPermissionsOrganizationsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsPermissionsOrganizationsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsPermissionsOrganizationsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_organization_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedOrganizationIds(res) + } + return nil + } + return res +} +// GetSelectedOrganizationIds gets the selected_organization_ids property value. List of organization IDs to enable for GitHub Actions. +// returns a []int32 when successful +func (m *ItemActionsPermissionsOrganizationsPutRequestBody) GetSelectedOrganizationIds()([]int32) { + return m.selected_organization_ids +} +// Serialize serializes information the current object +func (m *ItemActionsPermissionsOrganizationsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedOrganizationIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_organization_ids", m.GetSelectedOrganizationIds()) + 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 *ItemActionsPermissionsOrganizationsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedOrganizationIds sets the selected_organization_ids property value. List of organization IDs to enable for GitHub Actions. +func (m *ItemActionsPermissionsOrganizationsPutRequestBody) SetSelectedOrganizationIds(value []int32)() { + m.selected_organization_ids = value +} +type ItemActionsPermissionsOrganizationsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedOrganizationIds()([]int32) + SetSelectedOrganizationIds(value []int32)() +} diff --git a/pkg/github/enterprises/item_actions_permissions_organizations_request_builder.go b/pkg/github/enterprises/item_actions_permissions_organizations_request_builder.go new file mode 100644 index 0000000..428b479 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_organizations_request_builder.go @@ -0,0 +1,100 @@ +package enterprises + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsPermissionsOrganizationsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\permissions\organizations +type ItemActionsPermissionsOrganizationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsPermissionsOrganizationsRequestBuilderGetQueryParameters lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +type ItemActionsPermissionsOrganizationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByOrg_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.actions.permissions.organizations.item collection +// returns a *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder when successful +func (m *ItemActionsPermissionsOrganizationsRequestBuilder) ByOrg_id(org_id int32)(*ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["org_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(org_id), 10) + return NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsPermissionsOrganizationsRequestBuilderInternal instantiates a new ItemActionsPermissionsOrganizationsRequestBuilder and sets the default values. +func NewItemActionsPermissionsOrganizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsOrganizationsRequestBuilder) { + m := &ItemActionsPermissionsOrganizationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/permissions/organizations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsPermissionsOrganizationsRequestBuilder instantiates a new ItemActionsPermissionsOrganizationsRequestBuilder and sets the default values. +func NewItemActionsPermissionsOrganizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsOrganizationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsOrganizationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a ItemActionsPermissionsOrganizationsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise +func (m *ItemActionsPermissionsOrganizationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsPermissionsOrganizationsRequestBuilderGetQueryParameters])(ItemActionsPermissionsOrganizationsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsPermissionsOrganizationsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsPermissionsOrganizationsGetResponseable), nil +} +// Put replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise +func (m *ItemActionsPermissionsOrganizationsRequestBuilder) Put(ctx context.Context, body ItemActionsPermissionsOrganizationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsOrganizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsPermissionsOrganizationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsOrganizationsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsPermissionsOrganizationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsOrganizationsRequestBuilder when successful +func (m *ItemActionsPermissionsOrganizationsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsOrganizationsRequestBuilder) { + return NewItemActionsPermissionsOrganizationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_permissions_organizations_with_org_item_request_builder.go b/pkg/github/enterprises/item_actions_permissions_organizations_with_org_item_request_builder.go new file mode 100644 index 0000000..2055f07 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_organizations_with_org_item_request_builder.go @@ -0,0 +1,73 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\permissions\organizations\{org_id} +type ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilderInternal instantiates a new ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder and sets the default values. +func NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) { + m := &ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", pathParameters), + } + return m +} +// NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder instantiates a new ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder and sets the default values. +func NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#disable-a-selected-organization-for-github-actions-in-an-enterprise +func (m *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#enable-a-selected-organization-for-github-actions-in-an-enterprise +func (m *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder when successful +func (m *ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder) { + return NewItemActionsPermissionsOrganizationsWithOrg_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_permissions_put_request_body.go b/pkg/github/enterprises/item_actions_permissions_put_request_body.go new file mode 100644 index 0000000..49b6de6 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_put_request_body.go @@ -0,0 +1,112 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsPermissionsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions policy that controls the actions and reusable workflows that are allowed to run. + allowed_actions *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions + // The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. + enabled_organizations *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledOrganizations +} +// NewItemActionsPermissionsPutRequestBody instantiates a new ItemActionsPermissionsPutRequestBody and sets the default values. +func NewItemActionsPermissionsPutRequestBody()(*ItemActionsPermissionsPutRequestBody) { + m := &ItemActionsPermissionsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsPermissionsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsPermissionsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsPermissionsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsPermissionsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedActions gets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +// returns a *AllowedActions when successful +func (m *ItemActionsPermissionsPutRequestBody) GetAllowedActions()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions) { + return m.allowed_actions +} +// GetEnabledOrganizations gets the enabled_organizations property value. The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. +// returns a *EnabledOrganizations when successful +func (m *ItemActionsPermissionsPutRequestBody) GetEnabledOrganizations()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledOrganizations) { + return m.enabled_organizations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsPermissionsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseAllowedActions) + if err != nil { + return err + } + if val != nil { + m.SetAllowedActions(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)) + } + return nil + } + res["enabled_organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseEnabledOrganizations) + if err != nil { + return err + } + if val != nil { + m.SetEnabledOrganizations(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledOrganizations)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemActionsPermissionsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedActions() != nil { + cast := (*m.GetAllowedActions()).String() + err := writer.WriteStringValue("allowed_actions", &cast) + if err != nil { + return err + } + } + if m.GetEnabledOrganizations() != nil { + cast := (*m.GetEnabledOrganizations()).String() + err := writer.WriteStringValue("enabled_organizations", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemActionsPermissionsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedActions sets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +func (m *ItemActionsPermissionsPutRequestBody) SetAllowedActions(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)() { + m.allowed_actions = value +} +// SetEnabledOrganizations sets the enabled_organizations property value. The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. +func (m *ItemActionsPermissionsPutRequestBody) SetEnabledOrganizations(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledOrganizations)() { + m.enabled_organizations = value +} +type ItemActionsPermissionsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedActions()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions) + GetEnabledOrganizations()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledOrganizations) + SetAllowedActions(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)() + SetEnabledOrganizations(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledOrganizations)() +} diff --git a/pkg/github/enterprises/item_actions_permissions_request_builder.go b/pkg/github/enterprises/item_actions_permissions_request_builder.go new file mode 100644 index 0000000..95ccf31 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_request_builder.go @@ -0,0 +1,98 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsPermissionsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\permissions +type ItemActionsPermissionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsRequestBuilderInternal instantiates a new ItemActionsPermissionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRequestBuilder) { + m := &ItemActionsPermissionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/permissions", pathParameters), + } + return m +} +// NewItemActionsPermissionsRequestBuilder instantiates a new ItemActionsPermissionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a ActionsEnterprisePermissionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-github-actions-permissions-for-an-enterprise +func (m *ItemActionsPermissionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsEnterprisePermissionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsEnterprisePermissionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsEnterprisePermissionsable), nil +} +// Organizations the organizations property +// returns a *ItemActionsPermissionsOrganizationsRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) Organizations()(*ItemActionsPermissionsOrganizationsRequestBuilder) { + return NewItemActionsPermissionsOrganizationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Put sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-github-actions-permissions-for-an-enterprise +func (m *ItemActionsPermissionsRequestBuilder) Put(ctx context.Context, body ItemActionsPermissionsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// SelectedActions the selectedActions property +// returns a *ItemActionsPermissionsSelectedActionsRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) SelectedActions()(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + return NewItemActionsPermissionsSelectedActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsPermissionsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsRequestBuilder) { + return NewItemActionsPermissionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} +// Workflow the workflow property +// returns a *ItemActionsPermissionsWorkflowRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) Workflow()(*ItemActionsPermissionsWorkflowRequestBuilder) { + return NewItemActionsPermissionsWorkflowRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_actions_permissions_selected_actions_request_builder.go b/pkg/github/enterprises/item_actions_permissions_selected_actions_request_builder.go new file mode 100644 index 0000000..127e270 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_selected_actions_request_builder.go @@ -0,0 +1,83 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsPermissionsSelectedActionsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\permissions\selected-actions +type ItemActionsPermissionsSelectedActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsSelectedActionsRequestBuilderInternal instantiates a new ItemActionsPermissionsSelectedActionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsSelectedActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + m := &ItemActionsPermissionsSelectedActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/permissions/selected-actions", pathParameters), + } + return m +} +// NewItemActionsPermissionsSelectedActionsRequestBuilder instantiates a new ItemActionsPermissionsSelectedActionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsSelectedActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsSelectedActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a SelectedActionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-enterprise +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSelectedActionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable), nil +} +// Put sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-enterprise +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsSelectedActionsRequestBuilder when successful +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + return NewItemActionsPermissionsSelectedActionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_permissions_workflow_request_builder.go b/pkg/github/enterprises/item_actions_permissions_workflow_request_builder.go new file mode 100644 index 0000000..ef6c7b9 --- /dev/null +++ b/pkg/github/enterprises/item_actions_permissions_workflow_request_builder.go @@ -0,0 +1,83 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsPermissionsWorkflowRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\permissions\workflow +type ItemActionsPermissionsWorkflowRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsWorkflowRequestBuilderInternal instantiates a new ItemActionsPermissionsWorkflowRequestBuilder and sets the default values. +func NewItemActionsPermissionsWorkflowRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsWorkflowRequestBuilder) { + m := &ItemActionsPermissionsWorkflowRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/permissions/workflow", pathParameters), + } + return m +} +// NewItemActionsPermissionsWorkflowRequestBuilder instantiates a new ItemActionsPermissionsWorkflowRequestBuilder and sets the default values. +func NewItemActionsPermissionsWorkflowRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsWorkflowRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsWorkflowRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise,as well as whether GitHub Actions can submit approving pull request reviews. For more information, see"[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."OAuth tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a ActionsGetDefaultWorkflowPermissionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-default-workflow-permissions-for-an-enterprise +func (m *ItemActionsPermissionsWorkflowRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsGetDefaultWorkflowPermissionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsGetDefaultWorkflowPermissionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsGetDefaultWorkflowPermissionsable), nil +} +// Put sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and setswhether GitHub Actions can submit approving pull request reviews. For more information, see"[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-default-workflow-permissions-for-an-enterprise +func (m *ItemActionsPermissionsWorkflowRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSetDefaultWorkflowPermissionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise,as well as whether GitHub Actions can submit approving pull request reviews. For more information, see"[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."OAuth tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsWorkflowRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and setswhether GitHub Actions can submit approving pull request reviews. For more information, see"[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsWorkflowRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSetDefaultWorkflowPermissionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsWorkflowRequestBuilder when successful +func (m *ItemActionsPermissionsWorkflowRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsWorkflowRequestBuilder) { + return NewItemActionsPermissionsWorkflowRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_request_builder.go b/pkg/github/enterprises/item_actions_request_builder.go new file mode 100644 index 0000000..771bf0c --- /dev/null +++ b/pkg/github/enterprises/item_actions_request_builder.go @@ -0,0 +1,48 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions +type ItemActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Cache the cache property +// returns a *ItemActionsCacheRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Cache()(*ItemActionsCacheRequestBuilder) { + return NewItemActionsCacheRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRequestBuilderInternal instantiates a new ItemActionsRequestBuilder and sets the default values. +func NewItemActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRequestBuilder) { + m := &ItemActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions", pathParameters), + } + return m +} +// NewItemActionsRequestBuilder instantiates a new ItemActionsRequestBuilder and sets the default values. +func NewItemActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Oidc the oidc property +// returns a *ItemActionsOidcRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Oidc()(*ItemActionsOidcRequestBuilder) { + return NewItemActionsOidcRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Permissions the permissions property +// returns a *ItemActionsPermissionsRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Permissions()(*ItemActionsPermissionsRequestBuilder) { + return NewItemActionsPermissionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RunnerGroups the runnerGroups property +// returns a *ItemActionsRunnerGroupsRequestBuilder when successful +func (m *ItemActionsRequestBuilder) RunnerGroups()(*ItemActionsRunnerGroupsRequestBuilder) { + return NewItemActionsRunnerGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Runners the runners property +// returns a *ItemActionsRunnersRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Runners()(*ItemActionsRunnersRequestBuilder) { + return NewItemActionsRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_get_response.go b/pkg/github/enterprises/item_actions_runner_groups_get_response.go new file mode 100644 index 0000000..6060efc --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnerGroupsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runner_groups property + runner_groups []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsGetResponse instantiates a new ItemActionsRunnerGroupsGetResponse and sets the default values. +func NewItemActionsRunnerGroupsGetResponse()(*ItemActionsRunnerGroupsGetResponse) { + m := &ItemActionsRunnerGroupsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runner_groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsEnterpriseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable) + } + } + m.SetRunnerGroups(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunnerGroups gets the runner_groups property value. The runner_groups property +// returns a []RunnerGroupsEnterpriseable when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetRunnerGroups()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable) { + return m.runner_groups +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunnerGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunnerGroups())) + for i, v := range m.GetRunnerGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runner_groups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunnerGroups sets the runner_groups property value. The runner_groups property +func (m *ItemActionsRunnerGroupsGetResponse) SetRunnerGroups(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable)() { + m.runner_groups = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunnerGroups()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable) + GetTotalCount()(*float64) + SetRunnerGroups(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_organizations_get_response.go b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_get_response.go new file mode 100644 index 0000000..15acd52 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnerGroupsItemOrganizationsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The organizations property + organizations []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsItemOrganizationsGetResponse instantiates a new ItemActionsRunnerGroupsItemOrganizationsGetResponse and sets the default values. +func NewItemActionsRunnerGroupsItemOrganizationsGetResponse()(*ItemActionsRunnerGroupsItemOrganizationsGetResponse) { + m := &ItemActionsRunnerGroupsItemOrganizationsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemOrganizationsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemOrganizationsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemOrganizationsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + } + } + m.SetOrganizations(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetOrganizations gets the organizations property value. The organizations property +// returns a []OrganizationSimpleable when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) GetOrganizations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) { + return m.organizations +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOrganizations())) + for i, v := range m.GetOrganizations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("organizations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsItemOrganizationsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOrganizations sets the organizations property value. The organizations property +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) SetOrganizations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable)() { + m.organizations = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsItemOrganizationsGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsItemOrganizationsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + GetTotalCount()(*float64) + SetOrganizations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_organizations_put_request_body.go b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_put_request_body.go new file mode 100644 index 0000000..1fee7a9 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_put_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsItemOrganizationsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of organization IDs that can access the runner group. + selected_organization_ids []int32 +} +// NewItemActionsRunnerGroupsItemOrganizationsPutRequestBody instantiates a new ItemActionsRunnerGroupsItemOrganizationsPutRequestBody and sets the default values. +func NewItemActionsRunnerGroupsItemOrganizationsPutRequestBody()(*ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) { + m := &ItemActionsRunnerGroupsItemOrganizationsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemOrganizationsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemOrganizationsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemOrganizationsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_organization_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedOrganizationIds(res) + } + return nil + } + return res +} +// GetSelectedOrganizationIds gets the selected_organization_ids property value. List of organization IDs that can access the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) GetSelectedOrganizationIds()([]int32) { + return m.selected_organization_ids +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedOrganizationIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_organization_ids", m.GetSelectedOrganizationIds()) + 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 *ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedOrganizationIds sets the selected_organization_ids property value. List of organization IDs that can access the runner group. +func (m *ItemActionsRunnerGroupsItemOrganizationsPutRequestBody) SetSelectedOrganizationIds(value []int32)() { + m.selected_organization_ids = value +} +type ItemActionsRunnerGroupsItemOrganizationsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedOrganizationIds()([]int32) + SetSelectedOrganizationIds(value []int32)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_organizations_request_builder.go b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_request_builder.go new file mode 100644 index 0000000..9053c4c --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_request_builder.go @@ -0,0 +1,100 @@ +package enterprises + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemOrganizationsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runner-groups\{runner_group_id}\organizations +type ItemActionsRunnerGroupsItemOrganizationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsItemOrganizationsRequestBuilderGetQueryParameters lists the organizations with access to a self-hosted runner group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +type ItemActionsRunnerGroupsItemOrganizationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByOrg_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.actions.runnerGroups.item.organizations.item collection +// returns a *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) ByOrg_id(org_id int32)(*ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["org_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(org_id), 10) + return NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnerGroupsItemOrganizationsRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemOrganizationsRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemOrganizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) { + m := &ItemActionsRunnerGroupsItemOrganizationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemOrganizationsRequestBuilder instantiates a new ItemActionsRunnerGroupsItemOrganizationsRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemOrganizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemOrganizationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the organizations with access to a self-hosted runner group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsItemOrganizationsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-organization-access-to-a-self-hosted-runner-group-in-an-enterprise +func (m *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemOrganizationsRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsItemOrganizationsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsItemOrganizationsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsItemOrganizationsGetResponseable), nil +} +// Put replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#set-organization-access-for-a-self-hosted-runner-group-in-an-enterprise +func (m *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) Put(ctx context.Context, body ItemActionsRunnerGroupsItemOrganizationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists the organizations with access to a self-hosted runner group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemOrganizationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsItemOrganizationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) { + return NewItemActionsRunnerGroupsItemOrganizationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_organizations_with_org_item_request_builder.go b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_with_org_item_request_builder.go new file mode 100644 index 0000000..30856c3 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_organizations_with_org_item_request_builder.go @@ -0,0 +1,73 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runner-groups\{runner_group_id}\organizations\{org_id} +type ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) { + m := &ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder instantiates a new ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise +func (m *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise +func (m *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder) { + return NewItemActionsRunnerGroupsItemOrganizationsWithOrg_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_runners_get_response.go b/pkg/github/enterprises/item_actions_runner_groups_item_runners_get_response.go new file mode 100644 index 0000000..c511851 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_runners_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnerGroupsItemRunnersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runners property + runners []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsItemRunnersGetResponse instantiates a new ItemActionsRunnerGroupsItemRunnersGetResponse and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersGetResponse()(*ItemActionsRunnerGroupsItemRunnersGetResponse) { + m := &ItemActionsRunnerGroupsItemRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemRunnersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []Runnerable when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsItemRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsItemRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + GetTotalCount()(*float64) + SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_runners_put_request_body.go b/pkg/github/enterprises/item_actions_runner_groups_item_runners_put_request_body.go new file mode 100644 index 0000000..c01da42 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_runners_put_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsItemRunnersPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of runner IDs to add to the runner group. + runners []int32 +} +// NewItemActionsRunnerGroupsItemRunnersPutRequestBody instantiates a new ItemActionsRunnerGroupsItemRunnersPutRequestBody and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersPutRequestBody()(*ItemActionsRunnerGroupsItemRunnersPutRequestBody) { + m := &ItemActionsRunnerGroupsItemRunnersPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemRunnersPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemRunnersPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemRunnersPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetRunners(res) + } + return nil + } + return res +} +// GetRunners gets the runners property value. List of runner IDs to add to the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) GetRunners()([]int32) { + return m.runners +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + err := writer.WriteCollectionOfInt32Values("runners", m.GetRunners()) + 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 *ItemActionsRunnerGroupsItemRunnersPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. List of runner IDs to add to the runner group. +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) SetRunners(value []int32)() { + m.runners = value +} +type ItemActionsRunnerGroupsItemRunnersPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]int32) + SetRunners(value []int32)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_runners_request_builder.go b/pkg/github/enterprises/item_actions_runner_groups_item_runners_request_builder.go new file mode 100644 index 0000000..d9a0501 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_runners_request_builder.go @@ -0,0 +1,100 @@ +package enterprises + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemRunnersRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runner-groups\{runner_group_id}\runners +type ItemActionsRunnerGroupsItemRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters lists the self-hosted runners that are in a specific enterprise group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +type ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRunner_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.actions.runnerGroups.item.runners.item collection +// returns a *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) ByRunner_id(runner_id int32)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_id), 10) + return NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + m := &ItemActionsRunnerGroupsItemRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemRunnersRequestBuilder instantiates a new ItemActionsRunnerGroupsItemRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the self-hosted runners that are in a specific enterprise group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsItemRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsItemRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsItemRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsItemRunnersGetResponseable), nil +} +// Put replaces the list of self-hosted runners that are part of an enterprise runner group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) Put(ctx context.Context, body ItemActionsRunnerGroupsItemRunnersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists the self-hosted runners that are in a specific enterprise group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces the list of self-hosted runners that are part of an enterprise runner group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsItemRunnersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemRunnersRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + return NewItemActionsRunnerGroupsItemRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_runners_with_runner_item_request_builder.go b/pkg/github/enterprises/item_actions_runner_groups_item_runners_with_runner_item_request_builder.go new file mode 100644 index 0000000..db0134c --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_runners_with_runner_item_request_builder.go @@ -0,0 +1,73 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runner-groups\{runner_group_id}\runners\{runner_id} +type ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + m := &ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder instantiates a new ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a self-hosted runner to a runner group configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a self-hosted runner to a runner group configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + return NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_item_with_runner_group_patch_request_body.go b/pkg/github/enterprises/item_actions_runner_groups_item_with_runner_group_patch_request_body.go new file mode 100644 index 0000000..4131e5d --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_item_with_runner_group_patch_request_body.go @@ -0,0 +1,173 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the runner group can be used by `public` repositories. + allows_public_repositories *bool + // Name of the runner group. + name *string + // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + restricted_to_workflows *bool + // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + selected_workflows []string +} +// NewItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody instantiates a new ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody and sets the default values. +func NewItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody()(*ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) { + m := &ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowsPublicRepositories gets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetAllowsPublicRepositories()(*bool) { + return m.allows_public_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsPublicRepositories(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["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictedToWorkflows(val) + } + return nil + } + res["selected_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedWorkflows(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the runner group. +// returns a *string when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetRestrictedToWorkflows()(*bool) { + return m.restricted_to_workflows +} +// GetSelectedWorkflows gets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +// returns a []string when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetSelectedWorkflows()([]string) { + return m.selected_workflows +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allows_public_repositories", m.GetAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) + if err != nil { + return err + } + } + if m.GetSelectedWorkflows() != nil { + err := writer.WriteCollectionOfStringValues("selected_workflows", m.GetSelectedWorkflows()) + 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 *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowsPublicRepositories sets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetAllowsPublicRepositories(value *bool)() { + m.allows_public_repositories = value +} +// SetName sets the name property value. Name of the runner group. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetRestrictedToWorkflows(value *bool)() { + m.restricted_to_workflows = value +} +// SetSelectedWorkflows sets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetSelectedWorkflows(value []string)() { + m.selected_workflows = value +} +type ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsPublicRepositories()(*bool) + GetName()(*string) + GetRestrictedToWorkflows()(*bool) + GetSelectedWorkflows()([]string) + SetAllowsPublicRepositories(value *bool)() + SetName(value *string)() + SetRestrictedToWorkflows(value *bool)() + SetSelectedWorkflows(value []string)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_post_request_body.go b/pkg/github/enterprises/item_actions_runner_groups_post_request_body.go new file mode 100644 index 0000000..fa812a7 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_post_request_body.go @@ -0,0 +1,243 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the runner group can be used by `public` repositories. + allows_public_repositories *bool + // Name of the runner group. + name *string + // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + restricted_to_workflows *bool + // List of runner IDs to add to the runner group. + runners []int32 + // List of organization IDs that can access the runner group. + selected_organization_ids []int32 + // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + selected_workflows []string +} +// NewItemActionsRunnerGroupsPostRequestBody instantiates a new ItemActionsRunnerGroupsPostRequestBody and sets the default values. +func NewItemActionsRunnerGroupsPostRequestBody()(*ItemActionsRunnerGroupsPostRequestBody) { + m := &ItemActionsRunnerGroupsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowsPublicRepositories gets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetAllowsPublicRepositories()(*bool) { + return m.allows_public_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsPublicRepositories(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["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictedToWorkflows(val) + } + return nil + } + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetRunners(res) + } + return nil + } + res["selected_organization_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedOrganizationIds(res) + } + return nil + } + res["selected_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedWorkflows(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the runner group. +// returns a *string when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetName()(*string) { + return m.name +} +// GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetRestrictedToWorkflows()(*bool) { + return m.restricted_to_workflows +} +// GetRunners gets the runners property value. List of runner IDs to add to the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetRunners()([]int32) { + return m.runners +} +// GetSelectedOrganizationIds gets the selected_organization_ids property value. List of organization IDs that can access the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetSelectedOrganizationIds()([]int32) { + return m.selected_organization_ids +} +// GetSelectedWorkflows gets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +// returns a []string when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetSelectedWorkflows()([]string) { + return m.selected_workflows +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allows_public_repositories", m.GetAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) + if err != nil { + return err + } + } + if m.GetRunners() != nil { + err := writer.WriteCollectionOfInt32Values("runners", m.GetRunners()) + if err != nil { + return err + } + } + if m.GetSelectedOrganizationIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_organization_ids", m.GetSelectedOrganizationIds()) + if err != nil { + return err + } + } + if m.GetSelectedWorkflows() != nil { + err := writer.WriteCollectionOfStringValues("selected_workflows", m.GetSelectedWorkflows()) + 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 *ItemActionsRunnerGroupsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowsPublicRepositories sets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetAllowsPublicRepositories(value *bool)() { + m.allows_public_repositories = value +} +// SetName sets the name property value. Name of the runner group. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetRestrictedToWorkflows(value *bool)() { + m.restricted_to_workflows = value +} +// SetRunners sets the runners property value. List of runner IDs to add to the runner group. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetRunners(value []int32)() { + m.runners = value +} +// SetSelectedOrganizationIds sets the selected_organization_ids property value. List of organization IDs that can access the runner group. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetSelectedOrganizationIds(value []int32)() { + m.selected_organization_ids = value +} +// SetSelectedWorkflows sets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetSelectedWorkflows(value []string)() { + m.selected_workflows = value +} +type ItemActionsRunnerGroupsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsPublicRepositories()(*bool) + GetName()(*string) + GetRestrictedToWorkflows()(*bool) + GetRunners()([]int32) + GetSelectedOrganizationIds()([]int32) + GetSelectedWorkflows()([]string) + SetAllowsPublicRepositories(value *bool)() + SetName(value *string)() + SetRestrictedToWorkflows(value *bool)() + SetRunners(value []int32)() + SetSelectedOrganizationIds(value []int32)() + SetSelectedWorkflows(value []string)() +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_request_builder.go b/pkg/github/enterprises/item_actions_runner_groups_request_builder.go new file mode 100644 index 0000000..dd42ca1 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_request_builder.go @@ -0,0 +1,108 @@ +package enterprises + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnerGroupsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runner-groups +type ItemActionsRunnerGroupsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsRequestBuilderGetQueryParameters lists all self-hosted runner groups for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +type ItemActionsRunnerGroupsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only return runner groups that are allowed to be used by this organization. + Visible_to_organization *string `uriparametername:"visible_to_organization"` +} +// ByRunner_group_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.actions.runnerGroups.item collection +// returns a *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) ByRunner_group_id(runner_group_id int32)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_group_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_group_id), 10) + return NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnerGroupsRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsRequestBuilder) { + m := &ItemActionsRunnerGroupsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runner-groups{?page*,per_page*,visible_to_organization*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsRequestBuilder instantiates a new ItemActionsRunnerGroupsRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all self-hosted runner groups for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-enterprise +func (m *ItemActionsRunnerGroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsGetResponseable), nil +} +// Post creates a new self-hosted runner group for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a RunnerGroupsEnterpriseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsRequestBuilder) Post(ctx context.Context, body ItemActionsRunnerGroupsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsEnterpriseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable), nil +} +// ToGetRequestInformation lists all self-hosted runner groups for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new self-hosted runner group for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsRequestBuilder when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsRequestBuilder) { + return NewItemActionsRunnerGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runner_groups_with_runner_group_item_request_builder.go b/pkg/github/enterprises/item_actions_runner_groups_with_runner_group_item_request_builder.go new file mode 100644 index 0000000..1b23650 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runner_groups_with_runner_group_item_request_builder.go @@ -0,0 +1,120 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runner-groups\{runner_group_id} +type ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + m := &ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder instantiates a new ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a self-hosted runner group for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-enterprise +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific self-hosted runner group for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a RunnerGroupsEnterpriseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsEnterpriseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable), nil +} +// Organizations the organizations property +// returns a *ItemActionsRunnerGroupsItemOrganizationsRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Organizations()(*ItemActionsRunnerGroupsItemOrganizationsRequestBuilder) { + return NewItemActionsRunnerGroupsItemOrganizationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch updates the `name` and `visibility` of a self-hosted runner group in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a RunnerGroupsEnterpriseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-enterprise +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Patch(ctx context.Context, body ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsEnterpriseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsEnterpriseable), nil +} +// Runners the runners property +// returns a *ItemActionsRunnerGroupsItemRunnersRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Runners()(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + return NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a self-hosted runner group for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific self-hosted runner group for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the `name` and `visibility` of a self-hosted runner group in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + return NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_downloads_request_builder.go b/pkg/github/enterprises/item_actions_runners_downloads_request_builder.go new file mode 100644 index 0000000..b269d55 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_downloads_request_builder.go @@ -0,0 +1,60 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersDownloadsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\downloads +type ItemActionsRunnersDownloadsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersDownloadsRequestBuilderInternal instantiates a new ItemActionsRunnersDownloadsRequestBuilder and sets the default values. +func NewItemActionsRunnersDownloadsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersDownloadsRequestBuilder) { + m := &ItemActionsRunnersDownloadsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/downloads", pathParameters), + } + return m +} +// NewItemActionsRunnersDownloadsRequestBuilder instantiates a new ItemActionsRunnersDownloadsRequestBuilder and sets the default values. +func NewItemActionsRunnersDownloadsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersDownloadsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersDownloadsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists binaries for the runner application that you can download and run.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a []RunnerApplicationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-runner-applications-for-an-enterprise +func (m *ItemActionsRunnersDownloadsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerApplicationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable) + } + } + return val, nil +} +// ToGetRequestInformation lists binaries for the runner application that you can download and run.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersDownloadsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersDownloadsRequestBuilder when successful +func (m *ItemActionsRunnersDownloadsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersDownloadsRequestBuilder) { + return NewItemActionsRunnersDownloadsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_generate_jitconfig_post_request_body.go b/pkg/github/enterprises/item_actions_runners_generate_jitconfig_post_request_body.go new file mode 100644 index 0000000..35dadf7 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_generate_jitconfig_post_request_body.go @@ -0,0 +1,175 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnersGenerateJitconfigPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. + labels []string + // The name of the new runner. + name *string + // The ID of the runner group to register the runner to. + runner_group_id *int32 + // The working directory to be used for job execution, relative to the runner install directory. + work_folder *string +} +// NewItemActionsRunnersGenerateJitconfigPostRequestBody instantiates a new ItemActionsRunnersGenerateJitconfigPostRequestBody and sets the default values. +func NewItemActionsRunnersGenerateJitconfigPostRequestBody()(*ItemActionsRunnersGenerateJitconfigPostRequestBody) { + m := &ItemActionsRunnersGenerateJitconfigPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + work_folderValue := "_work" + m.SetWorkFolder(&work_folderValue) + return m +} +// CreateItemActionsRunnersGenerateJitconfigPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersGenerateJitconfigPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersGenerateJitconfigPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + res["work_folder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkFolder(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +// returns a []string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetLabels()([]string) { + return m.labels +} +// GetName gets the name property value. The name of the new runner. +// returns a *string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetName()(*string) { + return m.name +} +// GetRunnerGroupId gets the runner_group_id property value. The ID of the runner group to register the runner to. +// returns a *int32 when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetWorkFolder gets the work_folder property value. The working directory to be used for job execution, relative to the runner install directory. +// returns a *string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetWorkFolder()(*string) { + return m.work_folder +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("work_folder", m.GetWorkFolder()) + 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 *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +// SetName sets the name property value. The name of the new runner. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRunnerGroupId sets the runner_group_id property value. The ID of the runner group to register the runner to. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetWorkFolder sets the work_folder property value. The working directory to be used for job execution, relative to the runner install directory. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetWorkFolder(value *string)() { + m.work_folder = value +} +type ItemActionsRunnersGenerateJitconfigPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + GetName()(*string) + GetRunnerGroupId()(*int32) + GetWorkFolder()(*string) + SetLabels(value []string)() + SetName(value *string)() + SetRunnerGroupId(value *int32)() + SetWorkFolder(value *string)() +} diff --git a/pkg/github/enterprises/item_actions_runners_generate_jitconfig_post_response.go b/pkg/github/enterprises/item_actions_runners_generate_jitconfig_post_response.go new file mode 100644 index 0000000..4cb842a --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_generate_jitconfig_post_response.go @@ -0,0 +1,110 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersGenerateJitconfigPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The base64 encoded runner configuration. + encoded_jit_config *string + // A self hosted runner + runner i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable +} +// NewItemActionsRunnersGenerateJitconfigPostResponse instantiates a new ItemActionsRunnersGenerateJitconfigPostResponse and sets the default values. +func NewItemActionsRunnersGenerateJitconfigPostResponse()(*ItemActionsRunnersGenerateJitconfigPostResponse) { + m := &ItemActionsRunnersGenerateJitconfigPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersGenerateJitconfigPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncodedJitConfig gets the encoded_jit_config property value. The base64 encoded runner configuration. +// returns a *string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetEncodedJitConfig()(*string) { + return m.encoded_jit_config +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encoded_jit_config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncodedJitConfig(val) + } + return nil + } + res["runner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunner(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)) + } + return nil + } + return res +} +// GetRunner gets the runner property value. A self hosted runner +// returns a Runnerable when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetRunner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runner +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encoded_jit_config", m.GetEncodedJitConfig()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("runner", m.GetRunner()) + 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 *ItemActionsRunnersGenerateJitconfigPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncodedJitConfig sets the encoded_jit_config property value. The base64 encoded runner configuration. +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) SetEncodedJitConfig(value *string)() { + m.encoded_jit_config = value +} +// SetRunner sets the runner property value. A self hosted runner +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) SetRunner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runner = value +} +type ItemActionsRunnersGenerateJitconfigPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncodedJitConfig()(*string) + GetRunner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + SetEncodedJitConfig(value *string)() + SetRunner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() +} diff --git a/pkg/github/enterprises/item_actions_runners_generate_jitconfig_request_builder.go b/pkg/github/enterprises/item_actions_runners_generate_jitconfig_request_builder.go new file mode 100644 index 0000000..1b42131 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_generate_jitconfig_request_builder.go @@ -0,0 +1,67 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersGenerateJitconfigRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\generate-jitconfig +type ItemActionsRunnersGenerateJitconfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal instantiates a new ItemActionsRunnersGenerateJitconfigRequestBuilder and sets the default values. +func NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + m := &ItemActionsRunnersGenerateJitconfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/generate-jitconfig", pathParameters), + } + return m +} +// NewItemActionsRunnersGenerateJitconfigRequestBuilder instantiates a new ItemActionsRunnersGenerateJitconfigRequestBuilder and sets the default values. +func NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal(urlParams, requestAdapter) +} +// Post generates a configuration that can be passed to the runner application at startup.OAuth tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersGenerateJitconfigPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-enterprise +func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context.Context, body ItemActionsRunnersGenerateJitconfigPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersGenerateJitconfigPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersGenerateJitconfigPostResponseable), nil +} +// ToPostRequestInformation generates a configuration that can be passed to the runner application at startup.OAuth tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsRunnersGenerateJitconfigPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersGenerateJitconfigRequestBuilder when successful +func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + return NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_get_response.go b/pkg/github/enterprises/item_actions_runners_get_response.go new file mode 100644 index 0000000..3d91d8a --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runners property + runners []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnersGetResponse instantiates a new ItemActionsRunnersGetResponse and sets the default values. +func NewItemActionsRunnersGetResponse()(*ItemActionsRunnersGetResponse) { + m := &ItemActionsRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []Runnerable when successful +func (m *ItemActionsRunnersGetResponse) GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnersGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemActionsRunnersGetResponse) SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + GetTotalCount()(*float64) + SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_delete_response.go b/pkg/github/enterprises/item_actions_runners_item_labels_delete_response.go new file mode 100644 index 0000000..64dedf6 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_delete_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsDeleteResponse instantiates a new ItemActionsRunnersItemLabelsDeleteResponse and sets the default values. +func NewItemActionsRunnersItemLabelsDeleteResponse()(*ItemActionsRunnersItemLabelsDeleteResponse) { + m := &ItemActionsRunnersItemLabelsDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsDeleteResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsDeleteResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_get_response.go b/pkg/github/enterprises/item_actions_runners_item_labels_get_response.go new file mode 100644 index 0000000..4aa41e1 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsGetResponse instantiates a new ItemActionsRunnersItemLabelsGetResponse and sets the default values. +func NewItemActionsRunnersItemLabelsGetResponse()(*ItemActionsRunnersItemLabelsGetResponse) { + m := &ItemActionsRunnersItemLabelsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsGetResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_item_with_name_delete_response.go b/pkg/github/enterprises/item_actions_runners_item_labels_item_with_name_delete_response.go new file mode 100644 index 0000000..966b2ab --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_item_with_name_delete_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsItemWithNameDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsItemWithNameDeleteResponse instantiates a new ItemActionsRunnersItemLabelsItemWithNameDeleteResponse and sets the default values. +func NewItemActionsRunnersItemLabelsItemWithNameDeleteResponse()(*ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) { + m := &ItemActionsRunnersItemLabelsItemWithNameDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsItemWithNameDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_post_request_body.go b/pkg/github/enterprises/item_actions_runners_item_labels_post_request_body.go new file mode 100644 index 0000000..8246fdd --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_post_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnersItemLabelsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to add to the runner. + labels []string +} +// NewItemActionsRunnersItemLabelsPostRequestBody instantiates a new ItemActionsRunnersItemLabelsPostRequestBody and sets the default values. +func NewItemActionsRunnersItemLabelsPostRequestBody()(*ItemActionsRunnersItemLabelsPostRequestBody) { + m := &ItemActionsRunnersItemLabelsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to add to the runner. +// returns a []string when successful +func (m *ItemActionsRunnersItemLabelsPostRequestBody) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemActionsRunnersItemLabelsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to add to the runner. +func (m *ItemActionsRunnersItemLabelsPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +type ItemActionsRunnersItemLabelsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_post_response.go b/pkg/github/enterprises/item_actions_runners_item_labels_post_response.go new file mode 100644 index 0000000..4aef7ef --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_post_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsPostResponse instantiates a new ItemActionsRunnersItemLabelsPostResponse and sets the default values. +func NewItemActionsRunnersItemLabelsPostResponse()(*ItemActionsRunnersItemLabelsPostResponse) { + m := &ItemActionsRunnersItemLabelsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsPostResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsPostResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_put_request_body.go b/pkg/github/enterprises/item_actions_runners_item_labels_put_request_body.go new file mode 100644 index 0000000..7536327 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_put_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnersItemLabelsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. + labels []string +} +// NewItemActionsRunnersItemLabelsPutRequestBody instantiates a new ItemActionsRunnersItemLabelsPutRequestBody and sets the default values. +func NewItemActionsRunnersItemLabelsPutRequestBody()(*ItemActionsRunnersItemLabelsPutRequestBody) { + m := &ItemActionsRunnersItemLabelsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +// returns a []string when successful +func (m *ItemActionsRunnersItemLabelsPutRequestBody) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemActionsRunnersItemLabelsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +func (m *ItemActionsRunnersItemLabelsPutRequestBody) SetLabels(value []string)() { + m.labels = value +} +type ItemActionsRunnersItemLabelsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_put_response.go b/pkg/github/enterprises/item_actions_runners_item_labels_put_response.go new file mode 100644 index 0000000..37eb703 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_put_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsPutResponse instantiates a new ItemActionsRunnersItemLabelsPutResponse and sets the default values. +func NewItemActionsRunnersItemLabelsPutResponse()(*ItemActionsRunnersItemLabelsPutResponse) { + m := &ItemActionsRunnersItemLabelsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsPutResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsPutResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_request_builder.go b/pkg/github/enterprises/item_actions_runners_item_labels_request_builder.go new file mode 100644 index 0000000..711e9d2 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_request_builder.go @@ -0,0 +1,180 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersItemLabelsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\{runner_id}\labels +type ItemActionsRunnersItemLabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.actions.runners.item.labels.item collection +// returns a *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ByName(name string)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnersItemLabelsRequestBuilderInternal instantiates a new ItemActionsRunnersItemLabelsRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsRequestBuilder) { + m := &ItemActionsRunnersItemLabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/{runner_id}/labels", pathParameters), + } + return m +} +// NewItemActionsRunnersItemLabelsRequestBuilder instantiates a new ItemActionsRunnersItemLabelsRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersItemLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove all custom labels from a self-hosted runner configured in anenterprise. Returns the remaining read-only labels from the runner.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersItemLabelsDeleteResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsDeleteResponseable), nil +} +// Get lists all labels for a self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersItemLabelsGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-an-enterprise +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsGetResponseable), nil +} +// Post add custom labels to a self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersItemLabelsPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Post(ctx context.Context, body ItemActionsRunnersItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsPostResponseable), nil +} +// Put remove all previous custom labels and set the new custom labels for a specificself-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersItemLabelsPutResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Put(ctx context.Context, body ItemActionsRunnersItemLabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsPutResponseable), nil +} +// ToDeleteRequestInformation remove all custom labels from a self-hosted runner configured in anenterprise. Returns the remaining read-only labels from the runner.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation lists all labels for a self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation add custom labels to a self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsRunnersItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation remove all previous custom labels and set the new custom labels for a specificself-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsRunnersItemLabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersItemLabelsRequestBuilder when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersItemLabelsRequestBuilder) { + return NewItemActionsRunnersItemLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_item_labels_with_name_item_request_builder.go b/pkg/github/enterprises/item_actions_runners_item_labels_with_name_item_request_builder.go new file mode 100644 index 0000000..63d28bc --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_item_labels_with_name_item_request_builder.go @@ -0,0 +1,63 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersItemLabelsWithNameItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\{runner_id}\labels\{name} +type ItemActionsRunnersItemLabelsWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal instantiates a new ItemActionsRunnersItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + m := &ItemActionsRunnersItemLabelsWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", pathParameters), + } + return m +} +// NewItemActionsRunnersItemLabelsWithNameItemRequestBuilder instantiates a new ItemActionsRunnersItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove a custom label from a self-hosted runner configuredin an enterprise. Returns the remaining labels from the runner.This endpoint returns a `404 Not Found` status if the custom label is notpresent on the runner.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise +func (m *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable), nil +} +// ToDeleteRequestInformation remove a custom label from a self-hosted runner configuredin an enterprise. Returns the remaining labels from the runner.This endpoint returns a `404 Not Found` status if the custom label is notpresent on the runner.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + return NewItemActionsRunnersItemLabelsWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_registration_token_request_builder.go b/pkg/github/enterprises/item_actions_runners_registration_token_request_builder.go new file mode 100644 index 0000000..f1271a7 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_registration_token_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersRegistrationTokenRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\registration-token +type ItemActionsRunnersRegistrationTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersRegistrationTokenRequestBuilderInternal instantiates a new ItemActionsRunnersRegistrationTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRegistrationTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + m := &ItemActionsRunnersRegistrationTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/registration-token", pathParameters), + } + return m +} +// NewItemActionsRunnersRegistrationTokenRequestBuilder instantiates a new ItemActionsRunnersRegistrationTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRegistrationTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersRegistrationTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post returns a token that you can pass to the `config` script. The token expires after one hour.Example using registration token:Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.```./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN```OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a AuthenticationTokenable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-registration-token-for-an-enterprise +func (m *ItemActionsRunnersRegistrationTokenRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthenticationTokenFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable), nil +} +// ToPostRequestInformation returns a token that you can pass to the `config` script. The token expires after one hour.Example using registration token:Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.```./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN```OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersRegistrationTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersRegistrationTokenRequestBuilder when successful +func (m *ItemActionsRunnersRegistrationTokenRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + return NewItemActionsRunnersRegistrationTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_remove_token_request_builder.go b/pkg/github/enterprises/item_actions_runners_remove_token_request_builder.go new file mode 100644 index 0000000..dbdf9a9 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_remove_token_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersRemoveTokenRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\remove-token +type ItemActionsRunnersRemoveTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersRemoveTokenRequestBuilderInternal instantiates a new ItemActionsRunnersRemoveTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRemoveTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRemoveTokenRequestBuilder) { + m := &ItemActionsRunnersRemoveTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/remove-token", pathParameters), + } + return m +} +// NewItemActionsRunnersRemoveTokenRequestBuilder instantiates a new ItemActionsRunnersRemoveTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRemoveTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRemoveTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersRemoveTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.Example using remove token:To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by thisendpoint.```./config.sh remove --token TOKEN```OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a AuthenticationTokenable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-remove-token-for-an-enterprise +func (m *ItemActionsRunnersRemoveTokenRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthenticationTokenFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable), nil +} +// ToPostRequestInformation returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.Example using remove token:To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by thisendpoint.```./config.sh remove --token TOKEN```OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersRemoveTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersRemoveTokenRequestBuilder when successful +func (m *ItemActionsRunnersRemoveTokenRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersRemoveTokenRequestBuilder) { + return NewItemActionsRunnersRemoveTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_request_builder.go b/pkg/github/enterprises/item_actions_runners_request_builder.go new file mode 100644 index 0000000..22f0040 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_request_builder.go @@ -0,0 +1,96 @@ +package enterprises + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnersRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners +type ItemActionsRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnersRequestBuilderGetQueryParameters lists all self-hosted runners configured for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +type ItemActionsRunnersRequestBuilderGetQueryParameters struct { + // The name of a self-hosted runner. + Name *string `uriparametername:"name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRunner_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.actions.runners.item collection +// returns a *ItemActionsRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) ByRunner_id(runner_id int32)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_id), 10) + return NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnersRequestBuilderInternal instantiates a new ItemActionsRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRequestBuilder) { + m := &ItemActionsRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners{?name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnersRequestBuilder instantiates a new ItemActionsRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Downloads the downloads property +// returns a *ItemActionsRunnersDownloadsRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) Downloads()(*ItemActionsRunnersDownloadsRequestBuilder) { + return NewItemActionsRunnersDownloadsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// GenerateJitconfig the generateJitconfig property +// returns a *ItemActionsRunnersGenerateJitconfigRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) GenerateJitconfig()(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + return NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get lists all self-hosted runners configured for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a ItemActionsRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-enterprise +func (m *ItemActionsRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnersRequestBuilderGetQueryParameters])(ItemActionsRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersGetResponseable), nil +} +// RegistrationToken the registrationToken property +// returns a *ItemActionsRunnersRegistrationTokenRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) RegistrationToken()(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + return NewItemActionsRunnersRegistrationTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RemoveToken the removeToken property +// returns a *ItemActionsRunnersRemoveTokenRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) RemoveToken()(*ItemActionsRunnersRemoveTokenRequestBuilder) { + return NewItemActionsRunnersRemoveTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all self-hosted runners configured for an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersRequestBuilder) { + return NewItemActionsRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_actions_runners_with_runner_item_request_builder.go b/pkg/github/enterprises/item_actions_runners_with_runner_item_request_builder.go new file mode 100644 index 0000000..a1e4263 --- /dev/null +++ b/pkg/github/enterprises/item_actions_runners_with_runner_item_request_builder.go @@ -0,0 +1,84 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersWithRunner_ItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\actions\runners\{runner_id} +type ItemActionsRunnersWithRunner_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal instantiates a new ItemActionsRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + m := &ItemActionsRunnersWithRunner_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/actions/runners/{runner_id}", pathParameters), + } + return m +} +// NewItemActionsRunnersWithRunner_ItemRequestBuilder instantiates a new ItemActionsRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnersWithRunner_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-enterprise +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a Runnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-an-enterprise +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable), nil +} +// Labels the labels property +// returns a *ItemActionsRunnersItemLabelsRequestBuilder when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) Labels()(*ItemActionsRunnersItemLabelsRequestBuilder) { + return NewItemActionsRunnersItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific self-hosted runner configured in an enterprise.OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + return NewItemActionsRunnersWithRunner_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_announcement_request_builder.go b/pkg/github/enterprises/item_announcement_request_builder.go new file mode 100644 index 0000000..cd34a0d --- /dev/null +++ b/pkg/github/enterprises/item_announcement_request_builder.go @@ -0,0 +1,110 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemAnnouncementRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\announcement +type ItemAnnouncementRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemAnnouncementRequestBuilderInternal instantiates a new ItemAnnouncementRequestBuilder and sets the default values. +func NewItemAnnouncementRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAnnouncementRequestBuilder) { + m := &ItemAnnouncementRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/announcement", pathParameters), + } + return m +} +// NewItemAnnouncementRequestBuilder instantiates a new ItemAnnouncementRequestBuilder and sets the default values. +func NewItemAnnouncementRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAnnouncementRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAnnouncementRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes the announcement banner currently set for the enterprise. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/enterprises#remove-announcement-banner-from-enterprise +func (m *ItemAnnouncementRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets the announcement banner currently set for the enterprise. +// returns a AnnouncementBannerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/enterprises#get-announcement-banner-for-enterprise +func (m *ItemAnnouncementRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAnnouncementBannerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable), nil +} +// Patch sets the announcement banner to display for the enterprise. +// returns a AnnouncementBannerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/enterprises#set-announcement-banner-for-enterprise +func (m *ItemAnnouncementRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Announcementable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAnnouncementBannerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable), nil +} +// ToDeleteRequestInformation removes the announcement banner currently set for the enterprise. +// returns a *RequestInformation when successful +func (m *ItemAnnouncementRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets the announcement banner currently set for the enterprise. +// returns a *RequestInformation when successful +func (m *ItemAnnouncementRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation sets the announcement banner to display for the enterprise. +// returns a *RequestInformation when successful +func (m *ItemAnnouncementRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Announcementable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAnnouncementRequestBuilder when successful +func (m *ItemAnnouncementRequestBuilder) WithUrl(rawUrl string)(*ItemAnnouncementRequestBuilder) { + return NewItemAnnouncementRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_audit_log_request_builder.go b/pkg/github/enterprises/item_audit_log_request_builder.go new file mode 100644 index 0000000..7435528 --- /dev/null +++ b/pkg/github/enterprises/item_audit_log_request_builder.go @@ -0,0 +1,78 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i9e9784dfef7a5d70e14f1a288343e210d740991698697c5c7ea8cbd8c04b364b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/enterprises/item/auditlog" +) + +// ItemAuditLogRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\audit-log +type ItemAuditLogRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAuditLogRequestBuilderGetQueryParameters gets the audit log for an enterprise.This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint. +type ItemAuditLogRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events after this cursor. + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events before this cursor. + Before *string `uriparametername:"before"` + // The event types to include:- `web` - returns web (non-Git) events.- `git` - returns Git events.- `all` - returns both web and Git events.The default is `web`. + Include *i9e9784dfef7a5d70e14f1a288343e210d740991698697c5c7ea8cbd8c04b364b.GetIncludeQueryParameterType `uriparametername:"include"` + // The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.The default is `desc`. + Order *i9e9784dfef7a5d70e14f1a288343e210d740991698697c5c7ea8cbd8c04b364b.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-cloud@latest//admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise#searching-the-audit-log). + Phrase *string `uriparametername:"phrase"` +} +// NewItemAuditLogRequestBuilderInternal instantiates a new ItemAuditLogRequestBuilder and sets the default values. +func NewItemAuditLogRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuditLogRequestBuilder) { + m := &ItemAuditLogRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log{?after*,before*,include*,order*,page*,per_page*,phrase*}", pathParameters), + } + return m +} +// NewItemAuditLogRequestBuilder instantiates a new ItemAuditLogRequestBuilder and sets the default values. +func NewItemAuditLogRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuditLogRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAuditLogRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the audit log for an enterprise.This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint. +// returns a []AuditLogEventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#get-the-audit-log-for-an-enterprise +func (m *ItemAuditLogRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAuditLogRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogEventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuditLogEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogEventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogEventable) + } + } + return val, nil +} +// ToGetRequestInformation gets the audit log for an enterprise.This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemAuditLogRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAuditLogRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAuditLogRequestBuilder when successful +func (m *ItemAuditLogRequestBuilder) WithUrl(rawUrl string)(*ItemAuditLogRequestBuilder) { + return NewItemAuditLogRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_code_scanning_alerts_request_builder.go b/pkg/github/enterprises/item_code_scanning_alerts_request_builder.go new file mode 100644 index 0000000..9fe0c8e --- /dev/null +++ b/pkg/github/enterprises/item_code_scanning_alerts_request_builder.go @@ -0,0 +1,88 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i41e2476475a26f38ed89062b68a0455faf84f257d0135d3deab8e569f3f23de9 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/enterprises/item/codescanning/alerts" +) + +// ItemCodeScanningAlertsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\code-scanning\alerts +type ItemCodeScanningAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodeScanningAlertsRequestBuilderGetQueryParameters lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be a member of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo` scope to use this endpoint. +type ItemCodeScanningAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i41e2476475a26f38ed89062b68a0455faf84f257d0135d3deab8e569f3f23de9.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property by which to sort the results. + Sort *i41e2476475a26f38ed89062b68a0455faf84f257d0135d3deab8e569f3f23de9.GetSortQueryParameterType `uriparametername:"sort"` + // If specified, only code scanning alerts with this state will be returned. + State *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertStateQuery `uriparametername:"state"` + // The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. + Tool_guid *string `uriparametername:"tool_guid"` + // The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. + Tool_name *string `uriparametername:"tool_name"` +} +// NewItemCodeScanningAlertsRequestBuilderInternal instantiates a new ItemCodeScanningAlertsRequestBuilder and sets the default values. +func NewItemCodeScanningAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningAlertsRequestBuilder) { + m := &ItemCodeScanningAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-scanning/alerts{?after*,before*,direction*,page*,per_page*,sort*,state*,tool_guid*,tool_name*}", pathParameters), + } + return m +} +// NewItemCodeScanningAlertsRequestBuilder instantiates a new ItemCodeScanningAlertsRequestBuilder and sets the default values. +func NewItemCodeScanningAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeScanningAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be a member of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo` scope to use this endpoint. +// returns a []CodeScanningOrganizationAlertItemsable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a Alerts503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-enterprise +func (m *ItemCodeScanningAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeScanningAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningOrganizationAlertItemsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAlerts503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningOrganizationAlertItemsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningOrganizationAlertItemsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningOrganizationAlertItemsable) + } + } + return val, nil +} +// ToGetRequestInformation lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be a member of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeScanningAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeScanningAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeScanningAlertsRequestBuilder when successful +func (m *ItemCodeScanningAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemCodeScanningAlertsRequestBuilder) { + return NewItemCodeScanningAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_code_scanning_request_builder.go b/pkg/github/enterprises/item_code_scanning_request_builder.go new file mode 100644 index 0000000..e9087a2 --- /dev/null +++ b/pkg/github/enterprises/item_code_scanning_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCodeScanningRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\code-scanning +type ItemCodeScanningRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemCodeScanningAlertsRequestBuilder when successful +func (m *ItemCodeScanningRequestBuilder) Alerts()(*ItemCodeScanningAlertsRequestBuilder) { + return NewItemCodeScanningAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodeScanningRequestBuilderInternal instantiates a new ItemCodeScanningRequestBuilder and sets the default values. +func NewItemCodeScanningRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningRequestBuilder) { + m := &ItemCodeScanningRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-scanning", pathParameters), + } + return m +} +// NewItemCodeScanningRequestBuilder instantiates a new ItemCodeScanningRequestBuilder and sets the default values. +func NewItemCodeScanningRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeScanningRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/item_code_security_and_analysis_patch_request_body.go b/pkg/github/enterprises/item_code_security_and_analysis_patch_request_body.go new file mode 100644 index 0000000..719c245 --- /dev/null +++ b/pkg/github/enterprises/item_code_security_and_analysis_patch_request_body.go @@ -0,0 +1,225 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCode_security_and_analysisPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//get-started/learning-about-github/about-github-advanced-security)." + advanced_security_enabled_for_new_repositories *bool + // Whether GitHub Advanced Security is automatically enabled for new user namespace repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//get-started/learning-about-github/about-github-advanced-security)." + advanced_security_enabled_new_user_namespace_repos *bool + // Whether Dependabot alerts are automatically enabled for new repositories. For more information, see "[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." + dependabot_alerts_enabled_for_new_repositories *bool + // Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/about-secret-scanning)." + secret_scanning_enabled_for_new_repositories *bool + // The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`. + secret_scanning_push_protection_custom_link *string + // Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + secret_scanning_push_protection_enabled_for_new_repositories *bool +} +// NewItemCode_security_and_analysisPatchRequestBody instantiates a new ItemCode_security_and_analysisPatchRequestBody and sets the default values. +func NewItemCode_security_and_analysisPatchRequestBody()(*ItemCode_security_and_analysisPatchRequestBody) { + m := &ItemCode_security_and_analysisPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCode_security_and_analysisPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCode_security_and_analysisPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCode_security_and_analysisPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//get-started/learning-about-github/about-github-advanced-security)." +// returns a *bool when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetAdvancedSecurityEnabledForNewRepositories()(*bool) { + return m.advanced_security_enabled_for_new_repositories +} +// GetAdvancedSecurityEnabledNewUserNamespaceRepos gets the advanced_security_enabled_new_user_namespace_repos property value. Whether GitHub Advanced Security is automatically enabled for new user namespace repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//get-started/learning-about-github/about-github-advanced-security)." +// returns a *bool when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetAdvancedSecurityEnabledNewUserNamespaceRepos()(*bool) { + return m.advanced_security_enabled_new_user_namespace_repos +} +// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts are automatically enabled for new repositories. For more information, see "[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." +// returns a *bool when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetDependabotAlertsEnabledForNewRepositories()(*bool) { + return m.dependabot_alerts_enabled_for_new_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advanced_security_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityEnabledForNewRepositories(val) + } + return nil + } + res["advanced_security_enabled_new_user_namespace_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityEnabledNewUserNamespaceRepos(val) + } + return nil + } + res["dependabot_alerts_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependabotAlertsEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_push_protection_custom_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionCustomLink(val) + } + return nil + } + res["secret_scanning_push_protection_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionEnabledForNewRepositories(val) + } + return nil + } + return res +} +// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/about-secret-scanning)." +// returns a *bool when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningEnabledForNewRepositories()(*bool) { + return m.secret_scanning_enabled_for_new_repositories +} +// GetSecretScanningPushProtectionCustomLink gets the secret_scanning_push_protection_custom_link property value. The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`. +// returns a *string when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningPushProtectionCustomLink()(*string) { + return m.secret_scanning_push_protection_custom_link +} +// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)." +// returns a *bool when successful +func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) { + return m.secret_scanning_push_protection_enabled_for_new_repositories +} +// Serialize serializes information the current object +func (m *ItemCode_security_and_analysisPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("advanced_security_enabled_for_new_repositories", m.GetAdvancedSecurityEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("advanced_security_enabled_new_user_namespace_repos", m.GetAdvancedSecurityEnabledNewUserNamespaceRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", m.GetDependabotAlertsEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_enabled_for_new_repositories", m.GetSecretScanningEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_scanning_push_protection_custom_link", m.GetSecretScanningPushProtectionCustomLink()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_push_protection_enabled_for_new_repositories", m.GetSecretScanningPushProtectionEnabledForNewRepositories()) + 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 *ItemCode_security_and_analysisPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//get-started/learning-about-github/about-github-advanced-security)." +func (m *ItemCode_security_and_analysisPatchRequestBody) SetAdvancedSecurityEnabledForNewRepositories(value *bool)() { + m.advanced_security_enabled_for_new_repositories = value +} +// SetAdvancedSecurityEnabledNewUserNamespaceRepos sets the advanced_security_enabled_new_user_namespace_repos property value. Whether GitHub Advanced Security is automatically enabled for new user namespace repositories. For more information, see "[About GitHub Advanced Security](https://docs.github.com/enterprise-cloud@latest//get-started/learning-about-github/about-github-advanced-security)." +func (m *ItemCode_security_and_analysisPatchRequestBody) SetAdvancedSecurityEnabledNewUserNamespaceRepos(value *bool)() { + m.advanced_security_enabled_new_user_namespace_repos = value +} +// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts are automatically enabled for new repositories. For more information, see "[About Dependabot alerts](https://docs.github.com/enterprise-cloud@latest//code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." +func (m *ItemCode_security_and_analysisPatchRequestBody) SetDependabotAlertsEnabledForNewRepositories(value *bool)() { + m.dependabot_alerts_enabled_for_new_repositories = value +} +// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/about-secret-scanning)." +func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningEnabledForNewRepositories(value *bool)() { + m.secret_scanning_enabled_for_new_repositories = value +} +// SetSecretScanningPushProtectionCustomLink sets the secret_scanning_push_protection_custom_link property value. The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`. +func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningPushProtectionCustomLink(value *string)() { + m.secret_scanning_push_protection_custom_link = value +} +// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)." +func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() { + m.secret_scanning_push_protection_enabled_for_new_repositories = value +} +type ItemCode_security_and_analysisPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurityEnabledForNewRepositories()(*bool) + GetAdvancedSecurityEnabledNewUserNamespaceRepos()(*bool) + GetDependabotAlertsEnabledForNewRepositories()(*bool) + GetSecretScanningEnabledForNewRepositories()(*bool) + GetSecretScanningPushProtectionCustomLink()(*string) + GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) + SetAdvancedSecurityEnabledForNewRepositories(value *bool)() + SetAdvancedSecurityEnabledNewUserNamespaceRepos(value *bool)() + SetDependabotAlertsEnabledForNewRepositories(value *bool)() + SetSecretScanningEnabledForNewRepositories(value *bool)() + SetSecretScanningPushProtectionCustomLink(value *string)() + SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() +} diff --git a/pkg/github/enterprises/item_code_security_and_analysis_request_builder.go b/pkg/github/enterprises/item_code_security_and_analysis_request_builder.go new file mode 100644 index 0000000..7772c6b --- /dev/null +++ b/pkg/github/enterprises/item_code_security_and_analysis_request_builder.go @@ -0,0 +1,92 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCode_security_and_analysisRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\code_security_and_analysis +type ItemCode_security_and_analysisRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCode_security_and_analysisRequestBuilderInternal instantiates a new ItemCode_security_and_analysisRequestBuilder and sets the default values. +func NewItemCode_security_and_analysisRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCode_security_and_analysisRequestBuilder) { + m := &ItemCode_security_and_analysisRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code_security_and_analysis", pathParameters), + } + return m +} +// NewItemCode_security_and_analysisRequestBuilder instantiates a new ItemCode_security_and_analysisRequestBuilder and sets the default values. +func NewItemCode_security_and_analysisRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCode_security_and_analysisRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCode_security_and_analysisRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets code security and analysis settings for the specified enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +// returns a EnterpriseSecurityAnalysisSettingsable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/code-security-and-analysis#get-code-security-and-analysis-features-for-an-enterprise +func (m *ItemCode_security_and_analysisRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnterpriseSecurityAnalysisSettingsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEnterpriseSecurityAnalysisSettingsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnterpriseSecurityAnalysisSettingsable), nil +} +// Patch updates the settings for advanced security, Dependabot alerts, secret scanning, and push protection for new repositories in an enterprise.The authenticated user must be an administrator of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/code-security-and-analysis#update-code-security-and-analysis-features-for-an-enterprise +func (m *ItemCode_security_and_analysisRequestBuilder) Patch(ctx context.Context, body ItemCode_security_and_analysisPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets code security and analysis settings for the specified enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCode_security_and_analysisRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the settings for advanced security, Dependabot alerts, secret scanning, and push protection for new repositories in an enterprise.The authenticated user must be an administrator of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCode_security_and_analysisRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemCode_security_and_analysisPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCode_security_and_analysisRequestBuilder when successful +func (m *ItemCode_security_and_analysisRequestBuilder) WithUrl(rawUrl string)(*ItemCode_security_and_analysisRequestBuilder) { + return NewItemCode_security_and_analysisRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_consumed_licenses_request_builder.go b/pkg/github/enterprises/item_consumed_licenses_request_builder.go new file mode 100644 index 0000000..7eee6a5 --- /dev/null +++ b/pkg/github/enterprises/item_consumed_licenses_request_builder.go @@ -0,0 +1,64 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemConsumedLicensesRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\consumed-licenses +type ItemConsumedLicensesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemConsumedLicensesRequestBuilderGetQueryParameters lists the license consumption information for all users, including those from connected servers, associated with an enterprise.The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +type ItemConsumedLicensesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemConsumedLicensesRequestBuilderInternal instantiates a new ItemConsumedLicensesRequestBuilder and sets the default values. +func NewItemConsumedLicensesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemConsumedLicensesRequestBuilder) { + m := &ItemConsumedLicensesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/consumed-licenses{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemConsumedLicensesRequestBuilder instantiates a new ItemConsumedLicensesRequestBuilder and sets the default values. +func NewItemConsumedLicensesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemConsumedLicensesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemConsumedLicensesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the license consumption information for all users, including those from connected servers, associated with an enterprise.The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +// returns a GetConsumedLicensesable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/license#list-enterprise-consumed-licenses +func (m *ItemConsumedLicensesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemConsumedLicensesRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GetConsumedLicensesable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGetConsumedLicensesFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GetConsumedLicensesable), nil +} +// ToGetRequestInformation lists the license consumption information for all users, including those from connected servers, associated with an enterprise.The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemConsumedLicensesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemConsumedLicensesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemConsumedLicensesRequestBuilder when successful +func (m *ItemConsumedLicensesRequestBuilder) WithUrl(rawUrl string)(*ItemConsumedLicensesRequestBuilder) { + return NewItemConsumedLicensesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_copilot_billing_request_builder.go b/pkg/github/enterprises/item_copilot_billing_request_builder.go new file mode 100644 index 0000000..3d4ee8b --- /dev/null +++ b/pkg/github/enterprises/item_copilot_billing_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCopilotBillingRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\copilot\billing +type ItemCopilotBillingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCopilotBillingRequestBuilderInternal instantiates a new ItemCopilotBillingRequestBuilder and sets the default values. +func NewItemCopilotBillingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingRequestBuilder) { + m := &ItemCopilotBillingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/billing", pathParameters), + } + return m +} +// NewItemCopilotBillingRequestBuilder instantiates a new ItemCopilotBillingRequestBuilder and sets the default values. +func NewItemCopilotBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotBillingRequestBuilderInternal(urlParams, requestAdapter) +} +// Seats the seats property +// returns a *ItemCopilotBillingSeatsRequestBuilder when successful +func (m *ItemCopilotBillingRequestBuilder) Seats()(*ItemCopilotBillingSeatsRequestBuilder) { + return NewItemCopilotBillingSeatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_copilot_billing_seats_get_response.go b/pkg/github/enterprises/item_copilot_billing_seats_get_response.go new file mode 100644 index 0000000..5196636 --- /dev/null +++ b/pkg/github/enterprises/item_copilot_billing_seats_get_response.go @@ -0,0 +1,122 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCopilotBillingSeatsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The seats property + seats []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable + // The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. + total_seats *int32 +} +// NewItemCopilotBillingSeatsGetResponse instantiates a new ItemCopilotBillingSeatsGetResponse and sets the default values. +func NewItemCopilotBillingSeatsGetResponse()(*ItemCopilotBillingSeatsGetResponse) { + m := &ItemCopilotBillingSeatsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSeatsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSeatsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSeatsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCopilotSeatDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable) + } + } + m.SetSeats(res) + } + return nil + } + res["total_seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSeats(val) + } + return nil + } + return res +} +// GetSeats gets the seats property value. The seats property +// returns a []CopilotSeatDetailsable when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetSeats()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable) { + return m.seats +} +// GetTotalSeats gets the total_seats property value. The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. +// returns a *int32 when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetTotalSeats()(*int32) { + return m.total_seats +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSeatsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSeats() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSeats())) + for i, v := range m.GetSeats() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("seats", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_seats", m.GetTotalSeats()) + 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 *ItemCopilotBillingSeatsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSeats sets the seats property value. The seats property +func (m *ItemCopilotBillingSeatsGetResponse) SetSeats(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable)() { + m.seats = value +} +// SetTotalSeats sets the total_seats property value. The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. +func (m *ItemCopilotBillingSeatsGetResponse) SetTotalSeats(value *int32)() { + m.total_seats = value +} +type ItemCopilotBillingSeatsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSeats()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable) + GetTotalSeats()(*int32) + SetSeats(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable)() + SetTotalSeats(value *int32)() +} diff --git a/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go b/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go new file mode 100644 index 0000000..0790777 --- /dev/null +++ b/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go @@ -0,0 +1,74 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotBillingSeatsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\copilot\billing\seats +type ItemCopilotBillingSeatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemCopilotBillingSeatsRequestBuilderInternal instantiates a new ItemCopilotBillingSeatsRequestBuilder and sets the default values. +func NewItemCopilotBillingSeatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSeatsRequestBuilder) { + m := &ItemCopilotBillingSeatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/billing/seats{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCopilotBillingSeatsRequestBuilder instantiates a new ItemCopilotBillingSeatsRequestBuilder and sets the default values. +func NewItemCopilotBillingSeatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSeatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotBillingSeatsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// returns a ItemCopilotBillingSeatsGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-enterprise +func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(ItemCopilotBillingSeatsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCopilotBillingSeatsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCopilotBillingSeatsGetResponseable), nil +} +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotBillingSeatsRequestBuilder when successful +func (m *ItemCopilotBillingSeatsRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotBillingSeatsRequestBuilder) { + return NewItemCopilotBillingSeatsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_copilot_request_builder.go b/pkg/github/enterprises/item_copilot_request_builder.go new file mode 100644 index 0000000..9a7c8b1 --- /dev/null +++ b/pkg/github/enterprises/item_copilot_request_builder.go @@ -0,0 +1,33 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCopilotRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\copilot +type ItemCopilotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Billing the billing property +// returns a *ItemCopilotBillingRequestBuilder when successful +func (m *ItemCopilotRequestBuilder) Billing()(*ItemCopilotBillingRequestBuilder) { + return NewItemCopilotBillingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCopilotRequestBuilderInternal instantiates a new ItemCopilotRequestBuilder and sets the default values. +func NewItemCopilotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotRequestBuilder) { + m := &ItemCopilotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot", pathParameters), + } + return m +} +// NewItemCopilotRequestBuilder instantiates a new ItemCopilotRequestBuilder and sets the default values. +func NewItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemCopilotUsageRequestBuilder when successful +func (m *ItemCopilotRequestBuilder) Usage()(*ItemCopilotUsageRequestBuilder) { + return NewItemCopilotUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_copilot_usage_request_builder.go b/pkg/github/enterprises/item_copilot_usage_request_builder.go new file mode 100644 index 0000000..a912a58 --- /dev/null +++ b/pkg/github/enterprises/item_copilot_usage_request_builder.go @@ -0,0 +1,81 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotUsageRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\copilot\usage +type ItemCopilotUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCopilotUsageRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +type ItemCopilotUsageRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + Since *string `uriparametername:"since"` + // Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + Until *string `uriparametername:"until"` +} +// NewItemCopilotUsageRequestBuilderInternal instantiates a new ItemCopilotUsageRequestBuilder and sets the default values. +func NewItemCopilotUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotUsageRequestBuilder) { + m := &ItemCopilotUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/usage{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemCopilotUsageRequestBuilder instantiates a new ItemCopilotUsageRequestBuilder and sets the default values. +func NewItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// returns a []CopilotUsageMetricsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-enterprise-members +func (m *ItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotUsageMetricsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCopilotUsageMetricsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotUsageMetricsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotUsageMetricsable) + } + } + return val, nil +} +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotUsageRequestBuilder when successful +func (m *ItemCopilotUsageRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotUsageRequestBuilder) { + return NewItemCopilotUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_dependabot_alerts_request_builder.go b/pkg/github/enterprises/item_dependabot_alerts_request_builder.go new file mode 100644 index 0000000..06f1afe --- /dev/null +++ b/pkg/github/enterprises/item_dependabot_alerts_request_builder.go @@ -0,0 +1,96 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i9d347d1df539077204f90a61bea8984a59526ef91f37d624ef045ce9fcb5169a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/enterprises/item/dependabot/alerts" +) + +// ItemDependabotAlertsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\dependabot\alerts +type ItemDependabotAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDependabotAlertsRequestBuilderGetQueryParameters lists Dependabot alerts for repositories that are owned by the specified enterprise.The authenticated user must be a member of the enterprise to use this endpoint.Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. +type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i9d347d1df539077204f90a61bea8984a59526ef91f37d624ef045ce9fcb5169a.GetDirectionQueryParameterType `uriparametername:"direction"` + // A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + Ecosystem *string `uriparametername:"ecosystem"` + // **Deprecated**. The number of results per page (max 100), starting from the first matching result.This parameter must not be used in combination with `last`.Instead, use `per_page` in combination with `after` to fetch the first page of results. + First *int32 `uriparametername:"first"` + // **Deprecated**. The number of results per page (max 100), starting from the last matching result.This parameter must not be used in combination with `first`.Instead, use `per_page` in combination with `before` to fetch the last page of results. + Last *int32 `uriparametername:"last"` + // A comma-separated list of package names. If specified, only alerts for these packages will be returned. + Package *string `uriparametername:"package"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + Scope *i9d347d1df539077204f90a61bea8984a59526ef91f37d624ef045ce9fcb5169a.GetScopeQueryParameterType `uriparametername:"scope"` + // A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` + Severity *string `uriparametername:"severity"` + // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed. + Sort *i9d347d1df539077204f90a61bea8984a59526ef91f37d624ef045ce9fcb5169a.GetSortQueryParameterType `uriparametername:"sort"` + // A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` + State *string `uriparametername:"state"` +} +// NewItemDependabotAlertsRequestBuilderInternal instantiates a new ItemDependabotAlertsRequestBuilder and sets the default values. +func NewItemDependabotAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotAlertsRequestBuilder) { + m := &ItemDependabotAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot/alerts{?after*,before*,direction*,ecosystem*,first*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters), + } + return m +} +// NewItemDependabotAlertsRequestBuilder instantiates a new ItemDependabotAlertsRequestBuilder and sets the default values. +func NewItemDependabotAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists Dependabot alerts for repositories that are owned by the specified enterprise.The authenticated user must be a member of the enterprise to use this endpoint.Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. +// returns a []DependabotAlertWithRepositoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise +func (m *ItemDependabotAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertWithRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotAlertWithRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertWithRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertWithRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists Dependabot alerts for repositories that are owned by the specified enterprise.The authenticated user must be a member of the enterprise to use this endpoint.Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotAlertsRequestBuilder when successful +func (m *ItemDependabotAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotAlertsRequestBuilder) { + return NewItemDependabotAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_dependabot_request_builder.go b/pkg/github/enterprises/item_dependabot_request_builder.go new file mode 100644 index 0000000..d8039c8 --- /dev/null +++ b/pkg/github/enterprises/item_dependabot_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDependabotRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\dependabot +type ItemDependabotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemDependabotAlertsRequestBuilder when successful +func (m *ItemDependabotRequestBuilder) Alerts()(*ItemDependabotAlertsRequestBuilder) { + return NewItemDependabotAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDependabotRequestBuilderInternal instantiates a new ItemDependabotRequestBuilder and sets the default values. +func NewItemDependabotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotRequestBuilder) { + m := &ItemDependabotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot", pathParameters), + } + return m +} +// NewItemDependabotRequestBuilder instantiates a new ItemDependabotRequestBuilder and sets the default values. +func NewItemDependabotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/item_item_with_enablement_item_request_builder.go b/pkg/github/enterprises/item_item_with_enablement_item_request_builder.go new file mode 100644 index 0000000..4109f38 --- /dev/null +++ b/pkg/github/enterprises/item_item_with_enablement_item_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemWithEnablementItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\{security_product}\{enablement} +type ItemItemWithEnablementItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemWithEnablementItemRequestBuilderInternal instantiates a new ItemItemWithEnablementItemRequestBuilder and sets the default values. +func NewItemItemWithEnablementItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemWithEnablementItemRequestBuilder) { + m := &ItemItemWithEnablementItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/{security_product}/{enablement}", pathParameters), + } + return m +} +// NewItemItemWithEnablementItemRequestBuilder instantiates a new ItemItemWithEnablementItemRequestBuilder and sets the default values. +func NewItemItemWithEnablementItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemWithEnablementItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemWithEnablementItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Post enables or disables the specified security feature for all repositories in an enterprise.The authenticated user must be an administrator of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/code-security-and-analysis#enable-or-disable-a-security-feature +func (m *ItemItemWithEnablementItemRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation enables or disables the specified security feature for all repositories in an enterprise.The authenticated user must be an administrator of the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemWithEnablementItemRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemWithEnablementItemRequestBuilder when successful +func (m *ItemItemWithEnablementItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemWithEnablementItemRequestBuilder) { + return NewItemItemWithEnablementItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_license_sync_status_request_builder.go b/pkg/github/enterprises/item_license_sync_status_request_builder.go new file mode 100644 index 0000000..2c457b8 --- /dev/null +++ b/pkg/github/enterprises/item_license_sync_status_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemLicenseSyncStatusRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\license-sync-status +type ItemLicenseSyncStatusRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemLicenseSyncStatusRequestBuilderInternal instantiates a new ItemLicenseSyncStatusRequestBuilder and sets the default values. +func NewItemLicenseSyncStatusRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLicenseSyncStatusRequestBuilder) { + m := &ItemLicenseSyncStatusRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/license-sync-status", pathParameters), + } + return m +} +// NewItemLicenseSyncStatusRequestBuilder instantiates a new ItemLicenseSyncStatusRequestBuilder and sets the default values. +func NewItemLicenseSyncStatusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLicenseSyncStatusRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLicenseSyncStatusRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about the status of a license sync job for an enterprise.The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +// returns a GetLicenseSyncStatusable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/license#get-a-license-sync-status +func (m *ItemLicenseSyncStatusRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GetLicenseSyncStatusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGetLicenseSyncStatusFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GetLicenseSyncStatusable), nil +} +// ToGetRequestInformation gets information about the status of a license sync job for an enterprise.The authenticated user must be an enterprise admin to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemLicenseSyncStatusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemLicenseSyncStatusRequestBuilder when successful +func (m *ItemLicenseSyncStatusRequestBuilder) WithUrl(rawUrl string)(*ItemLicenseSyncStatusRequestBuilder) { + return NewItemLicenseSyncStatusRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go b/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go new file mode 100644 index 0000000..acd95fa --- /dev/null +++ b/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go @@ -0,0 +1,88 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i0997a540be96230613e35afb4ef529cb044bc00ec923c719492c344368cd3161 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/enterprises/item/secretscanning/alerts" +) + +// ItemSecretScanningAlertsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\secret-scanning\alerts +type ItemSecretScanningAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSecretScanningAlertsRequestBuilderGetQueryParameters lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization), or for repositories owned by enterprise managed users. +type ItemSecretScanningAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i0997a540be96230613e35afb4ef529cb044bc00ec923c719492c344368cd3161.GetDirectionQueryParameterType `uriparametername:"direction"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. + Resolution *string `uriparametername:"resolution"` + // A comma-separated list of secret types to return. By default all secret types are returned.See "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)"for a complete list of secret types. + Secret_type *string `uriparametername:"secret_type"` + // The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + Sort *i0997a540be96230613e35afb4ef529cb044bc00ec923c719492c344368cd3161.GetSortQueryParameterType `uriparametername:"sort"` + // Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + State *i0997a540be96230613e35afb4ef529cb044bc00ec923c719492c344368cd3161.GetStateQueryParameterType `uriparametername:"state"` + // A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. + Validity *string `uriparametername:"validity"` +} +// NewItemSecretScanningAlertsRequestBuilderInternal instantiates a new ItemSecretScanningAlertsRequestBuilder and sets the default values. +func NewItemSecretScanningAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningAlertsRequestBuilder) { + m := &ItemSecretScanningAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/secret-scanning/alerts{?after*,before*,direction*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", pathParameters), + } + return m +} +// NewItemSecretScanningAlertsRequestBuilder instantiates a new ItemSecretScanningAlertsRequestBuilder and sets the default values. +func NewItemSecretScanningAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecretScanningAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization), or for repositories owned by enterprise managed users. +// returns a []OrganizationSecretScanningAlertable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a Alerts503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise +func (m *ItemSecretScanningAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSecretScanningAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSecretScanningAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAlerts503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSecretScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSecretScanningAlertable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSecretScanningAlertable) + } + } + return val, nil +} +// ToGetRequestInformation lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization), or for repositories owned by enterprise managed users. +// returns a *RequestInformation when successful +func (m *ItemSecretScanningAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSecretScanningAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSecretScanningAlertsRequestBuilder when successful +func (m *ItemSecretScanningAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemSecretScanningAlertsRequestBuilder) { + return NewItemSecretScanningAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_secret_scanning_request_builder.go b/pkg/github/enterprises/item_secret_scanning_request_builder.go new file mode 100644 index 0000000..fee7815 --- /dev/null +++ b/pkg/github/enterprises/item_secret_scanning_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSecretScanningRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\secret-scanning +type ItemSecretScanningRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemSecretScanningAlertsRequestBuilder when successful +func (m *ItemSecretScanningRequestBuilder) Alerts()(*ItemSecretScanningAlertsRequestBuilder) { + return NewItemSecretScanningAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSecretScanningRequestBuilderInternal instantiates a new ItemSecretScanningRequestBuilder and sets the default values. +func NewItemSecretScanningRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningRequestBuilder) { + m := &ItemSecretScanningRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/secret-scanning", pathParameters), + } + return m +} +// NewItemSecretScanningRequestBuilder instantiates a new ItemSecretScanningRequestBuilder and sets the default values. +func NewItemSecretScanningRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecretScanningRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/item_settings_billing_actions_request_builder.go b/pkg/github/enterprises/item_settings_billing_actions_request_builder.go new file mode 100644 index 0000000..e9b4a3d --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_actions_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingActionsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\actions +type ItemSettingsBillingActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingActionsRequestBuilderInternal instantiates a new ItemSettingsBillingActionsRequestBuilder and sets the default values. +func NewItemSettingsBillingActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingActionsRequestBuilder) { + m := &ItemSettingsBillingActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/actions", pathParameters), + } + return m +} +// NewItemSettingsBillingActionsRequestBuilder instantiates a new ItemSettingsBillingActionsRequestBuilder and sets the default values. +func NewItemSettingsBillingActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the summary of the free and paid GitHub Actions minutes used.Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".The authenticated user must be an enterprise admin. +// returns a ActionsBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-github-actions-billing-for-an-enterprise +func (m *ItemSettingsBillingActionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsBillingUsageable), nil +} +// ToGetRequestInformation gets the summary of the free and paid GitHub Actions minutes used.Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".The authenticated user must be an enterprise admin. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingActionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingActionsRequestBuilder when successful +func (m *ItemSettingsBillingActionsRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingActionsRequestBuilder) { + return NewItemSettingsBillingActionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_billing_advanced_security_request_builder.go b/pkg/github/enterprises/item_settings_billing_advanced_security_request_builder.go new file mode 100644 index 0000000..907ef60 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_advanced_security_request_builder.go @@ -0,0 +1,64 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingAdvancedSecurityRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\advanced-security +type ItemSettingsBillingAdvancedSecurityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters gets the GitHub Advanced Security active committers for an enterprise per repository.Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository.The total number of repositories with committer information is tracked by the `total_count` field. +type ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal instantiates a new ItemSettingsBillingAdvancedSecurityRequestBuilder and sets the default values. +func NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + m := &ItemSettingsBillingAdvancedSecurityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/advanced-security{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemSettingsBillingAdvancedSecurityRequestBuilder instantiates a new ItemSettingsBillingAdvancedSecurityRequestBuilder and sets the default values. +func NewItemSettingsBillingAdvancedSecurityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the GitHub Advanced Security active committers for an enterprise per repository.Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository.The total number of repositories with committer information is tracked by the `total_count` field. +// returns a AdvancedSecurityActiveCommittersable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-github-advanced-security-active-committers-for-an-enterprise +func (m *ItemSettingsBillingAdvancedSecurityRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AdvancedSecurityActiveCommittersable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAdvancedSecurityActiveCommittersFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AdvancedSecurityActiveCommittersable), nil +} +// ToGetRequestInformation gets the GitHub Advanced Security active committers for an enterprise per repository.Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository.The total number of repositories with committer information is tracked by the `total_count` field. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingAdvancedSecurityRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingAdvancedSecurityRequestBuilder when successful +func (m *ItemSettingsBillingAdvancedSecurityRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + return NewItemSettingsBillingAdvancedSecurityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_delete_request_body.go b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_delete_request_body.go new file mode 100644 index 0000000..7d8f33d --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_delete_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemSettingsBillingCostCentersItemResourceDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the users to remove from the cost center. + users []string +} +// NewItemSettingsBillingCostCentersItemResourceDeleteRequestBody instantiates a new ItemSettingsBillingCostCentersItemResourceDeleteRequestBody and sets the default values. +func NewItemSettingsBillingCostCentersItemResourceDeleteRequestBody()(*ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) { + m := &ItemSettingsBillingCostCentersItemResourceDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsBillingCostCentersItemResourceDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsBillingCostCentersItemResourceDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsBillingCostCentersItemResourceDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetUsers gets the users property value. The usernames of the users to remove from the cost center. +// returns a []string when successful +func (m *ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsers sets the users property value. The usernames of the users to remove from the cost center. +func (m *ItemSettingsBillingCostCentersItemResourceDeleteRequestBody) SetUsers(value []string)() { + m.users = value +} +type ItemSettingsBillingCostCentersItemResourceDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsers()([]string) + SetUsers(value []string)() +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_delete_response.go b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_delete_response.go new file mode 100644 index 0000000..53a3454 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_delete_response.go @@ -0,0 +1,80 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemSettingsBillingCostCentersItemResourceDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string +} +// NewItemSettingsBillingCostCentersItemResourceDeleteResponse instantiates a new ItemSettingsBillingCostCentersItemResourceDeleteResponse and sets the default values. +func NewItemSettingsBillingCostCentersItemResourceDeleteResponse()(*ItemSettingsBillingCostCentersItemResourceDeleteResponse) { + m := &ItemSettingsBillingCostCentersItemResourceDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsBillingCostCentersItemResourceDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsBillingCostCentersItemResourceDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsBillingCostCentersItemResourceDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemSettingsBillingCostCentersItemResourceDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemSettingsBillingCostCentersItemResourceDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ItemSettingsBillingCostCentersItemResourceDeleteResponse) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemSettingsBillingCostCentersItemResourceDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemSettingsBillingCostCentersItemResourceDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *ItemSettingsBillingCostCentersItemResourceDeleteResponse) SetMessage(value *string)() { + m.message = value +} +type ItemSettingsBillingCostCentersItemResourceDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + SetMessage(value *string)() +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_post_request_body.go b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_post_request_body.go new file mode 100644 index 0000000..1449c0f --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_post_request_body.go @@ -0,0 +1,86 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemSettingsBillingCostCentersItemResourcePostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the users to add to the cost center. + users []string +} +// NewItemSettingsBillingCostCentersItemResourcePostRequestBody instantiates a new ItemSettingsBillingCostCentersItemResourcePostRequestBody and sets the default values. +func NewItemSettingsBillingCostCentersItemResourcePostRequestBody()(*ItemSettingsBillingCostCentersItemResourcePostRequestBody) { + m := &ItemSettingsBillingCostCentersItemResourcePostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsBillingCostCentersItemResourcePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsBillingCostCentersItemResourcePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsBillingCostCentersItemResourcePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemSettingsBillingCostCentersItemResourcePostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemSettingsBillingCostCentersItemResourcePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetUsers gets the users property value. The usernames of the users to add to the cost center. +// returns a []string when successful +func (m *ItemSettingsBillingCostCentersItemResourcePostRequestBody) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemSettingsBillingCostCentersItemResourcePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemSettingsBillingCostCentersItemResourcePostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsers sets the users property value. The usernames of the users to add to the cost center. +func (m *ItemSettingsBillingCostCentersItemResourcePostRequestBody) SetUsers(value []string)() { + m.users = value +} +type ItemSettingsBillingCostCentersItemResourcePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsers()([]string) + SetUsers(value []string)() +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_post_response.go b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_post_response.go new file mode 100644 index 0000000..7c1a93b --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_post_response.go @@ -0,0 +1,80 @@ +package enterprises + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemSettingsBillingCostCentersItemResourcePostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string +} +// NewItemSettingsBillingCostCentersItemResourcePostResponse instantiates a new ItemSettingsBillingCostCentersItemResourcePostResponse and sets the default values. +func NewItemSettingsBillingCostCentersItemResourcePostResponse()(*ItemSettingsBillingCostCentersItemResourcePostResponse) { + m := &ItemSettingsBillingCostCentersItemResourcePostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsBillingCostCentersItemResourcePostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsBillingCostCentersItemResourcePostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsBillingCostCentersItemResourcePostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemSettingsBillingCostCentersItemResourcePostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemSettingsBillingCostCentersItemResourcePostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ItemSettingsBillingCostCentersItemResourcePostResponse) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemSettingsBillingCostCentersItemResourcePostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemSettingsBillingCostCentersItemResourcePostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *ItemSettingsBillingCostCentersItemResourcePostResponse) SetMessage(value *string)() { + m.message = value +} +type ItemSettingsBillingCostCentersItemResourcePostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + SetMessage(value *string)() +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_request_builder.go b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_request_builder.go new file mode 100644 index 0000000..b70c9cb --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_item_resource_request_builder.go @@ -0,0 +1,112 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingCostCentersItemResourceRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\cost-centers\{cost_center_id}\resource +type ItemSettingsBillingCostCentersItemResourceRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingCostCentersItemResourceRequestBuilderInternal instantiates a new ItemSettingsBillingCostCentersItemResourceRequestBuilder and sets the default values. +func NewItemSettingsBillingCostCentersItemResourceRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingCostCentersItemResourceRequestBuilder) { + m := &ItemSettingsBillingCostCentersItemResourceRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource", pathParameters), + } + return m +} +// NewItemSettingsBillingCostCentersItemResourceRequestBuilder instantiates a new ItemSettingsBillingCostCentersItemResourceRequestBuilder and sets the default values. +func NewItemSettingsBillingCostCentersItemResourceRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingCostCentersItemResourceRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingCostCentersItemResourceRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove users from a cost center.The usage for the users will no longer be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint. +// returns a ItemSettingsBillingCostCentersItemResourceDeleteResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 500 status code +// returns a Resource503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-users-from-a-cost-center +func (m *ItemSettingsBillingCostCentersItemResourceRequestBuilder) Delete(ctx context.Context, body ItemSettingsBillingCostCentersItemResourceDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemSettingsBillingCostCentersItemResourceDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateResource503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemSettingsBillingCostCentersItemResourceDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemSettingsBillingCostCentersItemResourceDeleteResponseable), nil +} +// Post adds users to a cost center.The usage for the users will be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint. +// returns a ItemSettingsBillingCostCentersItemResourcePostResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 500 status code +// returns a Resource503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-users-to-a-cost-center +func (m *ItemSettingsBillingCostCentersItemResourceRequestBuilder) Post(ctx context.Context, body ItemSettingsBillingCostCentersItemResourcePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemSettingsBillingCostCentersItemResourcePostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateResource503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemSettingsBillingCostCentersItemResourcePostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemSettingsBillingCostCentersItemResourcePostResponseable), nil +} +// ToDeleteRequestInformation remove users from a cost center.The usage for the users will no longer be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingCostCentersItemResourceRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemSettingsBillingCostCentersItemResourceDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation adds users to a cost center.The usage for the users will be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingCostCentersItemResourceRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemSettingsBillingCostCentersItemResourcePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingCostCentersItemResourceRequestBuilder when successful +func (m *ItemSettingsBillingCostCentersItemResourceRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingCostCentersItemResourceRequestBuilder) { + return NewItemSettingsBillingCostCentersItemResourceRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_request_builder.go b/pkg/github/enterprises/item_settings_billing_cost_centers_request_builder.go new file mode 100644 index 0000000..cf9335c --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_request_builder.go @@ -0,0 +1,79 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingCostCentersRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\cost-centers +type ItemSettingsBillingCostCentersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCost_center_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.settings.billing.costCenters.item collection +// returns a *ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder when successful +func (m *ItemSettingsBillingCostCentersRequestBuilder) ByCost_center_id(cost_center_id string)(*ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if cost_center_id != "" { + urlTplParams["cost_center_id"] = cost_center_id + } + return NewItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsBillingCostCentersRequestBuilderInternal instantiates a new ItemSettingsBillingCostCentersRequestBuilder and sets the default values. +func NewItemSettingsBillingCostCentersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingCostCentersRequestBuilder) { + m := &ItemSettingsBillingCostCentersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/cost-centers", pathParameters), + } + return m +} +// NewItemSettingsBillingCostCentersRequestBuilder instantiates a new ItemSettingsBillingCostCentersRequestBuilder and sets the default values. +func NewItemSettingsBillingCostCentersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingCostCentersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingCostCentersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a list of all the cost centers for an enterprise. +// returns a GetAllCostCentersable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 500 status code +// returns a GetAllCostCenters503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-all-cost-centers-for-an-enterprise +func (m *ItemSettingsBillingCostCentersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GetAllCostCentersable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGetAllCostCenters503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGetAllCostCentersFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GetAllCostCentersable), nil +} +// ToGetRequestInformation gets a list of all the cost centers for an enterprise. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingCostCentersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingCostCentersRequestBuilder when successful +func (m *ItemSettingsBillingCostCentersRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingCostCentersRequestBuilder) { + return NewItemSettingsBillingCostCentersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_billing_cost_centers_with_cost_center_item_request_builder.go b/pkg/github/enterprises/item_settings_billing_cost_centers_with_cost_center_item_request_builder.go new file mode 100644 index 0000000..5cd7b79 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_cost_centers_with_cost_center_item_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\cost-centers\{cost_center_id} +type ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilderInternal instantiates a new ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder and sets the default values. +func NewItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder) { + m := &ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}", pathParameters), + } + return m +} +// NewItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder instantiates a new ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder and sets the default values. +func NewItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Resource the resource property +// returns a *ItemSettingsBillingCostCentersItemResourceRequestBuilder when successful +func (m *ItemSettingsBillingCostCentersWithCost_center_ItemRequestBuilder) Resource()(*ItemSettingsBillingCostCentersItemResourceRequestBuilder) { + return NewItemSettingsBillingCostCentersItemResourceRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_settings_billing_packages_request_builder.go b/pkg/github/enterprises/item_settings_billing_packages_request_builder.go new file mode 100644 index 0000000..69e6ea0 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_packages_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingPackagesRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\packages +type ItemSettingsBillingPackagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingPackagesRequestBuilderInternal instantiates a new ItemSettingsBillingPackagesRequestBuilder and sets the default values. +func NewItemSettingsBillingPackagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingPackagesRequestBuilder) { + m := &ItemSettingsBillingPackagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/packages", pathParameters), + } + return m +} +// NewItemSettingsBillingPackagesRequestBuilder instantiates a new ItemSettingsBillingPackagesRequestBuilder and sets the default values. +func NewItemSettingsBillingPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingPackagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingPackagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the free and paid storage used for GitHub Packages in gigabytes.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."The authenticated user must be an enterprise admin. +// returns a PackagesBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-github-packages-billing-for-an-enterprise +func (m *ItemSettingsBillingPackagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackagesBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackagesBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackagesBillingUsageable), nil +} +// ToGetRequestInformation gets the free and paid storage used for GitHub Packages in gigabytes.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."The authenticated user must be an enterprise admin. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingPackagesRequestBuilder when successful +func (m *ItemSettingsBillingPackagesRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingPackagesRequestBuilder) { + return NewItemSettingsBillingPackagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_billing_request_builder.go b/pkg/github/enterprises/item_settings_billing_request_builder.go new file mode 100644 index 0000000..91fc985 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_request_builder.go @@ -0,0 +1,53 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsBillingRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing +type ItemSettingsBillingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Actions the actions property +// returns a *ItemSettingsBillingActionsRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Actions()(*ItemSettingsBillingActionsRequestBuilder) { + return NewItemSettingsBillingActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AdvancedSecurity the advancedSecurity property +// returns a *ItemSettingsBillingAdvancedSecurityRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) AdvancedSecurity()(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + return NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsBillingRequestBuilderInternal instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + m := &ItemSettingsBillingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing", pathParameters), + } + return m +} +// NewItemSettingsBillingRequestBuilder instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingRequestBuilderInternal(urlParams, requestAdapter) +} +// CostCenters the costCenters property +// returns a *ItemSettingsBillingCostCentersRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) CostCenters()(*ItemSettingsBillingCostCentersRequestBuilder) { + return NewItemSettingsBillingCostCentersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Packages the packages property +// returns a *ItemSettingsBillingPackagesRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Packages()(*ItemSettingsBillingPackagesRequestBuilder) { + return NewItemSettingsBillingPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SharedStorage the sharedStorage property +// returns a *ItemSettingsBillingSharedStorageRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) SharedStorage()(*ItemSettingsBillingSharedStorageRequestBuilder) { + return NewItemSettingsBillingSharedStorageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Usage the usage property +// returns a *ItemSettingsBillingUsageRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Usage()(*ItemSettingsBillingUsageRequestBuilder) { + return NewItemSettingsBillingUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_settings_billing_shared_storage_request_builder.go b/pkg/github/enterprises/item_settings_billing_shared_storage_request_builder.go new file mode 100644 index 0000000..a1242a8 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_shared_storage_request_builder.go @@ -0,0 +1,57 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingSharedStorageRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\shared-storage +type ItemSettingsBillingSharedStorageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingSharedStorageRequestBuilderInternal instantiates a new ItemSettingsBillingSharedStorageRequestBuilder and sets the default values. +func NewItemSettingsBillingSharedStorageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingSharedStorageRequestBuilder) { + m := &ItemSettingsBillingSharedStorageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/shared-storage", pathParameters), + } + return m +} +// NewItemSettingsBillingSharedStorageRequestBuilder instantiates a new ItemSettingsBillingSharedStorageRequestBuilder and sets the default values. +func NewItemSettingsBillingSharedStorageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingSharedStorageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingSharedStorageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."The authenticated user must be an enterprise admin. +// returns a CombinedBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-shared-storage-billing-for-an-enterprise +func (m *ItemSettingsBillingSharedStorageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCombinedBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedBillingUsageable), nil +} +// ToGetRequestInformation gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."The authenticated user must be an enterprise admin. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingSharedStorageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingSharedStorageRequestBuilder when successful +func (m *ItemSettingsBillingSharedStorageRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingSharedStorageRequestBuilder) { + return NewItemSettingsBillingSharedStorageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_billing_usage_request_builder.go b/pkg/github/enterprises/item_settings_billing_usage_request_builder.go new file mode 100644 index 0000000..7ea53e4 --- /dev/null +++ b/pkg/github/enterprises/item_settings_billing_usage_request_builder.go @@ -0,0 +1,80 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingUsageRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings\billing\usage +type ItemSettingsBillingUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSettingsBillingUsageRequestBuilderGetQueryParameters gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise. +type ItemSettingsBillingUsageRequestBuilderGetQueryParameters struct { + // The ID corresponding to a cost center. + Cost_center_id *string `uriparametername:"cost_center_id"` + // If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + Day *int32 `uriparametername:"day"` + // If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + Hour *int32 `uriparametername:"hour"` + // If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + Month *int32 `uriparametername:"month"` + // If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2023`. + Year *int32 `uriparametername:"year"` +} +// NewItemSettingsBillingUsageRequestBuilderInternal instantiates a new ItemSettingsBillingUsageRequestBuilder and sets the default values. +func NewItemSettingsBillingUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingUsageRequestBuilder) { + m := &ItemSettingsBillingUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings/billing/usage{?cost_center_id*,day*,hour*,month*,year*}", pathParameters), + } + return m +} +// NewItemSettingsBillingUsageRequestBuilder instantiates a new ItemSettingsBillingUsageRequestBuilder and sets the default values. +func NewItemSettingsBillingUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise. +// returns a BillingUsageReportable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 500 status code +// returns a BillingUsageReport503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-billing-usage-report-for-an-enterprise +func (m *ItemSettingsBillingUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingUsageRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BillingUsageReportable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBillingUsageReport503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBillingUsageReportFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BillingUsageReportable), nil +} +// ToGetRequestInformation gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingUsageRequestBuilder when successful +func (m *ItemSettingsBillingUsageRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingUsageRequestBuilder) { + return NewItemSettingsBillingUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_settings_request_builder.go b/pkg/github/enterprises/item_settings_request_builder.go new file mode 100644 index 0000000..c7b06c0 --- /dev/null +++ b/pkg/github/enterprises/item_settings_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\settings +type ItemSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Billing the billing property +// returns a *ItemSettingsBillingRequestBuilder when successful +func (m *ItemSettingsRequestBuilder) Billing()(*ItemSettingsBillingRequestBuilder) { + return NewItemSettingsBillingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsRequestBuilderInternal instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + m := &ItemSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/settings", pathParameters), + } + return m +} +// NewItemSettingsRequestBuilder instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/item_with_security_product_item_request_builder.go b/pkg/github/enterprises/item_with_security_product_item_request_builder.go new file mode 100644 index 0000000..9641370 --- /dev/null +++ b/pkg/github/enterprises/item_with_security_product_item_request_builder.go @@ -0,0 +1,35 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemWithSecurity_productItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\{security_product} +type ItemWithSecurity_productItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByEnablement gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.item.item collection +// returns a *ItemItemWithEnablementItemRequestBuilder when successful +func (m *ItemWithSecurity_productItemRequestBuilder) ByEnablement(enablement string)(*ItemItemWithEnablementItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if enablement != "" { + urlTplParams["enablement"] = enablement + } + return NewItemItemWithEnablementItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemWithSecurity_productItemRequestBuilderInternal instantiates a new ItemWithSecurity_productItemRequestBuilder and sets the default values. +func NewItemWithSecurity_productItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithSecurity_productItemRequestBuilder) { + m := &ItemWithSecurity_productItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/{security_product}", pathParameters), + } + return m +} +// NewItemWithSecurity_productItemRequestBuilder instantiates a new ItemWithSecurity_productItemRequestBuilder and sets the default values. +func NewItemWithSecurity_productItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithSecurity_productItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemWithSecurity_productItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/with_enterprise_item_request_builder.go b/pkg/github/enterprises/with_enterprise_item_request_builder.go new file mode 100644 index 0000000..64f51fc --- /dev/null +++ b/pkg/github/enterprises/with_enterprise_item_request_builder.go @@ -0,0 +1,90 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithEnterpriseItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise} +type WithEnterpriseItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Actions the actions property +// returns a *ItemActionsRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Actions()(*ItemActionsRequestBuilder) { + return NewItemActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Announcement the announcement property +// returns a *ItemAnnouncementRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Announcement()(*ItemAnnouncementRequestBuilder) { + return NewItemAnnouncementRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AuditLog the auditLog property +// returns a *ItemAuditLogRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) AuditLog()(*ItemAuditLogRequestBuilder) { + return NewItemAuditLogRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// BySecurity_product gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.enterprises.item.item collection +// returns a *ItemWithSecurity_productItemRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) BySecurity_product(security_product string)(*ItemWithSecurity_productItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if security_product != "" { + urlTplParams["security_product"] = security_product + } + return NewItemWithSecurity_productItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Code_security_and_analysis the code_security_and_analysis property +// returns a *ItemCode_security_and_analysisRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Code_security_and_analysis()(*ItemCode_security_and_analysisRequestBuilder) { + return NewItemCode_security_and_analysisRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CodeScanning the codeScanning property +// returns a *ItemCodeScanningRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) CodeScanning()(*ItemCodeScanningRequestBuilder) { + return NewItemCodeScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithEnterpriseItemRequestBuilderInternal instantiates a new WithEnterpriseItemRequestBuilder and sets the default values. +func NewWithEnterpriseItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithEnterpriseItemRequestBuilder) { + m := &WithEnterpriseItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}", pathParameters), + } + return m +} +// NewWithEnterpriseItemRequestBuilder instantiates a new WithEnterpriseItemRequestBuilder and sets the default values. +func NewWithEnterpriseItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithEnterpriseItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithEnterpriseItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ConsumedLicenses the consumedLicenses property +// returns a *ItemConsumedLicensesRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) ConsumedLicenses()(*ItemConsumedLicensesRequestBuilder) { + return NewItemConsumedLicensesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Copilot the copilot property +// returns a *ItemCopilotRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Copilot()(*ItemCopilotRequestBuilder) { + return NewItemCopilotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Dependabot the dependabot property +// returns a *ItemDependabotRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Dependabot()(*ItemDependabotRequestBuilder) { + return NewItemDependabotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// LicenseSyncStatus the licenseSyncStatus property +// returns a *ItemLicenseSyncStatusRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) LicenseSyncStatus()(*ItemLicenseSyncStatusRequestBuilder) { + return NewItemLicenseSyncStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecretScanning the secretScanning property +// returns a *ItemSecretScanningRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) SecretScanning()(*ItemSecretScanningRequestBuilder) { + return NewItemSecretScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Settings the settings property +// returns a *ItemSettingsRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { + return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/events/events_request_builder.go b/pkg/github/events/events_request_builder.go new file mode 100644 index 0000000..78ca96a --- /dev/null +++ b/pkg/github/events/events_request_builder.go @@ -0,0 +1,73 @@ +package events + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// EventsRequestBuilder builds and executes requests for operations under \events +type EventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EventsRequestBuilderGetQueryParameters we delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. +type EventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewEventsRequestBuilderInternal instantiates a new EventsRequestBuilder and sets the default values. +func NewEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EventsRequestBuilder) { + m := &EventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewEventsRequestBuilder instantiates a new EventsRequestBuilder and sets the default values. +func NewEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get we delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. +// returns a []Eventable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a Events503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-public-events +func (m *EventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[EventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEvents503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// ToGetRequestInformation we delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. +// returns a *RequestInformation when successful +func (m *EventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[EventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *EventsRequestBuilder when successful +func (m *EventsRequestBuilder) WithUrl(rawUrl string)(*EventsRequestBuilder) { + return NewEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/feeds/feeds_request_builder.go b/pkg/github/feeds/feeds_request_builder.go new file mode 100644 index 0000000..325cd04 --- /dev/null +++ b/pkg/github/feeds/feeds_request_builder.go @@ -0,0 +1,57 @@ +package feeds + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// FeedsRequestBuilder builds and executes requests for operations under \feeds +type FeedsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewFeedsRequestBuilderInternal instantiates a new FeedsRequestBuilder and sets the default values. +func NewFeedsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FeedsRequestBuilder) { + m := &FeedsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/feeds", pathParameters), + } + return m +} +// NewFeedsRequestBuilder instantiates a new FeedsRequestBuilder and sets the default values. +func NewFeedsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FeedsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFeedsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub Enterprise Cloud global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Cloud.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. +// returns a Feedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/feeds#get-feeds +func (m *FeedsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Feedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFeedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Feedable), nil +} +// ToGetRequestInformation lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub Enterprise Cloud global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Cloud.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. +// returns a *RequestInformation when successful +func (m *FeedsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FeedsRequestBuilder when successful +func (m *FeedsRequestBuilder) WithUrl(rawUrl string)(*FeedsRequestBuilder) { + return NewFeedsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/gists_post_request_body.go b/pkg/github/gists/gists_post_request_body.go new file mode 100644 index 0000000..c36f92d --- /dev/null +++ b/pkg/github/gists/gists_post_request_body.go @@ -0,0 +1,232 @@ +package gists + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Description of the gist + description *string + // Names and content for the files that make up the gist + files GistsPostRequestBody_filesable + // The public property + public GistsPostRequestBody_GistsPostRequestBody_publicable +} +// GistsPostRequestBody_GistsPostRequestBody_public composed type wrapper for classes bool, string +type GistsPostRequestBody_GistsPostRequestBody_public struct { + // Composed type representation for type bool + boolean *bool + // Composed type representation for type string + string *string +} +// NewGistsPostRequestBody_GistsPostRequestBody_public instantiates a new GistsPostRequestBody_GistsPostRequestBody_public and sets the default values. +func NewGistsPostRequestBody_GistsPostRequestBody_public()(*GistsPostRequestBody_GistsPostRequestBody_public) { + m := &GistsPostRequestBody_GistsPostRequestBody_public{ + } + return m +} +// CreateGistsPostRequestBody_GistsPostRequestBody_publicFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistsPostRequestBody_GistsPostRequestBody_publicFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewGistsPostRequestBody_GistsPostRequestBody_public() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetBoolValue(); val != nil { + if err != nil { + return nil, err + } + result.SetBoolean(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetBoolean gets the boolean property value. Composed type representation for type bool +// returns a *bool when successful +func (m *GistsPostRequestBody_GistsPostRequestBody_public) GetBoolean()(*bool) { + return m.boolean +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistsPostRequestBody_GistsPostRequestBody_public) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *GistsPostRequestBody_GistsPostRequestBody_public) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *GistsPostRequestBody_GistsPostRequestBody_public) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *GistsPostRequestBody_GistsPostRequestBody_public) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBoolean() != nil { + err := writer.WriteBoolValue("", m.GetBoolean()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetBoolean sets the boolean property value. Composed type representation for type bool +func (m *GistsPostRequestBody_GistsPostRequestBody_public) SetBoolean(value *bool)() { + m.boolean = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *GistsPostRequestBody_GistsPostRequestBody_public) SetString(value *string)() { + m.string = value +} +type GistsPostRequestBody_GistsPostRequestBody_publicable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBoolean()(*bool) + GetString()(*string) + SetBoolean(value *bool)() + SetString(value *string)() +} +// NewGistsPostRequestBody instantiates a new GistsPostRequestBody and sets the default values. +func NewGistsPostRequestBody()(*GistsPostRequestBody) { + m := &GistsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. Description of the gist +// returns a *string when successful +func (m *GistsPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistsPostRequestBody_filesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFiles(val.(GistsPostRequestBody_filesable)) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistsPostRequestBody_GistsPostRequestBody_publicFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublic(val.(GistsPostRequestBody_GistsPostRequestBody_publicable)) + } + return nil + } + return res +} +// GetFiles gets the files property value. Names and content for the files that make up the gist +// returns a GistsPostRequestBody_filesable when successful +func (m *GistsPostRequestBody) GetFiles()(GistsPostRequestBody_filesable) { + return m.files +} +// GetPublic gets the public property value. The public property +// returns a GistsPostRequestBody_GistsPostRequestBody_publicable when successful +func (m *GistsPostRequestBody) GetPublic()(GistsPostRequestBody_GistsPostRequestBody_publicable) { + return m.public +} +// Serialize serializes information the current object +func (m *GistsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("files", m.GetFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("public", m.GetPublic()) + 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 *GistsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. Description of the gist +func (m *GistsPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetFiles sets the files property value. Names and content for the files that make up the gist +func (m *GistsPostRequestBody) SetFiles(value GistsPostRequestBody_filesable)() { + m.files = value +} +// SetPublic sets the public property value. The public property +func (m *GistsPostRequestBody) SetPublic(value GistsPostRequestBody_GistsPostRequestBody_publicable)() { + m.public = value +} +type GistsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetFiles()(GistsPostRequestBody_filesable) + GetPublic()(GistsPostRequestBody_GistsPostRequestBody_publicable) + SetDescription(value *string)() + SetFiles(value GistsPostRequestBody_filesable)() + SetPublic(value GistsPostRequestBody_GistsPostRequestBody_publicable)() +} diff --git a/pkg/github/gists/gists_post_request_body_files.go b/pkg/github/gists/gists_post_request_body_files.go new file mode 100644 index 0000000..41da470 --- /dev/null +++ b/pkg/github/gists/gists_post_request_body_files.go @@ -0,0 +1,52 @@ +package gists + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GistsPostRequestBody_files names and content for the files that make up the gist +type GistsPostRequestBody_files struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewGistsPostRequestBody_files instantiates a new GistsPostRequestBody_files and sets the default values. +func NewGistsPostRequestBody_files()(*GistsPostRequestBody_files) { + m := &GistsPostRequestBody_files{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistsPostRequestBody_filesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistsPostRequestBody_filesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistsPostRequestBody_files(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistsPostRequestBody_files) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistsPostRequestBody_files) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *GistsPostRequestBody_files) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistsPostRequestBody_files) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type GistsPostRequestBody_filesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/gists/gists_request_builder.go b/pkg/github/gists/gists_request_builder.go new file mode 100644 index 0000000..e17660c --- /dev/null +++ b/pkg/github/gists/gists_request_builder.go @@ -0,0 +1,135 @@ +package gists + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// GistsRequestBuilder builds and executes requests for operations under \gists +type GistsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GistsRequestBuilderGetQueryParameters lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: +type GistsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// ByGist_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.gists.item collection +// returns a *WithGist_ItemRequestBuilder when successful +func (m *GistsRequestBuilder) ByGist_id(gist_id string)(*WithGist_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if gist_id != "" { + urlTplParams["gist_id"] = gist_id + } + return NewWithGist_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewGistsRequestBuilderInternal instantiates a new GistsRequestBuilder and sets the default values. +func NewGistsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GistsRequestBuilder) { + m := &GistsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists{?page*,per_page*,since*}", pathParameters), + } + return m +} +// NewGistsRequestBuilder instantiates a new GistsRequestBuilder and sets the default values. +func NewGistsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GistsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGistsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: +// returns a []BaseGistable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#list-gists-for-the-authenticated-user +func (m *GistsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[GistsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBaseGistFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable) + } + } + return val, nil +} +// Post allows you to add a new gist with one or more files.**Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. +// returns a GistSimpleable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#create-a-gist +func (m *GistsRequestBuilder) Post(ctx context.Context, body GistsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable), nil +} +// Public the public property +// returns a *PublicRequestBuilder when successful +func (m *GistsRequestBuilder) Public()(*PublicRequestBuilder) { + return NewPublicRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Starred the starred property +// returns a *StarredRequestBuilder when successful +func (m *GistsRequestBuilder) Starred()(*StarredRequestBuilder) { + return NewStarredRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: +// returns a *RequestInformation when successful +func (m *GistsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[GistsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation allows you to add a new gist with one or more files.**Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. +// returns a *RequestInformation when successful +func (m *GistsRequestBuilder) ToPostRequestInformation(ctx context.Context, body GistsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *GistsRequestBuilder when successful +func (m *GistsRequestBuilder) WithUrl(rawUrl string)(*GistsRequestBuilder) { + return NewGistsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/item_comments_item_with_comment_patch_request_body.go b/pkg/github/gists/item_comments_item_with_comment_patch_request_body.go new file mode 100644 index 0000000..d4c89fb --- /dev/null +++ b/pkg/github/gists/item_comments_item_with_comment_patch_request_body.go @@ -0,0 +1,80 @@ +package gists + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCommentsItemWithComment_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comment text. + body *string +} +// NewItemCommentsItemWithComment_PatchRequestBody instantiates a new ItemCommentsItemWithComment_PatchRequestBody and sets the default values. +func NewItemCommentsItemWithComment_PatchRequestBody()(*ItemCommentsItemWithComment_PatchRequestBody) { + m := &ItemCommentsItemWithComment_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCommentsItemWithComment_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCommentsItemWithComment_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The comment text. +// returns a *string when successful +func (m *ItemCommentsItemWithComment_PatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCommentsItemWithComment_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemCommentsItemWithComment_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemCommentsItemWithComment_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The comment text. +func (m *ItemCommentsItemWithComment_PatchRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemCommentsItemWithComment_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/gists/item_comments_post_request_body.go b/pkg/github/gists/item_comments_post_request_body.go new file mode 100644 index 0000000..edf3150 --- /dev/null +++ b/pkg/github/gists/item_comments_post_request_body.go @@ -0,0 +1,80 @@ +package gists + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCommentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comment text. + body *string +} +// NewItemCommentsPostRequestBody instantiates a new ItemCommentsPostRequestBody and sets the default values. +func NewItemCommentsPostRequestBody()(*ItemCommentsPostRequestBody) { + m := &ItemCommentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCommentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCommentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCommentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCommentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The comment text. +// returns a *string when successful +func (m *ItemCommentsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCommentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemCommentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemCommentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The comment text. +func (m *ItemCommentsPostRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemCommentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/gists/item_comments_request_builder.go b/pkg/github/gists/item_comments_request_builder.go new file mode 100644 index 0000000..9c91075 --- /dev/null +++ b/pkg/github/gists/item_comments_request_builder.go @@ -0,0 +1,121 @@ +package gists + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCommentsRequestBuilder builds and executes requests for operations under \gists\{gist_id}\comments +type ItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCommentsRequestBuilderGetQueryParameters lists the comments on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +type ItemCommentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.gists.item.comments.item collection +// returns a *ItemCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemCommentsWithComment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10) + return NewItemCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCommentsRequestBuilderInternal instantiates a new ItemCommentsRequestBuilder and sets the default values. +func NewItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCommentsRequestBuilder) { + m := &ItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}/comments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCommentsRequestBuilder instantiates a new ItemCommentsRequestBuilder and sets the default values. +func NewItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the comments on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a []GistCommentable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/comments#list-gist-comments +func (m *ItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable) + } + } + return val, nil +} +// Post creates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a GistCommentable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/comments#create-a-gist-comment +func (m *ItemCommentsRequestBuilder) Post(ctx context.Context, body ItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable), nil +} +// ToGetRequestInformation lists the comments on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *ItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *ItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCommentsRequestBuilder when successful +func (m *ItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemCommentsRequestBuilder) { + return NewItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/item_comments_with_comment_item_request_builder.go b/pkg/github/gists/item_comments_with_comment_item_request_builder.go new file mode 100644 index 0000000..35e2a1a --- /dev/null +++ b/pkg/github/gists/item_comments_with_comment_item_request_builder.go @@ -0,0 +1,126 @@ +package gists + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCommentsWithComment_ItemRequestBuilder builds and executes requests for operations under \gists\{gist_id}\comments\{comment_id} +type ItemCommentsWithComment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCommentsWithComment_ItemRequestBuilderInternal instantiates a new ItemCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemCommentsWithComment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCommentsWithComment_ItemRequestBuilder) { + m := &ItemCommentsWithComment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}/comments/{comment_id}", pathParameters), + } + return m +} +// NewItemCommentsWithComment_ItemRequestBuilder instantiates a new ItemCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemCommentsWithComment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCommentsWithComment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCommentsWithComment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a gist comment +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/comments#delete-a-gist-comment +func (m *ItemCommentsWithComment_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a GistCommentable when successful +// returns a GistComment403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/comments#get-a-gist-comment +func (m *ItemCommentsWithComment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistComment403ErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable), nil +} +// Patch updates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a GistCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/comments#update-a-gist-comment +func (m *ItemCommentsWithComment_ItemRequestBuilder) Patch(ctx context.Context, body ItemCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommentable), nil +} +// returns a *RequestInformation when successful +func (m *ItemCommentsWithComment_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *ItemCommentsWithComment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *ItemCommentsWithComment_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemCommentsWithComment_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemCommentsWithComment_ItemRequestBuilder) { + return NewItemCommentsWithComment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/item_commits_request_builder.go b/pkg/github/gists/item_commits_request_builder.go new file mode 100644 index 0000000..3c01c80 --- /dev/null +++ b/pkg/github/gists/item_commits_request_builder.go @@ -0,0 +1,72 @@ +package gists + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCommitsRequestBuilder builds and executes requests for operations under \gists\{gist_id}\commits +type ItemCommitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCommitsRequestBuilderGetQueryParameters list gist commits +type ItemCommitsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemCommitsRequestBuilderInternal instantiates a new ItemCommitsRequestBuilder and sets the default values. +func NewItemCommitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCommitsRequestBuilder) { + m := &ItemCommitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}/commits{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCommitsRequestBuilder instantiates a new ItemCommitsRequestBuilder and sets the default values. +func NewItemCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCommitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCommitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list gist commits +// returns a []GistCommitable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#list-gist-commits +func (m *ItemCommitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCommitsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommitable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommitable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistCommitable) + } + } + return val, nil +} +// returns a *RequestInformation when successful +func (m *ItemCommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCommitsRequestBuilder when successful +func (m *ItemCommitsRequestBuilder) WithUrl(rawUrl string)(*ItemCommitsRequestBuilder) { + return NewItemCommitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/item_forks_request_builder.go b/pkg/github/gists/item_forks_request_builder.go new file mode 100644 index 0000000..2582d97 --- /dev/null +++ b/pkg/github/gists/item_forks_request_builder.go @@ -0,0 +1,106 @@ +package gists + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemForksRequestBuilder builds and executes requests for operations under \gists\{gist_id}\forks +type ItemForksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemForksRequestBuilderGetQueryParameters list gist forks +type ItemForksRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemForksRequestBuilderInternal instantiates a new ItemForksRequestBuilder and sets the default values. +func NewItemForksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemForksRequestBuilder) { + m := &ItemForksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}/forks{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemForksRequestBuilder instantiates a new ItemForksRequestBuilder and sets the default values. +func NewItemForksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemForksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemForksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list gist forks +// returns a []GistSimpleable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#list-gist-forks +func (m *ItemForksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemForksRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable) + } + } + return val, nil +} +// Post fork a gist +// returns a BaseGistable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#fork-a-gist +func (m *ItemForksRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBaseGistFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable), nil +} +// returns a *RequestInformation when successful +func (m *ItemForksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemForksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemForksRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemForksRequestBuilder when successful +func (m *ItemForksRequestBuilder) WithUrl(rawUrl string)(*ItemForksRequestBuilder) { + return NewItemForksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/item_star404_error.go b/pkg/github/gists/item_star404_error.go new file mode 100644 index 0000000..34d3a62 --- /dev/null +++ b/pkg/github/gists/item_star404_error.go @@ -0,0 +1,40 @@ +package gists + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemStar404Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError +} +// NewItemStar404Error instantiates a new ItemStar404Error and sets the default values. +func NewItemStar404Error()(*ItemStar404Error) { + m := &ItemStar404Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + return m +} +// CreateItemStar404ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStar404ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemStar404Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemStar404Error) Error()(string) { + return m.ApiError.Error() +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStar404Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemStar404Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +type ItemStar404Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/gists/item_star_request_builder.go b/pkg/github/gists/item_star_request_builder.go new file mode 100644 index 0000000..85c96a0 --- /dev/null +++ b/pkg/github/gists/item_star_request_builder.go @@ -0,0 +1,115 @@ +package gists + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemStarRequestBuilder builds and executes requests for operations under \gists\{gist_id}\star +type ItemStarRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemStarRequestBuilderInternal instantiates a new ItemStarRequestBuilder and sets the default values. +func NewItemStarRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStarRequestBuilder) { + m := &ItemStarRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}/star", pathParameters), + } + return m +} +// NewItemStarRequestBuilder instantiates a new ItemStarRequestBuilder and sets the default values. +func NewItemStarRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStarRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemStarRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete unstar a gist +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#unstar-a-gist +func (m *ItemStarRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get check if a gist is starred +// returns a BasicError error when the service returns a 403 status code +// returns a ItemStar404Error error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#check-if-a-gist-is-starred +func (m *ItemStarRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": CreateItemStar404ErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#star-a-gist +func (m *ItemStarRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// returns a *RequestInformation when successful +func (m *ItemStarRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemStarRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a *RequestInformation when successful +func (m *ItemStarRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemStarRequestBuilder when successful +func (m *ItemStarRequestBuilder) WithUrl(rawUrl string)(*ItemStarRequestBuilder) { + return NewItemStarRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/item_with_gist_patch_request_body.go b/pkg/github/gists/item_with_gist_patch_request_body.go new file mode 100644 index 0000000..9b5c888 --- /dev/null +++ b/pkg/github/gists/item_with_gist_patch_request_body.go @@ -0,0 +1,109 @@ +package gists + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWithGist_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the gist. + description *string + // The gist files to be updated, renamed, or deleted. Each `key` must match the current filename(including extension) of the targeted gist file. For example: `hello.py`.To delete a file, set the whole file to null. For example: `hello.py : null`. The file will also bedeleted if the specified object does not contain at least one of `content` or `filename`. + files ItemWithGist_PatchRequestBody_filesable +} +// NewItemWithGist_PatchRequestBody instantiates a new ItemWithGist_PatchRequestBody and sets the default values. +func NewItemWithGist_PatchRequestBody()(*ItemWithGist_PatchRequestBody) { + m := &ItemWithGist_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithGist_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithGist_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithGist_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithGist_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description of the gist. +// returns a *string when successful +func (m *ItemWithGist_PatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithGist_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemWithGist_PatchRequestBody_filesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFiles(val.(ItemWithGist_PatchRequestBody_filesable)) + } + return nil + } + return res +} +// GetFiles gets the files property value. The gist files to be updated, renamed, or deleted. Each `key` must match the current filename(including extension) of the targeted gist file. For example: `hello.py`.To delete a file, set the whole file to null. For example: `hello.py : null`. The file will also bedeleted if the specified object does not contain at least one of `content` or `filename`. +// returns a ItemWithGist_PatchRequestBody_filesable when successful +func (m *ItemWithGist_PatchRequestBody) GetFiles()(ItemWithGist_PatchRequestBody_filesable) { + return m.files +} +// Serialize serializes information the current object +func (m *ItemWithGist_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("files", m.GetFiles()) + 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 *ItemWithGist_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of the gist. +func (m *ItemWithGist_PatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetFiles sets the files property value. The gist files to be updated, renamed, or deleted. Each `key` must match the current filename(including extension) of the targeted gist file. For example: `hello.py`.To delete a file, set the whole file to null. For example: `hello.py : null`. The file will also bedeleted if the specified object does not contain at least one of `content` or `filename`. +func (m *ItemWithGist_PatchRequestBody) SetFiles(value ItemWithGist_PatchRequestBody_filesable)() { + m.files = value +} +type ItemWithGist_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetFiles()(ItemWithGist_PatchRequestBody_filesable) + SetDescription(value *string)() + SetFiles(value ItemWithGist_PatchRequestBody_filesable)() +} diff --git a/pkg/github/gists/item_with_gist_patch_request_body_files.go b/pkg/github/gists/item_with_gist_patch_request_body_files.go new file mode 100644 index 0000000..4546eff --- /dev/null +++ b/pkg/github/gists/item_with_gist_patch_request_body_files.go @@ -0,0 +1,52 @@ +package gists + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemWithGist_PatchRequestBody_files the gist files to be updated, renamed, or deleted. Each `key` must match the current filename(including extension) of the targeted gist file. For example: `hello.py`.To delete a file, set the whole file to null. For example: `hello.py : null`. The file will also bedeleted if the specified object does not contain at least one of `content` or `filename`. +type ItemWithGist_PatchRequestBody_files struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemWithGist_PatchRequestBody_files instantiates a new ItemWithGist_PatchRequestBody_files and sets the default values. +func NewItemWithGist_PatchRequestBody_files()(*ItemWithGist_PatchRequestBody_files) { + m := &ItemWithGist_PatchRequestBody_files{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithGist_PatchRequestBody_filesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithGist_PatchRequestBody_filesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithGist_PatchRequestBody_files(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithGist_PatchRequestBody_files) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithGist_PatchRequestBody_files) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemWithGist_PatchRequestBody_files) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemWithGist_PatchRequestBody_files) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemWithGist_PatchRequestBody_filesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/gists/item_with_sha_item_request_builder.go b/pkg/github/gists/item_with_sha_item_request_builder.go new file mode 100644 index 0000000..9ff0884 --- /dev/null +++ b/pkg/github/gists/item_with_sha_item_request_builder.go @@ -0,0 +1,65 @@ +package gists + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemWithShaItemRequestBuilder builds and executes requests for operations under \gists\{gist_id}\{sha} +type ItemWithShaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemWithShaItemRequestBuilderInternal instantiates a new ItemWithShaItemRequestBuilder and sets the default values. +func NewItemWithShaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithShaItemRequestBuilder) { + m := &ItemWithShaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}/{sha}", pathParameters), + } + return m +} +// NewItemWithShaItemRequestBuilder instantiates a new ItemWithShaItemRequestBuilder and sets the default values. +func NewItemWithShaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithShaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemWithShaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a specified gist revision.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a GistSimpleable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#get-a-gist-revision +func (m *ItemWithShaItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable), nil +} +// ToGetRequestInformation gets a specified gist revision.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *ItemWithShaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemWithShaItemRequestBuilder when successful +func (m *ItemWithShaItemRequestBuilder) WithUrl(rawUrl string)(*ItemWithShaItemRequestBuilder) { + return NewItemWithShaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/public_request_builder.go b/pkg/github/gists/public_request_builder.go new file mode 100644 index 0000000..2669bb3 --- /dev/null +++ b/pkg/github/gists/public_request_builder.go @@ -0,0 +1,76 @@ +package gists + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// PublicRequestBuilder builds and executes requests for operations under \gists\public +type PublicRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PublicRequestBuilderGetQueryParameters list public gists sorted by most recently updated to least recently updated.Note: With [pagination](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. +type PublicRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// NewPublicRequestBuilderInternal instantiates a new PublicRequestBuilder and sets the default values. +func NewPublicRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PublicRequestBuilder) { + m := &PublicRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/public{?page*,per_page*,since*}", pathParameters), + } + return m +} +// NewPublicRequestBuilder instantiates a new PublicRequestBuilder and sets the default values. +func NewPublicRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PublicRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPublicRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list public gists sorted by most recently updated to least recently updated.Note: With [pagination](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. +// returns a []BaseGistable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#list-public-gists +func (m *PublicRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PublicRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBaseGistFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable) + } + } + return val, nil +} +// ToGetRequestInformation list public gists sorted by most recently updated to least recently updated.Note: With [pagination](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. +// returns a *RequestInformation when successful +func (m *PublicRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PublicRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PublicRequestBuilder when successful +func (m *PublicRequestBuilder) WithUrl(rawUrl string)(*PublicRequestBuilder) { + return NewPublicRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/starred_request_builder.go b/pkg/github/gists/starred_request_builder.go new file mode 100644 index 0000000..015ab69 --- /dev/null +++ b/pkg/github/gists/starred_request_builder.go @@ -0,0 +1,76 @@ +package gists + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// StarredRequestBuilder builds and executes requests for operations under \gists\starred +type StarredRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// StarredRequestBuilderGetQueryParameters list the authenticated user's starred gists: +type StarredRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// NewStarredRequestBuilderInternal instantiates a new StarredRequestBuilder and sets the default values. +func NewStarredRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredRequestBuilder) { + m := &StarredRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/starred{?page*,per_page*,since*}", pathParameters), + } + return m +} +// NewStarredRequestBuilder instantiates a new StarredRequestBuilder and sets the default values. +func NewStarredRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStarredRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the authenticated user's starred gists: +// returns a []BaseGistable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#list-starred-gists +func (m *StarredRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StarredRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBaseGistFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable) + } + } + return val, nil +} +// ToGetRequestInformation list the authenticated user's starred gists: +// returns a *RequestInformation when successful +func (m *StarredRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StarredRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *StarredRequestBuilder when successful +func (m *StarredRequestBuilder) WithUrl(rawUrl string)(*StarredRequestBuilder) { + return NewStarredRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gists/with_gist_item_request_builder.go b/pkg/github/gists/with_gist_item_request_builder.go new file mode 100644 index 0000000..d2fc67a --- /dev/null +++ b/pkg/github/gists/with_gist_item_request_builder.go @@ -0,0 +1,160 @@ +package gists + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithGist_ItemRequestBuilder builds and executes requests for operations under \gists\{gist_id} +type WithGist_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySha gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.gists.item.item collection +// returns a *ItemWithShaItemRequestBuilder when successful +func (m *WithGist_ItemRequestBuilder) BySha(sha string)(*ItemWithShaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if sha != "" { + urlTplParams["sha"] = sha + } + return NewItemWithShaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemCommentsRequestBuilder when successful +func (m *WithGist_ItemRequestBuilder) Comments()(*ItemCommentsRequestBuilder) { + return NewItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commits the commits property +// returns a *ItemCommitsRequestBuilder when successful +func (m *WithGist_ItemRequestBuilder) Commits()(*ItemCommitsRequestBuilder) { + return NewItemCommitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithGist_ItemRequestBuilderInternal instantiates a new WithGist_ItemRequestBuilder and sets the default values. +func NewWithGist_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithGist_ItemRequestBuilder) { + m := &WithGist_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gists/{gist_id}", pathParameters), + } + return m +} +// NewWithGist_ItemRequestBuilder instantiates a new WithGist_ItemRequestBuilder and sets the default values. +func NewWithGist_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithGist_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithGist_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a gist +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#delete-a-gist +func (m *WithGist_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Forks the forks property +// returns a *ItemForksRequestBuilder when successful +func (m *WithGist_ItemRequestBuilder) Forks()(*ItemForksRequestBuilder) { + return NewItemForksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets a specified gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a GistSimpleable when successful +// returns a GistSimple403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#get-a-gist +func (m *WithGist_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistSimple403ErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable), nil +} +// Patch allows you to update a gist's description and to update, delete, or rename gist files. Filesfrom the previous version of the gist that aren't explicitly changed during an editare unchanged.At least one of `description` or `files` is required.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a GistSimpleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#update-a-gist +func (m *WithGist_ItemRequestBuilder) Patch(ctx context.Context, body ItemWithGist_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGistSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GistSimpleable), nil +} +// Star the star property +// returns a *ItemStarRequestBuilder when successful +func (m *WithGist_ItemRequestBuilder) Star()(*ItemStarRequestBuilder) { + return NewItemStarRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// returns a *RequestInformation when successful +func (m *WithGist_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specified gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *WithGist_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation allows you to update a gist's description and to update, delete, or rename gist files. Filesfrom the previous version of the gist that aren't explicitly changed during an editare unchanged.At least one of `description` or `files` is required.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. +// returns a *RequestInformation when successful +func (m *WithGist_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithGist_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithGist_ItemRequestBuilder when successful +func (m *WithGist_ItemRequestBuilder) WithUrl(rawUrl string)(*WithGist_ItemRequestBuilder) { + return NewWithGist_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gitignore/gitignore_request_builder.go b/pkg/github/gitignore/gitignore_request_builder.go new file mode 100644 index 0000000..1f09698 --- /dev/null +++ b/pkg/github/gitignore/gitignore_request_builder.go @@ -0,0 +1,28 @@ +package gitignore + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// GitignoreRequestBuilder builds and executes requests for operations under \gitignore +type GitignoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewGitignoreRequestBuilderInternal instantiates a new GitignoreRequestBuilder and sets the default values. +func NewGitignoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GitignoreRequestBuilder) { + m := &GitignoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gitignore", pathParameters), + } + return m +} +// NewGitignoreRequestBuilder instantiates a new GitignoreRequestBuilder and sets the default values. +func NewGitignoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GitignoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGitignoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Templates the templates property +// returns a *TemplatesRequestBuilder when successful +func (m *GitignoreRequestBuilder) Templates()(*TemplatesRequestBuilder) { + return NewTemplatesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/gitignore/templates_request_builder.go b/pkg/github/gitignore/templates_request_builder.go new file mode 100644 index 0000000..2393f81 --- /dev/null +++ b/pkg/github/gitignore/templates_request_builder.go @@ -0,0 +1,71 @@ +package gitignore + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// TemplatesRequestBuilder builds and executes requests for operations under \gitignore\templates +type TemplatesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.gitignore.templates.item collection +// returns a *TemplatesWithNameItemRequestBuilder when successful +func (m *TemplatesRequestBuilder) ByName(name string)(*TemplatesWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewTemplatesWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewTemplatesRequestBuilderInternal instantiates a new TemplatesRequestBuilder and sets the default values. +func NewTemplatesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TemplatesRequestBuilder) { + m := &TemplatesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gitignore/templates", pathParameters), + } + return m +} +// NewTemplatesRequestBuilder instantiates a new TemplatesRequestBuilder and sets the default values. +func NewTemplatesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TemplatesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTemplatesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-a-repository-for-the-authenticated-user). +// returns a []string when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gitignore/gitignore#get-all-gitignore-templates +func (m *TemplatesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]string, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "string", nil) + if err != nil { + return nil, err + } + val := make([]string, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*string)) + } + } + return val, nil +} +// ToGetRequestInformation list all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-a-repository-for-the-authenticated-user). +// returns a *RequestInformation when successful +func (m *TemplatesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TemplatesRequestBuilder when successful +func (m *TemplatesRequestBuilder) WithUrl(rawUrl string)(*TemplatesRequestBuilder) { + return NewTemplatesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/gitignore/templates_with_name_item_request_builder.go b/pkg/github/gitignore/templates_with_name_item_request_builder.go new file mode 100644 index 0000000..a3b911f --- /dev/null +++ b/pkg/github/gitignore/templates_with_name_item_request_builder.go @@ -0,0 +1,57 @@ +package gitignore + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// TemplatesWithNameItemRequestBuilder builds and executes requests for operations under \gitignore\templates\{name} +type TemplatesWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewTemplatesWithNameItemRequestBuilderInternal instantiates a new TemplatesWithNameItemRequestBuilder and sets the default values. +func NewTemplatesWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TemplatesWithNameItemRequestBuilder) { + m := &TemplatesWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/gitignore/templates/{name}", pathParameters), + } + return m +} +// NewTemplatesWithNameItemRequestBuilder instantiates a new TemplatesWithNameItemRequestBuilder and sets the default values. +func NewTemplatesWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TemplatesWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTemplatesWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the content of a gitignore template.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw .gitignore contents. +// returns a GitignoreTemplateable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gitignore/gitignore#get-a-gitignore-template +func (m *TemplatesWithNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitignoreTemplateable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitignoreTemplateFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitignoreTemplateable), nil +} +// ToGetRequestInformation get the content of a gitignore template.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw .gitignore contents. +// returns a *RequestInformation when successful +func (m *TemplatesWithNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TemplatesWithNameItemRequestBuilder when successful +func (m *TemplatesWithNameItemRequestBuilder) WithUrl(rawUrl string)(*TemplatesWithNameItemRequestBuilder) { + return NewTemplatesWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/installation/installation_request_builder.go b/pkg/github/installation/installation_request_builder.go new file mode 100644 index 0000000..5a20731 --- /dev/null +++ b/pkg/github/installation/installation_request_builder.go @@ -0,0 +1,33 @@ +package installation + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// InstallationRequestBuilder builds and executes requests for operations under \installation +type InstallationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewInstallationRequestBuilderInternal instantiates a new InstallationRequestBuilder and sets the default values. +func NewInstallationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationRequestBuilder) { + m := &InstallationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/installation", pathParameters), + } + return m +} +// NewInstallationRequestBuilder instantiates a new InstallationRequestBuilder and sets the default values. +func NewInstallationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationRequestBuilderInternal(urlParams, requestAdapter) +} +// Repositories the repositories property +// returns a *RepositoriesRequestBuilder when successful +func (m *InstallationRequestBuilder) Repositories()(*RepositoriesRequestBuilder) { + return NewRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Token the token property +// returns a *TokenRequestBuilder when successful +func (m *InstallationRequestBuilder) Token()(*TokenRequestBuilder) { + return NewTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/installation/repositories_get_response.go b/pkg/github/installation/repositories_get_response.go new file mode 100644 index 0000000..924e0a0 --- /dev/null +++ b/pkg/github/installation/repositories_get_response.go @@ -0,0 +1,151 @@ +package installation + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type RepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable + // The repository_selection property + repository_selection *string + // The total_count property + total_count *int32 +} +// NewRepositoriesGetResponse instantiates a new RepositoriesGetResponse and sets the default values. +func NewRepositoriesGetResponse()(*RepositoriesGetResponse) { + m := &RepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []Repositoryable when successful +func (m *RepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) { + return m.repositories +} +// GetRepositorySelection gets the repository_selection property value. The repository_selection property +// returns a *string when successful +func (m *RepositoriesGetResponse) GetRepositorySelection()(*string) { + return m.repository_selection +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *RepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *RepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_selection", m.GetRepositorySelection()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *RepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *RepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable)() { + m.repositories = value +} +// SetRepositorySelection sets the repository_selection property value. The repository_selection property +func (m *RepositoriesGetResponse) SetRepositorySelection(value *string)() { + m.repository_selection = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *RepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type RepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + GetRepositorySelection()(*string) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable)() + SetRepositorySelection(value *string)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/installation/repositories_request_builder.go b/pkg/github/installation/repositories_request_builder.go new file mode 100644 index 0000000..0bf652c --- /dev/null +++ b/pkg/github/installation/repositories_request_builder.go @@ -0,0 +1,70 @@ +package installation + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// RepositoriesRequestBuilder builds and executes requests for operations under \installation\repositories +type RepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// RepositoriesRequestBuilderGetQueryParameters list repositories that an app installation can access. +type RepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewRepositoriesRequestBuilderInternal instantiates a new RepositoriesRequestBuilder and sets the default values. +func NewRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RepositoriesRequestBuilder) { + m := &RepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/installation/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewRepositoriesRequestBuilder instantiates a new RepositoriesRequestBuilder and sets the default values. +func NewRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list repositories that an app installation can access. +// returns a RepositoriesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/installations#list-repositories-accessible-to-the-app-installation +func (m *RepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[RepositoriesRequestBuilderGetQueryParameters])(RepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateRepositoriesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(RepositoriesGetResponseable), nil +} +// ToGetRequestInformation list repositories that an app installation can access. +// returns a *RequestInformation when successful +func (m *RepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[RepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RepositoriesRequestBuilder when successful +func (m *RepositoriesRequestBuilder) WithUrl(rawUrl string)(*RepositoriesRequestBuilder) { + return NewRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/installation/token_request_builder.go b/pkg/github/installation/token_request_builder.go new file mode 100644 index 0000000..f53e9ed --- /dev/null +++ b/pkg/github/installation/token_request_builder.go @@ -0,0 +1,51 @@ +package installation + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// TokenRequestBuilder builds and executes requests for operations under \installation\token +type TokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewTokenRequestBuilderInternal instantiates a new TokenRequestBuilder and sets the default values. +func NewTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TokenRequestBuilder) { + m := &TokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/installation/token", pathParameters), + } + return m +} +// NewTokenRequestBuilder instantiates a new TokenRequestBuilder and sets the default values. +func NewTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete revokes the installation token you're using to authenticate as an installation and access this endpoint.Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/installations#revoke-an-installation-access-token +func (m *TokenRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation revokes the installation token you're using to authenticate as an installation and access this endpoint.Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. +// returns a *RequestInformation when successful +func (m *TokenRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TokenRequestBuilder when successful +func (m *TokenRequestBuilder) WithUrl(rawUrl string)(*TokenRequestBuilder) { + return NewTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/issues/get_direction_query_parameter_type.go b/pkg/github/issues/get_direction_query_parameter_type.go new file mode 100644 index 0000000..6aca6ec --- /dev/null +++ b/pkg/github/issues/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package issues +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/issues/get_filter_query_parameter_type.go b/pkg/github/issues/get_filter_query_parameter_type.go new file mode 100644 index 0000000..bd35fa0 --- /dev/null +++ b/pkg/github/issues/get_filter_query_parameter_type.go @@ -0,0 +1,48 @@ +package issues +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + ASSIGNED_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + CREATED_GETFILTERQUERYPARAMETERTYPE + MENTIONED_GETFILTERQUERYPARAMETERTYPE + SUBSCRIBED_GETFILTERQUERYPARAMETERTYPE + REPOS_GETFILTERQUERYPARAMETERTYPE + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"assigned", "created", "mentioned", "subscribed", "repos", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := ASSIGNED_GETFILTERQUERYPARAMETERTYPE + switch v { + case "assigned": + result = ASSIGNED_GETFILTERQUERYPARAMETERTYPE + case "created": + result = CREATED_GETFILTERQUERYPARAMETERTYPE + case "mentioned": + result = MENTIONED_GETFILTERQUERYPARAMETERTYPE + case "subscribed": + result = SUBSCRIBED_GETFILTERQUERYPARAMETERTYPE + case "repos": + result = REPOS_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/issues/get_sort_query_parameter_type.go b/pkg/github/issues/get_sort_query_parameter_type.go new file mode 100644 index 0000000..ba962ac --- /dev/null +++ b/pkg/github/issues/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + COMMENTS_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "comments"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "comments": + result = COMMENTS_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/issues/get_state_query_parameter_type.go b/pkg/github/issues/get_state_query_parameter_type.go new file mode 100644 index 0000000..5541510 --- /dev/null +++ b/pkg/github/issues/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/issues/issues_request_builder.go b/pkg/github/issues/issues_request_builder.go new file mode 100644 index 0000000..2efe9dd --- /dev/null +++ b/pkg/github/issues/issues_request_builder.go @@ -0,0 +1,90 @@ +package issues + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// IssuesRequestBuilder builds and executes requests for operations under \issues +type IssuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// IssuesRequestBuilderGetQueryParameters list issues assigned to the authenticated user across all visible repositories including owned repositories, memberrepositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are notnecessarily assigned to you.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type IssuesRequestBuilderGetQueryParameters struct { + Collab *bool `uriparametername:"collab"` + // The direction to sort the results by. + Direction *GetDirectionQueryParameterType `uriparametername:"direction"` + // Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. + Filter *GetFilterQueryParameterType `uriparametername:"filter"` + // A list of comma separated label names. Example: `bug,ui,@high` + Labels *string `uriparametername:"labels"` + Orgs *bool `uriparametername:"orgs"` + Owned *bool `uriparametername:"owned"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + Pulls *bool `uriparametername:"pulls"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // What to sort results by. + Sort *GetSortQueryParameterType `uriparametername:"sort"` + // Indicates the state of the issues to return. + State *GetStateQueryParameterType `uriparametername:"state"` +} +// NewIssuesRequestBuilderInternal instantiates a new IssuesRequestBuilder and sets the default values. +func NewIssuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { + m := &IssuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/issues{?collab*,direction*,filter*,labels*,orgs*,owned*,page*,per_page*,pulls*,since*,sort*,state*}", pathParameters), + } + return m +} +// NewIssuesRequestBuilder instantiates a new IssuesRequestBuilder and sets the default values. +func NewIssuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewIssuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list issues assigned to the authenticated user across all visible repositories including owned repositories, memberrepositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are notnecessarily assigned to you.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []Issueable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#list-issues-assigned-to-the-authenticated-user +func (m *IssuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable) + } + } + return val, nil +} +// ToGetRequestInformation list issues assigned to the authenticated user across all visible repositories including owned repositories, memberrepositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are notnecessarily assigned to you.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *IssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *IssuesRequestBuilder when successful +func (m *IssuesRequestBuilder) WithUrl(rawUrl string)(*IssuesRequestBuilder) { + return NewIssuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json new file mode 100644 index 0000000..7e68666 --- /dev/null +++ b/pkg/github/kiota-lock.json @@ -0,0 +1,32 @@ +{ + "descriptionHash": "3207A1EF4EB3F1DD995986A1E442051CE8E1D6E5D4B1669A462D4A71B82DF4EC6ADE644A2C9DE0F91A05F20A870800D471C40564691AE2C7AFAE7FFEEB00A9FE", + "descriptionLocation": "../../../../../schemas/ghec.json", + "lockFileVersion": "1.0.0", + "kiotaVersion": "1.14.0", + "clientClassName": "ApiClient", + "clientNamespaceName": "github.com/octokit/go-sdk-enterprise-cloud/pkg/github", + "language": "Go", + "usesBackingStore": false, + "excludeBackwardCompatible": true, + "includeAdditionalData": true, + "serializers": [ + "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" + ], + "deserializers": [ + "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", + "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", + "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" + ], + "structuredMimeTypes": [ + "application/json", + "text/plain;q=0.9", + "application/x-www-form-urlencoded;q=0.2", + "multipart/form-data;q=0.1" + ], + "includePatterns": [], + "excludePatterns": [], + "disabledValidationRules": [] +} \ No newline at end of file diff --git a/pkg/github/licenses/licenses_request_builder.go b/pkg/github/licenses/licenses_request_builder.go new file mode 100644 index 0000000..ca38c3f --- /dev/null +++ b/pkg/github/licenses/licenses_request_builder.go @@ -0,0 +1,80 @@ +package licenses + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// LicensesRequestBuilder builds and executes requests for operations under \licenses +type LicensesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LicensesRequestBuilderGetQueryParameters lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." +type LicensesRequestBuilderGetQueryParameters struct { + Featured *bool `uriparametername:"featured"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByLicense gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.licenses.item collection +// returns a *WithLicenseItemRequestBuilder when successful +func (m *LicensesRequestBuilder) ByLicense(license string)(*WithLicenseItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if license != "" { + urlTplParams["license"] = license + } + return NewWithLicenseItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewLicensesRequestBuilderInternal instantiates a new LicensesRequestBuilder and sets the default values. +func NewLicensesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LicensesRequestBuilder) { + m := &LicensesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/licenses{?featured*,page*,per_page*}", pathParameters), + } + return m +} +// NewLicensesRequestBuilder instantiates a new LicensesRequestBuilder and sets the default values. +func NewLicensesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LicensesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLicensesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." +// returns a []LicenseSimpleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/licenses/licenses#get-all-commonly-used-licenses +func (m *LicensesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[LicensesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LicenseSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLicenseSimpleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LicenseSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LicenseSimpleable) + } + } + return val, nil +} +// ToGetRequestInformation lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." +// returns a *RequestInformation when successful +func (m *LicensesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[LicensesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *LicensesRequestBuilder when successful +func (m *LicensesRequestBuilder) WithUrl(rawUrl string)(*LicensesRequestBuilder) { + return NewLicensesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/licenses/with_license_item_request_builder.go b/pkg/github/licenses/with_license_item_request_builder.go new file mode 100644 index 0000000..e76e64f --- /dev/null +++ b/pkg/github/licenses/with_license_item_request_builder.go @@ -0,0 +1,63 @@ +package licenses + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithLicenseItemRequestBuilder builds and executes requests for operations under \licenses\{license} +type WithLicenseItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithLicenseItemRequestBuilderInternal instantiates a new WithLicenseItemRequestBuilder and sets the default values. +func NewWithLicenseItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithLicenseItemRequestBuilder) { + m := &WithLicenseItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/licenses/{license}", pathParameters), + } + return m +} +// NewWithLicenseItemRequestBuilder instantiates a new WithLicenseItemRequestBuilder and sets the default values. +func NewWithLicenseItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithLicenseItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithLicenseItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." +// returns a Licenseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/licenses/licenses#get-a-license +func (m *WithLicenseItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Licenseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLicenseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Licenseable), nil +} +// ToGetRequestInformation gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." +// returns a *RequestInformation when successful +func (m *WithLicenseItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithLicenseItemRequestBuilder when successful +func (m *WithLicenseItemRequestBuilder) WithUrl(rawUrl string)(*WithLicenseItemRequestBuilder) { + return NewWithLicenseItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/markdown/markdown_post_request_body.go b/pkg/github/markdown/markdown_post_request_body.go new file mode 100644 index 0000000..b6aa988 --- /dev/null +++ b/pkg/github/markdown/markdown_post_request_body.go @@ -0,0 +1,141 @@ +package markdown + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MarkdownPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. + context *string + // The rendering mode. + mode *MarkdownPostRequestBody_mode + // The Markdown text to render in HTML. + text *string +} +// NewMarkdownPostRequestBody instantiates a new MarkdownPostRequestBody and sets the default values. +func NewMarkdownPostRequestBody()(*MarkdownPostRequestBody) { + m := &MarkdownPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + modeValue := MARKDOWN_MARKDOWNPOSTREQUESTBODY_MODE + m.SetMode(&modeValue) + return m +} +// CreateMarkdownPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMarkdownPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMarkdownPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MarkdownPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContext gets the context property value. The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. +// returns a *string when successful +func (m *MarkdownPostRequestBody) GetContext()(*string) { + return m.context +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MarkdownPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + res["mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMarkdownPostRequestBody_mode) + if err != nil { + return err + } + if val != nil { + m.SetMode(val.(*MarkdownPostRequestBody_mode)) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetMode gets the mode property value. The rendering mode. +// returns a *MarkdownPostRequestBody_mode when successful +func (m *MarkdownPostRequestBody) GetMode()(*MarkdownPostRequestBody_mode) { + return m.mode +} +// GetText gets the text property value. The Markdown text to render in HTML. +// returns a *string when successful +func (m *MarkdownPostRequestBody) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *MarkdownPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + if m.GetMode() != nil { + cast := (*m.GetMode()).String() + err := writer.WriteStringValue("mode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MarkdownPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContext sets the context property value. The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. +func (m *MarkdownPostRequestBody) SetContext(value *string)() { + m.context = value +} +// SetMode sets the mode property value. The rendering mode. +func (m *MarkdownPostRequestBody) SetMode(value *MarkdownPostRequestBody_mode)() { + m.mode = value +} +// SetText sets the text property value. The Markdown text to render in HTML. +func (m *MarkdownPostRequestBody) SetText(value *string)() { + m.text = value +} +type MarkdownPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContext()(*string) + GetMode()(*MarkdownPostRequestBody_mode) + GetText()(*string) + SetContext(value *string)() + SetMode(value *MarkdownPostRequestBody_mode)() + SetText(value *string)() +} diff --git a/pkg/github/markdown/markdown_post_request_body_mode.go b/pkg/github/markdown/markdown_post_request_body_mode.go new file mode 100644 index 0000000..013f3d2 --- /dev/null +++ b/pkg/github/markdown/markdown_post_request_body_mode.go @@ -0,0 +1,37 @@ +package markdown +import ( + "errors" +) +// The rendering mode. +type MarkdownPostRequestBody_mode int + +const ( + MARKDOWN_MARKDOWNPOSTREQUESTBODY_MODE MarkdownPostRequestBody_mode = iota + GFM_MARKDOWNPOSTREQUESTBODY_MODE +) + +func (i MarkdownPostRequestBody_mode) String() string { + return []string{"markdown", "gfm"}[i] +} +func ParseMarkdownPostRequestBody_mode(v string) (any, error) { + result := MARKDOWN_MARKDOWNPOSTREQUESTBODY_MODE + switch v { + case "markdown": + result = MARKDOWN_MARKDOWNPOSTREQUESTBODY_MODE + case "gfm": + result = GFM_MARKDOWNPOSTREQUESTBODY_MODE + default: + return 0, errors.New("Unknown MarkdownPostRequestBody_mode value: " + v) + } + return &result, nil +} +func SerializeMarkdownPostRequestBody_mode(values []MarkdownPostRequestBody_mode) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MarkdownPostRequestBody_mode) isMultiValue() bool { + return false +} diff --git a/pkg/github/markdown/markdown_request_builder.go b/pkg/github/markdown/markdown_request_builder.go new file mode 100644 index 0000000..8ba7d68 --- /dev/null +++ b/pkg/github/markdown/markdown_request_builder.go @@ -0,0 +1,60 @@ +package markdown + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// MarkdownRequestBuilder builds and executes requests for operations under \markdown +type MarkdownRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMarkdownRequestBuilderInternal instantiates a new MarkdownRequestBuilder and sets the default values. +func NewMarkdownRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MarkdownRequestBuilder) { + m := &MarkdownRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/markdown", pathParameters), + } + return m +} +// NewMarkdownRequestBuilder instantiates a new MarkdownRequestBuilder and sets the default values. +func NewMarkdownRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MarkdownRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMarkdownRequestBuilderInternal(urlParams, requestAdapter) +} +// Post render a Markdown document +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/markdown/markdown#render-a-markdown-document +func (m *MarkdownRequestBuilder) Post(ctx context.Context, body MarkdownPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Raw the raw property +// returns a *RawRequestBuilder when successful +func (m *MarkdownRequestBuilder) Raw()(*RawRequestBuilder) { + return NewRawRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// returns a *RequestInformation when successful +func (m *MarkdownRequestBuilder) ToPostRequestInformation(ctx context.Context, body MarkdownPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "text/html") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MarkdownRequestBuilder when successful +func (m *MarkdownRequestBuilder) WithUrl(rawUrl string)(*MarkdownRequestBuilder) { + return NewMarkdownRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/markdown/raw_request_builder.go b/pkg/github/markdown/raw_request_builder.go new file mode 100644 index 0000000..d5b081b --- /dev/null +++ b/pkg/github/markdown/raw_request_builder.go @@ -0,0 +1,53 @@ +package markdown + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// RawRequestBuilder builds and executes requests for operations under \markdown\raw +type RawRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewRawRequestBuilderInternal instantiates a new RawRequestBuilder and sets the default values. +func NewRawRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RawRequestBuilder) { + m := &RawRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/markdown/raw", pathParameters), + } + return m +} +// NewRawRequestBuilder instantiates a new RawRequestBuilder and sets the default values. +func NewRawRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RawRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRawRequestBuilderInternal(urlParams, requestAdapter) +} +// Post you must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/markdown/markdown#render-a-markdown-document-in-raw-mode +func (m *RawRequestBuilder) Post(ctx context.Context, body *string, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation you must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. +// returns a *RequestInformation when successful +func (m *RawRequestBuilder) ToPostRequestInformation(ctx context.Context, body *string, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "text/html") + requestInfo.SetContentFromScalar(ctx, m.BaseRequestBuilder.RequestAdapter, "text/plain", body) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RawRequestBuilder when successful +func (m *RawRequestBuilder) WithUrl(rawUrl string)(*RawRequestBuilder) { + return NewRawRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/accounts_request_builder.go b/pkg/github/marketplace_listing/accounts_request_builder.go new file mode 100644 index 0000000..74625db --- /dev/null +++ b/pkg/github/marketplace_listing/accounts_request_builder.go @@ -0,0 +1,34 @@ +package marketplace_listing + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// AccountsRequestBuilder builds and executes requests for operations under \marketplace_listing\accounts +type AccountsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAccount_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.marketplace_listing.accounts.item collection +// returns a *AccountsWithAccount_ItemRequestBuilder when successful +func (m *AccountsRequestBuilder) ByAccount_id(account_id int32)(*AccountsWithAccount_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["account_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(account_id), 10) + return NewAccountsWithAccount_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewAccountsRequestBuilderInternal instantiates a new AccountsRequestBuilder and sets the default values. +func NewAccountsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AccountsRequestBuilder) { + m := &AccountsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/accounts", pathParameters), + } + return m +} +// NewAccountsRequestBuilder instantiates a new AccountsRequestBuilder and sets the default values. +func NewAccountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AccountsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAccountsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go b/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go new file mode 100644 index 0000000..1a80a8b --- /dev/null +++ b/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go @@ -0,0 +1,63 @@ +package marketplace_listing + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// AccountsWithAccount_ItemRequestBuilder builds and executes requests for operations under \marketplace_listing\accounts\{account_id} +type AccountsWithAccount_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewAccountsWithAccount_ItemRequestBuilderInternal instantiates a new AccountsWithAccount_ItemRequestBuilder and sets the default values. +func NewAccountsWithAccount_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AccountsWithAccount_ItemRequestBuilder) { + m := &AccountsWithAccount_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/accounts/{account_id}", pathParameters), + } + return m +} +// NewAccountsWithAccount_ItemRequestBuilder instantiates a new AccountsWithAccount_ItemRequestBuilder and sets the default values. +func NewAccountsWithAccount_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AccountsWithAccount_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAccountsWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a MarketplacePurchaseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#get-a-subscription-plan-for-an-account +func (m *AccountsWithAccount_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMarketplacePurchaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable), nil +} +// ToGetRequestInformation shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a *RequestInformation when successful +func (m *AccountsWithAccount_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *AccountsWithAccount_ItemRequestBuilder when successful +func (m *AccountsWithAccount_ItemRequestBuilder) WithUrl(rawUrl string)(*AccountsWithAccount_ItemRequestBuilder) { + return NewAccountsWithAccount_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/marketplace_listing_request_builder.go b/pkg/github/marketplace_listing/marketplace_listing_request_builder.go new file mode 100644 index 0000000..6a874d5 --- /dev/null +++ b/pkg/github/marketplace_listing/marketplace_listing_request_builder.go @@ -0,0 +1,38 @@ +package marketplace_listing + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// Marketplace_listingRequestBuilder builds and executes requests for operations under \marketplace_listing +type Marketplace_listingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Accounts the accounts property +// returns a *AccountsRequestBuilder when successful +func (m *Marketplace_listingRequestBuilder) Accounts()(*AccountsRequestBuilder) { + return NewAccountsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMarketplace_listingRequestBuilderInternal instantiates a new Marketplace_listingRequestBuilder and sets the default values. +func NewMarketplace_listingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Marketplace_listingRequestBuilder) { + m := &Marketplace_listingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing", pathParameters), + } + return m +} +// NewMarketplace_listingRequestBuilder instantiates a new Marketplace_listingRequestBuilder and sets the default values. +func NewMarketplace_listingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Marketplace_listingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMarketplace_listingRequestBuilderInternal(urlParams, requestAdapter) +} +// Plans the plans property +// returns a *PlansRequestBuilder when successful +func (m *Marketplace_listingRequestBuilder) Plans()(*PlansRequestBuilder) { + return NewPlansRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stubbed the stubbed property +// returns a *StubbedRequestBuilder when successful +func (m *Marketplace_listingRequestBuilder) Stubbed()(*StubbedRequestBuilder) { + return NewStubbedRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go b/pkg/github/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..8d6726f --- /dev/null +++ b/pkg/github/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package accounts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go b/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..5ecd106 --- /dev/null +++ b/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package accounts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go b/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go new file mode 100644 index 0000000..1b2fdf3 --- /dev/null +++ b/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go @@ -0,0 +1,80 @@ +package marketplace_listing + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + if706036375d4276eb857c812dd26378d115983b7b99ae965c2d8d3aabc719e83 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/marketplace_listing/plans/item/accounts" +) + +// PlansItemAccountsRequestBuilder builds and executes requests for operations under \marketplace_listing\plans\{plan_id}\accounts +type PlansItemAccountsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansItemAccountsRequestBuilderGetQueryParameters returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +type PlansItemAccountsRequestBuilderGetQueryParameters struct { + // To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. + Direction *if706036375d4276eb857c812dd26378d115983b7b99ae965c2d8d3aabc719e83.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. + Sort *if706036375d4276eb857c812dd26378d115983b7b99ae965c2d8d3aabc719e83.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewPlansItemAccountsRequestBuilderInternal instantiates a new PlansItemAccountsRequestBuilder and sets the default values. +func NewPlansItemAccountsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemAccountsRequestBuilder) { + m := &PlansItemAccountsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/plans/{plan_id}/accounts{?direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewPlansItemAccountsRequestBuilder instantiates a new PlansItemAccountsRequestBuilder and sets the default values. +func NewPlansItemAccountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemAccountsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansItemAccountsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a []MarketplacePurchaseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#list-accounts-for-a-plan +func (m *PlansItemAccountsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PlansItemAccountsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMarketplacePurchaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable) + } + } + return val, nil +} +// ToGetRequestInformation returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a *RequestInformation when successful +func (m *PlansItemAccountsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PlansItemAccountsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PlansItemAccountsRequestBuilder when successful +func (m *PlansItemAccountsRequestBuilder) WithUrl(rawUrl string)(*PlansItemAccountsRequestBuilder) { + return NewPlansItemAccountsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/plans_request_builder.go b/pkg/github/marketplace_listing/plans_request_builder.go new file mode 100644 index 0000000..a3349d0 --- /dev/null +++ b/pkg/github/marketplace_listing/plans_request_builder.go @@ -0,0 +1,84 @@ +package marketplace_listing + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// PlansRequestBuilder builds and executes requests for operations under \marketplace_listing\plans +type PlansRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansRequestBuilderGetQueryParameters lists all plans that are part of your GitHub Enterprise Cloud Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +type PlansRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByPlan_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.marketplace_listing.plans.item collection +// returns a *PlansWithPlan_ItemRequestBuilder when successful +func (m *PlansRequestBuilder) ByPlan_id(plan_id int32)(*PlansWithPlan_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["plan_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(plan_id), 10) + return NewPlansWithPlan_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewPlansRequestBuilderInternal instantiates a new PlansRequestBuilder and sets the default values. +func NewPlansRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansRequestBuilder) { + m := &PlansRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/plans{?page*,per_page*}", pathParameters), + } + return m +} +// NewPlansRequestBuilder instantiates a new PlansRequestBuilder and sets the default values. +func NewPlansRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all plans that are part of your GitHub Enterprise Cloud Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a []MarketplaceListingPlanable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#list-plans +func (m *PlansRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PlansRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplaceListingPlanable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMarketplaceListingPlanFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplaceListingPlanable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplaceListingPlanable) + } + } + return val, nil +} +// ToGetRequestInformation lists all plans that are part of your GitHub Enterprise Cloud Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a *RequestInformation when successful +func (m *PlansRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PlansRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PlansRequestBuilder when successful +func (m *PlansRequestBuilder) WithUrl(rawUrl string)(*PlansRequestBuilder) { + return NewPlansRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/plans_with_plan_item_request_builder.go b/pkg/github/marketplace_listing/plans_with_plan_item_request_builder.go new file mode 100644 index 0000000..85b6d40 --- /dev/null +++ b/pkg/github/marketplace_listing/plans_with_plan_item_request_builder.go @@ -0,0 +1,28 @@ +package marketplace_listing + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// PlansWithPlan_ItemRequestBuilder builds and executes requests for operations under \marketplace_listing\plans\{plan_id} +type PlansWithPlan_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Accounts the accounts property +// returns a *PlansItemAccountsRequestBuilder when successful +func (m *PlansWithPlan_ItemRequestBuilder) Accounts()(*PlansItemAccountsRequestBuilder) { + return NewPlansItemAccountsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewPlansWithPlan_ItemRequestBuilderInternal instantiates a new PlansWithPlan_ItemRequestBuilder and sets the default values. +func NewPlansWithPlan_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansWithPlan_ItemRequestBuilder) { + m := &PlansWithPlan_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/plans/{plan_id}", pathParameters), + } + return m +} +// NewPlansWithPlan_ItemRequestBuilder instantiates a new PlansWithPlan_ItemRequestBuilder and sets the default values. +func NewPlansWithPlan_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansWithPlan_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansWithPlan_ItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..8d6726f --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package accounts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..5ecd106 --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package accounts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/marketplace_listing/stubbed_accounts_request_builder.go b/pkg/github/marketplace_listing/stubbed_accounts_request_builder.go new file mode 100644 index 0000000..960a187 --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed_accounts_request_builder.go @@ -0,0 +1,34 @@ +package marketplace_listing + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// StubbedAccountsRequestBuilder builds and executes requests for operations under \marketplace_listing\stubbed\accounts +type StubbedAccountsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAccount_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.marketplace_listing.stubbed.accounts.item collection +// returns a *StubbedAccountsWithAccount_ItemRequestBuilder when successful +func (m *StubbedAccountsRequestBuilder) ByAccount_id(account_id int32)(*StubbedAccountsWithAccount_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["account_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(account_id), 10) + return NewStubbedAccountsWithAccount_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewStubbedAccountsRequestBuilderInternal instantiates a new StubbedAccountsRequestBuilder and sets the default values. +func NewStubbedAccountsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedAccountsRequestBuilder) { + m := &StubbedAccountsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/accounts", pathParameters), + } + return m +} +// NewStubbedAccountsRequestBuilder instantiates a new StubbedAccountsRequestBuilder and sets the default values. +func NewStubbedAccountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedAccountsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStubbedAccountsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go b/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go new file mode 100644 index 0000000..8da0466 --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go @@ -0,0 +1,61 @@ +package marketplace_listing + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// StubbedAccountsWithAccount_ItemRequestBuilder builds and executes requests for operations under \marketplace_listing\stubbed\accounts\{account_id} +type StubbedAccountsWithAccount_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewStubbedAccountsWithAccount_ItemRequestBuilderInternal instantiates a new StubbedAccountsWithAccount_ItemRequestBuilder and sets the default values. +func NewStubbedAccountsWithAccount_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedAccountsWithAccount_ItemRequestBuilder) { + m := &StubbedAccountsWithAccount_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/accounts/{account_id}", pathParameters), + } + return m +} +// NewStubbedAccountsWithAccount_ItemRequestBuilder instantiates a new StubbedAccountsWithAccount_ItemRequestBuilder and sets the default values. +func NewStubbedAccountsWithAccount_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedAccountsWithAccount_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStubbedAccountsWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a MarketplacePurchaseable when successful +// returns a BasicError error when the service returns a 401 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#get-a-subscription-plan-for-an-account-stubbed +func (m *StubbedAccountsWithAccount_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMarketplacePurchaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable), nil +} +// ToGetRequestInformation shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a *RequestInformation when successful +func (m *StubbedAccountsWithAccount_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *StubbedAccountsWithAccount_ItemRequestBuilder when successful +func (m *StubbedAccountsWithAccount_ItemRequestBuilder) WithUrl(rawUrl string)(*StubbedAccountsWithAccount_ItemRequestBuilder) { + return NewStubbedAccountsWithAccount_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/stubbed_plans_item_accounts_request_builder.go b/pkg/github/marketplace_listing/stubbed_plans_item_accounts_request_builder.go new file mode 100644 index 0000000..e08ccbd --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed_plans_item_accounts_request_builder.go @@ -0,0 +1,76 @@ +package marketplace_listing + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + iadf42799d42a59f8cd4f633f7f68c2a875e36b13a29d996978bf36b60d892735 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/marketplace_listing/stubbed/plans/item/accounts" +) + +// StubbedPlansItemAccountsRequestBuilder builds and executes requests for operations under \marketplace_listing\stubbed\plans\{plan_id}\accounts +type StubbedPlansItemAccountsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// StubbedPlansItemAccountsRequestBuilderGetQueryParameters returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +type StubbedPlansItemAccountsRequestBuilderGetQueryParameters struct { + // To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. + Direction *iadf42799d42a59f8cd4f633f7f68c2a875e36b13a29d996978bf36b60d892735.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. + Sort *iadf42799d42a59f8cd4f633f7f68c2a875e36b13a29d996978bf36b60d892735.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewStubbedPlansItemAccountsRequestBuilderInternal instantiates a new StubbedPlansItemAccountsRequestBuilder and sets the default values. +func NewStubbedPlansItemAccountsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedPlansItemAccountsRequestBuilder) { + m := &StubbedPlansItemAccountsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans/{plan_id}/accounts{?direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewStubbedPlansItemAccountsRequestBuilder instantiates a new StubbedPlansItemAccountsRequestBuilder and sets the default values. +func NewStubbedPlansItemAccountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedPlansItemAccountsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStubbedPlansItemAccountsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a []MarketplacePurchaseable when successful +// returns a BasicError error when the service returns a 401 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#list-accounts-for-a-plan-stubbed +func (m *StubbedPlansItemAccountsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StubbedPlansItemAccountsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMarketplacePurchaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplacePurchaseable) + } + } + return val, nil +} +// ToGetRequestInformation returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a *RequestInformation when successful +func (m *StubbedPlansItemAccountsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StubbedPlansItemAccountsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *StubbedPlansItemAccountsRequestBuilder when successful +func (m *StubbedPlansItemAccountsRequestBuilder) WithUrl(rawUrl string)(*StubbedPlansItemAccountsRequestBuilder) { + return NewStubbedPlansItemAccountsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/stubbed_plans_request_builder.go b/pkg/github/marketplace_listing/stubbed_plans_request_builder.go new file mode 100644 index 0000000..a4403b4 --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed_plans_request_builder.go @@ -0,0 +1,82 @@ +package marketplace_listing + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// StubbedPlansRequestBuilder builds and executes requests for operations under \marketplace_listing\stubbed\plans +type StubbedPlansRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// StubbedPlansRequestBuilderGetQueryParameters lists all plans that are part of your GitHub Enterprise Cloud Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +type StubbedPlansRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByPlan_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.marketplace_listing.stubbed.plans.item collection +// returns a *StubbedPlansWithPlan_ItemRequestBuilder when successful +func (m *StubbedPlansRequestBuilder) ByPlan_id(plan_id int32)(*StubbedPlansWithPlan_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["plan_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(plan_id), 10) + return NewStubbedPlansWithPlan_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewStubbedPlansRequestBuilderInternal instantiates a new StubbedPlansRequestBuilder and sets the default values. +func NewStubbedPlansRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedPlansRequestBuilder) { + m := &StubbedPlansRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans{?page*,per_page*}", pathParameters), + } + return m +} +// NewStubbedPlansRequestBuilder instantiates a new StubbedPlansRequestBuilder and sets the default values. +func NewStubbedPlansRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedPlansRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStubbedPlansRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all plans that are part of your GitHub Enterprise Cloud Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a []MarketplaceListingPlanable when successful +// returns a BasicError error when the service returns a 401 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#list-plans-stubbed +func (m *StubbedPlansRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StubbedPlansRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplaceListingPlanable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMarketplaceListingPlanFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplaceListingPlanable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MarketplaceListingPlanable) + } + } + return val, nil +} +// ToGetRequestInformation lists all plans that are part of your GitHub Enterprise Cloud Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/enterprise-cloud@latest//rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. +// returns a *RequestInformation when successful +func (m *StubbedPlansRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StubbedPlansRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *StubbedPlansRequestBuilder when successful +func (m *StubbedPlansRequestBuilder) WithUrl(rawUrl string)(*StubbedPlansRequestBuilder) { + return NewStubbedPlansRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/marketplace_listing/stubbed_plans_with_plan_item_request_builder.go b/pkg/github/marketplace_listing/stubbed_plans_with_plan_item_request_builder.go new file mode 100644 index 0000000..2f70c2d --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed_plans_with_plan_item_request_builder.go @@ -0,0 +1,28 @@ +package marketplace_listing + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// StubbedPlansWithPlan_ItemRequestBuilder builds and executes requests for operations under \marketplace_listing\stubbed\plans\{plan_id} +type StubbedPlansWithPlan_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Accounts the accounts property +// returns a *StubbedPlansItemAccountsRequestBuilder when successful +func (m *StubbedPlansWithPlan_ItemRequestBuilder) Accounts()(*StubbedPlansItemAccountsRequestBuilder) { + return NewStubbedPlansItemAccountsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewStubbedPlansWithPlan_ItemRequestBuilderInternal instantiates a new StubbedPlansWithPlan_ItemRequestBuilder and sets the default values. +func NewStubbedPlansWithPlan_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedPlansWithPlan_ItemRequestBuilder) { + m := &StubbedPlansWithPlan_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans/{plan_id}", pathParameters), + } + return m +} +// NewStubbedPlansWithPlan_ItemRequestBuilder instantiates a new StubbedPlansWithPlan_ItemRequestBuilder and sets the default values. +func NewStubbedPlansWithPlan_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedPlansWithPlan_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStubbedPlansWithPlan_ItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/marketplace_listing/stubbed_request_builder.go b/pkg/github/marketplace_listing/stubbed_request_builder.go new file mode 100644 index 0000000..2f673ee --- /dev/null +++ b/pkg/github/marketplace_listing/stubbed_request_builder.go @@ -0,0 +1,33 @@ +package marketplace_listing + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// StubbedRequestBuilder builds and executes requests for operations under \marketplace_listing\stubbed +type StubbedRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Accounts the accounts property +// returns a *StubbedAccountsRequestBuilder when successful +func (m *StubbedRequestBuilder) Accounts()(*StubbedAccountsRequestBuilder) { + return NewStubbedAccountsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewStubbedRequestBuilderInternal instantiates a new StubbedRequestBuilder and sets the default values. +func NewStubbedRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedRequestBuilder) { + m := &StubbedRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/marketplace_listing/stubbed", pathParameters), + } + return m +} +// NewStubbedRequestBuilder instantiates a new StubbedRequestBuilder and sets the default values. +func NewStubbedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StubbedRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStubbedRequestBuilderInternal(urlParams, requestAdapter) +} +// Plans the plans property +// returns a *StubbedPlansRequestBuilder when successful +func (m *StubbedRequestBuilder) Plans()(*StubbedPlansRequestBuilder) { + return NewStubbedPlansRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/meta/meta_request_builder.go b/pkg/github/meta/meta_request_builder.go new file mode 100644 index 0000000..9540310 --- /dev/null +++ b/pkg/github/meta/meta_request_builder.go @@ -0,0 +1,57 @@ +package meta + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MetaRequestBuilder builds and executes requests for operations under \meta +type MetaRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMetaRequestBuilderInternal instantiates a new MetaRequestBuilder and sets the default values. +func NewMetaRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MetaRequestBuilder) { + m := &MetaRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/meta", pathParameters), + } + return m +} +// NewMetaRequestBuilder instantiates a new MetaRequestBuilder and sets the default values. +func NewMetaRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MetaRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMetaRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/enterprise-cloud@latest//articles/about-github-s-ip-addresses/)."The API's response also includes a list of GitHub's domain names.The values shown in the documentation's response are example values. You must always query the API directly to get the latest values.**Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. +// returns a ApiOverviewable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/meta/meta#get-apiname-meta-information +func (m *MetaRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ApiOverviewable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateApiOverviewFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ApiOverviewable), nil +} +// ToGetRequestInformation returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/enterprise-cloud@latest//articles/about-github-s-ip-addresses/)."The API's response also includes a list of GitHub's domain names.The values shown in the documentation's response are example values. You must always query the API directly to get the latest values.**Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. +// returns a *RequestInformation when successful +func (m *MetaRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MetaRequestBuilder when successful +func (m *MetaRequestBuilder) WithUrl(rawUrl string)(*MetaRequestBuilder) { + return NewMetaRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/models/actions_billing_usage.go b/pkg/github/models/actions_billing_usage.go new file mode 100644 index 0000000..914e0ca --- /dev/null +++ b/pkg/github/models/actions_billing_usage.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsBillingUsage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The amount of free GitHub Actions minutes available. + included_minutes *int32 + // The minutes_used_breakdown property + minutes_used_breakdown ActionsBillingUsage_minutes_used_breakdownable + // The sum of the free and paid GitHub Actions minutes used. + total_minutes_used *int32 + // The total paid GitHub Actions minutes used. + total_paid_minutes_used *int32 +} +// NewActionsBillingUsage instantiates a new ActionsBillingUsage and sets the default values. +func NewActionsBillingUsage()(*ActionsBillingUsage) { + m := &ActionsBillingUsage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsBillingUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsBillingUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsBillingUsage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsBillingUsage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsBillingUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["included_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIncludedMinutes(val) + } + return nil + } + res["minutes_used_breakdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActionsBillingUsage_minutes_used_breakdownFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinutesUsedBreakdown(val.(ActionsBillingUsage_minutes_used_breakdownable)) + } + return nil + } + res["total_minutes_used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMinutesUsed(val) + } + return nil + } + res["total_paid_minutes_used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPaidMinutesUsed(val) + } + return nil + } + return res +} +// GetIncludedMinutes gets the included_minutes property value. The amount of free GitHub Actions minutes available. +// returns a *int32 when successful +func (m *ActionsBillingUsage) GetIncludedMinutes()(*int32) { + return m.included_minutes +} +// GetMinutesUsedBreakdown gets the minutes_used_breakdown property value. The minutes_used_breakdown property +// returns a ActionsBillingUsage_minutes_used_breakdownable when successful +func (m *ActionsBillingUsage) GetMinutesUsedBreakdown()(ActionsBillingUsage_minutes_used_breakdownable) { + return m.minutes_used_breakdown +} +// GetTotalMinutesUsed gets the total_minutes_used property value. The sum of the free and paid GitHub Actions minutes used. +// returns a *int32 when successful +func (m *ActionsBillingUsage) GetTotalMinutesUsed()(*int32) { + return m.total_minutes_used +} +// GetTotalPaidMinutesUsed gets the total_paid_minutes_used property value. The total paid GitHub Actions minutes used. +// returns a *int32 when successful +func (m *ActionsBillingUsage) GetTotalPaidMinutesUsed()(*int32) { + return m.total_paid_minutes_used +} +// Serialize serializes information the current object +func (m *ActionsBillingUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("included_minutes", m.GetIncludedMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("minutes_used_breakdown", m.GetMinutesUsedBreakdown()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_minutes_used", m.GetTotalMinutesUsed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_paid_minutes_used", m.GetTotalPaidMinutesUsed()) + 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 *ActionsBillingUsage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncludedMinutes sets the included_minutes property value. The amount of free GitHub Actions minutes available. +func (m *ActionsBillingUsage) SetIncludedMinutes(value *int32)() { + m.included_minutes = value +} +// SetMinutesUsedBreakdown sets the minutes_used_breakdown property value. The minutes_used_breakdown property +func (m *ActionsBillingUsage) SetMinutesUsedBreakdown(value ActionsBillingUsage_minutes_used_breakdownable)() { + m.minutes_used_breakdown = value +} +// SetTotalMinutesUsed sets the total_minutes_used property value. The sum of the free and paid GitHub Actions minutes used. +func (m *ActionsBillingUsage) SetTotalMinutesUsed(value *int32)() { + m.total_minutes_used = value +} +// SetTotalPaidMinutesUsed sets the total_paid_minutes_used property value. The total paid GitHub Actions minutes used. +func (m *ActionsBillingUsage) SetTotalPaidMinutesUsed(value *int32)() { + m.total_paid_minutes_used = value +} +type ActionsBillingUsageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludedMinutes()(*int32) + GetMinutesUsedBreakdown()(ActionsBillingUsage_minutes_used_breakdownable) + GetTotalMinutesUsed()(*int32) + GetTotalPaidMinutesUsed()(*int32) + SetIncludedMinutes(value *int32)() + SetMinutesUsedBreakdown(value ActionsBillingUsage_minutes_used_breakdownable)() + SetTotalMinutesUsed(value *int32)() + SetTotalPaidMinutesUsed(value *int32)() +} diff --git a/pkg/github/models/actions_billing_usage_minutes_used_breakdown.go b/pkg/github/models/actions_billing_usage_minutes_used_breakdown.go new file mode 100644 index 0000000..03a291b --- /dev/null +++ b/pkg/github/models/actions_billing_usage_minutes_used_breakdown.go @@ -0,0 +1,486 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsBillingUsage_minutes_used_breakdown struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Total minutes used on macOS runner machines. + mACOS *int32 + // Total minutes used on macOS 12 core runner machines. + macos_12_core *int32 + // Total minutes used on all runner machines. + total *int32 + // Total minutes used on Ubuntu runner machines. + uBUNTU *int32 + // Total minutes used on Ubuntu 16 core runner machines. + ubuntu_16_core *int32 + // Total minutes used on Ubuntu 32 core runner machines. + ubuntu_32_core *int32 + // Total minutes used on Ubuntu 4 core runner machines. + ubuntu_4_core *int32 + // Total minutes used on Ubuntu 64 core runner machines. + ubuntu_64_core *int32 + // Total minutes used on Ubuntu 8 core runner machines. + ubuntu_8_core *int32 + // Total minutes used on Windows runner machines. + wINDOWS *int32 + // Total minutes used on Windows 16 core runner machines. + windows_16_core *int32 + // Total minutes used on Windows 32 core runner machines. + windows_32_core *int32 + // Total minutes used on Windows 4 core runner machines. + windows_4_core *int32 + // Total minutes used on Windows 64 core runner machines. + windows_64_core *int32 + // Total minutes used on Windows 8 core runner machines. + windows_8_core *int32 +} +// NewActionsBillingUsage_minutes_used_breakdown instantiates a new ActionsBillingUsage_minutes_used_breakdown and sets the default values. +func NewActionsBillingUsage_minutes_used_breakdown()(*ActionsBillingUsage_minutes_used_breakdown) { + m := &ActionsBillingUsage_minutes_used_breakdown{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsBillingUsage_minutes_used_breakdownFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsBillingUsage_minutes_used_breakdownFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsBillingUsage_minutes_used_breakdown(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["MACOS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMACOS(val) + } + return nil + } + res["macos_12_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMacos12Core(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + res["UBUNTU"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUBUNTU(val) + } + return nil + } + res["ubuntu_16_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUbuntu16Core(val) + } + return nil + } + res["ubuntu_32_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUbuntu32Core(val) + } + return nil + } + res["ubuntu_4_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUbuntu4Core(val) + } + return nil + } + res["ubuntu_64_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUbuntu64Core(val) + } + return nil + } + res["ubuntu_8_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUbuntu8Core(val) + } + return nil + } + res["WINDOWS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWINDOWS(val) + } + return nil + } + res["windows_16_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindows16Core(val) + } + return nil + } + res["windows_32_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindows32Core(val) + } + return nil + } + res["windows_4_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindows4Core(val) + } + return nil + } + res["windows_64_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindows64Core(val) + } + return nil + } + res["windows_8_core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindows8Core(val) + } + return nil + } + return res +} +// GetMACOS gets the MACOS property value. Total minutes used on macOS runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetMACOS()(*int32) { + return m.mACOS +} +// GetMacos12Core gets the macos_12_core property value. Total minutes used on macOS 12 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetMacos12Core()(*int32) { + return m.macos_12_core +} +// GetTotal gets the total property value. Total minutes used on all runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetTotal()(*int32) { + return m.total +} +// GetUBUNTU gets the UBUNTU property value. Total minutes used on Ubuntu runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetUBUNTU()(*int32) { + return m.uBUNTU +} +// GetUbuntu16Core gets the ubuntu_16_core property value. Total minutes used on Ubuntu 16 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetUbuntu16Core()(*int32) { + return m.ubuntu_16_core +} +// GetUbuntu32Core gets the ubuntu_32_core property value. Total minutes used on Ubuntu 32 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetUbuntu32Core()(*int32) { + return m.ubuntu_32_core +} +// GetUbuntu4Core gets the ubuntu_4_core property value. Total minutes used on Ubuntu 4 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetUbuntu4Core()(*int32) { + return m.ubuntu_4_core +} +// GetUbuntu64Core gets the ubuntu_64_core property value. Total minutes used on Ubuntu 64 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetUbuntu64Core()(*int32) { + return m.ubuntu_64_core +} +// GetUbuntu8Core gets the ubuntu_8_core property value. Total minutes used on Ubuntu 8 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetUbuntu8Core()(*int32) { + return m.ubuntu_8_core +} +// GetWINDOWS gets the WINDOWS property value. Total minutes used on Windows runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetWINDOWS()(*int32) { + return m.wINDOWS +} +// GetWindows16Core gets the windows_16_core property value. Total minutes used on Windows 16 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetWindows16Core()(*int32) { + return m.windows_16_core +} +// GetWindows32Core gets the windows_32_core property value. Total minutes used on Windows 32 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetWindows32Core()(*int32) { + return m.windows_32_core +} +// GetWindows4Core gets the windows_4_core property value. Total minutes used on Windows 4 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetWindows4Core()(*int32) { + return m.windows_4_core +} +// GetWindows64Core gets the windows_64_core property value. Total minutes used on Windows 64 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetWindows64Core()(*int32) { + return m.windows_64_core +} +// GetWindows8Core gets the windows_8_core property value. Total minutes used on Windows 8 core runner machines. +// returns a *int32 when successful +func (m *ActionsBillingUsage_minutes_used_breakdown) GetWindows8Core()(*int32) { + return m.windows_8_core +} +// Serialize serializes information the current object +func (m *ActionsBillingUsage_minutes_used_breakdown) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("MACOS", m.GetMACOS()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("macos_12_core", m.GetMacos12Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("UBUNTU", m.GetUBUNTU()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ubuntu_16_core", m.GetUbuntu16Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ubuntu_32_core", m.GetUbuntu32Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ubuntu_4_core", m.GetUbuntu4Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ubuntu_64_core", m.GetUbuntu64Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ubuntu_8_core", m.GetUbuntu8Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("WINDOWS", m.GetWINDOWS()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windows_16_core", m.GetWindows16Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windows_32_core", m.GetWindows32Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windows_4_core", m.GetWindows4Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windows_64_core", m.GetWindows64Core()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windows_8_core", m.GetWindows8Core()) + 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 *ActionsBillingUsage_minutes_used_breakdown) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMACOS sets the MACOS property value. Total minutes used on macOS runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetMACOS(value *int32)() { + m.mACOS = value +} +// SetMacos12Core sets the macos_12_core property value. Total minutes used on macOS 12 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetMacos12Core(value *int32)() { + m.macos_12_core = value +} +// SetTotal sets the total property value. Total minutes used on all runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetTotal(value *int32)() { + m.total = value +} +// SetUBUNTU sets the UBUNTU property value. Total minutes used on Ubuntu runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetUBUNTU(value *int32)() { + m.uBUNTU = value +} +// SetUbuntu16Core sets the ubuntu_16_core property value. Total minutes used on Ubuntu 16 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetUbuntu16Core(value *int32)() { + m.ubuntu_16_core = value +} +// SetUbuntu32Core sets the ubuntu_32_core property value. Total minutes used on Ubuntu 32 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetUbuntu32Core(value *int32)() { + m.ubuntu_32_core = value +} +// SetUbuntu4Core sets the ubuntu_4_core property value. Total minutes used on Ubuntu 4 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetUbuntu4Core(value *int32)() { + m.ubuntu_4_core = value +} +// SetUbuntu64Core sets the ubuntu_64_core property value. Total minutes used on Ubuntu 64 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetUbuntu64Core(value *int32)() { + m.ubuntu_64_core = value +} +// SetUbuntu8Core sets the ubuntu_8_core property value. Total minutes used on Ubuntu 8 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetUbuntu8Core(value *int32)() { + m.ubuntu_8_core = value +} +// SetWINDOWS sets the WINDOWS property value. Total minutes used on Windows runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetWINDOWS(value *int32)() { + m.wINDOWS = value +} +// SetWindows16Core sets the windows_16_core property value. Total minutes used on Windows 16 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetWindows16Core(value *int32)() { + m.windows_16_core = value +} +// SetWindows32Core sets the windows_32_core property value. Total minutes used on Windows 32 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetWindows32Core(value *int32)() { + m.windows_32_core = value +} +// SetWindows4Core sets the windows_4_core property value. Total minutes used on Windows 4 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetWindows4Core(value *int32)() { + m.windows_4_core = value +} +// SetWindows64Core sets the windows_64_core property value. Total minutes used on Windows 64 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetWindows64Core(value *int32)() { + m.windows_64_core = value +} +// SetWindows8Core sets the windows_8_core property value. Total minutes used on Windows 8 core runner machines. +func (m *ActionsBillingUsage_minutes_used_breakdown) SetWindows8Core(value *int32)() { + m.windows_8_core = value +} +type ActionsBillingUsage_minutes_used_breakdownable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMACOS()(*int32) + GetMacos12Core()(*int32) + GetTotal()(*int32) + GetUBUNTU()(*int32) + GetUbuntu16Core()(*int32) + GetUbuntu32Core()(*int32) + GetUbuntu4Core()(*int32) + GetUbuntu64Core()(*int32) + GetUbuntu8Core()(*int32) + GetWINDOWS()(*int32) + GetWindows16Core()(*int32) + GetWindows32Core()(*int32) + GetWindows4Core()(*int32) + GetWindows64Core()(*int32) + GetWindows8Core()(*int32) + SetMACOS(value *int32)() + SetMacos12Core(value *int32)() + SetTotal(value *int32)() + SetUBUNTU(value *int32)() + SetUbuntu16Core(value *int32)() + SetUbuntu32Core(value *int32)() + SetUbuntu4Core(value *int32)() + SetUbuntu64Core(value *int32)() + SetUbuntu8Core(value *int32)() + SetWINDOWS(value *int32)() + SetWindows16Core(value *int32)() + SetWindows32Core(value *int32)() + SetWindows4Core(value *int32)() + SetWindows64Core(value *int32)() + SetWindows8Core(value *int32)() +} diff --git a/pkg/github/models/actions_cache_list.go b/pkg/github/models/actions_cache_list.go new file mode 100644 index 0000000..4642274 --- /dev/null +++ b/pkg/github/models/actions_cache_list.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsCacheList repository actions caches +type ActionsCacheList struct { + // Array of caches + actions_caches []ActionsCacheList_actions_cachesable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Total number of caches + total_count *int32 +} +// NewActionsCacheList instantiates a new ActionsCacheList and sets the default values. +func NewActionsCacheList()(*ActionsCacheList) { + m := &ActionsCacheList{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsCacheListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsCacheListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsCacheList(), nil +} +// GetActionsCaches gets the actions_caches property value. Array of caches +// returns a []ActionsCacheList_actions_cachesable when successful +func (m *ActionsCacheList) GetActionsCaches()([]ActionsCacheList_actions_cachesable) { + return m.actions_caches +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsCacheList) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsCacheList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions_caches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActionsCacheList_actions_cachesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActionsCacheList_actions_cachesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ActionsCacheList_actions_cachesable) + } + } + m.SetActionsCaches(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. Total number of caches +// returns a *int32 when successful +func (m *ActionsCacheList) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ActionsCacheList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActionsCaches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActionsCaches())) + for i, v := range m.GetActionsCaches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("actions_caches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionsCaches sets the actions_caches property value. Array of caches +func (m *ActionsCacheList) SetActionsCaches(value []ActionsCacheList_actions_cachesable)() { + m.actions_caches = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsCacheList) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. Total number of caches +func (m *ActionsCacheList) SetTotalCount(value *int32)() { + m.total_count = value +} +type ActionsCacheListable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionsCaches()([]ActionsCacheList_actions_cachesable) + GetTotalCount()(*int32) + SetActionsCaches(value []ActionsCacheList_actions_cachesable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/models/actions_cache_list_actions_caches.go b/pkg/github/models/actions_cache_list_actions_caches.go new file mode 100644 index 0000000..d13178d --- /dev/null +++ b/pkg/github/models/actions_cache_list_actions_caches.go @@ -0,0 +1,255 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsCacheList_actions_caches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int32 + // The key property + key *string + // The last_accessed_at property + last_accessed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ref property + ref *string + // The size_in_bytes property + size_in_bytes *int32 + // The version property + version *string +} +// NewActionsCacheList_actions_caches instantiates a new ActionsCacheList_actions_caches and sets the default values. +func NewActionsCacheList_actions_caches()(*ActionsCacheList_actions_caches) { + m := &ActionsCacheList_actions_caches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsCacheList_actions_cachesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsCacheList_actions_cachesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsCacheList_actions_caches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsCacheList_actions_caches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ActionsCacheList_actions_caches) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsCacheList_actions_caches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["last_accessed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastAccessedAt(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeInBytes(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ActionsCacheList_actions_caches) GetId()(*int32) { + return m.id +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *ActionsCacheList_actions_caches) GetKey()(*string) { + return m.key +} +// GetLastAccessedAt gets the last_accessed_at property value. The last_accessed_at property +// returns a *Time when successful +func (m *ActionsCacheList_actions_caches) GetLastAccessedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_accessed_at +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *ActionsCacheList_actions_caches) GetRef()(*string) { + return m.ref +} +// GetSizeInBytes gets the size_in_bytes property value. The size_in_bytes property +// returns a *int32 when successful +func (m *ActionsCacheList_actions_caches) GetSizeInBytes()(*int32) { + return m.size_in_bytes +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *ActionsCacheList_actions_caches) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ActionsCacheList_actions_caches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_accessed_at", m.GetLastAccessedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size_in_bytes", m.GetSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *ActionsCacheList_actions_caches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ActionsCacheList_actions_caches) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *ActionsCacheList_actions_caches) SetId(value *int32)() { + m.id = value +} +// SetKey sets the key property value. The key property +func (m *ActionsCacheList_actions_caches) SetKey(value *string)() { + m.key = value +} +// SetLastAccessedAt sets the last_accessed_at property value. The last_accessed_at property +func (m *ActionsCacheList_actions_caches) SetLastAccessedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_accessed_at = value +} +// SetRef sets the ref property value. The ref property +func (m *ActionsCacheList_actions_caches) SetRef(value *string)() { + m.ref = value +} +// SetSizeInBytes sets the size_in_bytes property value. The size_in_bytes property +func (m *ActionsCacheList_actions_caches) SetSizeInBytes(value *int32)() { + m.size_in_bytes = value +} +// SetVersion sets the version property value. The version property +func (m *ActionsCacheList_actions_caches) SetVersion(value *string)() { + m.version = value +} +type ActionsCacheList_actions_cachesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetKey()(*string) + GetLastAccessedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRef()(*string) + GetSizeInBytes()(*int32) + GetVersion()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetKey(value *string)() + SetLastAccessedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRef(value *string)() + SetSizeInBytes(value *int32)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/actions_cache_usage_by_repository.go b/pkg/github/models/actions_cache_usage_by_repository.go new file mode 100644 index 0000000..956fa87 --- /dev/null +++ b/pkg/github/models/actions_cache_usage_by_repository.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsCacheUsageByRepository gitHub Actions Cache Usage by repository. +type ActionsCacheUsageByRepository struct { + // The number of active caches in the repository. + active_caches_count *int32 + // The sum of the size in bytes of all the active cache items in the repository. + active_caches_size_in_bytes *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repository owner and name for the cache usage being shown. + full_name *string +} +// NewActionsCacheUsageByRepository instantiates a new ActionsCacheUsageByRepository and sets the default values. +func NewActionsCacheUsageByRepository()(*ActionsCacheUsageByRepository) { + m := &ActionsCacheUsageByRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsCacheUsageByRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsCacheUsageByRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsCacheUsageByRepository(), nil +} +// GetActiveCachesCount gets the active_caches_count property value. The number of active caches in the repository. +// returns a *int32 when successful +func (m *ActionsCacheUsageByRepository) GetActiveCachesCount()(*int32) { + return m.active_caches_count +} +// GetActiveCachesSizeInBytes gets the active_caches_size_in_bytes property value. The sum of the size in bytes of all the active cache items in the repository. +// returns a *int32 when successful +func (m *ActionsCacheUsageByRepository) GetActiveCachesSizeInBytes()(*int32) { + return m.active_caches_size_in_bytes +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsCacheUsageByRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsCacheUsageByRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active_caches_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveCachesCount(val) + } + return nil + } + res["active_caches_size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveCachesSizeInBytes(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + return res +} +// GetFullName gets the full_name property value. The repository owner and name for the cache usage being shown. +// returns a *string when successful +func (m *ActionsCacheUsageByRepository) GetFullName()(*string) { + return m.full_name +} +// Serialize serializes information the current object +func (m *ActionsCacheUsageByRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("active_caches_count", m.GetActiveCachesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("active_caches_size_in_bytes", m.GetActiveCachesSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveCachesCount sets the active_caches_count property value. The number of active caches in the repository. +func (m *ActionsCacheUsageByRepository) SetActiveCachesCount(value *int32)() { + m.active_caches_count = value +} +// SetActiveCachesSizeInBytes sets the active_caches_size_in_bytes property value. The sum of the size in bytes of all the active cache items in the repository. +func (m *ActionsCacheUsageByRepository) SetActiveCachesSizeInBytes(value *int32)() { + m.active_caches_size_in_bytes = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsCacheUsageByRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFullName sets the full_name property value. The repository owner and name for the cache usage being shown. +func (m *ActionsCacheUsageByRepository) SetFullName(value *string)() { + m.full_name = value +} +type ActionsCacheUsageByRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveCachesCount()(*int32) + GetActiveCachesSizeInBytes()(*int32) + GetFullName()(*string) + SetActiveCachesCount(value *int32)() + SetActiveCachesSizeInBytes(value *int32)() + SetFullName(value *string)() +} diff --git a/pkg/github/models/actions_cache_usage_org_enterprise.go b/pkg/github/models/actions_cache_usage_org_enterprise.go new file mode 100644 index 0000000..a1927d9 --- /dev/null +++ b/pkg/github/models/actions_cache_usage_org_enterprise.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsCacheUsageOrgEnterprise struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The count of active caches across all repositories of an enterprise or an organization. + total_active_caches_count *int32 + // The total size in bytes of all active cache items across all repositories of an enterprise or an organization. + total_active_caches_size_in_bytes *int32 +} +// NewActionsCacheUsageOrgEnterprise instantiates a new ActionsCacheUsageOrgEnterprise and sets the default values. +func NewActionsCacheUsageOrgEnterprise()(*ActionsCacheUsageOrgEnterprise) { + m := &ActionsCacheUsageOrgEnterprise{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsCacheUsageOrgEnterpriseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsCacheUsageOrgEnterpriseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsCacheUsageOrgEnterprise(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsCacheUsageOrgEnterprise) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsCacheUsageOrgEnterprise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_active_caches_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalActiveCachesCount(val) + } + return nil + } + res["total_active_caches_size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalActiveCachesSizeInBytes(val) + } + return nil + } + return res +} +// GetTotalActiveCachesCount gets the total_active_caches_count property value. The count of active caches across all repositories of an enterprise or an organization. +// returns a *int32 when successful +func (m *ActionsCacheUsageOrgEnterprise) GetTotalActiveCachesCount()(*int32) { + return m.total_active_caches_count +} +// GetTotalActiveCachesSizeInBytes gets the total_active_caches_size_in_bytes property value. The total size in bytes of all active cache items across all repositories of an enterprise or an organization. +// returns a *int32 when successful +func (m *ActionsCacheUsageOrgEnterprise) GetTotalActiveCachesSizeInBytes()(*int32) { + return m.total_active_caches_size_in_bytes +} +// Serialize serializes information the current object +func (m *ActionsCacheUsageOrgEnterprise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_active_caches_count", m.GetTotalActiveCachesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_active_caches_size_in_bytes", m.GetTotalActiveCachesSizeInBytes()) + 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 *ActionsCacheUsageOrgEnterprise) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalActiveCachesCount sets the total_active_caches_count property value. The count of active caches across all repositories of an enterprise or an organization. +func (m *ActionsCacheUsageOrgEnterprise) SetTotalActiveCachesCount(value *int32)() { + m.total_active_caches_count = value +} +// SetTotalActiveCachesSizeInBytes sets the total_active_caches_size_in_bytes property value. The total size in bytes of all active cache items across all repositories of an enterprise or an organization. +func (m *ActionsCacheUsageOrgEnterprise) SetTotalActiveCachesSizeInBytes(value *int32)() { + m.total_active_caches_size_in_bytes = value +} +type ActionsCacheUsageOrgEnterpriseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalActiveCachesCount()(*int32) + GetTotalActiveCachesSizeInBytes()(*int32) + SetTotalActiveCachesCount(value *int32)() + SetTotalActiveCachesSizeInBytes(value *int32)() +} diff --git a/pkg/github/models/actions_default_workflow_permissions.go b/pkg/github/models/actions_default_workflow_permissions.go new file mode 100644 index 0000000..7efe4c0 --- /dev/null +++ b/pkg/github/models/actions_default_workflow_permissions.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default workflow permissions granted to the GITHUB_TOKEN when running workflows. +type ActionsDefaultWorkflowPermissions int + +const ( + READ_ACTIONSDEFAULTWORKFLOWPERMISSIONS ActionsDefaultWorkflowPermissions = iota + WRITE_ACTIONSDEFAULTWORKFLOWPERMISSIONS +) + +func (i ActionsDefaultWorkflowPermissions) String() string { + return []string{"read", "write"}[i] +} +func ParseActionsDefaultWorkflowPermissions(v string) (any, error) { + result := READ_ACTIONSDEFAULTWORKFLOWPERMISSIONS + switch v { + case "read": + result = READ_ACTIONSDEFAULTWORKFLOWPERMISSIONS + case "write": + result = WRITE_ACTIONSDEFAULTWORKFLOWPERMISSIONS + default: + return 0, errors.New("Unknown ActionsDefaultWorkflowPermissions value: " + v) + } + return &result, nil +} +func SerializeActionsDefaultWorkflowPermissions(values []ActionsDefaultWorkflowPermissions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ActionsDefaultWorkflowPermissions) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/actions_enterprise_permissions.go b/pkg/github/models/actions_enterprise_permissions.go new file mode 100644 index 0000000..60b4169 --- /dev/null +++ b/pkg/github/models/actions_enterprise_permissions.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsEnterprisePermissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions policy that controls the actions and reusable workflows that are allowed to run. + allowed_actions *AllowedActions + // The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. + enabled_organizations *EnabledOrganizations + // The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. + selected_actions_url *string + // The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. + selected_organizations_url *string +} +// NewActionsEnterprisePermissions instantiates a new ActionsEnterprisePermissions and sets the default values. +func NewActionsEnterprisePermissions()(*ActionsEnterprisePermissions) { + m := &ActionsEnterprisePermissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsEnterprisePermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsEnterprisePermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsEnterprisePermissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsEnterprisePermissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedActions gets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +// returns a *AllowedActions when successful +func (m *ActionsEnterprisePermissions) GetAllowedActions()(*AllowedActions) { + return m.allowed_actions +} +// GetEnabledOrganizations gets the enabled_organizations property value. The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. +// returns a *EnabledOrganizations when successful +func (m *ActionsEnterprisePermissions) GetEnabledOrganizations()(*EnabledOrganizations) { + return m.enabled_organizations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsEnterprisePermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAllowedActions) + if err != nil { + return err + } + if val != nil { + m.SetAllowedActions(val.(*AllowedActions)) + } + return nil + } + res["enabled_organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnabledOrganizations) + if err != nil { + return err + } + if val != nil { + m.SetEnabledOrganizations(val.(*EnabledOrganizations)) + } + return nil + } + res["selected_actions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedActionsUrl(val) + } + return nil + } + res["selected_organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedOrganizationsUrl(val) + } + return nil + } + return res +} +// GetSelectedActionsUrl gets the selected_actions_url property value. The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. +// returns a *string when successful +func (m *ActionsEnterprisePermissions) GetSelectedActionsUrl()(*string) { + return m.selected_actions_url +} +// GetSelectedOrganizationsUrl gets the selected_organizations_url property value. The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. +// returns a *string when successful +func (m *ActionsEnterprisePermissions) GetSelectedOrganizationsUrl()(*string) { + return m.selected_organizations_url +} +// Serialize serializes information the current object +func (m *ActionsEnterprisePermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedActions() != nil { + cast := (*m.GetAllowedActions()).String() + err := writer.WriteStringValue("allowed_actions", &cast) + if err != nil { + return err + } + } + if m.GetEnabledOrganizations() != nil { + cast := (*m.GetEnabledOrganizations()).String() + err := writer.WriteStringValue("enabled_organizations", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_actions_url", m.GetSelectedActionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_organizations_url", m.GetSelectedOrganizationsUrl()) + 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 *ActionsEnterprisePermissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedActions sets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +func (m *ActionsEnterprisePermissions) SetAllowedActions(value *AllowedActions)() { + m.allowed_actions = value +} +// SetEnabledOrganizations sets the enabled_organizations property value. The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. +func (m *ActionsEnterprisePermissions) SetEnabledOrganizations(value *EnabledOrganizations)() { + m.enabled_organizations = value +} +// SetSelectedActionsUrl sets the selected_actions_url property value. The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. +func (m *ActionsEnterprisePermissions) SetSelectedActionsUrl(value *string)() { + m.selected_actions_url = value +} +// SetSelectedOrganizationsUrl sets the selected_organizations_url property value. The API URL to use to get or set the selected organizations that are allowed to run GitHub Actions, when `enabled_organizations` is set to `selected`. +func (m *ActionsEnterprisePermissions) SetSelectedOrganizationsUrl(value *string)() { + m.selected_organizations_url = value +} +type ActionsEnterprisePermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedActions()(*AllowedActions) + GetEnabledOrganizations()(*EnabledOrganizations) + GetSelectedActionsUrl()(*string) + GetSelectedOrganizationsUrl()(*string) + SetAllowedActions(value *AllowedActions)() + SetEnabledOrganizations(value *EnabledOrganizations)() + SetSelectedActionsUrl(value *string)() + SetSelectedOrganizationsUrl(value *string)() +} diff --git a/pkg/github/models/actions_get_default_workflow_permissions.go b/pkg/github/models/actions_get_default_workflow_permissions.go new file mode 100644 index 0000000..43385fc --- /dev/null +++ b/pkg/github/models/actions_get_default_workflow_permissions.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsGetDefaultWorkflowPermissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. + can_approve_pull_request_reviews *bool + // The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + default_workflow_permissions *ActionsDefaultWorkflowPermissions +} +// NewActionsGetDefaultWorkflowPermissions instantiates a new ActionsGetDefaultWorkflowPermissions and sets the default values. +func NewActionsGetDefaultWorkflowPermissions()(*ActionsGetDefaultWorkflowPermissions) { + m := &ActionsGetDefaultWorkflowPermissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsGetDefaultWorkflowPermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsGetDefaultWorkflowPermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsGetDefaultWorkflowPermissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsGetDefaultWorkflowPermissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanApprovePullRequestReviews gets the can_approve_pull_request_reviews property value. Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. +// returns a *bool when successful +func (m *ActionsGetDefaultWorkflowPermissions) GetCanApprovePullRequestReviews()(*bool) { + return m.can_approve_pull_request_reviews +} +// GetDefaultWorkflowPermissions gets the default_workflow_permissions property value. The default workflow permissions granted to the GITHUB_TOKEN when running workflows. +// returns a *ActionsDefaultWorkflowPermissions when successful +func (m *ActionsGetDefaultWorkflowPermissions) GetDefaultWorkflowPermissions()(*ActionsDefaultWorkflowPermissions) { + return m.default_workflow_permissions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsGetDefaultWorkflowPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can_approve_pull_request_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanApprovePullRequestReviews(val) + } + return nil + } + res["default_workflow_permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionsDefaultWorkflowPermissions) + if err != nil { + return err + } + if val != nil { + m.SetDefaultWorkflowPermissions(val.(*ActionsDefaultWorkflowPermissions)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ActionsGetDefaultWorkflowPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can_approve_pull_request_reviews", m.GetCanApprovePullRequestReviews()) + if err != nil { + return err + } + } + if m.GetDefaultWorkflowPermissions() != nil { + cast := (*m.GetDefaultWorkflowPermissions()).String() + err := writer.WriteStringValue("default_workflow_permissions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsGetDefaultWorkflowPermissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanApprovePullRequestReviews sets the can_approve_pull_request_reviews property value. Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. +func (m *ActionsGetDefaultWorkflowPermissions) SetCanApprovePullRequestReviews(value *bool)() { + m.can_approve_pull_request_reviews = value +} +// SetDefaultWorkflowPermissions sets the default_workflow_permissions property value. The default workflow permissions granted to the GITHUB_TOKEN when running workflows. +func (m *ActionsGetDefaultWorkflowPermissions) SetDefaultWorkflowPermissions(value *ActionsDefaultWorkflowPermissions)() { + m.default_workflow_permissions = value +} +type ActionsGetDefaultWorkflowPermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanApprovePullRequestReviews()(*bool) + GetDefaultWorkflowPermissions()(*ActionsDefaultWorkflowPermissions) + SetCanApprovePullRequestReviews(value *bool)() + SetDefaultWorkflowPermissions(value *ActionsDefaultWorkflowPermissions)() +} diff --git a/pkg/github/models/actions_oidc_custom_issuer_policy_for_enterprise.go b/pkg/github/models/actions_oidc_custom_issuer_policy_for_enterprise.go new file mode 100644 index 0000000..eb2e719 --- /dev/null +++ b/pkg/github/models/actions_oidc_custom_issuer_policy_for_enterprise.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsOidcCustomIssuerPolicyForEnterprise struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the enterprise customer requested a custom issuer URL. + include_enterprise_slug *bool +} +// NewActionsOidcCustomIssuerPolicyForEnterprise instantiates a new ActionsOidcCustomIssuerPolicyForEnterprise and sets the default values. +func NewActionsOidcCustomIssuerPolicyForEnterprise()(*ActionsOidcCustomIssuerPolicyForEnterprise) { + m := &ActionsOidcCustomIssuerPolicyForEnterprise{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsOidcCustomIssuerPolicyForEnterpriseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsOidcCustomIssuerPolicyForEnterpriseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsOidcCustomIssuerPolicyForEnterprise(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsOidcCustomIssuerPolicyForEnterprise) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsOidcCustomIssuerPolicyForEnterprise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["include_enterprise_slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncludeEnterpriseSlug(val) + } + return nil + } + return res +} +// GetIncludeEnterpriseSlug gets the include_enterprise_slug property value. Whether the enterprise customer requested a custom issuer URL. +// returns a *bool when successful +func (m *ActionsOidcCustomIssuerPolicyForEnterprise) GetIncludeEnterpriseSlug()(*bool) { + return m.include_enterprise_slug +} +// Serialize serializes information the current object +func (m *ActionsOidcCustomIssuerPolicyForEnterprise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("include_enterprise_slug", m.GetIncludeEnterpriseSlug()) + 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 *ActionsOidcCustomIssuerPolicyForEnterprise) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncludeEnterpriseSlug sets the include_enterprise_slug property value. Whether the enterprise customer requested a custom issuer URL. +func (m *ActionsOidcCustomIssuerPolicyForEnterprise) SetIncludeEnterpriseSlug(value *bool)() { + m.include_enterprise_slug = value +} +type ActionsOidcCustomIssuerPolicyForEnterpriseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeEnterpriseSlug()(*bool) + SetIncludeEnterpriseSlug(value *bool)() +} diff --git a/pkg/github/models/actions_organization_permissions.go b/pkg/github/models/actions_organization_permissions.go new file mode 100644 index 0000000..2ae9e9b --- /dev/null +++ b/pkg/github/models/actions_organization_permissions.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsOrganizationPermissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions policy that controls the actions and reusable workflows that are allowed to run. + allowed_actions *AllowedActions + // The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + enabled_repositories *EnabledRepositories + // The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. + selected_actions_url *string + // The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. + selected_repositories_url *string +} +// NewActionsOrganizationPermissions instantiates a new ActionsOrganizationPermissions and sets the default values. +func NewActionsOrganizationPermissions()(*ActionsOrganizationPermissions) { + m := &ActionsOrganizationPermissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsOrganizationPermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsOrganizationPermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsOrganizationPermissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsOrganizationPermissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedActions gets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +// returns a *AllowedActions when successful +func (m *ActionsOrganizationPermissions) GetAllowedActions()(*AllowedActions) { + return m.allowed_actions +} +// GetEnabledRepositories gets the enabled_repositories property value. The policy that controls the repositories in the organization that are allowed to run GitHub Actions. +// returns a *EnabledRepositories when successful +func (m *ActionsOrganizationPermissions) GetEnabledRepositories()(*EnabledRepositories) { + return m.enabled_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsOrganizationPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAllowedActions) + if err != nil { + return err + } + if val != nil { + m.SetAllowedActions(val.(*AllowedActions)) + } + return nil + } + res["enabled_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnabledRepositories) + if err != nil { + return err + } + if val != nil { + m.SetEnabledRepositories(val.(*EnabledRepositories)) + } + return nil + } + res["selected_actions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedActionsUrl(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + return res +} +// GetSelectedActionsUrl gets the selected_actions_url property value. The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. +// returns a *string when successful +func (m *ActionsOrganizationPermissions) GetSelectedActionsUrl()(*string) { + return m.selected_actions_url +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. +// returns a *string when successful +func (m *ActionsOrganizationPermissions) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// Serialize serializes information the current object +func (m *ActionsOrganizationPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedActions() != nil { + cast := (*m.GetAllowedActions()).String() + err := writer.WriteStringValue("allowed_actions", &cast) + if err != nil { + return err + } + } + if m.GetEnabledRepositories() != nil { + cast := (*m.GetEnabledRepositories()).String() + err := writer.WriteStringValue("enabled_repositories", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_actions_url", m.GetSelectedActionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + 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 *ActionsOrganizationPermissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedActions sets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +func (m *ActionsOrganizationPermissions) SetAllowedActions(value *AllowedActions)() { + m.allowed_actions = value +} +// SetEnabledRepositories sets the enabled_repositories property value. The policy that controls the repositories in the organization that are allowed to run GitHub Actions. +func (m *ActionsOrganizationPermissions) SetEnabledRepositories(value *EnabledRepositories)() { + m.enabled_repositories = value +} +// SetSelectedActionsUrl sets the selected_actions_url property value. The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. +func (m *ActionsOrganizationPermissions) SetSelectedActionsUrl(value *string)() { + m.selected_actions_url = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. +func (m *ActionsOrganizationPermissions) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +type ActionsOrganizationPermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedActions()(*AllowedActions) + GetEnabledRepositories()(*EnabledRepositories) + GetSelectedActionsUrl()(*string) + GetSelectedRepositoriesUrl()(*string) + SetAllowedActions(value *AllowedActions)() + SetEnabledRepositories(value *EnabledRepositories)() + SetSelectedActionsUrl(value *string)() + SetSelectedRepositoriesUrl(value *string)() +} diff --git a/pkg/github/models/actions_public_key.go b/pkg/github/models/actions_public_key.go new file mode 100644 index 0000000..0266851 --- /dev/null +++ b/pkg/github/models/actions_public_key.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsPublicKey the public key used for setting Actions Secrets. +type ActionsPublicKey struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The id property + id *int32 + // The Base64 encoded public key. + key *string + // The identifier for the key. + key_id *string + // The title property + title *string + // The url property + url *string +} +// NewActionsPublicKey instantiates a new ActionsPublicKey and sets the default values. +func NewActionsPublicKey()(*ActionsPublicKey) { + m := &ActionsPublicKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsPublicKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsPublicKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsPublicKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsPublicKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *ActionsPublicKey) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsPublicKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ActionsPublicKey) GetId()(*int32) { + return m.id +} +// GetKey gets the key property value. The Base64 encoded public key. +// returns a *string when successful +func (m *ActionsPublicKey) GetKey()(*string) { + return m.key +} +// GetKeyId gets the key_id property value. The identifier for the key. +// returns a *string when successful +func (m *ActionsPublicKey) GetKeyId()(*string) { + return m.key_id +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *ActionsPublicKey) GetTitle()(*string) { + return m.title +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ActionsPublicKey) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ActionsPublicKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsPublicKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ActionsPublicKey) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *ActionsPublicKey) SetId(value *int32)() { + m.id = value +} +// SetKey sets the key property value. The Base64 encoded public key. +func (m *ActionsPublicKey) SetKey(value *string)() { + m.key = value +} +// SetKeyId sets the key_id property value. The identifier for the key. +func (m *ActionsPublicKey) SetKeyId(value *string)() { + m.key_id = value +} +// SetTitle sets the title property value. The title property +func (m *ActionsPublicKey) SetTitle(value *string)() { + m.title = value +} +// SetUrl sets the url property value. The url property +func (m *ActionsPublicKey) SetUrl(value *string)() { + m.url = value +} +type ActionsPublicKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetId()(*int32) + GetKey()(*string) + GetKeyId()(*string) + GetTitle()(*string) + GetUrl()(*string) + SetCreatedAt(value *string)() + SetId(value *int32)() + SetKey(value *string)() + SetKeyId(value *string)() + SetTitle(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/actions_repository_permissions.go b/pkg/github/models/actions_repository_permissions.go new file mode 100644 index 0000000..4d8143b --- /dev/null +++ b/pkg/github/models/actions_repository_permissions.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsRepositoryPermissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions policy that controls the actions and reusable workflows that are allowed to run. + allowed_actions *AllowedActions + // Whether GitHub Actions is enabled on the repository. + enabled *bool + // The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. + selected_actions_url *string +} +// NewActionsRepositoryPermissions instantiates a new ActionsRepositoryPermissions and sets the default values. +func NewActionsRepositoryPermissions()(*ActionsRepositoryPermissions) { + m := &ActionsRepositoryPermissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsRepositoryPermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsRepositoryPermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsRepositoryPermissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsRepositoryPermissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedActions gets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +// returns a *AllowedActions when successful +func (m *ActionsRepositoryPermissions) GetAllowedActions()(*AllowedActions) { + return m.allowed_actions +} +// GetEnabled gets the enabled property value. Whether GitHub Actions is enabled on the repository. +// returns a *bool when successful +func (m *ActionsRepositoryPermissions) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsRepositoryPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAllowedActions) + if err != nil { + return err + } + if val != nil { + m.SetAllowedActions(val.(*AllowedActions)) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["selected_actions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedActionsUrl(val) + } + return nil + } + return res +} +// GetSelectedActionsUrl gets the selected_actions_url property value. The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. +// returns a *string when successful +func (m *ActionsRepositoryPermissions) GetSelectedActionsUrl()(*string) { + return m.selected_actions_url +} +// Serialize serializes information the current object +func (m *ActionsRepositoryPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedActions() != nil { + cast := (*m.GetAllowedActions()).String() + err := writer.WriteStringValue("allowed_actions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_actions_url", m.GetSelectedActionsUrl()) + 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 *ActionsRepositoryPermissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedActions sets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +func (m *ActionsRepositoryPermissions) SetAllowedActions(value *AllowedActions)() { + m.allowed_actions = value +} +// SetEnabled sets the enabled property value. Whether GitHub Actions is enabled on the repository. +func (m *ActionsRepositoryPermissions) SetEnabled(value *bool)() { + m.enabled = value +} +// SetSelectedActionsUrl sets the selected_actions_url property value. The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. +func (m *ActionsRepositoryPermissions) SetSelectedActionsUrl(value *string)() { + m.selected_actions_url = value +} +type ActionsRepositoryPermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedActions()(*AllowedActions) + GetEnabled()(*bool) + GetSelectedActionsUrl()(*string) + SetAllowedActions(value *AllowedActions)() + SetEnabled(value *bool)() + SetSelectedActionsUrl(value *string)() +} diff --git a/pkg/github/models/actions_secret.go b/pkg/github/models/actions_secret.go new file mode 100644 index 0000000..c42490e --- /dev/null +++ b/pkg/github/models/actions_secret.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsSecret set secrets for GitHub Actions. +type ActionsSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret. + name *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewActionsSecret instantiates a new ActionsSecret and sets the default values. +func NewActionsSecret()(*ActionsSecret) { + m := &ActionsSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ActionsSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret. +// returns a *string when successful +func (m *ActionsSecret) GetName()(*string) { + return m.name +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *ActionsSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *ActionsSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ActionsSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret. +func (m *ActionsSecret) SetName(value *string)() { + m.name = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *ActionsSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type ActionsSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/actions_set_default_workflow_permissions.go b/pkg/github/models/actions_set_default_workflow_permissions.go new file mode 100644 index 0000000..86dcf13 --- /dev/null +++ b/pkg/github/models/actions_set_default_workflow_permissions.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsSetDefaultWorkflowPermissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. + can_approve_pull_request_reviews *bool + // The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + default_workflow_permissions *ActionsDefaultWorkflowPermissions +} +// NewActionsSetDefaultWorkflowPermissions instantiates a new ActionsSetDefaultWorkflowPermissions and sets the default values. +func NewActionsSetDefaultWorkflowPermissions()(*ActionsSetDefaultWorkflowPermissions) { + m := &ActionsSetDefaultWorkflowPermissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsSetDefaultWorkflowPermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsSetDefaultWorkflowPermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsSetDefaultWorkflowPermissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsSetDefaultWorkflowPermissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanApprovePullRequestReviews gets the can_approve_pull_request_reviews property value. Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. +// returns a *bool when successful +func (m *ActionsSetDefaultWorkflowPermissions) GetCanApprovePullRequestReviews()(*bool) { + return m.can_approve_pull_request_reviews +} +// GetDefaultWorkflowPermissions gets the default_workflow_permissions property value. The default workflow permissions granted to the GITHUB_TOKEN when running workflows. +// returns a *ActionsDefaultWorkflowPermissions when successful +func (m *ActionsSetDefaultWorkflowPermissions) GetDefaultWorkflowPermissions()(*ActionsDefaultWorkflowPermissions) { + return m.default_workflow_permissions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsSetDefaultWorkflowPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can_approve_pull_request_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanApprovePullRequestReviews(val) + } + return nil + } + res["default_workflow_permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionsDefaultWorkflowPermissions) + if err != nil { + return err + } + if val != nil { + m.SetDefaultWorkflowPermissions(val.(*ActionsDefaultWorkflowPermissions)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ActionsSetDefaultWorkflowPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can_approve_pull_request_reviews", m.GetCanApprovePullRequestReviews()) + if err != nil { + return err + } + } + if m.GetDefaultWorkflowPermissions() != nil { + cast := (*m.GetDefaultWorkflowPermissions()).String() + err := writer.WriteStringValue("default_workflow_permissions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsSetDefaultWorkflowPermissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanApprovePullRequestReviews sets the can_approve_pull_request_reviews property value. Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. +func (m *ActionsSetDefaultWorkflowPermissions) SetCanApprovePullRequestReviews(value *bool)() { + m.can_approve_pull_request_reviews = value +} +// SetDefaultWorkflowPermissions sets the default_workflow_permissions property value. The default workflow permissions granted to the GITHUB_TOKEN when running workflows. +func (m *ActionsSetDefaultWorkflowPermissions) SetDefaultWorkflowPermissions(value *ActionsDefaultWorkflowPermissions)() { + m.default_workflow_permissions = value +} +type ActionsSetDefaultWorkflowPermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanApprovePullRequestReviews()(*bool) + GetDefaultWorkflowPermissions()(*ActionsDefaultWorkflowPermissions) + SetCanApprovePullRequestReviews(value *bool)() + SetDefaultWorkflowPermissions(value *ActionsDefaultWorkflowPermissions)() +} diff --git a/pkg/github/models/actions_variable.go b/pkg/github/models/actions_variable.go new file mode 100644 index 0000000..f89af00 --- /dev/null +++ b/pkg/github/models/actions_variable.go @@ -0,0 +1,168 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsVariable struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the variable. + name *string + // The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The value of the variable. + value *string +} +// NewActionsVariable instantiates a new ActionsVariable and sets the default values. +func NewActionsVariable()(*ActionsVariable) { + m := &ActionsVariable{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsVariableFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsVariableFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsVariable(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsVariable) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *ActionsVariable) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsVariable) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ActionsVariable) GetName()(*string) { + return m.name +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *ActionsVariable) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ActionsVariable) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ActionsVariable) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ActionsVariable) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *ActionsVariable) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the variable. +func (m *ActionsVariable) SetName(value *string)() { + m.name = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *ActionsVariable) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ActionsVariable) SetValue(value *string)() { + m.value = value +} +type ActionsVariableable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetValue()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetValue(value *string)() +} diff --git a/pkg/github/models/actions_workflow_access_to_repository.go b/pkg/github/models/actions_workflow_access_to_repository.go new file mode 100644 index 0000000..6174ca9 --- /dev/null +++ b/pkg/github/models/actions_workflow_access_to_repository.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsWorkflowAccessToRepository struct { + // Defines the level of access that workflows outside of the repository have to actions and reusable workflows within therepository.`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. + access_level *ActionsWorkflowAccessToRepository_access_level + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewActionsWorkflowAccessToRepository instantiates a new ActionsWorkflowAccessToRepository and sets the default values. +func NewActionsWorkflowAccessToRepository()(*ActionsWorkflowAccessToRepository) { + m := &ActionsWorkflowAccessToRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsWorkflowAccessToRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsWorkflowAccessToRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsWorkflowAccessToRepository(), nil +} +// GetAccessLevel gets the access_level property value. Defines the level of access that workflows outside of the repository have to actions and reusable workflows within therepository.`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. +// returns a *ActionsWorkflowAccessToRepository_access_level when successful +func (m *ActionsWorkflowAccessToRepository) GetAccessLevel()(*ActionsWorkflowAccessToRepository_access_level) { + return m.access_level +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ActionsWorkflowAccessToRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsWorkflowAccessToRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionsWorkflowAccessToRepository_access_level) + if err != nil { + return err + } + if val != nil { + m.SetAccessLevel(val.(*ActionsWorkflowAccessToRepository_access_level)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ActionsWorkflowAccessToRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessLevel() != nil { + cast := (*m.GetAccessLevel()).String() + err := writer.WriteStringValue("access_level", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessLevel sets the access_level property value. Defines the level of access that workflows outside of the repository have to actions and reusable workflows within therepository.`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. +func (m *ActionsWorkflowAccessToRepository) SetAccessLevel(value *ActionsWorkflowAccessToRepository_access_level)() { + m.access_level = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ActionsWorkflowAccessToRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ActionsWorkflowAccessToRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessLevel()(*ActionsWorkflowAccessToRepository_access_level) + SetAccessLevel(value *ActionsWorkflowAccessToRepository_access_level)() +} diff --git a/pkg/github/models/actions_workflow_access_to_repository_access_level.go b/pkg/github/models/actions_workflow_access_to_repository_access_level.go new file mode 100644 index 0000000..e40eb43 --- /dev/null +++ b/pkg/github/models/actions_workflow_access_to_repository_access_level.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Defines the level of access that workflows outside of the repository have to actions and reusable workflows within therepository.`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. `enterprise` level access allows sharing across the enterprise. +type ActionsWorkflowAccessToRepository_access_level int + +const ( + NONE_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL ActionsWorkflowAccessToRepository_access_level = iota + USER_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + ORGANIZATION_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + ENTERPRISE_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL +) + +func (i ActionsWorkflowAccessToRepository_access_level) String() string { + return []string{"none", "user", "organization", "enterprise"}[i] +} +func ParseActionsWorkflowAccessToRepository_access_level(v string) (any, error) { + result := NONE_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + switch v { + case "none": + result = NONE_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + case "user": + result = USER_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + case "organization": + result = ORGANIZATION_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + case "enterprise": + result = ENTERPRISE_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL + default: + return 0, errors.New("Unknown ActionsWorkflowAccessToRepository_access_level value: " + v) + } + return &result, nil +} +func SerializeActionsWorkflowAccessToRepository_access_level(values []ActionsWorkflowAccessToRepository_access_level) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ActionsWorkflowAccessToRepository_access_level) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/activity.go b/pkg/github/models/activity.go new file mode 100644 index 0000000..b8be787 --- /dev/null +++ b/pkg/github/models/activity.go @@ -0,0 +1,286 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Activity activity +type Activity struct { + // The type of the activity that was performed. + activity_type *Activity_activity_type + // A GitHub user. + actor NullableSimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The SHA of the commit after the activity. + after *string + // The SHA of the commit before the activity. + before *string + // The id property + id *int32 + // The node_id property + node_id *string + // The full Git reference, formatted as `refs/heads/`. + ref *string + // The time when the activity occurred. + timestamp *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewActivity instantiates a new Activity and sets the default values. +func NewActivity()(*Activity) { + m := &Activity{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivity(), nil +} +// GetActivityType gets the activity_type property value. The type of the activity that was performed. +// returns a *Activity_activity_type when successful +func (m *Activity) GetActivityType()(*Activity_activity_type) { + return m.activity_type +} +// GetActor gets the actor property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Activity) GetActor()(NullableSimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Activity) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAfter gets the after property value. The SHA of the commit after the activity. +// returns a *string when successful +func (m *Activity) GetAfter()(*string) { + return m.after +} +// GetBefore gets the before property value. The SHA of the commit before the activity. +// returns a *string when successful +func (m *Activity) GetBefore()(*string) { + return m.before +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Activity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["activity_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActivity_activity_type) + if err != nil { + return err + } + if val != nil { + m.SetActivityType(val.(*Activity_activity_type)) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(NullableSimpleUserable)) + } + return nil + } + res["after"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAfter(val) + } + return nil + } + res["before"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBefore(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestamp(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Activity) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Activity) GetNodeId()(*string) { + return m.node_id +} +// GetRef gets the ref property value. The full Git reference, formatted as `refs/heads/`. +// returns a *string when successful +func (m *Activity) GetRef()(*string) { + return m.ref +} +// GetTimestamp gets the timestamp property value. The time when the activity occurred. +// returns a *Time when successful +func (m *Activity) GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.timestamp +} +// Serialize serializes information the current object +func (m *Activity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActivityType() != nil { + cast := (*m.GetActivityType()).String() + err := writer.WriteStringValue("activity_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("after", m.GetAfter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("before", m.GetBefore()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("timestamp", m.GetTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActivityType sets the activity_type property value. The type of the activity that was performed. +func (m *Activity) SetActivityType(value *Activity_activity_type)() { + m.activity_type = value +} +// SetActor sets the actor property value. A GitHub user. +func (m *Activity) SetActor(value NullableSimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Activity) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAfter sets the after property value. The SHA of the commit after the activity. +func (m *Activity) SetAfter(value *string)() { + m.after = value +} +// SetBefore sets the before property value. The SHA of the commit before the activity. +func (m *Activity) SetBefore(value *string)() { + m.before = value +} +// SetId sets the id property value. The id property +func (m *Activity) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Activity) SetNodeId(value *string)() { + m.node_id = value +} +// SetRef sets the ref property value. The full Git reference, formatted as `refs/heads/`. +func (m *Activity) SetRef(value *string)() { + m.ref = value +} +// SetTimestamp sets the timestamp property value. The time when the activity occurred. +func (m *Activity) SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.timestamp = value +} +type Activityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityType()(*Activity_activity_type) + GetActor()(NullableSimpleUserable) + GetAfter()(*string) + GetBefore()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetRef()(*string) + GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActivityType(value *Activity_activity_type)() + SetActor(value NullableSimpleUserable)() + SetAfter(value *string)() + SetBefore(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetRef(value *string)() + SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/activity_activity_type.go b/pkg/github/models/activity_activity_type.go new file mode 100644 index 0000000..3ff3b9c --- /dev/null +++ b/pkg/github/models/activity_activity_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The type of the activity that was performed. +type Activity_activity_type int + +const ( + PUSH_ACTIVITY_ACTIVITY_TYPE Activity_activity_type = iota + FORCE_PUSH_ACTIVITY_ACTIVITY_TYPE + BRANCH_DELETION_ACTIVITY_ACTIVITY_TYPE + BRANCH_CREATION_ACTIVITY_ACTIVITY_TYPE + PR_MERGE_ACTIVITY_ACTIVITY_TYPE + MERGE_QUEUE_MERGE_ACTIVITY_ACTIVITY_TYPE +) + +func (i Activity_activity_type) String() string { + return []string{"push", "force_push", "branch_deletion", "branch_creation", "pr_merge", "merge_queue_merge"}[i] +} +func ParseActivity_activity_type(v string) (any, error) { + result := PUSH_ACTIVITY_ACTIVITY_TYPE + switch v { + case "push": + result = PUSH_ACTIVITY_ACTIVITY_TYPE + case "force_push": + result = FORCE_PUSH_ACTIVITY_ACTIVITY_TYPE + case "branch_deletion": + result = BRANCH_DELETION_ACTIVITY_ACTIVITY_TYPE + case "branch_creation": + result = BRANCH_CREATION_ACTIVITY_ACTIVITY_TYPE + case "pr_merge": + result = PR_MERGE_ACTIVITY_ACTIVITY_TYPE + case "merge_queue_merge": + result = MERGE_QUEUE_MERGE_ACTIVITY_ACTIVITY_TYPE + default: + return 0, errors.New("Unknown Activity_activity_type value: " + v) + } + return &result, nil +} +func SerializeActivity_activity_type(values []Activity_activity_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Activity_activity_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/actor.go b/pkg/github/models/actor.go new file mode 100644 index 0000000..bceb993 --- /dev/null +++ b/pkg/github/models/actor.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Actor actor +type Actor struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The display_login property + display_login *string + // The gravatar_id property + gravatar_id *string + // The id property + id *int32 + // The login property + login *string + // The url property + url *string +} +// NewActor instantiates a new Actor and sets the default values. +func NewActor()(*Actor) { + m := &Actor{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActor(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Actor) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *Actor) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetDisplayLogin gets the display_login property value. The display_login property +// returns a *string when successful +func (m *Actor) GetDisplayLogin()(*string) { + return m.display_login +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Actor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["display_login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayLogin(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *Actor) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Actor) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *Actor) GetLogin()(*string) { + return m.login +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Actor) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Actor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_login", m.GetDisplayLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Actor) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *Actor) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetDisplayLogin sets the display_login property value. The display_login property +func (m *Actor) SetDisplayLogin(value *string)() { + m.display_login = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *Actor) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetId sets the id property value. The id property +func (m *Actor) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *Actor) SetLogin(value *string)() { + m.login = value +} +// SetUrl sets the url property value. The url property +func (m *Actor) SetUrl(value *string)() { + m.url = value +} +type Actorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetDisplayLogin()(*string) + GetGravatarId()(*string) + GetId()(*int32) + GetLogin()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetDisplayLogin(value *string)() + SetGravatarId(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/added_to_project_issue_event.go b/pkg/github/models/added_to_project_issue_event.go new file mode 100644 index 0000000..9d1dfe6 --- /dev/null +++ b/pkg/github/models/added_to_project_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddedToProjectIssueEvent added to Project Issue Event +type AddedToProjectIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The project_card property + project_card AddedToProjectIssueEvent_project_cardable + // The url property + url *string +} +// NewAddedToProjectIssueEvent instantiates a new AddedToProjectIssueEvent and sets the default values. +func NewAddedToProjectIssueEvent()(*AddedToProjectIssueEvent) { + m := &AddedToProjectIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAddedToProjectIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAddedToProjectIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddedToProjectIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *AddedToProjectIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AddedToProjectIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *AddedToProjectIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *AddedToProjectIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *AddedToProjectIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *AddedToProjectIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AddedToProjectIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["project_card"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAddedToProjectIssueEvent_project_cardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProjectCard(val.(AddedToProjectIssueEvent_project_cardable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *AddedToProjectIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *AddedToProjectIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *AddedToProjectIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetProjectCard gets the project_card property value. The project_card property +// returns a AddedToProjectIssueEvent_project_cardable when successful +func (m *AddedToProjectIssueEvent) GetProjectCard()(AddedToProjectIssueEvent_project_cardable) { + return m.project_card +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *AddedToProjectIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *AddedToProjectIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("project_card", m.GetProjectCard()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *AddedToProjectIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AddedToProjectIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *AddedToProjectIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *AddedToProjectIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *AddedToProjectIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *AddedToProjectIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *AddedToProjectIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *AddedToProjectIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *AddedToProjectIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetProjectCard sets the project_card property value. The project_card property +func (m *AddedToProjectIssueEvent) SetProjectCard(value AddedToProjectIssueEvent_project_cardable)() { + m.project_card = value +} +// SetUrl sets the url property value. The url property +func (m *AddedToProjectIssueEvent) SetUrl(value *string)() { + m.url = value +} +type AddedToProjectIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetProjectCard()(AddedToProjectIssueEvent_project_cardable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetProjectCard(value AddedToProjectIssueEvent_project_cardable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/added_to_project_issue_event_project_card.go b/pkg/github/models/added_to_project_issue_event_project_card.go new file mode 100644 index 0000000..7c54246 --- /dev/null +++ b/pkg/github/models/added_to_project_issue_event_project_card.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AddedToProjectIssueEvent_project_card struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The column_name property + column_name *string + // The id property + id *int32 + // The previous_column_name property + previous_column_name *string + // The project_id property + project_id *int32 + // The project_url property + project_url *string + // The url property + url *string +} +// NewAddedToProjectIssueEvent_project_card instantiates a new AddedToProjectIssueEvent_project_card and sets the default values. +func NewAddedToProjectIssueEvent_project_card()(*AddedToProjectIssueEvent_project_card) { + m := &AddedToProjectIssueEvent_project_card{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAddedToProjectIssueEvent_project_cardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAddedToProjectIssueEvent_project_cardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddedToProjectIssueEvent_project_card(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AddedToProjectIssueEvent_project_card) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumnName gets the column_name property value. The column_name property +// returns a *string when successful +func (m *AddedToProjectIssueEvent_project_card) GetColumnName()(*string) { + return m.column_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AddedToProjectIssueEvent_project_card) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["previous_column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousColumnName(val) + } + return nil + } + res["project_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProjectId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *AddedToProjectIssueEvent_project_card) GetId()(*int32) { + return m.id +} +// GetPreviousColumnName gets the previous_column_name property value. The previous_column_name property +// returns a *string when successful +func (m *AddedToProjectIssueEvent_project_card) GetPreviousColumnName()(*string) { + return m.previous_column_name +} +// GetProjectId gets the project_id property value. The project_id property +// returns a *int32 when successful +func (m *AddedToProjectIssueEvent_project_card) GetProjectId()(*int32) { + return m.project_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *AddedToProjectIssueEvent_project_card) GetProjectUrl()(*string) { + return m.project_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *AddedToProjectIssueEvent_project_card) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *AddedToProjectIssueEvent_project_card) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("column_name", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_column_name", m.GetPreviousColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("project_id", m.GetProjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AddedToProjectIssueEvent_project_card) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumnName sets the column_name property value. The column_name property +func (m *AddedToProjectIssueEvent_project_card) SetColumnName(value *string)() { + m.column_name = value +} +// SetId sets the id property value. The id property +func (m *AddedToProjectIssueEvent_project_card) SetId(value *int32)() { + m.id = value +} +// SetPreviousColumnName sets the previous_column_name property value. The previous_column_name property +func (m *AddedToProjectIssueEvent_project_card) SetPreviousColumnName(value *string)() { + m.previous_column_name = value +} +// SetProjectId sets the project_id property value. The project_id property +func (m *AddedToProjectIssueEvent_project_card) SetProjectId(value *int32)() { + m.project_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *AddedToProjectIssueEvent_project_card) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUrl sets the url property value. The url property +func (m *AddedToProjectIssueEvent_project_card) SetUrl(value *string)() { + m.url = value +} +type AddedToProjectIssueEvent_project_cardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnName()(*string) + GetId()(*int32) + GetPreviousColumnName()(*string) + GetProjectId()(*int32) + GetProjectUrl()(*string) + GetUrl()(*string) + SetColumnName(value *string)() + SetId(value *int32)() + SetPreviousColumnName(value *string)() + SetProjectId(value *int32)() + SetProjectUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/advanced_security_active_committers.go b/pkg/github/models/advanced_security_active_committers.go new file mode 100644 index 0000000..f66ce4a --- /dev/null +++ b/pkg/github/models/advanced_security_active_committers.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdvancedSecurityActiveCommitters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total number of GitHub Advanced Security licences required if all repositories were to enable GitHub Advanced Security + maximum_advanced_security_committers *int32 + // The total number of GitHub Advanced Security licences purchased + purchased_advanced_security_committers *int32 + // The repositories property + repositories []AdvancedSecurityActiveCommittersRepositoryable + // The total_advanced_security_committers property + total_advanced_security_committers *int32 + // The total_count property + total_count *int32 +} +// NewAdvancedSecurityActiveCommitters instantiates a new AdvancedSecurityActiveCommitters and sets the default values. +func NewAdvancedSecurityActiveCommitters()(*AdvancedSecurityActiveCommitters) { + m := &AdvancedSecurityActiveCommitters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdvancedSecurityActiveCommittersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdvancedSecurityActiveCommittersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdvancedSecurityActiveCommitters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdvancedSecurityActiveCommitters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdvancedSecurityActiveCommitters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maximum_advanced_security_committers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumAdvancedSecurityCommitters(val) + } + return nil + } + res["purchased_advanced_security_committers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPurchasedAdvancedSecurityCommitters(val) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdvancedSecurityActiveCommittersRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdvancedSecurityActiveCommittersRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AdvancedSecurityActiveCommittersRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_advanced_security_committers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAdvancedSecurityCommitters(val) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetMaximumAdvancedSecurityCommitters gets the maximum_advanced_security_committers property value. The total number of GitHub Advanced Security licences required if all repositories were to enable GitHub Advanced Security +// returns a *int32 when successful +func (m *AdvancedSecurityActiveCommitters) GetMaximumAdvancedSecurityCommitters()(*int32) { + return m.maximum_advanced_security_committers +} +// GetPurchasedAdvancedSecurityCommitters gets the purchased_advanced_security_committers property value. The total number of GitHub Advanced Security licences purchased +// returns a *int32 when successful +func (m *AdvancedSecurityActiveCommitters) GetPurchasedAdvancedSecurityCommitters()(*int32) { + return m.purchased_advanced_security_committers +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []AdvancedSecurityActiveCommittersRepositoryable when successful +func (m *AdvancedSecurityActiveCommitters) GetRepositories()([]AdvancedSecurityActiveCommittersRepositoryable) { + return m.repositories +} +// GetTotalAdvancedSecurityCommitters gets the total_advanced_security_committers property value. The total_advanced_security_committers property +// returns a *int32 when successful +func (m *AdvancedSecurityActiveCommitters) GetTotalAdvancedSecurityCommitters()(*int32) { + return m.total_advanced_security_committers +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *AdvancedSecurityActiveCommitters) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *AdvancedSecurityActiveCommitters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("maximum_advanced_security_committers", m.GetMaximumAdvancedSecurityCommitters()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("purchased_advanced_security_committers", m.GetPurchasedAdvancedSecurityCommitters()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_advanced_security_committers", m.GetTotalAdvancedSecurityCommitters()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *AdvancedSecurityActiveCommitters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaximumAdvancedSecurityCommitters sets the maximum_advanced_security_committers property value. The total number of GitHub Advanced Security licences required if all repositories were to enable GitHub Advanced Security +func (m *AdvancedSecurityActiveCommitters) SetMaximumAdvancedSecurityCommitters(value *int32)() { + m.maximum_advanced_security_committers = value +} +// SetPurchasedAdvancedSecurityCommitters sets the purchased_advanced_security_committers property value. The total number of GitHub Advanced Security licences purchased +func (m *AdvancedSecurityActiveCommitters) SetPurchasedAdvancedSecurityCommitters(value *int32)() { + m.purchased_advanced_security_committers = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *AdvancedSecurityActiveCommitters) SetRepositories(value []AdvancedSecurityActiveCommittersRepositoryable)() { + m.repositories = value +} +// SetTotalAdvancedSecurityCommitters sets the total_advanced_security_committers property value. The total_advanced_security_committers property +func (m *AdvancedSecurityActiveCommitters) SetTotalAdvancedSecurityCommitters(value *int32)() { + m.total_advanced_security_committers = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *AdvancedSecurityActiveCommitters) SetTotalCount(value *int32)() { + m.total_count = value +} +type AdvancedSecurityActiveCommittersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumAdvancedSecurityCommitters()(*int32) + GetPurchasedAdvancedSecurityCommitters()(*int32) + GetRepositories()([]AdvancedSecurityActiveCommittersRepositoryable) + GetTotalAdvancedSecurityCommitters()(*int32) + GetTotalCount()(*int32) + SetMaximumAdvancedSecurityCommitters(value *int32)() + SetPurchasedAdvancedSecurityCommitters(value *int32)() + SetRepositories(value []AdvancedSecurityActiveCommittersRepositoryable)() + SetTotalAdvancedSecurityCommitters(value *int32)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/models/advanced_security_active_committers_repository.go b/pkg/github/models/advanced_security_active_committers_repository.go new file mode 100644 index 0000000..b7813b0 --- /dev/null +++ b/pkg/github/models/advanced_security_active_committers_repository.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdvancedSecurityActiveCommittersRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The advanced_security_committers property + advanced_security_committers *int32 + // The advanced_security_committers_breakdown property + advanced_security_committers_breakdown []AdvancedSecurityActiveCommittersUserable + // The name property + name *string +} +// NewAdvancedSecurityActiveCommittersRepository instantiates a new AdvancedSecurityActiveCommittersRepository and sets the default values. +func NewAdvancedSecurityActiveCommittersRepository()(*AdvancedSecurityActiveCommittersRepository) { + m := &AdvancedSecurityActiveCommittersRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdvancedSecurityActiveCommittersRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdvancedSecurityActiveCommittersRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdvancedSecurityActiveCommittersRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdvancedSecurityActiveCommittersRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurityCommitters gets the advanced_security_committers property value. The advanced_security_committers property +// returns a *int32 when successful +func (m *AdvancedSecurityActiveCommittersRepository) GetAdvancedSecurityCommitters()(*int32) { + return m.advanced_security_committers +} +// GetAdvancedSecurityCommittersBreakdown gets the advanced_security_committers_breakdown property value. The advanced_security_committers_breakdown property +// returns a []AdvancedSecurityActiveCommittersUserable when successful +func (m *AdvancedSecurityActiveCommittersRepository) GetAdvancedSecurityCommittersBreakdown()([]AdvancedSecurityActiveCommittersUserable) { + return m.advanced_security_committers_breakdown +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdvancedSecurityActiveCommittersRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advanced_security_committers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityCommitters(val) + } + return nil + } + res["advanced_security_committers_breakdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdvancedSecurityActiveCommittersUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdvancedSecurityActiveCommittersUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AdvancedSecurityActiveCommittersUserable) + } + } + m.SetAdvancedSecurityCommittersBreakdown(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *AdvancedSecurityActiveCommittersRepository) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *AdvancedSecurityActiveCommittersRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("advanced_security_committers", m.GetAdvancedSecurityCommitters()) + if err != nil { + return err + } + } + if m.GetAdvancedSecurityCommittersBreakdown() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdvancedSecurityCommittersBreakdown())) + for i, v := range m.GetAdvancedSecurityCommittersBreakdown() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("advanced_security_committers_breakdown", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *AdvancedSecurityActiveCommittersRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurityCommitters sets the advanced_security_committers property value. The advanced_security_committers property +func (m *AdvancedSecurityActiveCommittersRepository) SetAdvancedSecurityCommitters(value *int32)() { + m.advanced_security_committers = value +} +// SetAdvancedSecurityCommittersBreakdown sets the advanced_security_committers_breakdown property value. The advanced_security_committers_breakdown property +func (m *AdvancedSecurityActiveCommittersRepository) SetAdvancedSecurityCommittersBreakdown(value []AdvancedSecurityActiveCommittersUserable)() { + m.advanced_security_committers_breakdown = value +} +// SetName sets the name property value. The name property +func (m *AdvancedSecurityActiveCommittersRepository) SetName(value *string)() { + m.name = value +} +type AdvancedSecurityActiveCommittersRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurityCommitters()(*int32) + GetAdvancedSecurityCommittersBreakdown()([]AdvancedSecurityActiveCommittersUserable) + GetName()(*string) + SetAdvancedSecurityCommitters(value *int32)() + SetAdvancedSecurityCommittersBreakdown(value []AdvancedSecurityActiveCommittersUserable)() + SetName(value *string)() +} diff --git a/pkg/github/models/advanced_security_active_committers_user.go b/pkg/github/models/advanced_security_active_committers_user.go new file mode 100644 index 0000000..32e9ec8 --- /dev/null +++ b/pkg/github/models/advanced_security_active_committers_user.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AdvancedSecurityActiveCommittersUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The last_pushed_date property + last_pushed_date *string + // The last_pushed_email property + last_pushed_email *string + // The user_login property + user_login *string +} +// NewAdvancedSecurityActiveCommittersUser instantiates a new AdvancedSecurityActiveCommittersUser and sets the default values. +func NewAdvancedSecurityActiveCommittersUser()(*AdvancedSecurityActiveCommittersUser) { + m := &AdvancedSecurityActiveCommittersUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdvancedSecurityActiveCommittersUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdvancedSecurityActiveCommittersUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdvancedSecurityActiveCommittersUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AdvancedSecurityActiveCommittersUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdvancedSecurityActiveCommittersUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["last_pushed_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastPushedDate(val) + } + return nil + } + res["last_pushed_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastPushedEmail(val) + } + return nil + } + res["user_login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserLogin(val) + } + return nil + } + return res +} +// GetLastPushedDate gets the last_pushed_date property value. The last_pushed_date property +// returns a *string when successful +func (m *AdvancedSecurityActiveCommittersUser) GetLastPushedDate()(*string) { + return m.last_pushed_date +} +// GetLastPushedEmail gets the last_pushed_email property value. The last_pushed_email property +// returns a *string when successful +func (m *AdvancedSecurityActiveCommittersUser) GetLastPushedEmail()(*string) { + return m.last_pushed_email +} +// GetUserLogin gets the user_login property value. The user_login property +// returns a *string when successful +func (m *AdvancedSecurityActiveCommittersUser) GetUserLogin()(*string) { + return m.user_login +} +// Serialize serializes information the current object +func (m *AdvancedSecurityActiveCommittersUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("last_pushed_date", m.GetLastPushedDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_pushed_email", m.GetLastPushedEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user_login", m.GetUserLogin()) + 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 *AdvancedSecurityActiveCommittersUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLastPushedDate sets the last_pushed_date property value. The last_pushed_date property +func (m *AdvancedSecurityActiveCommittersUser) SetLastPushedDate(value *string)() { + m.last_pushed_date = value +} +// SetLastPushedEmail sets the last_pushed_email property value. The last_pushed_email property +func (m *AdvancedSecurityActiveCommittersUser) SetLastPushedEmail(value *string)() { + m.last_pushed_email = value +} +// SetUserLogin sets the user_login property value. The user_login property +func (m *AdvancedSecurityActiveCommittersUser) SetUserLogin(value *string)() { + m.user_login = value +} +type AdvancedSecurityActiveCommittersUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastPushedDate()(*string) + GetLastPushedEmail()(*string) + GetUserLogin()(*string) + SetLastPushedDate(value *string)() + SetLastPushedEmail(value *string)() + SetUserLogin(value *string)() +} diff --git a/pkg/github/models/alerts503_error.go b/pkg/github/models/alerts503_error.go new file mode 100644 index 0000000..1135094 --- /dev/null +++ b/pkg/github/models/alerts503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Alerts503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewAlerts503Error instantiates a new Alerts503Error and sets the default values. +func NewAlerts503Error()(*Alerts503Error) { + m := &Alerts503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAlerts503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAlerts503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlerts503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Alerts503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Alerts503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Alerts503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Alerts503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Alerts503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Alerts503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Alerts503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Alerts503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Alerts503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Alerts503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Alerts503Error) SetMessage(value *string)() { + m.message = value +} +type Alerts503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/allowed_actions.go b/pkg/github/models/allowed_actions.go new file mode 100644 index 0000000..dd5c04b --- /dev/null +++ b/pkg/github/models/allowed_actions.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The permissions policy that controls the actions and reusable workflows that are allowed to run. +type AllowedActions int + +const ( + ALL_ALLOWEDACTIONS AllowedActions = iota + LOCAL_ONLY_ALLOWEDACTIONS + SELECTED_ALLOWEDACTIONS +) + +func (i AllowedActions) String() string { + return []string{"all", "local_only", "selected"}[i] +} +func ParseAllowedActions(v string) (any, error) { + result := ALL_ALLOWEDACTIONS + switch v { + case "all": + result = ALL_ALLOWEDACTIONS + case "local_only": + result = LOCAL_ONLY_ALLOWEDACTIONS + case "selected": + result = SELECTED_ALLOWEDACTIONS + default: + return 0, errors.New("Unknown AllowedActions value: " + v) + } + return &result, nil +} +func SerializeAllowedActions(values []AllowedActions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AllowedActions) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/analyses503_error.go b/pkg/github/models/analyses503_error.go new file mode 100644 index 0000000..59c81fe --- /dev/null +++ b/pkg/github/models/analyses503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Analyses503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewAnalyses503Error instantiates a new Analyses503Error and sets the default values. +func NewAnalyses503Error()(*Analyses503Error) { + m := &Analyses503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAnalyses503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAnalyses503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnalyses503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Analyses503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Analyses503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Analyses503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Analyses503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Analyses503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Analyses503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Analyses503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Analyses503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Analyses503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Analyses503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Analyses503Error) SetMessage(value *string)() { + m.message = value +} +type Analyses503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/announcement.go b/pkg/github/models/announcement.go new file mode 100644 index 0000000..76249a5 --- /dev/null +++ b/pkg/github/models/announcement.go @@ -0,0 +1,111 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Announcement enterprise global announcement +type Announcement struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-cloud@latest//github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + announcement *string + // The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewAnnouncement instantiates a new Announcement and sets the default values. +func NewAnnouncement()(*Announcement) { + m := &Announcement{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAnnouncementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAnnouncementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnnouncement(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Announcement) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnnouncement gets the announcement property value. The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-cloud@latest//github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." +// returns a *string when successful +func (m *Announcement) GetAnnouncement()(*string) { + return m.announcement +} +// GetExpiresAt gets the expires_at property value. The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. +// returns a *Time when successful +func (m *Announcement) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Announcement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["announcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnnouncement(val) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Announcement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("announcement", m.GetAnnouncement()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + 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 *Announcement) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnnouncement sets the announcement property value. The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-cloud@latest//github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." +func (m *Announcement) SetAnnouncement(value *string)() { + m.announcement = value +} +// SetExpiresAt sets the expires_at property value. The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. +func (m *Announcement) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +type Announcementable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnnouncement()(*string) + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAnnouncement(value *string)() + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/announcement_banner.go b/pkg/github/models/announcement_banner.go new file mode 100644 index 0000000..e4f32a5 --- /dev/null +++ b/pkg/github/models/announcement_banner.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnnouncementBanner announcement at either the repository, organization, or enterprise level +type AnnouncementBanner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-cloud@latest//github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + announcement *string + // The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Whether an announcement can be dismissed by the user. + user_dismissible *bool +} +// NewAnnouncementBanner instantiates a new AnnouncementBanner and sets the default values. +func NewAnnouncementBanner()(*AnnouncementBanner) { + m := &AnnouncementBanner{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAnnouncementBannerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAnnouncementBannerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnnouncementBanner(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AnnouncementBanner) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnnouncement gets the announcement property value. The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-cloud@latest//github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." +// returns a *string when successful +func (m *AnnouncementBanner) GetAnnouncement()(*string) { + return m.announcement +} +// GetExpiresAt gets the expires_at property value. The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. +// returns a *Time when successful +func (m *AnnouncementBanner) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AnnouncementBanner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["announcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnnouncement(val) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["user_dismissible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDismissible(val) + } + return nil + } + return res +} +// GetUserDismissible gets the user_dismissible property value. Whether an announcement can be dismissed by the user. +// returns a *bool when successful +func (m *AnnouncementBanner) GetUserDismissible()(*bool) { + return m.user_dismissible +} +// Serialize serializes information the current object +func (m *AnnouncementBanner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("announcement", m.GetAnnouncement()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("user_dismissible", m.GetUserDismissible()) + 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 *AnnouncementBanner) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnnouncement sets the announcement property value. The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-cloud@latest//github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." +func (m *AnnouncementBanner) SetAnnouncement(value *string)() { + m.announcement = value +} +// SetExpiresAt sets the expires_at property value. The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. +func (m *AnnouncementBanner) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +// SetUserDismissible sets the user_dismissible property value. Whether an announcement can be dismissed by the user. +func (m *AnnouncementBanner) SetUserDismissible(value *bool)() { + m.user_dismissible = value +} +type AnnouncementBannerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnnouncement()(*string) + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUserDismissible()(*bool) + SetAnnouncement(value *string)() + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUserDismissible(value *bool)() +} diff --git a/pkg/github/models/api_overview.go b/pkg/github/models/api_overview.go new file mode 100644 index 0000000..bc68b0f --- /dev/null +++ b/pkg/github/models/api_overview.go @@ -0,0 +1,559 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApiOverview api Overview +type ApiOverview struct { + // The actions property + actions []string + // The actions_macos property + actions_macos []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The api property + api []string + // The dependabot property + dependabot []string + // The domains property + domains ApiOverview_domainsable + // The git property + git []string + // The github_enterprise_importer property + github_enterprise_importer []string + // The hooks property + hooks []string + // The importer property + importer []string + // The packages property + packages []string + // The pages property + pages []string + // The ssh_key_fingerprints property + ssh_key_fingerprints ApiOverview_ssh_key_fingerprintsable + // The ssh_keys property + ssh_keys []string + // The verifiable_password_authentication property + verifiable_password_authentication *bool + // The web property + web []string +} +// NewApiOverview instantiates a new ApiOverview and sets the default values. +func NewApiOverview()(*ApiOverview) { + m := &ApiOverview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiOverview(), nil +} +// GetActions gets the actions property value. The actions property +// returns a []string when successful +func (m *ApiOverview) GetActions()([]string) { + return m.actions +} +// GetActionsMacos gets the actions_macos property value. The actions_macos property +// returns a []string when successful +func (m *ApiOverview) GetActionsMacos()([]string) { + return m.actions_macos +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ApiOverview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApi gets the api property value. The api property +// returns a []string when successful +func (m *ApiOverview) GetApi()([]string) { + return m.api +} +// GetDependabot gets the dependabot property value. The dependabot property +// returns a []string when successful +func (m *ApiOverview) GetDependabot()([]string) { + return m.dependabot +} +// GetDomains gets the domains property value. The domains property +// returns a ApiOverview_domainsable when successful +func (m *ApiOverview) GetDomains()(ApiOverview_domainsable) { + return m.domains +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ApiOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetActions(res) + } + return nil + } + res["actions_macos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetActionsMacos(res) + } + return nil + } + res["api"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApi(res) + } + return nil + } + res["dependabot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetDependabot(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApiOverview_domainsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDomains(val.(ApiOverview_domainsable)) + } + return nil + } + res["git"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGit(res) + } + return nil + } + res["github_enterprise_importer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGithubEnterpriseImporter(res) + } + return nil + } + res["hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetHooks(res) + } + return nil + } + res["importer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetImporter(res) + } + return nil + } + res["packages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPackages(res) + } + return nil + } + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPages(res) + } + return nil + } + res["ssh_key_fingerprints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApiOverview_ssh_key_fingerprintsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSshKeyFingerprints(val.(ApiOverview_ssh_key_fingerprintsable)) + } + return nil + } + res["ssh_keys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSshKeys(res) + } + return nil + } + res["verifiable_password_authentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerifiablePasswordAuthentication(val) + } + return nil + } + res["web"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetWeb(res) + } + return nil + } + return res +} +// GetGit gets the git property value. The git property +// returns a []string when successful +func (m *ApiOverview) GetGit()([]string) { + return m.git +} +// GetGithubEnterpriseImporter gets the github_enterprise_importer property value. The github_enterprise_importer property +// returns a []string when successful +func (m *ApiOverview) GetGithubEnterpriseImporter()([]string) { + return m.github_enterprise_importer +} +// GetHooks gets the hooks property value. The hooks property +// returns a []string when successful +func (m *ApiOverview) GetHooks()([]string) { + return m.hooks +} +// GetImporter gets the importer property value. The importer property +// returns a []string when successful +func (m *ApiOverview) GetImporter()([]string) { + return m.importer +} +// GetPackages gets the packages property value. The packages property +// returns a []string when successful +func (m *ApiOverview) GetPackages()([]string) { + return m.packages +} +// GetPages gets the pages property value. The pages property +// returns a []string when successful +func (m *ApiOverview) GetPages()([]string) { + return m.pages +} +// GetSshKeyFingerprints gets the ssh_key_fingerprints property value. The ssh_key_fingerprints property +// returns a ApiOverview_ssh_key_fingerprintsable when successful +func (m *ApiOverview) GetSshKeyFingerprints()(ApiOverview_ssh_key_fingerprintsable) { + return m.ssh_key_fingerprints +} +// GetSshKeys gets the ssh_keys property value. The ssh_keys property +// returns a []string when successful +func (m *ApiOverview) GetSshKeys()([]string) { + return m.ssh_keys +} +// GetVerifiablePasswordAuthentication gets the verifiable_password_authentication property value. The verifiable_password_authentication property +// returns a *bool when successful +func (m *ApiOverview) GetVerifiablePasswordAuthentication()(*bool) { + return m.verifiable_password_authentication +} +// GetWeb gets the web property value. The web property +// returns a []string when successful +func (m *ApiOverview) GetWeb()([]string) { + return m.web +} +// Serialize serializes information the current object +func (m *ApiOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + err := writer.WriteCollectionOfStringValues("actions", m.GetActions()) + if err != nil { + return err + } + } + if m.GetActionsMacos() != nil { + err := writer.WriteCollectionOfStringValues("actions_macos", m.GetActionsMacos()) + if err != nil { + return err + } + } + if m.GetApi() != nil { + err := writer.WriteCollectionOfStringValues("api", m.GetApi()) + if err != nil { + return err + } + } + if m.GetDependabot() != nil { + err := writer.WriteCollectionOfStringValues("dependabot", m.GetDependabot()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("domains", m.GetDomains()) + if err != nil { + return err + } + } + if m.GetGit() != nil { + err := writer.WriteCollectionOfStringValues("git", m.GetGit()) + if err != nil { + return err + } + } + if m.GetGithubEnterpriseImporter() != nil { + err := writer.WriteCollectionOfStringValues("github_enterprise_importer", m.GetGithubEnterpriseImporter()) + if err != nil { + return err + } + } + if m.GetHooks() != nil { + err := writer.WriteCollectionOfStringValues("hooks", m.GetHooks()) + if err != nil { + return err + } + } + if m.GetImporter() != nil { + err := writer.WriteCollectionOfStringValues("importer", m.GetImporter()) + if err != nil { + return err + } + } + if m.GetPackages() != nil { + err := writer.WriteCollectionOfStringValues("packages", m.GetPackages()) + if err != nil { + return err + } + } + if m.GetPages() != nil { + err := writer.WriteCollectionOfStringValues("pages", m.GetPages()) + if err != nil { + return err + } + } + if m.GetSshKeys() != nil { + err := writer.WriteCollectionOfStringValues("ssh_keys", m.GetSshKeys()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("ssh_key_fingerprints", m.GetSshKeyFingerprints()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verifiable_password_authentication", m.GetVerifiablePasswordAuthentication()) + if err != nil { + return err + } + } + if m.GetWeb() != nil { + err := writer.WriteCollectionOfStringValues("web", m.GetWeb()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The actions property +func (m *ApiOverview) SetActions(value []string)() { + m.actions = value +} +// SetActionsMacos sets the actions_macos property value. The actions_macos property +func (m *ApiOverview) SetActionsMacos(value []string)() { + m.actions_macos = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ApiOverview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApi sets the api property value. The api property +func (m *ApiOverview) SetApi(value []string)() { + m.api = value +} +// SetDependabot sets the dependabot property value. The dependabot property +func (m *ApiOverview) SetDependabot(value []string)() { + m.dependabot = value +} +// SetDomains sets the domains property value. The domains property +func (m *ApiOverview) SetDomains(value ApiOverview_domainsable)() { + m.domains = value +} +// SetGit sets the git property value. The git property +func (m *ApiOverview) SetGit(value []string)() { + m.git = value +} +// SetGithubEnterpriseImporter sets the github_enterprise_importer property value. The github_enterprise_importer property +func (m *ApiOverview) SetGithubEnterpriseImporter(value []string)() { + m.github_enterprise_importer = value +} +// SetHooks sets the hooks property value. The hooks property +func (m *ApiOverview) SetHooks(value []string)() { + m.hooks = value +} +// SetImporter sets the importer property value. The importer property +func (m *ApiOverview) SetImporter(value []string)() { + m.importer = value +} +// SetPackages sets the packages property value. The packages property +func (m *ApiOverview) SetPackages(value []string)() { + m.packages = value +} +// SetPages sets the pages property value. The pages property +func (m *ApiOverview) SetPages(value []string)() { + m.pages = value +} +// SetSshKeyFingerprints sets the ssh_key_fingerprints property value. The ssh_key_fingerprints property +func (m *ApiOverview) SetSshKeyFingerprints(value ApiOverview_ssh_key_fingerprintsable)() { + m.ssh_key_fingerprints = value +} +// SetSshKeys sets the ssh_keys property value. The ssh_keys property +func (m *ApiOverview) SetSshKeys(value []string)() { + m.ssh_keys = value +} +// SetVerifiablePasswordAuthentication sets the verifiable_password_authentication property value. The verifiable_password_authentication property +func (m *ApiOverview) SetVerifiablePasswordAuthentication(value *bool)() { + m.verifiable_password_authentication = value +} +// SetWeb sets the web property value. The web property +func (m *ApiOverview) SetWeb(value []string)() { + m.web = value +} +type ApiOverviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]string) + GetActionsMacos()([]string) + GetApi()([]string) + GetDependabot()([]string) + GetDomains()(ApiOverview_domainsable) + GetGit()([]string) + GetGithubEnterpriseImporter()([]string) + GetHooks()([]string) + GetImporter()([]string) + GetPackages()([]string) + GetPages()([]string) + GetSshKeyFingerprints()(ApiOverview_ssh_key_fingerprintsable) + GetSshKeys()([]string) + GetVerifiablePasswordAuthentication()(*bool) + GetWeb()([]string) + SetActions(value []string)() + SetActionsMacos(value []string)() + SetApi(value []string)() + SetDependabot(value []string)() + SetDomains(value ApiOverview_domainsable)() + SetGit(value []string)() + SetGithubEnterpriseImporter(value []string)() + SetHooks(value []string)() + SetImporter(value []string)() + SetPackages(value []string)() + SetPages(value []string)() + SetSshKeyFingerprints(value ApiOverview_ssh_key_fingerprintsable)() + SetSshKeys(value []string)() + SetVerifiablePasswordAuthentication(value *bool)() + SetWeb(value []string)() +} diff --git a/pkg/github/models/api_overview_domains.go b/pkg/github/models/api_overview_domains.go new file mode 100644 index 0000000..28e55bb --- /dev/null +++ b/pkg/github/models/api_overview_domains.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiOverview_domains struct { + // The actions property + actions []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The codespaces property + codespaces []string + // The copilot property + copilot []string + // The packages property + packages []string + // The website property + website []string +} +// NewApiOverview_domains instantiates a new ApiOverview_domains and sets the default values. +func NewApiOverview_domains()(*ApiOverview_domains) { + m := &ApiOverview_domains{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiOverview_domainsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiOverview_domainsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiOverview_domains(), nil +} +// GetActions gets the actions property value. The actions property +// returns a []string when successful +func (m *ApiOverview_domains) GetActions()([]string) { + return m.actions +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ApiOverview_domains) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodespaces gets the codespaces property value. The codespaces property +// returns a []string when successful +func (m *ApiOverview_domains) GetCodespaces()([]string) { + return m.codespaces +} +// GetCopilot gets the copilot property value. The copilot property +// returns a []string when successful +func (m *ApiOverview_domains) GetCopilot()([]string) { + return m.copilot +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ApiOverview_domains) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetActions(res) + } + return nil + } + res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCodespaces(res) + } + return nil + } + res["copilot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCopilot(res) + } + return nil + } + res["packages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPackages(res) + } + return nil + } + res["website"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetWebsite(res) + } + return nil + } + return res +} +// GetPackages gets the packages property value. The packages property +// returns a []string when successful +func (m *ApiOverview_domains) GetPackages()([]string) { + return m.packages +} +// GetWebsite gets the website property value. The website property +// returns a []string when successful +func (m *ApiOverview_domains) GetWebsite()([]string) { + return m.website +} +// Serialize serializes information the current object +func (m *ApiOverview_domains) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + err := writer.WriteCollectionOfStringValues("actions", m.GetActions()) + if err != nil { + return err + } + } + if m.GetCodespaces() != nil { + err := writer.WriteCollectionOfStringValues("codespaces", m.GetCodespaces()) + if err != nil { + return err + } + } + if m.GetCopilot() != nil { + err := writer.WriteCollectionOfStringValues("copilot", m.GetCopilot()) + if err != nil { + return err + } + } + if m.GetPackages() != nil { + err := writer.WriteCollectionOfStringValues("packages", m.GetPackages()) + if err != nil { + return err + } + } + if m.GetWebsite() != nil { + err := writer.WriteCollectionOfStringValues("website", m.GetWebsite()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The actions property +func (m *ApiOverview_domains) SetActions(value []string)() { + m.actions = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ApiOverview_domains) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodespaces sets the codespaces property value. The codespaces property +func (m *ApiOverview_domains) SetCodespaces(value []string)() { + m.codespaces = value +} +// SetCopilot sets the copilot property value. The copilot property +func (m *ApiOverview_domains) SetCopilot(value []string)() { + m.copilot = value +} +// SetPackages sets the packages property value. The packages property +func (m *ApiOverview_domains) SetPackages(value []string)() { + m.packages = value +} +// SetWebsite sets the website property value. The website property +func (m *ApiOverview_domains) SetWebsite(value []string)() { + m.website = value +} +type ApiOverview_domainsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]string) + GetCodespaces()([]string) + GetCopilot()([]string) + GetPackages()([]string) + GetWebsite()([]string) + SetActions(value []string)() + SetCodespaces(value []string)() + SetCopilot(value []string)() + SetPackages(value []string)() + SetWebsite(value []string)() +} diff --git a/pkg/github/models/api_overview_ssh_key_fingerprints.go b/pkg/github/models/api_overview_ssh_key_fingerprints.go new file mode 100644 index 0000000..11f32ae --- /dev/null +++ b/pkg/github/models/api_overview_ssh_key_fingerprints.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiOverview_ssh_key_fingerprints struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The SHA256_DSA property + sHA256_DSA *string + // The SHA256_ECDSA property + sHA256_ECDSA *string + // The SHA256_ED25519 property + sHA256_ED25519 *string + // The SHA256_RSA property + sHA256_RSA *string +} +// NewApiOverview_ssh_key_fingerprints instantiates a new ApiOverview_ssh_key_fingerprints and sets the default values. +func NewApiOverview_ssh_key_fingerprints()(*ApiOverview_ssh_key_fingerprints) { + m := &ApiOverview_ssh_key_fingerprints{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiOverview_ssh_key_fingerprintsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiOverview_ssh_key_fingerprintsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiOverview_ssh_key_fingerprints(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ApiOverview_ssh_key_fingerprints) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ApiOverview_ssh_key_fingerprints) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["SHA256_DSA"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSHA256DSA(val) + } + return nil + } + res["SHA256_ECDSA"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSHA256ECDSA(val) + } + return nil + } + res["SHA256_ED25519"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSHA256ED25519(val) + } + return nil + } + res["SHA256_RSA"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSHA256RSA(val) + } + return nil + } + return res +} +// GetSHA256DSA gets the SHA256_DSA property value. The SHA256_DSA property +// returns a *string when successful +func (m *ApiOverview_ssh_key_fingerprints) GetSHA256DSA()(*string) { + return m.sHA256_DSA +} +// GetSHA256ECDSA gets the SHA256_ECDSA property value. The SHA256_ECDSA property +// returns a *string when successful +func (m *ApiOverview_ssh_key_fingerprints) GetSHA256ECDSA()(*string) { + return m.sHA256_ECDSA +} +// GetSHA256ED25519 gets the SHA256_ED25519 property value. The SHA256_ED25519 property +// returns a *string when successful +func (m *ApiOverview_ssh_key_fingerprints) GetSHA256ED25519()(*string) { + return m.sHA256_ED25519 +} +// GetSHA256RSA gets the SHA256_RSA property value. The SHA256_RSA property +// returns a *string when successful +func (m *ApiOverview_ssh_key_fingerprints) GetSHA256RSA()(*string) { + return m.sHA256_RSA +} +// Serialize serializes information the current object +func (m *ApiOverview_ssh_key_fingerprints) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("SHA256_DSA", m.GetSHA256DSA()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("SHA256_ECDSA", m.GetSHA256ECDSA()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("SHA256_ED25519", m.GetSHA256ED25519()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("SHA256_RSA", m.GetSHA256RSA()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ApiOverview_ssh_key_fingerprints) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSHA256DSA sets the SHA256_DSA property value. The SHA256_DSA property +func (m *ApiOverview_ssh_key_fingerprints) SetSHA256DSA(value *string)() { + m.sHA256_DSA = value +} +// SetSHA256ECDSA sets the SHA256_ECDSA property value. The SHA256_ECDSA property +func (m *ApiOverview_ssh_key_fingerprints) SetSHA256ECDSA(value *string)() { + m.sHA256_ECDSA = value +} +// SetSHA256ED25519 sets the SHA256_ED25519 property value. The SHA256_ED25519 property +func (m *ApiOverview_ssh_key_fingerprints) SetSHA256ED25519(value *string)() { + m.sHA256_ED25519 = value +} +// SetSHA256RSA sets the SHA256_RSA property value. The SHA256_RSA property +func (m *ApiOverview_ssh_key_fingerprints) SetSHA256RSA(value *string)() { + m.sHA256_RSA = value +} +type ApiOverview_ssh_key_fingerprintsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSHA256DSA()(*string) + GetSHA256ECDSA()(*string) + GetSHA256ED25519()(*string) + GetSHA256RSA()(*string) + SetSHA256DSA(value *string)() + SetSHA256ECDSA(value *string)() + SetSHA256ED25519(value *string)() + SetSHA256RSA(value *string)() +} diff --git a/pkg/github/models/app_permissions.go b/pkg/github/models/app_permissions.go new file mode 100644 index 0000000..ca2dc15 --- /dev/null +++ b/pkg/github/models/app_permissions.go @@ -0,0 +1,1492 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppPermissions the permissions granted to the user access token. +type AppPermissions struct { + // The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + actions *AppPermissions_actions + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + administration *AppPermissions_administration + // The level of permission to grant the access token for checks on code. + checks *AppPermissions_checks + // The level of permission to grant the access token to create, edit, delete, and list Codespaces. + codespaces *AppPermissions_codespaces + // The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + contents *AppPermissions_contents + // The leve of permission to grant the access token to manage Dependabot secrets. + dependabot_secrets *AppPermissions_dependabot_secrets + // The level of permission to grant the access token for deployments and deployment statuses. + deployments *AppPermissions_deployments + // The level of permission to grant the access token to manage the email addresses belonging to a user. + email_addresses *AppPermissions_email_addresses + // The level of permission to grant the access token for managing repository environments. + environments *AppPermissions_environments + // The level of permission to grant the access token to manage the followers belonging to a user. + followers *AppPermissions_followers + // The level of permission to grant the access token to manage git SSH keys. + git_ssh_keys *AppPermissions_git_ssh_keys + // The level of permission to grant the access token to view and manage GPG keys belonging to a user. + gpg_keys *AppPermissions_gpg_keys + // The level of permission to grant the access token to view and manage interaction limits on a repository. + interaction_limits *AppPermissions_interaction_limits + // The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + issues *AppPermissions_issues + // The level of permission to grant the access token for organization teams and members. + members *AppPermissions_members + // The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + metadata *AppPermissions_metadata + // The level of permission to grant the access token to manage access to an organization. + organization_administration *AppPermissions_organization_administration + // The level of permission to grant the access token to view and manage announcement banners for an organization. + organization_announcement_banners *AppPermissions_organization_announcement_banners + // The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + organization_copilot_seat_management *AppPermissions_organization_copilot_seat_management + // The level of permission to grant the access token for custom organization roles management. + organization_custom_org_roles *AppPermissions_organization_custom_org_roles + // The level of permission to grant the access token for custom property management. + organization_custom_properties *AppPermissions_organization_custom_properties + // The level of permission to grant the access token for custom repository roles management. + organization_custom_roles *AppPermissions_organization_custom_roles + // The level of permission to grant the access token to view events triggered by an activity in an organization. + organization_events *AppPermissions_organization_events + // The level of permission to grant the access token to manage the post-receive hooks for an organization. + organization_hooks *AppPermissions_organization_hooks + // The level of permission to grant the access token for organization packages published to GitHub Packages. + organization_packages *AppPermissions_organization_packages + // The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. + organization_personal_access_token_requests *AppPermissions_organization_personal_access_token_requests + // The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. + organization_personal_access_tokens *AppPermissions_organization_personal_access_tokens + // The level of permission to grant the access token for viewing an organization's plan. + organization_plan *AppPermissions_organization_plan + // The level of permission to grant the access token to manage organization projects and projects beta (where available). + organization_projects *AppPermissions_organization_projects + // The level of permission to grant the access token to manage organization secrets. + organization_secrets *AppPermissions_organization_secrets + // The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + organization_self_hosted_runners *AppPermissions_organization_self_hosted_runners + // The level of permission to grant the access token to view and manage users blocked by the organization. + organization_user_blocking *AppPermissions_organization_user_blocking + // The level of permission to grant the access token for packages published to GitHub Packages. + packages *AppPermissions_packages + // The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + pages *AppPermissions_pages + // The level of permission to grant the access token to manage the profile settings belonging to a user. + profile *AppPermissions_profile + // The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + pull_requests *AppPermissions_pull_requests + // The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. + repository_custom_properties *AppPermissions_repository_custom_properties + // The level of permission to grant the access token to manage the post-receive hooks for a repository. + repository_hooks *AppPermissions_repository_hooks + // The level of permission to grant the access token to manage repository projects, columns, and cards. + repository_projects *AppPermissions_repository_projects + // The level of permission to grant the access token to view and manage secret scanning alerts. + secret_scanning_alerts *AppPermissions_secret_scanning_alerts + // The level of permission to grant the access token to manage repository secrets. + secrets *AppPermissions_secrets + // The level of permission to grant the access token to view and manage security events like code scanning alerts. + security_events *AppPermissions_security_events + // The level of permission to grant the access token to manage just a single file. + single_file *AppPermissions_single_file + // The level of permission to grant the access token to list and manage repositories a user is starring. + starring *AppPermissions_starring + // The level of permission to grant the access token for commit statuses. + statuses *AppPermissions_statuses + // The level of permission to grant the access token to manage team discussions and related comments. + team_discussions *AppPermissions_team_discussions + // The level of permission to grant the access token to manage Dependabot alerts. + vulnerability_alerts *AppPermissions_vulnerability_alerts + // The level of permission to grant the access token to update GitHub Actions workflow files. + workflows *AppPermissions_workflows +} +// NewAppPermissions instantiates a new AppPermissions and sets the default values. +func NewAppPermissions()(*AppPermissions) { + m := &AppPermissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAppPermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAppPermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppPermissions(), nil +} +// GetActions gets the actions property value. The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. +// returns a *AppPermissions_actions when successful +func (m *AppPermissions) GetActions()(*AppPermissions_actions) { + return m.actions +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AppPermissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdministration gets the administration property value. The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. +// returns a *AppPermissions_administration when successful +func (m *AppPermissions) GetAdministration()(*AppPermissions_administration) { + return m.administration +} +// GetChecks gets the checks property value. The level of permission to grant the access token for checks on code. +// returns a *AppPermissions_checks when successful +func (m *AppPermissions) GetChecks()(*AppPermissions_checks) { + return m.checks +} +// GetCodespaces gets the codespaces property value. The level of permission to grant the access token to create, edit, delete, and list Codespaces. +// returns a *AppPermissions_codespaces when successful +func (m *AppPermissions) GetCodespaces()(*AppPermissions_codespaces) { + return m.codespaces +} +// GetContents gets the contents property value. The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. +// returns a *AppPermissions_contents when successful +func (m *AppPermissions) GetContents()(*AppPermissions_contents) { + return m.contents +} +// GetDependabotSecrets gets the dependabot_secrets property value. The leve of permission to grant the access token to manage Dependabot secrets. +// returns a *AppPermissions_dependabot_secrets when successful +func (m *AppPermissions) GetDependabotSecrets()(*AppPermissions_dependabot_secrets) { + return m.dependabot_secrets +} +// GetDeployments gets the deployments property value. The level of permission to grant the access token for deployments and deployment statuses. +// returns a *AppPermissions_deployments when successful +func (m *AppPermissions) GetDeployments()(*AppPermissions_deployments) { + return m.deployments +} +// GetEmailAddresses gets the email_addresses property value. The level of permission to grant the access token to manage the email addresses belonging to a user. +// returns a *AppPermissions_email_addresses when successful +func (m *AppPermissions) GetEmailAddresses()(*AppPermissions_email_addresses) { + return m.email_addresses +} +// GetEnvironments gets the environments property value. The level of permission to grant the access token for managing repository environments. +// returns a *AppPermissions_environments when successful +func (m *AppPermissions) GetEnvironments()(*AppPermissions_environments) { + return m.environments +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AppPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_actions) + if err != nil { + return err + } + if val != nil { + m.SetActions(val.(*AppPermissions_actions)) + } + return nil + } + res["administration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_administration) + if err != nil { + return err + } + if val != nil { + m.SetAdministration(val.(*AppPermissions_administration)) + } + return nil + } + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_checks) + if err != nil { + return err + } + if val != nil { + m.SetChecks(val.(*AppPermissions_checks)) + } + return nil + } + res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_codespaces) + if err != nil { + return err + } + if val != nil { + m.SetCodespaces(val.(*AppPermissions_codespaces)) + } + return nil + } + res["contents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_contents) + if err != nil { + return err + } + if val != nil { + m.SetContents(val.(*AppPermissions_contents)) + } + return nil + } + res["dependabot_secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_dependabot_secrets) + if err != nil { + return err + } + if val != nil { + m.SetDependabotSecrets(val.(*AppPermissions_dependabot_secrets)) + } + return nil + } + res["deployments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_deployments) + if err != nil { + return err + } + if val != nil { + m.SetDeployments(val.(*AppPermissions_deployments)) + } + return nil + } + res["email_addresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_email_addresses) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddresses(val.(*AppPermissions_email_addresses)) + } + return nil + } + res["environments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_environments) + if err != nil { + return err + } + if val != nil { + m.SetEnvironments(val.(*AppPermissions_environments)) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_followers) + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val.(*AppPermissions_followers)) + } + return nil + } + res["git_ssh_keys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_git_ssh_keys) + if err != nil { + return err + } + if val != nil { + m.SetGitSshKeys(val.(*AppPermissions_git_ssh_keys)) + } + return nil + } + res["gpg_keys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_gpg_keys) + if err != nil { + return err + } + if val != nil { + m.SetGpgKeys(val.(*AppPermissions_gpg_keys)) + } + return nil + } + res["interaction_limits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_interaction_limits) + if err != nil { + return err + } + if val != nil { + m.SetInteractionLimits(val.(*AppPermissions_interaction_limits)) + } + return nil + } + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_issues) + if err != nil { + return err + } + if val != nil { + m.SetIssues(val.(*AppPermissions_issues)) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_members) + if err != nil { + return err + } + if val != nil { + m.SetMembers(val.(*AppPermissions_members)) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_metadata) + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val.(*AppPermissions_metadata)) + } + return nil + } + res["organization_administration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_administration) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationAdministration(val.(*AppPermissions_organization_administration)) + } + return nil + } + res["organization_announcement_banners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_announcement_banners) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationAnnouncementBanners(val.(*AppPermissions_organization_announcement_banners)) + } + return nil + } + res["organization_copilot_seat_management"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_copilot_seat_management) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationCopilotSeatManagement(val.(*AppPermissions_organization_copilot_seat_management)) + } + return nil + } + res["organization_custom_org_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_custom_org_roles) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationCustomOrgRoles(val.(*AppPermissions_organization_custom_org_roles)) + } + return nil + } + res["organization_custom_properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_custom_properties) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationCustomProperties(val.(*AppPermissions_organization_custom_properties)) + } + return nil + } + res["organization_custom_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_custom_roles) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationCustomRoles(val.(*AppPermissions_organization_custom_roles)) + } + return nil + } + res["organization_events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_events) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationEvents(val.(*AppPermissions_organization_events)) + } + return nil + } + res["organization_hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_hooks) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationHooks(val.(*AppPermissions_organization_hooks)) + } + return nil + } + res["organization_packages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_packages) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPackages(val.(*AppPermissions_organization_packages)) + } + return nil + } + res["organization_personal_access_token_requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_personal_access_token_requests) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPersonalAccessTokenRequests(val.(*AppPermissions_organization_personal_access_token_requests)) + } + return nil + } + res["organization_personal_access_tokens"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_personal_access_tokens) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPersonalAccessTokens(val.(*AppPermissions_organization_personal_access_tokens)) + } + return nil + } + res["organization_plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_plan) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPlan(val.(*AppPermissions_organization_plan)) + } + return nil + } + res["organization_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_projects) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationProjects(val.(*AppPermissions_organization_projects)) + } + return nil + } + res["organization_secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_secrets) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationSecrets(val.(*AppPermissions_organization_secrets)) + } + return nil + } + res["organization_self_hosted_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_self_hosted_runners) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationSelfHostedRunners(val.(*AppPermissions_organization_self_hosted_runners)) + } + return nil + } + res["organization_user_blocking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_user_blocking) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationUserBlocking(val.(*AppPermissions_organization_user_blocking)) + } + return nil + } + res["packages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_packages) + if err != nil { + return err + } + if val != nil { + m.SetPackages(val.(*AppPermissions_packages)) + } + return nil + } + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_pages) + if err != nil { + return err + } + if val != nil { + m.SetPages(val.(*AppPermissions_pages)) + } + return nil + } + res["profile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_profile) + if err != nil { + return err + } + if val != nil { + m.SetProfile(val.(*AppPermissions_profile)) + } + return nil + } + res["pull_requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_pull_requests) + if err != nil { + return err + } + if val != nil { + m.SetPullRequests(val.(*AppPermissions_pull_requests)) + } + return nil + } + res["repository_custom_properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_repository_custom_properties) + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCustomProperties(val.(*AppPermissions_repository_custom_properties)) + } + return nil + } + res["repository_hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_repository_hooks) + if err != nil { + return err + } + if val != nil { + m.SetRepositoryHooks(val.(*AppPermissions_repository_hooks)) + } + return nil + } + res["repository_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_repository_projects) + if err != nil { + return err + } + if val != nil { + m.SetRepositoryProjects(val.(*AppPermissions_repository_projects)) + } + return nil + } + res["secret_scanning_alerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_secret_scanning_alerts) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningAlerts(val.(*AppPermissions_secret_scanning_alerts)) + } + return nil + } + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_secrets) + if err != nil { + return err + } + if val != nil { + m.SetSecrets(val.(*AppPermissions_secrets)) + } + return nil + } + res["security_events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_security_events) + if err != nil { + return err + } + if val != nil { + m.SetSecurityEvents(val.(*AppPermissions_security_events)) + } + return nil + } + res["single_file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_single_file) + if err != nil { + return err + } + if val != nil { + m.SetSingleFile(val.(*AppPermissions_single_file)) + } + return nil + } + res["starring"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_starring) + if err != nil { + return err + } + if val != nil { + m.SetStarring(val.(*AppPermissions_starring)) + } + return nil + } + res["statuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_statuses) + if err != nil { + return err + } + if val != nil { + m.SetStatuses(val.(*AppPermissions_statuses)) + } + return nil + } + res["team_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_team_discussions) + if err != nil { + return err + } + if val != nil { + m.SetTeamDiscussions(val.(*AppPermissions_team_discussions)) + } + return nil + } + res["vulnerability_alerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_vulnerability_alerts) + if err != nil { + return err + } + if val != nil { + m.SetVulnerabilityAlerts(val.(*AppPermissions_vulnerability_alerts)) + } + return nil + } + res["workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_workflows) + if err != nil { + return err + } + if val != nil { + m.SetWorkflows(val.(*AppPermissions_workflows)) + } + return nil + } + return res +} +// GetFollowers gets the followers property value. The level of permission to grant the access token to manage the followers belonging to a user. +// returns a *AppPermissions_followers when successful +func (m *AppPermissions) GetFollowers()(*AppPermissions_followers) { + return m.followers +} +// GetGitSshKeys gets the git_ssh_keys property value. The level of permission to grant the access token to manage git SSH keys. +// returns a *AppPermissions_git_ssh_keys when successful +func (m *AppPermissions) GetGitSshKeys()(*AppPermissions_git_ssh_keys) { + return m.git_ssh_keys +} +// GetGpgKeys gets the gpg_keys property value. The level of permission to grant the access token to view and manage GPG keys belonging to a user. +// returns a *AppPermissions_gpg_keys when successful +func (m *AppPermissions) GetGpgKeys()(*AppPermissions_gpg_keys) { + return m.gpg_keys +} +// GetInteractionLimits gets the interaction_limits property value. The level of permission to grant the access token to view and manage interaction limits on a repository. +// returns a *AppPermissions_interaction_limits when successful +func (m *AppPermissions) GetInteractionLimits()(*AppPermissions_interaction_limits) { + return m.interaction_limits +} +// GetIssues gets the issues property value. The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. +// returns a *AppPermissions_issues when successful +func (m *AppPermissions) GetIssues()(*AppPermissions_issues) { + return m.issues +} +// GetMembers gets the members property value. The level of permission to grant the access token for organization teams and members. +// returns a *AppPermissions_members when successful +func (m *AppPermissions) GetMembers()(*AppPermissions_members) { + return m.members +} +// GetMetadata gets the metadata property value. The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. +// returns a *AppPermissions_metadata when successful +func (m *AppPermissions) GetMetadata()(*AppPermissions_metadata) { + return m.metadata +} +// GetOrganizationAdministration gets the organization_administration property value. The level of permission to grant the access token to manage access to an organization. +// returns a *AppPermissions_organization_administration when successful +func (m *AppPermissions) GetOrganizationAdministration()(*AppPermissions_organization_administration) { + return m.organization_administration +} +// GetOrganizationAnnouncementBanners gets the organization_announcement_banners property value. The level of permission to grant the access token to view and manage announcement banners for an organization. +// returns a *AppPermissions_organization_announcement_banners when successful +func (m *AppPermissions) GetOrganizationAnnouncementBanners()(*AppPermissions_organization_announcement_banners) { + return m.organization_announcement_banners +} +// GetOrganizationCopilotSeatManagement gets the organization_copilot_seat_management property value. The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. +// returns a *AppPermissions_organization_copilot_seat_management when successful +func (m *AppPermissions) GetOrganizationCopilotSeatManagement()(*AppPermissions_organization_copilot_seat_management) { + return m.organization_copilot_seat_management +} +// GetOrganizationCustomOrgRoles gets the organization_custom_org_roles property value. The level of permission to grant the access token for custom organization roles management. +// returns a *AppPermissions_organization_custom_org_roles when successful +func (m *AppPermissions) GetOrganizationCustomOrgRoles()(*AppPermissions_organization_custom_org_roles) { + return m.organization_custom_org_roles +} +// GetOrganizationCustomProperties gets the organization_custom_properties property value. The level of permission to grant the access token for custom property management. +// returns a *AppPermissions_organization_custom_properties when successful +func (m *AppPermissions) GetOrganizationCustomProperties()(*AppPermissions_organization_custom_properties) { + return m.organization_custom_properties +} +// GetOrganizationCustomRoles gets the organization_custom_roles property value. The level of permission to grant the access token for custom repository roles management. +// returns a *AppPermissions_organization_custom_roles when successful +func (m *AppPermissions) GetOrganizationCustomRoles()(*AppPermissions_organization_custom_roles) { + return m.organization_custom_roles +} +// GetOrganizationEvents gets the organization_events property value. The level of permission to grant the access token to view events triggered by an activity in an organization. +// returns a *AppPermissions_organization_events when successful +func (m *AppPermissions) GetOrganizationEvents()(*AppPermissions_organization_events) { + return m.organization_events +} +// GetOrganizationHooks gets the organization_hooks property value. The level of permission to grant the access token to manage the post-receive hooks for an organization. +// returns a *AppPermissions_organization_hooks when successful +func (m *AppPermissions) GetOrganizationHooks()(*AppPermissions_organization_hooks) { + return m.organization_hooks +} +// GetOrganizationPackages gets the organization_packages property value. The level of permission to grant the access token for organization packages published to GitHub Packages. +// returns a *AppPermissions_organization_packages when successful +func (m *AppPermissions) GetOrganizationPackages()(*AppPermissions_organization_packages) { + return m.organization_packages +} +// GetOrganizationPersonalAccessTokenRequests gets the organization_personal_access_token_requests property value. The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. +// returns a *AppPermissions_organization_personal_access_token_requests when successful +func (m *AppPermissions) GetOrganizationPersonalAccessTokenRequests()(*AppPermissions_organization_personal_access_token_requests) { + return m.organization_personal_access_token_requests +} +// GetOrganizationPersonalAccessTokens gets the organization_personal_access_tokens property value. The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. +// returns a *AppPermissions_organization_personal_access_tokens when successful +func (m *AppPermissions) GetOrganizationPersonalAccessTokens()(*AppPermissions_organization_personal_access_tokens) { + return m.organization_personal_access_tokens +} +// GetOrganizationPlan gets the organization_plan property value. The level of permission to grant the access token for viewing an organization's plan. +// returns a *AppPermissions_organization_plan when successful +func (m *AppPermissions) GetOrganizationPlan()(*AppPermissions_organization_plan) { + return m.organization_plan +} +// GetOrganizationProjects gets the organization_projects property value. The level of permission to grant the access token to manage organization projects and projects beta (where available). +// returns a *AppPermissions_organization_projects when successful +func (m *AppPermissions) GetOrganizationProjects()(*AppPermissions_organization_projects) { + return m.organization_projects +} +// GetOrganizationSecrets gets the organization_secrets property value. The level of permission to grant the access token to manage organization secrets. +// returns a *AppPermissions_organization_secrets when successful +func (m *AppPermissions) GetOrganizationSecrets()(*AppPermissions_organization_secrets) { + return m.organization_secrets +} +// GetOrganizationSelfHostedRunners gets the organization_self_hosted_runners property value. The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. +// returns a *AppPermissions_organization_self_hosted_runners when successful +func (m *AppPermissions) GetOrganizationSelfHostedRunners()(*AppPermissions_organization_self_hosted_runners) { + return m.organization_self_hosted_runners +} +// GetOrganizationUserBlocking gets the organization_user_blocking property value. The level of permission to grant the access token to view and manage users blocked by the organization. +// returns a *AppPermissions_organization_user_blocking when successful +func (m *AppPermissions) GetOrganizationUserBlocking()(*AppPermissions_organization_user_blocking) { + return m.organization_user_blocking +} +// GetPackages gets the packages property value. The level of permission to grant the access token for packages published to GitHub Packages. +// returns a *AppPermissions_packages when successful +func (m *AppPermissions) GetPackages()(*AppPermissions_packages) { + return m.packages +} +// GetPages gets the pages property value. The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. +// returns a *AppPermissions_pages when successful +func (m *AppPermissions) GetPages()(*AppPermissions_pages) { + return m.pages +} +// GetProfile gets the profile property value. The level of permission to grant the access token to manage the profile settings belonging to a user. +// returns a *AppPermissions_profile when successful +func (m *AppPermissions) GetProfile()(*AppPermissions_profile) { + return m.profile +} +// GetPullRequests gets the pull_requests property value. The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. +// returns a *AppPermissions_pull_requests when successful +func (m *AppPermissions) GetPullRequests()(*AppPermissions_pull_requests) { + return m.pull_requests +} +// GetRepositoryCustomProperties gets the repository_custom_properties property value. The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. +// returns a *AppPermissions_repository_custom_properties when successful +func (m *AppPermissions) GetRepositoryCustomProperties()(*AppPermissions_repository_custom_properties) { + return m.repository_custom_properties +} +// GetRepositoryHooks gets the repository_hooks property value. The level of permission to grant the access token to manage the post-receive hooks for a repository. +// returns a *AppPermissions_repository_hooks when successful +func (m *AppPermissions) GetRepositoryHooks()(*AppPermissions_repository_hooks) { + return m.repository_hooks +} +// GetRepositoryProjects gets the repository_projects property value. The level of permission to grant the access token to manage repository projects, columns, and cards. +// returns a *AppPermissions_repository_projects when successful +func (m *AppPermissions) GetRepositoryProjects()(*AppPermissions_repository_projects) { + return m.repository_projects +} +// GetSecrets gets the secrets property value. The level of permission to grant the access token to manage repository secrets. +// returns a *AppPermissions_secrets when successful +func (m *AppPermissions) GetSecrets()(*AppPermissions_secrets) { + return m.secrets +} +// GetSecretScanningAlerts gets the secret_scanning_alerts property value. The level of permission to grant the access token to view and manage secret scanning alerts. +// returns a *AppPermissions_secret_scanning_alerts when successful +func (m *AppPermissions) GetSecretScanningAlerts()(*AppPermissions_secret_scanning_alerts) { + return m.secret_scanning_alerts +} +// GetSecurityEvents gets the security_events property value. The level of permission to grant the access token to view and manage security events like code scanning alerts. +// returns a *AppPermissions_security_events when successful +func (m *AppPermissions) GetSecurityEvents()(*AppPermissions_security_events) { + return m.security_events +} +// GetSingleFile gets the single_file property value. The level of permission to grant the access token to manage just a single file. +// returns a *AppPermissions_single_file when successful +func (m *AppPermissions) GetSingleFile()(*AppPermissions_single_file) { + return m.single_file +} +// GetStarring gets the starring property value. The level of permission to grant the access token to list and manage repositories a user is starring. +// returns a *AppPermissions_starring when successful +func (m *AppPermissions) GetStarring()(*AppPermissions_starring) { + return m.starring +} +// GetStatuses gets the statuses property value. The level of permission to grant the access token for commit statuses. +// returns a *AppPermissions_statuses when successful +func (m *AppPermissions) GetStatuses()(*AppPermissions_statuses) { + return m.statuses +} +// GetTeamDiscussions gets the team_discussions property value. The level of permission to grant the access token to manage team discussions and related comments. +// returns a *AppPermissions_team_discussions when successful +func (m *AppPermissions) GetTeamDiscussions()(*AppPermissions_team_discussions) { + return m.team_discussions +} +// GetVulnerabilityAlerts gets the vulnerability_alerts property value. The level of permission to grant the access token to manage Dependabot alerts. +// returns a *AppPermissions_vulnerability_alerts when successful +func (m *AppPermissions) GetVulnerabilityAlerts()(*AppPermissions_vulnerability_alerts) { + return m.vulnerability_alerts +} +// GetWorkflows gets the workflows property value. The level of permission to grant the access token to update GitHub Actions workflow files. +// returns a *AppPermissions_workflows when successful +func (m *AppPermissions) GetWorkflows()(*AppPermissions_workflows) { + return m.workflows +} +// Serialize serializes information the current object +func (m *AppPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + cast := (*m.GetActions()).String() + err := writer.WriteStringValue("actions", &cast) + if err != nil { + return err + } + } + if m.GetAdministration() != nil { + cast := (*m.GetAdministration()).String() + err := writer.WriteStringValue("administration", &cast) + if err != nil { + return err + } + } + if m.GetChecks() != nil { + cast := (*m.GetChecks()).String() + err := writer.WriteStringValue("checks", &cast) + if err != nil { + return err + } + } + if m.GetCodespaces() != nil { + cast := (*m.GetCodespaces()).String() + err := writer.WriteStringValue("codespaces", &cast) + if err != nil { + return err + } + } + if m.GetContents() != nil { + cast := (*m.GetContents()).String() + err := writer.WriteStringValue("contents", &cast) + if err != nil { + return err + } + } + if m.GetDependabotSecrets() != nil { + cast := (*m.GetDependabotSecrets()).String() + err := writer.WriteStringValue("dependabot_secrets", &cast) + if err != nil { + return err + } + } + if m.GetDeployments() != nil { + cast := (*m.GetDeployments()).String() + err := writer.WriteStringValue("deployments", &cast) + if err != nil { + return err + } + } + if m.GetEmailAddresses() != nil { + cast := (*m.GetEmailAddresses()).String() + err := writer.WriteStringValue("email_addresses", &cast) + if err != nil { + return err + } + } + if m.GetEnvironments() != nil { + cast := (*m.GetEnvironments()).String() + err := writer.WriteStringValue("environments", &cast) + if err != nil { + return err + } + } + if m.GetFollowers() != nil { + cast := (*m.GetFollowers()).String() + err := writer.WriteStringValue("followers", &cast) + if err != nil { + return err + } + } + if m.GetGitSshKeys() != nil { + cast := (*m.GetGitSshKeys()).String() + err := writer.WriteStringValue("git_ssh_keys", &cast) + if err != nil { + return err + } + } + if m.GetGpgKeys() != nil { + cast := (*m.GetGpgKeys()).String() + err := writer.WriteStringValue("gpg_keys", &cast) + if err != nil { + return err + } + } + if m.GetInteractionLimits() != nil { + cast := (*m.GetInteractionLimits()).String() + err := writer.WriteStringValue("interaction_limits", &cast) + if err != nil { + return err + } + } + if m.GetIssues() != nil { + cast := (*m.GetIssues()).String() + err := writer.WriteStringValue("issues", &cast) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := (*m.GetMembers()).String() + err := writer.WriteStringValue("members", &cast) + if err != nil { + return err + } + } + if m.GetMetadata() != nil { + cast := (*m.GetMetadata()).String() + err := writer.WriteStringValue("metadata", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationAdministration() != nil { + cast := (*m.GetOrganizationAdministration()).String() + err := writer.WriteStringValue("organization_administration", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationAnnouncementBanners() != nil { + cast := (*m.GetOrganizationAnnouncementBanners()).String() + err := writer.WriteStringValue("organization_announcement_banners", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationCopilotSeatManagement() != nil { + cast := (*m.GetOrganizationCopilotSeatManagement()).String() + err := writer.WriteStringValue("organization_copilot_seat_management", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationCustomOrgRoles() != nil { + cast := (*m.GetOrganizationCustomOrgRoles()).String() + err := writer.WriteStringValue("organization_custom_org_roles", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationCustomProperties() != nil { + cast := (*m.GetOrganizationCustomProperties()).String() + err := writer.WriteStringValue("organization_custom_properties", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationCustomRoles() != nil { + cast := (*m.GetOrganizationCustomRoles()).String() + err := writer.WriteStringValue("organization_custom_roles", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationEvents() != nil { + cast := (*m.GetOrganizationEvents()).String() + err := writer.WriteStringValue("organization_events", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationHooks() != nil { + cast := (*m.GetOrganizationHooks()).String() + err := writer.WriteStringValue("organization_hooks", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationPackages() != nil { + cast := (*m.GetOrganizationPackages()).String() + err := writer.WriteStringValue("organization_packages", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationPersonalAccessTokens() != nil { + cast := (*m.GetOrganizationPersonalAccessTokens()).String() + err := writer.WriteStringValue("organization_personal_access_tokens", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationPersonalAccessTokenRequests() != nil { + cast := (*m.GetOrganizationPersonalAccessTokenRequests()).String() + err := writer.WriteStringValue("organization_personal_access_token_requests", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationPlan() != nil { + cast := (*m.GetOrganizationPlan()).String() + err := writer.WriteStringValue("organization_plan", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationProjects() != nil { + cast := (*m.GetOrganizationProjects()).String() + err := writer.WriteStringValue("organization_projects", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationSecrets() != nil { + cast := (*m.GetOrganizationSecrets()).String() + err := writer.WriteStringValue("organization_secrets", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationSelfHostedRunners() != nil { + cast := (*m.GetOrganizationSelfHostedRunners()).String() + err := writer.WriteStringValue("organization_self_hosted_runners", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationUserBlocking() != nil { + cast := (*m.GetOrganizationUserBlocking()).String() + err := writer.WriteStringValue("organization_user_blocking", &cast) + if err != nil { + return err + } + } + if m.GetPackages() != nil { + cast := (*m.GetPackages()).String() + err := writer.WriteStringValue("packages", &cast) + if err != nil { + return err + } + } + if m.GetPages() != nil { + cast := (*m.GetPages()).String() + err := writer.WriteStringValue("pages", &cast) + if err != nil { + return err + } + } + if m.GetProfile() != nil { + cast := (*m.GetProfile()).String() + err := writer.WriteStringValue("profile", &cast) + if err != nil { + return err + } + } + if m.GetPullRequests() != nil { + cast := (*m.GetPullRequests()).String() + err := writer.WriteStringValue("pull_requests", &cast) + if err != nil { + return err + } + } + if m.GetRepositoryCustomProperties() != nil { + cast := (*m.GetRepositoryCustomProperties()).String() + err := writer.WriteStringValue("repository_custom_properties", &cast) + if err != nil { + return err + } + } + if m.GetRepositoryHooks() != nil { + cast := (*m.GetRepositoryHooks()).String() + err := writer.WriteStringValue("repository_hooks", &cast) + if err != nil { + return err + } + } + if m.GetRepositoryProjects() != nil { + cast := (*m.GetRepositoryProjects()).String() + err := writer.WriteStringValue("repository_projects", &cast) + if err != nil { + return err + } + } + if m.GetSecrets() != nil { + cast := (*m.GetSecrets()).String() + err := writer.WriteStringValue("secrets", &cast) + if err != nil { + return err + } + } + if m.GetSecretScanningAlerts() != nil { + cast := (*m.GetSecretScanningAlerts()).String() + err := writer.WriteStringValue("secret_scanning_alerts", &cast) + if err != nil { + return err + } + } + if m.GetSecurityEvents() != nil { + cast := (*m.GetSecurityEvents()).String() + err := writer.WriteStringValue("security_events", &cast) + if err != nil { + return err + } + } + if m.GetSingleFile() != nil { + cast := (*m.GetSingleFile()).String() + err := writer.WriteStringValue("single_file", &cast) + if err != nil { + return err + } + } + if m.GetStarring() != nil { + cast := (*m.GetStarring()).String() + err := writer.WriteStringValue("starring", &cast) + if err != nil { + return err + } + } + if m.GetStatuses() != nil { + cast := (*m.GetStatuses()).String() + err := writer.WriteStringValue("statuses", &cast) + if err != nil { + return err + } + } + if m.GetTeamDiscussions() != nil { + cast := (*m.GetTeamDiscussions()).String() + err := writer.WriteStringValue("team_discussions", &cast) + if err != nil { + return err + } + } + if m.GetVulnerabilityAlerts() != nil { + cast := (*m.GetVulnerabilityAlerts()).String() + err := writer.WriteStringValue("vulnerability_alerts", &cast) + if err != nil { + return err + } + } + if m.GetWorkflows() != nil { + cast := (*m.GetWorkflows()).String() + err := writer.WriteStringValue("workflows", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. +func (m *AppPermissions) SetActions(value *AppPermissions_actions)() { + m.actions = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AppPermissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdministration sets the administration property value. The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. +func (m *AppPermissions) SetAdministration(value *AppPermissions_administration)() { + m.administration = value +} +// SetChecks sets the checks property value. The level of permission to grant the access token for checks on code. +func (m *AppPermissions) SetChecks(value *AppPermissions_checks)() { + m.checks = value +} +// SetCodespaces sets the codespaces property value. The level of permission to grant the access token to create, edit, delete, and list Codespaces. +func (m *AppPermissions) SetCodespaces(value *AppPermissions_codespaces)() { + m.codespaces = value +} +// SetContents sets the contents property value. The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. +func (m *AppPermissions) SetContents(value *AppPermissions_contents)() { + m.contents = value +} +// SetDependabotSecrets sets the dependabot_secrets property value. The leve of permission to grant the access token to manage Dependabot secrets. +func (m *AppPermissions) SetDependabotSecrets(value *AppPermissions_dependabot_secrets)() { + m.dependabot_secrets = value +} +// SetDeployments sets the deployments property value. The level of permission to grant the access token for deployments and deployment statuses. +func (m *AppPermissions) SetDeployments(value *AppPermissions_deployments)() { + m.deployments = value +} +// SetEmailAddresses sets the email_addresses property value. The level of permission to grant the access token to manage the email addresses belonging to a user. +func (m *AppPermissions) SetEmailAddresses(value *AppPermissions_email_addresses)() { + m.email_addresses = value +} +// SetEnvironments sets the environments property value. The level of permission to grant the access token for managing repository environments. +func (m *AppPermissions) SetEnvironments(value *AppPermissions_environments)() { + m.environments = value +} +// SetFollowers sets the followers property value. The level of permission to grant the access token to manage the followers belonging to a user. +func (m *AppPermissions) SetFollowers(value *AppPermissions_followers)() { + m.followers = value +} +// SetGitSshKeys sets the git_ssh_keys property value. The level of permission to grant the access token to manage git SSH keys. +func (m *AppPermissions) SetGitSshKeys(value *AppPermissions_git_ssh_keys)() { + m.git_ssh_keys = value +} +// SetGpgKeys sets the gpg_keys property value. The level of permission to grant the access token to view and manage GPG keys belonging to a user. +func (m *AppPermissions) SetGpgKeys(value *AppPermissions_gpg_keys)() { + m.gpg_keys = value +} +// SetInteractionLimits sets the interaction_limits property value. The level of permission to grant the access token to view and manage interaction limits on a repository. +func (m *AppPermissions) SetInteractionLimits(value *AppPermissions_interaction_limits)() { + m.interaction_limits = value +} +// SetIssues sets the issues property value. The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. +func (m *AppPermissions) SetIssues(value *AppPermissions_issues)() { + m.issues = value +} +// SetMembers sets the members property value. The level of permission to grant the access token for organization teams and members. +func (m *AppPermissions) SetMembers(value *AppPermissions_members)() { + m.members = value +} +// SetMetadata sets the metadata property value. The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. +func (m *AppPermissions) SetMetadata(value *AppPermissions_metadata)() { + m.metadata = value +} +// SetOrganizationAdministration sets the organization_administration property value. The level of permission to grant the access token to manage access to an organization. +func (m *AppPermissions) SetOrganizationAdministration(value *AppPermissions_organization_administration)() { + m.organization_administration = value +} +// SetOrganizationAnnouncementBanners sets the organization_announcement_banners property value. The level of permission to grant the access token to view and manage announcement banners for an organization. +func (m *AppPermissions) SetOrganizationAnnouncementBanners(value *AppPermissions_organization_announcement_banners)() { + m.organization_announcement_banners = value +} +// SetOrganizationCopilotSeatManagement sets the organization_copilot_seat_management property value. The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. +func (m *AppPermissions) SetOrganizationCopilotSeatManagement(value *AppPermissions_organization_copilot_seat_management)() { + m.organization_copilot_seat_management = value +} +// SetOrganizationCustomOrgRoles sets the organization_custom_org_roles property value. The level of permission to grant the access token for custom organization roles management. +func (m *AppPermissions) SetOrganizationCustomOrgRoles(value *AppPermissions_organization_custom_org_roles)() { + m.organization_custom_org_roles = value +} +// SetOrganizationCustomProperties sets the organization_custom_properties property value. The level of permission to grant the access token for custom property management. +func (m *AppPermissions) SetOrganizationCustomProperties(value *AppPermissions_organization_custom_properties)() { + m.organization_custom_properties = value +} +// SetOrganizationCustomRoles sets the organization_custom_roles property value. The level of permission to grant the access token for custom repository roles management. +func (m *AppPermissions) SetOrganizationCustomRoles(value *AppPermissions_organization_custom_roles)() { + m.organization_custom_roles = value +} +// SetOrganizationEvents sets the organization_events property value. The level of permission to grant the access token to view events triggered by an activity in an organization. +func (m *AppPermissions) SetOrganizationEvents(value *AppPermissions_organization_events)() { + m.organization_events = value +} +// SetOrganizationHooks sets the organization_hooks property value. The level of permission to grant the access token to manage the post-receive hooks for an organization. +func (m *AppPermissions) SetOrganizationHooks(value *AppPermissions_organization_hooks)() { + m.organization_hooks = value +} +// SetOrganizationPackages sets the organization_packages property value. The level of permission to grant the access token for organization packages published to GitHub Packages. +func (m *AppPermissions) SetOrganizationPackages(value *AppPermissions_organization_packages)() { + m.organization_packages = value +} +// SetOrganizationPersonalAccessTokenRequests sets the organization_personal_access_token_requests property value. The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. +func (m *AppPermissions) SetOrganizationPersonalAccessTokenRequests(value *AppPermissions_organization_personal_access_token_requests)() { + m.organization_personal_access_token_requests = value +} +// SetOrganizationPersonalAccessTokens sets the organization_personal_access_tokens property value. The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. +func (m *AppPermissions) SetOrganizationPersonalAccessTokens(value *AppPermissions_organization_personal_access_tokens)() { + m.organization_personal_access_tokens = value +} +// SetOrganizationPlan sets the organization_plan property value. The level of permission to grant the access token for viewing an organization's plan. +func (m *AppPermissions) SetOrganizationPlan(value *AppPermissions_organization_plan)() { + m.organization_plan = value +} +// SetOrganizationProjects sets the organization_projects property value. The level of permission to grant the access token to manage organization projects and projects beta (where available). +func (m *AppPermissions) SetOrganizationProjects(value *AppPermissions_organization_projects)() { + m.organization_projects = value +} +// SetOrganizationSecrets sets the organization_secrets property value. The level of permission to grant the access token to manage organization secrets. +func (m *AppPermissions) SetOrganizationSecrets(value *AppPermissions_organization_secrets)() { + m.organization_secrets = value +} +// SetOrganizationSelfHostedRunners sets the organization_self_hosted_runners property value. The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. +func (m *AppPermissions) SetOrganizationSelfHostedRunners(value *AppPermissions_organization_self_hosted_runners)() { + m.organization_self_hosted_runners = value +} +// SetOrganizationUserBlocking sets the organization_user_blocking property value. The level of permission to grant the access token to view and manage users blocked by the organization. +func (m *AppPermissions) SetOrganizationUserBlocking(value *AppPermissions_organization_user_blocking)() { + m.organization_user_blocking = value +} +// SetPackages sets the packages property value. The level of permission to grant the access token for packages published to GitHub Packages. +func (m *AppPermissions) SetPackages(value *AppPermissions_packages)() { + m.packages = value +} +// SetPages sets the pages property value. The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. +func (m *AppPermissions) SetPages(value *AppPermissions_pages)() { + m.pages = value +} +// SetProfile sets the profile property value. The level of permission to grant the access token to manage the profile settings belonging to a user. +func (m *AppPermissions) SetProfile(value *AppPermissions_profile)() { + m.profile = value +} +// SetPullRequests sets the pull_requests property value. The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. +func (m *AppPermissions) SetPullRequests(value *AppPermissions_pull_requests)() { + m.pull_requests = value +} +// SetRepositoryCustomProperties sets the repository_custom_properties property value. The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. +func (m *AppPermissions) SetRepositoryCustomProperties(value *AppPermissions_repository_custom_properties)() { + m.repository_custom_properties = value +} +// SetRepositoryHooks sets the repository_hooks property value. The level of permission to grant the access token to manage the post-receive hooks for a repository. +func (m *AppPermissions) SetRepositoryHooks(value *AppPermissions_repository_hooks)() { + m.repository_hooks = value +} +// SetRepositoryProjects sets the repository_projects property value. The level of permission to grant the access token to manage repository projects, columns, and cards. +func (m *AppPermissions) SetRepositoryProjects(value *AppPermissions_repository_projects)() { + m.repository_projects = value +} +// SetSecrets sets the secrets property value. The level of permission to grant the access token to manage repository secrets. +func (m *AppPermissions) SetSecrets(value *AppPermissions_secrets)() { + m.secrets = value +} +// SetSecretScanningAlerts sets the secret_scanning_alerts property value. The level of permission to grant the access token to view and manage secret scanning alerts. +func (m *AppPermissions) SetSecretScanningAlerts(value *AppPermissions_secret_scanning_alerts)() { + m.secret_scanning_alerts = value +} +// SetSecurityEvents sets the security_events property value. The level of permission to grant the access token to view and manage security events like code scanning alerts. +func (m *AppPermissions) SetSecurityEvents(value *AppPermissions_security_events)() { + m.security_events = value +} +// SetSingleFile sets the single_file property value. The level of permission to grant the access token to manage just a single file. +func (m *AppPermissions) SetSingleFile(value *AppPermissions_single_file)() { + m.single_file = value +} +// SetStarring sets the starring property value. The level of permission to grant the access token to list and manage repositories a user is starring. +func (m *AppPermissions) SetStarring(value *AppPermissions_starring)() { + m.starring = value +} +// SetStatuses sets the statuses property value. The level of permission to grant the access token for commit statuses. +func (m *AppPermissions) SetStatuses(value *AppPermissions_statuses)() { + m.statuses = value +} +// SetTeamDiscussions sets the team_discussions property value. The level of permission to grant the access token to manage team discussions and related comments. +func (m *AppPermissions) SetTeamDiscussions(value *AppPermissions_team_discussions)() { + m.team_discussions = value +} +// SetVulnerabilityAlerts sets the vulnerability_alerts property value. The level of permission to grant the access token to manage Dependabot alerts. +func (m *AppPermissions) SetVulnerabilityAlerts(value *AppPermissions_vulnerability_alerts)() { + m.vulnerability_alerts = value +} +// SetWorkflows sets the workflows property value. The level of permission to grant the access token to update GitHub Actions workflow files. +func (m *AppPermissions) SetWorkflows(value *AppPermissions_workflows)() { + m.workflows = value +} +type AppPermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()(*AppPermissions_actions) + GetAdministration()(*AppPermissions_administration) + GetChecks()(*AppPermissions_checks) + GetCodespaces()(*AppPermissions_codespaces) + GetContents()(*AppPermissions_contents) + GetDependabotSecrets()(*AppPermissions_dependabot_secrets) + GetDeployments()(*AppPermissions_deployments) + GetEmailAddresses()(*AppPermissions_email_addresses) + GetEnvironments()(*AppPermissions_environments) + GetFollowers()(*AppPermissions_followers) + GetGitSshKeys()(*AppPermissions_git_ssh_keys) + GetGpgKeys()(*AppPermissions_gpg_keys) + GetInteractionLimits()(*AppPermissions_interaction_limits) + GetIssues()(*AppPermissions_issues) + GetMembers()(*AppPermissions_members) + GetMetadata()(*AppPermissions_metadata) + GetOrganizationAdministration()(*AppPermissions_organization_administration) + GetOrganizationAnnouncementBanners()(*AppPermissions_organization_announcement_banners) + GetOrganizationCopilotSeatManagement()(*AppPermissions_organization_copilot_seat_management) + GetOrganizationCustomOrgRoles()(*AppPermissions_organization_custom_org_roles) + GetOrganizationCustomProperties()(*AppPermissions_organization_custom_properties) + GetOrganizationCustomRoles()(*AppPermissions_organization_custom_roles) + GetOrganizationEvents()(*AppPermissions_organization_events) + GetOrganizationHooks()(*AppPermissions_organization_hooks) + GetOrganizationPackages()(*AppPermissions_organization_packages) + GetOrganizationPersonalAccessTokenRequests()(*AppPermissions_organization_personal_access_token_requests) + GetOrganizationPersonalAccessTokens()(*AppPermissions_organization_personal_access_tokens) + GetOrganizationPlan()(*AppPermissions_organization_plan) + GetOrganizationProjects()(*AppPermissions_organization_projects) + GetOrganizationSecrets()(*AppPermissions_organization_secrets) + GetOrganizationSelfHostedRunners()(*AppPermissions_organization_self_hosted_runners) + GetOrganizationUserBlocking()(*AppPermissions_organization_user_blocking) + GetPackages()(*AppPermissions_packages) + GetPages()(*AppPermissions_pages) + GetProfile()(*AppPermissions_profile) + GetPullRequests()(*AppPermissions_pull_requests) + GetRepositoryCustomProperties()(*AppPermissions_repository_custom_properties) + GetRepositoryHooks()(*AppPermissions_repository_hooks) + GetRepositoryProjects()(*AppPermissions_repository_projects) + GetSecrets()(*AppPermissions_secrets) + GetSecretScanningAlerts()(*AppPermissions_secret_scanning_alerts) + GetSecurityEvents()(*AppPermissions_security_events) + GetSingleFile()(*AppPermissions_single_file) + GetStarring()(*AppPermissions_starring) + GetStatuses()(*AppPermissions_statuses) + GetTeamDiscussions()(*AppPermissions_team_discussions) + GetVulnerabilityAlerts()(*AppPermissions_vulnerability_alerts) + GetWorkflows()(*AppPermissions_workflows) + SetActions(value *AppPermissions_actions)() + SetAdministration(value *AppPermissions_administration)() + SetChecks(value *AppPermissions_checks)() + SetCodespaces(value *AppPermissions_codespaces)() + SetContents(value *AppPermissions_contents)() + SetDependabotSecrets(value *AppPermissions_dependabot_secrets)() + SetDeployments(value *AppPermissions_deployments)() + SetEmailAddresses(value *AppPermissions_email_addresses)() + SetEnvironments(value *AppPermissions_environments)() + SetFollowers(value *AppPermissions_followers)() + SetGitSshKeys(value *AppPermissions_git_ssh_keys)() + SetGpgKeys(value *AppPermissions_gpg_keys)() + SetInteractionLimits(value *AppPermissions_interaction_limits)() + SetIssues(value *AppPermissions_issues)() + SetMembers(value *AppPermissions_members)() + SetMetadata(value *AppPermissions_metadata)() + SetOrganizationAdministration(value *AppPermissions_organization_administration)() + SetOrganizationAnnouncementBanners(value *AppPermissions_organization_announcement_banners)() + SetOrganizationCopilotSeatManagement(value *AppPermissions_organization_copilot_seat_management)() + SetOrganizationCustomOrgRoles(value *AppPermissions_organization_custom_org_roles)() + SetOrganizationCustomProperties(value *AppPermissions_organization_custom_properties)() + SetOrganizationCustomRoles(value *AppPermissions_organization_custom_roles)() + SetOrganizationEvents(value *AppPermissions_organization_events)() + SetOrganizationHooks(value *AppPermissions_organization_hooks)() + SetOrganizationPackages(value *AppPermissions_organization_packages)() + SetOrganizationPersonalAccessTokenRequests(value *AppPermissions_organization_personal_access_token_requests)() + SetOrganizationPersonalAccessTokens(value *AppPermissions_organization_personal_access_tokens)() + SetOrganizationPlan(value *AppPermissions_organization_plan)() + SetOrganizationProjects(value *AppPermissions_organization_projects)() + SetOrganizationSecrets(value *AppPermissions_organization_secrets)() + SetOrganizationSelfHostedRunners(value *AppPermissions_organization_self_hosted_runners)() + SetOrganizationUserBlocking(value *AppPermissions_organization_user_blocking)() + SetPackages(value *AppPermissions_packages)() + SetPages(value *AppPermissions_pages)() + SetProfile(value *AppPermissions_profile)() + SetPullRequests(value *AppPermissions_pull_requests)() + SetRepositoryCustomProperties(value *AppPermissions_repository_custom_properties)() + SetRepositoryHooks(value *AppPermissions_repository_hooks)() + SetRepositoryProjects(value *AppPermissions_repository_projects)() + SetSecrets(value *AppPermissions_secrets)() + SetSecretScanningAlerts(value *AppPermissions_secret_scanning_alerts)() + SetSecurityEvents(value *AppPermissions_security_events)() + SetSingleFile(value *AppPermissions_single_file)() + SetStarring(value *AppPermissions_starring)() + SetStatuses(value *AppPermissions_statuses)() + SetTeamDiscussions(value *AppPermissions_team_discussions)() + SetVulnerabilityAlerts(value *AppPermissions_vulnerability_alerts)() + SetWorkflows(value *AppPermissions_workflows)() +} diff --git a/pkg/github/models/app_permissions_actions.go b/pkg/github/models/app_permissions_actions.go new file mode 100644 index 0000000..937956a --- /dev/null +++ b/pkg/github/models/app_permissions_actions.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. +type AppPermissions_actions int + +const ( + READ_APPPERMISSIONS_ACTIONS AppPermissions_actions = iota + WRITE_APPPERMISSIONS_ACTIONS +) + +func (i AppPermissions_actions) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_actions(v string) (any, error) { + result := READ_APPPERMISSIONS_ACTIONS + switch v { + case "read": + result = READ_APPPERMISSIONS_ACTIONS + case "write": + result = WRITE_APPPERMISSIONS_ACTIONS + default: + return 0, errors.New("Unknown AppPermissions_actions value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_actions(values []AppPermissions_actions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_actions) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_administration.go b/pkg/github/models/app_permissions_administration.go new file mode 100644 index 0000000..60f54d0 --- /dev/null +++ b/pkg/github/models/app_permissions_administration.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. +type AppPermissions_administration int + +const ( + READ_APPPERMISSIONS_ADMINISTRATION AppPermissions_administration = iota + WRITE_APPPERMISSIONS_ADMINISTRATION +) + +func (i AppPermissions_administration) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_administration(v string) (any, error) { + result := READ_APPPERMISSIONS_ADMINISTRATION + switch v { + case "read": + result = READ_APPPERMISSIONS_ADMINISTRATION + case "write": + result = WRITE_APPPERMISSIONS_ADMINISTRATION + default: + return 0, errors.New("Unknown AppPermissions_administration value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_administration(values []AppPermissions_administration) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_administration) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_checks.go b/pkg/github/models/app_permissions_checks.go new file mode 100644 index 0000000..f22fcf5 --- /dev/null +++ b/pkg/github/models/app_permissions_checks.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for checks on code. +type AppPermissions_checks int + +const ( + READ_APPPERMISSIONS_CHECKS AppPermissions_checks = iota + WRITE_APPPERMISSIONS_CHECKS +) + +func (i AppPermissions_checks) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_checks(v string) (any, error) { + result := READ_APPPERMISSIONS_CHECKS + switch v { + case "read": + result = READ_APPPERMISSIONS_CHECKS + case "write": + result = WRITE_APPPERMISSIONS_CHECKS + default: + return 0, errors.New("Unknown AppPermissions_checks value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_checks(values []AppPermissions_checks) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_checks) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_codespaces.go b/pkg/github/models/app_permissions_codespaces.go new file mode 100644 index 0000000..1d49364 --- /dev/null +++ b/pkg/github/models/app_permissions_codespaces.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to create, edit, delete, and list Codespaces. +type AppPermissions_codespaces int + +const ( + READ_APPPERMISSIONS_CODESPACES AppPermissions_codespaces = iota + WRITE_APPPERMISSIONS_CODESPACES +) + +func (i AppPermissions_codespaces) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_codespaces(v string) (any, error) { + result := READ_APPPERMISSIONS_CODESPACES + switch v { + case "read": + result = READ_APPPERMISSIONS_CODESPACES + case "write": + result = WRITE_APPPERMISSIONS_CODESPACES + default: + return 0, errors.New("Unknown AppPermissions_codespaces value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_codespaces(values []AppPermissions_codespaces) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_codespaces) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_contents.go b/pkg/github/models/app_permissions_contents.go new file mode 100644 index 0000000..b3eaf8c --- /dev/null +++ b/pkg/github/models/app_permissions_contents.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. +type AppPermissions_contents int + +const ( + READ_APPPERMISSIONS_CONTENTS AppPermissions_contents = iota + WRITE_APPPERMISSIONS_CONTENTS +) + +func (i AppPermissions_contents) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_contents(v string) (any, error) { + result := READ_APPPERMISSIONS_CONTENTS + switch v { + case "read": + result = READ_APPPERMISSIONS_CONTENTS + case "write": + result = WRITE_APPPERMISSIONS_CONTENTS + default: + return 0, errors.New("Unknown AppPermissions_contents value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_contents(values []AppPermissions_contents) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_contents) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_dependabot_secrets.go b/pkg/github/models/app_permissions_dependabot_secrets.go new file mode 100644 index 0000000..cfbcaa3 --- /dev/null +++ b/pkg/github/models/app_permissions_dependabot_secrets.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The leve of permission to grant the access token to manage Dependabot secrets. +type AppPermissions_dependabot_secrets int + +const ( + READ_APPPERMISSIONS_DEPENDABOT_SECRETS AppPermissions_dependabot_secrets = iota + WRITE_APPPERMISSIONS_DEPENDABOT_SECRETS +) + +func (i AppPermissions_dependabot_secrets) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_dependabot_secrets(v string) (any, error) { + result := READ_APPPERMISSIONS_DEPENDABOT_SECRETS + switch v { + case "read": + result = READ_APPPERMISSIONS_DEPENDABOT_SECRETS + case "write": + result = WRITE_APPPERMISSIONS_DEPENDABOT_SECRETS + default: + return 0, errors.New("Unknown AppPermissions_dependabot_secrets value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_dependabot_secrets(values []AppPermissions_dependabot_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_dependabot_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_deployments.go b/pkg/github/models/app_permissions_deployments.go new file mode 100644 index 0000000..cff72b3 --- /dev/null +++ b/pkg/github/models/app_permissions_deployments.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for deployments and deployment statuses. +type AppPermissions_deployments int + +const ( + READ_APPPERMISSIONS_DEPLOYMENTS AppPermissions_deployments = iota + WRITE_APPPERMISSIONS_DEPLOYMENTS +) + +func (i AppPermissions_deployments) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_deployments(v string) (any, error) { + result := READ_APPPERMISSIONS_DEPLOYMENTS + switch v { + case "read": + result = READ_APPPERMISSIONS_DEPLOYMENTS + case "write": + result = WRITE_APPPERMISSIONS_DEPLOYMENTS + default: + return 0, errors.New("Unknown AppPermissions_deployments value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_deployments(values []AppPermissions_deployments) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_deployments) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_email_addresses.go b/pkg/github/models/app_permissions_email_addresses.go new file mode 100644 index 0000000..766f286 --- /dev/null +++ b/pkg/github/models/app_permissions_email_addresses.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage the email addresses belonging to a user. +type AppPermissions_email_addresses int + +const ( + READ_APPPERMISSIONS_EMAIL_ADDRESSES AppPermissions_email_addresses = iota + WRITE_APPPERMISSIONS_EMAIL_ADDRESSES +) + +func (i AppPermissions_email_addresses) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_email_addresses(v string) (any, error) { + result := READ_APPPERMISSIONS_EMAIL_ADDRESSES + switch v { + case "read": + result = READ_APPPERMISSIONS_EMAIL_ADDRESSES + case "write": + result = WRITE_APPPERMISSIONS_EMAIL_ADDRESSES + default: + return 0, errors.New("Unknown AppPermissions_email_addresses value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_email_addresses(values []AppPermissions_email_addresses) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_email_addresses) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_environments.go b/pkg/github/models/app_permissions_environments.go new file mode 100644 index 0000000..86e3eb5 --- /dev/null +++ b/pkg/github/models/app_permissions_environments.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for managing repository environments. +type AppPermissions_environments int + +const ( + READ_APPPERMISSIONS_ENVIRONMENTS AppPermissions_environments = iota + WRITE_APPPERMISSIONS_ENVIRONMENTS +) + +func (i AppPermissions_environments) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_environments(v string) (any, error) { + result := READ_APPPERMISSIONS_ENVIRONMENTS + switch v { + case "read": + result = READ_APPPERMISSIONS_ENVIRONMENTS + case "write": + result = WRITE_APPPERMISSIONS_ENVIRONMENTS + default: + return 0, errors.New("Unknown AppPermissions_environments value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_environments(values []AppPermissions_environments) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_environments) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_followers.go b/pkg/github/models/app_permissions_followers.go new file mode 100644 index 0000000..9f86fb7 --- /dev/null +++ b/pkg/github/models/app_permissions_followers.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage the followers belonging to a user. +type AppPermissions_followers int + +const ( + READ_APPPERMISSIONS_FOLLOWERS AppPermissions_followers = iota + WRITE_APPPERMISSIONS_FOLLOWERS +) + +func (i AppPermissions_followers) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_followers(v string) (any, error) { + result := READ_APPPERMISSIONS_FOLLOWERS + switch v { + case "read": + result = READ_APPPERMISSIONS_FOLLOWERS + case "write": + result = WRITE_APPPERMISSIONS_FOLLOWERS + default: + return 0, errors.New("Unknown AppPermissions_followers value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_followers(values []AppPermissions_followers) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_followers) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_git_ssh_keys.go b/pkg/github/models/app_permissions_git_ssh_keys.go new file mode 100644 index 0000000..05993d2 --- /dev/null +++ b/pkg/github/models/app_permissions_git_ssh_keys.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage git SSH keys. +type AppPermissions_git_ssh_keys int + +const ( + READ_APPPERMISSIONS_GIT_SSH_KEYS AppPermissions_git_ssh_keys = iota + WRITE_APPPERMISSIONS_GIT_SSH_KEYS +) + +func (i AppPermissions_git_ssh_keys) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_git_ssh_keys(v string) (any, error) { + result := READ_APPPERMISSIONS_GIT_SSH_KEYS + switch v { + case "read": + result = READ_APPPERMISSIONS_GIT_SSH_KEYS + case "write": + result = WRITE_APPPERMISSIONS_GIT_SSH_KEYS + default: + return 0, errors.New("Unknown AppPermissions_git_ssh_keys value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_git_ssh_keys(values []AppPermissions_git_ssh_keys) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_git_ssh_keys) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_gpg_keys.go b/pkg/github/models/app_permissions_gpg_keys.go new file mode 100644 index 0000000..8da34fc --- /dev/null +++ b/pkg/github/models/app_permissions_gpg_keys.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage GPG keys belonging to a user. +type AppPermissions_gpg_keys int + +const ( + READ_APPPERMISSIONS_GPG_KEYS AppPermissions_gpg_keys = iota + WRITE_APPPERMISSIONS_GPG_KEYS +) + +func (i AppPermissions_gpg_keys) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_gpg_keys(v string) (any, error) { + result := READ_APPPERMISSIONS_GPG_KEYS + switch v { + case "read": + result = READ_APPPERMISSIONS_GPG_KEYS + case "write": + result = WRITE_APPPERMISSIONS_GPG_KEYS + default: + return 0, errors.New("Unknown AppPermissions_gpg_keys value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_gpg_keys(values []AppPermissions_gpg_keys) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_gpg_keys) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_interaction_limits.go b/pkg/github/models/app_permissions_interaction_limits.go new file mode 100644 index 0000000..e167e1e --- /dev/null +++ b/pkg/github/models/app_permissions_interaction_limits.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage interaction limits on a repository. +type AppPermissions_interaction_limits int + +const ( + READ_APPPERMISSIONS_INTERACTION_LIMITS AppPermissions_interaction_limits = iota + WRITE_APPPERMISSIONS_INTERACTION_LIMITS +) + +func (i AppPermissions_interaction_limits) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_interaction_limits(v string) (any, error) { + result := READ_APPPERMISSIONS_INTERACTION_LIMITS + switch v { + case "read": + result = READ_APPPERMISSIONS_INTERACTION_LIMITS + case "write": + result = WRITE_APPPERMISSIONS_INTERACTION_LIMITS + default: + return 0, errors.New("Unknown AppPermissions_interaction_limits value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_interaction_limits(values []AppPermissions_interaction_limits) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_interaction_limits) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_issues.go b/pkg/github/models/app_permissions_issues.go new file mode 100644 index 0000000..1eacc87 --- /dev/null +++ b/pkg/github/models/app_permissions_issues.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. +type AppPermissions_issues int + +const ( + READ_APPPERMISSIONS_ISSUES AppPermissions_issues = iota + WRITE_APPPERMISSIONS_ISSUES +) + +func (i AppPermissions_issues) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_issues(v string) (any, error) { + result := READ_APPPERMISSIONS_ISSUES + switch v { + case "read": + result = READ_APPPERMISSIONS_ISSUES + case "write": + result = WRITE_APPPERMISSIONS_ISSUES + default: + return 0, errors.New("Unknown AppPermissions_issues value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_issues(values []AppPermissions_issues) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_issues) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_members.go b/pkg/github/models/app_permissions_members.go new file mode 100644 index 0000000..28b5920 --- /dev/null +++ b/pkg/github/models/app_permissions_members.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for organization teams and members. +type AppPermissions_members int + +const ( + READ_APPPERMISSIONS_MEMBERS AppPermissions_members = iota + WRITE_APPPERMISSIONS_MEMBERS +) + +func (i AppPermissions_members) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_members(v string) (any, error) { + result := READ_APPPERMISSIONS_MEMBERS + switch v { + case "read": + result = READ_APPPERMISSIONS_MEMBERS + case "write": + result = WRITE_APPPERMISSIONS_MEMBERS + default: + return 0, errors.New("Unknown AppPermissions_members value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_members(values []AppPermissions_members) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_members) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_metadata.go b/pkg/github/models/app_permissions_metadata.go new file mode 100644 index 0000000..7d7fd3e --- /dev/null +++ b/pkg/github/models/app_permissions_metadata.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. +type AppPermissions_metadata int + +const ( + READ_APPPERMISSIONS_METADATA AppPermissions_metadata = iota + WRITE_APPPERMISSIONS_METADATA +) + +func (i AppPermissions_metadata) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_metadata(v string) (any, error) { + result := READ_APPPERMISSIONS_METADATA + switch v { + case "read": + result = READ_APPPERMISSIONS_METADATA + case "write": + result = WRITE_APPPERMISSIONS_METADATA + default: + return 0, errors.New("Unknown AppPermissions_metadata value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_metadata(values []AppPermissions_metadata) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_metadata) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_administration.go b/pkg/github/models/app_permissions_organization_administration.go new file mode 100644 index 0000000..6adff85 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_administration.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage access to an organization. +type AppPermissions_organization_administration int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_ADMINISTRATION AppPermissions_organization_administration = iota + WRITE_APPPERMISSIONS_ORGANIZATION_ADMINISTRATION +) + +func (i AppPermissions_organization_administration) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_administration(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_ADMINISTRATION + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_ADMINISTRATION + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_ADMINISTRATION + default: + return 0, errors.New("Unknown AppPermissions_organization_administration value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_administration(values []AppPermissions_organization_administration) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_administration) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_announcement_banners.go b/pkg/github/models/app_permissions_organization_announcement_banners.go new file mode 100644 index 0000000..087b38d --- /dev/null +++ b/pkg/github/models/app_permissions_organization_announcement_banners.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage announcement banners for an organization. +type AppPermissions_organization_announcement_banners int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_ANNOUNCEMENT_BANNERS AppPermissions_organization_announcement_banners = iota + WRITE_APPPERMISSIONS_ORGANIZATION_ANNOUNCEMENT_BANNERS +) + +func (i AppPermissions_organization_announcement_banners) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_announcement_banners(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_ANNOUNCEMENT_BANNERS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_ANNOUNCEMENT_BANNERS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_ANNOUNCEMENT_BANNERS + default: + return 0, errors.New("Unknown AppPermissions_organization_announcement_banners value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_announcement_banners(values []AppPermissions_organization_announcement_banners) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_announcement_banners) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_copilot_seat_management.go b/pkg/github/models/app_permissions_organization_copilot_seat_management.go new file mode 100644 index 0000000..acc122b --- /dev/null +++ b/pkg/github/models/app_permissions_organization_copilot_seat_management.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. +type AppPermissions_organization_copilot_seat_management int + +const ( + WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT AppPermissions_organization_copilot_seat_management = iota +) + +func (i AppPermissions_organization_copilot_seat_management) String() string { + return []string{"write"}[i] +} +func ParseAppPermissions_organization_copilot_seat_management(v string) (any, error) { + result := WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT + switch v { + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT + default: + return 0, errors.New("Unknown AppPermissions_organization_copilot_seat_management value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_copilot_seat_management(values []AppPermissions_organization_copilot_seat_management) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_copilot_seat_management) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_custom_org_roles.go b/pkg/github/models/app_permissions_organization_custom_org_roles.go new file mode 100644 index 0000000..146db92 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_custom_org_roles.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for custom organization roles management. +type AppPermissions_organization_custom_org_roles int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES AppPermissions_organization_custom_org_roles = iota + WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES +) + +func (i AppPermissions_organization_custom_org_roles) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_custom_org_roles(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES + default: + return 0, errors.New("Unknown AppPermissions_organization_custom_org_roles value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_custom_org_roles(values []AppPermissions_organization_custom_org_roles) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_custom_org_roles) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_custom_properties.go b/pkg/github/models/app_permissions_organization_custom_properties.go new file mode 100644 index 0000000..57840ae --- /dev/null +++ b/pkg/github/models/app_permissions_organization_custom_properties.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for custom property management. +type AppPermissions_organization_custom_properties int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES AppPermissions_organization_custom_properties = iota + WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES + ADMIN_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES +) + +func (i AppPermissions_organization_custom_properties) String() string { + return []string{"read", "write", "admin"}[i] +} +func ParseAppPermissions_organization_custom_properties(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES + case "admin": + result = ADMIN_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES + default: + return 0, errors.New("Unknown AppPermissions_organization_custom_properties value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_custom_properties(values []AppPermissions_organization_custom_properties) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_custom_properties) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_custom_roles.go b/pkg/github/models/app_permissions_organization_custom_roles.go new file mode 100644 index 0000000..3f12193 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_custom_roles.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for custom repository roles management. +type AppPermissions_organization_custom_roles int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ROLES AppPermissions_organization_custom_roles = iota + WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ROLES +) + +func (i AppPermissions_organization_custom_roles) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_custom_roles(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ROLES + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ROLES + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ROLES + default: + return 0, errors.New("Unknown AppPermissions_organization_custom_roles value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_custom_roles(values []AppPermissions_organization_custom_roles) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_custom_roles) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_events.go b/pkg/github/models/app_permissions_organization_events.go new file mode 100644 index 0000000..995b1b5 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_events.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view events triggered by an activity in an organization. +type AppPermissions_organization_events int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_EVENTS AppPermissions_organization_events = iota +) + +func (i AppPermissions_organization_events) String() string { + return []string{"read"}[i] +} +func ParseAppPermissions_organization_events(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_EVENTS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_EVENTS + default: + return 0, errors.New("Unknown AppPermissions_organization_events value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_events(values []AppPermissions_organization_events) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_events) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_hooks.go b/pkg/github/models/app_permissions_organization_hooks.go new file mode 100644 index 0000000..64c4c97 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_hooks.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage the post-receive hooks for an organization. +type AppPermissions_organization_hooks int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_HOOKS AppPermissions_organization_hooks = iota + WRITE_APPPERMISSIONS_ORGANIZATION_HOOKS +) + +func (i AppPermissions_organization_hooks) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_hooks(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_HOOKS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_HOOKS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_HOOKS + default: + return 0, errors.New("Unknown AppPermissions_organization_hooks value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_hooks(values []AppPermissions_organization_hooks) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_hooks) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_packages.go b/pkg/github/models/app_permissions_organization_packages.go new file mode 100644 index 0000000..34dc2e4 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_packages.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for organization packages published to GitHub Packages. +type AppPermissions_organization_packages int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_PACKAGES AppPermissions_organization_packages = iota + WRITE_APPPERMISSIONS_ORGANIZATION_PACKAGES +) + +func (i AppPermissions_organization_packages) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_packages(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_PACKAGES + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_PACKAGES + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_PACKAGES + default: + return 0, errors.New("Unknown AppPermissions_organization_packages value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_packages(values []AppPermissions_organization_packages) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_packages) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_personal_access_token_requests.go b/pkg/github/models/app_permissions_organization_personal_access_token_requests.go new file mode 100644 index 0000000..3ff20f6 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_personal_access_token_requests.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. +type AppPermissions_organization_personal_access_token_requests int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKEN_REQUESTS AppPermissions_organization_personal_access_token_requests = iota + WRITE_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKEN_REQUESTS +) + +func (i AppPermissions_organization_personal_access_token_requests) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_personal_access_token_requests(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKEN_REQUESTS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKEN_REQUESTS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKEN_REQUESTS + default: + return 0, errors.New("Unknown AppPermissions_organization_personal_access_token_requests value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_personal_access_token_requests(values []AppPermissions_organization_personal_access_token_requests) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_personal_access_token_requests) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_personal_access_tokens.go b/pkg/github/models/app_permissions_organization_personal_access_tokens.go new file mode 100644 index 0000000..499db17 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_personal_access_tokens.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. +type AppPermissions_organization_personal_access_tokens int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKENS AppPermissions_organization_personal_access_tokens = iota + WRITE_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKENS +) + +func (i AppPermissions_organization_personal_access_tokens) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_personal_access_tokens(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKENS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKENS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKENS + default: + return 0, errors.New("Unknown AppPermissions_organization_personal_access_tokens value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_personal_access_tokens(values []AppPermissions_organization_personal_access_tokens) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_personal_access_tokens) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_plan.go b/pkg/github/models/app_permissions_organization_plan.go new file mode 100644 index 0000000..ec5ae09 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_plan.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for viewing an organization's plan. +type AppPermissions_organization_plan int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_PLAN AppPermissions_organization_plan = iota +) + +func (i AppPermissions_organization_plan) String() string { + return []string{"read"}[i] +} +func ParseAppPermissions_organization_plan(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_PLAN + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_PLAN + default: + return 0, errors.New("Unknown AppPermissions_organization_plan value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_plan(values []AppPermissions_organization_plan) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_plan) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_projects.go b/pkg/github/models/app_permissions_organization_projects.go new file mode 100644 index 0000000..580043a --- /dev/null +++ b/pkg/github/models/app_permissions_organization_projects.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage organization projects and projects beta (where available). +type AppPermissions_organization_projects int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_PROJECTS AppPermissions_organization_projects = iota + WRITE_APPPERMISSIONS_ORGANIZATION_PROJECTS + ADMIN_APPPERMISSIONS_ORGANIZATION_PROJECTS +) + +func (i AppPermissions_organization_projects) String() string { + return []string{"read", "write", "admin"}[i] +} +func ParseAppPermissions_organization_projects(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_PROJECTS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_PROJECTS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_PROJECTS + case "admin": + result = ADMIN_APPPERMISSIONS_ORGANIZATION_PROJECTS + default: + return 0, errors.New("Unknown AppPermissions_organization_projects value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_projects(values []AppPermissions_organization_projects) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_projects) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_secrets.go b/pkg/github/models/app_permissions_organization_secrets.go new file mode 100644 index 0000000..ee4c386 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_secrets.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage organization secrets. +type AppPermissions_organization_secrets int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_SECRETS AppPermissions_organization_secrets = iota + WRITE_APPPERMISSIONS_ORGANIZATION_SECRETS +) + +func (i AppPermissions_organization_secrets) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_secrets(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_SECRETS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_SECRETS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_SECRETS + default: + return 0, errors.New("Unknown AppPermissions_organization_secrets value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_secrets(values []AppPermissions_organization_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_self_hosted_runners.go b/pkg/github/models/app_permissions_organization_self_hosted_runners.go new file mode 100644 index 0000000..842862c --- /dev/null +++ b/pkg/github/models/app_permissions_organization_self_hosted_runners.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. +type AppPermissions_organization_self_hosted_runners int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_SELF_HOSTED_RUNNERS AppPermissions_organization_self_hosted_runners = iota + WRITE_APPPERMISSIONS_ORGANIZATION_SELF_HOSTED_RUNNERS +) + +func (i AppPermissions_organization_self_hosted_runners) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_self_hosted_runners(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_SELF_HOSTED_RUNNERS + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_SELF_HOSTED_RUNNERS + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_SELF_HOSTED_RUNNERS + default: + return 0, errors.New("Unknown AppPermissions_organization_self_hosted_runners value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_self_hosted_runners(values []AppPermissions_organization_self_hosted_runners) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_self_hosted_runners) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_organization_user_blocking.go b/pkg/github/models/app_permissions_organization_user_blocking.go new file mode 100644 index 0000000..9e2c415 --- /dev/null +++ b/pkg/github/models/app_permissions_organization_user_blocking.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage users blocked by the organization. +type AppPermissions_organization_user_blocking int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_USER_BLOCKING AppPermissions_organization_user_blocking = iota + WRITE_APPPERMISSIONS_ORGANIZATION_USER_BLOCKING +) + +func (i AppPermissions_organization_user_blocking) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_user_blocking(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_USER_BLOCKING + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_USER_BLOCKING + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_USER_BLOCKING + default: + return 0, errors.New("Unknown AppPermissions_organization_user_blocking value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_user_blocking(values []AppPermissions_organization_user_blocking) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_user_blocking) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_packages.go b/pkg/github/models/app_permissions_packages.go new file mode 100644 index 0000000..fd69903 --- /dev/null +++ b/pkg/github/models/app_permissions_packages.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for packages published to GitHub Packages. +type AppPermissions_packages int + +const ( + READ_APPPERMISSIONS_PACKAGES AppPermissions_packages = iota + WRITE_APPPERMISSIONS_PACKAGES +) + +func (i AppPermissions_packages) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_packages(v string) (any, error) { + result := READ_APPPERMISSIONS_PACKAGES + switch v { + case "read": + result = READ_APPPERMISSIONS_PACKAGES + case "write": + result = WRITE_APPPERMISSIONS_PACKAGES + default: + return 0, errors.New("Unknown AppPermissions_packages value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_packages(values []AppPermissions_packages) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_packages) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_pages.go b/pkg/github/models/app_permissions_pages.go new file mode 100644 index 0000000..ac6289f --- /dev/null +++ b/pkg/github/models/app_permissions_pages.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. +type AppPermissions_pages int + +const ( + READ_APPPERMISSIONS_PAGES AppPermissions_pages = iota + WRITE_APPPERMISSIONS_PAGES +) + +func (i AppPermissions_pages) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_pages(v string) (any, error) { + result := READ_APPPERMISSIONS_PAGES + switch v { + case "read": + result = READ_APPPERMISSIONS_PAGES + case "write": + result = WRITE_APPPERMISSIONS_PAGES + default: + return 0, errors.New("Unknown AppPermissions_pages value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_pages(values []AppPermissions_pages) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_pages) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_profile.go b/pkg/github/models/app_permissions_profile.go new file mode 100644 index 0000000..6196c19 --- /dev/null +++ b/pkg/github/models/app_permissions_profile.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage the profile settings belonging to a user. +type AppPermissions_profile int + +const ( + WRITE_APPPERMISSIONS_PROFILE AppPermissions_profile = iota +) + +func (i AppPermissions_profile) String() string { + return []string{"write"}[i] +} +func ParseAppPermissions_profile(v string) (any, error) { + result := WRITE_APPPERMISSIONS_PROFILE + switch v { + case "write": + result = WRITE_APPPERMISSIONS_PROFILE + default: + return 0, errors.New("Unknown AppPermissions_profile value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_profile(values []AppPermissions_profile) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_profile) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_pull_requests.go b/pkg/github/models/app_permissions_pull_requests.go new file mode 100644 index 0000000..b9530f2 --- /dev/null +++ b/pkg/github/models/app_permissions_pull_requests.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. +type AppPermissions_pull_requests int + +const ( + READ_APPPERMISSIONS_PULL_REQUESTS AppPermissions_pull_requests = iota + WRITE_APPPERMISSIONS_PULL_REQUESTS +) + +func (i AppPermissions_pull_requests) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_pull_requests(v string) (any, error) { + result := READ_APPPERMISSIONS_PULL_REQUESTS + switch v { + case "read": + result = READ_APPPERMISSIONS_PULL_REQUESTS + case "write": + result = WRITE_APPPERMISSIONS_PULL_REQUESTS + default: + return 0, errors.New("Unknown AppPermissions_pull_requests value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_pull_requests(values []AppPermissions_pull_requests) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_pull_requests) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_repository_custom_properties.go b/pkg/github/models/app_permissions_repository_custom_properties.go new file mode 100644 index 0000000..9f408af --- /dev/null +++ b/pkg/github/models/app_permissions_repository_custom_properties.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. +type AppPermissions_repository_custom_properties int + +const ( + READ_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES AppPermissions_repository_custom_properties = iota + WRITE_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES +) + +func (i AppPermissions_repository_custom_properties) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_repository_custom_properties(v string) (any, error) { + result := READ_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES + switch v { + case "read": + result = READ_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES + case "write": + result = WRITE_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES + default: + return 0, errors.New("Unknown AppPermissions_repository_custom_properties value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_repository_custom_properties(values []AppPermissions_repository_custom_properties) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_repository_custom_properties) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_repository_hooks.go b/pkg/github/models/app_permissions_repository_hooks.go new file mode 100644 index 0000000..f7b5027 --- /dev/null +++ b/pkg/github/models/app_permissions_repository_hooks.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage the post-receive hooks for a repository. +type AppPermissions_repository_hooks int + +const ( + READ_APPPERMISSIONS_REPOSITORY_HOOKS AppPermissions_repository_hooks = iota + WRITE_APPPERMISSIONS_REPOSITORY_HOOKS +) + +func (i AppPermissions_repository_hooks) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_repository_hooks(v string) (any, error) { + result := READ_APPPERMISSIONS_REPOSITORY_HOOKS + switch v { + case "read": + result = READ_APPPERMISSIONS_REPOSITORY_HOOKS + case "write": + result = WRITE_APPPERMISSIONS_REPOSITORY_HOOKS + default: + return 0, errors.New("Unknown AppPermissions_repository_hooks value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_repository_hooks(values []AppPermissions_repository_hooks) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_repository_hooks) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_repository_projects.go b/pkg/github/models/app_permissions_repository_projects.go new file mode 100644 index 0000000..0de65e0 --- /dev/null +++ b/pkg/github/models/app_permissions_repository_projects.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage repository projects, columns, and cards. +type AppPermissions_repository_projects int + +const ( + READ_APPPERMISSIONS_REPOSITORY_PROJECTS AppPermissions_repository_projects = iota + WRITE_APPPERMISSIONS_REPOSITORY_PROJECTS + ADMIN_APPPERMISSIONS_REPOSITORY_PROJECTS +) + +func (i AppPermissions_repository_projects) String() string { + return []string{"read", "write", "admin"}[i] +} +func ParseAppPermissions_repository_projects(v string) (any, error) { + result := READ_APPPERMISSIONS_REPOSITORY_PROJECTS + switch v { + case "read": + result = READ_APPPERMISSIONS_REPOSITORY_PROJECTS + case "write": + result = WRITE_APPPERMISSIONS_REPOSITORY_PROJECTS + case "admin": + result = ADMIN_APPPERMISSIONS_REPOSITORY_PROJECTS + default: + return 0, errors.New("Unknown AppPermissions_repository_projects value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_repository_projects(values []AppPermissions_repository_projects) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_repository_projects) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_secret_scanning_alerts.go b/pkg/github/models/app_permissions_secret_scanning_alerts.go new file mode 100644 index 0000000..b31cfce --- /dev/null +++ b/pkg/github/models/app_permissions_secret_scanning_alerts.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage secret scanning alerts. +type AppPermissions_secret_scanning_alerts int + +const ( + READ_APPPERMISSIONS_SECRET_SCANNING_ALERTS AppPermissions_secret_scanning_alerts = iota + WRITE_APPPERMISSIONS_SECRET_SCANNING_ALERTS +) + +func (i AppPermissions_secret_scanning_alerts) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_secret_scanning_alerts(v string) (any, error) { + result := READ_APPPERMISSIONS_SECRET_SCANNING_ALERTS + switch v { + case "read": + result = READ_APPPERMISSIONS_SECRET_SCANNING_ALERTS + case "write": + result = WRITE_APPPERMISSIONS_SECRET_SCANNING_ALERTS + default: + return 0, errors.New("Unknown AppPermissions_secret_scanning_alerts value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_secret_scanning_alerts(values []AppPermissions_secret_scanning_alerts) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_secret_scanning_alerts) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_secrets.go b/pkg/github/models/app_permissions_secrets.go new file mode 100644 index 0000000..69e423c --- /dev/null +++ b/pkg/github/models/app_permissions_secrets.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage repository secrets. +type AppPermissions_secrets int + +const ( + READ_APPPERMISSIONS_SECRETS AppPermissions_secrets = iota + WRITE_APPPERMISSIONS_SECRETS +) + +func (i AppPermissions_secrets) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_secrets(v string) (any, error) { + result := READ_APPPERMISSIONS_SECRETS + switch v { + case "read": + result = READ_APPPERMISSIONS_SECRETS + case "write": + result = WRITE_APPPERMISSIONS_SECRETS + default: + return 0, errors.New("Unknown AppPermissions_secrets value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_secrets(values []AppPermissions_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_security_events.go b/pkg/github/models/app_permissions_security_events.go new file mode 100644 index 0000000..2ec318f --- /dev/null +++ b/pkg/github/models/app_permissions_security_events.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and manage security events like code scanning alerts. +type AppPermissions_security_events int + +const ( + READ_APPPERMISSIONS_SECURITY_EVENTS AppPermissions_security_events = iota + WRITE_APPPERMISSIONS_SECURITY_EVENTS +) + +func (i AppPermissions_security_events) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_security_events(v string) (any, error) { + result := READ_APPPERMISSIONS_SECURITY_EVENTS + switch v { + case "read": + result = READ_APPPERMISSIONS_SECURITY_EVENTS + case "write": + result = WRITE_APPPERMISSIONS_SECURITY_EVENTS + default: + return 0, errors.New("Unknown AppPermissions_security_events value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_security_events(values []AppPermissions_security_events) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_security_events) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_single_file.go b/pkg/github/models/app_permissions_single_file.go new file mode 100644 index 0000000..c8abbe3 --- /dev/null +++ b/pkg/github/models/app_permissions_single_file.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage just a single file. +type AppPermissions_single_file int + +const ( + READ_APPPERMISSIONS_SINGLE_FILE AppPermissions_single_file = iota + WRITE_APPPERMISSIONS_SINGLE_FILE +) + +func (i AppPermissions_single_file) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_single_file(v string) (any, error) { + result := READ_APPPERMISSIONS_SINGLE_FILE + switch v { + case "read": + result = READ_APPPERMISSIONS_SINGLE_FILE + case "write": + result = WRITE_APPPERMISSIONS_SINGLE_FILE + default: + return 0, errors.New("Unknown AppPermissions_single_file value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_single_file(values []AppPermissions_single_file) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_single_file) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_starring.go b/pkg/github/models/app_permissions_starring.go new file mode 100644 index 0000000..e5b4320 --- /dev/null +++ b/pkg/github/models/app_permissions_starring.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to list and manage repositories a user is starring. +type AppPermissions_starring int + +const ( + READ_APPPERMISSIONS_STARRING AppPermissions_starring = iota + WRITE_APPPERMISSIONS_STARRING +) + +func (i AppPermissions_starring) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_starring(v string) (any, error) { + result := READ_APPPERMISSIONS_STARRING + switch v { + case "read": + result = READ_APPPERMISSIONS_STARRING + case "write": + result = WRITE_APPPERMISSIONS_STARRING + default: + return 0, errors.New("Unknown AppPermissions_starring value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_starring(values []AppPermissions_starring) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_starring) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_statuses.go b/pkg/github/models/app_permissions_statuses.go new file mode 100644 index 0000000..e72c206 --- /dev/null +++ b/pkg/github/models/app_permissions_statuses.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for commit statuses. +type AppPermissions_statuses int + +const ( + READ_APPPERMISSIONS_STATUSES AppPermissions_statuses = iota + WRITE_APPPERMISSIONS_STATUSES +) + +func (i AppPermissions_statuses) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_statuses(v string) (any, error) { + result := READ_APPPERMISSIONS_STATUSES + switch v { + case "read": + result = READ_APPPERMISSIONS_STATUSES + case "write": + result = WRITE_APPPERMISSIONS_STATUSES + default: + return 0, errors.New("Unknown AppPermissions_statuses value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_statuses(values []AppPermissions_statuses) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_statuses) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_team_discussions.go b/pkg/github/models/app_permissions_team_discussions.go new file mode 100644 index 0000000..32b533a --- /dev/null +++ b/pkg/github/models/app_permissions_team_discussions.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage team discussions and related comments. +type AppPermissions_team_discussions int + +const ( + READ_APPPERMISSIONS_TEAM_DISCUSSIONS AppPermissions_team_discussions = iota + WRITE_APPPERMISSIONS_TEAM_DISCUSSIONS +) + +func (i AppPermissions_team_discussions) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_team_discussions(v string) (any, error) { + result := READ_APPPERMISSIONS_TEAM_DISCUSSIONS + switch v { + case "read": + result = READ_APPPERMISSIONS_TEAM_DISCUSSIONS + case "write": + result = WRITE_APPPERMISSIONS_TEAM_DISCUSSIONS + default: + return 0, errors.New("Unknown AppPermissions_team_discussions value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_team_discussions(values []AppPermissions_team_discussions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_team_discussions) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_vulnerability_alerts.go b/pkg/github/models/app_permissions_vulnerability_alerts.go new file mode 100644 index 0000000..2c051c5 --- /dev/null +++ b/pkg/github/models/app_permissions_vulnerability_alerts.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to manage Dependabot alerts. +type AppPermissions_vulnerability_alerts int + +const ( + READ_APPPERMISSIONS_VULNERABILITY_ALERTS AppPermissions_vulnerability_alerts = iota + WRITE_APPPERMISSIONS_VULNERABILITY_ALERTS +) + +func (i AppPermissions_vulnerability_alerts) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_vulnerability_alerts(v string) (any, error) { + result := READ_APPPERMISSIONS_VULNERABILITY_ALERTS + switch v { + case "read": + result = READ_APPPERMISSIONS_VULNERABILITY_ALERTS + case "write": + result = WRITE_APPPERMISSIONS_VULNERABILITY_ALERTS + default: + return 0, errors.New("Unknown AppPermissions_vulnerability_alerts value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_vulnerability_alerts(values []AppPermissions_vulnerability_alerts) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_vulnerability_alerts) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/app_permissions_workflows.go b/pkg/github/models/app_permissions_workflows.go new file mode 100644 index 0000000..5cb7f73 --- /dev/null +++ b/pkg/github/models/app_permissions_workflows.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to update GitHub Actions workflow files. +type AppPermissions_workflows int + +const ( + WRITE_APPPERMISSIONS_WORKFLOWS AppPermissions_workflows = iota +) + +func (i AppPermissions_workflows) String() string { + return []string{"write"}[i] +} +func ParseAppPermissions_workflows(v string) (any, error) { + result := WRITE_APPPERMISSIONS_WORKFLOWS + switch v { + case "write": + result = WRITE_APPPERMISSIONS_WORKFLOWS + default: + return 0, errors.New("Unknown AppPermissions_workflows value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_workflows(values []AppPermissions_workflows) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_workflows) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/artifact.go b/pkg/github/models/artifact.go new file mode 100644 index 0000000..ef53f10 --- /dev/null +++ b/pkg/github/models/artifact.go @@ -0,0 +1,372 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Artifact an artifact +type Artifact struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The archive_download_url property + archive_download_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Whether or not the artifact has expired. + expired *bool + // The expires_at property + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int32 + // The name of the artifact. + name *string + // The node_id property + node_id *string + // The size in bytes of the artifact. + size_in_bytes *int32 + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The workflow_run property + workflow_run Artifact_workflow_runable +} +// NewArtifact instantiates a new Artifact and sets the default values. +func NewArtifact()(*Artifact) { + m := &Artifact{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateArtifactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateArtifactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewArtifact(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Artifact) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchiveDownloadUrl gets the archive_download_url property value. The archive_download_url property +// returns a *string when successful +func (m *Artifact) GetArchiveDownloadUrl()(*string) { + return m.archive_download_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Artifact) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetExpired gets the expired property value. Whether or not the artifact has expired. +// returns a *bool when successful +func (m *Artifact) GetExpired()(*bool) { + return m.expired +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *Time when successful +func (m *Artifact) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Artifact) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["archive_download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveDownloadUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["expired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExpired(val) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeInBytes(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["workflow_run"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateArtifact_workflow_runFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWorkflowRun(val.(Artifact_workflow_runable)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Artifact) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the artifact. +// returns a *string when successful +func (m *Artifact) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Artifact) GetNodeId()(*string) { + return m.node_id +} +// GetSizeInBytes gets the size_in_bytes property value. The size in bytes of the artifact. +// returns a *int32 when successful +func (m *Artifact) GetSizeInBytes()(*int32) { + return m.size_in_bytes +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Artifact) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Artifact) GetUrl()(*string) { + return m.url +} +// GetWorkflowRun gets the workflow_run property value. The workflow_run property +// returns a Artifact_workflow_runable when successful +func (m *Artifact) GetWorkflowRun()(Artifact_workflow_runable) { + return m.workflow_run +} +// Serialize serializes information the current object +func (m *Artifact) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("archive_download_url", m.GetArchiveDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("expired", m.GetExpired()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size_in_bytes", m.GetSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("workflow_run", m.GetWorkflowRun()) + 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 *Artifact) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchiveDownloadUrl sets the archive_download_url property value. The archive_download_url property +func (m *Artifact) SetArchiveDownloadUrl(value *string)() { + m.archive_download_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Artifact) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetExpired sets the expired property value. Whether or not the artifact has expired. +func (m *Artifact) SetExpired(value *bool)() { + m.expired = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *Artifact) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +// SetId sets the id property value. The id property +func (m *Artifact) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the artifact. +func (m *Artifact) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Artifact) SetNodeId(value *string)() { + m.node_id = value +} +// SetSizeInBytes sets the size_in_bytes property value. The size in bytes of the artifact. +func (m *Artifact) SetSizeInBytes(value *int32)() { + m.size_in_bytes = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Artifact) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Artifact) SetUrl(value *string)() { + m.url = value +} +// SetWorkflowRun sets the workflow_run property value. The workflow_run property +func (m *Artifact) SetWorkflowRun(value Artifact_workflow_runable)() { + m.workflow_run = value +} +type Artifactable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchiveDownloadUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExpired()(*bool) + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetSizeInBytes()(*int32) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetWorkflowRun()(Artifact_workflow_runable) + SetArchiveDownloadUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExpired(value *bool)() + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetSizeInBytes(value *int32)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetWorkflowRun(value Artifact_workflow_runable)() +} diff --git a/pkg/github/models/artifact_workflow_run.go b/pkg/github/models/artifact_workflow_run.go new file mode 100644 index 0000000..8ab9b14 --- /dev/null +++ b/pkg/github/models/artifact_workflow_run.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Artifact_workflow_run struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The head_branch property + head_branch *string + // The head_repository_id property + head_repository_id *int32 + // The head_sha property + head_sha *string + // The id property + id *int32 + // The repository_id property + repository_id *int32 +} +// NewArtifact_workflow_run instantiates a new Artifact_workflow_run and sets the default values. +func NewArtifact_workflow_run()(*Artifact_workflow_run) { + m := &Artifact_workflow_run{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateArtifact_workflow_runFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateArtifact_workflow_runFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewArtifact_workflow_run(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Artifact_workflow_run) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Artifact_workflow_run) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["head_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadBranch(val) + } + return nil + } + res["head_repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHeadRepositoryId(val) + } + return nil + } + res["head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadSha(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetHeadBranch gets the head_branch property value. The head_branch property +// returns a *string when successful +func (m *Artifact_workflow_run) GetHeadBranch()(*string) { + return m.head_branch +} +// GetHeadRepositoryId gets the head_repository_id property value. The head_repository_id property +// returns a *int32 when successful +func (m *Artifact_workflow_run) GetHeadRepositoryId()(*int32) { + return m.head_repository_id +} +// GetHeadSha gets the head_sha property value. The head_sha property +// returns a *string when successful +func (m *Artifact_workflow_run) GetHeadSha()(*string) { + return m.head_sha +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Artifact_workflow_run) GetId()(*int32) { + return m.id +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *Artifact_workflow_run) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *Artifact_workflow_run) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("head_branch", m.GetHeadBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("head_repository_id", m.GetHeadRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_sha", m.GetHeadSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *Artifact_workflow_run) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHeadBranch sets the head_branch property value. The head_branch property +func (m *Artifact_workflow_run) SetHeadBranch(value *string)() { + m.head_branch = value +} +// SetHeadRepositoryId sets the head_repository_id property value. The head_repository_id property +func (m *Artifact_workflow_run) SetHeadRepositoryId(value *int32)() { + m.head_repository_id = value +} +// SetHeadSha sets the head_sha property value. The head_sha property +func (m *Artifact_workflow_run) SetHeadSha(value *string)() { + m.head_sha = value +} +// SetId sets the id property value. The id property +func (m *Artifact_workflow_run) SetId(value *int32)() { + m.id = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *Artifact_workflow_run) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type Artifact_workflow_runable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHeadBranch()(*string) + GetHeadRepositoryId()(*int32) + GetHeadSha()(*string) + GetId()(*int32) + GetRepositoryId()(*int32) + SetHeadBranch(value *string)() + SetHeadRepositoryId(value *int32)() + SetHeadSha(value *string)() + SetId(value *int32)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/models/assigned_issue_event.go b/pkg/github/models/assigned_issue_event.go new file mode 100644 index 0000000..dfa2545 --- /dev/null +++ b/pkg/github/models/assigned_issue_event.go @@ -0,0 +1,371 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedIssueEvent assigned Issue Event +type AssignedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee SimpleUserable + // A GitHub user. + assigner SimpleUserable + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app Integrationable + // The url property + url *string +} +// NewAssignedIssueEvent instantiates a new AssignedIssueEvent and sets the default values. +func NewAssignedIssueEvent()(*AssignedIssueEvent) { + m := &AssignedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAssignedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAssignedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *AssignedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AssignedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *AssignedIssueEvent) GetAssignee()(SimpleUserable) { + return m.assignee +} +// GetAssigner gets the assigner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *AssignedIssueEvent) GetAssigner()(SimpleUserable) { + return m.assigner +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *AssignedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *AssignedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *AssignedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *AssignedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AssignedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(SimpleUserable)) + } + return nil + } + res["assigner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssigner(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(Integrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *AssignedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *AssignedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a Integrationable when successful +func (m *AssignedIssueEvent) GetPerformedViaGithubApp()(Integrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *AssignedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *AssignedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assigner", m.GetAssigner()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *AssignedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AssignedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *AssignedIssueEvent) SetAssignee(value SimpleUserable)() { + m.assignee = value +} +// SetAssigner sets the assigner property value. A GitHub user. +func (m *AssignedIssueEvent) SetAssigner(value SimpleUserable)() { + m.assigner = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *AssignedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *AssignedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *AssignedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *AssignedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *AssignedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *AssignedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *AssignedIssueEvent) SetPerformedViaGithubApp(value Integrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *AssignedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type AssignedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetAssignee()(SimpleUserable) + GetAssigner()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(Integrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetAssignee(value SimpleUserable)() + SetAssigner(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value Integrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/audit_log_event.go b/pkg/github/models/audit_log_event.go new file mode 100644 index 0000000..452f483 --- /dev/null +++ b/pkg/github/models/audit_log_event.go @@ -0,0 +1,1346 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent struct { + // A unique identifier for an audit event. + _document_id *string + // The name of the action that was performed, for example `user.login` or `repo.create`. + action *string + // The active property + active *bool + // The active_was property + active_was *bool + // The actor who performed the action. + actor *string + // The id of the actor who performed the action. + actor_id *int32 + // The actor_location property + actor_location AuditLogEvent_actor_locationable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The username of the account being blocked. + blocked_user *string + // The business property + business *string + // The business_id property + business_id *int32 + // The config property + config []AuditLogEvent_configable + // The config_was property + config_was []AuditLogEvent_config_wasable + // The content_type property + content_type *string + // The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + created_at *int32 + // The data property + data AuditLogEvent_dataable + // The deploy_key_fingerprint property + deploy_key_fingerprint *string + // The emoji property + emoji *string + // The events property + events []AuditLogEvent_eventsable + // The events_were property + events_were []AuditLogEvent_events_wereable + // The explanation property + explanation *string + // The fingerprint property + fingerprint *string + // The hook_id property + hook_id *int32 + // The limited_availability property + limited_availability *bool + // The message property + message *string + // The name property + name *string + // The old_user property + old_user *string + // The openssh_public_key property + openssh_public_key *string + // The operation_type property + operation_type *string + // The org property + org *string + // The org_id property + org_id *int32 + // The previous_visibility property + previous_visibility *string + // The read_only property + read_only *bool + // The name of the repository. + repo *string + // The name of the repository. + repository *string + // The repository_public property + repository_public *bool + // The target_login property + target_login *string + // The team property + team *string + // The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + timestamp *int32 + // The type of protocol (for example, HTTP or SSH) used to transfer Git data. + transport_protocol *int32 + // A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. + transport_protocol_name *string + // The user that was affected by the action performed (if available). + user *string + // The user_id property + user_id *int32 + // The repository visibility, for example `public` or `private`. + visibility *string +} +// NewAuditLogEvent instantiates a new AuditLogEvent and sets the default values. +func NewAuditLogEvent()(*AuditLogEvent) { + m := &AuditLogEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent(), nil +} +// GetAction gets the action property value. The name of the action that was performed, for example `user.login` or `repo.create`. +// returns a *string when successful +func (m *AuditLogEvent) GetAction()(*string) { + return m.action +} +// GetActive gets the active property value. The active property +// returns a *bool when successful +func (m *AuditLogEvent) GetActive()(*bool) { + return m.active +} +// GetActiveWas gets the active_was property value. The active_was property +// returns a *bool when successful +func (m *AuditLogEvent) GetActiveWas()(*bool) { + return m.active_was +} +// GetActor gets the actor property value. The actor who performed the action. +// returns a *string when successful +func (m *AuditLogEvent) GetActor()(*string) { + return m.actor +} +// GetActorId gets the actor_id property value. The id of the actor who performed the action. +// returns a *int32 when successful +func (m *AuditLogEvent) GetActorId()(*int32) { + return m.actor_id +} +// GetActorLocation gets the actor_location property value. The actor_location property +// returns a AuditLogEvent_actor_locationable when successful +func (m *AuditLogEvent) GetActorLocation()(AuditLogEvent_actor_locationable) { + return m.actor_location +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBlockedUser gets the blocked_user property value. The username of the account being blocked. +// returns a *string when successful +func (m *AuditLogEvent) GetBlockedUser()(*string) { + return m.blocked_user +} +// GetBusiness gets the business property value. The business property +// returns a *string when successful +func (m *AuditLogEvent) GetBusiness()(*string) { + return m.business +} +// GetBusinessId gets the business_id property value. The business_id property +// returns a *int32 when successful +func (m *AuditLogEvent) GetBusinessId()(*int32) { + return m.business_id +} +// GetConfig gets the config property value. The config property +// returns a []AuditLogEvent_configable when successful +func (m *AuditLogEvent) GetConfig()([]AuditLogEvent_configable) { + return m.config +} +// GetConfigWas gets the config_was property value. The config_was property +// returns a []AuditLogEvent_config_wasable when successful +func (m *AuditLogEvent) GetConfigWas()([]AuditLogEvent_config_wasable) { + return m.config_was +} +// GetContentType gets the content_type property value. The content_type property +// returns a *string when successful +func (m *AuditLogEvent) GetContentType()(*string) { + return m.content_type +} +// GetCreatedAt gets the created_at property value. The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). +// returns a *int32 when successful +func (m *AuditLogEvent) GetCreatedAt()(*int32) { + return m.created_at +} +// GetData gets the data property value. The data property +// returns a AuditLogEvent_dataable when successful +func (m *AuditLogEvent) GetData()(AuditLogEvent_dataable) { + return m.data +} +// GetDeployKeyFingerprint gets the deploy_key_fingerprint property value. The deploy_key_fingerprint property +// returns a *string when successful +func (m *AuditLogEvent) GetDeployKeyFingerprint()(*string) { + return m.deploy_key_fingerprint +} +// GetDocumentId gets the _document_id property value. A unique identifier for an audit event. +// returns a *string when successful +func (m *AuditLogEvent) GetDocumentId()(*string) { + return m._document_id +} +// GetEmoji gets the emoji property value. The emoji property +// returns a *string when successful +func (m *AuditLogEvent) GetEmoji()(*string) { + return m.emoji +} +// GetEvents gets the events property value. The events property +// returns a []AuditLogEvent_eventsable when successful +func (m *AuditLogEvent) GetEvents()([]AuditLogEvent_eventsable) { + return m.events +} +// GetEventsWere gets the events_were property value. The events_were property +// returns a []AuditLogEvent_events_wereable when successful +func (m *AuditLogEvent) GetEventsWere()([]AuditLogEvent_events_wereable) { + return m.events_were +} +// GetExplanation gets the explanation property value. The explanation property +// returns a *string when successful +func (m *AuditLogEvent) GetExplanation()(*string) { + return m.explanation +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_document_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentId(val) + } + return nil + } + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAction(val) + } + return nil + } + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["active_was"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveWas(val) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActor(val) + } + return nil + } + res["actor_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActorId(val) + } + return nil + } + res["actor_location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuditLogEvent_actor_locationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActorLocation(val.(AuditLogEvent_actor_locationable)) + } + return nil + } + res["blocked_user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockedUser(val) + } + return nil + } + res["business"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBusiness(val) + } + return nil + } + res["business_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBusinessId(val) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditLogEvent_configFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditLogEvent_configable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuditLogEvent_configable) + } + } + m.SetConfig(res) + } + return nil + } + res["config_was"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditLogEvent_config_wasFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditLogEvent_config_wasable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuditLogEvent_config_wasable) + } + } + m.SetConfigWas(res) + } + return nil + } + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuditLogEvent_dataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(AuditLogEvent_dataable)) + } + return nil + } + res["deploy_key_fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployKeyFingerprint(val) + } + return nil + } + res["emoji"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmoji(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditLogEvent_eventsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditLogEvent_eventsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuditLogEvent_eventsable) + } + } + m.SetEvents(res) + } + return nil + } + res["events_were"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditLogEvent_events_wereFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditLogEvent_events_wereable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuditLogEvent_events_wereable) + } + } + m.SetEventsWere(res) + } + return nil + } + res["explanation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExplanation(val) + } + return nil + } + res["fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprint(val) + } + return nil + } + res["hook_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHookId(val) + } + return nil + } + res["limited_availability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLimitedAvailability(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 + } + 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["old_user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldUser(val) + } + return nil + } + res["openssh_public_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOpensshPublicKey(val) + } + return nil + } + res["operation_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperationType(val) + } + return nil + } + res["org"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrg(val) + } + return nil + } + res["org_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrgId(val) + } + return nil + } + res["previous_visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousVisibility(val) + } + return nil + } + res["read_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReadOnly(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepo(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepository(val) + } + return nil + } + res["repository_public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryPublic(val) + } + return nil + } + res["target_login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetLogin(val) + } + return nil + } + res["team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeam(val) + } + return nil + } + res["@timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTimestamp(val) + } + return nil + } + res["transport_protocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTransportProtocol(val) + } + return nil + } + res["transport_protocol_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTransportProtocolName(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUser(val) + } + return nil + } + res["user_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + return res +} +// GetFingerprint gets the fingerprint property value. The fingerprint property +// returns a *string when successful +func (m *AuditLogEvent) GetFingerprint()(*string) { + return m.fingerprint +} +// GetHookId gets the hook_id property value. The hook_id property +// returns a *int32 when successful +func (m *AuditLogEvent) GetHookId()(*int32) { + return m.hook_id +} +// GetLimitedAvailability gets the limited_availability property value. The limited_availability property +// returns a *bool when successful +func (m *AuditLogEvent) GetLimitedAvailability()(*bool) { + return m.limited_availability +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *AuditLogEvent) GetMessage()(*string) { + return m.message +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *AuditLogEvent) GetName()(*string) { + return m.name +} +// GetOldUser gets the old_user property value. The old_user property +// returns a *string when successful +func (m *AuditLogEvent) GetOldUser()(*string) { + return m.old_user +} +// GetOpensshPublicKey gets the openssh_public_key property value. The openssh_public_key property +// returns a *string when successful +func (m *AuditLogEvent) GetOpensshPublicKey()(*string) { + return m.openssh_public_key +} +// GetOperationType gets the operation_type property value. The operation_type property +// returns a *string when successful +func (m *AuditLogEvent) GetOperationType()(*string) { + return m.operation_type +} +// GetOrg gets the org property value. The org property +// returns a *string when successful +func (m *AuditLogEvent) GetOrg()(*string) { + return m.org +} +// GetOrgId gets the org_id property value. The org_id property +// returns a *int32 when successful +func (m *AuditLogEvent) GetOrgId()(*int32) { + return m.org_id +} +// GetPreviousVisibility gets the previous_visibility property value. The previous_visibility property +// returns a *string when successful +func (m *AuditLogEvent) GetPreviousVisibility()(*string) { + return m.previous_visibility +} +// GetReadOnly gets the read_only property value. The read_only property +// returns a *bool when successful +func (m *AuditLogEvent) GetReadOnly()(*bool) { + return m.read_only +} +// GetRepo gets the repo property value. The name of the repository. +// returns a *string when successful +func (m *AuditLogEvent) GetRepo()(*string) { + return m.repo +} +// GetRepository gets the repository property value. The name of the repository. +// returns a *string when successful +func (m *AuditLogEvent) GetRepository()(*string) { + return m.repository +} +// GetRepositoryPublic gets the repository_public property value. The repository_public property +// returns a *bool when successful +func (m *AuditLogEvent) GetRepositoryPublic()(*bool) { + return m.repository_public +} +// GetTargetLogin gets the target_login property value. The target_login property +// returns a *string when successful +func (m *AuditLogEvent) GetTargetLogin()(*string) { + return m.target_login +} +// GetTeam gets the team property value. The team property +// returns a *string when successful +func (m *AuditLogEvent) GetTeam()(*string) { + return m.team +} +// GetTimestamp gets the @timestamp property value. The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). +// returns a *int32 when successful +func (m *AuditLogEvent) GetTimestamp()(*int32) { + return m.timestamp +} +// GetTransportProtocol gets the transport_protocol property value. The type of protocol (for example, HTTP or SSH) used to transfer Git data. +// returns a *int32 when successful +func (m *AuditLogEvent) GetTransportProtocol()(*int32) { + return m.transport_protocol +} +// GetTransportProtocolName gets the transport_protocol_name property value. A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. +// returns a *string when successful +func (m *AuditLogEvent) GetTransportProtocolName()(*string) { + return m.transport_protocol_name +} +// GetUser gets the user property value. The user that was affected by the action performed (if available). +// returns a *string when successful +func (m *AuditLogEvent) GetUser()(*string) { + return m.user +} +// GetUserId gets the user_id property value. The user_id property +// returns a *int32 when successful +func (m *AuditLogEvent) GetUserId()(*int32) { + return m.user_id +} +// GetVisibility gets the visibility property value. The repository visibility, for example `public` or `private`. +// returns a *string when successful +func (m *AuditLogEvent) GetVisibility()(*string) { + return m.visibility +} +// Serialize serializes information the current object +func (m *AuditLogEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("active_was", m.GetActiveWas()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("actor_id", m.GetActorId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("actor_location", m.GetActorLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blocked_user", m.GetBlockedUser()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("business", m.GetBusiness()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("business_id", m.GetBusinessId()) + if err != nil { + return err + } + } + if m.GetConfig() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfig())) + for i, v := range m.GetConfig() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("config", cast) + if err != nil { + return err + } + } + if m.GetConfigWas() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigWas())) + for i, v := range m.GetConfigWas() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("config_was", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deploy_key_fingerprint", m.GetDeployKeyFingerprint()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("emoji", m.GetEmoji()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvents())) + for i, v := range m.GetEvents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("events", cast) + if err != nil { + return err + } + } + if m.GetEventsWere() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEventsWere())) + for i, v := range m.GetEventsWere() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("events_were", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("explanation", m.GetExplanation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fingerprint", m.GetFingerprint()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("hook_id", m.GetHookId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("limited_availability", m.GetLimitedAvailability()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("old_user", m.GetOldUser()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("openssh_public_key", m.GetOpensshPublicKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operation_type", m.GetOperationType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("org", m.GetOrg()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("org_id", m.GetOrgId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_visibility", m.GetPreviousVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("read_only", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("repository_public", m.GetRepositoryPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_login", m.GetTargetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("team", m.GetTeam()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("@timestamp", m.GetTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("transport_protocol", m.GetTransportProtocol()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("transport_protocol_name", m.GetTransportProtocolName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("user_id", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("_document_id", m.GetDocumentId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The name of the action that was performed, for example `user.login` or `repo.create`. +func (m *AuditLogEvent) SetAction(value *string)() { + m.action = value +} +// SetActive sets the active property value. The active property +func (m *AuditLogEvent) SetActive(value *bool)() { + m.active = value +} +// SetActiveWas sets the active_was property value. The active_was property +func (m *AuditLogEvent) SetActiveWas(value *bool)() { + m.active_was = value +} +// SetActor sets the actor property value. The actor who performed the action. +func (m *AuditLogEvent) SetActor(value *string)() { + m.actor = value +} +// SetActorId sets the actor_id property value. The id of the actor who performed the action. +func (m *AuditLogEvent) SetActorId(value *int32)() { + m.actor_id = value +} +// SetActorLocation sets the actor_location property value. The actor_location property +func (m *AuditLogEvent) SetActorLocation(value AuditLogEvent_actor_locationable)() { + m.actor_location = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuditLogEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBlockedUser sets the blocked_user property value. The username of the account being blocked. +func (m *AuditLogEvent) SetBlockedUser(value *string)() { + m.blocked_user = value +} +// SetBusiness sets the business property value. The business property +func (m *AuditLogEvent) SetBusiness(value *string)() { + m.business = value +} +// SetBusinessId sets the business_id property value. The business_id property +func (m *AuditLogEvent) SetBusinessId(value *int32)() { + m.business_id = value +} +// SetConfig sets the config property value. The config property +func (m *AuditLogEvent) SetConfig(value []AuditLogEvent_configable)() { + m.config = value +} +// SetConfigWas sets the config_was property value. The config_was property +func (m *AuditLogEvent) SetConfigWas(value []AuditLogEvent_config_wasable)() { + m.config_was = value +} +// SetContentType sets the content_type property value. The content_type property +func (m *AuditLogEvent) SetContentType(value *string)() { + m.content_type = value +} +// SetCreatedAt sets the created_at property value. The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). +func (m *AuditLogEvent) SetCreatedAt(value *int32)() { + m.created_at = value +} +// SetData sets the data property value. The data property +func (m *AuditLogEvent) SetData(value AuditLogEvent_dataable)() { + m.data = value +} +// SetDeployKeyFingerprint sets the deploy_key_fingerprint property value. The deploy_key_fingerprint property +func (m *AuditLogEvent) SetDeployKeyFingerprint(value *string)() { + m.deploy_key_fingerprint = value +} +// SetDocumentId sets the _document_id property value. A unique identifier for an audit event. +func (m *AuditLogEvent) SetDocumentId(value *string)() { + m._document_id = value +} +// SetEmoji sets the emoji property value. The emoji property +func (m *AuditLogEvent) SetEmoji(value *string)() { + m.emoji = value +} +// SetEvents sets the events property value. The events property +func (m *AuditLogEvent) SetEvents(value []AuditLogEvent_eventsable)() { + m.events = value +} +// SetEventsWere sets the events_were property value. The events_were property +func (m *AuditLogEvent) SetEventsWere(value []AuditLogEvent_events_wereable)() { + m.events_were = value +} +// SetExplanation sets the explanation property value. The explanation property +func (m *AuditLogEvent) SetExplanation(value *string)() { + m.explanation = value +} +// SetFingerprint sets the fingerprint property value. The fingerprint property +func (m *AuditLogEvent) SetFingerprint(value *string)() { + m.fingerprint = value +} +// SetHookId sets the hook_id property value. The hook_id property +func (m *AuditLogEvent) SetHookId(value *int32)() { + m.hook_id = value +} +// SetLimitedAvailability sets the limited_availability property value. The limited_availability property +func (m *AuditLogEvent) SetLimitedAvailability(value *bool)() { + m.limited_availability = value +} +// SetMessage sets the message property value. The message property +func (m *AuditLogEvent) SetMessage(value *string)() { + m.message = value +} +// SetName sets the name property value. The name property +func (m *AuditLogEvent) SetName(value *string)() { + m.name = value +} +// SetOldUser sets the old_user property value. The old_user property +func (m *AuditLogEvent) SetOldUser(value *string)() { + m.old_user = value +} +// SetOpensshPublicKey sets the openssh_public_key property value. The openssh_public_key property +func (m *AuditLogEvent) SetOpensshPublicKey(value *string)() { + m.openssh_public_key = value +} +// SetOperationType sets the operation_type property value. The operation_type property +func (m *AuditLogEvent) SetOperationType(value *string)() { + m.operation_type = value +} +// SetOrg sets the org property value. The org property +func (m *AuditLogEvent) SetOrg(value *string)() { + m.org = value +} +// SetOrgId sets the org_id property value. The org_id property +func (m *AuditLogEvent) SetOrgId(value *int32)() { + m.org_id = value +} +// SetPreviousVisibility sets the previous_visibility property value. The previous_visibility property +func (m *AuditLogEvent) SetPreviousVisibility(value *string)() { + m.previous_visibility = value +} +// SetReadOnly sets the read_only property value. The read_only property +func (m *AuditLogEvent) SetReadOnly(value *bool)() { + m.read_only = value +} +// SetRepo sets the repo property value. The name of the repository. +func (m *AuditLogEvent) SetRepo(value *string)() { + m.repo = value +} +// SetRepository sets the repository property value. The name of the repository. +func (m *AuditLogEvent) SetRepository(value *string)() { + m.repository = value +} +// SetRepositoryPublic sets the repository_public property value. The repository_public property +func (m *AuditLogEvent) SetRepositoryPublic(value *bool)() { + m.repository_public = value +} +// SetTargetLogin sets the target_login property value. The target_login property +func (m *AuditLogEvent) SetTargetLogin(value *string)() { + m.target_login = value +} +// SetTeam sets the team property value. The team property +func (m *AuditLogEvent) SetTeam(value *string)() { + m.team = value +} +// SetTimestamp sets the @timestamp property value. The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). +func (m *AuditLogEvent) SetTimestamp(value *int32)() { + m.timestamp = value +} +// SetTransportProtocol sets the transport_protocol property value. The type of protocol (for example, HTTP or SSH) used to transfer Git data. +func (m *AuditLogEvent) SetTransportProtocol(value *int32)() { + m.transport_protocol = value +} +// SetTransportProtocolName sets the transport_protocol_name property value. A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. +func (m *AuditLogEvent) SetTransportProtocolName(value *string)() { + m.transport_protocol_name = value +} +// SetUser sets the user property value. The user that was affected by the action performed (if available). +func (m *AuditLogEvent) SetUser(value *string)() { + m.user = value +} +// SetUserId sets the user_id property value. The user_id property +func (m *AuditLogEvent) SetUserId(value *int32)() { + m.user_id = value +} +// SetVisibility sets the visibility property value. The repository visibility, for example `public` or `private`. +func (m *AuditLogEvent) SetVisibility(value *string)() { + m.visibility = value +} +type AuditLogEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*string) + GetActive()(*bool) + GetActiveWas()(*bool) + GetActor()(*string) + GetActorId()(*int32) + GetActorLocation()(AuditLogEvent_actor_locationable) + GetBlockedUser()(*string) + GetBusiness()(*string) + GetBusinessId()(*int32) + GetConfig()([]AuditLogEvent_configable) + GetConfigWas()([]AuditLogEvent_config_wasable) + GetContentType()(*string) + GetCreatedAt()(*int32) + GetData()(AuditLogEvent_dataable) + GetDeployKeyFingerprint()(*string) + GetDocumentId()(*string) + GetEmoji()(*string) + GetEvents()([]AuditLogEvent_eventsable) + GetEventsWere()([]AuditLogEvent_events_wereable) + GetExplanation()(*string) + GetFingerprint()(*string) + GetHookId()(*int32) + GetLimitedAvailability()(*bool) + GetMessage()(*string) + GetName()(*string) + GetOldUser()(*string) + GetOpensshPublicKey()(*string) + GetOperationType()(*string) + GetOrg()(*string) + GetOrgId()(*int32) + GetPreviousVisibility()(*string) + GetReadOnly()(*bool) + GetRepo()(*string) + GetRepository()(*string) + GetRepositoryPublic()(*bool) + GetTargetLogin()(*string) + GetTeam()(*string) + GetTimestamp()(*int32) + GetTransportProtocol()(*int32) + GetTransportProtocolName()(*string) + GetUser()(*string) + GetUserId()(*int32) + GetVisibility()(*string) + SetAction(value *string)() + SetActive(value *bool)() + SetActiveWas(value *bool)() + SetActor(value *string)() + SetActorId(value *int32)() + SetActorLocation(value AuditLogEvent_actor_locationable)() + SetBlockedUser(value *string)() + SetBusiness(value *string)() + SetBusinessId(value *int32)() + SetConfig(value []AuditLogEvent_configable)() + SetConfigWas(value []AuditLogEvent_config_wasable)() + SetContentType(value *string)() + SetCreatedAt(value *int32)() + SetData(value AuditLogEvent_dataable)() + SetDeployKeyFingerprint(value *string)() + SetDocumentId(value *string)() + SetEmoji(value *string)() + SetEvents(value []AuditLogEvent_eventsable)() + SetEventsWere(value []AuditLogEvent_events_wereable)() + SetExplanation(value *string)() + SetFingerprint(value *string)() + SetHookId(value *int32)() + SetLimitedAvailability(value *bool)() + SetMessage(value *string)() + SetName(value *string)() + SetOldUser(value *string)() + SetOpensshPublicKey(value *string)() + SetOperationType(value *string)() + SetOrg(value *string)() + SetOrgId(value *int32)() + SetPreviousVisibility(value *string)() + SetReadOnly(value *bool)() + SetRepo(value *string)() + SetRepository(value *string)() + SetRepositoryPublic(value *bool)() + SetTargetLogin(value *string)() + SetTeam(value *string)() + SetTimestamp(value *int32)() + SetTransportProtocol(value *int32)() + SetTransportProtocolName(value *string)() + SetUser(value *string)() + SetUserId(value *int32)() + SetVisibility(value *string)() +} diff --git a/pkg/github/models/audit_log_event_actor_location.go b/pkg/github/models/audit_log_event_actor_location.go new file mode 100644 index 0000000..0136fe3 --- /dev/null +++ b/pkg/github/models/audit_log_event_actor_location.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent_actor_location struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The country_name property + country_name *string +} +// NewAuditLogEvent_actor_location instantiates a new AuditLogEvent_actor_location and sets the default values. +func NewAuditLogEvent_actor_location()(*AuditLogEvent_actor_location) { + m := &AuditLogEvent_actor_location{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEvent_actor_locationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEvent_actor_locationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent_actor_location(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent_actor_location) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCountryName gets the country_name property value. The country_name property +// returns a *string when successful +func (m *AuditLogEvent_actor_location) GetCountryName()(*string) { + return m.country_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent_actor_location) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["country_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AuditLogEvent_actor_location) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("country_name", m.GetCountryName()) + 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 *AuditLogEvent_actor_location) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCountryName sets the country_name property value. The country_name property +func (m *AuditLogEvent_actor_location) SetCountryName(value *string)() { + m.country_name = value +} +type AuditLogEvent_actor_locationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCountryName()(*string) + SetCountryName(value *string)() +} diff --git a/pkg/github/models/audit_log_event_config.go b/pkg/github/models/audit_log_event_config.go new file mode 100644 index 0000000..bf2eadf --- /dev/null +++ b/pkg/github/models/audit_log_event_config.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent_config struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewAuditLogEvent_config instantiates a new AuditLogEvent_config and sets the default values. +func NewAuditLogEvent_config()(*AuditLogEvent_config) { + m := &AuditLogEvent_config{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEvent_configFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEvent_configFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent_config(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent_config) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent_config) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *AuditLogEvent_config) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuditLogEvent_config) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type AuditLogEvent_configable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/audit_log_event_config_was.go b/pkg/github/models/audit_log_event_config_was.go new file mode 100644 index 0000000..3e62e0d --- /dev/null +++ b/pkg/github/models/audit_log_event_config_was.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent_config_was struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewAuditLogEvent_config_was instantiates a new AuditLogEvent_config_was and sets the default values. +func NewAuditLogEvent_config_was()(*AuditLogEvent_config_was) { + m := &AuditLogEvent_config_was{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEvent_config_wasFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEvent_config_wasFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent_config_was(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent_config_was) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent_config_was) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *AuditLogEvent_config_was) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuditLogEvent_config_was) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type AuditLogEvent_config_wasable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/audit_log_event_data.go b/pkg/github/models/audit_log_event_data.go new file mode 100644 index 0000000..6cf3d94 --- /dev/null +++ b/pkg/github/models/audit_log_event_data.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent_data struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewAuditLogEvent_data instantiates a new AuditLogEvent_data and sets the default values. +func NewAuditLogEvent_data()(*AuditLogEvent_data) { + m := &AuditLogEvent_data{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEvent_dataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEvent_dataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent_data(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent_data) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent_data) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *AuditLogEvent_data) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuditLogEvent_data) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type AuditLogEvent_dataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/audit_log_event_events.go b/pkg/github/models/audit_log_event_events.go new file mode 100644 index 0000000..9d49a3b --- /dev/null +++ b/pkg/github/models/audit_log_event_events.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent_events struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewAuditLogEvent_events instantiates a new AuditLogEvent_events and sets the default values. +func NewAuditLogEvent_events()(*AuditLogEvent_events) { + m := &AuditLogEvent_events{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEvent_eventsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEvent_eventsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent_events(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent_events) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent_events) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *AuditLogEvent_events) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuditLogEvent_events) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type AuditLogEvent_eventsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/audit_log_event_events_were.go b/pkg/github/models/audit_log_event_events_were.go new file mode 100644 index 0000000..3f2505b --- /dev/null +++ b/pkg/github/models/audit_log_event_events_were.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLogEvent_events_were struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewAuditLogEvent_events_were instantiates a new AuditLogEvent_events_were and sets the default values. +func NewAuditLogEvent_events_were()(*AuditLogEvent_events_were) { + m := &AuditLogEvent_events_were{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuditLogEvent_events_wereFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogEvent_events_wereFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLogEvent_events_were(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuditLogEvent_events_were) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLogEvent_events_were) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *AuditLogEvent_events_were) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuditLogEvent_events_were) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type AuditLogEvent_events_wereable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/authentication_token.go b/pkg/github/models/authentication_token.go new file mode 100644 index 0000000..c0fdc84 --- /dev/null +++ b/pkg/github/models/authentication_token.go @@ -0,0 +1,240 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationToken authentication Token +type AuthenticationToken struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time this token expires + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The permissions property + permissions AuthenticationToken_permissionsable + // The repositories this token has access to + repositories []Repositoryable + // Describe whether all repositories have been selected or there's a selection involved + repository_selection *AuthenticationToken_repository_selection + // The single_file property + single_file *string + // The token used for authentication + token *string +} +// NewAuthenticationToken instantiates a new AuthenticationToken and sets the default values. +func NewAuthenticationToken()(*AuthenticationToken) { + m := &AuthenticationToken{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthenticationTokenFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationTokenFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationToken(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuthenticationToken) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpiresAt gets the expires_at property value. The time this token expires +// returns a *Time when successful +func (m *AuthenticationToken) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuthenticationToken) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationToken_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(AuthenticationToken_permissionsable)) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Repositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Repositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationToken_repository_selection) + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val.(*AuthenticationToken_repository_selection)) + } + return nil + } + res["single_file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleFile(val) + } + return nil + } + res["token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetToken(val) + } + return nil + } + return res +} +// GetPermissions gets the permissions property value. The permissions property +// returns a AuthenticationToken_permissionsable when successful +func (m *AuthenticationToken) GetPermissions()(AuthenticationToken_permissionsable) { + return m.permissions +} +// GetRepositories gets the repositories property value. The repositories this token has access to +// returns a []Repositoryable when successful +func (m *AuthenticationToken) GetRepositories()([]Repositoryable) { + return m.repositories +} +// GetRepositorySelection gets the repository_selection property value. Describe whether all repositories have been selected or there's a selection involved +// returns a *AuthenticationToken_repository_selection when successful +func (m *AuthenticationToken) GetRepositorySelection()(*AuthenticationToken_repository_selection) { + return m.repository_selection +} +// GetSingleFile gets the single_file property value. The single_file property +// returns a *string when successful +func (m *AuthenticationToken) GetSingleFile()(*string) { + return m.single_file +} +// GetToken gets the token property value. The token used for authentication +// returns a *string when successful +func (m *AuthenticationToken) GetToken()(*string) { + return m.token +} +// Serialize serializes information the current object +func (m *AuthenticationToken) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + if m.GetRepositorySelection() != nil { + cast := (*m.GetRepositorySelection()).String() + err := writer.WriteStringValue("repository_selection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("single_file", m.GetSingleFile()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token", m.GetToken()) + 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 *AuthenticationToken) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpiresAt sets the expires_at property value. The time this token expires +func (m *AuthenticationToken) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *AuthenticationToken) SetPermissions(value AuthenticationToken_permissionsable)() { + m.permissions = value +} +// SetRepositories sets the repositories property value. The repositories this token has access to +func (m *AuthenticationToken) SetRepositories(value []Repositoryable)() { + m.repositories = value +} +// SetRepositorySelection sets the repository_selection property value. Describe whether all repositories have been selected or there's a selection involved +func (m *AuthenticationToken) SetRepositorySelection(value *AuthenticationToken_repository_selection)() { + m.repository_selection = value +} +// SetSingleFile sets the single_file property value. The single_file property +func (m *AuthenticationToken) SetSingleFile(value *string)() { + m.single_file = value +} +// SetToken sets the token property value. The token used for authentication +func (m *AuthenticationToken) SetToken(value *string)() { + m.token = value +} +type AuthenticationTokenable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPermissions()(AuthenticationToken_permissionsable) + GetRepositories()([]Repositoryable) + GetRepositorySelection()(*AuthenticationToken_repository_selection) + GetSingleFile()(*string) + GetToken()(*string) + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPermissions(value AuthenticationToken_permissionsable)() + SetRepositories(value []Repositoryable)() + SetRepositorySelection(value *AuthenticationToken_repository_selection)() + SetSingleFile(value *string)() + SetToken(value *string)() +} diff --git a/pkg/github/models/authentication_token_permissions.go b/pkg/github/models/authentication_token_permissions.go new file mode 100644 index 0000000..a3af4de --- /dev/null +++ b/pkg/github/models/authentication_token_permissions.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuthenticationToken_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewAuthenticationToken_permissions instantiates a new AuthenticationToken_permissions and sets the default values. +func NewAuthenticationToken_permissions()(*AuthenticationToken_permissions) { + m := &AuthenticationToken_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthenticationToken_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationToken_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationToken_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AuthenticationToken_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuthenticationToken_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *AuthenticationToken_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AuthenticationToken_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type AuthenticationToken_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/authentication_token_repository_selection.go b/pkg/github/models/authentication_token_repository_selection.go new file mode 100644 index 0000000..24215fe --- /dev/null +++ b/pkg/github/models/authentication_token_repository_selection.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Describe whether all repositories have been selected or there's a selection involved +type AuthenticationToken_repository_selection int + +const ( + ALL_AUTHENTICATIONTOKEN_REPOSITORY_SELECTION AuthenticationToken_repository_selection = iota + SELECTED_AUTHENTICATIONTOKEN_REPOSITORY_SELECTION +) + +func (i AuthenticationToken_repository_selection) String() string { + return []string{"all", "selected"}[i] +} +func ParseAuthenticationToken_repository_selection(v string) (any, error) { + result := ALL_AUTHENTICATIONTOKEN_REPOSITORY_SELECTION + switch v { + case "all": + result = ALL_AUTHENTICATIONTOKEN_REPOSITORY_SELECTION + case "selected": + result = SELECTED_AUTHENTICATIONTOKEN_REPOSITORY_SELECTION + default: + return 0, errors.New("Unknown AuthenticationToken_repository_selection value: " + v) + } + return &result, nil +} +func SerializeAuthenticationToken_repository_selection(values []AuthenticationToken_repository_selection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AuthenticationToken_repository_selection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/author_association.go b/pkg/github/models/author_association.go new file mode 100644 index 0000000..5904dc9 --- /dev/null +++ b/pkg/github/models/author_association.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// How the author is associated with the repository. +type AuthorAssociation int + +const ( + COLLABORATOR_AUTHORASSOCIATION AuthorAssociation = iota + CONTRIBUTOR_AUTHORASSOCIATION + FIRST_TIMER_AUTHORASSOCIATION + FIRST_TIME_CONTRIBUTOR_AUTHORASSOCIATION + MANNEQUIN_AUTHORASSOCIATION + MEMBER_AUTHORASSOCIATION + NONE_AUTHORASSOCIATION + OWNER_AUTHORASSOCIATION +) + +func (i AuthorAssociation) String() string { + return []string{"COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MANNEQUIN", "MEMBER", "NONE", "OWNER"}[i] +} +func ParseAuthorAssociation(v string) (any, error) { + result := COLLABORATOR_AUTHORASSOCIATION + switch v { + case "COLLABORATOR": + result = COLLABORATOR_AUTHORASSOCIATION + case "CONTRIBUTOR": + result = CONTRIBUTOR_AUTHORASSOCIATION + case "FIRST_TIMER": + result = FIRST_TIMER_AUTHORASSOCIATION + case "FIRST_TIME_CONTRIBUTOR": + result = FIRST_TIME_CONTRIBUTOR_AUTHORASSOCIATION + case "MANNEQUIN": + result = MANNEQUIN_AUTHORASSOCIATION + case "MEMBER": + result = MEMBER_AUTHORASSOCIATION + case "NONE": + result = NONE_AUTHORASSOCIATION + case "OWNER": + result = OWNER_AUTHORASSOCIATION + default: + return 0, errors.New("Unknown AuthorAssociation value: " + v) + } + return &result, nil +} +func SerializeAuthorAssociation(values []AuthorAssociation) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AuthorAssociation) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/authorization.go b/pkg/github/models/authorization.go new file mode 100644 index 0000000..df9a7c5 --- /dev/null +++ b/pkg/github/models/authorization.go @@ -0,0 +1,494 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Authorization the authorization for an OAuth app, GitHub App, or a Personal Access Token. +type Authorization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The app property + app Authorization_appable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The expires_at property + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The fingerprint property + fingerprint *string + // The hashed_token property + hashed_token *string + // The id property + id *int64 + // The installation property + installation NullableScopedInstallationable + // The note property + note *string + // The note_url property + note_url *string + // A list of scopes that this authorization is in. + scopes []string + // The token property + token *string + // The token_last_eight property + token_last_eight *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewAuthorization instantiates a new Authorization and sets the default values. +func NewAuthorization()(*Authorization) { + m := &Authorization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthorizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthorizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthorization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Authorization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApp gets the app property value. The app property +// returns a Authorization_appable when successful +func (m *Authorization) GetApp()(Authorization_appable) { + return m.app +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Authorization) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *Time when successful +func (m *Authorization) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Authorization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthorization_appFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApp(val.(Authorization_appable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprint(val) + } + return nil + } + res["hashed_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHashedToken(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["installation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableScopedInstallationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstallation(val.(NullableScopedInstallationable)) + } + return nil + } + res["note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNote(val) + } + return nil + } + res["note_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNoteUrl(val) + } + return nil + } + res["scopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetScopes(res) + } + return nil + } + res["token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetToken(val) + } + return nil + } + res["token_last_eight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenLastEight(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetFingerprint gets the fingerprint property value. The fingerprint property +// returns a *string when successful +func (m *Authorization) GetFingerprint()(*string) { + return m.fingerprint +} +// GetHashedToken gets the hashed_token property value. The hashed_token property +// returns a *string when successful +func (m *Authorization) GetHashedToken()(*string) { + return m.hashed_token +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Authorization) GetId()(*int64) { + return m.id +} +// GetInstallation gets the installation property value. The installation property +// returns a NullableScopedInstallationable when successful +func (m *Authorization) GetInstallation()(NullableScopedInstallationable) { + return m.installation +} +// GetNote gets the note property value. The note property +// returns a *string when successful +func (m *Authorization) GetNote()(*string) { + return m.note +} +// GetNoteUrl gets the note_url property value. The note_url property +// returns a *string when successful +func (m *Authorization) GetNoteUrl()(*string) { + return m.note_url +} +// GetScopes gets the scopes property value. A list of scopes that this authorization is in. +// returns a []string when successful +func (m *Authorization) GetScopes()([]string) { + return m.scopes +} +// GetToken gets the token property value. The token property +// returns a *string when successful +func (m *Authorization) GetToken()(*string) { + return m.token +} +// GetTokenLastEight gets the token_last_eight property value. The token_last_eight property +// returns a *string when successful +func (m *Authorization) GetTokenLastEight()(*string) { + return m.token_last_eight +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Authorization) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Authorization) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Authorization) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *Authorization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("app", m.GetApp()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fingerprint", m.GetFingerprint()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hashed_token", m.GetHashedToken()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("installation", m.GetInstallation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("note", m.GetNote()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("note_url", m.GetNoteUrl()) + if err != nil { + return err + } + } + if m.GetScopes() != nil { + err := writer.WriteCollectionOfStringValues("scopes", m.GetScopes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token", m.GetToken()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_last_eight", m.GetTokenLastEight()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *Authorization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApp sets the app property value. The app property +func (m *Authorization) SetApp(value Authorization_appable)() { + m.app = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Authorization) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *Authorization) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +// SetFingerprint sets the fingerprint property value. The fingerprint property +func (m *Authorization) SetFingerprint(value *string)() { + m.fingerprint = value +} +// SetHashedToken sets the hashed_token property value. The hashed_token property +func (m *Authorization) SetHashedToken(value *string)() { + m.hashed_token = value +} +// SetId sets the id property value. The id property +func (m *Authorization) SetId(value *int64)() { + m.id = value +} +// SetInstallation sets the installation property value. The installation property +func (m *Authorization) SetInstallation(value NullableScopedInstallationable)() { + m.installation = value +} +// SetNote sets the note property value. The note property +func (m *Authorization) SetNote(value *string)() { + m.note = value +} +// SetNoteUrl sets the note_url property value. The note_url property +func (m *Authorization) SetNoteUrl(value *string)() { + m.note_url = value +} +// SetScopes sets the scopes property value. A list of scopes that this authorization is in. +func (m *Authorization) SetScopes(value []string)() { + m.scopes = value +} +// SetToken sets the token property value. The token property +func (m *Authorization) SetToken(value *string)() { + m.token = value +} +// SetTokenLastEight sets the token_last_eight property value. The token_last_eight property +func (m *Authorization) SetTokenLastEight(value *string)() { + m.token_last_eight = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Authorization) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Authorization) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *Authorization) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type Authorizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApp()(Authorization_appable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFingerprint()(*string) + GetHashedToken()(*string) + GetId()(*int64) + GetInstallation()(NullableScopedInstallationable) + GetNote()(*string) + GetNoteUrl()(*string) + GetScopes()([]string) + GetToken()(*string) + GetTokenLastEight()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetApp(value Authorization_appable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFingerprint(value *string)() + SetHashedToken(value *string)() + SetId(value *int64)() + SetInstallation(value NullableScopedInstallationable)() + SetNote(value *string)() + SetNoteUrl(value *string)() + SetScopes(value []string)() + SetToken(value *string)() + SetTokenLastEight(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/authorization_app.go b/pkg/github/models/authorization_app.go new file mode 100644 index 0000000..045c522 --- /dev/null +++ b/pkg/github/models/authorization_app.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Authorization_app struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The client_id property + client_id *string + // The name property + name *string + // The url property + url *string +} +// NewAuthorization_app instantiates a new Authorization_app and sets the default values. +func NewAuthorization_app()(*Authorization_app) { + m := &Authorization_app{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthorization_appFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthorization_appFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthorization_app(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Authorization_app) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientId gets the client_id property value. The client_id property +// returns a *string when successful +func (m *Authorization_app) GetClientId()(*string) { + return m.client_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Authorization_app) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Authorization_app) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Authorization_app) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Authorization_app) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client_id", m.GetClientId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Authorization_app) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientId sets the client_id property value. The client_id property +func (m *Authorization_app) SetClientId(value *string)() { + m.client_id = value +} +// SetName sets the name property value. The name property +func (m *Authorization_app) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *Authorization_app) SetUrl(value *string)() { + m.url = value +} +type Authorization_appable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientId()(*string) + GetName()(*string) + GetUrl()(*string) + SetClientId(value *string)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/auto_merge.go b/pkg/github/models/auto_merge.go new file mode 100644 index 0000000..c2c7ffc --- /dev/null +++ b/pkg/github/models/auto_merge.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutoMerge the status of auto merging a pull request. +type AutoMerge struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Commit message for the merge commit. + commit_message *string + // Title for the merge commit message. + commit_title *string + // A GitHub user. + enabled_by SimpleUserable + // The merge method to use. + merge_method *AutoMerge_merge_method +} +// NewAutoMerge instantiates a new AutoMerge and sets the default values. +func NewAutoMerge()(*AutoMerge) { + m := &AutoMerge{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAutoMergeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAutoMergeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAutoMerge(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *AutoMerge) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitMessage gets the commit_message property value. Commit message for the merge commit. +// returns a *string when successful +func (m *AutoMerge) GetCommitMessage()(*string) { + return m.commit_message +} +// GetCommitTitle gets the commit_title property value. Title for the merge commit message. +// returns a *string when successful +func (m *AutoMerge) GetCommitTitle()(*string) { + return m.commit_title +} +// GetEnabledBy gets the enabled_by property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *AutoMerge) GetEnabledBy()(SimpleUserable) { + return m.enabled_by +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AutoMerge) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitMessage(val) + } + return nil + } + res["commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitTitle(val) + } + return nil + } + res["enabled_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnabledBy(val.(SimpleUserable)) + } + return nil + } + res["merge_method"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAutoMerge_merge_method) + if err != nil { + return err + } + if val != nil { + m.SetMergeMethod(val.(*AutoMerge_merge_method)) + } + return nil + } + return res +} +// GetMergeMethod gets the merge_method property value. The merge method to use. +// returns a *AutoMerge_merge_method when successful +func (m *AutoMerge) GetMergeMethod()(*AutoMerge_merge_method) { + return m.merge_method +} +// Serialize serializes information the current object +func (m *AutoMerge) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("commit_message", m.GetCommitMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_title", m.GetCommitTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("enabled_by", m.GetEnabledBy()) + if err != nil { + return err + } + } + if m.GetMergeMethod() != nil { + cast := (*m.GetMergeMethod()).String() + err := writer.WriteStringValue("merge_method", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AutoMerge) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitMessage sets the commit_message property value. Commit message for the merge commit. +func (m *AutoMerge) SetCommitMessage(value *string)() { + m.commit_message = value +} +// SetCommitTitle sets the commit_title property value. Title for the merge commit message. +func (m *AutoMerge) SetCommitTitle(value *string)() { + m.commit_title = value +} +// SetEnabledBy sets the enabled_by property value. A GitHub user. +func (m *AutoMerge) SetEnabledBy(value SimpleUserable)() { + m.enabled_by = value +} +// SetMergeMethod sets the merge_method property value. The merge method to use. +func (m *AutoMerge) SetMergeMethod(value *AutoMerge_merge_method)() { + m.merge_method = value +} +type AutoMergeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommitMessage()(*string) + GetCommitTitle()(*string) + GetEnabledBy()(SimpleUserable) + GetMergeMethod()(*AutoMerge_merge_method) + SetCommitMessage(value *string)() + SetCommitTitle(value *string)() + SetEnabledBy(value SimpleUserable)() + SetMergeMethod(value *AutoMerge_merge_method)() +} diff --git a/pkg/github/models/auto_merge_merge_method.go b/pkg/github/models/auto_merge_merge_method.go new file mode 100644 index 0000000..7060adf --- /dev/null +++ b/pkg/github/models/auto_merge_merge_method.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The merge method to use. +type AutoMerge_merge_method int + +const ( + MERGE_AUTOMERGE_MERGE_METHOD AutoMerge_merge_method = iota + SQUASH_AUTOMERGE_MERGE_METHOD + REBASE_AUTOMERGE_MERGE_METHOD +) + +func (i AutoMerge_merge_method) String() string { + return []string{"merge", "squash", "rebase"}[i] +} +func ParseAutoMerge_merge_method(v string) (any, error) { + result := MERGE_AUTOMERGE_MERGE_METHOD + switch v { + case "merge": + result = MERGE_AUTOMERGE_MERGE_METHOD + case "squash": + result = SQUASH_AUTOMERGE_MERGE_METHOD + case "rebase": + result = REBASE_AUTOMERGE_MERGE_METHOD + default: + return 0, errors.New("Unknown AutoMerge_merge_method value: " + v) + } + return &result, nil +} +func SerializeAutoMerge_merge_method(values []AutoMerge_merge_method) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AutoMerge_merge_method) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/autolink.go b/pkg/github/models/autolink.go new file mode 100644 index 0000000..ef226b3 --- /dev/null +++ b/pkg/github/models/autolink.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Autolink an autolink reference. +type Autolink struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + is_alphanumeric *bool + // The prefix of a key that is linkified. + key_prefix *string + // A template for the target URL that is generated if a key was found. + url_template *string +} +// NewAutolink instantiates a new Autolink and sets the default values. +func NewAutolink()(*Autolink) { + m := &Autolink{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAutolinkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAutolinkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAutolink(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Autolink) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Autolink) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_alphanumeric"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAlphanumeric(val) + } + return nil + } + res["key_prefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyPrefix(val) + } + return nil + } + res["url_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrlTemplate(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Autolink) GetId()(*int32) { + return m.id +} +// GetIsAlphanumeric gets the is_alphanumeric property value. Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. +// returns a *bool when successful +func (m *Autolink) GetIsAlphanumeric()(*bool) { + return m.is_alphanumeric +} +// GetKeyPrefix gets the key_prefix property value. The prefix of a key that is linkified. +// returns a *string when successful +func (m *Autolink) GetKeyPrefix()(*string) { + return m.key_prefix +} +// GetUrlTemplate gets the url_template property value. A template for the target URL that is generated if a key was found. +// returns a *string when successful +func (m *Autolink) GetUrlTemplate()(*string) { + return m.url_template +} +// Serialize serializes information the current object +func (m *Autolink) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_alphanumeric", m.GetIsAlphanumeric()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_prefix", m.GetKeyPrefix()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url_template", m.GetUrlTemplate()) + 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 *Autolink) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *Autolink) SetId(value *int32)() { + m.id = value +} +// SetIsAlphanumeric sets the is_alphanumeric property value. Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. +func (m *Autolink) SetIsAlphanumeric(value *bool)() { + m.is_alphanumeric = value +} +// SetKeyPrefix sets the key_prefix property value. The prefix of a key that is linkified. +func (m *Autolink) SetKeyPrefix(value *string)() { + m.key_prefix = value +} +// SetUrlTemplate sets the url_template property value. A template for the target URL that is generated if a key was found. +func (m *Autolink) SetUrlTemplate(value *string)() { + m.url_template = value +} +type Autolinkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetIsAlphanumeric()(*bool) + GetKeyPrefix()(*string) + GetUrlTemplate()(*string) + SetId(value *int32)() + SetIsAlphanumeric(value *bool)() + SetKeyPrefix(value *string)() + SetUrlTemplate(value *string)() +} diff --git a/pkg/github/models/base_gist.go b/pkg/github/models/base_gist.go new file mode 100644 index 0000000..87644a4 --- /dev/null +++ b/pkg/github/models/base_gist.go @@ -0,0 +1,633 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseGist base Gist +type BaseGist struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The files property + files BaseGist_filesable + // The forks property + forks i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable + // The forks_url property + forks_url *string + // The git_pull_url property + git_pull_url *string + // The git_push_url property + git_push_url *string + // The history property + history i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable + // The html_url property + html_url *string + // The id property + id *string + // The node_id property + node_id *string + // A GitHub user. + owner SimpleUserable + // The public property + public *bool + // The truncated property + truncated *bool + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewBaseGist instantiates a new BaseGist and sets the default values. +func NewBaseGist()(*BaseGist) { + m := &BaseGist{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBaseGistFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBaseGistFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBaseGist(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BaseGist) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *BaseGist) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *BaseGist) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *BaseGist) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *BaseGist) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *BaseGist) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BaseGist) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBaseGist_filesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFiles(val.(BaseGist_filesable)) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetForks(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["git_pull_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitPullUrl(val) + } + return nil + } + res["git_push_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitPushUrl(val) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHistory(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublic(val) + } + return nil + } + res["truncated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTruncated(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetFiles gets the files property value. The files property +// returns a BaseGist_filesable when successful +func (m *BaseGist) GetFiles()(BaseGist_filesable) { + return m.files +} +// GetForks gets the forks property value. The forks property +// returns a UntypedNodeable when successful +func (m *BaseGist) GetForks()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) { + return m.forks +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *BaseGist) GetForksUrl()(*string) { + return m.forks_url +} +// GetGitPullUrl gets the git_pull_url property value. The git_pull_url property +// returns a *string when successful +func (m *BaseGist) GetGitPullUrl()(*string) { + return m.git_pull_url +} +// GetGitPushUrl gets the git_push_url property value. The git_push_url property +// returns a *string when successful +func (m *BaseGist) GetGitPushUrl()(*string) { + return m.git_push_url +} +// GetHistory gets the history property value. The history property +// returns a UntypedNodeable when successful +func (m *BaseGist) GetHistory()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) { + return m.history +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *BaseGist) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *BaseGist) GetId()(*string) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *BaseGist) GetNodeId()(*string) { + return m.node_id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *BaseGist) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPublic gets the public property value. The public property +// returns a *bool when successful +func (m *BaseGist) GetPublic()(*bool) { + return m.public +} +// GetTruncated gets the truncated property value. The truncated property +// returns a *bool when successful +func (m *BaseGist) GetTruncated()(*bool) { + return m.truncated +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *BaseGist) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BaseGist) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *BaseGist) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *BaseGist) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("files", m.GetFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_pull_url", m.GetGitPullUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_push_url", m.GetGitPushUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("history", m.GetHistory()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public", m.GetPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("truncated", m.GetTruncated()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *BaseGist) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. The comments property +func (m *BaseGist) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *BaseGist) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *BaseGist) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *BaseGist) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *BaseGist) SetDescription(value *string)() { + m.description = value +} +// SetFiles sets the files property value. The files property +func (m *BaseGist) SetFiles(value BaseGist_filesable)() { + m.files = value +} +// SetForks sets the forks property value. The forks property +func (m *BaseGist) SetForks(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() { + m.forks = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *BaseGist) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetGitPullUrl sets the git_pull_url property value. The git_pull_url property +func (m *BaseGist) SetGitPullUrl(value *string)() { + m.git_pull_url = value +} +// SetGitPushUrl sets the git_push_url property value. The git_push_url property +func (m *BaseGist) SetGitPushUrl(value *string)() { + m.git_push_url = value +} +// SetHistory sets the history property value. The history property +func (m *BaseGist) SetHistory(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() { + m.history = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *BaseGist) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *BaseGist) SetId(value *string)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *BaseGist) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *BaseGist) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPublic sets the public property value. The public property +func (m *BaseGist) SetPublic(value *bool)() { + m.public = value +} +// SetTruncated sets the truncated property value. The truncated property +func (m *BaseGist) SetTruncated(value *bool)() { + m.truncated = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *BaseGist) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *BaseGist) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *BaseGist) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type BaseGistable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetFiles()(BaseGist_filesable) + GetForks()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) + GetForksUrl()(*string) + GetGitPullUrl()(*string) + GetGitPushUrl()(*string) + GetHistory()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) + GetHtmlUrl()(*string) + GetId()(*string) + GetNodeId()(*string) + GetOwner()(SimpleUserable) + GetPublic()(*bool) + GetTruncated()(*bool) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetFiles(value BaseGist_filesable)() + SetForks(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() + SetForksUrl(value *string)() + SetGitPullUrl(value *string)() + SetGitPushUrl(value *string)() + SetHistory(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() + SetHtmlUrl(value *string)() + SetId(value *string)() + SetNodeId(value *string)() + SetOwner(value SimpleUserable)() + SetPublic(value *bool)() + SetTruncated(value *bool)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/base_gist_files.go b/pkg/github/models/base_gist_files.go new file mode 100644 index 0000000..8fab653 --- /dev/null +++ b/pkg/github/models/base_gist_files.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BaseGist_files struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewBaseGist_files instantiates a new BaseGist_files and sets the default values. +func NewBaseGist_files()(*BaseGist_files) { + m := &BaseGist_files{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBaseGist_filesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBaseGist_filesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBaseGist_files(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BaseGist_files) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BaseGist_files) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *BaseGist_files) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BaseGist_files) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type BaseGist_filesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/basic_error.go b/pkg/github/models/basic_error.go new file mode 100644 index 0000000..ab2919a --- /dev/null +++ b/pkg/github/models/basic_error.go @@ -0,0 +1,176 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BasicError basic Error +type BasicError 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 + // The status property + status *string + // The url property + url *string +} +// NewBasicError instantiates a new BasicError and sets the default values. +func NewBasicError()(*BasicError) { + m := &BasicError{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBasicErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBasicErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBasicError(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *BasicError) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BasicError) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *BasicError) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BasicError) 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 + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *BasicError) GetMessage()(*string) { + return m.message +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *BasicError) GetStatus()(*string) { + return m.status +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BasicError) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BasicError) 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.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BasicError) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *BasicError) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *BasicError) SetMessage(value *string)() { + m.message = value +} +// SetStatus sets the status property value. The status property +func (m *BasicError) SetStatus(value *string)() { + m.status = value +} +// SetUrl sets the url property value. The url property +func (m *BasicError) SetUrl(value *string)() { + m.url = value +} +type BasicErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + GetStatus()(*string) + GetUrl()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() + SetStatus(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/billing_usage_report.go b/pkg/github/models/billing_usage_report.go new file mode 100644 index 0000000..746e912 --- /dev/null +++ b/pkg/github/models/billing_usage_report.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BillingUsageReport struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usageItems property + usageItems []BillingUsageReport_usageItemsable +} +// NewBillingUsageReport instantiates a new BillingUsageReport and sets the default values. +func NewBillingUsageReport()(*BillingUsageReport) { + m := &BillingUsageReport{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBillingUsageReportFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBillingUsageReportFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBillingUsageReport(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BillingUsageReport) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BillingUsageReport) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["usageItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBillingUsageReport_usageItemsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BillingUsageReport_usageItemsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BillingUsageReport_usageItemsable) + } + } + m.SetUsageItems(res) + } + return nil + } + return res +} +// GetUsageItems gets the usageItems property value. The usageItems property +// returns a []BillingUsageReport_usageItemsable when successful +func (m *BillingUsageReport) GetUsageItems()([]BillingUsageReport_usageItemsable) { + return m.usageItems +} +// Serialize serializes information the current object +func (m *BillingUsageReport) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsageItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsageItems())) + for i, v := range m.GetUsageItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("usageItems", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BillingUsageReport) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsageItems sets the usageItems property value. The usageItems property +func (m *BillingUsageReport) SetUsageItems(value []BillingUsageReport_usageItemsable)() { + m.usageItems = value +} +type BillingUsageReportable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsageItems()([]BillingUsageReport_usageItemsable) + SetUsageItems(value []BillingUsageReport_usageItemsable)() +} diff --git a/pkg/github/models/billing_usage_report503_error.go b/pkg/github/models/billing_usage_report503_error.go new file mode 100644 index 0000000..d85562a --- /dev/null +++ b/pkg/github/models/billing_usage_report503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BillingUsageReport503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewBillingUsageReport503Error instantiates a new BillingUsageReport503Error and sets the default values. +func NewBillingUsageReport503Error()(*BillingUsageReport503Error) { + m := &BillingUsageReport503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBillingUsageReport503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBillingUsageReport503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBillingUsageReport503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *BillingUsageReport503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BillingUsageReport503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *BillingUsageReport503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *BillingUsageReport503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BillingUsageReport503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *BillingUsageReport503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *BillingUsageReport503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BillingUsageReport503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *BillingUsageReport503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *BillingUsageReport503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *BillingUsageReport503Error) SetMessage(value *string)() { + m.message = value +} +type BillingUsageReport503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/billing_usage_report_usage_items.go b/pkg/github/models/billing_usage_report_usage_items.go new file mode 100644 index 0000000..c7766aa --- /dev/null +++ b/pkg/github/models/billing_usage_report_usage_items.go @@ -0,0 +1,370 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BillingUsageReport_usageItems struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Date of the usage line item. + date *string + // Discount amount of the usage line item. + discountAmount *float64 + // Gross amount of the usage line item. + grossAmount *float64 + // Net amount of the usage line item. + netAmount *float64 + // Name of the organization. + organizationName *string + // Price per unit of the usage line item. + pricePerUnit *float64 + // Product name. + product *string + // Quantity of the usage line item. + quantity *int32 + // Name of the repository. + repositoryName *string + // SKU name. + sku *string + // Unit type of the usage line item. + unitType *string +} +// NewBillingUsageReport_usageItems instantiates a new BillingUsageReport_usageItems and sets the default values. +func NewBillingUsageReport_usageItems()(*BillingUsageReport_usageItems) { + m := &BillingUsageReport_usageItems{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBillingUsageReport_usageItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBillingUsageReport_usageItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBillingUsageReport_usageItems(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BillingUsageReport_usageItems) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Date of the usage line item. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetDate()(*string) { + return m.date +} +// GetDiscountAmount gets the discountAmount property value. Discount amount of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BillingUsageReport_usageItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["grossAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetGrossAmount(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["organizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationName(val) + } + return nil + } + res["pricePerUnit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPricePerUnit(val) + } + return nil + } + res["product"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProduct(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["repositoryName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryName(val) + } + return nil + } + res["sku"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSku(val) + } + return nil + } + res["unitType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitType(val) + } + return nil + } + return res +} +// GetGrossAmount gets the grossAmount property value. Gross amount of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetGrossAmount()(*float64) { + return m.grossAmount +} +// GetNetAmount gets the netAmount property value. Net amount of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetNetAmount()(*float64) { + return m.netAmount +} +// GetOrganizationName gets the organizationName property value. Name of the organization. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetOrganizationName()(*string) { + return m.organizationName +} +// GetPricePerUnit gets the pricePerUnit property value. Price per unit of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetPricePerUnit()(*float64) { + return m.pricePerUnit +} +// GetProduct gets the product property value. Product name. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetProduct()(*string) { + return m.product +} +// GetQuantity gets the quantity property value. Quantity of the usage line item. +// returns a *int32 when successful +func (m *BillingUsageReport_usageItems) GetQuantity()(*int32) { + return m.quantity +} +// GetRepositoryName gets the repositoryName property value. Name of the repository. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetRepositoryName()(*string) { + return m.repositoryName +} +// GetSku gets the sku property value. SKU name. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetSku()(*string) { + return m.sku +} +// GetUnitType gets the unitType property value. Unit type of the usage line item. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetUnitType()(*string) { + return m.unitType +} +// Serialize serializes information the current object +func (m *BillingUsageReport_usageItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("grossAmount", m.GetGrossAmount()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizationName", m.GetOrganizationName()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("pricePerUnit", m.GetPricePerUnit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("product", m.GetProduct()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositoryName", m.GetRepositoryName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sku", m.GetSku()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("unitType", m.GetUnitType()) + 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 *BillingUsageReport_usageItems) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Date of the usage line item. +func (m *BillingUsageReport_usageItems) SetDate(value *string)() { + m.date = value +} +// SetDiscountAmount sets the discountAmount property value. Discount amount of the usage line item. +func (m *BillingUsageReport_usageItems) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetGrossAmount sets the grossAmount property value. Gross amount of the usage line item. +func (m *BillingUsageReport_usageItems) SetGrossAmount(value *float64)() { + m.grossAmount = value +} +// SetNetAmount sets the netAmount property value. Net amount of the usage line item. +func (m *BillingUsageReport_usageItems) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetOrganizationName sets the organizationName property value. Name of the organization. +func (m *BillingUsageReport_usageItems) SetOrganizationName(value *string)() { + m.organizationName = value +} +// SetPricePerUnit sets the pricePerUnit property value. Price per unit of the usage line item. +func (m *BillingUsageReport_usageItems) SetPricePerUnit(value *float64)() { + m.pricePerUnit = value +} +// SetProduct sets the product property value. Product name. +func (m *BillingUsageReport_usageItems) SetProduct(value *string)() { + m.product = value +} +// SetQuantity sets the quantity property value. Quantity of the usage line item. +func (m *BillingUsageReport_usageItems) SetQuantity(value *int32)() { + m.quantity = value +} +// SetRepositoryName sets the repositoryName property value. Name of the repository. +func (m *BillingUsageReport_usageItems) SetRepositoryName(value *string)() { + m.repositoryName = value +} +// SetSku sets the sku property value. SKU name. +func (m *BillingUsageReport_usageItems) SetSku(value *string)() { + m.sku = value +} +// SetUnitType sets the unitType property value. Unit type of the usage line item. +func (m *BillingUsageReport_usageItems) SetUnitType(value *string)() { + m.unitType = value +} +type BillingUsageReport_usageItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetDiscountAmount()(*float64) + GetGrossAmount()(*float64) + GetNetAmount()(*float64) + GetOrganizationName()(*string) + GetPricePerUnit()(*float64) + GetProduct()(*string) + GetQuantity()(*int32) + GetRepositoryName()(*string) + GetSku()(*string) + GetUnitType()(*string) + SetDate(value *string)() + SetDiscountAmount(value *float64)() + SetGrossAmount(value *float64)() + SetNetAmount(value *float64)() + SetOrganizationName(value *string)() + SetPricePerUnit(value *float64)() + SetProduct(value *string)() + SetQuantity(value *int32)() + SetRepositoryName(value *string)() + SetSku(value *string)() + SetUnitType(value *string)() +} diff --git a/pkg/github/models/blob.go b/pkg/github/models/blob.go new file mode 100644 index 0000000..f83a820 --- /dev/null +++ b/pkg/github/models/blob.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Blob blob +type Blob struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The content property + content *string + // The encoding property + encoding *string + // The highlighted_content property + highlighted_content *string + // The node_id property + node_id *string + // The sha property + sha *string + // The size property + size *int32 + // The url property + url *string +} +// NewBlob instantiates a new Blob and sets the default values. +func NewBlob()(*Blob) { + m := &Blob{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBlobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBlobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBlob(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Blob) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContent gets the content property value. The content property +// returns a *string when successful +func (m *Blob) GetContent()(*string) { + return m.content +} +// GetEncoding gets the encoding property value. The encoding property +// returns a *string when successful +func (m *Blob) GetEncoding()(*string) { + return m.encoding +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Blob) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["encoding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncoding(val) + } + return nil + } + res["highlighted_content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHighlightedContent(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHighlightedContent gets the highlighted_content property value. The highlighted_content property +// returns a *string when successful +func (m *Blob) GetHighlightedContent()(*string) { + return m.highlighted_content +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Blob) GetNodeId()(*string) { + return m.node_id +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Blob) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *Blob) GetSize()(*int32) { + return m.size +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Blob) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Blob) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("encoding", m.GetEncoding()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("highlighted_content", m.GetHighlightedContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Blob) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContent sets the content property value. The content property +func (m *Blob) SetContent(value *string)() { + m.content = value +} +// SetEncoding sets the encoding property value. The encoding property +func (m *Blob) SetEncoding(value *string)() { + m.encoding = value +} +// SetHighlightedContent sets the highlighted_content property value. The highlighted_content property +func (m *Blob) SetHighlightedContent(value *string)() { + m.highlighted_content = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Blob) SetNodeId(value *string)() { + m.node_id = value +} +// SetSha sets the sha property value. The sha property +func (m *Blob) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *Blob) SetSize(value *int32)() { + m.size = value +} +// SetUrl sets the url property value. The url property +func (m *Blob) SetUrl(value *string)() { + m.url = value +} +type Blobable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetEncoding()(*string) + GetHighlightedContent()(*string) + GetNodeId()(*string) + GetSha()(*string) + GetSize()(*int32) + GetUrl()(*string) + SetContent(value *string)() + SetEncoding(value *string)() + SetHighlightedContent(value *string)() + SetNodeId(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_protection.go b/pkg/github/models/branch_protection.go new file mode 100644 index 0000000..595ce27 --- /dev/null +++ b/pkg/github/models/branch_protection.go @@ -0,0 +1,516 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BranchProtection branch Protection +type BranchProtection struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_deletions property + allow_deletions BranchProtection_allow_deletionsable + // The allow_force_pushes property + allow_force_pushes BranchProtection_allow_force_pushesable + // Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. + allow_fork_syncing BranchProtection_allow_fork_syncingable + // The block_creations property + block_creations BranchProtection_block_creationsable + // The enabled property + enabled *bool + // Protected Branch Admin Enforced + enforce_admins ProtectedBranchAdminEnforcedable + // Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. + lock_branch BranchProtection_lock_branchable + // The name property + name *string + // The protection_url property + protection_url *string + // The required_conversation_resolution property + required_conversation_resolution BranchProtection_required_conversation_resolutionable + // The required_linear_history property + required_linear_history BranchProtection_required_linear_historyable + // Protected Branch Pull Request Review + required_pull_request_reviews ProtectedBranchPullRequestReviewable + // The required_signatures property + required_signatures BranchProtection_required_signaturesable + // Protected Branch Required Status Check + required_status_checks ProtectedBranchRequiredStatusCheckable + // Branch Restriction Policy + restrictions BranchRestrictionPolicyable + // The url property + url *string +} +// NewBranchProtection instantiates a new BranchProtection and sets the default values. +func NewBranchProtection()(*BranchProtection) { + m := &BranchProtection{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowDeletions gets the allow_deletions property value. The allow_deletions property +// returns a BranchProtection_allow_deletionsable when successful +func (m *BranchProtection) GetAllowDeletions()(BranchProtection_allow_deletionsable) { + return m.allow_deletions +} +// GetAllowForcePushes gets the allow_force_pushes property value. The allow_force_pushes property +// returns a BranchProtection_allow_force_pushesable when successful +func (m *BranchProtection) GetAllowForcePushes()(BranchProtection_allow_force_pushesable) { + return m.allow_force_pushes +} +// GetAllowForkSyncing gets the allow_fork_syncing property value. Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. +// returns a BranchProtection_allow_fork_syncingable when successful +func (m *BranchProtection) GetAllowForkSyncing()(BranchProtection_allow_fork_syncingable) { + return m.allow_fork_syncing +} +// GetBlockCreations gets the block_creations property value. The block_creations property +// returns a BranchProtection_block_creationsable when successful +func (m *BranchProtection) GetBlockCreations()(BranchProtection_block_creationsable) { + return m.block_creations +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection) GetEnabled()(*bool) { + return m.enabled +} +// GetEnforceAdmins gets the enforce_admins property value. Protected Branch Admin Enforced +// returns a ProtectedBranchAdminEnforcedable when successful +func (m *BranchProtection) GetEnforceAdmins()(ProtectedBranchAdminEnforcedable) { + return m.enforce_admins +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_allow_deletionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowDeletions(val.(BranchProtection_allow_deletionsable)) + } + return nil + } + res["allow_force_pushes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_allow_force_pushesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowForcePushes(val.(BranchProtection_allow_force_pushesable)) + } + return nil + } + res["allow_fork_syncing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_allow_fork_syncingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowForkSyncing(val.(BranchProtection_allow_fork_syncingable)) + } + return nil + } + res["block_creations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_block_creationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBlockCreations(val.(BranchProtection_block_creationsable)) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["enforce_admins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranchAdminEnforcedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnforceAdmins(val.(ProtectedBranchAdminEnforcedable)) + } + return nil + } + res["lock_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_lock_branchFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLockBranch(val.(BranchProtection_lock_branchable)) + } + 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["protection_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProtectionUrl(val) + } + return nil + } + res["required_conversation_resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_required_conversation_resolutionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredConversationResolution(val.(BranchProtection_required_conversation_resolutionable)) + } + return nil + } + res["required_linear_history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_required_linear_historyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredLinearHistory(val.(BranchProtection_required_linear_historyable)) + } + return nil + } + res["required_pull_request_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranchPullRequestReviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPullRequestReviews(val.(ProtectedBranchPullRequestReviewable)) + } + return nil + } + res["required_signatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtection_required_signaturesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredSignatures(val.(BranchProtection_required_signaturesable)) + } + return nil + } + res["required_status_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranchRequiredStatusCheckFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredStatusChecks(val.(ProtectedBranchRequiredStatusCheckable)) + } + return nil + } + res["restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchRestrictionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestrictions(val.(BranchRestrictionPolicyable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetLockBranch gets the lock_branch property value. Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +// returns a BranchProtection_lock_branchable when successful +func (m *BranchProtection) GetLockBranch()(BranchProtection_lock_branchable) { + return m.lock_branch +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *BranchProtection) GetName()(*string) { + return m.name +} +// GetProtectionUrl gets the protection_url property value. The protection_url property +// returns a *string when successful +func (m *BranchProtection) GetProtectionUrl()(*string) { + return m.protection_url +} +// GetRequiredConversationResolution gets the required_conversation_resolution property value. The required_conversation_resolution property +// returns a BranchProtection_required_conversation_resolutionable when successful +func (m *BranchProtection) GetRequiredConversationResolution()(BranchProtection_required_conversation_resolutionable) { + return m.required_conversation_resolution +} +// GetRequiredLinearHistory gets the required_linear_history property value. The required_linear_history property +// returns a BranchProtection_required_linear_historyable when successful +func (m *BranchProtection) GetRequiredLinearHistory()(BranchProtection_required_linear_historyable) { + return m.required_linear_history +} +// GetRequiredPullRequestReviews gets the required_pull_request_reviews property value. Protected Branch Pull Request Review +// returns a ProtectedBranchPullRequestReviewable when successful +func (m *BranchProtection) GetRequiredPullRequestReviews()(ProtectedBranchPullRequestReviewable) { + return m.required_pull_request_reviews +} +// GetRequiredSignatures gets the required_signatures property value. The required_signatures property +// returns a BranchProtection_required_signaturesable when successful +func (m *BranchProtection) GetRequiredSignatures()(BranchProtection_required_signaturesable) { + return m.required_signatures +} +// GetRequiredStatusChecks gets the required_status_checks property value. Protected Branch Required Status Check +// returns a ProtectedBranchRequiredStatusCheckable when successful +func (m *BranchProtection) GetRequiredStatusChecks()(ProtectedBranchRequiredStatusCheckable) { + return m.required_status_checks +} +// GetRestrictions gets the restrictions property value. Branch Restriction Policy +// returns a BranchRestrictionPolicyable when successful +func (m *BranchProtection) GetRestrictions()(BranchRestrictionPolicyable) { + return m.restrictions +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchProtection) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BranchProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("allow_deletions", m.GetAllowDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("allow_force_pushes", m.GetAllowForcePushes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("allow_fork_syncing", m.GetAllowForkSyncing()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("block_creations", m.GetBlockCreations()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("enforce_admins", m.GetEnforceAdmins()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lock_branch", m.GetLockBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("protection_url", m.GetProtectionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_conversation_resolution", m.GetRequiredConversationResolution()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_linear_history", m.GetRequiredLinearHistory()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_pull_request_reviews", m.GetRequiredPullRequestReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_signatures", m.GetRequiredSignatures()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_status_checks", m.GetRequiredStatusChecks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("restrictions", m.GetRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BranchProtection) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowDeletions sets the allow_deletions property value. The allow_deletions property +func (m *BranchProtection) SetAllowDeletions(value BranchProtection_allow_deletionsable)() { + m.allow_deletions = value +} +// SetAllowForcePushes sets the allow_force_pushes property value. The allow_force_pushes property +func (m *BranchProtection) SetAllowForcePushes(value BranchProtection_allow_force_pushesable)() { + m.allow_force_pushes = value +} +// SetAllowForkSyncing sets the allow_fork_syncing property value. Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. +func (m *BranchProtection) SetAllowForkSyncing(value BranchProtection_allow_fork_syncingable)() { + m.allow_fork_syncing = value +} +// SetBlockCreations sets the block_creations property value. The block_creations property +func (m *BranchProtection) SetBlockCreations(value BranchProtection_block_creationsable)() { + m.block_creations = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection) SetEnabled(value *bool)() { + m.enabled = value +} +// SetEnforceAdmins sets the enforce_admins property value. Protected Branch Admin Enforced +func (m *BranchProtection) SetEnforceAdmins(value ProtectedBranchAdminEnforcedable)() { + m.enforce_admins = value +} +// SetLockBranch sets the lock_branch property value. Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +func (m *BranchProtection) SetLockBranch(value BranchProtection_lock_branchable)() { + m.lock_branch = value +} +// SetName sets the name property value. The name property +func (m *BranchProtection) SetName(value *string)() { + m.name = value +} +// SetProtectionUrl sets the protection_url property value. The protection_url property +func (m *BranchProtection) SetProtectionUrl(value *string)() { + m.protection_url = value +} +// SetRequiredConversationResolution sets the required_conversation_resolution property value. The required_conversation_resolution property +func (m *BranchProtection) SetRequiredConversationResolution(value BranchProtection_required_conversation_resolutionable)() { + m.required_conversation_resolution = value +} +// SetRequiredLinearHistory sets the required_linear_history property value. The required_linear_history property +func (m *BranchProtection) SetRequiredLinearHistory(value BranchProtection_required_linear_historyable)() { + m.required_linear_history = value +} +// SetRequiredPullRequestReviews sets the required_pull_request_reviews property value. Protected Branch Pull Request Review +func (m *BranchProtection) SetRequiredPullRequestReviews(value ProtectedBranchPullRequestReviewable)() { + m.required_pull_request_reviews = value +} +// SetRequiredSignatures sets the required_signatures property value. The required_signatures property +func (m *BranchProtection) SetRequiredSignatures(value BranchProtection_required_signaturesable)() { + m.required_signatures = value +} +// SetRequiredStatusChecks sets the required_status_checks property value. Protected Branch Required Status Check +func (m *BranchProtection) SetRequiredStatusChecks(value ProtectedBranchRequiredStatusCheckable)() { + m.required_status_checks = value +} +// SetRestrictions sets the restrictions property value. Branch Restriction Policy +func (m *BranchProtection) SetRestrictions(value BranchRestrictionPolicyable)() { + m.restrictions = value +} +// SetUrl sets the url property value. The url property +func (m *BranchProtection) SetUrl(value *string)() { + m.url = value +} +type BranchProtectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowDeletions()(BranchProtection_allow_deletionsable) + GetAllowForcePushes()(BranchProtection_allow_force_pushesable) + GetAllowForkSyncing()(BranchProtection_allow_fork_syncingable) + GetBlockCreations()(BranchProtection_block_creationsable) + GetEnabled()(*bool) + GetEnforceAdmins()(ProtectedBranchAdminEnforcedable) + GetLockBranch()(BranchProtection_lock_branchable) + GetName()(*string) + GetProtectionUrl()(*string) + GetRequiredConversationResolution()(BranchProtection_required_conversation_resolutionable) + GetRequiredLinearHistory()(BranchProtection_required_linear_historyable) + GetRequiredPullRequestReviews()(ProtectedBranchPullRequestReviewable) + GetRequiredSignatures()(BranchProtection_required_signaturesable) + GetRequiredStatusChecks()(ProtectedBranchRequiredStatusCheckable) + GetRestrictions()(BranchRestrictionPolicyable) + GetUrl()(*string) + SetAllowDeletions(value BranchProtection_allow_deletionsable)() + SetAllowForcePushes(value BranchProtection_allow_force_pushesable)() + SetAllowForkSyncing(value BranchProtection_allow_fork_syncingable)() + SetBlockCreations(value BranchProtection_block_creationsable)() + SetEnabled(value *bool)() + SetEnforceAdmins(value ProtectedBranchAdminEnforcedable)() + SetLockBranch(value BranchProtection_lock_branchable)() + SetName(value *string)() + SetProtectionUrl(value *string)() + SetRequiredConversationResolution(value BranchProtection_required_conversation_resolutionable)() + SetRequiredLinearHistory(value BranchProtection_required_linear_historyable)() + SetRequiredPullRequestReviews(value ProtectedBranchPullRequestReviewable)() + SetRequiredSignatures(value BranchProtection_required_signaturesable)() + SetRequiredStatusChecks(value ProtectedBranchRequiredStatusCheckable)() + SetRestrictions(value BranchRestrictionPolicyable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_protection_allow_deletions.go b/pkg/github/models/branch_protection_allow_deletions.go new file mode 100644 index 0000000..c633d3e --- /dev/null +++ b/pkg/github/models/branch_protection_allow_deletions.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchProtection_allow_deletions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_allow_deletions instantiates a new BranchProtection_allow_deletions and sets the default values. +func NewBranchProtection_allow_deletions()(*BranchProtection_allow_deletions) { + m := &BranchProtection_allow_deletions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_allow_deletionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_allow_deletionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_allow_deletions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_allow_deletions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_allow_deletions) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_allow_deletions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_allow_deletions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_allow_deletions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_allow_deletions) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_allow_deletionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_allow_force_pushes.go b/pkg/github/models/branch_protection_allow_force_pushes.go new file mode 100644 index 0000000..4745c2e --- /dev/null +++ b/pkg/github/models/branch_protection_allow_force_pushes.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchProtection_allow_force_pushes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_allow_force_pushes instantiates a new BranchProtection_allow_force_pushes and sets the default values. +func NewBranchProtection_allow_force_pushes()(*BranchProtection_allow_force_pushes) { + m := &BranchProtection_allow_force_pushes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_allow_force_pushesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_allow_force_pushesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_allow_force_pushes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_allow_force_pushes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_allow_force_pushes) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_allow_force_pushes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_allow_force_pushes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_allow_force_pushes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_allow_force_pushes) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_allow_force_pushesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_allow_fork_syncing.go b/pkg/github/models/branch_protection_allow_fork_syncing.go new file mode 100644 index 0000000..a9be4df --- /dev/null +++ b/pkg/github/models/branch_protection_allow_fork_syncing.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BranchProtection_allow_fork_syncing whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. +type BranchProtection_allow_fork_syncing struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_allow_fork_syncing instantiates a new BranchProtection_allow_fork_syncing and sets the default values. +func NewBranchProtection_allow_fork_syncing()(*BranchProtection_allow_fork_syncing) { + m := &BranchProtection_allow_fork_syncing{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_allow_fork_syncingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_allow_fork_syncingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_allow_fork_syncing(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_allow_fork_syncing) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_allow_fork_syncing) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_allow_fork_syncing) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_allow_fork_syncing) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_allow_fork_syncing) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_allow_fork_syncing) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_allow_fork_syncingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_block_creations.go b/pkg/github/models/branch_protection_block_creations.go new file mode 100644 index 0000000..dc34c0c --- /dev/null +++ b/pkg/github/models/branch_protection_block_creations.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchProtection_block_creations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_block_creations instantiates a new BranchProtection_block_creations and sets the default values. +func NewBranchProtection_block_creations()(*BranchProtection_block_creations) { + m := &BranchProtection_block_creations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_block_creationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_block_creationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_block_creations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_block_creations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_block_creations) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_block_creations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_block_creations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_block_creations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_block_creations) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_block_creationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_lock_branch.go b/pkg/github/models/branch_protection_lock_branch.go new file mode 100644 index 0000000..fc2c1b0 --- /dev/null +++ b/pkg/github/models/branch_protection_lock_branch.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BranchProtection_lock_branch whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +type BranchProtection_lock_branch struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_lock_branch instantiates a new BranchProtection_lock_branch and sets the default values. +func NewBranchProtection_lock_branch()(*BranchProtection_lock_branch) { + m := &BranchProtection_lock_branch{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_lock_branchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_lock_branchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_lock_branch(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_lock_branch) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_lock_branch) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_lock_branch) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_lock_branch) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_lock_branch) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_lock_branch) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_lock_branchable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_required_conversation_resolution.go b/pkg/github/models/branch_protection_required_conversation_resolution.go new file mode 100644 index 0000000..b772d30 --- /dev/null +++ b/pkg/github/models/branch_protection_required_conversation_resolution.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchProtection_required_conversation_resolution struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_required_conversation_resolution instantiates a new BranchProtection_required_conversation_resolution and sets the default values. +func NewBranchProtection_required_conversation_resolution()(*BranchProtection_required_conversation_resolution) { + m := &BranchProtection_required_conversation_resolution{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_required_conversation_resolutionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_required_conversation_resolutionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_required_conversation_resolution(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_required_conversation_resolution) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_required_conversation_resolution) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_required_conversation_resolution) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_required_conversation_resolution) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_required_conversation_resolution) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_required_conversation_resolution) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_required_conversation_resolutionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_required_linear_history.go b/pkg/github/models/branch_protection_required_linear_history.go new file mode 100644 index 0000000..b804813 --- /dev/null +++ b/pkg/github/models/branch_protection_required_linear_history.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchProtection_required_linear_history struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool +} +// NewBranchProtection_required_linear_history instantiates a new BranchProtection_required_linear_history and sets the default values. +func NewBranchProtection_required_linear_history()(*BranchProtection_required_linear_history) { + m := &BranchProtection_required_linear_history{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_required_linear_historyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_required_linear_historyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_required_linear_history(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_required_linear_history) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_required_linear_history) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_required_linear_history) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BranchProtection_required_linear_history) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *BranchProtection_required_linear_history) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_required_linear_history) SetEnabled(value *bool)() { + m.enabled = value +} +type BranchProtection_required_linear_historyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/branch_protection_required_signatures.go b/pkg/github/models/branch_protection_required_signatures.go new file mode 100644 index 0000000..fdd4af5 --- /dev/null +++ b/pkg/github/models/branch_protection_required_signatures.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchProtection_required_signatures struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool + // The url property + url *string +} +// NewBranchProtection_required_signatures instantiates a new BranchProtection_required_signatures and sets the default values. +func NewBranchProtection_required_signatures()(*BranchProtection_required_signatures) { + m := &BranchProtection_required_signatures{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchProtection_required_signaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchProtection_required_signaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchProtection_required_signatures(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchProtection_required_signatures) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *BranchProtection_required_signatures) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchProtection_required_signatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchProtection_required_signatures) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BranchProtection_required_signatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BranchProtection_required_signatures) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *BranchProtection_required_signatures) SetEnabled(value *bool)() { + m.enabled = value +} +// SetUrl sets the url property value. The url property +func (m *BranchProtection_required_signatures) SetUrl(value *string)() { + m.url = value +} +type BranchProtection_required_signaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetUrl()(*string) + SetEnabled(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_restriction_policy.go b/pkg/github/models/branch_restriction_policy.go new file mode 100644 index 0000000..acfa68d --- /dev/null +++ b/pkg/github/models/branch_restriction_policy.go @@ -0,0 +1,291 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BranchRestrictionPolicy branch Restriction Policy +type BranchRestrictionPolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The apps property + apps []BranchRestrictionPolicy_appsable + // The apps_url property + apps_url *string + // The teams property + teams []BranchRestrictionPolicy_teamsable + // The teams_url property + teams_url *string + // The url property + url *string + // The users property + users []BranchRestrictionPolicy_usersable + // The users_url property + users_url *string +} +// NewBranchRestrictionPolicy instantiates a new BranchRestrictionPolicy and sets the default values. +func NewBranchRestrictionPolicy()(*BranchRestrictionPolicy) { + m := &BranchRestrictionPolicy{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchRestrictionPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchRestrictionPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchRestrictionPolicy(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchRestrictionPolicy) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The apps property +// returns a []BranchRestrictionPolicy_appsable when successful +func (m *BranchRestrictionPolicy) GetApps()([]BranchRestrictionPolicy_appsable) { + return m.apps +} +// GetAppsUrl gets the apps_url property value. The apps_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy) GetAppsUrl()(*string) { + return m.apps_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchRestrictionPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBranchRestrictionPolicy_appsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BranchRestrictionPolicy_appsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BranchRestrictionPolicy_appsable) + } + } + m.SetApps(res) + } + return nil + } + res["apps_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsUrl(val) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBranchRestrictionPolicy_teamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BranchRestrictionPolicy_teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BranchRestrictionPolicy_teamsable) + } + } + m.SetTeams(res) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBranchRestrictionPolicy_usersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BranchRestrictionPolicy_usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BranchRestrictionPolicy_usersable) + } + } + m.SetUsers(res) + } + return nil + } + res["users_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsersUrl(val) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The teams property +// returns a []BranchRestrictionPolicy_teamsable when successful +func (m *BranchRestrictionPolicy) GetTeams()([]BranchRestrictionPolicy_teamsable) { + return m.teams +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchRestrictionPolicy) GetUrl()(*string) { + return m.url +} +// GetUsers gets the users property value. The users property +// returns a []BranchRestrictionPolicy_usersable when successful +func (m *BranchRestrictionPolicy) GetUsers()([]BranchRestrictionPolicy_usersable) { + return m.users +} +// GetUsersUrl gets the users_url property value. The users_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy) GetUsersUrl()(*string) { + return m.users_url +} +// Serialize serializes information the current object +func (m *BranchRestrictionPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("apps_url", m.GetAppsUrl()) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("users_url", m.GetUsersUrl()) + 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 *BranchRestrictionPolicy) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The apps property +func (m *BranchRestrictionPolicy) SetApps(value []BranchRestrictionPolicy_appsable)() { + m.apps = value +} +// SetAppsUrl sets the apps_url property value. The apps_url property +func (m *BranchRestrictionPolicy) SetAppsUrl(value *string)() { + m.apps_url = value +} +// SetTeams sets the teams property value. The teams property +func (m *BranchRestrictionPolicy) SetTeams(value []BranchRestrictionPolicy_teamsable)() { + m.teams = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *BranchRestrictionPolicy) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetUrl sets the url property value. The url property +func (m *BranchRestrictionPolicy) SetUrl(value *string)() { + m.url = value +} +// SetUsers sets the users property value. The users property +func (m *BranchRestrictionPolicy) SetUsers(value []BranchRestrictionPolicy_usersable)() { + m.users = value +} +// SetUsersUrl sets the users_url property value. The users_url property +func (m *BranchRestrictionPolicy) SetUsersUrl(value *string)() { + m.users_url = value +} +type BranchRestrictionPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]BranchRestrictionPolicy_appsable) + GetAppsUrl()(*string) + GetTeams()([]BranchRestrictionPolicy_teamsable) + GetTeamsUrl()(*string) + GetUrl()(*string) + GetUsers()([]BranchRestrictionPolicy_usersable) + GetUsersUrl()(*string) + SetApps(value []BranchRestrictionPolicy_appsable)() + SetAppsUrl(value *string)() + SetTeams(value []BranchRestrictionPolicy_teamsable)() + SetTeamsUrl(value *string)() + SetUrl(value *string)() + SetUsers(value []BranchRestrictionPolicy_usersable)() + SetUsersUrl(value *string)() +} diff --git a/pkg/github/models/branch_restriction_policy_apps.go b/pkg/github/models/branch_restriction_policy_apps.go new file mode 100644 index 0000000..fff868e --- /dev/null +++ b/pkg/github/models/branch_restriction_policy_apps.go @@ -0,0 +1,405 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchRestrictionPolicy_apps struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The description property + description *string + // The events property + events []string + // The external_url property + external_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The name property + name *string + // The node_id property + node_id *string + // The owner property + owner BranchRestrictionPolicy_apps_ownerable + // The permissions property + permissions BranchRestrictionPolicy_apps_permissionsable + // The slug property + slug *string + // The updated_at property + updated_at *string +} +// NewBranchRestrictionPolicy_apps instantiates a new BranchRestrictionPolicy_apps and sets the default values. +func NewBranchRestrictionPolicy_apps()(*BranchRestrictionPolicy_apps) { + m := &BranchRestrictionPolicy_apps{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchRestrictionPolicy_appsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchRestrictionPolicy_appsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchRestrictionPolicy_apps(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchRestrictionPolicy_apps) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetCreatedAt()(*string) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetDescription()(*string) { + return m.description +} +// GetEvents gets the events property value. The events property +// returns a []string when successful +func (m *BranchRestrictionPolicy_apps) GetEvents()([]string) { + return m.events +} +// GetExternalUrl gets the external_url property value. The external_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetExternalUrl()(*string) { + return m.external_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchRestrictionPolicy_apps) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["external_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchRestrictionPolicy_apps_ownerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(BranchRestrictionPolicy_apps_ownerable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchRestrictionPolicy_apps_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(BranchRestrictionPolicy_apps_permissionsable)) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *BranchRestrictionPolicy_apps) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetNodeId()(*string) { + return m.node_id +} +// GetOwner gets the owner property value. The owner property +// returns a BranchRestrictionPolicy_apps_ownerable when successful +func (m *BranchRestrictionPolicy_apps) GetOwner()(BranchRestrictionPolicy_apps_ownerable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a BranchRestrictionPolicy_apps_permissionsable when successful +func (m *BranchRestrictionPolicy_apps) GetPermissions()(BranchRestrictionPolicy_apps_permissionsable) { + return m.permissions +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetSlug()(*string) { + return m.slug +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps) GetUpdatedAt()(*string) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *BranchRestrictionPolicy_apps) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("external_url", m.GetExternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BranchRestrictionPolicy_apps) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *BranchRestrictionPolicy_apps) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *BranchRestrictionPolicy_apps) SetDescription(value *string)() { + m.description = value +} +// SetEvents sets the events property value. The events property +func (m *BranchRestrictionPolicy_apps) SetEvents(value []string)() { + m.events = value +} +// SetExternalUrl sets the external_url property value. The external_url property +func (m *BranchRestrictionPolicy_apps) SetExternalUrl(value *string)() { + m.external_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *BranchRestrictionPolicy_apps) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *BranchRestrictionPolicy_apps) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *BranchRestrictionPolicy_apps) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *BranchRestrictionPolicy_apps) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwner sets the owner property value. The owner property +func (m *BranchRestrictionPolicy_apps) SetOwner(value BranchRestrictionPolicy_apps_ownerable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *BranchRestrictionPolicy_apps) SetPermissions(value BranchRestrictionPolicy_apps_permissionsable)() { + m.permissions = value +} +// SetSlug sets the slug property value. The slug property +func (m *BranchRestrictionPolicy_apps) SetSlug(value *string)() { + m.slug = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *BranchRestrictionPolicy_apps) SetUpdatedAt(value *string)() { + m.updated_at = value +} +type BranchRestrictionPolicy_appsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetDescription()(*string) + GetEvents()([]string) + GetExternalUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetOwner()(BranchRestrictionPolicy_apps_ownerable) + GetPermissions()(BranchRestrictionPolicy_apps_permissionsable) + GetSlug()(*string) + GetUpdatedAt()(*string) + SetCreatedAt(value *string)() + SetDescription(value *string)() + SetEvents(value []string)() + SetExternalUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetOwner(value BranchRestrictionPolicy_apps_ownerable)() + SetPermissions(value BranchRestrictionPolicy_apps_permissionsable)() + SetSlug(value *string)() + SetUpdatedAt(value *string)() +} diff --git a/pkg/github/models/branch_restriction_policy_apps_owner.go b/pkg/github/models/branch_restriction_policy_apps_owner.go new file mode 100644 index 0000000..af436c8 --- /dev/null +++ b/pkg/github/models/branch_restriction_policy_apps_owner.go @@ -0,0 +1,718 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchRestrictionPolicy_apps_owner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The description property + description *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The issues_url property + issues_url *string + // The login property + login *string + // The members_url property + members_url *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The public_members_url property + public_members_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewBranchRestrictionPolicy_apps_owner instantiates a new BranchRestrictionPolicy_apps_owner and sets the default values. +func NewBranchRestrictionPolicy_apps_owner()(*BranchRestrictionPolicy_apps_owner) { + m := &BranchRestrictionPolicy_apps_owner{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchRestrictionPolicy_apps_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchRestrictionPolicy_apps_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchRestrictionPolicy_apps_owner(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchRestrictionPolicy_apps_owner) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetDescription()(*string) { + return m.description +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchRestrictionPolicy_apps_owner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicMembersUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *BranchRestrictionPolicy_apps_owner) GetId()(*int32) { + return m.id +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetLogin()(*string) { + return m.login +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetMembersUrl()(*string) { + return m.members_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetPublicMembersUrl()(*string) { + return m.public_members_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *BranchRestrictionPolicy_apps_owner) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_owner) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BranchRestrictionPolicy_apps_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *BranchRestrictionPolicy_apps_owner) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *BranchRestrictionPolicy_apps_owner) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetDescription sets the description property value. The description property +func (m *BranchRestrictionPolicy_apps_owner) SetDescription(value *string)() { + m.description = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *BranchRestrictionPolicy_apps_owner) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *BranchRestrictionPolicy_apps_owner) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *BranchRestrictionPolicy_apps_owner) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *BranchRestrictionPolicy_apps_owner) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *BranchRestrictionPolicy_apps_owner) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *BranchRestrictionPolicy_apps_owner) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *BranchRestrictionPolicy_apps_owner) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *BranchRestrictionPolicy_apps_owner) SetId(value *int32)() { + m.id = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *BranchRestrictionPolicy_apps_owner) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetLogin sets the login property value. The login property +func (m *BranchRestrictionPolicy_apps_owner) SetLogin(value *string)() { + m.login = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *BranchRestrictionPolicy_apps_owner) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *BranchRestrictionPolicy_apps_owner) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *BranchRestrictionPolicy_apps_owner) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property +func (m *BranchRestrictionPolicy_apps_owner) SetPublicMembersUrl(value *string)() { + m.public_members_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *BranchRestrictionPolicy_apps_owner) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *BranchRestrictionPolicy_apps_owner) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *BranchRestrictionPolicy_apps_owner) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *BranchRestrictionPolicy_apps_owner) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *BranchRestrictionPolicy_apps_owner) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *BranchRestrictionPolicy_apps_owner) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *BranchRestrictionPolicy_apps_owner) SetUrl(value *string)() { + m.url = value +} +type BranchRestrictionPolicy_apps_ownerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetDescription()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssuesUrl()(*string) + GetLogin()(*string) + GetMembersUrl()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetPublicMembersUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetDescription(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssuesUrl(value *string)() + SetLogin(value *string)() + SetMembersUrl(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetPublicMembersUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_restriction_policy_apps_permissions.go b/pkg/github/models/branch_restriction_policy_apps_permissions.go new file mode 100644 index 0000000..3a9f9a7 --- /dev/null +++ b/pkg/github/models/branch_restriction_policy_apps_permissions.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchRestrictionPolicy_apps_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contents property + contents *string + // The issues property + issues *string + // The metadata property + metadata *string + // The single_file property + single_file *string +} +// NewBranchRestrictionPolicy_apps_permissions instantiates a new BranchRestrictionPolicy_apps_permissions and sets the default values. +func NewBranchRestrictionPolicy_apps_permissions()(*BranchRestrictionPolicy_apps_permissions) { + m := &BranchRestrictionPolicy_apps_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchRestrictionPolicy_apps_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchRestrictionPolicy_apps_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchRestrictionPolicy_apps_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchRestrictionPolicy_apps_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContents gets the contents property value. The contents property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_permissions) GetContents()(*string) { + return m.contents +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchRestrictionPolicy_apps_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContents(val) + } + return nil + } + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssues(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val) + } + return nil + } + res["single_file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleFile(val) + } + return nil + } + return res +} +// GetIssues gets the issues property value. The issues property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_permissions) GetIssues()(*string) { + return m.issues +} +// GetMetadata gets the metadata property value. The metadata property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_permissions) GetMetadata()(*string) { + return m.metadata +} +// GetSingleFile gets the single_file property value. The single_file property +// returns a *string when successful +func (m *BranchRestrictionPolicy_apps_permissions) GetSingleFile()(*string) { + return m.single_file +} +// Serialize serializes information the current object +func (m *BranchRestrictionPolicy_apps_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("contents", m.GetContents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues", m.GetIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("single_file", m.GetSingleFile()) + 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 *BranchRestrictionPolicy_apps_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContents sets the contents property value. The contents property +func (m *BranchRestrictionPolicy_apps_permissions) SetContents(value *string)() { + m.contents = value +} +// SetIssues sets the issues property value. The issues property +func (m *BranchRestrictionPolicy_apps_permissions) SetIssues(value *string)() { + m.issues = value +} +// SetMetadata sets the metadata property value. The metadata property +func (m *BranchRestrictionPolicy_apps_permissions) SetMetadata(value *string)() { + m.metadata = value +} +// SetSingleFile sets the single_file property value. The single_file property +func (m *BranchRestrictionPolicy_apps_permissions) SetSingleFile(value *string)() { + m.single_file = value +} +type BranchRestrictionPolicy_apps_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContents()(*string) + GetIssues()(*string) + GetMetadata()(*string) + GetSingleFile()(*string) + SetContents(value *string)() + SetIssues(value *string)() + SetMetadata(value *string)() + SetSingleFile(value *string)() +} diff --git a/pkg/github/models/branch_restriction_policy_teams.go b/pkg/github/models/branch_restriction_policy_teams.go new file mode 100644 index 0000000..b12b296 --- /dev/null +++ b/pkg/github/models/branch_restriction_policy_teams.go @@ -0,0 +1,428 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchRestrictionPolicy_teams struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // The html_url property + html_url *string + // The id property + id *int32 + // The members_url property + members_url *string + // The name property + name *string + // The node_id property + node_id *string + // The notification_setting property + notification_setting *string + // The parent property + parent *string + // The permission property + permission *string + // The privacy property + privacy *string + // The repositories_url property + repositories_url *string + // The slug property + slug *string + // The url property + url *string +} +// NewBranchRestrictionPolicy_teams instantiates a new BranchRestrictionPolicy_teams and sets the default values. +func NewBranchRestrictionPolicy_teams()(*BranchRestrictionPolicy_teams) { + m := &BranchRestrictionPolicy_teams{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchRestrictionPolicy_teamsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchRestrictionPolicy_teamsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchRestrictionPolicy_teams(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchRestrictionPolicy_teams) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchRestrictionPolicy_teams) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationSetting(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParent(val) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *BranchRestrictionPolicy_teams) GetId()(*int32) { + return m.id +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationSetting gets the notification_setting property value. The notification_setting property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetNotificationSetting()(*string) { + return m.notification_setting +} +// GetParent gets the parent property value. The parent property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetParent()(*string) { + return m.parent +} +// GetPermission gets the permission property value. The permission property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetPermission()(*string) { + return m.permission +} +// GetPrivacy gets the privacy property value. The privacy property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetPrivacy()(*string) { + return m.privacy +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetSlug()(*string) { + return m.slug +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_teams) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BranchRestrictionPolicy_teams) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_setting", m.GetNotificationSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacy", m.GetPrivacy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BranchRestrictionPolicy_teams) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *BranchRestrictionPolicy_teams) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *BranchRestrictionPolicy_teams) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *BranchRestrictionPolicy_teams) SetId(value *int32)() { + m.id = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *BranchRestrictionPolicy_teams) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *BranchRestrictionPolicy_teams) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *BranchRestrictionPolicy_teams) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationSetting sets the notification_setting property value. The notification_setting property +func (m *BranchRestrictionPolicy_teams) SetNotificationSetting(value *string)() { + m.notification_setting = value +} +// SetParent sets the parent property value. The parent property +func (m *BranchRestrictionPolicy_teams) SetParent(value *string)() { + m.parent = value +} +// SetPermission sets the permission property value. The permission property +func (m *BranchRestrictionPolicy_teams) SetPermission(value *string)() { + m.permission = value +} +// SetPrivacy sets the privacy property value. The privacy property +func (m *BranchRestrictionPolicy_teams) SetPrivacy(value *string)() { + m.privacy = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *BranchRestrictionPolicy_teams) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetSlug sets the slug property value. The slug property +func (m *BranchRestrictionPolicy_teams) SetSlug(value *string)() { + m.slug = value +} +// SetUrl sets the url property value. The url property +func (m *BranchRestrictionPolicy_teams) SetUrl(value *string)() { + m.url = value +} +type BranchRestrictionPolicy_teamsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationSetting()(*string) + GetParent()(*string) + GetPermission()(*string) + GetPrivacy()(*string) + GetRepositoriesUrl()(*string) + GetSlug()(*string) + GetUrl()(*string) + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationSetting(value *string)() + SetParent(value *string)() + SetPermission(value *string)() + SetPrivacy(value *string)() + SetRepositoriesUrl(value *string)() + SetSlug(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_restriction_policy_users.go b/pkg/github/models/branch_restriction_policy_users.go new file mode 100644 index 0000000..96629f5 --- /dev/null +++ b/pkg/github/models/branch_restriction_policy_users.go @@ -0,0 +1,573 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchRestrictionPolicy_users struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewBranchRestrictionPolicy_users instantiates a new BranchRestrictionPolicy_users and sets the default values. +func NewBranchRestrictionPolicy_users()(*BranchRestrictionPolicy_users) { + m := &BranchRestrictionPolicy_users{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchRestrictionPolicy_usersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchRestrictionPolicy_usersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchRestrictionPolicy_users(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchRestrictionPolicy_users) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchRestrictionPolicy_users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *BranchRestrictionPolicy_users) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *BranchRestrictionPolicy_users) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchRestrictionPolicy_users) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BranchRestrictionPolicy_users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *BranchRestrictionPolicy_users) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *BranchRestrictionPolicy_users) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *BranchRestrictionPolicy_users) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *BranchRestrictionPolicy_users) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *BranchRestrictionPolicy_users) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *BranchRestrictionPolicy_users) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *BranchRestrictionPolicy_users) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *BranchRestrictionPolicy_users) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *BranchRestrictionPolicy_users) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *BranchRestrictionPolicy_users) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *BranchRestrictionPolicy_users) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *BranchRestrictionPolicy_users) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *BranchRestrictionPolicy_users) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *BranchRestrictionPolicy_users) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *BranchRestrictionPolicy_users) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *BranchRestrictionPolicy_users) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *BranchRestrictionPolicy_users) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *BranchRestrictionPolicy_users) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *BranchRestrictionPolicy_users) SetUrl(value *string)() { + m.url = value +} +type BranchRestrictionPolicy_usersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_short.go b/pkg/github/models/branch_short.go new file mode 100644 index 0000000..7c7c734 --- /dev/null +++ b/pkg/github/models/branch_short.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BranchShort branch Short +type BranchShort struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit property + commit BranchShort_commitable + // The name property + name *string + // The protected property + protected *bool +} +// NewBranchShort instantiates a new BranchShort and sets the default values. +func NewBranchShort()(*BranchShort) { + m := &BranchShort{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchShortFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchShortFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchShort(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchShort) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommit gets the commit property value. The commit property +// returns a BranchShort_commitable when successful +func (m *BranchShort) GetCommit()(BranchShort_commitable) { + return m.commit +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchShort) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchShort_commitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(BranchShort_commitable)) + } + 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["protected"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProtected(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *BranchShort) GetName()(*string) { + return m.name +} +// GetProtected gets the protected property value. The protected property +// returns a *bool when successful +func (m *BranchShort) GetProtected()(*bool) { + return m.protected +} +// Serialize serializes information the current object +func (m *BranchShort) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("protected", m.GetProtected()) + 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 *BranchShort) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommit sets the commit property value. The commit property +func (m *BranchShort) SetCommit(value BranchShort_commitable)() { + m.commit = value +} +// SetName sets the name property value. The name property +func (m *BranchShort) SetName(value *string)() { + m.name = value +} +// SetProtected sets the protected property value. The protected property +func (m *BranchShort) SetProtected(value *bool)() { + m.protected = value +} +type BranchShortable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommit()(BranchShort_commitable) + GetName()(*string) + GetProtected()(*bool) + SetCommit(value BranchShort_commitable)() + SetName(value *string)() + SetProtected(value *bool)() +} diff --git a/pkg/github/models/branch_short_commit.go b/pkg/github/models/branch_short_commit.go new file mode 100644 index 0000000..080cf0e --- /dev/null +++ b/pkg/github/models/branch_short_commit.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchShort_commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewBranchShort_commit instantiates a new BranchShort_commit and sets the default values. +func NewBranchShort_commit()(*BranchShort_commit) { + m := &BranchShort_commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchShort_commitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchShort_commitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchShort_commit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchShort_commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchShort_commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *BranchShort_commit) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *BranchShort_commit) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *BranchShort_commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BranchShort_commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *BranchShort_commit) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *BranchShort_commit) SetUrl(value *string)() { + m.url = value +} +type BranchShort_commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/branch_with_protection.go b/pkg/github/models/branch_with_protection.go new file mode 100644 index 0000000..cc8e998 --- /dev/null +++ b/pkg/github/models/branch_with_protection.go @@ -0,0 +1,284 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BranchWithProtection branch With Protection +type BranchWithProtection struct { + // The _links property + _links BranchWithProtection__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Commit + commit Commitable + // The name property + name *string + // The pattern property + pattern *string + // The protected property + protected *bool + // Branch Protection + protection BranchProtectionable + // The protection_url property + protection_url *string + // The required_approving_review_count property + required_approving_review_count *int32 +} +// NewBranchWithProtection instantiates a new BranchWithProtection and sets the default values. +func NewBranchWithProtection()(*BranchWithProtection) { + m := &BranchWithProtection{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchWithProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchWithProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchWithProtection(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchWithProtection) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommit gets the commit property value. Commit +// returns a Commitable when successful +func (m *BranchWithProtection) GetCommit()(Commitable) { + return m.commit +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchWithProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchWithProtection__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(BranchWithProtection__linksable)) + } + return nil + } + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(Commitable)) + } + 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["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + res["protected"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProtected(val) + } + return nil + } + res["protection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProtection(val.(BranchProtectionable)) + } + return nil + } + res["protection_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProtectionUrl(val) + } + return nil + } + res["required_approving_review_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequiredApprovingReviewCount(val) + } + return nil + } + return res +} +// GetLinks gets the _links property value. The _links property +// returns a BranchWithProtection__linksable when successful +func (m *BranchWithProtection) GetLinks()(BranchWithProtection__linksable) { + return m._links +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *BranchWithProtection) GetName()(*string) { + return m.name +} +// GetPattern gets the pattern property value. The pattern property +// returns a *string when successful +func (m *BranchWithProtection) GetPattern()(*string) { + return m.pattern +} +// GetProtected gets the protected property value. The protected property +// returns a *bool when successful +func (m *BranchWithProtection) GetProtected()(*bool) { + return m.protected +} +// GetProtection gets the protection property value. Branch Protection +// returns a BranchProtectionable when successful +func (m *BranchWithProtection) GetProtection()(BranchProtectionable) { + return m.protection +} +// GetProtectionUrl gets the protection_url property value. The protection_url property +// returns a *string when successful +func (m *BranchWithProtection) GetProtectionUrl()(*string) { + return m.protection_url +} +// GetRequiredApprovingReviewCount gets the required_approving_review_count property value. The required_approving_review_count property +// returns a *int32 when successful +func (m *BranchWithProtection) GetRequiredApprovingReviewCount()(*int32) { + return m.required_approving_review_count +} +// Serialize serializes information the current object +func (m *BranchWithProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("protected", m.GetProtected()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("protection", m.GetProtection()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("protection_url", m.GetProtectionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("required_approving_review_count", m.GetRequiredApprovingReviewCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *BranchWithProtection) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommit sets the commit property value. Commit +func (m *BranchWithProtection) SetCommit(value Commitable)() { + m.commit = value +} +// SetLinks sets the _links property value. The _links property +func (m *BranchWithProtection) SetLinks(value BranchWithProtection__linksable)() { + m._links = value +} +// SetName sets the name property value. The name property +func (m *BranchWithProtection) SetName(value *string)() { + m.name = value +} +// SetPattern sets the pattern property value. The pattern property +func (m *BranchWithProtection) SetPattern(value *string)() { + m.pattern = value +} +// SetProtected sets the protected property value. The protected property +func (m *BranchWithProtection) SetProtected(value *bool)() { + m.protected = value +} +// SetProtection sets the protection property value. Branch Protection +func (m *BranchWithProtection) SetProtection(value BranchProtectionable)() { + m.protection = value +} +// SetProtectionUrl sets the protection_url property value. The protection_url property +func (m *BranchWithProtection) SetProtectionUrl(value *string)() { + m.protection_url = value +} +// SetRequiredApprovingReviewCount sets the required_approving_review_count property value. The required_approving_review_count property +func (m *BranchWithProtection) SetRequiredApprovingReviewCount(value *int32)() { + m.required_approving_review_count = value +} +type BranchWithProtectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommit()(Commitable) + GetLinks()(BranchWithProtection__linksable) + GetName()(*string) + GetPattern()(*string) + GetProtected()(*bool) + GetProtection()(BranchProtectionable) + GetProtectionUrl()(*string) + GetRequiredApprovingReviewCount()(*int32) + SetCommit(value Commitable)() + SetLinks(value BranchWithProtection__linksable)() + SetName(value *string)() + SetPattern(value *string)() + SetProtected(value *bool)() + SetProtection(value BranchProtectionable)() + SetProtectionUrl(value *string)() + SetRequiredApprovingReviewCount(value *int32)() +} diff --git a/pkg/github/models/branch_with_protection__links.go b/pkg/github/models/branch_with_protection__links.go new file mode 100644 index 0000000..8e03d52 --- /dev/null +++ b/pkg/github/models/branch_with_protection__links.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BranchWithProtection__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html property + html *string + // The self property + self *string +} +// NewBranchWithProtection__links instantiates a new BranchWithProtection__links and sets the default values. +func NewBranchWithProtection__links()(*BranchWithProtection__links) { + m := &BranchWithProtection__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBranchWithProtection__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBranchWithProtection__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBranchWithProtection__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BranchWithProtection__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BranchWithProtection__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtml(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetHtml gets the html property value. The html property +// returns a *string when successful +func (m *BranchWithProtection__links) GetHtml()(*string) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *BranchWithProtection__links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *BranchWithProtection__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + 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 *BranchWithProtection__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtml sets the html property value. The html property +func (m *BranchWithProtection__links) SetHtml(value *string)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *BranchWithProtection__links) SetSelf(value *string)() { + m.self = value +} +type BranchWithProtection__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtml()(*string) + GetSelf()(*string) + SetHtml(value *string)() + SetSelf(value *string)() +} diff --git a/pkg/github/models/check_annotation.go b/pkg/github/models/check_annotation.go new file mode 100644 index 0000000..bc26879 --- /dev/null +++ b/pkg/github/models/check_annotation.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CheckAnnotation check Annotation +type CheckAnnotation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The annotation_level property + annotation_level *string + // The blob_href property + blob_href *string + // The end_column property + end_column *int32 + // The end_line property + end_line *int32 + // The message property + message *string + // The path property + path *string + // The raw_details property + raw_details *string + // The start_column property + start_column *int32 + // The start_line property + start_line *int32 + // The title property + title *string +} +// NewCheckAnnotation instantiates a new CheckAnnotation and sets the default values. +func NewCheckAnnotation()(*CheckAnnotation) { + m := &CheckAnnotation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckAnnotationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckAnnotationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckAnnotation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckAnnotation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnnotationLevel gets the annotation_level property value. The annotation_level property +// returns a *string when successful +func (m *CheckAnnotation) GetAnnotationLevel()(*string) { + return m.annotation_level +} +// GetBlobHref gets the blob_href property value. The blob_href property +// returns a *string when successful +func (m *CheckAnnotation) GetBlobHref()(*string) { + return m.blob_href +} +// GetEndColumn gets the end_column property value. The end_column property +// returns a *int32 when successful +func (m *CheckAnnotation) GetEndColumn()(*int32) { + return m.end_column +} +// GetEndLine gets the end_line property value. The end_line property +// returns a *int32 when successful +func (m *CheckAnnotation) GetEndLine()(*int32) { + return m.end_line +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckAnnotation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["annotation_level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnnotationLevel(val) + } + return nil + } + res["blob_href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobHref(val) + } + return nil + } + res["end_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEndColumn(val) + } + return nil + } + res["end_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEndLine(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 + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["raw_details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawDetails(val) + } + return nil + } + res["start_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartColumn(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CheckAnnotation) GetMessage()(*string) { + return m.message +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *CheckAnnotation) GetPath()(*string) { + return m.path +} +// GetRawDetails gets the raw_details property value. The raw_details property +// returns a *string when successful +func (m *CheckAnnotation) GetRawDetails()(*string) { + return m.raw_details +} +// GetStartColumn gets the start_column property value. The start_column property +// returns a *int32 when successful +func (m *CheckAnnotation) GetStartColumn()(*int32) { + return m.start_column +} +// GetStartLine gets the start_line property value. The start_line property +// returns a *int32 when successful +func (m *CheckAnnotation) GetStartLine()(*int32) { + return m.start_line +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *CheckAnnotation) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *CheckAnnotation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("annotation_level", m.GetAnnotationLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blob_href", m.GetBlobHref()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("end_column", m.GetEndColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("end_line", m.GetEndLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("raw_details", m.GetRawDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_column", m.GetStartColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *CheckAnnotation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnnotationLevel sets the annotation_level property value. The annotation_level property +func (m *CheckAnnotation) SetAnnotationLevel(value *string)() { + m.annotation_level = value +} +// SetBlobHref sets the blob_href property value. The blob_href property +func (m *CheckAnnotation) SetBlobHref(value *string)() { + m.blob_href = value +} +// SetEndColumn sets the end_column property value. The end_column property +func (m *CheckAnnotation) SetEndColumn(value *int32)() { + m.end_column = value +} +// SetEndLine sets the end_line property value. The end_line property +func (m *CheckAnnotation) SetEndLine(value *int32)() { + m.end_line = value +} +// SetMessage sets the message property value. The message property +func (m *CheckAnnotation) SetMessage(value *string)() { + m.message = value +} +// SetPath sets the path property value. The path property +func (m *CheckAnnotation) SetPath(value *string)() { + m.path = value +} +// SetRawDetails sets the raw_details property value. The raw_details property +func (m *CheckAnnotation) SetRawDetails(value *string)() { + m.raw_details = value +} +// SetStartColumn sets the start_column property value. The start_column property +func (m *CheckAnnotation) SetStartColumn(value *int32)() { + m.start_column = value +} +// SetStartLine sets the start_line property value. The start_line property +func (m *CheckAnnotation) SetStartLine(value *int32)() { + m.start_line = value +} +// SetTitle sets the title property value. The title property +func (m *CheckAnnotation) SetTitle(value *string)() { + m.title = value +} +type CheckAnnotationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnnotationLevel()(*string) + GetBlobHref()(*string) + GetEndColumn()(*int32) + GetEndLine()(*int32) + GetMessage()(*string) + GetPath()(*string) + GetRawDetails()(*string) + GetStartColumn()(*int32) + GetStartLine()(*int32) + GetTitle()(*string) + SetAnnotationLevel(value *string)() + SetBlobHref(value *string)() + SetEndColumn(value *int32)() + SetEndLine(value *int32)() + SetMessage(value *string)() + SetPath(value *string)() + SetRawDetails(value *string)() + SetStartColumn(value *int32)() + SetStartLine(value *int32)() + SetTitle(value *string)() +} diff --git a/pkg/github/models/check_automated_security_fixes.go b/pkg/github/models/check_automated_security_fixes.go new file mode 100644 index 0000000..a20c43b --- /dev/null +++ b/pkg/github/models/check_automated_security_fixes.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CheckAutomatedSecurityFixes check Automated Security Fixes +type CheckAutomatedSecurityFixes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether automated security fixes are enabled for the repository. + enabled *bool + // Whether automated security fixes are paused for the repository. + paused *bool +} +// NewCheckAutomatedSecurityFixes instantiates a new CheckAutomatedSecurityFixes and sets the default values. +func NewCheckAutomatedSecurityFixes()(*CheckAutomatedSecurityFixes) { + m := &CheckAutomatedSecurityFixes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckAutomatedSecurityFixesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckAutomatedSecurityFixesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckAutomatedSecurityFixes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckAutomatedSecurityFixes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. Whether automated security fixes are enabled for the repository. +// returns a *bool when successful +func (m *CheckAutomatedSecurityFixes) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckAutomatedSecurityFixes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["paused"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPaused(val) + } + return nil + } + return res +} +// GetPaused gets the paused property value. Whether automated security fixes are paused for the repository. +// returns a *bool when successful +func (m *CheckAutomatedSecurityFixes) GetPaused()(*bool) { + return m.paused +} +// Serialize serializes information the current object +func (m *CheckAutomatedSecurityFixes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("paused", m.GetPaused()) + 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 *CheckAutomatedSecurityFixes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. Whether automated security fixes are enabled for the repository. +func (m *CheckAutomatedSecurityFixes) SetEnabled(value *bool)() { + m.enabled = value +} +// SetPaused sets the paused property value. Whether automated security fixes are paused for the repository. +func (m *CheckAutomatedSecurityFixes) SetPaused(value *bool)() { + m.paused = value +} +type CheckAutomatedSecurityFixesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetPaused()(*bool) + SetEnabled(value *bool)() + SetPaused(value *bool)() +} diff --git a/pkg/github/models/check_run.go b/pkg/github/models/check_run.go new file mode 100644 index 0000000..0b76137 --- /dev/null +++ b/pkg/github/models/check_run.go @@ -0,0 +1,560 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CheckRun a check performed on the code of a given code change +type CheckRun struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + app NullableIntegrationable + // The check_suite property + check_suite CheckRun_check_suiteable + // The completed_at property + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The conclusion property + conclusion *CheckRun_conclusion + // A deployment created as the result of an Actions check run from a workflow that references an environment + deployment DeploymentSimpleable + // The details_url property + details_url *string + // The external_id property + external_id *string + // The SHA of the commit that is being checked. + head_sha *string + // The html_url property + html_url *string + // The id of the check. + id *int32 + // The name of the check. + name *string + // The node_id property + node_id *string + // The output property + output CheckRun_outputable + // Pull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check. + pull_requests []PullRequestMinimalable + // The started_at property + started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. + status *CheckRun_status + // The url property + url *string +} +// NewCheckRun instantiates a new CheckRun and sets the default values. +func NewCheckRun()(*CheckRun) { + m := &CheckRun{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckRunFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckRunFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckRun(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckRun) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApp gets the app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *CheckRun) GetApp()(NullableIntegrationable) { + return m.app +} +// GetCheckSuite gets the check_suite property value. The check_suite property +// returns a CheckRun_check_suiteable when successful +func (m *CheckRun) GetCheckSuite()(CheckRun_check_suiteable) { + return m.check_suite +} +// GetCompletedAt gets the completed_at property value. The completed_at property +// returns a *Time when successful +func (m *CheckRun) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetConclusion gets the conclusion property value. The conclusion property +// returns a *CheckRun_conclusion when successful +func (m *CheckRun) GetConclusion()(*CheckRun_conclusion) { + return m.conclusion +} +// GetDeployment gets the deployment property value. A deployment created as the result of an Actions check run from a workflow that references an environment +// returns a DeploymentSimpleable when successful +func (m *CheckRun) GetDeployment()(DeploymentSimpleable) { + return m.deployment +} +// GetDetailsUrl gets the details_url property value. The details_url property +// returns a *string when successful +func (m *CheckRun) GetDetailsUrl()(*string) { + return m.details_url +} +// GetExternalId gets the external_id property value. The external_id property +// returns a *string when successful +func (m *CheckRun) GetExternalId()(*string) { + return m.external_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckRun) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApp(val.(NullableIntegrationable)) + } + return nil + } + res["check_suite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCheckRun_check_suiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCheckSuite(val.(CheckRun_check_suiteable)) + } + return nil + } + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["conclusion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCheckRun_conclusion) + if err != nil { + return err + } + if val != nil { + m.SetConclusion(val.(*CheckRun_conclusion)) + } + return nil + } + res["deployment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeploymentSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeployment(val.(DeploymentSimpleable)) + } + return nil + } + res["details_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetailsUrl(val) + } + return nil + } + res["external_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadSha(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["output"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCheckRun_outputFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOutput(val.(CheckRun_outputable)) + } + return nil + } + res["pull_requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePullRequestMinimalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PullRequestMinimalable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PullRequestMinimalable) + } + } + m.SetPullRequests(res) + } + return nil + } + res["started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedAt(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCheckRun_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CheckRun_status)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHeadSha gets the head_sha property value. The SHA of the commit that is being checked. +// returns a *string when successful +func (m *CheckRun) GetHeadSha()(*string) { + return m.head_sha +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CheckRun) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id of the check. +// returns a *int32 when successful +func (m *CheckRun) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the check. +// returns a *string when successful +func (m *CheckRun) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *CheckRun) GetNodeId()(*string) { + return m.node_id +} +// GetOutput gets the output property value. The output property +// returns a CheckRun_outputable when successful +func (m *CheckRun) GetOutput()(CheckRun_outputable) { + return m.output +} +// GetPullRequests gets the pull_requests property value. Pull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check. +// returns a []PullRequestMinimalable when successful +func (m *CheckRun) GetPullRequests()([]PullRequestMinimalable) { + return m.pull_requests +} +// GetStartedAt gets the started_at property value. The started_at property +// returns a *Time when successful +func (m *CheckRun) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.started_at +} +// GetStatus gets the status property value. The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. +// returns a *CheckRun_status when successful +func (m *CheckRun) GetStatus()(*CheckRun_status) { + return m.status +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CheckRun) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CheckRun) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("app", m.GetApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("check_suite", m.GetCheckSuite()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + if m.GetConclusion() != nil { + cast := (*m.GetConclusion()).String() + err := writer.WriteStringValue("conclusion", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("deployment", m.GetDeployment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("details_url", m.GetDetailsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("external_id", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_sha", m.GetHeadSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("output", m.GetOutput()) + if err != nil { + return err + } + } + if m.GetPullRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPullRequests())) + for i, v := range m.GetPullRequests() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("pull_requests", cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("started_at", m.GetStartedAt()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CheckRun) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApp sets the app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *CheckRun) SetApp(value NullableIntegrationable)() { + m.app = value +} +// SetCheckSuite sets the check_suite property value. The check_suite property +func (m *CheckRun) SetCheckSuite(value CheckRun_check_suiteable)() { + m.check_suite = value +} +// SetCompletedAt sets the completed_at property value. The completed_at property +func (m *CheckRun) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetConclusion sets the conclusion property value. The conclusion property +func (m *CheckRun) SetConclusion(value *CheckRun_conclusion)() { + m.conclusion = value +} +// SetDeployment sets the deployment property value. A deployment created as the result of an Actions check run from a workflow that references an environment +func (m *CheckRun) SetDeployment(value DeploymentSimpleable)() { + m.deployment = value +} +// SetDetailsUrl sets the details_url property value. The details_url property +func (m *CheckRun) SetDetailsUrl(value *string)() { + m.details_url = value +} +// SetExternalId sets the external_id property value. The external_id property +func (m *CheckRun) SetExternalId(value *string)() { + m.external_id = value +} +// SetHeadSha sets the head_sha property value. The SHA of the commit that is being checked. +func (m *CheckRun) SetHeadSha(value *string)() { + m.head_sha = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CheckRun) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id of the check. +func (m *CheckRun) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the check. +func (m *CheckRun) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *CheckRun) SetNodeId(value *string)() { + m.node_id = value +} +// SetOutput sets the output property value. The output property +func (m *CheckRun) SetOutput(value CheckRun_outputable)() { + m.output = value +} +// SetPullRequests sets the pull_requests property value. Pull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check. +func (m *CheckRun) SetPullRequests(value []PullRequestMinimalable)() { + m.pull_requests = value +} +// SetStartedAt sets the started_at property value. The started_at property +func (m *CheckRun) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.started_at = value +} +// SetStatus sets the status property value. The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. +func (m *CheckRun) SetStatus(value *CheckRun_status)() { + m.status = value +} +// SetUrl sets the url property value. The url property +func (m *CheckRun) SetUrl(value *string)() { + m.url = value +} +type CheckRunable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApp()(NullableIntegrationable) + GetCheckSuite()(CheckRun_check_suiteable) + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetConclusion()(*CheckRun_conclusion) + GetDeployment()(DeploymentSimpleable) + GetDetailsUrl()(*string) + GetExternalId()(*string) + GetHeadSha()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetOutput()(CheckRun_outputable) + GetPullRequests()([]PullRequestMinimalable) + GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*CheckRun_status) + GetUrl()(*string) + SetApp(value NullableIntegrationable)() + SetCheckSuite(value CheckRun_check_suiteable)() + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetConclusion(value *CheckRun_conclusion)() + SetDeployment(value DeploymentSimpleable)() + SetDetailsUrl(value *string)() + SetExternalId(value *string)() + SetHeadSha(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetOutput(value CheckRun_outputable)() + SetPullRequests(value []PullRequestMinimalable)() + SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *CheckRun_status)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/check_run_check_suite.go b/pkg/github/models/check_run_check_suite.go new file mode 100644 index 0000000..8fce07b --- /dev/null +++ b/pkg/github/models/check_run_check_suite.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CheckRun_check_suite struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 +} +// NewCheckRun_check_suite instantiates a new CheckRun_check_suite and sets the default values. +func NewCheckRun_check_suite()(*CheckRun_check_suite) { + m := &CheckRun_check_suite{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckRun_check_suiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckRun_check_suiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckRun_check_suite(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckRun_check_suite) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckRun_check_suite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *CheckRun_check_suite) GetId()(*int32) { + return m.id +} +// Serialize serializes information the current object +func (m *CheckRun_check_suite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + 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 *CheckRun_check_suite) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *CheckRun_check_suite) SetId(value *int32)() { + m.id = value +} +type CheckRun_check_suiteable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + SetId(value *int32)() +} diff --git a/pkg/github/models/check_run_conclusion.go b/pkg/github/models/check_run_conclusion.go new file mode 100644 index 0000000..9a0de6e --- /dev/null +++ b/pkg/github/models/check_run_conclusion.go @@ -0,0 +1,51 @@ +package models +import ( + "errors" +) +type CheckRun_conclusion int + +const ( + SUCCESS_CHECKRUN_CONCLUSION CheckRun_conclusion = iota + FAILURE_CHECKRUN_CONCLUSION + NEUTRAL_CHECKRUN_CONCLUSION + CANCELLED_CHECKRUN_CONCLUSION + SKIPPED_CHECKRUN_CONCLUSION + TIMED_OUT_CHECKRUN_CONCLUSION + ACTION_REQUIRED_CHECKRUN_CONCLUSION +) + +func (i CheckRun_conclusion) String() string { + return []string{"success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"}[i] +} +func ParseCheckRun_conclusion(v string) (any, error) { + result := SUCCESS_CHECKRUN_CONCLUSION + switch v { + case "success": + result = SUCCESS_CHECKRUN_CONCLUSION + case "failure": + result = FAILURE_CHECKRUN_CONCLUSION + case "neutral": + result = NEUTRAL_CHECKRUN_CONCLUSION + case "cancelled": + result = CANCELLED_CHECKRUN_CONCLUSION + case "skipped": + result = SKIPPED_CHECKRUN_CONCLUSION + case "timed_out": + result = TIMED_OUT_CHECKRUN_CONCLUSION + case "action_required": + result = ACTION_REQUIRED_CHECKRUN_CONCLUSION + default: + return 0, errors.New("Unknown CheckRun_conclusion value: " + v) + } + return &result, nil +} +func SerializeCheckRun_conclusion(values []CheckRun_conclusion) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CheckRun_conclusion) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/check_run_output.go b/pkg/github/models/check_run_output.go new file mode 100644 index 0000000..0efeda1 --- /dev/null +++ b/pkg/github/models/check_run_output.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CheckRun_output struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The annotations_count property + annotations_count *int32 + // The annotations_url property + annotations_url *string + // The summary property + summary *string + // The text property + text *string + // The title property + title *string +} +// NewCheckRun_output instantiates a new CheckRun_output and sets the default values. +func NewCheckRun_output()(*CheckRun_output) { + m := &CheckRun_output{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckRun_outputFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckRun_outputFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckRun_output(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckRun_output) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnnotationsCount gets the annotations_count property value. The annotations_count property +// returns a *int32 when successful +func (m *CheckRun_output) GetAnnotationsCount()(*int32) { + return m.annotations_count +} +// GetAnnotationsUrl gets the annotations_url property value. The annotations_url property +// returns a *string when successful +func (m *CheckRun_output) GetAnnotationsUrl()(*string) { + return m.annotations_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckRun_output) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["annotations_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAnnotationsCount(val) + } + return nil + } + res["annotations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnnotationsUrl(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetSummary gets the summary property value. The summary property +// returns a *string when successful +func (m *CheckRun_output) GetSummary()(*string) { + return m.summary +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *CheckRun_output) GetText()(*string) { + return m.text +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *CheckRun_output) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *CheckRun_output) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("annotations_count", m.GetAnnotationsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("annotations_url", m.GetAnnotationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *CheckRun_output) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnnotationsCount sets the annotations_count property value. The annotations_count property +func (m *CheckRun_output) SetAnnotationsCount(value *int32)() { + m.annotations_count = value +} +// SetAnnotationsUrl sets the annotations_url property value. The annotations_url property +func (m *CheckRun_output) SetAnnotationsUrl(value *string)() { + m.annotations_url = value +} +// SetSummary sets the summary property value. The summary property +func (m *CheckRun_output) SetSummary(value *string)() { + m.summary = value +} +// SetText sets the text property value. The text property +func (m *CheckRun_output) SetText(value *string)() { + m.text = value +} +// SetTitle sets the title property value. The title property +func (m *CheckRun_output) SetTitle(value *string)() { + m.title = value +} +type CheckRun_outputable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnnotationsCount()(*int32) + GetAnnotationsUrl()(*string) + GetSummary()(*string) + GetText()(*string) + GetTitle()(*string) + SetAnnotationsCount(value *int32)() + SetAnnotationsUrl(value *string)() + SetSummary(value *string)() + SetText(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/models/check_run_status.go b/pkg/github/models/check_run_status.go new file mode 100644 index 0000000..097adf2 --- /dev/null +++ b/pkg/github/models/check_run_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. +type CheckRun_status int + +const ( + QUEUED_CHECKRUN_STATUS CheckRun_status = iota + IN_PROGRESS_CHECKRUN_STATUS + COMPLETED_CHECKRUN_STATUS + WAITING_CHECKRUN_STATUS + REQUESTED_CHECKRUN_STATUS + PENDING_CHECKRUN_STATUS +) + +func (i CheckRun_status) String() string { + return []string{"queued", "in_progress", "completed", "waiting", "requested", "pending"}[i] +} +func ParseCheckRun_status(v string) (any, error) { + result := QUEUED_CHECKRUN_STATUS + switch v { + case "queued": + result = QUEUED_CHECKRUN_STATUS + case "in_progress": + result = IN_PROGRESS_CHECKRUN_STATUS + case "completed": + result = COMPLETED_CHECKRUN_STATUS + case "waiting": + result = WAITING_CHECKRUN_STATUS + case "requested": + result = REQUESTED_CHECKRUN_STATUS + case "pending": + result = PENDING_CHECKRUN_STATUS + default: + return 0, errors.New("Unknown CheckRun_status value: " + v) + } + return &result, nil +} +func SerializeCheckRun_status(values []CheckRun_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CheckRun_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/check_suite.go b/pkg/github/models/check_suite.go new file mode 100644 index 0000000..bd0ab8e --- /dev/null +++ b/pkg/github/models/check_suite.go @@ -0,0 +1,618 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CheckSuite a suite of checks performed on the code of a given code change +type CheckSuite struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The after property + after *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + app NullableIntegrationable + // The before property + before *string + // The check_runs_url property + check_runs_url *string + // The conclusion property + conclusion *CheckSuite_conclusion + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The head_branch property + head_branch *string + // A commit. + head_commit SimpleCommitable + // The SHA of the head commit that is being checked. + head_sha *string + // The id property + id *int32 + // The latest_check_runs_count property + latest_check_runs_count *int32 + // The node_id property + node_id *string + // The pull_requests property + pull_requests []PullRequestMinimalable + // Minimal Repository + repository MinimalRepositoryable + // The rerequestable property + rerequestable *bool + // The runs_rerequestable property + runs_rerequestable *bool + // The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites. + status *CheckSuite_status + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewCheckSuite instantiates a new CheckSuite and sets the default values. +func NewCheckSuite()(*CheckSuite) { + m := &CheckSuite{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckSuiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckSuiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckSuite(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckSuite) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAfter gets the after property value. The after property +// returns a *string when successful +func (m *CheckSuite) GetAfter()(*string) { + return m.after +} +// GetApp gets the app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *CheckSuite) GetApp()(NullableIntegrationable) { + return m.app +} +// GetBefore gets the before property value. The before property +// returns a *string when successful +func (m *CheckSuite) GetBefore()(*string) { + return m.before +} +// GetCheckRunsUrl gets the check_runs_url property value. The check_runs_url property +// returns a *string when successful +func (m *CheckSuite) GetCheckRunsUrl()(*string) { + return m.check_runs_url +} +// GetConclusion gets the conclusion property value. The conclusion property +// returns a *CheckSuite_conclusion when successful +func (m *CheckSuite) GetConclusion()(*CheckSuite_conclusion) { + return m.conclusion +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *CheckSuite) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckSuite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["after"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAfter(val) + } + return nil + } + res["app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApp(val.(NullableIntegrationable)) + } + return nil + } + res["before"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBefore(val) + } + return nil + } + res["check_runs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckRunsUrl(val) + } + return nil + } + res["conclusion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCheckSuite_conclusion) + if err != nil { + return err + } + if val != nil { + m.SetConclusion(val.(*CheckSuite_conclusion)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["head_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadBranch(val) + } + return nil + } + res["head_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleCommitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHeadCommit(val.(SimpleCommitable)) + } + return nil + } + res["head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadSha(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["latest_check_runs_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLatestCheckRunsCount(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["pull_requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePullRequestMinimalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PullRequestMinimalable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PullRequestMinimalable) + } + } + m.SetPullRequests(res) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["rerequestable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRerequestable(val) + } + return nil + } + res["runs_rerequestable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRunsRerequestable(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCheckSuite_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CheckSuite_status)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHeadBranch gets the head_branch property value. The head_branch property +// returns a *string when successful +func (m *CheckSuite) GetHeadBranch()(*string) { + return m.head_branch +} +// GetHeadCommit gets the head_commit property value. A commit. +// returns a SimpleCommitable when successful +func (m *CheckSuite) GetHeadCommit()(SimpleCommitable) { + return m.head_commit +} +// GetHeadSha gets the head_sha property value. The SHA of the head commit that is being checked. +// returns a *string when successful +func (m *CheckSuite) GetHeadSha()(*string) { + return m.head_sha +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *CheckSuite) GetId()(*int32) { + return m.id +} +// GetLatestCheckRunsCount gets the latest_check_runs_count property value. The latest_check_runs_count property +// returns a *int32 when successful +func (m *CheckSuite) GetLatestCheckRunsCount()(*int32) { + return m.latest_check_runs_count +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *CheckSuite) GetNodeId()(*string) { + return m.node_id +} +// GetPullRequests gets the pull_requests property value. The pull_requests property +// returns a []PullRequestMinimalable when successful +func (m *CheckSuite) GetPullRequests()([]PullRequestMinimalable) { + return m.pull_requests +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *CheckSuite) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetRerequestable gets the rerequestable property value. The rerequestable property +// returns a *bool when successful +func (m *CheckSuite) GetRerequestable()(*bool) { + return m.rerequestable +} +// GetRunsRerequestable gets the runs_rerequestable property value. The runs_rerequestable property +// returns a *bool when successful +func (m *CheckSuite) GetRunsRerequestable()(*bool) { + return m.runs_rerequestable +} +// GetStatus gets the status property value. The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites. +// returns a *CheckSuite_status when successful +func (m *CheckSuite) GetStatus()(*CheckSuite_status) { + return m.status +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CheckSuite) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CheckSuite) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CheckSuite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("after", m.GetAfter()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("app", m.GetApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("before", m.GetBefore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("check_runs_url", m.GetCheckRunsUrl()) + if err != nil { + return err + } + } + if m.GetConclusion() != nil { + cast := (*m.GetConclusion()).String() + err := writer.WriteStringValue("conclusion", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_branch", m.GetHeadBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("head_commit", m.GetHeadCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_sha", m.GetHeadSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("latest_check_runs_count", m.GetLatestCheckRunsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetPullRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPullRequests())) + for i, v := range m.GetPullRequests() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("pull_requests", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("rerequestable", m.GetRerequestable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("runs_rerequestable", m.GetRunsRerequestable()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CheckSuite) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAfter sets the after property value. The after property +func (m *CheckSuite) SetAfter(value *string)() { + m.after = value +} +// SetApp sets the app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *CheckSuite) SetApp(value NullableIntegrationable)() { + m.app = value +} +// SetBefore sets the before property value. The before property +func (m *CheckSuite) SetBefore(value *string)() { + m.before = value +} +// SetCheckRunsUrl sets the check_runs_url property value. The check_runs_url property +func (m *CheckSuite) SetCheckRunsUrl(value *string)() { + m.check_runs_url = value +} +// SetConclusion sets the conclusion property value. The conclusion property +func (m *CheckSuite) SetConclusion(value *CheckSuite_conclusion)() { + m.conclusion = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *CheckSuite) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHeadBranch sets the head_branch property value. The head_branch property +func (m *CheckSuite) SetHeadBranch(value *string)() { + m.head_branch = value +} +// SetHeadCommit sets the head_commit property value. A commit. +func (m *CheckSuite) SetHeadCommit(value SimpleCommitable)() { + m.head_commit = value +} +// SetHeadSha sets the head_sha property value. The SHA of the head commit that is being checked. +func (m *CheckSuite) SetHeadSha(value *string)() { + m.head_sha = value +} +// SetId sets the id property value. The id property +func (m *CheckSuite) SetId(value *int32)() { + m.id = value +} +// SetLatestCheckRunsCount sets the latest_check_runs_count property value. The latest_check_runs_count property +func (m *CheckSuite) SetLatestCheckRunsCount(value *int32)() { + m.latest_check_runs_count = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *CheckSuite) SetNodeId(value *string)() { + m.node_id = value +} +// SetPullRequests sets the pull_requests property value. The pull_requests property +func (m *CheckSuite) SetPullRequests(value []PullRequestMinimalable)() { + m.pull_requests = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *CheckSuite) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetRerequestable sets the rerequestable property value. The rerequestable property +func (m *CheckSuite) SetRerequestable(value *bool)() { + m.rerequestable = value +} +// SetRunsRerequestable sets the runs_rerequestable property value. The runs_rerequestable property +func (m *CheckSuite) SetRunsRerequestable(value *bool)() { + m.runs_rerequestable = value +} +// SetStatus sets the status property value. The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites. +func (m *CheckSuite) SetStatus(value *CheckSuite_status)() { + m.status = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CheckSuite) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *CheckSuite) SetUrl(value *string)() { + m.url = value +} +type CheckSuiteable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAfter()(*string) + GetApp()(NullableIntegrationable) + GetBefore()(*string) + GetCheckRunsUrl()(*string) + GetConclusion()(*CheckSuite_conclusion) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHeadBranch()(*string) + GetHeadCommit()(SimpleCommitable) + GetHeadSha()(*string) + GetId()(*int32) + GetLatestCheckRunsCount()(*int32) + GetNodeId()(*string) + GetPullRequests()([]PullRequestMinimalable) + GetRepository()(MinimalRepositoryable) + GetRerequestable()(*bool) + GetRunsRerequestable()(*bool) + GetStatus()(*CheckSuite_status) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAfter(value *string)() + SetApp(value NullableIntegrationable)() + SetBefore(value *string)() + SetCheckRunsUrl(value *string)() + SetConclusion(value *CheckSuite_conclusion)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHeadBranch(value *string)() + SetHeadCommit(value SimpleCommitable)() + SetHeadSha(value *string)() + SetId(value *int32)() + SetLatestCheckRunsCount(value *int32)() + SetNodeId(value *string)() + SetPullRequests(value []PullRequestMinimalable)() + SetRepository(value MinimalRepositoryable)() + SetRerequestable(value *bool)() + SetRunsRerequestable(value *bool)() + SetStatus(value *CheckSuite_status)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/check_suite_conclusion.go b/pkg/github/models/check_suite_conclusion.go new file mode 100644 index 0000000..2ca71bb --- /dev/null +++ b/pkg/github/models/check_suite_conclusion.go @@ -0,0 +1,57 @@ +package models +import ( + "errors" +) +type CheckSuite_conclusion int + +const ( + SUCCESS_CHECKSUITE_CONCLUSION CheckSuite_conclusion = iota + FAILURE_CHECKSUITE_CONCLUSION + NEUTRAL_CHECKSUITE_CONCLUSION + CANCELLED_CHECKSUITE_CONCLUSION + SKIPPED_CHECKSUITE_CONCLUSION + TIMED_OUT_CHECKSUITE_CONCLUSION + ACTION_REQUIRED_CHECKSUITE_CONCLUSION + STARTUP_FAILURE_CHECKSUITE_CONCLUSION + STALE_CHECKSUITE_CONCLUSION +) + +func (i CheckSuite_conclusion) String() string { + return []string{"success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required", "startup_failure", "stale"}[i] +} +func ParseCheckSuite_conclusion(v string) (any, error) { + result := SUCCESS_CHECKSUITE_CONCLUSION + switch v { + case "success": + result = SUCCESS_CHECKSUITE_CONCLUSION + case "failure": + result = FAILURE_CHECKSUITE_CONCLUSION + case "neutral": + result = NEUTRAL_CHECKSUITE_CONCLUSION + case "cancelled": + result = CANCELLED_CHECKSUITE_CONCLUSION + case "skipped": + result = SKIPPED_CHECKSUITE_CONCLUSION + case "timed_out": + result = TIMED_OUT_CHECKSUITE_CONCLUSION + case "action_required": + result = ACTION_REQUIRED_CHECKSUITE_CONCLUSION + case "startup_failure": + result = STARTUP_FAILURE_CHECKSUITE_CONCLUSION + case "stale": + result = STALE_CHECKSUITE_CONCLUSION + default: + return 0, errors.New("Unknown CheckSuite_conclusion value: " + v) + } + return &result, nil +} +func SerializeCheckSuite_conclusion(values []CheckSuite_conclusion) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CheckSuite_conclusion) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/check_suite_preference.go b/pkg/github/models/check_suite_preference.go new file mode 100644 index 0000000..3c504dc --- /dev/null +++ b/pkg/github/models/check_suite_preference.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CheckSuitePreference check suite configuration preferences for a repository. +type CheckSuitePreference struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The preferences property + preferences CheckSuitePreference_preferencesable + // Minimal Repository + repository MinimalRepositoryable +} +// NewCheckSuitePreference instantiates a new CheckSuitePreference and sets the default values. +func NewCheckSuitePreference()(*CheckSuitePreference) { + m := &CheckSuitePreference{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckSuitePreferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckSuitePreferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckSuitePreference(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckSuitePreference) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckSuitePreference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["preferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCheckSuitePreference_preferencesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPreferences(val.(CheckSuitePreference_preferencesable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + return res +} +// GetPreferences gets the preferences property value. The preferences property +// returns a CheckSuitePreference_preferencesable when successful +func (m *CheckSuitePreference) GetPreferences()(CheckSuitePreference_preferencesable) { + return m.preferences +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *CheckSuitePreference) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// Serialize serializes information the current object +func (m *CheckSuitePreference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("preferences", m.GetPreferences()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + 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 *CheckSuitePreference) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPreferences sets the preferences property value. The preferences property +func (m *CheckSuitePreference) SetPreferences(value CheckSuitePreference_preferencesable)() { + m.preferences = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *CheckSuitePreference) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +type CheckSuitePreferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPreferences()(CheckSuitePreference_preferencesable) + GetRepository()(MinimalRepositoryable) + SetPreferences(value CheckSuitePreference_preferencesable)() + SetRepository(value MinimalRepositoryable)() +} diff --git a/pkg/github/models/check_suite_preference_preferences.go b/pkg/github/models/check_suite_preference_preferences.go new file mode 100644 index 0000000..5109327 --- /dev/null +++ b/pkg/github/models/check_suite_preference_preferences.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CheckSuitePreference_preferences struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The auto_trigger_checks property + auto_trigger_checks []CheckSuitePreference_preferences_auto_trigger_checksable +} +// NewCheckSuitePreference_preferences instantiates a new CheckSuitePreference_preferences and sets the default values. +func NewCheckSuitePreference_preferences()(*CheckSuitePreference_preferences) { + m := &CheckSuitePreference_preferences{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckSuitePreference_preferencesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckSuitePreference_preferencesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckSuitePreference_preferences(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckSuitePreference_preferences) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAutoTriggerChecks gets the auto_trigger_checks property value. The auto_trigger_checks property +// returns a []CheckSuitePreference_preferences_auto_trigger_checksable when successful +func (m *CheckSuitePreference_preferences) GetAutoTriggerChecks()([]CheckSuitePreference_preferences_auto_trigger_checksable) { + return m.auto_trigger_checks +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckSuitePreference_preferences) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auto_trigger_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCheckSuitePreference_preferences_auto_trigger_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CheckSuitePreference_preferences_auto_trigger_checksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CheckSuitePreference_preferences_auto_trigger_checksable) + } + } + m.SetAutoTriggerChecks(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CheckSuitePreference_preferences) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAutoTriggerChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAutoTriggerChecks())) + for i, v := range m.GetAutoTriggerChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("auto_trigger_checks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CheckSuitePreference_preferences) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAutoTriggerChecks sets the auto_trigger_checks property value. The auto_trigger_checks property +func (m *CheckSuitePreference_preferences) SetAutoTriggerChecks(value []CheckSuitePreference_preferences_auto_trigger_checksable)() { + m.auto_trigger_checks = value +} +type CheckSuitePreference_preferencesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoTriggerChecks()([]CheckSuitePreference_preferences_auto_trigger_checksable) + SetAutoTriggerChecks(value []CheckSuitePreference_preferences_auto_trigger_checksable)() +} diff --git a/pkg/github/models/check_suite_preference_preferences_auto_trigger_checks.go b/pkg/github/models/check_suite_preference_preferences_auto_trigger_checks.go new file mode 100644 index 0000000..3c85097 --- /dev/null +++ b/pkg/github/models/check_suite_preference_preferences_auto_trigger_checks.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CheckSuitePreference_preferences_auto_trigger_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The app_id property + app_id *int32 + // The setting property + setting *bool +} +// NewCheckSuitePreference_preferences_auto_trigger_checks instantiates a new CheckSuitePreference_preferences_auto_trigger_checks and sets the default values. +func NewCheckSuitePreference_preferences_auto_trigger_checks()(*CheckSuitePreference_preferences_auto_trigger_checks) { + m := &CheckSuitePreference_preferences_auto_trigger_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCheckSuitePreference_preferences_auto_trigger_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckSuitePreference_preferences_auto_trigger_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCheckSuitePreference_preferences_auto_trigger_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CheckSuitePreference_preferences_auto_trigger_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The app_id property +// returns a *int32 when successful +func (m *CheckSuitePreference_preferences_auto_trigger_checks) GetAppId()(*int32) { + return m.app_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckSuitePreference_preferences_auto_trigger_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + return res +} +// GetSetting gets the setting property value. The setting property +// returns a *bool when successful +func (m *CheckSuitePreference_preferences_auto_trigger_checks) GetSetting()(*bool) { + return m.setting +} +// Serialize serializes information the current object +func (m *CheckSuitePreference_preferences_auto_trigger_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("setting", m.GetSetting()) + 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 *CheckSuitePreference_preferences_auto_trigger_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The app_id property +func (m *CheckSuitePreference_preferences_auto_trigger_checks) SetAppId(value *int32)() { + m.app_id = value +} +// SetSetting sets the setting property value. The setting property +func (m *CheckSuitePreference_preferences_auto_trigger_checks) SetSetting(value *bool)() { + m.setting = value +} +type CheckSuitePreference_preferences_auto_trigger_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int32) + GetSetting()(*bool) + SetAppId(value *int32)() + SetSetting(value *bool)() +} diff --git a/pkg/github/models/check_suite_status.go b/pkg/github/models/check_suite_status.go new file mode 100644 index 0000000..d203b46 --- /dev/null +++ b/pkg/github/models/check_suite_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites. +type CheckSuite_status int + +const ( + QUEUED_CHECKSUITE_STATUS CheckSuite_status = iota + IN_PROGRESS_CHECKSUITE_STATUS + COMPLETED_CHECKSUITE_STATUS + WAITING_CHECKSUITE_STATUS + REQUESTED_CHECKSUITE_STATUS + PENDING_CHECKSUITE_STATUS +) + +func (i CheckSuite_status) String() string { + return []string{"queued", "in_progress", "completed", "waiting", "requested", "pending"}[i] +} +func ParseCheckSuite_status(v string) (any, error) { + result := QUEUED_CHECKSUITE_STATUS + switch v { + case "queued": + result = QUEUED_CHECKSUITE_STATUS + case "in_progress": + result = IN_PROGRESS_CHECKSUITE_STATUS + case "completed": + result = COMPLETED_CHECKSUITE_STATUS + case "waiting": + result = WAITING_CHECKSUITE_STATUS + case "requested": + result = REQUESTED_CHECKSUITE_STATUS + case "pending": + result = PENDING_CHECKSUITE_STATUS + default: + return 0, errors.New("Unknown CheckSuite_status value: " + v) + } + return &result, nil +} +func SerializeCheckSuite_status(values []CheckSuite_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CheckSuite_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/classroom.go b/pkg/github/models/classroom.go new file mode 100644 index 0000000..d37a5f2 --- /dev/null +++ b/pkg/github/models/classroom.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Classroom a GitHub Classroom classroom +type Classroom struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether classroom is archived. + archived *bool + // Unique identifier of the classroom. + id *int32 + // The name of the classroom. + name *string + // A GitHub organization. + organization SimpleClassroomOrganizationable + // The URL of the classroom on GitHub Classroom. + url *string +} +// NewClassroom instantiates a new Classroom and sets the default values. +func NewClassroom()(*Classroom) { + m := &Classroom{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateClassroomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateClassroomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassroom(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Classroom) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchived gets the archived property value. Whether classroom is archived. +// returns a *bool when successful +func (m *Classroom) GetArchived()(*bool) { + return m.archived +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Classroom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleClassroomOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(SimpleClassroomOrganizationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the classroom. +// returns a *int32 when successful +func (m *Classroom) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the classroom. +// returns a *string when successful +func (m *Classroom) GetName()(*string) { + return m.name +} +// GetOrganization gets the organization property value. A GitHub organization. +// returns a SimpleClassroomOrganizationable when successful +func (m *Classroom) GetOrganization()(SimpleClassroomOrganizationable) { + return m.organization +} +// GetUrl gets the url property value. The URL of the classroom on GitHub Classroom. +// returns a *string when successful +func (m *Classroom) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Classroom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Classroom) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchived sets the archived property value. Whether classroom is archived. +func (m *Classroom) SetArchived(value *bool)() { + m.archived = value +} +// SetId sets the id property value. Unique identifier of the classroom. +func (m *Classroom) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the classroom. +func (m *Classroom) SetName(value *string)() { + m.name = value +} +// SetOrganization sets the organization property value. A GitHub organization. +func (m *Classroom) SetOrganization(value SimpleClassroomOrganizationable)() { + m.organization = value +} +// SetUrl sets the url property value. The URL of the classroom on GitHub Classroom. +func (m *Classroom) SetUrl(value *string)() { + m.url = value +} +type Classroomable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchived()(*bool) + GetId()(*int32) + GetName()(*string) + GetOrganization()(SimpleClassroomOrganizationable) + GetUrl()(*string) + SetArchived(value *bool)() + SetId(value *int32)() + SetName(value *string)() + SetOrganization(value SimpleClassroomOrganizationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/classroom_accepted_assignment.go b/pkg/github/models/classroom_accepted_assignment.go new file mode 100644 index 0000000..3590afc --- /dev/null +++ b/pkg/github/models/classroom_accepted_assignment.go @@ -0,0 +1,296 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassroomAcceptedAssignment a GitHub Classroom accepted assignment +type ClassroomAcceptedAssignment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub Classroom assignment + assignment SimpleClassroomAssignmentable + // Count of student commits. + commit_count *int32 + // Most recent grade. + grade *string + // Unique identifier of the repository. + id *int32 + // Whether a submission passed. + passing *bool + // A GitHub repository view for Classroom + repository SimpleClassroomRepositoryable + // The students property + students []SimpleClassroomUserable + // Whether an accepted assignment has been submitted. + submitted *bool +} +// NewClassroomAcceptedAssignment instantiates a new ClassroomAcceptedAssignment and sets the default values. +func NewClassroomAcceptedAssignment()(*ClassroomAcceptedAssignment) { + m := &ClassroomAcceptedAssignment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateClassroomAcceptedAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateClassroomAcceptedAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassroomAcceptedAssignment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ClassroomAcceptedAssignment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignment gets the assignment property value. A GitHub Classroom assignment +// returns a SimpleClassroomAssignmentable when successful +func (m *ClassroomAcceptedAssignment) GetAssignment()(SimpleClassroomAssignmentable) { + return m.assignment +} +// GetCommitCount gets the commit_count property value. Count of student commits. +// returns a *int32 when successful +func (m *ClassroomAcceptedAssignment) GetCommitCount()(*int32) { + return m.commit_count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ClassroomAcceptedAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleClassroomAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignment(val.(SimpleClassroomAssignmentable)) + } + return nil + } + res["commit_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommitCount(val) + } + return nil + } + res["grade"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGrade(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["passing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPassing(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleClassroomRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleClassroomRepositoryable)) + } + return nil + } + res["students"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleClassroomUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleClassroomUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleClassroomUserable) + } + } + m.SetStudents(res) + } + return nil + } + res["submitted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmitted(val) + } + return nil + } + return res +} +// GetGrade gets the grade property value. Most recent grade. +// returns a *string when successful +func (m *ClassroomAcceptedAssignment) GetGrade()(*string) { + return m.grade +} +// GetId gets the id property value. Unique identifier of the repository. +// returns a *int32 when successful +func (m *ClassroomAcceptedAssignment) GetId()(*int32) { + return m.id +} +// GetPassing gets the passing property value. Whether a submission passed. +// returns a *bool when successful +func (m *ClassroomAcceptedAssignment) GetPassing()(*bool) { + return m.passing +} +// GetRepository gets the repository property value. A GitHub repository view for Classroom +// returns a SimpleClassroomRepositoryable when successful +func (m *ClassroomAcceptedAssignment) GetRepository()(SimpleClassroomRepositoryable) { + return m.repository +} +// GetStudents gets the students property value. The students property +// returns a []SimpleClassroomUserable when successful +func (m *ClassroomAcceptedAssignment) GetStudents()([]SimpleClassroomUserable) { + return m.students +} +// GetSubmitted gets the submitted property value. Whether an accepted assignment has been submitted. +// returns a *bool when successful +func (m *ClassroomAcceptedAssignment) GetSubmitted()(*bool) { + return m.submitted +} +// Serialize serializes information the current object +func (m *ClassroomAcceptedAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("assignment", m.GetAssignment()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("commit_count", m.GetCommitCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("grade", m.GetGrade()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("passing", m.GetPassing()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + if m.GetStudents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStudents())) + for i, v := range m.GetStudents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("students", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("submitted", m.GetSubmitted()) + 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 *ClassroomAcceptedAssignment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignment sets the assignment property value. A GitHub Classroom assignment +func (m *ClassroomAcceptedAssignment) SetAssignment(value SimpleClassroomAssignmentable)() { + m.assignment = value +} +// SetCommitCount sets the commit_count property value. Count of student commits. +func (m *ClassroomAcceptedAssignment) SetCommitCount(value *int32)() { + m.commit_count = value +} +// SetGrade sets the grade property value. Most recent grade. +func (m *ClassroomAcceptedAssignment) SetGrade(value *string)() { + m.grade = value +} +// SetId sets the id property value. Unique identifier of the repository. +func (m *ClassroomAcceptedAssignment) SetId(value *int32)() { + m.id = value +} +// SetPassing sets the passing property value. Whether a submission passed. +func (m *ClassroomAcceptedAssignment) SetPassing(value *bool)() { + m.passing = value +} +// SetRepository sets the repository property value. A GitHub repository view for Classroom +func (m *ClassroomAcceptedAssignment) SetRepository(value SimpleClassroomRepositoryable)() { + m.repository = value +} +// SetStudents sets the students property value. The students property +func (m *ClassroomAcceptedAssignment) SetStudents(value []SimpleClassroomUserable)() { + m.students = value +} +// SetSubmitted sets the submitted property value. Whether an accepted assignment has been submitted. +func (m *ClassroomAcceptedAssignment) SetSubmitted(value *bool)() { + m.submitted = value +} +type ClassroomAcceptedAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignment()(SimpleClassroomAssignmentable) + GetCommitCount()(*int32) + GetGrade()(*string) + GetId()(*int32) + GetPassing()(*bool) + GetRepository()(SimpleClassroomRepositoryable) + GetStudents()([]SimpleClassroomUserable) + GetSubmitted()(*bool) + SetAssignment(value SimpleClassroomAssignmentable)() + SetCommitCount(value *int32)() + SetGrade(value *string)() + SetId(value *int32)() + SetPassing(value *bool)() + SetRepository(value SimpleClassroomRepositoryable)() + SetStudents(value []SimpleClassroomUserable)() + SetSubmitted(value *bool)() +} diff --git a/pkg/github/models/classroom_assignment.go b/pkg/github/models/classroom_assignment.go new file mode 100644 index 0000000..889b136 --- /dev/null +++ b/pkg/github/models/classroom_assignment.go @@ -0,0 +1,605 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassroomAssignment a GitHub Classroom assignment +type ClassroomAssignment struct { + // The number of students that have accepted the assignment. + accepted *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub Classroom classroom + classroom Classroomable + // The time at which the assignment is due. + deadline *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The selected editor for the assignment. + editor *string + // Whether feedback pull request will be created when a student accepts the assignment. + feedback_pull_requests_enabled *bool + // Unique identifier of the repository. + id *int32 + // Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. + invitations_enabled *bool + // The link that a student can use to accept the assignment. + invite_link *string + // The programming language used in the assignment. + language *string + // The maximum allowable members per team. + max_members *int32 + // The maximum allowable teams for the assignment. + max_teams *int32 + // The number of students that have passed the assignment. + passing *int32 + // Whether an accepted assignment creates a public repository. + public_repo *bool + // Sluggified name of the assignment. + slug *string + // A GitHub repository view for Classroom + starter_code_repository SimpleClassroomRepositoryable + // Whether students are admins on created repository when a student accepts the assignment. + students_are_repo_admins *bool + // The number of students that have submitted the assignment. + submitted *int32 + // Assignment title. + title *string + // Whether it's a group assignment or individual assignment. + typeEscaped *ClassroomAssignment_type +} +// NewClassroomAssignment instantiates a new ClassroomAssignment and sets the default values. +func NewClassroomAssignment()(*ClassroomAssignment) { + m := &ClassroomAssignment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateClassroomAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateClassroomAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassroomAssignment(), nil +} +// GetAccepted gets the accepted property value. The number of students that have accepted the assignment. +// returns a *int32 when successful +func (m *ClassroomAssignment) GetAccepted()(*int32) { + return m.accepted +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ClassroomAssignment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClassroom gets the classroom property value. A GitHub Classroom classroom +// returns a Classroomable when successful +func (m *ClassroomAssignment) GetClassroom()(Classroomable) { + return m.classroom +} +// GetDeadline gets the deadline property value. The time at which the assignment is due. +// returns a *Time when successful +func (m *ClassroomAssignment) GetDeadline()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deadline +} +// GetEditor gets the editor property value. The selected editor for the assignment. +// returns a *string when successful +func (m *ClassroomAssignment) GetEditor()(*string) { + return m.editor +} +// GetFeedbackPullRequestsEnabled gets the feedback_pull_requests_enabled property value. Whether feedback pull request will be created when a student accepts the assignment. +// returns a *bool when successful +func (m *ClassroomAssignment) GetFeedbackPullRequestsEnabled()(*bool) { + return m.feedback_pull_requests_enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ClassroomAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAccepted(val) + } + return nil + } + res["classroom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateClassroomFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClassroom(val.(Classroomable)) + } + return nil + } + res["deadline"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeadline(val) + } + return nil + } + res["editor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEditor(val) + } + return nil + } + res["feedback_pull_requests_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFeedbackPullRequestsEnabled(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["invitations_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitationsEnabled(val) + } + return nil + } + res["invite_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInviteLink(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["max_members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxMembers(val) + } + return nil + } + res["max_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxTeams(val) + } + return nil + } + res["passing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPassing(val) + } + return nil + } + res["public_repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepo(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["starter_code_repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleClassroomRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStarterCodeRepository(val.(SimpleClassroomRepositoryable)) + } + return nil + } + res["students_are_repo_admins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStudentsAreRepoAdmins(val) + } + return nil + } + res["submitted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubmitted(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseClassroomAssignment_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*ClassroomAssignment_type)) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the repository. +// returns a *int32 when successful +func (m *ClassroomAssignment) GetId()(*int32) { + return m.id +} +// GetInvitationsEnabled gets the invitations_enabled property value. Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. +// returns a *bool when successful +func (m *ClassroomAssignment) GetInvitationsEnabled()(*bool) { + return m.invitations_enabled +} +// GetInviteLink gets the invite_link property value. The link that a student can use to accept the assignment. +// returns a *string when successful +func (m *ClassroomAssignment) GetInviteLink()(*string) { + return m.invite_link +} +// GetLanguage gets the language property value. The programming language used in the assignment. +// returns a *string when successful +func (m *ClassroomAssignment) GetLanguage()(*string) { + return m.language +} +// GetMaxMembers gets the max_members property value. The maximum allowable members per team. +// returns a *int32 when successful +func (m *ClassroomAssignment) GetMaxMembers()(*int32) { + return m.max_members +} +// GetMaxTeams gets the max_teams property value. The maximum allowable teams for the assignment. +// returns a *int32 when successful +func (m *ClassroomAssignment) GetMaxTeams()(*int32) { + return m.max_teams +} +// GetPassing gets the passing property value. The number of students that have passed the assignment. +// returns a *int32 when successful +func (m *ClassroomAssignment) GetPassing()(*int32) { + return m.passing +} +// GetPublicRepo gets the public_repo property value. Whether an accepted assignment creates a public repository. +// returns a *bool when successful +func (m *ClassroomAssignment) GetPublicRepo()(*bool) { + return m.public_repo +} +// GetSlug gets the slug property value. Sluggified name of the assignment. +// returns a *string when successful +func (m *ClassroomAssignment) GetSlug()(*string) { + return m.slug +} +// GetStarterCodeRepository gets the starter_code_repository property value. A GitHub repository view for Classroom +// returns a SimpleClassroomRepositoryable when successful +func (m *ClassroomAssignment) GetStarterCodeRepository()(SimpleClassroomRepositoryable) { + return m.starter_code_repository +} +// GetStudentsAreRepoAdmins gets the students_are_repo_admins property value. Whether students are admins on created repository when a student accepts the assignment. +// returns a *bool when successful +func (m *ClassroomAssignment) GetStudentsAreRepoAdmins()(*bool) { + return m.students_are_repo_admins +} +// GetSubmitted gets the submitted property value. The number of students that have submitted the assignment. +// returns a *int32 when successful +func (m *ClassroomAssignment) GetSubmitted()(*int32) { + return m.submitted +} +// GetTitle gets the title property value. Assignment title. +// returns a *string when successful +func (m *ClassroomAssignment) GetTitle()(*string) { + return m.title +} +// GetTypeEscaped gets the type property value. Whether it's a group assignment or individual assignment. +// returns a *ClassroomAssignment_type when successful +func (m *ClassroomAssignment) GetTypeEscaped()(*ClassroomAssignment_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ClassroomAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("accepted", m.GetAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("classroom", m.GetClassroom()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("deadline", m.GetDeadline()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("editor", m.GetEditor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("feedback_pull_requests_enabled", m.GetFeedbackPullRequestsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("invitations_enabled", m.GetInvitationsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("invite_link", m.GetInviteLink()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("max_members", m.GetMaxMembers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("max_teams", m.GetMaxTeams()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("passing", m.GetPassing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public_repo", m.GetPublicRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("starter_code_repository", m.GetStarterCodeRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("students_are_repo_admins", m.GetStudentsAreRepoAdmins()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("submitted", m.GetSubmitted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccepted sets the accepted property value. The number of students that have accepted the assignment. +func (m *ClassroomAssignment) SetAccepted(value *int32)() { + m.accepted = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ClassroomAssignment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClassroom sets the classroom property value. A GitHub Classroom classroom +func (m *ClassroomAssignment) SetClassroom(value Classroomable)() { + m.classroom = value +} +// SetDeadline sets the deadline property value. The time at which the assignment is due. +func (m *ClassroomAssignment) SetDeadline(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deadline = value +} +// SetEditor sets the editor property value. The selected editor for the assignment. +func (m *ClassroomAssignment) SetEditor(value *string)() { + m.editor = value +} +// SetFeedbackPullRequestsEnabled sets the feedback_pull_requests_enabled property value. Whether feedback pull request will be created when a student accepts the assignment. +func (m *ClassroomAssignment) SetFeedbackPullRequestsEnabled(value *bool)() { + m.feedback_pull_requests_enabled = value +} +// SetId sets the id property value. Unique identifier of the repository. +func (m *ClassroomAssignment) SetId(value *int32)() { + m.id = value +} +// SetInvitationsEnabled sets the invitations_enabled property value. Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. +func (m *ClassroomAssignment) SetInvitationsEnabled(value *bool)() { + m.invitations_enabled = value +} +// SetInviteLink sets the invite_link property value. The link that a student can use to accept the assignment. +func (m *ClassroomAssignment) SetInviteLink(value *string)() { + m.invite_link = value +} +// SetLanguage sets the language property value. The programming language used in the assignment. +func (m *ClassroomAssignment) SetLanguage(value *string)() { + m.language = value +} +// SetMaxMembers sets the max_members property value. The maximum allowable members per team. +func (m *ClassroomAssignment) SetMaxMembers(value *int32)() { + m.max_members = value +} +// SetMaxTeams sets the max_teams property value. The maximum allowable teams for the assignment. +func (m *ClassroomAssignment) SetMaxTeams(value *int32)() { + m.max_teams = value +} +// SetPassing sets the passing property value. The number of students that have passed the assignment. +func (m *ClassroomAssignment) SetPassing(value *int32)() { + m.passing = value +} +// SetPublicRepo sets the public_repo property value. Whether an accepted assignment creates a public repository. +func (m *ClassroomAssignment) SetPublicRepo(value *bool)() { + m.public_repo = value +} +// SetSlug sets the slug property value. Sluggified name of the assignment. +func (m *ClassroomAssignment) SetSlug(value *string)() { + m.slug = value +} +// SetStarterCodeRepository sets the starter_code_repository property value. A GitHub repository view for Classroom +func (m *ClassroomAssignment) SetStarterCodeRepository(value SimpleClassroomRepositoryable)() { + m.starter_code_repository = value +} +// SetStudentsAreRepoAdmins sets the students_are_repo_admins property value. Whether students are admins on created repository when a student accepts the assignment. +func (m *ClassroomAssignment) SetStudentsAreRepoAdmins(value *bool)() { + m.students_are_repo_admins = value +} +// SetSubmitted sets the submitted property value. The number of students that have submitted the assignment. +func (m *ClassroomAssignment) SetSubmitted(value *int32)() { + m.submitted = value +} +// SetTitle sets the title property value. Assignment title. +func (m *ClassroomAssignment) SetTitle(value *string)() { + m.title = value +} +// SetTypeEscaped sets the type property value. Whether it's a group assignment or individual assignment. +func (m *ClassroomAssignment) SetTypeEscaped(value *ClassroomAssignment_type)() { + m.typeEscaped = value +} +type ClassroomAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccepted()(*int32) + GetClassroom()(Classroomable) + GetDeadline()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEditor()(*string) + GetFeedbackPullRequestsEnabled()(*bool) + GetId()(*int32) + GetInvitationsEnabled()(*bool) + GetInviteLink()(*string) + GetLanguage()(*string) + GetMaxMembers()(*int32) + GetMaxTeams()(*int32) + GetPassing()(*int32) + GetPublicRepo()(*bool) + GetSlug()(*string) + GetStarterCodeRepository()(SimpleClassroomRepositoryable) + GetStudentsAreRepoAdmins()(*bool) + GetSubmitted()(*int32) + GetTitle()(*string) + GetTypeEscaped()(*ClassroomAssignment_type) + SetAccepted(value *int32)() + SetClassroom(value Classroomable)() + SetDeadline(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEditor(value *string)() + SetFeedbackPullRequestsEnabled(value *bool)() + SetId(value *int32)() + SetInvitationsEnabled(value *bool)() + SetInviteLink(value *string)() + SetLanguage(value *string)() + SetMaxMembers(value *int32)() + SetMaxTeams(value *int32)() + SetPassing(value *int32)() + SetPublicRepo(value *bool)() + SetSlug(value *string)() + SetStarterCodeRepository(value SimpleClassroomRepositoryable)() + SetStudentsAreRepoAdmins(value *bool)() + SetSubmitted(value *int32)() + SetTitle(value *string)() + SetTypeEscaped(value *ClassroomAssignment_type)() +} diff --git a/pkg/github/models/classroom_assignment_grade.go b/pkg/github/models/classroom_assignment_grade.go new file mode 100644 index 0000000..66d3c63 --- /dev/null +++ b/pkg/github/models/classroom_assignment_grade.go @@ -0,0 +1,371 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassroomAssignmentGrade grade for a student or groups GitHub Classroom assignment +type ClassroomAssignmentGrade struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the assignment + assignment_name *string + // URL of the assignment + assignment_url *string + // GitHub username of the student + github_username *string + // If a group assignment, name of the group the student is in + group_name *string + // Number of points available for the assignment + points_available *int32 + // Number of points awarded to the student + points_awarded *int32 + // Roster identifier of the student + roster_identifier *string + // URL of the starter code for the assignment + starter_code_url *string + // Name of the student's assignment repository + student_repository_name *string + // URL of the student's assignment repository + student_repository_url *string + // Timestamp of the student's assignment submission + submission_timestamp *string +} +// NewClassroomAssignmentGrade instantiates a new ClassroomAssignmentGrade and sets the default values. +func NewClassroomAssignmentGrade()(*ClassroomAssignmentGrade) { + m := &ClassroomAssignmentGrade{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateClassroomAssignmentGradeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateClassroomAssignmentGradeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassroomAssignmentGrade(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ClassroomAssignmentGrade) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignmentName gets the assignment_name property value. Name of the assignment +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetAssignmentName()(*string) { + return m.assignment_name +} +// GetAssignmentUrl gets the assignment_url property value. URL of the assignment +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetAssignmentUrl()(*string) { + return m.assignment_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ClassroomAssignmentGrade) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignment_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentName(val) + } + return nil + } + res["assignment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentUrl(val) + } + return nil + } + res["github_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubUsername(val) + } + return nil + } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + res["points_available"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPointsAvailable(val) + } + return nil + } + res["points_awarded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPointsAwarded(val) + } + return nil + } + res["roster_identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRosterIdentifier(val) + } + return nil + } + res["starter_code_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarterCodeUrl(val) + } + return nil + } + res["student_repository_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStudentRepositoryName(val) + } + return nil + } + res["student_repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStudentRepositoryUrl(val) + } + return nil + } + res["submission_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmissionTimestamp(val) + } + return nil + } + return res +} +// GetGithubUsername gets the github_username property value. GitHub username of the student +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetGithubUsername()(*string) { + return m.github_username +} +// GetGroupName gets the group_name property value. If a group assignment, name of the group the student is in +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetGroupName()(*string) { + return m.group_name +} +// GetPointsAvailable gets the points_available property value. Number of points available for the assignment +// returns a *int32 when successful +func (m *ClassroomAssignmentGrade) GetPointsAvailable()(*int32) { + return m.points_available +} +// GetPointsAwarded gets the points_awarded property value. Number of points awarded to the student +// returns a *int32 when successful +func (m *ClassroomAssignmentGrade) GetPointsAwarded()(*int32) { + return m.points_awarded +} +// GetRosterIdentifier gets the roster_identifier property value. Roster identifier of the student +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetRosterIdentifier()(*string) { + return m.roster_identifier +} +// GetStarterCodeUrl gets the starter_code_url property value. URL of the starter code for the assignment +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetStarterCodeUrl()(*string) { + return m.starter_code_url +} +// GetStudentRepositoryName gets the student_repository_name property value. Name of the student's assignment repository +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetStudentRepositoryName()(*string) { + return m.student_repository_name +} +// GetStudentRepositoryUrl gets the student_repository_url property value. URL of the student's assignment repository +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetStudentRepositoryUrl()(*string) { + return m.student_repository_url +} +// GetSubmissionTimestamp gets the submission_timestamp property value. Timestamp of the student's assignment submission +// returns a *string when successful +func (m *ClassroomAssignmentGrade) GetSubmissionTimestamp()(*string) { + return m.submission_timestamp +} +// Serialize serializes information the current object +func (m *ClassroomAssignmentGrade) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("assignment_name", m.GetAssignmentName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignment_url", m.GetAssignmentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("github_username", m.GetGithubUsername()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("points_available", m.GetPointsAvailable()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("points_awarded", m.GetPointsAwarded()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("roster_identifier", m.GetRosterIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starter_code_url", m.GetStarterCodeUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("student_repository_name", m.GetStudentRepositoryName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("student_repository_url", m.GetStudentRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("submission_timestamp", m.GetSubmissionTimestamp()) + 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 *ClassroomAssignmentGrade) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignmentName sets the assignment_name property value. Name of the assignment +func (m *ClassroomAssignmentGrade) SetAssignmentName(value *string)() { + m.assignment_name = value +} +// SetAssignmentUrl sets the assignment_url property value. URL of the assignment +func (m *ClassroomAssignmentGrade) SetAssignmentUrl(value *string)() { + m.assignment_url = value +} +// SetGithubUsername sets the github_username property value. GitHub username of the student +func (m *ClassroomAssignmentGrade) SetGithubUsername(value *string)() { + m.github_username = value +} +// SetGroupName sets the group_name property value. If a group assignment, name of the group the student is in +func (m *ClassroomAssignmentGrade) SetGroupName(value *string)() { + m.group_name = value +} +// SetPointsAvailable sets the points_available property value. Number of points available for the assignment +func (m *ClassroomAssignmentGrade) SetPointsAvailable(value *int32)() { + m.points_available = value +} +// SetPointsAwarded sets the points_awarded property value. Number of points awarded to the student +func (m *ClassroomAssignmentGrade) SetPointsAwarded(value *int32)() { + m.points_awarded = value +} +// SetRosterIdentifier sets the roster_identifier property value. Roster identifier of the student +func (m *ClassroomAssignmentGrade) SetRosterIdentifier(value *string)() { + m.roster_identifier = value +} +// SetStarterCodeUrl sets the starter_code_url property value. URL of the starter code for the assignment +func (m *ClassroomAssignmentGrade) SetStarterCodeUrl(value *string)() { + m.starter_code_url = value +} +// SetStudentRepositoryName sets the student_repository_name property value. Name of the student's assignment repository +func (m *ClassroomAssignmentGrade) SetStudentRepositoryName(value *string)() { + m.student_repository_name = value +} +// SetStudentRepositoryUrl sets the student_repository_url property value. URL of the student's assignment repository +func (m *ClassroomAssignmentGrade) SetStudentRepositoryUrl(value *string)() { + m.student_repository_url = value +} +// SetSubmissionTimestamp sets the submission_timestamp property value. Timestamp of the student's assignment submission +func (m *ClassroomAssignmentGrade) SetSubmissionTimestamp(value *string)() { + m.submission_timestamp = value +} +type ClassroomAssignmentGradeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentName()(*string) + GetAssignmentUrl()(*string) + GetGithubUsername()(*string) + GetGroupName()(*string) + GetPointsAvailable()(*int32) + GetPointsAwarded()(*int32) + GetRosterIdentifier()(*string) + GetStarterCodeUrl()(*string) + GetStudentRepositoryName()(*string) + GetStudentRepositoryUrl()(*string) + GetSubmissionTimestamp()(*string) + SetAssignmentName(value *string)() + SetAssignmentUrl(value *string)() + SetGithubUsername(value *string)() + SetGroupName(value *string)() + SetPointsAvailable(value *int32)() + SetPointsAwarded(value *int32)() + SetRosterIdentifier(value *string)() + SetStarterCodeUrl(value *string)() + SetStudentRepositoryName(value *string)() + SetStudentRepositoryUrl(value *string)() + SetSubmissionTimestamp(value *string)() +} diff --git a/pkg/github/models/classroom_assignment_type.go b/pkg/github/models/classroom_assignment_type.go new file mode 100644 index 0000000..b4b65e8 --- /dev/null +++ b/pkg/github/models/classroom_assignment_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Whether it's a group assignment or individual assignment. +type ClassroomAssignment_type int + +const ( + INDIVIDUAL_CLASSROOMASSIGNMENT_TYPE ClassroomAssignment_type = iota + GROUP_CLASSROOMASSIGNMENT_TYPE +) + +func (i ClassroomAssignment_type) String() string { + return []string{"individual", "group"}[i] +} +func ParseClassroomAssignment_type(v string) (any, error) { + result := INDIVIDUAL_CLASSROOMASSIGNMENT_TYPE + switch v { + case "individual": + result = INDIVIDUAL_CLASSROOMASSIGNMENT_TYPE + case "group": + result = GROUP_CLASSROOMASSIGNMENT_TYPE + default: + return 0, errors.New("Unknown ClassroomAssignment_type value: " + v) + } + return &result, nil +} +func SerializeClassroomAssignment_type(values []ClassroomAssignment_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ClassroomAssignment_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/clone_traffic.go b/pkg/github/models/clone_traffic.go new file mode 100644 index 0000000..9dd9525 --- /dev/null +++ b/pkg/github/models/clone_traffic.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloneTraffic clone Traffic +type CloneTraffic struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The clones property + clones []Trafficable + // The count property + count *int32 + // The uniques property + uniques *int32 +} +// NewCloneTraffic instantiates a new CloneTraffic and sets the default values. +func NewCloneTraffic()(*CloneTraffic) { + m := &CloneTraffic{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCloneTrafficFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCloneTrafficFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloneTraffic(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CloneTraffic) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClones gets the clones property value. The clones property +// returns a []Trafficable when successful +func (m *CloneTraffic) GetClones()([]Trafficable) { + return m.clones +} +// GetCount gets the count property value. The count property +// returns a *int32 when successful +func (m *CloneTraffic) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CloneTraffic) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["clones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTrafficFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Trafficable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Trafficable) + } + } + m.SetClones(res) + } + return nil + } + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + res["uniques"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniques(val) + } + return nil + } + return res +} +// GetUniques gets the uniques property value. The uniques property +// returns a *int32 when successful +func (m *CloneTraffic) GetUniques()(*int32) { + return m.uniques +} +// Serialize serializes information the current object +func (m *CloneTraffic) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetClones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClones())) + for i, v := range m.GetClones() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("clones", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniques", m.GetUniques()) + 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 *CloneTraffic) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClones sets the clones property value. The clones property +func (m *CloneTraffic) SetClones(value []Trafficable)() { + m.clones = value +} +// SetCount sets the count property value. The count property +func (m *CloneTraffic) SetCount(value *int32)() { + m.count = value +} +// SetUniques sets the uniques property value. The uniques property +func (m *CloneTraffic) SetUniques(value *int32)() { + m.uniques = value +} +type CloneTrafficable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClones()([]Trafficable) + GetCount()(*int32) + GetUniques()(*int32) + SetClones(value []Trafficable)() + SetCount(value *int32)() + SetUniques(value *int32)() +} diff --git a/pkg/github/models/code.go b/pkg/github/models/code.go new file mode 100644 index 0000000..f5b14c3 --- /dev/null +++ b/pkg/github/models/code.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Code struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fragment property + fragment *string + // The matches property + matches []Code_matchesable + // The object_type property + object_type *string + // The object_url property + object_url *string + // The property property + property *string +} +// NewCode instantiates a new Code and sets the default values. +func NewCode()(*Code) { + m := &Code{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCode(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Code) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Code) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFragment(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCode_matchesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Code_matchesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Code_matchesable) + } + } + m.SetMatches(res) + } + return nil + } + res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectUrl(val) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + return res +} +// GetFragment gets the fragment property value. The fragment property +// returns a *string when successful +func (m *Code) GetFragment()(*string) { + return m.fragment +} +// GetMatches gets the matches property value. The matches property +// returns a []Code_matchesable when successful +func (m *Code) GetMatches()([]Code_matchesable) { + return m.matches +} +// GetObjectType gets the object_type property value. The object_type property +// returns a *string when successful +func (m *Code) GetObjectType()(*string) { + return m.object_type +} +// GetObjectUrl gets the object_url property value. The object_url property +// returns a *string when successful +func (m *Code) GetObjectUrl()(*string) { + return m.object_url +} +// GetProperty gets the property property value. The property property +// returns a *string when successful +func (m *Code) GetProperty()(*string) { + return m.property +} +// Serialize serializes information the current object +func (m *Code) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fragment", m.GetFragment()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_type", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + 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 *Code) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFragment sets the fragment property value. The fragment property +func (m *Code) SetFragment(value *string)() { + m.fragment = value +} +// SetMatches sets the matches property value. The matches property +func (m *Code) SetMatches(value []Code_matchesable)() { + m.matches = value +} +// SetObjectType sets the object_type property value. The object_type property +func (m *Code) SetObjectType(value *string)() { + m.object_type = value +} +// SetObjectUrl sets the object_url property value. The object_url property +func (m *Code) SetObjectUrl(value *string)() { + m.object_url = value +} +// SetProperty sets the property property value. The property property +func (m *Code) SetProperty(value *string)() { + m.property = value +} +type Codeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFragment()(*string) + GetMatches()([]Code_matchesable) + GetObjectType()(*string) + GetObjectUrl()(*string) + GetProperty()(*string) + SetFragment(value *string)() + SetMatches(value []Code_matchesable)() + SetObjectType(value *string)() + SetObjectUrl(value *string)() + SetProperty(value *string)() +} diff --git a/pkg/github/models/code503_error.go b/pkg/github/models/code503_error.go new file mode 100644 index 0000000..f54f2ba --- /dev/null +++ b/pkg/github/models/code503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Code503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCode503Error instantiates a new Code503Error and sets the default values. +func NewCode503Error()(*Code503Error) { + m := &Code503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCode503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCode503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCode503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Code503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Code503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Code503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Code503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Code503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Code503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Code503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Code503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Code503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Code503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Code503Error) SetMessage(value *string)() { + m.message = value +} +type Code503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_matches.go b/pkg/github/models/code_matches.go new file mode 100644 index 0000000..48e24f5 --- /dev/null +++ b/pkg/github/models/code_matches.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Code_matches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The indices property + indices []int32 + // The text property + text *string +} +// NewCode_matches instantiates a new Code_matches and sets the default values. +func NewCode_matches()(*Code_matches) { + m := &Code_matches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCode_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCode_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCode_matches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Code_matches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Code_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetIndices(res) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetIndices gets the indices property value. The indices property +// returns a []int32 when successful +func (m *Code_matches) GetIndices()([]int32) { + return m.indices +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *Code_matches) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *Code_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIndices() != nil { + err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Code_matches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIndices sets the indices property value. The indices property +func (m *Code_matches) SetIndices(value []int32)() { + m.indices = value +} +// SetText sets the text property value. The text property +func (m *Code_matches) SetText(value *string)() { + m.text = value +} +type Code_matchesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndices()([]int32) + GetText()(*string) + SetIndices(value []int32)() + SetText(value *string)() +} diff --git a/pkg/github/models/code_of_conduct.go b/pkg/github/models/code_of_conduct.go new file mode 100644 index 0000000..cfe785f --- /dev/null +++ b/pkg/github/models/code_of_conduct.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeOfConduct code Of Conduct +type CodeOfConduct struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The body property + body *string + // The html_url property + html_url *string + // The key property + key *string + // The name property + name *string + // The url property + url *string +} +// NewCodeOfConduct instantiates a new CodeOfConduct and sets the default values. +func NewCodeOfConduct()(*CodeOfConduct) { + m := &CodeOfConduct{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeOfConductFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeOfConductFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeOfConduct(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeOfConduct) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *CodeOfConduct) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeOfConduct) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CodeOfConduct) GetHtmlUrl()(*string) { + return m.html_url +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *CodeOfConduct) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *CodeOfConduct) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CodeOfConduct) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeOfConduct) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeOfConduct) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The body property +func (m *CodeOfConduct) SetBody(value *string)() { + m.body = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CodeOfConduct) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetKey sets the key property value. The key property +func (m *CodeOfConduct) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *CodeOfConduct) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *CodeOfConduct) SetUrl(value *string)() { + m.url = value +} +type CodeOfConductable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetHtmlUrl()(*string) + GetKey()(*string) + GetName()(*string) + GetUrl()(*string) + SetBody(value *string)() + SetHtmlUrl(value *string)() + SetKey(value *string)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_of_conduct_simple.go b/pkg/github/models/code_of_conduct_simple.go new file mode 100644 index 0000000..81e5924 --- /dev/null +++ b/pkg/github/models/code_of_conduct_simple.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeOfConductSimple code of Conduct Simple +type CodeOfConductSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The key property + key *string + // The name property + name *string + // The url property + url *string +} +// NewCodeOfConductSimple instantiates a new CodeOfConductSimple and sets the default values. +func NewCodeOfConductSimple()(*CodeOfConductSimple) { + m := &CodeOfConductSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeOfConductSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeOfConductSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeOfConductSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeOfConductSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeOfConductSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CodeOfConductSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *CodeOfConductSimple) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *CodeOfConductSimple) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CodeOfConductSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeOfConductSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeOfConductSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CodeOfConductSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetKey sets the key property value. The key property +func (m *CodeOfConductSimple) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *CodeOfConductSimple) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *CodeOfConductSimple) SetUrl(value *string)() { + m.url = value +} +type CodeOfConductSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetKey()(*string) + GetName()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetKey(value *string)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_alert.go b/pkg/github/models/code_scanning_alert.go new file mode 100644 index 0000000..125b73c --- /dev/null +++ b/pkg/github/models/code_scanning_alert.go @@ -0,0 +1,441 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlert struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissed_by NullableSimpleUserable + // The dismissal comment associated with the dismissal of the alert. + dismissed_comment *string + // **Required when the state is dismissed.** The reason for dismissing or closing the alert. + dismissed_reason *CodeScanningAlertDismissedReason + // The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + fixed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The REST API URL for fetching the list of instances for an alert. + instances_url *string + // The most_recent_instance property + most_recent_instance CodeScanningAlertInstanceable + // The security alert number. + number *int32 + // The rule property + rule CodeScanningAlertRuleable + // State of a code scanning alert. + state *CodeScanningAlertState + // The tool property + tool CodeScanningAnalysisToolable + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string +} +// NewCodeScanningAlert instantiates a new CodeScanningAlert and sets the default values. +func NewCodeScanningAlert()(*CodeScanningAlert) { + m := &CodeScanningAlert{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlert(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlert) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlert) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlert) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dismissed_at +} +// GetDismissedBy gets the dismissed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CodeScanningAlert) GetDismissedBy()(NullableSimpleUserable) { + return m.dismissed_by +} +// GetDismissedComment gets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +// returns a *string when successful +func (m *CodeScanningAlert) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetDismissedReason gets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +// returns a *CodeScanningAlertDismissedReason when successful +func (m *CodeScanningAlert) GetDismissedReason()(*CodeScanningAlertDismissedReason) { + return m.dismissed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedAt(val) + } + return nil + } + res["dismissed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + res["dismissed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertDismissedReason) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReason(val.(*CodeScanningAlertDismissedReason)) + } + return nil + } + res["fixed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFixedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["instances_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstancesUrl(val) + } + return nil + } + res["most_recent_instance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMostRecentInstance(val.(CodeScanningAlertInstanceable)) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRule(val.(CodeScanningAlertRuleable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodeScanningAlertState)) + } + return nil + } + res["tool"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAnalysisToolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTool(val.(CodeScanningAnalysisToolable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFixedAt gets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlert) GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fixed_at +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *CodeScanningAlert) GetHtmlUrl()(*string) { + return m.html_url +} +// GetInstancesUrl gets the instances_url property value. The REST API URL for fetching the list of instances for an alert. +// returns a *string when successful +func (m *CodeScanningAlert) GetInstancesUrl()(*string) { + return m.instances_url +} +// GetMostRecentInstance gets the most_recent_instance property value. The most_recent_instance property +// returns a CodeScanningAlertInstanceable when successful +func (m *CodeScanningAlert) GetMostRecentInstance()(CodeScanningAlertInstanceable) { + return m.most_recent_instance +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *CodeScanningAlert) GetNumber()(*int32) { + return m.number +} +// GetRule gets the rule property value. The rule property +// returns a CodeScanningAlertRuleable when successful +func (m *CodeScanningAlert) GetRule()(CodeScanningAlertRuleable) { + return m.rule +} +// GetState gets the state property value. State of a code scanning alert. +// returns a *CodeScanningAlertState when successful +func (m *CodeScanningAlert) GetState()(*CodeScanningAlertState) { + return m.state +} +// GetTool gets the tool property value. The tool property +// returns a CodeScanningAnalysisToolable when successful +func (m *CodeScanningAlert) GetTool()(CodeScanningAnalysisToolable) { + return m.tool +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlert) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *CodeScanningAlert) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + if m.GetDismissedReason() != nil { + cast := (*m.GetDismissedReason()).String() + err := writer.WriteStringValue("dismissed_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("most_recent_instance", m.GetMostRecentInstance()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rule", m.GetRule()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tool", m.GetTool()) + 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 *CodeScanningAlert) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlert) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlert) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dismissed_at = value +} +// SetDismissedBy sets the dismissed_by property value. A GitHub user. +func (m *CodeScanningAlert) SetDismissedBy(value NullableSimpleUserable)() { + m.dismissed_by = value +} +// SetDismissedComment sets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +func (m *CodeScanningAlert) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +// SetDismissedReason sets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +func (m *CodeScanningAlert) SetDismissedReason(value *CodeScanningAlertDismissedReason)() { + m.dismissed_reason = value +} +// SetFixedAt sets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlert) SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fixed_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *CodeScanningAlert) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetInstancesUrl sets the instances_url property value. The REST API URL for fetching the list of instances for an alert. +func (m *CodeScanningAlert) SetInstancesUrl(value *string)() { + m.instances_url = value +} +// SetMostRecentInstance sets the most_recent_instance property value. The most_recent_instance property +func (m *CodeScanningAlert) SetMostRecentInstance(value CodeScanningAlertInstanceable)() { + m.most_recent_instance = value +} +// SetNumber sets the number property value. The security alert number. +func (m *CodeScanningAlert) SetNumber(value *int32)() { + m.number = value +} +// SetRule sets the rule property value. The rule property +func (m *CodeScanningAlert) SetRule(value CodeScanningAlertRuleable)() { + m.rule = value +} +// SetState sets the state property value. State of a code scanning alert. +func (m *CodeScanningAlert) SetState(value *CodeScanningAlertState)() { + m.state = value +} +// SetTool sets the tool property value. The tool property +func (m *CodeScanningAlert) SetTool(value CodeScanningAnalysisToolable)() { + m.tool = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlert) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *CodeScanningAlert) SetUrl(value *string)() { + m.url = value +} +type CodeScanningAlertable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedBy()(NullableSimpleUserable) + GetDismissedComment()(*string) + GetDismissedReason()(*CodeScanningAlertDismissedReason) + GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetInstancesUrl()(*string) + GetMostRecentInstance()(CodeScanningAlertInstanceable) + GetNumber()(*int32) + GetRule()(CodeScanningAlertRuleable) + GetState()(*CodeScanningAlertState) + GetTool()(CodeScanningAnalysisToolable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedBy(value NullableSimpleUserable)() + SetDismissedComment(value *string)() + SetDismissedReason(value *CodeScanningAlertDismissedReason)() + SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetInstancesUrl(value *string)() + SetMostRecentInstance(value CodeScanningAlertInstanceable)() + SetNumber(value *int32)() + SetRule(value CodeScanningAlertRuleable)() + SetState(value *CodeScanningAlertState)() + SetTool(value CodeScanningAnalysisToolable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_alert503_error.go b/pkg/github/models/code_scanning_alert503_error.go new file mode 100644 index 0000000..930cea8 --- /dev/null +++ b/pkg/github/models/code_scanning_alert503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlert503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningAlert503Error instantiates a new CodeScanningAlert503Error and sets the default values. +func NewCodeScanningAlert503Error()(*CodeScanningAlert503Error) { + m := &CodeScanningAlert503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlert503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlert503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlert503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningAlert503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlert503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningAlert503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningAlert503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlert503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningAlert503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningAlert503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningAlert503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningAlert503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningAlert503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningAlert503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningAlert503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_alert_classification.go b/pkg/github/models/code_scanning_alert_classification.go new file mode 100644 index 0000000..b3b2d7e --- /dev/null +++ b/pkg/github/models/code_scanning_alert_classification.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// A classification of the file. For example to identify it as generated. +type CodeScanningAlertClassification int + +const ( + SOURCE_CODESCANNINGALERTCLASSIFICATION CodeScanningAlertClassification = iota + GENERATED_CODESCANNINGALERTCLASSIFICATION + TEST_CODESCANNINGALERTCLASSIFICATION + LIBRARY_CODESCANNINGALERTCLASSIFICATION +) + +func (i CodeScanningAlertClassification) String() string { + return []string{"source", "generated", "test", "library"}[i] +} +func ParseCodeScanningAlertClassification(v string) (any, error) { + result := SOURCE_CODESCANNINGALERTCLASSIFICATION + switch v { + case "source": + result = SOURCE_CODESCANNINGALERTCLASSIFICATION + case "generated": + result = GENERATED_CODESCANNINGALERTCLASSIFICATION + case "test": + result = TEST_CODESCANNINGALERTCLASSIFICATION + case "library": + result = LIBRARY_CODESCANNINGALERTCLASSIFICATION + default: + return 0, errors.New("Unknown CodeScanningAlertClassification value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertClassification(values []CodeScanningAlertClassification) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertClassification) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_dismissed_reason.go b/pkg/github/models/code_scanning_alert_dismissed_reason.go new file mode 100644 index 0000000..1f4a23b --- /dev/null +++ b/pkg/github/models/code_scanning_alert_dismissed_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// **Required when the state is dismissed.** The reason for dismissing or closing the alert. +type CodeScanningAlertDismissedReason int + +const ( + FALSEPOSITIVE_CODESCANNINGALERTDISMISSEDREASON CodeScanningAlertDismissedReason = iota + WONTFIX_CODESCANNINGALERTDISMISSEDREASON + USEDINTESTS_CODESCANNINGALERTDISMISSEDREASON +) + +func (i CodeScanningAlertDismissedReason) String() string { + return []string{"false positive", "won't fix", "used in tests"}[i] +} +func ParseCodeScanningAlertDismissedReason(v string) (any, error) { + result := FALSEPOSITIVE_CODESCANNINGALERTDISMISSEDREASON + switch v { + case "false positive": + result = FALSEPOSITIVE_CODESCANNINGALERTDISMISSEDREASON + case "won't fix": + result = WONTFIX_CODESCANNINGALERTDISMISSEDREASON + case "used in tests": + result = USEDINTESTS_CODESCANNINGALERTDISMISSEDREASON + default: + return 0, errors.New("Unknown CodeScanningAlertDismissedReason value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertDismissedReason(values []CodeScanningAlertDismissedReason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertDismissedReason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_instance.go b/pkg/github/models/code_scanning_alert_instance.go new file mode 100644 index 0000000..b4132fa --- /dev/null +++ b/pkg/github/models/code_scanning_alert_instance.go @@ -0,0 +1,348 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlertInstance struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. + analysis_key *string + // Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. + category *string + // Classifications that have been applied to the file that triggered the alert.For example identifying it as documentation, or a generated file. + classifications []CodeScanningAlertClassification + // The commit_sha property + commit_sha *string + // Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. + environment *string + // The html_url property + html_url *string + // Describe a region within a file for the alert. + location CodeScanningAlertLocationable + // The message property + message CodeScanningAlertInstance_messageable + // The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,`refs/heads/` or simply ``. + ref *string + // State of a code scanning alert. + state *CodeScanningAlertState +} +// NewCodeScanningAlertInstance instantiates a new CodeScanningAlertInstance and sets the default values. +func NewCodeScanningAlertInstance()(*CodeScanningAlertInstance) { + m := &CodeScanningAlertInstance{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlertInstance(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlertInstance) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysisKey gets the analysis_key property value. Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. +// returns a *string when successful +func (m *CodeScanningAlertInstance) GetAnalysisKey()(*string) { + return m.analysis_key +} +// GetCategory gets the category property value. Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. +// returns a *string when successful +func (m *CodeScanningAlertInstance) GetCategory()(*string) { + return m.category +} +// GetClassifications gets the classifications property value. Classifications that have been applied to the file that triggered the alert.For example identifying it as documentation, or a generated file. +// returns a []CodeScanningAlertClassification when successful +func (m *CodeScanningAlertInstance) GetClassifications()([]CodeScanningAlertClassification) { + return m.classifications +} +// GetCommitSha gets the commit_sha property value. The commit_sha property +// returns a *string when successful +func (m *CodeScanningAlertInstance) GetCommitSha()(*string) { + return m.commit_sha +} +// GetEnvironment gets the environment property value. Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. +// returns a *string when successful +func (m *CodeScanningAlertInstance) GetEnvironment()(*string) { + return m.environment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlertInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analysis_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnalysisKey(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["classifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseCodeScanningAlertClassification) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningAlertClassification, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*CodeScanningAlertClassification)) + } + } + m.SetClassifications(res) + } + return nil + } + res["commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitSha(val) + } + return nil + } + res["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(CodeScanningAlertLocationable)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertInstance_messageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMessage(val.(CodeScanningAlertInstance_messageable)) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodeScanningAlertState)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CodeScanningAlertInstance) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLocation gets the location property value. Describe a region within a file for the alert. +// returns a CodeScanningAlertLocationable when successful +func (m *CodeScanningAlertInstance) GetLocation()(CodeScanningAlertLocationable) { + return m.location +} +// GetMessage gets the message property value. The message property +// returns a CodeScanningAlertInstance_messageable when successful +func (m *CodeScanningAlertInstance) GetMessage()(CodeScanningAlertInstance_messageable) { + return m.message +} +// GetRef gets the ref property value. The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,`refs/heads/` or simply ``. +// returns a *string when successful +func (m *CodeScanningAlertInstance) GetRef()(*string) { + return m.ref +} +// GetState gets the state property value. State of a code scanning alert. +// returns a *CodeScanningAlertState when successful +func (m *CodeScanningAlertInstance) GetState()(*CodeScanningAlertState) { + return m.state +} +// Serialize serializes information the current object +func (m *CodeScanningAlertInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("analysis_key", m.GetAnalysisKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + if m.GetClassifications() != nil { + err := writer.WriteCollectionOfStringValues("classifications", SerializeCodeScanningAlertClassification(m.GetClassifications())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_sha", m.GetCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningAlertInstance) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysisKey sets the analysis_key property value. Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. +func (m *CodeScanningAlertInstance) SetAnalysisKey(value *string)() { + m.analysis_key = value +} +// SetCategory sets the category property value. Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. +func (m *CodeScanningAlertInstance) SetCategory(value *string)() { + m.category = value +} +// SetClassifications sets the classifications property value. Classifications that have been applied to the file that triggered the alert.For example identifying it as documentation, or a generated file. +func (m *CodeScanningAlertInstance) SetClassifications(value []CodeScanningAlertClassification)() { + m.classifications = value +} +// SetCommitSha sets the commit_sha property value. The commit_sha property +func (m *CodeScanningAlertInstance) SetCommitSha(value *string)() { + m.commit_sha = value +} +// SetEnvironment sets the environment property value. Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. +func (m *CodeScanningAlertInstance) SetEnvironment(value *string)() { + m.environment = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CodeScanningAlertInstance) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLocation sets the location property value. Describe a region within a file for the alert. +func (m *CodeScanningAlertInstance) SetLocation(value CodeScanningAlertLocationable)() { + m.location = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningAlertInstance) SetMessage(value CodeScanningAlertInstance_messageable)() { + m.message = value +} +// SetRef sets the ref property value. The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,`refs/heads/` or simply ``. +func (m *CodeScanningAlertInstance) SetRef(value *string)() { + m.ref = value +} +// SetState sets the state property value. State of a code scanning alert. +func (m *CodeScanningAlertInstance) SetState(value *CodeScanningAlertState)() { + m.state = value +} +type CodeScanningAlertInstanceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysisKey()(*string) + GetCategory()(*string) + GetClassifications()([]CodeScanningAlertClassification) + GetCommitSha()(*string) + GetEnvironment()(*string) + GetHtmlUrl()(*string) + GetLocation()(CodeScanningAlertLocationable) + GetMessage()(CodeScanningAlertInstance_messageable) + GetRef()(*string) + GetState()(*CodeScanningAlertState) + SetAnalysisKey(value *string)() + SetCategory(value *string)() + SetClassifications(value []CodeScanningAlertClassification)() + SetCommitSha(value *string)() + SetEnvironment(value *string)() + SetHtmlUrl(value *string)() + SetLocation(value CodeScanningAlertLocationable)() + SetMessage(value CodeScanningAlertInstance_messageable)() + SetRef(value *string)() + SetState(value *CodeScanningAlertState)() +} diff --git a/pkg/github/models/code_scanning_alert_instance_message.go b/pkg/github/models/code_scanning_alert_instance_message.go new file mode 100644 index 0000000..83a574c --- /dev/null +++ b/pkg/github/models/code_scanning_alert_instance_message.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlertInstance_message struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The text property + text *string +} +// NewCodeScanningAlertInstance_message instantiates a new CodeScanningAlertInstance_message and sets the default values. +func NewCodeScanningAlertInstance_message()(*CodeScanningAlertInstance_message) { + m := &CodeScanningAlertInstance_message{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertInstance_messageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertInstance_messageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlertInstance_message(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlertInstance_message) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlertInstance_message) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *CodeScanningAlertInstance_message) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *CodeScanningAlertInstance_message) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningAlertInstance_message) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetText sets the text property value. The text property +func (m *CodeScanningAlertInstance_message) SetText(value *string)() { + m.text = value +} +type CodeScanningAlertInstance_messageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetText()(*string) + SetText(value *string)() +} diff --git a/pkg/github/models/code_scanning_alert_items.go b/pkg/github/models/code_scanning_alert_items.go new file mode 100644 index 0000000..1bc9aa2 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_items.go @@ -0,0 +1,441 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlertItems struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissed_by NullableSimpleUserable + // The dismissal comment associated with the dismissal of the alert. + dismissed_comment *string + // **Required when the state is dismissed.** The reason for dismissing or closing the alert. + dismissed_reason *CodeScanningAlertDismissedReason + // The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + fixed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The REST API URL for fetching the list of instances for an alert. + instances_url *string + // The most_recent_instance property + most_recent_instance CodeScanningAlertInstanceable + // The security alert number. + number *int32 + // The rule property + rule CodeScanningAlertRuleSummaryable + // State of a code scanning alert. + state *CodeScanningAlertState + // The tool property + tool CodeScanningAnalysisToolable + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string +} +// NewCodeScanningAlertItems instantiates a new CodeScanningAlertItems and sets the default values. +func NewCodeScanningAlertItems()(*CodeScanningAlertItems) { + m := &CodeScanningAlertItems{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlertItems(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlertItems) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlertItems) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlertItems) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dismissed_at +} +// GetDismissedBy gets the dismissed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CodeScanningAlertItems) GetDismissedBy()(NullableSimpleUserable) { + return m.dismissed_by +} +// GetDismissedComment gets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +// returns a *string when successful +func (m *CodeScanningAlertItems) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetDismissedReason gets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +// returns a *CodeScanningAlertDismissedReason when successful +func (m *CodeScanningAlertItems) GetDismissedReason()(*CodeScanningAlertDismissedReason) { + return m.dismissed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlertItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedAt(val) + } + return nil + } + res["dismissed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + res["dismissed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertDismissedReason) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReason(val.(*CodeScanningAlertDismissedReason)) + } + return nil + } + res["fixed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFixedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["instances_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstancesUrl(val) + } + return nil + } + res["most_recent_instance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMostRecentInstance(val.(CodeScanningAlertInstanceable)) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertRuleSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRule(val.(CodeScanningAlertRuleSummaryable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodeScanningAlertState)) + } + return nil + } + res["tool"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAnalysisToolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTool(val.(CodeScanningAnalysisToolable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFixedAt gets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlertItems) GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fixed_at +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *CodeScanningAlertItems) GetHtmlUrl()(*string) { + return m.html_url +} +// GetInstancesUrl gets the instances_url property value. The REST API URL for fetching the list of instances for an alert. +// returns a *string when successful +func (m *CodeScanningAlertItems) GetInstancesUrl()(*string) { + return m.instances_url +} +// GetMostRecentInstance gets the most_recent_instance property value. The most_recent_instance property +// returns a CodeScanningAlertInstanceable when successful +func (m *CodeScanningAlertItems) GetMostRecentInstance()(CodeScanningAlertInstanceable) { + return m.most_recent_instance +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *CodeScanningAlertItems) GetNumber()(*int32) { + return m.number +} +// GetRule gets the rule property value. The rule property +// returns a CodeScanningAlertRuleSummaryable when successful +func (m *CodeScanningAlertItems) GetRule()(CodeScanningAlertRuleSummaryable) { + return m.rule +} +// GetState gets the state property value. State of a code scanning alert. +// returns a *CodeScanningAlertState when successful +func (m *CodeScanningAlertItems) GetState()(*CodeScanningAlertState) { + return m.state +} +// GetTool gets the tool property value. The tool property +// returns a CodeScanningAnalysisToolable when successful +func (m *CodeScanningAlertItems) GetTool()(CodeScanningAnalysisToolable) { + return m.tool +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAlertItems) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *CodeScanningAlertItems) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeScanningAlertItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + if m.GetDismissedReason() != nil { + cast := (*m.GetDismissedReason()).String() + err := writer.WriteStringValue("dismissed_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("most_recent_instance", m.GetMostRecentInstance()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rule", m.GetRule()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tool", m.GetTool()) + 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 *CodeScanningAlertItems) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlertItems) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlertItems) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dismissed_at = value +} +// SetDismissedBy sets the dismissed_by property value. A GitHub user. +func (m *CodeScanningAlertItems) SetDismissedBy(value NullableSimpleUserable)() { + m.dismissed_by = value +} +// SetDismissedComment sets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +func (m *CodeScanningAlertItems) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +// SetDismissedReason sets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +func (m *CodeScanningAlertItems) SetDismissedReason(value *CodeScanningAlertDismissedReason)() { + m.dismissed_reason = value +} +// SetFixedAt sets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlertItems) SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fixed_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *CodeScanningAlertItems) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetInstancesUrl sets the instances_url property value. The REST API URL for fetching the list of instances for an alert. +func (m *CodeScanningAlertItems) SetInstancesUrl(value *string)() { + m.instances_url = value +} +// SetMostRecentInstance sets the most_recent_instance property value. The most_recent_instance property +func (m *CodeScanningAlertItems) SetMostRecentInstance(value CodeScanningAlertInstanceable)() { + m.most_recent_instance = value +} +// SetNumber sets the number property value. The security alert number. +func (m *CodeScanningAlertItems) SetNumber(value *int32)() { + m.number = value +} +// SetRule sets the rule property value. The rule property +func (m *CodeScanningAlertItems) SetRule(value CodeScanningAlertRuleSummaryable)() { + m.rule = value +} +// SetState sets the state property value. State of a code scanning alert. +func (m *CodeScanningAlertItems) SetState(value *CodeScanningAlertState)() { + m.state = value +} +// SetTool sets the tool property value. The tool property +func (m *CodeScanningAlertItems) SetTool(value CodeScanningAnalysisToolable)() { + m.tool = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAlertItems) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *CodeScanningAlertItems) SetUrl(value *string)() { + m.url = value +} +type CodeScanningAlertItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedBy()(NullableSimpleUserable) + GetDismissedComment()(*string) + GetDismissedReason()(*CodeScanningAlertDismissedReason) + GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetInstancesUrl()(*string) + GetMostRecentInstance()(CodeScanningAlertInstanceable) + GetNumber()(*int32) + GetRule()(CodeScanningAlertRuleSummaryable) + GetState()(*CodeScanningAlertState) + GetTool()(CodeScanningAnalysisToolable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedBy(value NullableSimpleUserable)() + SetDismissedComment(value *string)() + SetDismissedReason(value *CodeScanningAlertDismissedReason)() + SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetInstancesUrl(value *string)() + SetMostRecentInstance(value CodeScanningAlertInstanceable)() + SetNumber(value *int32)() + SetRule(value CodeScanningAlertRuleSummaryable)() + SetState(value *CodeScanningAlertState)() + SetTool(value CodeScanningAnalysisToolable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_alert_location.go b/pkg/github/models/code_scanning_alert_location.go new file mode 100644 index 0000000..632819d --- /dev/null +++ b/pkg/github/models/code_scanning_alert_location.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningAlertLocation describe a region within a file for the alert. +type CodeScanningAlertLocation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The end_column property + end_column *int32 + // The end_line property + end_line *int32 + // The path property + path *string + // The start_column property + start_column *int32 + // The start_line property + start_line *int32 +} +// NewCodeScanningAlertLocation instantiates a new CodeScanningAlertLocation and sets the default values. +func NewCodeScanningAlertLocation()(*CodeScanningAlertLocation) { + m := &CodeScanningAlertLocation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlertLocation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlertLocation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEndColumn gets the end_column property value. The end_column property +// returns a *int32 when successful +func (m *CodeScanningAlertLocation) GetEndColumn()(*int32) { + return m.end_column +} +// GetEndLine gets the end_line property value. The end_line property +// returns a *int32 when successful +func (m *CodeScanningAlertLocation) GetEndLine()(*int32) { + return m.end_line +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlertLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["end_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEndColumn(val) + } + return nil + } + res["end_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEndLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["start_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartColumn(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *CodeScanningAlertLocation) GetPath()(*string) { + return m.path +} +// GetStartColumn gets the start_column property value. The start_column property +// returns a *int32 when successful +func (m *CodeScanningAlertLocation) GetStartColumn()(*int32) { + return m.start_column +} +// GetStartLine gets the start_line property value. The start_line property +// returns a *int32 when successful +func (m *CodeScanningAlertLocation) GetStartLine()(*int32) { + return m.start_line +} +// Serialize serializes information the current object +func (m *CodeScanningAlertLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("end_column", m.GetEndColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("end_line", m.GetEndLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_column", m.GetStartColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + 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 *CodeScanningAlertLocation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEndColumn sets the end_column property value. The end_column property +func (m *CodeScanningAlertLocation) SetEndColumn(value *int32)() { + m.end_column = value +} +// SetEndLine sets the end_line property value. The end_line property +func (m *CodeScanningAlertLocation) SetEndLine(value *int32)() { + m.end_line = value +} +// SetPath sets the path property value. The path property +func (m *CodeScanningAlertLocation) SetPath(value *string)() { + m.path = value +} +// SetStartColumn sets the start_column property value. The start_column property +func (m *CodeScanningAlertLocation) SetStartColumn(value *int32)() { + m.start_column = value +} +// SetStartLine sets the start_line property value. The start_line property +func (m *CodeScanningAlertLocation) SetStartLine(value *int32)() { + m.start_line = value +} +type CodeScanningAlertLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndColumn()(*int32) + GetEndLine()(*int32) + GetPath()(*string) + GetStartColumn()(*int32) + GetStartLine()(*int32) + SetEndColumn(value *int32)() + SetEndLine(value *int32)() + SetPath(value *string)() + SetStartColumn(value *int32)() + SetStartLine(value *int32)() +} diff --git a/pkg/github/models/code_scanning_alert_rule.go b/pkg/github/models/code_scanning_alert_rule.go new file mode 100644 index 0000000..f6524c8 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_rule.go @@ -0,0 +1,320 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlertRule struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A short description of the rule used to detect the alert. + description *string + // description of the rule used to detect the alert. + full_description *string + // Detailed documentation for the rule as GitHub Flavored Markdown. + help *string + // A link to the documentation for the rule used to detect the alert. + help_uri *string + // A unique identifier for the rule used to detect the alert. + id *string + // The name of the rule used to detect the alert. + name *string + // The security severity of the alert. + security_severity_level *CodeScanningAlertRule_security_severity_level + // The severity of the alert. + severity *CodeScanningAlertRule_severity + // A set of tags applicable for the rule. + tags []string +} +// NewCodeScanningAlertRule instantiates a new CodeScanningAlertRule and sets the default values. +func NewCodeScanningAlertRule()(*CodeScanningAlertRule) { + m := &CodeScanningAlertRule{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlertRule(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlertRule) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A short description of the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRule) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlertRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["full_description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullDescription(val) + } + return nil + } + res["help"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelp(val) + } + return nil + } + res["help_uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelpUri(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["security_severity_level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertRule_security_severity_level) + if err != nil { + return err + } + if val != nil { + m.SetSecuritySeverityLevel(val.(*CodeScanningAlertRule_security_severity_level)) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertRule_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*CodeScanningAlertRule_severity)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTags(res) + } + return nil + } + return res +} +// GetFullDescription gets the full_description property value. description of the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRule) GetFullDescription()(*string) { + return m.full_description +} +// GetHelp gets the help property value. Detailed documentation for the rule as GitHub Flavored Markdown. +// returns a *string when successful +func (m *CodeScanningAlertRule) GetHelp()(*string) { + return m.help +} +// GetHelpUri gets the help_uri property value. A link to the documentation for the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRule) GetHelpUri()(*string) { + return m.help_uri +} +// GetId gets the id property value. A unique identifier for the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRule) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name of the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRule) GetName()(*string) { + return m.name +} +// GetSecuritySeverityLevel gets the security_severity_level property value. The security severity of the alert. +// returns a *CodeScanningAlertRule_security_severity_level when successful +func (m *CodeScanningAlertRule) GetSecuritySeverityLevel()(*CodeScanningAlertRule_security_severity_level) { + return m.security_severity_level +} +// GetSeverity gets the severity property value. The severity of the alert. +// returns a *CodeScanningAlertRule_severity when successful +func (m *CodeScanningAlertRule) GetSeverity()(*CodeScanningAlertRule_severity) { + return m.severity +} +// GetTags gets the tags property value. A set of tags applicable for the rule. +// returns a []string when successful +func (m *CodeScanningAlertRule) GetTags()([]string) { + return m.tags +} +// Serialize serializes information the current object +func (m *CodeScanningAlertRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_description", m.GetFullDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("help", m.GetHelp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("help_uri", m.GetHelpUri()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetSecuritySeverityLevel() != nil { + cast := (*m.GetSecuritySeverityLevel()).String() + err := writer.WriteStringValue("security_severity_level", &cast) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err := writer.WriteCollectionOfStringValues("tags", m.GetTags()) + 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 *CodeScanningAlertRule) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A short description of the rule used to detect the alert. +func (m *CodeScanningAlertRule) SetDescription(value *string)() { + m.description = value +} +// SetFullDescription sets the full_description property value. description of the rule used to detect the alert. +func (m *CodeScanningAlertRule) SetFullDescription(value *string)() { + m.full_description = value +} +// SetHelp sets the help property value. Detailed documentation for the rule as GitHub Flavored Markdown. +func (m *CodeScanningAlertRule) SetHelp(value *string)() { + m.help = value +} +// SetHelpUri sets the help_uri property value. A link to the documentation for the rule used to detect the alert. +func (m *CodeScanningAlertRule) SetHelpUri(value *string)() { + m.help_uri = value +} +// SetId sets the id property value. A unique identifier for the rule used to detect the alert. +func (m *CodeScanningAlertRule) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name of the rule used to detect the alert. +func (m *CodeScanningAlertRule) SetName(value *string)() { + m.name = value +} +// SetSecuritySeverityLevel sets the security_severity_level property value. The security severity of the alert. +func (m *CodeScanningAlertRule) SetSecuritySeverityLevel(value *CodeScanningAlertRule_security_severity_level)() { + m.security_severity_level = value +} +// SetSeverity sets the severity property value. The severity of the alert. +func (m *CodeScanningAlertRule) SetSeverity(value *CodeScanningAlertRule_severity)() { + m.severity = value +} +// SetTags sets the tags property value. A set of tags applicable for the rule. +func (m *CodeScanningAlertRule) SetTags(value []string)() { + m.tags = value +} +type CodeScanningAlertRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetFullDescription()(*string) + GetHelp()(*string) + GetHelpUri()(*string) + GetId()(*string) + GetName()(*string) + GetSecuritySeverityLevel()(*CodeScanningAlertRule_security_severity_level) + GetSeverity()(*CodeScanningAlertRule_severity) + GetTags()([]string) + SetDescription(value *string)() + SetFullDescription(value *string)() + SetHelp(value *string)() + SetHelpUri(value *string)() + SetId(value *string)() + SetName(value *string)() + SetSecuritySeverityLevel(value *CodeScanningAlertRule_security_severity_level)() + SetSeverity(value *CodeScanningAlertRule_severity)() + SetTags(value []string)() +} diff --git a/pkg/github/models/code_scanning_alert_rule_security_severity_level.go b/pkg/github/models/code_scanning_alert_rule_security_severity_level.go new file mode 100644 index 0000000..9119dc4 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_rule_security_severity_level.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The security severity of the alert. +type CodeScanningAlertRule_security_severity_level int + +const ( + LOW_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL CodeScanningAlertRule_security_severity_level = iota + MEDIUM_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + HIGH_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + CRITICAL_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL +) + +func (i CodeScanningAlertRule_security_severity_level) String() string { + return []string{"low", "medium", "high", "critical"}[i] +} +func ParseCodeScanningAlertRule_security_severity_level(v string) (any, error) { + result := LOW_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + switch v { + case "low": + result = LOW_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + case "medium": + result = MEDIUM_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + case "high": + result = HIGH_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + case "critical": + result = CRITICAL_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL + default: + return 0, errors.New("Unknown CodeScanningAlertRule_security_severity_level value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertRule_security_severity_level(values []CodeScanningAlertRule_security_severity_level) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertRule_security_severity_level) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_rule_severity.go b/pkg/github/models/code_scanning_alert_rule_severity.go new file mode 100644 index 0000000..179b9d7 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_rule_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the alert. +type CodeScanningAlertRule_severity int + +const ( + NONE_CODESCANNINGALERTRULE_SEVERITY CodeScanningAlertRule_severity = iota + NOTE_CODESCANNINGALERTRULE_SEVERITY + WARNING_CODESCANNINGALERTRULE_SEVERITY + ERROR_CODESCANNINGALERTRULE_SEVERITY +) + +func (i CodeScanningAlertRule_severity) String() string { + return []string{"none", "note", "warning", "error"}[i] +} +func ParseCodeScanningAlertRule_severity(v string) (any, error) { + result := NONE_CODESCANNINGALERTRULE_SEVERITY + switch v { + case "none": + result = NONE_CODESCANNINGALERTRULE_SEVERITY + case "note": + result = NOTE_CODESCANNINGALERTRULE_SEVERITY + case "warning": + result = WARNING_CODESCANNINGALERTRULE_SEVERITY + case "error": + result = ERROR_CODESCANNINGALERTRULE_SEVERITY + default: + return 0, errors.New("Unknown CodeScanningAlertRule_severity value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertRule_severity(values []CodeScanningAlertRule_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertRule_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_rule_summary.go b/pkg/github/models/code_scanning_alert_rule_summary.go new file mode 100644 index 0000000..774db61 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_rule_summary.go @@ -0,0 +1,233 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAlertRuleSummary struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A short description of the rule used to detect the alert. + description *string + // A unique identifier for the rule used to detect the alert. + id *string + // The name of the rule used to detect the alert. + name *string + // The security severity of the alert. + security_severity_level *CodeScanningAlertRuleSummary_security_severity_level + // The severity of the alert. + severity *CodeScanningAlertRuleSummary_severity + // A set of tags applicable for the rule. + tags []string +} +// NewCodeScanningAlertRuleSummary instantiates a new CodeScanningAlertRuleSummary and sets the default values. +func NewCodeScanningAlertRuleSummary()(*CodeScanningAlertRuleSummary) { + m := &CodeScanningAlertRuleSummary{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAlertRuleSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAlertRuleSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAlertRuleSummary(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAlertRuleSummary) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A short description of the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRuleSummary) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAlertRuleSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["security_severity_level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertRuleSummary_security_severity_level) + if err != nil { + return err + } + if val != nil { + m.SetSecuritySeverityLevel(val.(*CodeScanningAlertRuleSummary_security_severity_level)) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertRuleSummary_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*CodeScanningAlertRuleSummary_severity)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTags(res) + } + return nil + } + return res +} +// GetId gets the id property value. A unique identifier for the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRuleSummary) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name of the rule used to detect the alert. +// returns a *string when successful +func (m *CodeScanningAlertRuleSummary) GetName()(*string) { + return m.name +} +// GetSecuritySeverityLevel gets the security_severity_level property value. The security severity of the alert. +// returns a *CodeScanningAlertRuleSummary_security_severity_level when successful +func (m *CodeScanningAlertRuleSummary) GetSecuritySeverityLevel()(*CodeScanningAlertRuleSummary_security_severity_level) { + return m.security_severity_level +} +// GetSeverity gets the severity property value. The severity of the alert. +// returns a *CodeScanningAlertRuleSummary_severity when successful +func (m *CodeScanningAlertRuleSummary) GetSeverity()(*CodeScanningAlertRuleSummary_severity) { + return m.severity +} +// GetTags gets the tags property value. A set of tags applicable for the rule. +// returns a []string when successful +func (m *CodeScanningAlertRuleSummary) GetTags()([]string) { + return m.tags +} +// Serialize serializes information the current object +func (m *CodeScanningAlertRuleSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetSecuritySeverityLevel() != nil { + cast := (*m.GetSecuritySeverityLevel()).String() + err := writer.WriteStringValue("security_severity_level", &cast) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err := writer.WriteCollectionOfStringValues("tags", m.GetTags()) + 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 *CodeScanningAlertRuleSummary) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A short description of the rule used to detect the alert. +func (m *CodeScanningAlertRuleSummary) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. A unique identifier for the rule used to detect the alert. +func (m *CodeScanningAlertRuleSummary) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name of the rule used to detect the alert. +func (m *CodeScanningAlertRuleSummary) SetName(value *string)() { + m.name = value +} +// SetSecuritySeverityLevel sets the security_severity_level property value. The security severity of the alert. +func (m *CodeScanningAlertRuleSummary) SetSecuritySeverityLevel(value *CodeScanningAlertRuleSummary_security_severity_level)() { + m.security_severity_level = value +} +// SetSeverity sets the severity property value. The severity of the alert. +func (m *CodeScanningAlertRuleSummary) SetSeverity(value *CodeScanningAlertRuleSummary_severity)() { + m.severity = value +} +// SetTags sets the tags property value. A set of tags applicable for the rule. +func (m *CodeScanningAlertRuleSummary) SetTags(value []string)() { + m.tags = value +} +type CodeScanningAlertRuleSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetId()(*string) + GetName()(*string) + GetSecuritySeverityLevel()(*CodeScanningAlertRuleSummary_security_severity_level) + GetSeverity()(*CodeScanningAlertRuleSummary_severity) + GetTags()([]string) + SetDescription(value *string)() + SetId(value *string)() + SetName(value *string)() + SetSecuritySeverityLevel(value *CodeScanningAlertRuleSummary_security_severity_level)() + SetSeverity(value *CodeScanningAlertRuleSummary_severity)() + SetTags(value []string)() +} diff --git a/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go b/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go new file mode 100644 index 0000000..ae3e8a3 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The security severity of the alert. +type CodeScanningAlertRuleSummary_security_severity_level int + +const ( + LOW_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL CodeScanningAlertRuleSummary_security_severity_level = iota + MEDIUM_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + HIGH_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + CRITICAL_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL +) + +func (i CodeScanningAlertRuleSummary_security_severity_level) String() string { + return []string{"low", "medium", "high", "critical"}[i] +} +func ParseCodeScanningAlertRuleSummary_security_severity_level(v string) (any, error) { + result := LOW_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + switch v { + case "low": + result = LOW_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + case "medium": + result = MEDIUM_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + case "high": + result = HIGH_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + case "critical": + result = CRITICAL_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL + default: + return 0, errors.New("Unknown CodeScanningAlertRuleSummary_security_severity_level value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertRuleSummary_security_severity_level(values []CodeScanningAlertRuleSummary_security_severity_level) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertRuleSummary_security_severity_level) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_rule_summary_severity.go b/pkg/github/models/code_scanning_alert_rule_summary_severity.go new file mode 100644 index 0000000..70a1284 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_rule_summary_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the alert. +type CodeScanningAlertRuleSummary_severity int + +const ( + NONE_CODESCANNINGALERTRULESUMMARY_SEVERITY CodeScanningAlertRuleSummary_severity = iota + NOTE_CODESCANNINGALERTRULESUMMARY_SEVERITY + WARNING_CODESCANNINGALERTRULESUMMARY_SEVERITY + ERROR_CODESCANNINGALERTRULESUMMARY_SEVERITY +) + +func (i CodeScanningAlertRuleSummary_severity) String() string { + return []string{"none", "note", "warning", "error"}[i] +} +func ParseCodeScanningAlertRuleSummary_severity(v string) (any, error) { + result := NONE_CODESCANNINGALERTRULESUMMARY_SEVERITY + switch v { + case "none": + result = NONE_CODESCANNINGALERTRULESUMMARY_SEVERITY + case "note": + result = NOTE_CODESCANNINGALERTRULESUMMARY_SEVERITY + case "warning": + result = WARNING_CODESCANNINGALERTRULESUMMARY_SEVERITY + case "error": + result = ERROR_CODESCANNINGALERTRULESUMMARY_SEVERITY + default: + return 0, errors.New("Unknown CodeScanningAlertRuleSummary_severity value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertRuleSummary_severity(values []CodeScanningAlertRuleSummary_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertRuleSummary_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_set_state.go b/pkg/github/models/code_scanning_alert_set_state.go new file mode 100644 index 0000000..8caa6ce --- /dev/null +++ b/pkg/github/models/code_scanning_alert_set_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. +type CodeScanningAlertSetState int + +const ( + OPEN_CODESCANNINGALERTSETSTATE CodeScanningAlertSetState = iota + DISMISSED_CODESCANNINGALERTSETSTATE +) + +func (i CodeScanningAlertSetState) String() string { + return []string{"open", "dismissed"}[i] +} +func ParseCodeScanningAlertSetState(v string) (any, error) { + result := OPEN_CODESCANNINGALERTSETSTATE + switch v { + case "open": + result = OPEN_CODESCANNINGALERTSETSTATE + case "dismissed": + result = DISMISSED_CODESCANNINGALERTSETSTATE + default: + return 0, errors.New("Unknown CodeScanningAlertSetState value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertSetState(values []CodeScanningAlertSetState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertSetState) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_severity.go b/pkg/github/models/code_scanning_alert_severity.go new file mode 100644 index 0000000..7354b25 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_severity.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Severity of a code scanning alert. +type CodeScanningAlertSeverity int + +const ( + CRITICAL_CODESCANNINGALERTSEVERITY CodeScanningAlertSeverity = iota + HIGH_CODESCANNINGALERTSEVERITY + MEDIUM_CODESCANNINGALERTSEVERITY + LOW_CODESCANNINGALERTSEVERITY + WARNING_CODESCANNINGALERTSEVERITY + NOTE_CODESCANNINGALERTSEVERITY + ERROR_CODESCANNINGALERTSEVERITY +) + +func (i CodeScanningAlertSeverity) String() string { + return []string{"critical", "high", "medium", "low", "warning", "note", "error"}[i] +} +func ParseCodeScanningAlertSeverity(v string) (any, error) { + result := CRITICAL_CODESCANNINGALERTSEVERITY + switch v { + case "critical": + result = CRITICAL_CODESCANNINGALERTSEVERITY + case "high": + result = HIGH_CODESCANNINGALERTSEVERITY + case "medium": + result = MEDIUM_CODESCANNINGALERTSEVERITY + case "low": + result = LOW_CODESCANNINGALERTSEVERITY + case "warning": + result = WARNING_CODESCANNINGALERTSEVERITY + case "note": + result = NOTE_CODESCANNINGALERTSEVERITY + case "error": + result = ERROR_CODESCANNINGALERTSEVERITY + default: + return 0, errors.New("Unknown CodeScanningAlertSeverity value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertSeverity(values []CodeScanningAlertSeverity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertSeverity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_state.go b/pkg/github/models/code_scanning_alert_state.go new file mode 100644 index 0000000..fd3ce89 --- /dev/null +++ b/pkg/github/models/code_scanning_alert_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// State of a code scanning alert. +type CodeScanningAlertState int + +const ( + OPEN_CODESCANNINGALERTSTATE CodeScanningAlertState = iota + DISMISSED_CODESCANNINGALERTSTATE + FIXED_CODESCANNINGALERTSTATE +) + +func (i CodeScanningAlertState) String() string { + return []string{"open", "dismissed", "fixed"}[i] +} +func ParseCodeScanningAlertState(v string) (any, error) { + result := OPEN_CODESCANNINGALERTSTATE + switch v { + case "open": + result = OPEN_CODESCANNINGALERTSTATE + case "dismissed": + result = DISMISSED_CODESCANNINGALERTSTATE + case "fixed": + result = FIXED_CODESCANNINGALERTSTATE + default: + return 0, errors.New("Unknown CodeScanningAlertState value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertState(values []CodeScanningAlertState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertState) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_alert_state_query.go b/pkg/github/models/code_scanning_alert_state_query.go new file mode 100644 index 0000000..c571d6c --- /dev/null +++ b/pkg/github/models/code_scanning_alert_state_query.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// State of a code scanning alert. +type CodeScanningAlertStateQuery int + +const ( + OPEN_CODESCANNINGALERTSTATEQUERY CodeScanningAlertStateQuery = iota + CLOSED_CODESCANNINGALERTSTATEQUERY + DISMISSED_CODESCANNINGALERTSTATEQUERY + FIXED_CODESCANNINGALERTSTATEQUERY +) + +func (i CodeScanningAlertStateQuery) String() string { + return []string{"open", "closed", "dismissed", "fixed"}[i] +} +func ParseCodeScanningAlertStateQuery(v string) (any, error) { + result := OPEN_CODESCANNINGALERTSTATEQUERY + switch v { + case "open": + result = OPEN_CODESCANNINGALERTSTATEQUERY + case "closed": + result = CLOSED_CODESCANNINGALERTSTATEQUERY + case "dismissed": + result = DISMISSED_CODESCANNINGALERTSTATEQUERY + case "fixed": + result = FIXED_CODESCANNINGALERTSTATEQUERY + default: + return 0, errors.New("Unknown CodeScanningAlertStateQuery value: " + v) + } + return &result, nil +} +func SerializeCodeScanningAlertStateQuery(values []CodeScanningAlertStateQuery) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningAlertStateQuery) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_analysis.go b/pkg/github/models/code_scanning_analysis.go new file mode 100644 index 0000000..a0ddd3b --- /dev/null +++ b/pkg/github/models/code_scanning_analysis.go @@ -0,0 +1,475 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAnalysis struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. + analysis_key *string + // Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. + category *string + // The SHA of the commit to which the analysis you are uploading relates. + commit_sha *string + // The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deletable property + deletable *bool + // Identifies the variable values associated with the environment in which this analysis was performed. + environment *string + // The error property + error *string + // Unique identifier for this analysis. + id *int32 + // The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,`refs/heads/` or simply ``. + ref *string + // The total number of results in the analysis. + results_count *int32 + // The total number of rules used in the analysis. + rules_count *int32 + // An identifier for the upload. + sarif_id *string + // The tool property + tool CodeScanningAnalysisToolable + // The REST API URL of the analysis resource. + url *string + // Warning generated when processing the analysis + warning *string +} +// NewCodeScanningAnalysis instantiates a new CodeScanningAnalysis and sets the default values. +func NewCodeScanningAnalysis()(*CodeScanningAnalysis) { + m := &CodeScanningAnalysis{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAnalysisFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAnalysisFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAnalysis(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAnalysis) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysisKey gets the analysis_key property value. Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetAnalysisKey()(*string) { + return m.analysis_key +} +// GetCategory gets the category property value. Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetCategory()(*string) { + return m.category +} +// GetCommitSha gets the commit_sha property value. The SHA of the commit to which the analysis you are uploading relates. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetCommitSha()(*string) { + return m.commit_sha +} +// GetCreatedAt gets the created_at property value. The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningAnalysis) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeletable gets the deletable property value. The deletable property +// returns a *bool when successful +func (m *CodeScanningAnalysis) GetDeletable()(*bool) { + return m.deletable +} +// GetEnvironment gets the environment property value. Identifies the variable values associated with the environment in which this analysis was performed. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetEnvironment()(*string) { + return m.environment +} +// GetError gets the error property value. The error property +// returns a *string when successful +func (m *CodeScanningAnalysis) GetError()(*string) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAnalysis) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analysis_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnalysisKey(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitSha(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deletable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletable(val) + } + return nil + } + res["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetError(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["results_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResultsCount(val) + } + return nil + } + res["rules_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRulesCount(val) + } + return nil + } + res["sarif_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSarifId(val) + } + return nil + } + res["tool"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAnalysisToolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTool(val.(CodeScanningAnalysisToolable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["warning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWarning(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier for this analysis. +// returns a *int32 when successful +func (m *CodeScanningAnalysis) GetId()(*int32) { + return m.id +} +// GetRef gets the ref property value. The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,`refs/heads/` or simply ``. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetRef()(*string) { + return m.ref +} +// GetResultsCount gets the results_count property value. The total number of results in the analysis. +// returns a *int32 when successful +func (m *CodeScanningAnalysis) GetResultsCount()(*int32) { + return m.results_count +} +// GetRulesCount gets the rules_count property value. The total number of rules used in the analysis. +// returns a *int32 when successful +func (m *CodeScanningAnalysis) GetRulesCount()(*int32) { + return m.rules_count +} +// GetSarifId gets the sarif_id property value. An identifier for the upload. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetSarifId()(*string) { + return m.sarif_id +} +// GetTool gets the tool property value. The tool property +// returns a CodeScanningAnalysisToolable when successful +func (m *CodeScanningAnalysis) GetTool()(CodeScanningAnalysisToolable) { + return m.tool +} +// GetUrl gets the url property value. The REST API URL of the analysis resource. +// returns a *string when successful +func (m *CodeScanningAnalysis) GetUrl()(*string) { + return m.url +} +// GetWarning gets the warning property value. Warning generated when processing the analysis +// returns a *string when successful +func (m *CodeScanningAnalysis) GetWarning()(*string) { + return m.warning +} +// Serialize serializes information the current object +func (m *CodeScanningAnalysis) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("analysis_key", m.GetAnalysisKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_sha", m.GetCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("deletable", m.GetDeletable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("results_count", m.GetResultsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("rules_count", m.GetRulesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sarif_id", m.GetSarifId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tool", m.GetTool()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("warning", m.GetWarning()) + 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 *CodeScanningAnalysis) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysisKey sets the analysis_key property value. Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. +func (m *CodeScanningAnalysis) SetAnalysisKey(value *string)() { + m.analysis_key = value +} +// SetCategory sets the category property value. Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. +func (m *CodeScanningAnalysis) SetCategory(value *string)() { + m.category = value +} +// SetCommitSha sets the commit_sha property value. The SHA of the commit to which the analysis you are uploading relates. +func (m *CodeScanningAnalysis) SetCommitSha(value *string)() { + m.commit_sha = value +} +// SetCreatedAt sets the created_at property value. The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningAnalysis) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeletable sets the deletable property value. The deletable property +func (m *CodeScanningAnalysis) SetDeletable(value *bool)() { + m.deletable = value +} +// SetEnvironment sets the environment property value. Identifies the variable values associated with the environment in which this analysis was performed. +func (m *CodeScanningAnalysis) SetEnvironment(value *string)() { + m.environment = value +} +// SetError sets the error property value. The error property +func (m *CodeScanningAnalysis) SetError(value *string)() { + m.error = value +} +// SetId sets the id property value. Unique identifier for this analysis. +func (m *CodeScanningAnalysis) SetId(value *int32)() { + m.id = value +} +// SetRef sets the ref property value. The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`,`refs/heads/` or simply ``. +func (m *CodeScanningAnalysis) SetRef(value *string)() { + m.ref = value +} +// SetResultsCount sets the results_count property value. The total number of results in the analysis. +func (m *CodeScanningAnalysis) SetResultsCount(value *int32)() { + m.results_count = value +} +// SetRulesCount sets the rules_count property value. The total number of rules used in the analysis. +func (m *CodeScanningAnalysis) SetRulesCount(value *int32)() { + m.rules_count = value +} +// SetSarifId sets the sarif_id property value. An identifier for the upload. +func (m *CodeScanningAnalysis) SetSarifId(value *string)() { + m.sarif_id = value +} +// SetTool sets the tool property value. The tool property +func (m *CodeScanningAnalysis) SetTool(value CodeScanningAnalysisToolable)() { + m.tool = value +} +// SetUrl sets the url property value. The REST API URL of the analysis resource. +func (m *CodeScanningAnalysis) SetUrl(value *string)() { + m.url = value +} +// SetWarning sets the warning property value. Warning generated when processing the analysis +func (m *CodeScanningAnalysis) SetWarning(value *string)() { + m.warning = value +} +type CodeScanningAnalysisable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysisKey()(*string) + GetCategory()(*string) + GetCommitSha()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletable()(*bool) + GetEnvironment()(*string) + GetError()(*string) + GetId()(*int32) + GetRef()(*string) + GetResultsCount()(*int32) + GetRulesCount()(*int32) + GetSarifId()(*string) + GetTool()(CodeScanningAnalysisToolable) + GetUrl()(*string) + GetWarning()(*string) + SetAnalysisKey(value *string)() + SetCategory(value *string)() + SetCommitSha(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletable(value *bool)() + SetEnvironment(value *string)() + SetError(value *string)() + SetId(value *int32)() + SetRef(value *string)() + SetResultsCount(value *int32)() + SetRulesCount(value *int32)() + SetSarifId(value *string)() + SetTool(value CodeScanningAnalysisToolable)() + SetUrl(value *string)() + SetWarning(value *string)() +} diff --git a/pkg/github/models/code_scanning_analysis503_error.go b/pkg/github/models/code_scanning_analysis503_error.go new file mode 100644 index 0000000..888313c --- /dev/null +++ b/pkg/github/models/code_scanning_analysis503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAnalysis503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningAnalysis503Error instantiates a new CodeScanningAnalysis503Error and sets the default values. +func NewCodeScanningAnalysis503Error()(*CodeScanningAnalysis503Error) { + m := &CodeScanningAnalysis503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAnalysis503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAnalysis503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAnalysis503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningAnalysis503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAnalysis503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningAnalysis503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningAnalysis503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAnalysis503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningAnalysis503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningAnalysis503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningAnalysis503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningAnalysis503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningAnalysis503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningAnalysis503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningAnalysis503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_analysis_deletion.go b/pkg/github/models/code_scanning_analysis_deletion.go new file mode 100644 index 0000000..0e104ce --- /dev/null +++ b/pkg/github/models/code_scanning_analysis_deletion.go @@ -0,0 +1,98 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningAnalysisDeletion successful deletion of a code scanning analysis +type CodeScanningAnalysisDeletion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Next deletable analysis in chain, with last analysis deletion confirmation + confirm_delete_url *string + // Next deletable analysis in chain, without last analysis deletion confirmation + next_analysis_url *string +} +// NewCodeScanningAnalysisDeletion instantiates a new CodeScanningAnalysisDeletion and sets the default values. +func NewCodeScanningAnalysisDeletion()(*CodeScanningAnalysisDeletion) { + m := &CodeScanningAnalysisDeletion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAnalysisDeletionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAnalysisDeletionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAnalysisDeletion(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAnalysisDeletion) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfirmDeleteUrl gets the confirm_delete_url property value. Next deletable analysis in chain, with last analysis deletion confirmation +// returns a *string when successful +func (m *CodeScanningAnalysisDeletion) GetConfirmDeleteUrl()(*string) { + return m.confirm_delete_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAnalysisDeletion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confirm_delete_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfirmDeleteUrl(val) + } + return nil + } + res["next_analysis_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNextAnalysisUrl(val) + } + return nil + } + return res +} +// GetNextAnalysisUrl gets the next_analysis_url property value. Next deletable analysis in chain, without last analysis deletion confirmation +// returns a *string when successful +func (m *CodeScanningAnalysisDeletion) GetNextAnalysisUrl()(*string) { + return m.next_analysis_url +} +// Serialize serializes information the current object +func (m *CodeScanningAnalysisDeletion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningAnalysisDeletion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfirmDeleteUrl sets the confirm_delete_url property value. Next deletable analysis in chain, with last analysis deletion confirmation +func (m *CodeScanningAnalysisDeletion) SetConfirmDeleteUrl(value *string)() { + m.confirm_delete_url = value +} +// SetNextAnalysisUrl sets the next_analysis_url property value. Next deletable analysis in chain, without last analysis deletion confirmation +func (m *CodeScanningAnalysisDeletion) SetNextAnalysisUrl(value *string)() { + m.next_analysis_url = value +} +type CodeScanningAnalysisDeletionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfirmDeleteUrl()(*string) + GetNextAnalysisUrl()(*string) + SetConfirmDeleteUrl(value *string)() + SetNextAnalysisUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_analysis_deletion503_error.go b/pkg/github/models/code_scanning_analysis_deletion503_error.go new file mode 100644 index 0000000..9a69878 --- /dev/null +++ b/pkg/github/models/code_scanning_analysis_deletion503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAnalysisDeletion503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningAnalysisDeletion503Error instantiates a new CodeScanningAnalysisDeletion503Error and sets the default values. +func NewCodeScanningAnalysisDeletion503Error()(*CodeScanningAnalysisDeletion503Error) { + m := &CodeScanningAnalysisDeletion503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAnalysisDeletion503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAnalysisDeletion503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAnalysisDeletion503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningAnalysisDeletion503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAnalysisDeletion503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningAnalysisDeletion503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningAnalysisDeletion503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAnalysisDeletion503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningAnalysisDeletion503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningAnalysisDeletion503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningAnalysisDeletion503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningAnalysisDeletion503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningAnalysisDeletion503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningAnalysisDeletion503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningAnalysisDeletion503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_analysis_tool.go b/pkg/github/models/code_scanning_analysis_tool.go new file mode 100644 index 0000000..075ba54 --- /dev/null +++ b/pkg/github/models/code_scanning_analysis_tool.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningAnalysisTool struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. + guid *string + // The name of the tool used to generate the code scanning analysis. + name *string + // The version of the tool used to generate the code scanning analysis. + version *string +} +// NewCodeScanningAnalysisTool instantiates a new CodeScanningAnalysisTool and sets the default values. +func NewCodeScanningAnalysisTool()(*CodeScanningAnalysisTool) { + m := &CodeScanningAnalysisTool{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningAnalysisToolFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningAnalysisToolFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningAnalysisTool(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningAnalysisTool) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningAnalysisTool) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["guid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGuid(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["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetGuid gets the guid property value. The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. +// returns a *string when successful +func (m *CodeScanningAnalysisTool) GetGuid()(*string) { + return m.guid +} +// GetName gets the name property value. The name of the tool used to generate the code scanning analysis. +// returns a *string when successful +func (m *CodeScanningAnalysisTool) GetName()(*string) { + return m.name +} +// GetVersion gets the version property value. The version of the tool used to generate the code scanning analysis. +// returns a *string when successful +func (m *CodeScanningAnalysisTool) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *CodeScanningAnalysisTool) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("guid", m.GetGuid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *CodeScanningAnalysisTool) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGuid sets the guid property value. The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. +func (m *CodeScanningAnalysisTool) SetGuid(value *string)() { + m.guid = value +} +// SetName sets the name property value. The name of the tool used to generate the code scanning analysis. +func (m *CodeScanningAnalysisTool) SetName(value *string)() { + m.name = value +} +// SetVersion sets the version property value. The version of the tool used to generate the code scanning analysis. +func (m *CodeScanningAnalysisTool) SetVersion(value *string)() { + m.version = value +} +type CodeScanningAnalysisToolable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGuid()(*string) + GetName()(*string) + GetVersion()(*string) + SetGuid(value *string)() + SetName(value *string)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/code_scanning_codeql_database.go b/pkg/github/models/code_scanning_codeql_database.go new file mode 100644 index 0000000..3f255e5 --- /dev/null +++ b/pkg/github/models/code_scanning_codeql_database.go @@ -0,0 +1,343 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningCodeqlDatabase a CodeQL database. +type CodeScanningCodeqlDatabase struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit SHA of the repository at the time the CodeQL database was created. + commit_oid *string + // The MIME type of the CodeQL database file. + content_type *string + // The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ID of the CodeQL database. + id *int32 + // The language of the CodeQL database. + language *string + // The name of the CodeQL database. + name *string + // The size of the CodeQL database file in bytes. + size *int32 + // The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + uploader SimpleUserable + // The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + url *string +} +// NewCodeScanningCodeqlDatabase instantiates a new CodeScanningCodeqlDatabase and sets the default values. +func NewCodeScanningCodeqlDatabase()(*CodeScanningCodeqlDatabase) { + m := &CodeScanningCodeqlDatabase{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningCodeqlDatabaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningCodeqlDatabaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningCodeqlDatabase(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningCodeqlDatabase) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitOid gets the commit_oid property value. The commit SHA of the repository at the time the CodeQL database was created. +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase) GetCommitOid()(*string) { + return m.commit_oid +} +// GetContentType gets the content_type property value. The MIME type of the CodeQL database file. +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase) GetContentType()(*string) { + return m.content_type +} +// GetCreatedAt gets the created_at property value. The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodeScanningCodeqlDatabase) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningCodeqlDatabase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit_oid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitOid(val) + } + return nil + } + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["uploader"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUploader(val.(SimpleUserable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the CodeQL database. +// returns a *int32 when successful +func (m *CodeScanningCodeqlDatabase) GetId()(*int32) { + return m.id +} +// GetLanguage gets the language property value. The language of the CodeQL database. +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase) GetLanguage()(*string) { + return m.language +} +// GetName gets the name property value. The name of the CodeQL database. +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase) GetName()(*string) { + return m.name +} +// GetSize gets the size property value. The size of the CodeQL database file in bytes. +// returns a *int32 when successful +func (m *CodeScanningCodeqlDatabase) GetSize()(*int32) { + return m.size +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodeScanningCodeqlDatabase) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUploader gets the uploader property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *CodeScanningCodeqlDatabase) GetUploader()(SimpleUserable) { + return m.uploader +} +// GetUrl gets the url property value. The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeScanningCodeqlDatabase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("commit_oid", m.GetCommitOid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("uploader", m.GetUploader()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningCodeqlDatabase) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitOid sets the commit_oid property value. The commit SHA of the repository at the time the CodeQL database was created. +func (m *CodeScanningCodeqlDatabase) SetCommitOid(value *string)() { + m.commit_oid = value +} +// SetContentType sets the content_type property value. The MIME type of the CodeQL database file. +func (m *CodeScanningCodeqlDatabase) SetContentType(value *string)() { + m.content_type = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodeScanningCodeqlDatabase) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The ID of the CodeQL database. +func (m *CodeScanningCodeqlDatabase) SetId(value *int32)() { + m.id = value +} +// SetLanguage sets the language property value. The language of the CodeQL database. +func (m *CodeScanningCodeqlDatabase) SetLanguage(value *string)() { + m.language = value +} +// SetName sets the name property value. The name of the CodeQL database. +func (m *CodeScanningCodeqlDatabase) SetName(value *string)() { + m.name = value +} +// SetSize sets the size property value. The size of the CodeQL database file in bytes. +func (m *CodeScanningCodeqlDatabase) SetSize(value *int32)() { + m.size = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodeScanningCodeqlDatabase) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUploader sets the uploader property value. A GitHub user. +func (m *CodeScanningCodeqlDatabase) SetUploader(value SimpleUserable)() { + m.uploader = value +} +// SetUrl sets the url property value. The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. +func (m *CodeScanningCodeqlDatabase) SetUrl(value *string)() { + m.url = value +} +type CodeScanningCodeqlDatabaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommitOid()(*string) + GetContentType()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetLanguage()(*string) + GetName()(*string) + GetSize()(*int32) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUploader()(SimpleUserable) + GetUrl()(*string) + SetCommitOid(value *string)() + SetContentType(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetLanguage(value *string)() + SetName(value *string)() + SetSize(value *int32)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUploader(value SimpleUserable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_codeql_database503_error.go b/pkg/github/models/code_scanning_codeql_database503_error.go new file mode 100644 index 0000000..0d21359 --- /dev/null +++ b/pkg/github/models/code_scanning_codeql_database503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningCodeqlDatabase503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningCodeqlDatabase503Error instantiates a new CodeScanningCodeqlDatabase503Error and sets the default values. +func NewCodeScanningCodeqlDatabase503Error()(*CodeScanningCodeqlDatabase503Error) { + m := &CodeScanningCodeqlDatabase503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningCodeqlDatabase503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningCodeqlDatabase503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningCodeqlDatabase503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningCodeqlDatabase503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningCodeqlDatabase503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningCodeqlDatabase503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningCodeqlDatabase503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningCodeqlDatabase503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningCodeqlDatabase503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningCodeqlDatabase503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningCodeqlDatabase503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningCodeqlDatabase503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningCodeqlDatabase503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_default_setup.go b/pkg/github/models/code_scanning_default_setup.go new file mode 100644 index 0000000..01af175 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup.go @@ -0,0 +1,207 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningDefaultSetup configuration for code scanning default setup. +type CodeScanningDefaultSetup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Languages to be analyzed. + languages []CodeScanningDefaultSetup_languages + // CodeQL query suite to be used. + query_suite *CodeScanningDefaultSetup_query_suite + // The frequency of the periodic analysis. + schedule *CodeScanningDefaultSetup_schedule + // Code scanning default setup has been configured or not. + state *CodeScanningDefaultSetup_state + // Timestamp of latest configuration update. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCodeScanningDefaultSetup instantiates a new CodeScanningDefaultSetup and sets the default values. +func NewCodeScanningDefaultSetup()(*CodeScanningDefaultSetup) { + m := &CodeScanningDefaultSetup{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningDefaultSetupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningDefaultSetupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningDefaultSetup(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningDefaultSetup) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningDefaultSetup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseCodeScanningDefaultSetup_languages) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningDefaultSetup_languages, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*CodeScanningDefaultSetup_languages)) + } + } + m.SetLanguages(res) + } + return nil + } + res["query_suite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_query_suite) + if err != nil { + return err + } + if val != nil { + m.SetQuerySuite(val.(*CodeScanningDefaultSetup_query_suite)) + } + return nil + } + res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_schedule) + if err != nil { + return err + } + if val != nil { + m.SetSchedule(val.(*CodeScanningDefaultSetup_schedule)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodeScanningDefaultSetup_state)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetLanguages gets the languages property value. Languages to be analyzed. +// returns a []CodeScanningDefaultSetup_languages when successful +func (m *CodeScanningDefaultSetup) GetLanguages()([]CodeScanningDefaultSetup_languages) { + return m.languages +} +// GetQuerySuite gets the query_suite property value. CodeQL query suite to be used. +// returns a *CodeScanningDefaultSetup_query_suite when successful +func (m *CodeScanningDefaultSetup) GetQuerySuite()(*CodeScanningDefaultSetup_query_suite) { + return m.query_suite +} +// GetSchedule gets the schedule property value. The frequency of the periodic analysis. +// returns a *CodeScanningDefaultSetup_schedule when successful +func (m *CodeScanningDefaultSetup) GetSchedule()(*CodeScanningDefaultSetup_schedule) { + return m.schedule +} +// GetState gets the state property value. Code scanning default setup has been configured or not. +// returns a *CodeScanningDefaultSetup_state when successful +func (m *CodeScanningDefaultSetup) GetState()(*CodeScanningDefaultSetup_state) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. Timestamp of latest configuration update. +// returns a *Time when successful +func (m *CodeScanningDefaultSetup) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CodeScanningDefaultSetup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLanguages() != nil { + err := writer.WriteCollectionOfStringValues("languages", SerializeCodeScanningDefaultSetup_languages(m.GetLanguages())) + if err != nil { + return err + } + } + if m.GetQuerySuite() != nil { + cast := (*m.GetQuerySuite()).String() + err := writer.WriteStringValue("query_suite", &cast) + if err != nil { + return err + } + } + if m.GetSchedule() != nil { + cast := (*m.GetSchedule()).String() + err := writer.WriteStringValue("schedule", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// 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 *CodeScanningDefaultSetup) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLanguages sets the languages property value. Languages to be analyzed. +func (m *CodeScanningDefaultSetup) SetLanguages(value []CodeScanningDefaultSetup_languages)() { + m.languages = value +} +// SetQuerySuite sets the query_suite property value. CodeQL query suite to be used. +func (m *CodeScanningDefaultSetup) SetQuerySuite(value *CodeScanningDefaultSetup_query_suite)() { + m.query_suite = value +} +// SetSchedule sets the schedule property value. The frequency of the periodic analysis. +func (m *CodeScanningDefaultSetup) SetSchedule(value *CodeScanningDefaultSetup_schedule)() { + m.schedule = value +} +// SetState sets the state property value. Code scanning default setup has been configured or not. +func (m *CodeScanningDefaultSetup) SetState(value *CodeScanningDefaultSetup_state)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. Timestamp of latest configuration update. +func (m *CodeScanningDefaultSetup) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CodeScanningDefaultSetupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguages()([]CodeScanningDefaultSetup_languages) + GetQuerySuite()(*CodeScanningDefaultSetup_query_suite) + GetSchedule()(*CodeScanningDefaultSetup_schedule) + GetState()(*CodeScanningDefaultSetup_state) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetLanguages(value []CodeScanningDefaultSetup_languages)() + SetQuerySuite(value *CodeScanningDefaultSetup_query_suite)() + SetSchedule(value *CodeScanningDefaultSetup_schedule)() + SetState(value *CodeScanningDefaultSetup_state)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/code_scanning_default_setup503_error.go b/pkg/github/models/code_scanning_default_setup503_error.go new file mode 100644 index 0000000..80210d3 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningDefaultSetup503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningDefaultSetup503Error instantiates a new CodeScanningDefaultSetup503Error and sets the default values. +func NewCodeScanningDefaultSetup503Error()(*CodeScanningDefaultSetup503Error) { + m := &CodeScanningDefaultSetup503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningDefaultSetup503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningDefaultSetup503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningDefaultSetup503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningDefaultSetup503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningDefaultSetup503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningDefaultSetup503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningDefaultSetup503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningDefaultSetup503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningDefaultSetup503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningDefaultSetup503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningDefaultSetup503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningDefaultSetup503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningDefaultSetup503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningDefaultSetup503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningDefaultSetup503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_default_setup_languages.go b/pkg/github/models/code_scanning_default_setup_languages.go new file mode 100644 index 0000000..e5bdd50 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_languages.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +type CodeScanningDefaultSetup_languages int + +const ( + CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES CodeScanningDefaultSetup_languages = iota + CSHARP_CODESCANNINGDEFAULTSETUP_LANGUAGES + GO_CODESCANNINGDEFAULTSETUP_LANGUAGES + JAVAKOTLIN_CODESCANNINGDEFAULTSETUP_LANGUAGES + JAVASCRIPTTYPESCRIPT_CODESCANNINGDEFAULTSETUP_LANGUAGES + JAVASCRIPT_CODESCANNINGDEFAULTSETUP_LANGUAGES + PYTHON_CODESCANNINGDEFAULTSETUP_LANGUAGES + RUBY_CODESCANNINGDEFAULTSETUP_LANGUAGES + TYPESCRIPT_CODESCANNINGDEFAULTSETUP_LANGUAGES + SWIFT_CODESCANNINGDEFAULTSETUP_LANGUAGES +) + +func (i CodeScanningDefaultSetup_languages) String() string { + return []string{"c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "javascript", "python", "ruby", "typescript", "swift"}[i] +} +func ParseCodeScanningDefaultSetup_languages(v string) (any, error) { + result := CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES + switch v { + case "c-cpp": + result = CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "csharp": + result = CSHARP_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "go": + result = GO_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "java-kotlin": + result = JAVAKOTLIN_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "javascript-typescript": + result = JAVASCRIPTTYPESCRIPT_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "javascript": + result = JAVASCRIPT_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "python": + result = PYTHON_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "ruby": + result = RUBY_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "typescript": + result = TYPESCRIPT_CODESCANNINGDEFAULTSETUP_LANGUAGES + case "swift": + result = SWIFT_CODESCANNINGDEFAULTSETUP_LANGUAGES + default: + return 0, errors.New("Unknown CodeScanningDefaultSetup_languages value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetup_languages(values []CodeScanningDefaultSetup_languages) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetup_languages) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_query_suite.go b/pkg/github/models/code_scanning_default_setup_query_suite.go new file mode 100644 index 0000000..ac529a4 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_query_suite.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// CodeQL query suite to be used. +type CodeScanningDefaultSetup_query_suite int + +const ( + DEFAULT_CODESCANNINGDEFAULTSETUP_QUERY_SUITE CodeScanningDefaultSetup_query_suite = iota + EXTENDED_CODESCANNINGDEFAULTSETUP_QUERY_SUITE +) + +func (i CodeScanningDefaultSetup_query_suite) String() string { + return []string{"default", "extended"}[i] +} +func ParseCodeScanningDefaultSetup_query_suite(v string) (any, error) { + result := DEFAULT_CODESCANNINGDEFAULTSETUP_QUERY_SUITE + switch v { + case "default": + result = DEFAULT_CODESCANNINGDEFAULTSETUP_QUERY_SUITE + case "extended": + result = EXTENDED_CODESCANNINGDEFAULTSETUP_QUERY_SUITE + default: + return 0, errors.New("Unknown CodeScanningDefaultSetup_query_suite value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetup_query_suite(values []CodeScanningDefaultSetup_query_suite) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetup_query_suite) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_schedule.go b/pkg/github/models/code_scanning_default_setup_schedule.go new file mode 100644 index 0000000..341dff8 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_schedule.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The frequency of the periodic analysis. +type CodeScanningDefaultSetup_schedule int + +const ( + WEEKLY_CODESCANNINGDEFAULTSETUP_SCHEDULE CodeScanningDefaultSetup_schedule = iota +) + +func (i CodeScanningDefaultSetup_schedule) String() string { + return []string{"weekly"}[i] +} +func ParseCodeScanningDefaultSetup_schedule(v string) (any, error) { + result := WEEKLY_CODESCANNINGDEFAULTSETUP_SCHEDULE + switch v { + case "weekly": + result = WEEKLY_CODESCANNINGDEFAULTSETUP_SCHEDULE + default: + return 0, errors.New("Unknown CodeScanningDefaultSetup_schedule value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetup_schedule(values []CodeScanningDefaultSetup_schedule) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetup_schedule) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_state.go b/pkg/github/models/code_scanning_default_setup_state.go new file mode 100644 index 0000000..60ecd6e --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Code scanning default setup has been configured or not. +type CodeScanningDefaultSetup_state int + +const ( + CONFIGURED_CODESCANNINGDEFAULTSETUP_STATE CodeScanningDefaultSetup_state = iota + NOTCONFIGURED_CODESCANNINGDEFAULTSETUP_STATE +) + +func (i CodeScanningDefaultSetup_state) String() string { + return []string{"configured", "not-configured"}[i] +} +func ParseCodeScanningDefaultSetup_state(v string) (any, error) { + result := CONFIGURED_CODESCANNINGDEFAULTSETUP_STATE + switch v { + case "configured": + result = CONFIGURED_CODESCANNINGDEFAULTSETUP_STATE + case "not-configured": + result = NOTCONFIGURED_CODESCANNINGDEFAULTSETUP_STATE + default: + return 0, errors.New("Unknown CodeScanningDefaultSetup_state value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetup_state(values []CodeScanningDefaultSetup_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetup_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_update.go b/pkg/github/models/code_scanning_default_setup_update.go new file mode 100644 index 0000000..afe9a8c --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_update.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningDefaultSetupUpdate configuration for code scanning default setup. +type CodeScanningDefaultSetupUpdate struct { + // CodeQL languages to be analyzed. + languages []CodeScanningDefaultSetupUpdate_languages + // CodeQL query suite to be used. + query_suite *CodeScanningDefaultSetupUpdate_query_suite + // The desired state of code scanning default setup. + state *CodeScanningDefaultSetupUpdate_state +} +// NewCodeScanningDefaultSetupUpdate instantiates a new CodeScanningDefaultSetupUpdate and sets the default values. +func NewCodeScanningDefaultSetupUpdate()(*CodeScanningDefaultSetupUpdate) { + m := &CodeScanningDefaultSetupUpdate{ + } + return m +} +// CreateCodeScanningDefaultSetupUpdateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningDefaultSetupUpdateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningDefaultSetupUpdate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningDefaultSetupUpdate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseCodeScanningDefaultSetupUpdate_languages) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningDefaultSetupUpdate_languages, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*CodeScanningDefaultSetupUpdate_languages)) + } + } + m.SetLanguages(res) + } + return nil + } + res["query_suite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetupUpdate_query_suite) + if err != nil { + return err + } + if val != nil { + m.SetQuerySuite(val.(*CodeScanningDefaultSetupUpdate_query_suite)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetupUpdate_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodeScanningDefaultSetupUpdate_state)) + } + return nil + } + return res +} +// GetLanguages gets the languages property value. CodeQL languages to be analyzed. +// returns a []CodeScanningDefaultSetupUpdate_languages when successful +func (m *CodeScanningDefaultSetupUpdate) GetLanguages()([]CodeScanningDefaultSetupUpdate_languages) { + return m.languages +} +// GetQuerySuite gets the query_suite property value. CodeQL query suite to be used. +// returns a *CodeScanningDefaultSetupUpdate_query_suite when successful +func (m *CodeScanningDefaultSetupUpdate) GetQuerySuite()(*CodeScanningDefaultSetupUpdate_query_suite) { + return m.query_suite +} +// GetState gets the state property value. The desired state of code scanning default setup. +// returns a *CodeScanningDefaultSetupUpdate_state when successful +func (m *CodeScanningDefaultSetupUpdate) GetState()(*CodeScanningDefaultSetupUpdate_state) { + return m.state +} +// Serialize serializes information the current object +func (m *CodeScanningDefaultSetupUpdate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLanguages() != nil { + err := writer.WriteCollectionOfStringValues("languages", SerializeCodeScanningDefaultSetupUpdate_languages(m.GetLanguages())) + if err != nil { + return err + } + } + if m.GetQuerySuite() != nil { + cast := (*m.GetQuerySuite()).String() + err := writer.WriteStringValue("query_suite", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetLanguages sets the languages property value. CodeQL languages to be analyzed. +func (m *CodeScanningDefaultSetupUpdate) SetLanguages(value []CodeScanningDefaultSetupUpdate_languages)() { + m.languages = value +} +// SetQuerySuite sets the query_suite property value. CodeQL query suite to be used. +func (m *CodeScanningDefaultSetupUpdate) SetQuerySuite(value *CodeScanningDefaultSetupUpdate_query_suite)() { + m.query_suite = value +} +// SetState sets the state property value. The desired state of code scanning default setup. +func (m *CodeScanningDefaultSetupUpdate) SetState(value *CodeScanningDefaultSetupUpdate_state)() { + m.state = value +} +type CodeScanningDefaultSetupUpdateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguages()([]CodeScanningDefaultSetupUpdate_languages) + GetQuerySuite()(*CodeScanningDefaultSetupUpdate_query_suite) + GetState()(*CodeScanningDefaultSetupUpdate_state) + SetLanguages(value []CodeScanningDefaultSetupUpdate_languages)() + SetQuerySuite(value *CodeScanningDefaultSetupUpdate_query_suite)() + SetState(value *CodeScanningDefaultSetupUpdate_state)() +} diff --git a/pkg/github/models/code_scanning_default_setup_update_languages.go b/pkg/github/models/code_scanning_default_setup_update_languages.go new file mode 100644 index 0000000..555d19c --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_update_languages.go @@ -0,0 +1,54 @@ +package models +import ( + "errors" +) +type CodeScanningDefaultSetupUpdate_languages int + +const ( + CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES CodeScanningDefaultSetupUpdate_languages = iota + CSHARP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + GO_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + JAVAKOTLIN_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + JAVASCRIPTTYPESCRIPT_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + PYTHON_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + RUBY_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + SWIFT_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES +) + +func (i CodeScanningDefaultSetupUpdate_languages) String() string { + return []string{"c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"}[i] +} +func ParseCodeScanningDefaultSetupUpdate_languages(v string) (any, error) { + result := CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + switch v { + case "c-cpp": + result = CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "csharp": + result = CSHARP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "go": + result = GO_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "java-kotlin": + result = JAVAKOTLIN_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "javascript-typescript": + result = JAVASCRIPTTYPESCRIPT_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "python": + result = PYTHON_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "ruby": + result = RUBY_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + case "swift": + result = SWIFT_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES + default: + return 0, errors.New("Unknown CodeScanningDefaultSetupUpdate_languages value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetupUpdate_languages(values []CodeScanningDefaultSetupUpdate_languages) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetupUpdate_languages) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_update_query_suite.go b/pkg/github/models/code_scanning_default_setup_update_query_suite.go new file mode 100644 index 0000000..3ec3c5e --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_update_query_suite.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// CodeQL query suite to be used. +type CodeScanningDefaultSetupUpdate_query_suite int + +const ( + DEFAULT_CODESCANNINGDEFAULTSETUPUPDATE_QUERY_SUITE CodeScanningDefaultSetupUpdate_query_suite = iota + EXTENDED_CODESCANNINGDEFAULTSETUPUPDATE_QUERY_SUITE +) + +func (i CodeScanningDefaultSetupUpdate_query_suite) String() string { + return []string{"default", "extended"}[i] +} +func ParseCodeScanningDefaultSetupUpdate_query_suite(v string) (any, error) { + result := DEFAULT_CODESCANNINGDEFAULTSETUPUPDATE_QUERY_SUITE + switch v { + case "default": + result = DEFAULT_CODESCANNINGDEFAULTSETUPUPDATE_QUERY_SUITE + case "extended": + result = EXTENDED_CODESCANNINGDEFAULTSETUPUPDATE_QUERY_SUITE + default: + return 0, errors.New("Unknown CodeScanningDefaultSetupUpdate_query_suite value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetupUpdate_query_suite(values []CodeScanningDefaultSetupUpdate_query_suite) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetupUpdate_query_suite) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_update_state.go b/pkg/github/models/code_scanning_default_setup_update_state.go new file mode 100644 index 0000000..62a21fb --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_update_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The desired state of code scanning default setup. +type CodeScanningDefaultSetupUpdate_state int + +const ( + CONFIGURED_CODESCANNINGDEFAULTSETUPUPDATE_STATE CodeScanningDefaultSetupUpdate_state = iota + NOTCONFIGURED_CODESCANNINGDEFAULTSETUPUPDATE_STATE +) + +func (i CodeScanningDefaultSetupUpdate_state) String() string { + return []string{"configured", "not-configured"}[i] +} +func ParseCodeScanningDefaultSetupUpdate_state(v string) (any, error) { + result := CONFIGURED_CODESCANNINGDEFAULTSETUPUPDATE_STATE + switch v { + case "configured": + result = CONFIGURED_CODESCANNINGDEFAULTSETUPUPDATE_STATE + case "not-configured": + result = NOTCONFIGURED_CODESCANNINGDEFAULTSETUPUPDATE_STATE + default: + return 0, errors.New("Unknown CodeScanningDefaultSetupUpdate_state value: " + v) + } + return &result, nil +} +func SerializeCodeScanningDefaultSetupUpdate_state(values []CodeScanningDefaultSetupUpdate_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetupUpdate_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_organization_alert_items.go b/pkg/github/models/code_scanning_organization_alert_items.go new file mode 100644 index 0000000..c35910a --- /dev/null +++ b/pkg/github/models/code_scanning_organization_alert_items.go @@ -0,0 +1,470 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningOrganizationAlertItems struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissed_by NullableSimpleUserable + // The dismissal comment associated with the dismissal of the alert. + dismissed_comment *string + // **Required when the state is dismissed.** The reason for dismissing or closing the alert. + dismissed_reason *CodeScanningAlertDismissedReason + // The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + fixed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The REST API URL for fetching the list of instances for an alert. + instances_url *string + // The most_recent_instance property + most_recent_instance CodeScanningAlertInstanceable + // The security alert number. + number *int32 + // A GitHub repository. + repository SimpleRepositoryable + // The rule property + rule CodeScanningAlertRuleSummaryable + // State of a code scanning alert. + state *CodeScanningAlertState + // The tool property + tool CodeScanningAnalysisToolable + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string +} +// NewCodeScanningOrganizationAlertItems instantiates a new CodeScanningOrganizationAlertItems and sets the default values. +func NewCodeScanningOrganizationAlertItems()(*CodeScanningOrganizationAlertItems) { + m := &CodeScanningOrganizationAlertItems{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningOrganizationAlertItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningOrganizationAlertItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningOrganizationAlertItems(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningOrganizationAlertItems) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningOrganizationAlertItems) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningOrganizationAlertItems) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dismissed_at +} +// GetDismissedBy gets the dismissed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CodeScanningOrganizationAlertItems) GetDismissedBy()(NullableSimpleUserable) { + return m.dismissed_by +} +// GetDismissedComment gets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +// returns a *string when successful +func (m *CodeScanningOrganizationAlertItems) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetDismissedReason gets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +// returns a *CodeScanningAlertDismissedReason when successful +func (m *CodeScanningOrganizationAlertItems) GetDismissedReason()(*CodeScanningAlertDismissedReason) { + return m.dismissed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningOrganizationAlertItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedAt(val) + } + return nil + } + res["dismissed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + res["dismissed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertDismissedReason) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReason(val.(*CodeScanningAlertDismissedReason)) + } + return nil + } + res["fixed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFixedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["instances_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstancesUrl(val) + } + return nil + } + res["most_recent_instance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMostRecentInstance(val.(CodeScanningAlertInstanceable)) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleRepositoryable)) + } + return nil + } + res["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAlertRuleSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRule(val.(CodeScanningAlertRuleSummaryable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodeScanningAlertState)) + } + return nil + } + res["tool"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningAnalysisToolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTool(val.(CodeScanningAnalysisToolable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFixedAt gets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningOrganizationAlertItems) GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fixed_at +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *CodeScanningOrganizationAlertItems) GetHtmlUrl()(*string) { + return m.html_url +} +// GetInstancesUrl gets the instances_url property value. The REST API URL for fetching the list of instances for an alert. +// returns a *string when successful +func (m *CodeScanningOrganizationAlertItems) GetInstancesUrl()(*string) { + return m.instances_url +} +// GetMostRecentInstance gets the most_recent_instance property value. The most_recent_instance property +// returns a CodeScanningAlertInstanceable when successful +func (m *CodeScanningOrganizationAlertItems) GetMostRecentInstance()(CodeScanningAlertInstanceable) { + return m.most_recent_instance +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *CodeScanningOrganizationAlertItems) GetNumber()(*int32) { + return m.number +} +// GetRepository gets the repository property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *CodeScanningOrganizationAlertItems) GetRepository()(SimpleRepositoryable) { + return m.repository +} +// GetRule gets the rule property value. The rule property +// returns a CodeScanningAlertRuleSummaryable when successful +func (m *CodeScanningOrganizationAlertItems) GetRule()(CodeScanningAlertRuleSummaryable) { + return m.rule +} +// GetState gets the state property value. State of a code scanning alert. +// returns a *CodeScanningAlertState when successful +func (m *CodeScanningOrganizationAlertItems) GetState()(*CodeScanningAlertState) { + return m.state +} +// GetTool gets the tool property value. The tool property +// returns a CodeScanningAnalysisToolable when successful +func (m *CodeScanningOrganizationAlertItems) GetTool()(CodeScanningAnalysisToolable) { + return m.tool +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *CodeScanningOrganizationAlertItems) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *CodeScanningOrganizationAlertItems) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeScanningOrganizationAlertItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + if m.GetDismissedReason() != nil { + cast := (*m.GetDismissedReason()).String() + err := writer.WriteStringValue("dismissed_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("most_recent_instance", m.GetMostRecentInstance()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rule", m.GetRule()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tool", m.GetTool()) + 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 *CodeScanningOrganizationAlertItems) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningOrganizationAlertItems) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningOrganizationAlertItems) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dismissed_at = value +} +// SetDismissedBy sets the dismissed_by property value. A GitHub user. +func (m *CodeScanningOrganizationAlertItems) SetDismissedBy(value NullableSimpleUserable)() { + m.dismissed_by = value +} +// SetDismissedComment sets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +func (m *CodeScanningOrganizationAlertItems) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +// SetDismissedReason sets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +func (m *CodeScanningOrganizationAlertItems) SetDismissedReason(value *CodeScanningAlertDismissedReason)() { + m.dismissed_reason = value +} +// SetFixedAt sets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningOrganizationAlertItems) SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fixed_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *CodeScanningOrganizationAlertItems) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetInstancesUrl sets the instances_url property value. The REST API URL for fetching the list of instances for an alert. +func (m *CodeScanningOrganizationAlertItems) SetInstancesUrl(value *string)() { + m.instances_url = value +} +// SetMostRecentInstance sets the most_recent_instance property value. The most_recent_instance property +func (m *CodeScanningOrganizationAlertItems) SetMostRecentInstance(value CodeScanningAlertInstanceable)() { + m.most_recent_instance = value +} +// SetNumber sets the number property value. The security alert number. +func (m *CodeScanningOrganizationAlertItems) SetNumber(value *int32)() { + m.number = value +} +// SetRepository sets the repository property value. A GitHub repository. +func (m *CodeScanningOrganizationAlertItems) SetRepository(value SimpleRepositoryable)() { + m.repository = value +} +// SetRule sets the rule property value. The rule property +func (m *CodeScanningOrganizationAlertItems) SetRule(value CodeScanningAlertRuleSummaryable)() { + m.rule = value +} +// SetState sets the state property value. State of a code scanning alert. +func (m *CodeScanningOrganizationAlertItems) SetState(value *CodeScanningAlertState)() { + m.state = value +} +// SetTool sets the tool property value. The tool property +func (m *CodeScanningOrganizationAlertItems) SetTool(value CodeScanningAnalysisToolable)() { + m.tool = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *CodeScanningOrganizationAlertItems) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *CodeScanningOrganizationAlertItems) SetUrl(value *string)() { + m.url = value +} +type CodeScanningOrganizationAlertItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedBy()(NullableSimpleUserable) + GetDismissedComment()(*string) + GetDismissedReason()(*CodeScanningAlertDismissedReason) + GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetInstancesUrl()(*string) + GetMostRecentInstance()(CodeScanningAlertInstanceable) + GetNumber()(*int32) + GetRepository()(SimpleRepositoryable) + GetRule()(CodeScanningAlertRuleSummaryable) + GetState()(*CodeScanningAlertState) + GetTool()(CodeScanningAnalysisToolable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedBy(value NullableSimpleUserable)() + SetDismissedComment(value *string)() + SetDismissedReason(value *CodeScanningAlertDismissedReason)() + SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetInstancesUrl(value *string)() + SetMostRecentInstance(value CodeScanningAlertInstanceable)() + SetNumber(value *int32)() + SetRepository(value SimpleRepositoryable)() + SetRule(value CodeScanningAlertRuleSummaryable)() + SetState(value *CodeScanningAlertState)() + SetTool(value CodeScanningAnalysisToolable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_sarifs_receipt.go b/pkg/github/models/code_scanning_sarifs_receipt.go new file mode 100644 index 0000000..ad7bebb --- /dev/null +++ b/pkg/github/models/code_scanning_sarifs_receipt.go @@ -0,0 +1,103 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningSarifsReceipt struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An identifier for the upload. + id *string + // The REST API URL for checking the status of the upload. + url *string +} +// NewCodeScanningSarifsReceipt instantiates a new CodeScanningSarifsReceipt and sets the default values. +func NewCodeScanningSarifsReceipt()(*CodeScanningSarifsReceipt) { + m := &CodeScanningSarifsReceipt{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningSarifsReceiptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningSarifsReceiptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningSarifsReceipt(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningSarifsReceipt) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningSarifsReceipt) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. An identifier for the upload. +// returns a *string when successful +func (m *CodeScanningSarifsReceipt) GetId()(*string) { + return m.id +} +// GetUrl gets the url property value. The REST API URL for checking the status of the upload. +// returns a *string when successful +func (m *CodeScanningSarifsReceipt) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeScanningSarifsReceipt) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + 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 *CodeScanningSarifsReceipt) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. An identifier for the upload. +func (m *CodeScanningSarifsReceipt) SetId(value *string)() { + m.id = value +} +// SetUrl sets the url property value. The REST API URL for checking the status of the upload. +func (m *CodeScanningSarifsReceipt) SetUrl(value *string)() { + m.url = value +} +type CodeScanningSarifsReceiptable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetUrl()(*string) + SetId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_scanning_sarifs_receipt503_error.go b/pkg/github/models/code_scanning_sarifs_receipt503_error.go new file mode 100644 index 0000000..8587084 --- /dev/null +++ b/pkg/github/models/code_scanning_sarifs_receipt503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningSarifsReceipt503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningSarifsReceipt503Error instantiates a new CodeScanningSarifsReceipt503Error and sets the default values. +func NewCodeScanningSarifsReceipt503Error()(*CodeScanningSarifsReceipt503Error) { + m := &CodeScanningSarifsReceipt503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningSarifsReceipt503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningSarifsReceipt503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningSarifsReceipt503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningSarifsReceipt503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningSarifsReceipt503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningSarifsReceipt503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningSarifsReceipt503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningSarifsReceipt503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningSarifsReceipt503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningSarifsReceipt503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningSarifsReceipt503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningSarifsReceipt503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningSarifsReceipt503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningSarifsReceipt503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningSarifsReceipt503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_sarifs_status.go b/pkg/github/models/code_scanning_sarifs_status.go new file mode 100644 index 0000000..43202ae --- /dev/null +++ b/pkg/github/models/code_scanning_sarifs_status.go @@ -0,0 +1,133 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningSarifsStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The REST API URL for getting the analyses associated with the upload. + analyses_url *string + // Any errors that ocurred during processing of the delivery. + errors []string + // `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + processing_status *CodeScanningSarifsStatus_processing_status +} +// NewCodeScanningSarifsStatus instantiates a new CodeScanningSarifsStatus and sets the default values. +func NewCodeScanningSarifsStatus()(*CodeScanningSarifsStatus) { + m := &CodeScanningSarifsStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningSarifsStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningSarifsStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningSarifsStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningSarifsStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysesUrl gets the analyses_url property value. The REST API URL for getting the analyses associated with the upload. +// returns a *string when successful +func (m *CodeScanningSarifsStatus) GetAnalysesUrl()(*string) { + return m.analyses_url +} +// GetErrors gets the errors property value. Any errors that ocurred during processing of the delivery. +// returns a []string when successful +func (m *CodeScanningSarifsStatus) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningSarifsStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analyses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnalysesUrl(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetErrors(res) + } + return nil + } + res["processing_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningSarifsStatus_processing_status) + if err != nil { + return err + } + if val != nil { + m.SetProcessingStatus(val.(*CodeScanningSarifsStatus_processing_status)) + } + return nil + } + return res +} +// GetProcessingStatus gets the processing_status property value. `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. +// returns a *CodeScanningSarifsStatus_processing_status when successful +func (m *CodeScanningSarifsStatus) GetProcessingStatus()(*CodeScanningSarifsStatus_processing_status) { + return m.processing_status +} +// Serialize serializes information the current object +func (m *CodeScanningSarifsStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProcessingStatus() != nil { + cast := (*m.GetProcessingStatus()).String() + err := writer.WriteStringValue("processing_status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningSarifsStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysesUrl sets the analyses_url property value. The REST API URL for getting the analyses associated with the upload. +func (m *CodeScanningSarifsStatus) SetAnalysesUrl(value *string)() { + m.analyses_url = value +} +// SetErrors sets the errors property value. Any errors that ocurred during processing of the delivery. +func (m *CodeScanningSarifsStatus) SetErrors(value []string)() { + m.errors = value +} +// SetProcessingStatus sets the processing_status property value. `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. +func (m *CodeScanningSarifsStatus) SetProcessingStatus(value *CodeScanningSarifsStatus_processing_status)() { + m.processing_status = value +} +type CodeScanningSarifsStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysesUrl()(*string) + GetErrors()([]string) + GetProcessingStatus()(*CodeScanningSarifsStatus_processing_status) + SetAnalysesUrl(value *string)() + SetErrors(value []string)() + SetProcessingStatus(value *CodeScanningSarifsStatus_processing_status)() +} diff --git a/pkg/github/models/code_scanning_sarifs_status503_error.go b/pkg/github/models/code_scanning_sarifs_status503_error.go new file mode 100644 index 0000000..fce60ff --- /dev/null +++ b/pkg/github/models/code_scanning_sarifs_status503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningSarifsStatus503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningSarifsStatus503Error instantiates a new CodeScanningSarifsStatus503Error and sets the default values. +func NewCodeScanningSarifsStatus503Error()(*CodeScanningSarifsStatus503Error) { + m := &CodeScanningSarifsStatus503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningSarifsStatus503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningSarifsStatus503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningSarifsStatus503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningSarifsStatus503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningSarifsStatus503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningSarifsStatus503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningSarifsStatus503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningSarifsStatus503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningSarifsStatus503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningSarifsStatus503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningSarifsStatus503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningSarifsStatus503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningSarifsStatus503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningSarifsStatus503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningSarifsStatus503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_sarifs_status_processing_status.go b/pkg/github/models/code_scanning_sarifs_status_processing_status.go new file mode 100644 index 0000000..3f3814d --- /dev/null +++ b/pkg/github/models/code_scanning_sarifs_status_processing_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. +type CodeScanningSarifsStatus_processing_status int + +const ( + PENDING_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS CodeScanningSarifsStatus_processing_status = iota + COMPLETE_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS + FAILED_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS +) + +func (i CodeScanningSarifsStatus_processing_status) String() string { + return []string{"pending", "complete", "failed"}[i] +} +func ParseCodeScanningSarifsStatus_processing_status(v string) (any, error) { + result := PENDING_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS + switch v { + case "pending": + result = PENDING_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS + case "complete": + result = COMPLETE_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS + case "failed": + result = FAILED_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS + default: + return 0, errors.New("Unknown CodeScanningSarifsStatus_processing_status value: " + v) + } + return &result, nil +} +func SerializeCodeScanningSarifsStatus_processing_status(values []CodeScanningSarifsStatus_processing_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningSarifsStatus_processing_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_variant_analysis.go b/pkg/github/models/code_scanning_variant_analysis.go new file mode 100644 index 0000000..e2cd024 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis.go @@ -0,0 +1,445 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningVariantAnalysis a run of a CodeQL query against one or more repositories. +type CodeScanningVariantAnalysis struct { + // The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. + actions_workflow_run_id *int32 + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time at which the variant analysis was completed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the variant analysis has not yet completed or this information is not available. + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub repository. + controller_repo SimpleRepositoryable + // The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. + failure_reason *CodeScanningVariantAnalysis_failure_reason + // The ID of the variant analysis. + id *int32 + // The language targeted by the CodeQL query + query_language *CodeScanningVariantAnalysisLanguage + // The download url for the query pack. + query_pack_url *string + // The scanned_repositories property + scanned_repositories []CodeScanningVariantAnalysis_scanned_repositoriesable + // Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. + skipped_repositories CodeScanningVariantAnalysis_skipped_repositoriesable + // The status property + status *CodeScanningVariantAnalysisStatus + // The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCodeScanningVariantAnalysis instantiates a new CodeScanningVariantAnalysis and sets the default values. +func NewCodeScanningVariantAnalysis()(*CodeScanningVariantAnalysis) { + m := &CodeScanningVariantAnalysis{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis(), nil +} +// GetActionsWorkflowRunId gets the actions_workflow_run_id property value. The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis) GetActionsWorkflowRunId()(*int32) { + return m.actions_workflow_run_id +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *CodeScanningVariantAnalysis) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompletedAt gets the completed_at property value. The date and time at which the variant analysis was completed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the variant analysis has not yet completed or this information is not available. +// returns a *Time when successful +func (m *CodeScanningVariantAnalysis) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetControllerRepo gets the controller_repo property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *CodeScanningVariantAnalysis) GetControllerRepo()(SimpleRepositoryable) { + return m.controller_repo +} +// GetCreatedAt gets the created_at property value. The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodeScanningVariantAnalysis) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFailureReason gets the failure_reason property value. The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. +// returns a *CodeScanningVariantAnalysis_failure_reason when successful +func (m *CodeScanningVariantAnalysis) GetFailureReason()(*CodeScanningVariantAnalysis_failure_reason) { + return m.failure_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions_workflow_run_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActionsWorkflowRunId(val) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["controller_repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetControllerRepo(val.(SimpleRepositoryable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["failure_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysis_failure_reason) + if err != nil { + return err + } + if val != nil { + m.SetFailureReason(val.(*CodeScanningVariantAnalysis_failure_reason)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["query_language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisLanguage) + if err != nil { + return err + } + if val != nil { + m.SetQueryLanguage(val.(*CodeScanningVariantAnalysisLanguage)) + } + return nil + } + res["query_pack_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryPackUrl(val) + } + return nil + } + res["scanned_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCodeScanningVariantAnalysis_scanned_repositoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningVariantAnalysis_scanned_repositoriesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CodeScanningVariantAnalysis_scanned_repositoriesable) + } + } + m.SetScannedRepositories(res) + } + return nil + } + res["skipped_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysis_skipped_repositoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSkippedRepositories(val.(CodeScanningVariantAnalysis_skipped_repositoriesable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CodeScanningVariantAnalysisStatus)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the variant analysis. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis) GetId()(*int32) { + return m.id +} +// GetQueryLanguage gets the query_language property value. The language targeted by the CodeQL query +// returns a *CodeScanningVariantAnalysisLanguage when successful +func (m *CodeScanningVariantAnalysis) GetQueryLanguage()(*CodeScanningVariantAnalysisLanguage) { + return m.query_language +} +// GetQueryPackUrl gets the query_pack_url property value. The download url for the query pack. +// returns a *string when successful +func (m *CodeScanningVariantAnalysis) GetQueryPackUrl()(*string) { + return m.query_pack_url +} +// GetScannedRepositories gets the scanned_repositories property value. The scanned_repositories property +// returns a []CodeScanningVariantAnalysis_scanned_repositoriesable when successful +func (m *CodeScanningVariantAnalysis) GetScannedRepositories()([]CodeScanningVariantAnalysis_scanned_repositoriesable) { + return m.scanned_repositories +} +// GetSkippedRepositories gets the skipped_repositories property value. Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +// returns a CodeScanningVariantAnalysis_skipped_repositoriesable when successful +func (m *CodeScanningVariantAnalysis) GetSkippedRepositories()(CodeScanningVariantAnalysis_skipped_repositoriesable) { + return m.skipped_repositories +} +// GetStatus gets the status property value. The status property +// returns a *CodeScanningVariantAnalysisStatus when successful +func (m *CodeScanningVariantAnalysis) GetStatus()(*CodeScanningVariantAnalysisStatus) { + return m.status +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodeScanningVariantAnalysis) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("actions_workflow_run_id", m.GetActionsWorkflowRunId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("controller_repo", m.GetControllerRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetFailureReason() != nil { + cast := (*m.GetFailureReason()).String() + err := writer.WriteStringValue("failure_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetQueryLanguage() != nil { + cast := (*m.GetQueryLanguage()).String() + err := writer.WriteStringValue("query_language", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("query_pack_url", m.GetQueryPackUrl()) + if err != nil { + return err + } + } + if m.GetScannedRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScannedRepositories())) + for i, v := range m.GetScannedRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("scanned_repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("skipped_repositories", m.GetSkippedRepositories()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionsWorkflowRunId sets the actions_workflow_run_id property value. The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. +func (m *CodeScanningVariantAnalysis) SetActionsWorkflowRunId(value *int32)() { + m.actions_workflow_run_id = value +} +// SetActor sets the actor property value. A GitHub user. +func (m *CodeScanningVariantAnalysis) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysis) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompletedAt sets the completed_at property value. The date and time at which the variant analysis was completed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the variant analysis has not yet completed or this information is not available. +func (m *CodeScanningVariantAnalysis) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetControllerRepo sets the controller_repo property value. A GitHub repository. +func (m *CodeScanningVariantAnalysis) SetControllerRepo(value SimpleRepositoryable)() { + m.controller_repo = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodeScanningVariantAnalysis) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetFailureReason sets the failure_reason property value. The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. +func (m *CodeScanningVariantAnalysis) SetFailureReason(value *CodeScanningVariantAnalysis_failure_reason)() { + m.failure_reason = value +} +// SetId sets the id property value. The ID of the variant analysis. +func (m *CodeScanningVariantAnalysis) SetId(value *int32)() { + m.id = value +} +// SetQueryLanguage sets the query_language property value. The language targeted by the CodeQL query +func (m *CodeScanningVariantAnalysis) SetQueryLanguage(value *CodeScanningVariantAnalysisLanguage)() { + m.query_language = value +} +// SetQueryPackUrl sets the query_pack_url property value. The download url for the query pack. +func (m *CodeScanningVariantAnalysis) SetQueryPackUrl(value *string)() { + m.query_pack_url = value +} +// SetScannedRepositories sets the scanned_repositories property value. The scanned_repositories property +func (m *CodeScanningVariantAnalysis) SetScannedRepositories(value []CodeScanningVariantAnalysis_scanned_repositoriesable)() { + m.scanned_repositories = value +} +// SetSkippedRepositories sets the skipped_repositories property value. Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +func (m *CodeScanningVariantAnalysis) SetSkippedRepositories(value CodeScanningVariantAnalysis_skipped_repositoriesable)() { + m.skipped_repositories = value +} +// SetStatus sets the status property value. The status property +func (m *CodeScanningVariantAnalysis) SetStatus(value *CodeScanningVariantAnalysisStatus)() { + m.status = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodeScanningVariantAnalysis) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CodeScanningVariantAnalysisable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionsWorkflowRunId()(*int32) + GetActor()(SimpleUserable) + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetControllerRepo()(SimpleRepositoryable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailureReason()(*CodeScanningVariantAnalysis_failure_reason) + GetId()(*int32) + GetQueryLanguage()(*CodeScanningVariantAnalysisLanguage) + GetQueryPackUrl()(*string) + GetScannedRepositories()([]CodeScanningVariantAnalysis_scanned_repositoriesable) + GetSkippedRepositories()(CodeScanningVariantAnalysis_skipped_repositoriesable) + GetStatus()(*CodeScanningVariantAnalysisStatus) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActionsWorkflowRunId(value *int32)() + SetActor(value SimpleUserable)() + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetControllerRepo(value SimpleRepositoryable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailureReason(value *CodeScanningVariantAnalysis_failure_reason)() + SetId(value *int32)() + SetQueryLanguage(value *CodeScanningVariantAnalysisLanguage)() + SetQueryPackUrl(value *string)() + SetScannedRepositories(value []CodeScanningVariantAnalysis_scanned_repositoriesable)() + SetSkippedRepositories(value CodeScanningVariantAnalysis_skipped_repositoriesable)() + SetStatus(value *CodeScanningVariantAnalysisStatus)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis503_error.go b/pkg/github/models/code_scanning_variant_analysis503_error.go new file mode 100644 index 0000000..ba958c7 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysis503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningVariantAnalysis503Error instantiates a new CodeScanningVariantAnalysis503Error and sets the default values. +func NewCodeScanningVariantAnalysis503Error()(*CodeScanningVariantAnalysis503Error) { + m := &CodeScanningVariantAnalysis503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningVariantAnalysis503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningVariantAnalysis503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningVariantAnalysis503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningVariantAnalysis503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysis503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningVariantAnalysis503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningVariantAnalysis503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningVariantAnalysis503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningVariantAnalysis503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_failure_reason.go b/pkg/github/models/code_scanning_variant_analysis_failure_reason.go new file mode 100644 index 0000000..255c83b --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_failure_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. +type CodeScanningVariantAnalysis_failure_reason int + +const ( + NO_REPOS_QUERIED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON CodeScanningVariantAnalysis_failure_reason = iota + ACTIONS_WORKFLOW_RUN_FAILED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + INTERNAL_ERROR_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON +) + +func (i CodeScanningVariantAnalysis_failure_reason) String() string { + return []string{"no_repos_queried", "actions_workflow_run_failed", "internal_error"}[i] +} +func ParseCodeScanningVariantAnalysis_failure_reason(v string) (any, error) { + result := NO_REPOS_QUERIED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + switch v { + case "no_repos_queried": + result = NO_REPOS_QUERIED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + case "actions_workflow_run_failed": + result = ACTIONS_WORKFLOW_RUN_FAILED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + case "internal_error": + result = INTERNAL_ERROR_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + default: + return 0, errors.New("Unknown CodeScanningVariantAnalysis_failure_reason value: " + v) + } + return &result, nil +} +func SerializeCodeScanningVariantAnalysis_failure_reason(values []CodeScanningVariantAnalysis_failure_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningVariantAnalysis_failure_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_variant_analysis_language.go b/pkg/github/models/code_scanning_variant_analysis_language.go new file mode 100644 index 0000000..2e13b31 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_language.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// The language targeted by the CodeQL query +type CodeScanningVariantAnalysisLanguage int + +const ( + CPP_CODESCANNINGVARIANTANALYSISLANGUAGE CodeScanningVariantAnalysisLanguage = iota + CSHARP_CODESCANNINGVARIANTANALYSISLANGUAGE + GO_CODESCANNINGVARIANTANALYSISLANGUAGE + JAVA_CODESCANNINGVARIANTANALYSISLANGUAGE + JAVASCRIPT_CODESCANNINGVARIANTANALYSISLANGUAGE + PYTHON_CODESCANNINGVARIANTANALYSISLANGUAGE + RUBY_CODESCANNINGVARIANTANALYSISLANGUAGE + SWIFT_CODESCANNINGVARIANTANALYSISLANGUAGE +) + +func (i CodeScanningVariantAnalysisLanguage) String() string { + return []string{"cpp", "csharp", "go", "java", "javascript", "python", "ruby", "swift"}[i] +} +func ParseCodeScanningVariantAnalysisLanguage(v string) (any, error) { + result := CPP_CODESCANNINGVARIANTANALYSISLANGUAGE + switch v { + case "cpp": + result = CPP_CODESCANNINGVARIANTANALYSISLANGUAGE + case "csharp": + result = CSHARP_CODESCANNINGVARIANTANALYSISLANGUAGE + case "go": + result = GO_CODESCANNINGVARIANTANALYSISLANGUAGE + case "java": + result = JAVA_CODESCANNINGVARIANTANALYSISLANGUAGE + case "javascript": + result = JAVASCRIPT_CODESCANNINGVARIANTANALYSISLANGUAGE + case "python": + result = PYTHON_CODESCANNINGVARIANTANALYSISLANGUAGE + case "ruby": + result = RUBY_CODESCANNINGVARIANTANALYSISLANGUAGE + case "swift": + result = SWIFT_CODESCANNINGVARIANTANALYSISLANGUAGE + default: + return 0, errors.New("Unknown CodeScanningVariantAnalysisLanguage value: " + v) + } + return &result, nil +} +func SerializeCodeScanningVariantAnalysisLanguage(values []CodeScanningVariantAnalysisLanguage) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningVariantAnalysisLanguage) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_variant_analysis_repo_task.go b/pkg/github/models/code_scanning_variant_analysis_repo_task.go new file mode 100644 index 0000000..8f74628 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_repo_task.go @@ -0,0 +1,284 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysisRepoTask struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new status of the CodeQL variant analysis repository task. + analysis_status *CodeScanningVariantAnalysisStatus + // The size of the artifact. This is only available for successful analyses. + artifact_size_in_bytes *int32 + // The URL of the artifact. This is only available for successful analyses. + artifact_url *string + // The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. + database_commit_sha *string + // The reason of the failure of this repo task. This is only available if the repository task has failed. + failure_message *string + // A GitHub repository. + repository SimpleRepositoryable + // The number of results in the case of a successful analysis. This is only available for successful analyses. + result_count *int32 + // The source location prefix to use. This is only available for successful analyses. + source_location_prefix *string +} +// NewCodeScanningVariantAnalysisRepoTask instantiates a new CodeScanningVariantAnalysisRepoTask and sets the default values. +func NewCodeScanningVariantAnalysisRepoTask()(*CodeScanningVariantAnalysisRepoTask) { + m := &CodeScanningVariantAnalysisRepoTask{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisRepoTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisRepoTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisRepoTask(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysisStatus gets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +// returns a *CodeScanningVariantAnalysisStatus when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) { + return m.analysis_status +} +// GetArtifactSizeInBytes gets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetArtifactSizeInBytes()(*int32) { + return m.artifact_size_in_bytes +} +// GetArtifactUrl gets the artifact_url property value. The URL of the artifact. This is only available for successful analyses. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetArtifactUrl()(*string) { + return m.artifact_url +} +// GetDatabaseCommitSha gets the database_commit_sha property value. The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetDatabaseCommitSha()(*string) { + return m.database_commit_sha +} +// GetFailureMessage gets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetFailureMessage()(*string) { + return m.failure_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analysis_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus) + if err != nil { + return err + } + if val != nil { + m.SetAnalysisStatus(val.(*CodeScanningVariantAnalysisStatus)) + } + return nil + } + res["artifact_size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetArtifactSizeInBytes(val) + } + return nil + } + res["artifact_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArtifactUrl(val) + } + return nil + } + res["database_commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDatabaseCommitSha(val) + } + return nil + } + res["failure_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureMessage(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleRepositoryable)) + } + return nil + } + res["result_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val) + } + return nil + } + res["source_location_prefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceLocationPrefix(val) + } + return nil + } + return res +} +// GetRepository gets the repository property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetRepository()(SimpleRepositoryable) { + return m.repository +} +// GetResultCount gets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetResultCount()(*int32) { + return m.result_count +} +// GetSourceLocationPrefix gets the source_location_prefix property value. The source location prefix to use. This is only available for successful analyses. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetSourceLocationPrefix()(*string) { + return m.source_location_prefix +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisRepoTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAnalysisStatus() != nil { + cast := (*m.GetAnalysisStatus()).String() + err := writer.WriteStringValue("analysis_status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("artifact_size_in_bytes", m.GetArtifactSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("artifact_url", m.GetArtifactUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("database_commit_sha", m.GetDatabaseCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failure_message", m.GetFailureMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("result_count", m.GetResultCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source_location_prefix", m.GetSourceLocationPrefix()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysisRepoTask) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysisStatus sets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +func (m *CodeScanningVariantAnalysisRepoTask) SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() { + m.analysis_status = value +} +// SetArtifactSizeInBytes sets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetArtifactSizeInBytes(value *int32)() { + m.artifact_size_in_bytes = value +} +// SetArtifactUrl sets the artifact_url property value. The URL of the artifact. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetArtifactUrl(value *string)() { + m.artifact_url = value +} +// SetDatabaseCommitSha sets the database_commit_sha property value. The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetDatabaseCommitSha(value *string)() { + m.database_commit_sha = value +} +// SetFailureMessage sets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +func (m *CodeScanningVariantAnalysisRepoTask) SetFailureMessage(value *string)() { + m.failure_message = value +} +// SetRepository sets the repository property value. A GitHub repository. +func (m *CodeScanningVariantAnalysisRepoTask) SetRepository(value SimpleRepositoryable)() { + m.repository = value +} +// SetResultCount sets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetResultCount(value *int32)() { + m.result_count = value +} +// SetSourceLocationPrefix sets the source_location_prefix property value. The source location prefix to use. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetSourceLocationPrefix(value *string)() { + m.source_location_prefix = value +} +type CodeScanningVariantAnalysisRepoTaskable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) + GetArtifactSizeInBytes()(*int32) + GetArtifactUrl()(*string) + GetDatabaseCommitSha()(*string) + GetFailureMessage()(*string) + GetRepository()(SimpleRepositoryable) + GetResultCount()(*int32) + GetSourceLocationPrefix()(*string) + SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() + SetArtifactSizeInBytes(value *int32)() + SetArtifactUrl(value *string)() + SetDatabaseCommitSha(value *string)() + SetFailureMessage(value *string)() + SetRepository(value SimpleRepositoryable)() + SetResultCount(value *int32)() + SetSourceLocationPrefix(value *string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_repo_task503_error.go b/pkg/github/models/code_scanning_variant_analysis_repo_task503_error.go new file mode 100644 index 0000000..e6f929f --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_repo_task503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysisRepoTask503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningVariantAnalysisRepoTask503Error instantiates a new CodeScanningVariantAnalysisRepoTask503Error and sets the default values. +func NewCodeScanningVariantAnalysisRepoTask503Error()(*CodeScanningVariantAnalysisRepoTask503Error) { + m := &CodeScanningVariantAnalysisRepoTask503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisRepoTask503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisRepoTask503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisRepoTask503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisRepoTask503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningVariantAnalysisRepoTask503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_repository.go b/pkg/github/models/code_scanning_variant_analysis_repository.go new file mode 100644 index 0000000..ecf693b --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_repository.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningVariantAnalysisRepository repository Identifier +type CodeScanningVariantAnalysisRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The full, globally unique, name of the repository. + full_name *string + // A unique identifier of the repository. + id *int32 + // The name of the repository. + name *string + // Whether the repository is private. + private *bool + // The stargazers_count property + stargazers_count *int32 + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCodeScanningVariantAnalysisRepository instantiates a new CodeScanningVariantAnalysisRepository and sets the default values. +func NewCodeScanningVariantAnalysisRepository()(*CodeScanningVariantAnalysisRepository) { + m := &CodeScanningVariantAnalysisRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysisRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysisRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetFullName gets the full_name property value. The full, globally unique, name of the repository. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepository) GetFullName()(*string) { + return m.full_name +} +// GetId gets the id property value. A unique identifier of the repository. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepository) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepository) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Whether the repository is private. +// returns a *bool when successful +func (m *CodeScanningVariantAnalysisRepository) GetPrivate()(*bool) { + return m.private +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CodeScanningVariantAnalysisRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysisRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFullName sets the full_name property value. The full, globally unique, name of the repository. +func (m *CodeScanningVariantAnalysisRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetId sets the id property value. A unique identifier of the repository. +func (m *CodeScanningVariantAnalysisRepository) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the repository. +func (m *CodeScanningVariantAnalysisRepository) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Whether the repository is private. +func (m *CodeScanningVariantAnalysisRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *CodeScanningVariantAnalysisRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CodeScanningVariantAnalysisRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CodeScanningVariantAnalysisRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFullName()(*string) + GetId()(*int32) + GetName()(*string) + GetPrivate()(*bool) + GetStargazersCount()(*int32) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetFullName(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetPrivate(value *bool)() + SetStargazersCount(value *int32)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_scanned_repositories.go b/pkg/github/models/code_scanning_variant_analysis_scanned_repositories.go new file mode 100644 index 0000000..f860e45 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_scanned_repositories.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysis_scanned_repositories struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new status of the CodeQL variant analysis repository task. + analysis_status *CodeScanningVariantAnalysisStatus + // The size of the artifact. This is only available for successful analyses. + artifact_size_in_bytes *int32 + // The reason of the failure of this repo task. This is only available if the repository task has failed. + failure_message *string + // Repository Identifier + repository CodeScanningVariantAnalysisRepositoryable + // The number of results in the case of a successful analysis. This is only available for successful analyses. + result_count *int32 +} +// NewCodeScanningVariantAnalysis_scanned_repositories instantiates a new CodeScanningVariantAnalysis_scanned_repositories and sets the default values. +func NewCodeScanningVariantAnalysis_scanned_repositories()(*CodeScanningVariantAnalysis_scanned_repositories) { + m := &CodeScanningVariantAnalysis_scanned_repositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis_scanned_repositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis_scanned_repositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis_scanned_repositories(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysisStatus gets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +// returns a *CodeScanningVariantAnalysisStatus when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) { + return m.analysis_status +} +// GetArtifactSizeInBytes gets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetArtifactSizeInBytes()(*int32) { + return m.artifact_size_in_bytes +} +// GetFailureMessage gets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +// returns a *string when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetFailureMessage()(*string) { + return m.failure_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analysis_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus) + if err != nil { + return err + } + if val != nil { + m.SetAnalysisStatus(val.(*CodeScanningVariantAnalysisStatus)) + } + return nil + } + res["artifact_size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetArtifactSizeInBytes(val) + } + return nil + } + res["failure_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureMessage(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(CodeScanningVariantAnalysisRepositoryable)) + } + return nil + } + res["result_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val) + } + return nil + } + return res +} +// GetRepository gets the repository property value. Repository Identifier +// returns a CodeScanningVariantAnalysisRepositoryable when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetRepository()(CodeScanningVariantAnalysisRepositoryable) { + return m.repository +} +// GetResultCount gets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetResultCount()(*int32) { + return m.result_count +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis_scanned_repositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAnalysisStatus() != nil { + cast := (*m.GetAnalysisStatus()).String() + err := writer.WriteStringValue("analysis_status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("artifact_size_in_bytes", m.GetArtifactSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failure_message", m.GetFailureMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("result_count", m.GetResultCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysisStatus sets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() { + m.analysis_status = value +} +// SetArtifactSizeInBytes sets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetArtifactSizeInBytes(value *int32)() { + m.artifact_size_in_bytes = value +} +// SetFailureMessage sets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetFailureMessage(value *string)() { + m.failure_message = value +} +// SetRepository sets the repository property value. Repository Identifier +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetRepository(value CodeScanningVariantAnalysisRepositoryable)() { + m.repository = value +} +// SetResultCount sets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetResultCount(value *int32)() { + m.result_count = value +} +type CodeScanningVariantAnalysis_scanned_repositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) + GetArtifactSizeInBytes()(*int32) + GetFailureMessage()(*string) + GetRepository()(CodeScanningVariantAnalysisRepositoryable) + GetResultCount()(*int32) + SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() + SetArtifactSizeInBytes(value *int32)() + SetFailureMessage(value *string)() + SetRepository(value CodeScanningVariantAnalysisRepositoryable)() + SetResultCount(value *int32)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_skipped_repo_group.go b/pkg/github/models/code_scanning_variant_analysis_skipped_repo_group.go new file mode 100644 index 0000000..536ec48 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_skipped_repo_group.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysisSkippedRepoGroup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A list of repositories that were skipped. This list may not include all repositories that were skipped. This is only available when the repository was found and the user has access to it. + repositories []CodeScanningVariantAnalysisRepositoryable + // The total number of repositories that were skipped for this reason. + repository_count *int32 +} +// NewCodeScanningVariantAnalysisSkippedRepoGroup instantiates a new CodeScanningVariantAnalysisSkippedRepoGroup and sets the default values. +func NewCodeScanningVariantAnalysisSkippedRepoGroup()(*CodeScanningVariantAnalysisSkippedRepoGroup) { + m := &CodeScanningVariantAnalysisSkippedRepoGroup{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisSkippedRepoGroup(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningVariantAnalysisRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CodeScanningVariantAnalysisRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. A list of repositories that were skipped. This list may not include all repositories that were skipped. This is only available when the repository was found and the user has access to it. +// returns a []CodeScanningVariantAnalysisRepositoryable when successful +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) GetRepositories()([]CodeScanningVariantAnalysisRepositoryable) { + return m.repositories +} +// GetRepositoryCount gets the repository_count property value. The total number of repositories that were skipped for this reason. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) GetRepositoryCount()(*int32) { + return m.repository_count +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_count", m.GetRepositoryCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. A list of repositories that were skipped. This list may not include all repositories that were skipped. This is only available when the repository was found and the user has access to it. +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) SetRepositories(value []CodeScanningVariantAnalysisRepositoryable)() { + m.repositories = value +} +// SetRepositoryCount sets the repository_count property value. The total number of repositories that were skipped for this reason. +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) SetRepositoryCount(value *int32)() { + m.repository_count = value +} +type CodeScanningVariantAnalysisSkippedRepoGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]CodeScanningVariantAnalysisRepositoryable) + GetRepositoryCount()(*int32) + SetRepositories(value []CodeScanningVariantAnalysisRepositoryable)() + SetRepositoryCount(value *int32)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_skipped_repositories.go b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories.go new file mode 100644 index 0000000..2336c1f --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningVariantAnalysis_skipped_repositories information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +type CodeScanningVariantAnalysis_skipped_repositories struct { + // The access_mismatch_repos property + access_mismatch_repos CodeScanningVariantAnalysisSkippedRepoGroupable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The no_codeql_db_repos property + no_codeql_db_repos CodeScanningVariantAnalysisSkippedRepoGroupable + // The not_found_repos property + not_found_repos CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable + // The over_limit_repos property + over_limit_repos CodeScanningVariantAnalysisSkippedRepoGroupable +} +// NewCodeScanningVariantAnalysis_skipped_repositories instantiates a new CodeScanningVariantAnalysis_skipped_repositories and sets the default values. +func NewCodeScanningVariantAnalysis_skipped_repositories()(*CodeScanningVariantAnalysis_skipped_repositories) { + m := &CodeScanningVariantAnalysis_skipped_repositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis_skipped_repositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis_skipped_repositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis_skipped_repositories(), nil +} +// GetAccessMismatchRepos gets the access_mismatch_repos property value. The access_mismatch_repos property +// returns a CodeScanningVariantAnalysisSkippedRepoGroupable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetAccessMismatchRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) { + return m.access_mismatch_repos +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_mismatch_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessMismatchRepos(val.(CodeScanningVariantAnalysisSkippedRepoGroupable)) + } + return nil + } + res["no_codeql_db_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNoCodeqlDbRepos(val.(CodeScanningVariantAnalysisSkippedRepoGroupable)) + } + return nil + } + res["not_found_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysis_skipped_repositories_not_found_reposFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNotFoundRepos(val.(CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable)) + } + return nil + } + res["over_limit_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOverLimitRepos(val.(CodeScanningVariantAnalysisSkippedRepoGroupable)) + } + return nil + } + return res +} +// GetNoCodeqlDbRepos gets the no_codeql_db_repos property value. The no_codeql_db_repos property +// returns a CodeScanningVariantAnalysisSkippedRepoGroupable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetNoCodeqlDbRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) { + return m.no_codeql_db_repos +} +// GetNotFoundRepos gets the not_found_repos property value. The not_found_repos property +// returns a CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetNotFoundRepos()(CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable) { + return m.not_found_repos +} +// GetOverLimitRepos gets the over_limit_repos property value. The over_limit_repos property +// returns a CodeScanningVariantAnalysisSkippedRepoGroupable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetOverLimitRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) { + return m.over_limit_repos +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis_skipped_repositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("access_mismatch_repos", m.GetAccessMismatchRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("not_found_repos", m.GetNotFoundRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("no_codeql_db_repos", m.GetNoCodeqlDbRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("over_limit_repos", m.GetOverLimitRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessMismatchRepos sets the access_mismatch_repos property value. The access_mismatch_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetAccessMismatchRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() { + m.access_mismatch_repos = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNoCodeqlDbRepos sets the no_codeql_db_repos property value. The no_codeql_db_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetNoCodeqlDbRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() { + m.no_codeql_db_repos = value +} +// SetNotFoundRepos sets the not_found_repos property value. The not_found_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetNotFoundRepos(value CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable)() { + m.not_found_repos = value +} +// SetOverLimitRepos sets the over_limit_repos property value. The over_limit_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetOverLimitRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() { + m.over_limit_repos = value +} +type CodeScanningVariantAnalysis_skipped_repositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessMismatchRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) + GetNoCodeqlDbRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) + GetNotFoundRepos()(CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable) + GetOverLimitRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) + SetAccessMismatchRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() + SetNoCodeqlDbRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() + SetNotFoundRepos(value CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable)() + SetOverLimitRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_skipped_repositories_not_found_repos.go b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories_not_found_repos.go new file mode 100644 index 0000000..64ef706 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories_not_found_repos.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysis_skipped_repositories_not_found_repos struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total number of repositories that were skipped for this reason. + repository_count *int32 + // A list of full repository names that were skipped. This list may not include all repositories that were skipped. + repository_full_names []string +} +// NewCodeScanningVariantAnalysis_skipped_repositories_not_found_repos instantiates a new CodeScanningVariantAnalysis_skipped_repositories_not_found_repos and sets the default values. +func NewCodeScanningVariantAnalysis_skipped_repositories_not_found_repos()(*CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) { + m := &CodeScanningVariantAnalysis_skipped_repositories_not_found_repos{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis_skipped_repositories_not_found_reposFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis_skipped_repositories_not_found_reposFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis_skipped_repositories_not_found_repos(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repository_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCount(val) + } + return nil + } + res["repository_full_names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositoryFullNames(res) + } + return nil + } + return res +} +// GetRepositoryCount gets the repository_count property value. The total number of repositories that were skipped for this reason. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetRepositoryCount()(*int32) { + return m.repository_count +} +// GetRepositoryFullNames gets the repository_full_names property value. A list of full repository names that were skipped. This list may not include all repositories that were skipped. +// returns a []string when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetRepositoryFullNames()([]string) { + return m.repository_full_names +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("repository_count", m.GetRepositoryCount()) + if err != nil { + return err + } + } + if m.GetRepositoryFullNames() != nil { + err := writer.WriteCollectionOfStringValues("repository_full_names", m.GetRepositoryFullNames()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositoryCount sets the repository_count property value. The total number of repositories that were skipped for this reason. +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) SetRepositoryCount(value *int32)() { + m.repository_count = value +} +// SetRepositoryFullNames sets the repository_full_names property value. A list of full repository names that were skipped. This list may not include all repositories that were skipped. +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) SetRepositoryFullNames(value []string)() { + m.repository_full_names = value +} +type CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositoryCount()(*int32) + GetRepositoryFullNames()([]string) + SetRepositoryCount(value *int32)() + SetRepositoryFullNames(value []string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_status.go b/pkg/github/models/code_scanning_variant_analysis_status.go new file mode 100644 index 0000000..48d116c --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The new status of the CodeQL variant analysis repository task. +type CodeScanningVariantAnalysisStatus int + +const ( + PENDING_CODESCANNINGVARIANTANALYSISSTATUS CodeScanningVariantAnalysisStatus = iota + IN_PROGRESS_CODESCANNINGVARIANTANALYSISSTATUS + SUCCEEDED_CODESCANNINGVARIANTANALYSISSTATUS + FAILED_CODESCANNINGVARIANTANALYSISSTATUS + CANCELED_CODESCANNINGVARIANTANALYSISSTATUS + TIMED_OUT_CODESCANNINGVARIANTANALYSISSTATUS +) + +func (i CodeScanningVariantAnalysisStatus) String() string { + return []string{"pending", "in_progress", "succeeded", "failed", "canceled", "timed_out"}[i] +} +func ParseCodeScanningVariantAnalysisStatus(v string) (any, error) { + result := PENDING_CODESCANNINGVARIANTANALYSISSTATUS + switch v { + case "pending": + result = PENDING_CODESCANNINGVARIANTANALYSISSTATUS + case "in_progress": + result = IN_PROGRESS_CODESCANNINGVARIANTANALYSISSTATUS + case "succeeded": + result = SUCCEEDED_CODESCANNINGVARIANTANALYSISSTATUS + case "failed": + result = FAILED_CODESCANNINGVARIANTANALYSISSTATUS + case "canceled": + result = CANCELED_CODESCANNINGVARIANTANALYSISSTATUS + case "timed_out": + result = TIMED_OUT_CODESCANNINGVARIANTANALYSISSTATUS + default: + return 0, errors.New("Unknown CodeScanningVariantAnalysisStatus value: " + v) + } + return &result, nil +} +func SerializeCodeScanningVariantAnalysisStatus(values []CodeScanningVariantAnalysisStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningVariantAnalysisStatus) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_search_result_item.go b/pkg/github/models/code_search_result_item.go new file mode 100644 index 0000000..5305d9f --- /dev/null +++ b/pkg/github/models/code_search_result_item.go @@ -0,0 +1,448 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeSearchResultItem code Search Result Item +type CodeSearchResultItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The file_size property + file_size *int32 + // The git_url property + git_url *string + // The html_url property + html_url *string + // The language property + language *string + // The last_modified_at property + last_modified_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The line_numbers property + line_numbers []string + // The name property + name *string + // The path property + path *string + // Minimal Repository + repository MinimalRepositoryable + // The score property + score *float64 + // The sha property + sha *string + // The text_matches property + text_matches []Codeable + // The url property + url *string +} +// NewCodeSearchResultItem instantiates a new CodeSearchResultItem and sets the default values. +func NewCodeSearchResultItem()(*CodeSearchResultItem) { + m := &CodeSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeSearchResultItem(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["file_size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFileSize(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["last_modified_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedAt(val) + } + return nil + } + res["line_numbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLineNumbers(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Codeable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Codeable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFileSize gets the file_size property value. The file_size property +// returns a *int32 when successful +func (m *CodeSearchResultItem) GetFileSize()(*int32) { + return m.file_size +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *CodeSearchResultItem) GetGitUrl()(*string) { + return m.git_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CodeSearchResultItem) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *CodeSearchResultItem) GetLanguage()(*string) { + return m.language +} +// GetLastModifiedAt gets the last_modified_at property value. The last_modified_at property +// returns a *Time when successful +func (m *CodeSearchResultItem) GetLastModifiedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_modified_at +} +// GetLineNumbers gets the line_numbers property value. The line_numbers property +// returns a []string when successful +func (m *CodeSearchResultItem) GetLineNumbers()([]string) { + return m.line_numbers +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *CodeSearchResultItem) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *CodeSearchResultItem) GetPath()(*string) { + return m.path +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *CodeSearchResultItem) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *CodeSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *CodeSearchResultItem) GetSha()(*string) { + return m.sha +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Codeable when successful +func (m *CodeSearchResultItem) GetTextMatches()([]Codeable) { + return m.text_matches +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CodeSearchResultItem) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("file_size", m.GetFileSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_modified_at", m.GetLastModifiedAt()) + if err != nil { + return err + } + } + if m.GetLineNumbers() != nil { + err := writer.WriteCollectionOfStringValues("line_numbers", m.GetLineNumbers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFileSize sets the file_size property value. The file_size property +func (m *CodeSearchResultItem) SetFileSize(value *int32)() { + m.file_size = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *CodeSearchResultItem) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CodeSearchResultItem) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLanguage sets the language property value. The language property +func (m *CodeSearchResultItem) SetLanguage(value *string)() { + m.language = value +} +// SetLastModifiedAt sets the last_modified_at property value. The last_modified_at property +func (m *CodeSearchResultItem) SetLastModifiedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_modified_at = value +} +// SetLineNumbers sets the line_numbers property value. The line_numbers property +func (m *CodeSearchResultItem) SetLineNumbers(value []string)() { + m.line_numbers = value +} +// SetName sets the name property value. The name property +func (m *CodeSearchResultItem) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *CodeSearchResultItem) SetPath(value *string)() { + m.path = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *CodeSearchResultItem) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetScore sets the score property value. The score property +func (m *CodeSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetSha sets the sha property value. The sha property +func (m *CodeSearchResultItem) SetSha(value *string)() { + m.sha = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *CodeSearchResultItem) SetTextMatches(value []Codeable)() { + m.text_matches = value +} +// SetUrl sets the url property value. The url property +func (m *CodeSearchResultItem) SetUrl(value *string)() { + m.url = value +} +type CodeSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileSize()(*int32) + GetGitUrl()(*string) + GetHtmlUrl()(*string) + GetLanguage()(*string) + GetLastModifiedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLineNumbers()([]string) + GetName()(*string) + GetPath()(*string) + GetRepository()(MinimalRepositoryable) + GetScore()(*float64) + GetSha()(*string) + GetTextMatches()([]Codeable) + GetUrl()(*string) + SetFileSize(value *int32)() + SetGitUrl(value *string)() + SetHtmlUrl(value *string)() + SetLanguage(value *string)() + SetLastModifiedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLineNumbers(value []string)() + SetName(value *string)() + SetPath(value *string)() + SetRepository(value MinimalRepositoryable)() + SetScore(value *float64)() + SetSha(value *string)() + SetTextMatches(value []Codeable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_security_configuration.go b/pkg/github/models/code_security_configuration.go new file mode 100644 index 0000000..12ef440 --- /dev/null +++ b/pkg/github/models/code_security_configuration.go @@ -0,0 +1,526 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeSecurityConfiguration a code security configuration +type CodeSecurityConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enablement status of GitHub Advanced Security + advanced_security *CodeSecurityConfiguration_advanced_security + // The enablement status of code scanning default setup + code_scanning_default_setup *CodeSecurityConfiguration_code_scanning_default_setup + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The enablement status of Dependabot alerts + dependabot_alerts *CodeSecurityConfiguration_dependabot_alerts + // The enablement status of Dependabot security updates + dependabot_security_updates *CodeSecurityConfiguration_dependabot_security_updates + // The enablement status of Dependency Graph + dependency_graph *CodeSecurityConfiguration_dependency_graph + // A description of the code security configuration + description *string + // The URL of the configuration + html_url *string + // The ID of the code security configuration + id *int32 + // The name of the code security configuration. Must be unique within the organization. + name *string + // The enablement status of private vulnerability reporting + private_vulnerability_reporting *CodeSecurityConfiguration_private_vulnerability_reporting + // The enablement status of secret scanning + secret_scanning *CodeSecurityConfiguration_secret_scanning + // The enablement status of secret scanning push protection + secret_scanning_push_protection *CodeSecurityConfiguration_secret_scanning_push_protection + // The type of the code security configuration. + target_type *CodeSecurityConfiguration_target_type + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The URL of the configuration + url *string +} +// NewCodeSecurityConfiguration instantiates a new CodeSecurityConfiguration and sets the default values. +func NewCodeSecurityConfiguration()(*CodeSecurityConfiguration) { + m := &CodeSecurityConfiguration{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeSecurityConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeSecurityConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeSecurityConfiguration(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeSecurityConfiguration) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurity gets the advanced_security property value. The enablement status of GitHub Advanced Security +// returns a *CodeSecurityConfiguration_advanced_security when successful +func (m *CodeSecurityConfiguration) GetAdvancedSecurity()(*CodeSecurityConfiguration_advanced_security) { + return m.advanced_security +} +// GetCodeScanningDefaultSetup gets the code_scanning_default_setup property value. The enablement status of code scanning default setup +// returns a *CodeSecurityConfiguration_code_scanning_default_setup when successful +func (m *CodeSecurityConfiguration) GetCodeScanningDefaultSetup()(*CodeSecurityConfiguration_code_scanning_default_setup) { + return m.code_scanning_default_setup +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *CodeSecurityConfiguration) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDependabotAlerts gets the dependabot_alerts property value. The enablement status of Dependabot alerts +// returns a *CodeSecurityConfiguration_dependabot_alerts when successful +func (m *CodeSecurityConfiguration) GetDependabotAlerts()(*CodeSecurityConfiguration_dependabot_alerts) { + return m.dependabot_alerts +} +// GetDependabotSecurityUpdates gets the dependabot_security_updates property value. The enablement status of Dependabot security updates +// returns a *CodeSecurityConfiguration_dependabot_security_updates when successful +func (m *CodeSecurityConfiguration) GetDependabotSecurityUpdates()(*CodeSecurityConfiguration_dependabot_security_updates) { + return m.dependabot_security_updates +} +// GetDependencyGraph gets the dependency_graph property value. The enablement status of Dependency Graph +// returns a *CodeSecurityConfiguration_dependency_graph when successful +func (m *CodeSecurityConfiguration) GetDependencyGraph()(*CodeSecurityConfiguration_dependency_graph) { + return m.dependency_graph +} +// GetDescription gets the description property value. A description of the code security configuration +// returns a *string when successful +func (m *CodeSecurityConfiguration) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeSecurityConfiguration) 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.GetEnumValue(ParseCodeSecurityConfiguration_advanced_security) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurity(val.(*CodeSecurityConfiguration_advanced_security)) + } + return nil + } + res["code_scanning_default_setup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_code_scanning_default_setup) + if err != nil { + return err + } + if val != nil { + m.SetCodeScanningDefaultSetup(val.(*CodeSecurityConfiguration_code_scanning_default_setup)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dependabot_alerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_dependabot_alerts) + if err != nil { + return err + } + if val != nil { + m.SetDependabotAlerts(val.(*CodeSecurityConfiguration_dependabot_alerts)) + } + return nil + } + res["dependabot_security_updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_dependabot_security_updates) + if err != nil { + return err + } + if val != nil { + m.SetDependabotSecurityUpdates(val.(*CodeSecurityConfiguration_dependabot_security_updates)) + } + return nil + } + res["dependency_graph"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_dependency_graph) + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraph(val.(*CodeSecurityConfiguration_dependency_graph)) + } + 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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["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_vulnerability_reporting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_private_vulnerability_reporting) + if err != nil { + return err + } + if val != nil { + m.SetPrivateVulnerabilityReporting(val.(*CodeSecurityConfiguration_private_vulnerability_reporting)) + } + return nil + } + res["secret_scanning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanning(val.(*CodeSecurityConfiguration_secret_scanning)) + } + return nil + } + res["secret_scanning_push_protection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning_push_protection) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtection(val.(*CodeSecurityConfiguration_secret_scanning_push_protection)) + } + return nil + } + res["target_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_target_type) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*CodeSecurityConfiguration_target_type)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The URL of the configuration +// returns a *string when successful +func (m *CodeSecurityConfiguration) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The ID of the code security configuration +// returns a *int32 when successful +func (m *CodeSecurityConfiguration) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the code security configuration. Must be unique within the organization. +// returns a *string when successful +func (m *CodeSecurityConfiguration) GetName()(*string) { + return m.name +} +// GetPrivateVulnerabilityReporting gets the private_vulnerability_reporting property value. The enablement status of private vulnerability reporting +// returns a *CodeSecurityConfiguration_private_vulnerability_reporting when successful +func (m *CodeSecurityConfiguration) GetPrivateVulnerabilityReporting()(*CodeSecurityConfiguration_private_vulnerability_reporting) { + return m.private_vulnerability_reporting +} +// GetSecretScanning gets the secret_scanning property value. The enablement status of secret scanning +// returns a *CodeSecurityConfiguration_secret_scanning when successful +func (m *CodeSecurityConfiguration) GetSecretScanning()(*CodeSecurityConfiguration_secret_scanning) { + return m.secret_scanning +} +// GetSecretScanningPushProtection gets the secret_scanning_push_protection property value. The enablement status of secret scanning push protection +// returns a *CodeSecurityConfiguration_secret_scanning_push_protection when successful +func (m *CodeSecurityConfiguration) GetSecretScanningPushProtection()(*CodeSecurityConfiguration_secret_scanning_push_protection) { + return m.secret_scanning_push_protection +} +// GetTargetType gets the target_type property value. The type of the code security configuration. +// returns a *CodeSecurityConfiguration_target_type when successful +func (m *CodeSecurityConfiguration) GetTargetType()(*CodeSecurityConfiguration_target_type) { + return m.target_type +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CodeSecurityConfiguration) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The URL of the configuration +// returns a *string when successful +func (m *CodeSecurityConfiguration) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAdvancedSecurity() != nil { + cast := (*m.GetAdvancedSecurity()).String() + err := writer.WriteStringValue("advanced_security", &cast) + if err != nil { + return err + } + } + if m.GetCodeScanningDefaultSetup() != nil { + cast := (*m.GetCodeScanningDefaultSetup()).String() + err := writer.WriteStringValue("code_scanning_default_setup", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetDependabotAlerts() != nil { + cast := (*m.GetDependabotAlerts()).String() + err := writer.WriteStringValue("dependabot_alerts", &cast) + if err != nil { + return err + } + } + if m.GetDependabotSecurityUpdates() != nil { + cast := (*m.GetDependabotSecurityUpdates()).String() + err := writer.WriteStringValue("dependabot_security_updates", &cast) + if err != nil { + return err + } + } + if m.GetDependencyGraph() != nil { + cast := (*m.GetDependencyGraph()).String() + err := writer.WriteStringValue("dependency_graph", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPrivateVulnerabilityReporting() != nil { + cast := (*m.GetPrivateVulnerabilityReporting()).String() + err := writer.WriteStringValue("private_vulnerability_reporting", &cast) + if err != nil { + return err + } + } + if m.GetSecretScanning() != nil { + cast := (*m.GetSecretScanning()).String() + err := writer.WriteStringValue("secret_scanning", &cast) + if err != nil { + return err + } + } + if m.GetSecretScanningPushProtection() != nil { + cast := (*m.GetSecretScanningPushProtection()).String() + err := writer.WriteStringValue("secret_scanning_push_protection", &cast) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err := writer.WriteStringValue("target_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeSecurityConfiguration) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurity sets the advanced_security property value. The enablement status of GitHub Advanced Security +func (m *CodeSecurityConfiguration) SetAdvancedSecurity(value *CodeSecurityConfiguration_advanced_security)() { + m.advanced_security = value +} +// SetCodeScanningDefaultSetup sets the code_scanning_default_setup property value. The enablement status of code scanning default setup +func (m *CodeSecurityConfiguration) SetCodeScanningDefaultSetup(value *CodeSecurityConfiguration_code_scanning_default_setup)() { + m.code_scanning_default_setup = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *CodeSecurityConfiguration) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDependabotAlerts sets the dependabot_alerts property value. The enablement status of Dependabot alerts +func (m *CodeSecurityConfiguration) SetDependabotAlerts(value *CodeSecurityConfiguration_dependabot_alerts)() { + m.dependabot_alerts = value +} +// SetDependabotSecurityUpdates sets the dependabot_security_updates property value. The enablement status of Dependabot security updates +func (m *CodeSecurityConfiguration) SetDependabotSecurityUpdates(value *CodeSecurityConfiguration_dependabot_security_updates)() { + m.dependabot_security_updates = value +} +// SetDependencyGraph sets the dependency_graph property value. The enablement status of Dependency Graph +func (m *CodeSecurityConfiguration) SetDependencyGraph(value *CodeSecurityConfiguration_dependency_graph)() { + m.dependency_graph = value +} +// SetDescription sets the description property value. A description of the code security configuration +func (m *CodeSecurityConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The URL of the configuration +func (m *CodeSecurityConfiguration) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The ID of the code security configuration +func (m *CodeSecurityConfiguration) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the code security configuration. Must be unique within the organization. +func (m *CodeSecurityConfiguration) SetName(value *string)() { + m.name = value +} +// SetPrivateVulnerabilityReporting sets the private_vulnerability_reporting property value. The enablement status of private vulnerability reporting +func (m *CodeSecurityConfiguration) SetPrivateVulnerabilityReporting(value *CodeSecurityConfiguration_private_vulnerability_reporting)() { + m.private_vulnerability_reporting = value +} +// SetSecretScanning sets the secret_scanning property value. The enablement status of secret scanning +func (m *CodeSecurityConfiguration) SetSecretScanning(value *CodeSecurityConfiguration_secret_scanning)() { + m.secret_scanning = value +} +// SetSecretScanningPushProtection sets the secret_scanning_push_protection property value. The enablement status of secret scanning push protection +func (m *CodeSecurityConfiguration) SetSecretScanningPushProtection(value *CodeSecurityConfiguration_secret_scanning_push_protection)() { + m.secret_scanning_push_protection = value +} +// SetTargetType sets the target_type property value. The type of the code security configuration. +func (m *CodeSecurityConfiguration) SetTargetType(value *CodeSecurityConfiguration_target_type)() { + m.target_type = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CodeSecurityConfiguration) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The URL of the configuration +func (m *CodeSecurityConfiguration) SetUrl(value *string)() { + m.url = value +} +type CodeSecurityConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurity()(*CodeSecurityConfiguration_advanced_security) + GetCodeScanningDefaultSetup()(*CodeSecurityConfiguration_code_scanning_default_setup) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDependabotAlerts()(*CodeSecurityConfiguration_dependabot_alerts) + GetDependabotSecurityUpdates()(*CodeSecurityConfiguration_dependabot_security_updates) + GetDependencyGraph()(*CodeSecurityConfiguration_dependency_graph) + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetPrivateVulnerabilityReporting()(*CodeSecurityConfiguration_private_vulnerability_reporting) + GetSecretScanning()(*CodeSecurityConfiguration_secret_scanning) + GetSecretScanningPushProtection()(*CodeSecurityConfiguration_secret_scanning_push_protection) + GetTargetType()(*CodeSecurityConfiguration_target_type) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAdvancedSecurity(value *CodeSecurityConfiguration_advanced_security)() + SetCodeScanningDefaultSetup(value *CodeSecurityConfiguration_code_scanning_default_setup)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDependabotAlerts(value *CodeSecurityConfiguration_dependabot_alerts)() + SetDependabotSecurityUpdates(value *CodeSecurityConfiguration_dependabot_security_updates)() + SetDependencyGraph(value *CodeSecurityConfiguration_dependency_graph)() + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetPrivateVulnerabilityReporting(value *CodeSecurityConfiguration_private_vulnerability_reporting)() + SetSecretScanning(value *CodeSecurityConfiguration_secret_scanning)() + SetSecretScanningPushProtection(value *CodeSecurityConfiguration_secret_scanning_push_protection)() + SetTargetType(value *CodeSecurityConfiguration_target_type)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/code_security_configuration_advanced_security.go b/pkg/github/models/code_security_configuration_advanced_security.go new file mode 100644 index 0000000..ddc2cfa --- /dev/null +++ b/pkg/github/models/code_security_configuration_advanced_security.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The enablement status of GitHub Advanced Security +type CodeSecurityConfiguration_advanced_security int + +const ( + ENABLED_CODESECURITYCONFIGURATION_ADVANCED_SECURITY CodeSecurityConfiguration_advanced_security = iota + DISABLED_CODESECURITYCONFIGURATION_ADVANCED_SECURITY +) + +func (i CodeSecurityConfiguration_advanced_security) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseCodeSecurityConfiguration_advanced_security(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_ADVANCED_SECURITY + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_ADVANCED_SECURITY + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_ADVANCED_SECURITY + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_advanced_security value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_advanced_security(values []CodeSecurityConfiguration_advanced_security) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_advanced_security) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_code_scanning_default_setup.go b/pkg/github/models/code_security_configuration_code_scanning_default_setup.go new file mode 100644 index 0000000..75fecc0 --- /dev/null +++ b/pkg/github/models/code_security_configuration_code_scanning_default_setup.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of code scanning default setup +type CodeSecurityConfiguration_code_scanning_default_setup int + +const ( + ENABLED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP CodeSecurityConfiguration_code_scanning_default_setup = iota + DISABLED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP + NOT_SET_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP +) + +func (i CodeSecurityConfiguration_code_scanning_default_setup) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_code_scanning_default_setup(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_code_scanning_default_setup value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_code_scanning_default_setup(values []CodeSecurityConfiguration_code_scanning_default_setup) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_code_scanning_default_setup) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_dependabot_alerts.go b/pkg/github/models/code_security_configuration_dependabot_alerts.go new file mode 100644 index 0000000..f3e1af7 --- /dev/null +++ b/pkg/github/models/code_security_configuration_dependabot_alerts.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of Dependabot alerts +type CodeSecurityConfiguration_dependabot_alerts int + +const ( + ENABLED_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS CodeSecurityConfiguration_dependabot_alerts = iota + DISABLED_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS + NOT_SET_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS +) + +func (i CodeSecurityConfiguration_dependabot_alerts) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_dependabot_alerts(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_DEPENDABOT_ALERTS + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_dependabot_alerts value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_dependabot_alerts(values []CodeSecurityConfiguration_dependabot_alerts) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_dependabot_alerts) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_dependabot_security_updates.go b/pkg/github/models/code_security_configuration_dependabot_security_updates.go new file mode 100644 index 0000000..eec6d4e --- /dev/null +++ b/pkg/github/models/code_security_configuration_dependabot_security_updates.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of Dependabot security updates +type CodeSecurityConfiguration_dependabot_security_updates int + +const ( + ENABLED_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES CodeSecurityConfiguration_dependabot_security_updates = iota + DISABLED_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES + NOT_SET_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES +) + +func (i CodeSecurityConfiguration_dependabot_security_updates) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_dependabot_security_updates(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_DEPENDABOT_SECURITY_UPDATES + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_dependabot_security_updates value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_dependabot_security_updates(values []CodeSecurityConfiguration_dependabot_security_updates) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_dependabot_security_updates) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_dependency_graph.go b/pkg/github/models/code_security_configuration_dependency_graph.go new file mode 100644 index 0000000..e92e1ba --- /dev/null +++ b/pkg/github/models/code_security_configuration_dependency_graph.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of Dependency Graph +type CodeSecurityConfiguration_dependency_graph int + +const ( + ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH CodeSecurityConfiguration_dependency_graph = iota + DISABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH + NOT_SET_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH +) + +func (i CodeSecurityConfiguration_dependency_graph) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_dependency_graph(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_dependency_graph value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_dependency_graph(values []CodeSecurityConfiguration_dependency_graph) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_dependency_graph) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_private_vulnerability_reporting.go b/pkg/github/models/code_security_configuration_private_vulnerability_reporting.go new file mode 100644 index 0000000..7342de5 --- /dev/null +++ b/pkg/github/models/code_security_configuration_private_vulnerability_reporting.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of private vulnerability reporting +type CodeSecurityConfiguration_private_vulnerability_reporting int + +const ( + ENABLED_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING CodeSecurityConfiguration_private_vulnerability_reporting = iota + DISABLED_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING + NOT_SET_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING +) + +func (i CodeSecurityConfiguration_private_vulnerability_reporting) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_private_vulnerability_reporting(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_PRIVATE_VULNERABILITY_REPORTING + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_private_vulnerability_reporting value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_private_vulnerability_reporting(values []CodeSecurityConfiguration_private_vulnerability_reporting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_private_vulnerability_reporting) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_repositories.go b/pkg/github/models/code_security_configuration_repositories.go new file mode 100644 index 0000000..9ed5462 --- /dev/null +++ b/pkg/github/models/code_security_configuration_repositories.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeSecurityConfigurationRepositories repositories associated with a code security configuration and attachment status +type CodeSecurityConfigurationRepositories struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub repository. + repository SimpleRepositoryable + // The attachment status of the code security configuration on the repository. + status *CodeSecurityConfigurationRepositories_status +} +// NewCodeSecurityConfigurationRepositories instantiates a new CodeSecurityConfigurationRepositories and sets the default values. +func NewCodeSecurityConfigurationRepositories()(*CodeSecurityConfigurationRepositories) { + m := &CodeSecurityConfigurationRepositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeSecurityConfigurationRepositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeSecurityConfigurationRepositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeSecurityConfigurationRepositories(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeSecurityConfigurationRepositories) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeSecurityConfigurationRepositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleRepositoryable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfigurationRepositories_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CodeSecurityConfigurationRepositories_status)) + } + return nil + } + return res +} +// GetRepository gets the repository property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *CodeSecurityConfigurationRepositories) GetRepository()(SimpleRepositoryable) { + return m.repository +} +// GetStatus gets the status property value. The attachment status of the code security configuration on the repository. +// returns a *CodeSecurityConfigurationRepositories_status when successful +func (m *CodeSecurityConfigurationRepositories) GetStatus()(*CodeSecurityConfigurationRepositories_status) { + return m.status +} +// Serialize serializes information the current object +func (m *CodeSecurityConfigurationRepositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.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 *CodeSecurityConfigurationRepositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepository sets the repository property value. A GitHub repository. +func (m *CodeSecurityConfigurationRepositories) SetRepository(value SimpleRepositoryable)() { + m.repository = value +} +// SetStatus sets the status property value. The attachment status of the code security configuration on the repository. +func (m *CodeSecurityConfigurationRepositories) SetStatus(value *CodeSecurityConfigurationRepositories_status)() { + m.status = value +} +type CodeSecurityConfigurationRepositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepository()(SimpleRepositoryable) + GetStatus()(*CodeSecurityConfigurationRepositories_status) + SetRepository(value SimpleRepositoryable)() + SetStatus(value *CodeSecurityConfigurationRepositories_status)() +} diff --git a/pkg/github/models/code_security_configuration_repositories_status.go b/pkg/github/models/code_security_configuration_repositories_status.go new file mode 100644 index 0000000..4e0871c --- /dev/null +++ b/pkg/github/models/code_security_configuration_repositories_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The attachment status of the code security configuration on the repository. +type CodeSecurityConfigurationRepositories_status int + +const ( + ATTACHED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS CodeSecurityConfigurationRepositories_status = iota + ATTACHING_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + DETACHED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + ENFORCED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + FAILED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + UPDATING_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS +) + +func (i CodeSecurityConfigurationRepositories_status) String() string { + return []string{"attached", "attaching", "detached", "enforced", "failed", "updating"}[i] +} +func ParseCodeSecurityConfigurationRepositories_status(v string) (any, error) { + result := ATTACHED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + switch v { + case "attached": + result = ATTACHED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + case "attaching": + result = ATTACHING_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + case "detached": + result = DETACHED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + case "enforced": + result = ENFORCED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + case "failed": + result = FAILED_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + case "updating": + result = UPDATING_CODESECURITYCONFIGURATIONREPOSITORIES_STATUS + default: + return 0, errors.New("Unknown CodeSecurityConfigurationRepositories_status value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfigurationRepositories_status(values []CodeSecurityConfigurationRepositories_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfigurationRepositories_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_secret_scanning.go b/pkg/github/models/code_security_configuration_secret_scanning.go new file mode 100644 index 0000000..dbbdae8 --- /dev/null +++ b/pkg/github/models/code_security_configuration_secret_scanning.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of secret scanning +type CodeSecurityConfiguration_secret_scanning int + +const ( + ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING CodeSecurityConfiguration_secret_scanning = iota + DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING + NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING +) + +func (i CodeSecurityConfiguration_secret_scanning) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_secret_scanning(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_secret_scanning value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_secret_scanning(values []CodeSecurityConfiguration_secret_scanning) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_secret_scanning) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_secret_scanning_push_protection.go b/pkg/github/models/code_security_configuration_secret_scanning_push_protection.go new file mode 100644 index 0000000..c86ab21 --- /dev/null +++ b/pkg/github/models/code_security_configuration_secret_scanning_push_protection.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of secret scanning push protection +type CodeSecurityConfiguration_secret_scanning_push_protection int + +const ( + ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION CodeSecurityConfiguration_secret_scanning_push_protection = iota + DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION + NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION +) + +func (i CodeSecurityConfiguration_secret_scanning_push_protection) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_secret_scanning_push_protection(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_PUSH_PROTECTION + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_secret_scanning_push_protection value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_secret_scanning_push_protection(values []CodeSecurityConfiguration_secret_scanning_push_protection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_secret_scanning_push_protection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_target_type.go b/pkg/github/models/code_security_configuration_target_type.go new file mode 100644 index 0000000..3cd9704 --- /dev/null +++ b/pkg/github/models/code_security_configuration_target_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of the code security configuration. +type CodeSecurityConfiguration_target_type int + +const ( + GLOBAL_CODESECURITYCONFIGURATION_TARGET_TYPE CodeSecurityConfiguration_target_type = iota + ORGANIZATION_CODESECURITYCONFIGURATION_TARGET_TYPE +) + +func (i CodeSecurityConfiguration_target_type) String() string { + return []string{"global", "organization"}[i] +} +func ParseCodeSecurityConfiguration_target_type(v string) (any, error) { + result := GLOBAL_CODESECURITYCONFIGURATION_TARGET_TYPE + switch v { + case "global": + result = GLOBAL_CODESECURITYCONFIGURATION_TARGET_TYPE + case "organization": + result = ORGANIZATION_CODESECURITYCONFIGURATION_TARGET_TYPE + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_target_type value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_target_type(values []CodeSecurityConfiguration_target_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_target_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_default_configurations.go b/pkg/github/models/code_security_default_configurations.go new file mode 100644 index 0000000..973a192 --- /dev/null +++ b/pkg/github/models/code_security_default_configurations.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeSecurityDefaultConfigurations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A code security configuration + configuration CodeSecurityConfigurationable + // The visibility of newly created repositories for which the code security configuration will be applied to by default + default_for_new_repos *CodeSecurityDefaultConfigurations_default_for_new_repos +} +// NewCodeSecurityDefaultConfigurations instantiates a new CodeSecurityDefaultConfigurations and sets the default values. +func NewCodeSecurityDefaultConfigurations()(*CodeSecurityDefaultConfigurations) { + m := &CodeSecurityDefaultConfigurations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeSecurityDefaultConfigurationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeSecurityDefaultConfigurationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeSecurityDefaultConfigurations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeSecurityDefaultConfigurations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfiguration gets the configuration property value. A code security configuration +// returns a CodeSecurityConfigurationable when successful +func (m *CodeSecurityDefaultConfigurations) GetConfiguration()(CodeSecurityConfigurationable) { + return m.configuration +} +// GetDefaultForNewRepos gets the default_for_new_repos property value. The visibility of newly created repositories for which the code security configuration will be applied to by default +// returns a *CodeSecurityDefaultConfigurations_default_for_new_repos when successful +func (m *CodeSecurityDefaultConfigurations) GetDefaultForNewRepos()(*CodeSecurityDefaultConfigurations_default_for_new_repos) { + return m.default_for_new_repos +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeSecurityDefaultConfigurations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeSecurityConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(CodeSecurityConfigurationable)) + } + return nil + } + res["default_for_new_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityDefaultConfigurations_default_for_new_repos) + if err != nil { + return err + } + if val != nil { + m.SetDefaultForNewRepos(val.(*CodeSecurityDefaultConfigurations_default_for_new_repos)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CodeSecurityDefaultConfigurations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + if m.GetDefaultForNewRepos() != nil { + cast := (*m.GetDefaultForNewRepos()).String() + err := writer.WriteStringValue("default_for_new_repos", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeSecurityDefaultConfigurations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfiguration sets the configuration property value. A code security configuration +func (m *CodeSecurityDefaultConfigurations) SetConfiguration(value CodeSecurityConfigurationable)() { + m.configuration = value +} +// SetDefaultForNewRepos sets the default_for_new_repos property value. The visibility of newly created repositories for which the code security configuration will be applied to by default +func (m *CodeSecurityDefaultConfigurations) SetDefaultForNewRepos(value *CodeSecurityDefaultConfigurations_default_for_new_repos)() { + m.default_for_new_repos = value +} +type CodeSecurityDefaultConfigurationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(CodeSecurityConfigurationable) + GetDefaultForNewRepos()(*CodeSecurityDefaultConfigurations_default_for_new_repos) + SetConfiguration(value CodeSecurityConfigurationable)() + SetDefaultForNewRepos(value *CodeSecurityDefaultConfigurations_default_for_new_repos)() +} diff --git a/pkg/github/models/code_security_default_configurations_default_for_new_repos.go b/pkg/github/models/code_security_default_configurations_default_for_new_repos.go new file mode 100644 index 0000000..bbb7cbe --- /dev/null +++ b/pkg/github/models/code_security_default_configurations_default_for_new_repos.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The visibility of newly created repositories for which the code security configuration will be applied to by default +type CodeSecurityDefaultConfigurations_default_for_new_repos int + +const ( + PUBLIC_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS CodeSecurityDefaultConfigurations_default_for_new_repos = iota + PRIVATE_AND_INTERNAL_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS + ALL_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS +) + +func (i CodeSecurityDefaultConfigurations_default_for_new_repos) String() string { + return []string{"public", "private_and_internal", "all"}[i] +} +func ParseCodeSecurityDefaultConfigurations_default_for_new_repos(v string) (any, error) { + result := PUBLIC_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS + switch v { + case "public": + result = PUBLIC_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS + case "private_and_internal": + result = PRIVATE_AND_INTERNAL_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS + case "all": + result = ALL_CODESECURITYDEFAULTCONFIGURATIONS_DEFAULT_FOR_NEW_REPOS + default: + return 0, errors.New("Unknown CodeSecurityDefaultConfigurations_default_for_new_repos value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityDefaultConfigurations_default_for_new_repos(values []CodeSecurityDefaultConfigurations_default_for_new_repos) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityDefaultConfigurations_default_for_new_repos) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codeowners_errors.go b/pkg/github/models/codeowners_errors.go new file mode 100644 index 0000000..11730ba --- /dev/null +++ b/pkg/github/models/codeowners_errors.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeownersErrors a list of errors found in a repo's CODEOWNERS file +type CodeownersErrors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The errors property + errors []CodeownersErrors_errorsable +} +// NewCodeownersErrors instantiates a new CodeownersErrors and sets the default values. +func NewCodeownersErrors()(*CodeownersErrors) { + m := &CodeownersErrors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeownersErrorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeownersErrorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeownersErrors(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeownersErrors) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetErrors gets the errors property value. The errors property +// returns a []CodeownersErrors_errorsable when successful +func (m *CodeownersErrors) GetErrors()([]CodeownersErrors_errorsable) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeownersErrors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCodeownersErrors_errorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CodeownersErrors_errorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CodeownersErrors_errorsable) + } + } + m.SetErrors(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CodeownersErrors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("errors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeownersErrors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetErrors sets the errors property value. The errors property +func (m *CodeownersErrors) SetErrors(value []CodeownersErrors_errorsable)() { + m.errors = value +} +type CodeownersErrorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrors()([]CodeownersErrors_errorsable) + SetErrors(value []CodeownersErrors_errorsable)() +} diff --git a/pkg/github/models/codeowners_errors_errors.go b/pkg/github/models/codeowners_errors_errors.go new file mode 100644 index 0000000..267227b --- /dev/null +++ b/pkg/github/models/codeowners_errors_errors.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeownersErrors_errors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The column number where this errors occurs. + column *int32 + // The type of error. + kind *string + // The line number where this errors occurs. + line *int32 + // A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + message *string + // The path of the file where the error occured. + path *string + // The contents of the line where the error occurs. + source *string + // Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + suggestion *string +} +// NewCodeownersErrors_errors instantiates a new CodeownersErrors_errors and sets the default values. +func NewCodeownersErrors_errors()(*CodeownersErrors_errors) { + m := &CodeownersErrors_errors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeownersErrors_errorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeownersErrors_errorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeownersErrors_errors(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeownersErrors_errors) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumn gets the column property value. The column number where this errors occurs. +// returns a *int32 when successful +func (m *CodeownersErrors_errors) GetColumn()(*int32) { + return m.column +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeownersErrors_errors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetColumn(val) + } + return nil + } + res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKind(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(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 + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["suggestion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSuggestion(val) + } + return nil + } + return res +} +// GetKind gets the kind property value. The type of error. +// returns a *string when successful +func (m *CodeownersErrors_errors) GetKind()(*string) { + return m.kind +} +// GetLine gets the line property value. The line number where this errors occurs. +// returns a *int32 when successful +func (m *CodeownersErrors_errors) GetLine()(*int32) { + return m.line +} +// GetMessage gets the message property value. A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). +// returns a *string when successful +func (m *CodeownersErrors_errors) GetMessage()(*string) { + return m.message +} +// GetPath gets the path property value. The path of the file where the error occured. +// returns a *string when successful +func (m *CodeownersErrors_errors) GetPath()(*string) { + return m.path +} +// GetSource gets the source property value. The contents of the line where the error occurs. +// returns a *string when successful +func (m *CodeownersErrors_errors) GetSource()(*string) { + return m.source +} +// GetSuggestion gets the suggestion property value. Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. +// returns a *string when successful +func (m *CodeownersErrors_errors) GetSuggestion()(*string) { + return m.suggestion +} +// Serialize serializes information the current object +func (m *CodeownersErrors_errors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("column", m.GetColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("kind", m.GetKind()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source", m.GetSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("suggestion", m.GetSuggestion()) + 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 *CodeownersErrors_errors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumn sets the column property value. The column number where this errors occurs. +func (m *CodeownersErrors_errors) SetColumn(value *int32)() { + m.column = value +} +// SetKind sets the kind property value. The type of error. +func (m *CodeownersErrors_errors) SetKind(value *string)() { + m.kind = value +} +// SetLine sets the line property value. The line number where this errors occurs. +func (m *CodeownersErrors_errors) SetLine(value *int32)() { + m.line = value +} +// SetMessage sets the message property value. A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). +func (m *CodeownersErrors_errors) SetMessage(value *string)() { + m.message = value +} +// SetPath sets the path property value. The path of the file where the error occured. +func (m *CodeownersErrors_errors) SetPath(value *string)() { + m.path = value +} +// SetSource sets the source property value. The contents of the line where the error occurs. +func (m *CodeownersErrors_errors) SetSource(value *string)() { + m.source = value +} +// SetSuggestion sets the suggestion property value. Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. +func (m *CodeownersErrors_errors) SetSuggestion(value *string)() { + m.suggestion = value +} +type CodeownersErrors_errorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumn()(*int32) + GetKind()(*string) + GetLine()(*int32) + GetMessage()(*string) + GetPath()(*string) + GetSource()(*string) + GetSuggestion()(*string) + SetColumn(value *int32)() + SetKind(value *string)() + SetLine(value *int32)() + SetMessage(value *string)() + SetPath(value *string)() + SetSource(value *string)() + SetSuggestion(value *string)() +} diff --git a/pkg/github/models/codespace.go b/pkg/github/models/codespace.go new file mode 100644 index 0000000..b2b2826 --- /dev/null +++ b/pkg/github/models/codespace.go @@ -0,0 +1,989 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Codespace a codespace. +type Codespace struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + billable_owner SimpleUserable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Path to devcontainer.json from repo root used to create Codespace. + devcontainer_path *string + // Display name for this codespace. + display_name *string + // UUID identifying this codespace's environment. + environment_id *string + // Details about the codespace's git repository. + git_status Codespace_git_statusable + // The id property + id *int64 + // The number of minutes of inactivity after which this codespace will be automatically stopped. + idle_timeout_minutes *int32 + // Text to show user when codespace idle timeout minutes has been overriden by an organization policy + idle_timeout_notice *string + // The text to display to a user when a codespace has been stopped for a potentially actionable reason. + last_known_stop_notice *string + // Last known time this codespace was started. + last_used_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The initally assigned location of a new codespace. + location *Codespace_location + // A description of the machine powering a codespace. + machine NullableCodespaceMachineable + // API URL to access available alternate machine types for this codespace. + machines_url *string + // Automatically generated name of this codespace. + name *string + // A GitHub user. + owner SimpleUserable + // Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. + pending_operation *bool + // Text to show user when codespace is disabled by a pending operation + pending_operation_disabled_reason *string + // Whether the codespace was created from a prebuild. + prebuild *bool + // API URL to publish this codespace to a new repository. + publish_url *string + // API URL for the Pull Request associated with this codespace, if any. + pulls_url *string + // The recent_folders property + recent_folders []string + // Minimal Repository + repository MinimalRepositoryable + // When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + retention_expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + retention_period_minutes *int32 + // The runtime_constraints property + runtime_constraints Codespace_runtime_constraintsable + // API URL to start this codespace. + start_url *string + // State of this codespace. + state *Codespace_state + // API URL to stop this codespace. + stop_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // API URL for this codespace. + url *string + // URL to access this codespace on the web. + web_url *string +} +// NewCodespace instantiates a new Codespace and sets the default values. +func NewCodespace()(*Codespace) { + m := &Codespace{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespaceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespaceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespace(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Codespace) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillableOwner gets the billable_owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *Codespace) GetBillableOwner()(SimpleUserable) { + return m.billable_owner +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Codespace) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDevcontainerPath gets the devcontainer_path property value. Path to devcontainer.json from repo root used to create Codespace. +// returns a *string when successful +func (m *Codespace) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetDisplayName gets the display_name property value. Display name for this codespace. +// returns a *string when successful +func (m *Codespace) GetDisplayName()(*string) { + return m.display_name +} +// GetEnvironmentId gets the environment_id property value. UUID identifying this codespace's environment. +// returns a *string when successful +func (m *Codespace) GetEnvironmentId()(*string) { + return m.environment_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Codespace) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["billable_owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillableOwner(val.(SimpleUserable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["environment_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentId(val) + } + return nil + } + res["git_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodespace_git_statusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGitStatus(val.(Codespace_git_statusable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["idle_timeout_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutMinutes(val) + } + return nil + } + res["idle_timeout_notice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutNotice(val) + } + return nil + } + res["last_known_stop_notice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastKnownStopNotice(val) + } + return nil + } + res["last_used_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUsedAt(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespace_location) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(*Codespace_location)) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCodespaceMachineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMachine(val.(NullableCodespaceMachineable)) + } + return nil + } + res["machines_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachinesUrl(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["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["pending_operation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingOperation(val) + } + return nil + } + res["pending_operation_disabled_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingOperationDisabledReason(val) + } + return nil + } + res["prebuild"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrebuild(val) + } + return nil + } + res["publish_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishUrl(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["recent_folders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRecentFolders(res) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["retention_expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRetentionExpiresAt(val) + } + return nil + } + res["retention_period_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRetentionPeriodMinutes(val) + } + return nil + } + res["runtime_constraints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodespace_runtime_constraintsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRuntimeConstraints(val.(Codespace_runtime_constraintsable)) + } + return nil + } + res["start_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStartUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespace_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*Codespace_state)) + } + return nil + } + res["stop_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStopUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["web_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetGitStatus gets the git_status property value. Details about the codespace's git repository. +// returns a Codespace_git_statusable when successful +func (m *Codespace) GetGitStatus()(Codespace_git_statusable) { + return m.git_status +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Codespace) GetId()(*int64) { + return m.id +} +// GetIdleTimeoutMinutes gets the idle_timeout_minutes property value. The number of minutes of inactivity after which this codespace will be automatically stopped. +// returns a *int32 when successful +func (m *Codespace) GetIdleTimeoutMinutes()(*int32) { + return m.idle_timeout_minutes +} +// GetIdleTimeoutNotice gets the idle_timeout_notice property value. Text to show user when codespace idle timeout minutes has been overriden by an organization policy +// returns a *string when successful +func (m *Codespace) GetIdleTimeoutNotice()(*string) { + return m.idle_timeout_notice +} +// GetLastKnownStopNotice gets the last_known_stop_notice property value. The text to display to a user when a codespace has been stopped for a potentially actionable reason. +// returns a *string when successful +func (m *Codespace) GetLastKnownStopNotice()(*string) { + return m.last_known_stop_notice +} +// GetLastUsedAt gets the last_used_at property value. Last known time this codespace was started. +// returns a *Time when successful +func (m *Codespace) GetLastUsedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_used_at +} +// GetLocation gets the location property value. The initally assigned location of a new codespace. +// returns a *Codespace_location when successful +func (m *Codespace) GetLocation()(*Codespace_location) { + return m.location +} +// GetMachine gets the machine property value. A description of the machine powering a codespace. +// returns a NullableCodespaceMachineable when successful +func (m *Codespace) GetMachine()(NullableCodespaceMachineable) { + return m.machine +} +// GetMachinesUrl gets the machines_url property value. API URL to access available alternate machine types for this codespace. +// returns a *string when successful +func (m *Codespace) GetMachinesUrl()(*string) { + return m.machines_url +} +// GetName gets the name property value. Automatically generated name of this codespace. +// returns a *string when successful +func (m *Codespace) GetName()(*string) { + return m.name +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *Codespace) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPendingOperation gets the pending_operation property value. Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. +// returns a *bool when successful +func (m *Codespace) GetPendingOperation()(*bool) { + return m.pending_operation +} +// GetPendingOperationDisabledReason gets the pending_operation_disabled_reason property value. Text to show user when codespace is disabled by a pending operation +// returns a *string when successful +func (m *Codespace) GetPendingOperationDisabledReason()(*string) { + return m.pending_operation_disabled_reason +} +// GetPrebuild gets the prebuild property value. Whether the codespace was created from a prebuild. +// returns a *bool when successful +func (m *Codespace) GetPrebuild()(*bool) { + return m.prebuild +} +// GetPublishUrl gets the publish_url property value. API URL to publish this codespace to a new repository. +// returns a *string when successful +func (m *Codespace) GetPublishUrl()(*string) { + return m.publish_url +} +// GetPullsUrl gets the pulls_url property value. API URL for the Pull Request associated with this codespace, if any. +// returns a *string when successful +func (m *Codespace) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetRecentFolders gets the recent_folders property value. The recent_folders property +// returns a []string when successful +func (m *Codespace) GetRecentFolders()([]string) { + return m.recent_folders +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *Codespace) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetRetentionExpiresAt gets the retention_expires_at property value. When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" +// returns a *Time when successful +func (m *Codespace) GetRetentionExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.retention_expires_at +} +// GetRetentionPeriodMinutes gets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +// returns a *int32 when successful +func (m *Codespace) GetRetentionPeriodMinutes()(*int32) { + return m.retention_period_minutes +} +// GetRuntimeConstraints gets the runtime_constraints property value. The runtime_constraints property +// returns a Codespace_runtime_constraintsable when successful +func (m *Codespace) GetRuntimeConstraints()(Codespace_runtime_constraintsable) { + return m.runtime_constraints +} +// GetStartUrl gets the start_url property value. API URL to start this codespace. +// returns a *string when successful +func (m *Codespace) GetStartUrl()(*string) { + return m.start_url +} +// GetState gets the state property value. State of this codespace. +// returns a *Codespace_state when successful +func (m *Codespace) GetState()(*Codespace_state) { + return m.state +} +// GetStopUrl gets the stop_url property value. API URL to stop this codespace. +// returns a *string when successful +func (m *Codespace) GetStopUrl()(*string) { + return m.stop_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Codespace) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. API URL for this codespace. +// returns a *string when successful +func (m *Codespace) GetUrl()(*string) { + return m.url +} +// GetWebUrl gets the web_url property value. URL to access this codespace on the web. +// returns a *string when successful +func (m *Codespace) GetWebUrl()(*string) { + return m.web_url +} +// Serialize serializes information the current object +func (m *Codespace) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("billable_owner", m.GetBillableOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment_id", m.GetEnvironmentId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("git_status", m.GetGitStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("idle_timeout_minutes", m.GetIdleTimeoutMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("idle_timeout_notice", m.GetIdleTimeoutNotice()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_known_stop_notice", m.GetLastKnownStopNotice()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_used_at", m.GetLastUsedAt()) + if err != nil { + return err + } + } + if m.GetLocation() != nil { + cast := (*m.GetLocation()).String() + err := writer.WriteStringValue("location", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machines_url", m.GetMachinesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pending_operation", m.GetPendingOperation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pending_operation_disabled_reason", m.GetPendingOperationDisabledReason()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prebuild", m.GetPrebuild()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("publish_url", m.GetPublishUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + if m.GetRecentFolders() != nil { + err := writer.WriteCollectionOfStringValues("recent_folders", m.GetRecentFolders()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("retention_expires_at", m.GetRetentionExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("retention_period_minutes", m.GetRetentionPeriodMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("runtime_constraints", m.GetRuntimeConstraints()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("start_url", m.GetStartUrl()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stop_url", m.GetStopUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("web_url", m.GetWebUrl()) + 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 *Codespace) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillableOwner sets the billable_owner property value. A GitHub user. +func (m *Codespace) SetBillableOwner(value SimpleUserable)() { + m.billable_owner = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Codespace) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDevcontainerPath sets the devcontainer_path property value. Path to devcontainer.json from repo root used to create Codespace. +func (m *Codespace) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetDisplayName sets the display_name property value. Display name for this codespace. +func (m *Codespace) SetDisplayName(value *string)() { + m.display_name = value +} +// SetEnvironmentId sets the environment_id property value. UUID identifying this codespace's environment. +func (m *Codespace) SetEnvironmentId(value *string)() { + m.environment_id = value +} +// SetGitStatus sets the git_status property value. Details about the codespace's git repository. +func (m *Codespace) SetGitStatus(value Codespace_git_statusable)() { + m.git_status = value +} +// SetId sets the id property value. The id property +func (m *Codespace) SetId(value *int64)() { + m.id = value +} +// SetIdleTimeoutMinutes sets the idle_timeout_minutes property value. The number of minutes of inactivity after which this codespace will be automatically stopped. +func (m *Codespace) SetIdleTimeoutMinutes(value *int32)() { + m.idle_timeout_minutes = value +} +// SetIdleTimeoutNotice sets the idle_timeout_notice property value. Text to show user when codespace idle timeout minutes has been overriden by an organization policy +func (m *Codespace) SetIdleTimeoutNotice(value *string)() { + m.idle_timeout_notice = value +} +// SetLastKnownStopNotice sets the last_known_stop_notice property value. The text to display to a user when a codespace has been stopped for a potentially actionable reason. +func (m *Codespace) SetLastKnownStopNotice(value *string)() { + m.last_known_stop_notice = value +} +// SetLastUsedAt sets the last_used_at property value. Last known time this codespace was started. +func (m *Codespace) SetLastUsedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_used_at = value +} +// SetLocation sets the location property value. The initally assigned location of a new codespace. +func (m *Codespace) SetLocation(value *Codespace_location)() { + m.location = value +} +// SetMachine sets the machine property value. A description of the machine powering a codespace. +func (m *Codespace) SetMachine(value NullableCodespaceMachineable)() { + m.machine = value +} +// SetMachinesUrl sets the machines_url property value. API URL to access available alternate machine types for this codespace. +func (m *Codespace) SetMachinesUrl(value *string)() { + m.machines_url = value +} +// SetName sets the name property value. Automatically generated name of this codespace. +func (m *Codespace) SetName(value *string)() { + m.name = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *Codespace) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPendingOperation sets the pending_operation property value. Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. +func (m *Codespace) SetPendingOperation(value *bool)() { + m.pending_operation = value +} +// SetPendingOperationDisabledReason sets the pending_operation_disabled_reason property value. Text to show user when codespace is disabled by a pending operation +func (m *Codespace) SetPendingOperationDisabledReason(value *string)() { + m.pending_operation_disabled_reason = value +} +// SetPrebuild sets the prebuild property value. Whether the codespace was created from a prebuild. +func (m *Codespace) SetPrebuild(value *bool)() { + m.prebuild = value +} +// SetPublishUrl sets the publish_url property value. API URL to publish this codespace to a new repository. +func (m *Codespace) SetPublishUrl(value *string)() { + m.publish_url = value +} +// SetPullsUrl sets the pulls_url property value. API URL for the Pull Request associated with this codespace, if any. +func (m *Codespace) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetRecentFolders sets the recent_folders property value. The recent_folders property +func (m *Codespace) SetRecentFolders(value []string)() { + m.recent_folders = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *Codespace) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetRetentionExpiresAt sets the retention_expires_at property value. When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" +func (m *Codespace) SetRetentionExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.retention_expires_at = value +} +// SetRetentionPeriodMinutes sets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +func (m *Codespace) SetRetentionPeriodMinutes(value *int32)() { + m.retention_period_minutes = value +} +// SetRuntimeConstraints sets the runtime_constraints property value. The runtime_constraints property +func (m *Codespace) SetRuntimeConstraints(value Codespace_runtime_constraintsable)() { + m.runtime_constraints = value +} +// SetStartUrl sets the start_url property value. API URL to start this codespace. +func (m *Codespace) SetStartUrl(value *string)() { + m.start_url = value +} +// SetState sets the state property value. State of this codespace. +func (m *Codespace) SetState(value *Codespace_state)() { + m.state = value +} +// SetStopUrl sets the stop_url property value. API URL to stop this codespace. +func (m *Codespace) SetStopUrl(value *string)() { + m.stop_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Codespace) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. API URL for this codespace. +func (m *Codespace) SetUrl(value *string)() { + m.url = value +} +// SetWebUrl sets the web_url property value. URL to access this codespace on the web. +func (m *Codespace) SetWebUrl(value *string)() { + m.web_url = value +} +type Codespaceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillableOwner()(SimpleUserable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDevcontainerPath()(*string) + GetDisplayName()(*string) + GetEnvironmentId()(*string) + GetGitStatus()(Codespace_git_statusable) + GetId()(*int64) + GetIdleTimeoutMinutes()(*int32) + GetIdleTimeoutNotice()(*string) + GetLastKnownStopNotice()(*string) + GetLastUsedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocation()(*Codespace_location) + GetMachine()(NullableCodespaceMachineable) + GetMachinesUrl()(*string) + GetName()(*string) + GetOwner()(SimpleUserable) + GetPendingOperation()(*bool) + GetPendingOperationDisabledReason()(*string) + GetPrebuild()(*bool) + GetPublishUrl()(*string) + GetPullsUrl()(*string) + GetRecentFolders()([]string) + GetRepository()(MinimalRepositoryable) + GetRetentionExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRetentionPeriodMinutes()(*int32) + GetRuntimeConstraints()(Codespace_runtime_constraintsable) + GetStartUrl()(*string) + GetState()(*Codespace_state) + GetStopUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetWebUrl()(*string) + SetBillableOwner(value SimpleUserable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDevcontainerPath(value *string)() + SetDisplayName(value *string)() + SetEnvironmentId(value *string)() + SetGitStatus(value Codespace_git_statusable)() + SetId(value *int64)() + SetIdleTimeoutMinutes(value *int32)() + SetIdleTimeoutNotice(value *string)() + SetLastKnownStopNotice(value *string)() + SetLastUsedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocation(value *Codespace_location)() + SetMachine(value NullableCodespaceMachineable)() + SetMachinesUrl(value *string)() + SetName(value *string)() + SetOwner(value SimpleUserable)() + SetPendingOperation(value *bool)() + SetPendingOperationDisabledReason(value *string)() + SetPrebuild(value *bool)() + SetPublishUrl(value *string)() + SetPullsUrl(value *string)() + SetRecentFolders(value []string)() + SetRepository(value MinimalRepositoryable)() + SetRetentionExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRetentionPeriodMinutes(value *int32)() + SetRuntimeConstraints(value Codespace_runtime_constraintsable)() + SetStartUrl(value *string)() + SetState(value *Codespace_state)() + SetStopUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/pkg/github/models/codespace503_error.go b/pkg/github/models/codespace503_error.go new file mode 100644 index 0000000..15e5799 --- /dev/null +++ b/pkg/github/models/codespace503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Codespace503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodespace503Error instantiates a new Codespace503Error and sets the default values. +func NewCodespace503Error()(*Codespace503Error) { + m := &Codespace503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespace503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespace503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespace503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Codespace503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Codespace503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Codespace503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Codespace503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Codespace503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Codespace503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Codespace503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Codespace503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Codespace503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Codespace503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Codespace503Error) SetMessage(value *string)() { + m.message = value +} +type Codespace503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/codespace_export_details.go b/pkg/github/models/codespace_export_details.go new file mode 100644 index 0000000..df43217 --- /dev/null +++ b/pkg/github/models/codespace_export_details.go @@ -0,0 +1,256 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespaceExportDetails an export of a codespace. Also, latest export details for a codespace can be fetched with id = latest +type CodespaceExportDetails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the exported branch + branch *string + // Completion time of the last export operation + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Url for fetching export details + export_url *string + // Web url for the exported branch + html_url *string + // Id for the export details + id *string + // Git commit SHA of the exported branch + sha *string + // State of the latest export + state *string +} +// NewCodespaceExportDetails instantiates a new CodespaceExportDetails and sets the default values. +func NewCodespaceExportDetails()(*CodespaceExportDetails) { + m := &CodespaceExportDetails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespaceExportDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespaceExportDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespaceExportDetails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespaceExportDetails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBranch gets the branch property value. Name of the exported branch +// returns a *string when successful +func (m *CodespaceExportDetails) GetBranch()(*string) { + return m.branch +} +// GetCompletedAt gets the completed_at property value. Completion time of the last export operation +// returns a *Time when successful +func (m *CodespaceExportDetails) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetExportUrl gets the export_url property value. Url for fetching export details +// returns a *string when successful +func (m *CodespaceExportDetails) GetExportUrl()(*string) { + return m.export_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespaceExportDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["export_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExportUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. Web url for the exported branch +// returns a *string when successful +func (m *CodespaceExportDetails) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Id for the export details +// returns a *string when successful +func (m *CodespaceExportDetails) GetId()(*string) { + return m.id +} +// GetSha gets the sha property value. Git commit SHA of the exported branch +// returns a *string when successful +func (m *CodespaceExportDetails) GetSha()(*string) { + return m.sha +} +// GetState gets the state property value. State of the latest export +// returns a *string when successful +func (m *CodespaceExportDetails) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *CodespaceExportDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("branch", m.GetBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("export_url", m.GetExportUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *CodespaceExportDetails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBranch sets the branch property value. Name of the exported branch +func (m *CodespaceExportDetails) SetBranch(value *string)() { + m.branch = value +} +// SetCompletedAt sets the completed_at property value. Completion time of the last export operation +func (m *CodespaceExportDetails) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetExportUrl sets the export_url property value. Url for fetching export details +func (m *CodespaceExportDetails) SetExportUrl(value *string)() { + m.export_url = value +} +// SetHtmlUrl sets the html_url property value. Web url for the exported branch +func (m *CodespaceExportDetails) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Id for the export details +func (m *CodespaceExportDetails) SetId(value *string)() { + m.id = value +} +// SetSha sets the sha property value. Git commit SHA of the exported branch +func (m *CodespaceExportDetails) SetSha(value *string)() { + m.sha = value +} +// SetState sets the state property value. State of the latest export +func (m *CodespaceExportDetails) SetState(value *string)() { + m.state = value +} +type CodespaceExportDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBranch()(*string) + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExportUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*string) + GetSha()(*string) + GetState()(*string) + SetBranch(value *string)() + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExportUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *string)() + SetSha(value *string)() + SetState(value *string)() +} diff --git a/pkg/github/models/codespace_git_status.go b/pkg/github/models/codespace_git_status.go new file mode 100644 index 0000000..f51574a --- /dev/null +++ b/pkg/github/models/codespace_git_status.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Codespace_git_status details about the codespace's git repository. +type Codespace_git_status struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The number of commits the local repository is ahead of the remote. + ahead *int32 + // The number of commits the local repository is behind the remote. + behind *int32 + // Whether the local repository has uncommitted changes. + has_uncommitted_changes *bool + // Whether the local repository has unpushed changes. + has_unpushed_changes *bool + // The current branch (or SHA if in detached HEAD state) of the local repository. + ref *string +} +// NewCodespace_git_status instantiates a new Codespace_git_status and sets the default values. +func NewCodespace_git_status()(*Codespace_git_status) { + m := &Codespace_git_status{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespace_git_statusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespace_git_statusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespace_git_status(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Codespace_git_status) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAhead gets the ahead property value. The number of commits the local repository is ahead of the remote. +// returns a *int32 when successful +func (m *Codespace_git_status) GetAhead()(*int32) { + return m.ahead +} +// GetBehind gets the behind property value. The number of commits the local repository is behind the remote. +// returns a *int32 when successful +func (m *Codespace_git_status) GetBehind()(*int32) { + return m.behind +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Codespace_git_status) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ahead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAhead(val) + } + return nil + } + res["behind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBehind(val) + } + return nil + } + res["has_uncommitted_changes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasUncommittedChanges(val) + } + return nil + } + res["has_unpushed_changes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasUnpushedChanges(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + return res +} +// GetHasUncommittedChanges gets the has_uncommitted_changes property value. Whether the local repository has uncommitted changes. +// returns a *bool when successful +func (m *Codespace_git_status) GetHasUncommittedChanges()(*bool) { + return m.has_uncommitted_changes +} +// GetHasUnpushedChanges gets the has_unpushed_changes property value. Whether the local repository has unpushed changes. +// returns a *bool when successful +func (m *Codespace_git_status) GetHasUnpushedChanges()(*bool) { + return m.has_unpushed_changes +} +// GetRef gets the ref property value. The current branch (or SHA if in detached HEAD state) of the local repository. +// returns a *string when successful +func (m *Codespace_git_status) GetRef()(*string) { + return m.ref +} +// Serialize serializes information the current object +func (m *Codespace_git_status) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("ahead", m.GetAhead()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("behind", m.GetBehind()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_uncommitted_changes", m.GetHasUncommittedChanges()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_unpushed_changes", m.GetHasUnpushedChanges()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + 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 *Codespace_git_status) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAhead sets the ahead property value. The number of commits the local repository is ahead of the remote. +func (m *Codespace_git_status) SetAhead(value *int32)() { + m.ahead = value +} +// SetBehind sets the behind property value. The number of commits the local repository is behind the remote. +func (m *Codespace_git_status) SetBehind(value *int32)() { + m.behind = value +} +// SetHasUncommittedChanges sets the has_uncommitted_changes property value. Whether the local repository has uncommitted changes. +func (m *Codespace_git_status) SetHasUncommittedChanges(value *bool)() { + m.has_uncommitted_changes = value +} +// SetHasUnpushedChanges sets the has_unpushed_changes property value. Whether the local repository has unpushed changes. +func (m *Codespace_git_status) SetHasUnpushedChanges(value *bool)() { + m.has_unpushed_changes = value +} +// SetRef sets the ref property value. The current branch (or SHA if in detached HEAD state) of the local repository. +func (m *Codespace_git_status) SetRef(value *string)() { + m.ref = value +} +type Codespace_git_statusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAhead()(*int32) + GetBehind()(*int32) + GetHasUncommittedChanges()(*bool) + GetHasUnpushedChanges()(*bool) + GetRef()(*string) + SetAhead(value *int32)() + SetBehind(value *int32)() + SetHasUncommittedChanges(value *bool)() + SetHasUnpushedChanges(value *bool)() + SetRef(value *string)() +} diff --git a/pkg/github/models/codespace_location.go b/pkg/github/models/codespace_location.go new file mode 100644 index 0000000..c1cb0f6 --- /dev/null +++ b/pkg/github/models/codespace_location.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The initally assigned location of a new codespace. +type Codespace_location int + +const ( + EASTUS_CODESPACE_LOCATION Codespace_location = iota + SOUTHEASTASIA_CODESPACE_LOCATION + WESTEUROPE_CODESPACE_LOCATION + WESTUS2_CODESPACE_LOCATION +) + +func (i Codespace_location) String() string { + return []string{"EastUs", "SouthEastAsia", "WestEurope", "WestUs2"}[i] +} +func ParseCodespace_location(v string) (any, error) { + result := EASTUS_CODESPACE_LOCATION + switch v { + case "EastUs": + result = EASTUS_CODESPACE_LOCATION + case "SouthEastAsia": + result = SOUTHEASTASIA_CODESPACE_LOCATION + case "WestEurope": + result = WESTEUROPE_CODESPACE_LOCATION + case "WestUs2": + result = WESTUS2_CODESPACE_LOCATION + default: + return 0, errors.New("Unknown Codespace_location value: " + v) + } + return &result, nil +} +func SerializeCodespace_location(values []Codespace_location) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Codespace_location) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespace_machine.go b/pkg/github/models/codespace_machine.go new file mode 100644 index 0000000..0af3a34 --- /dev/null +++ b/pkg/github/models/codespace_machine.go @@ -0,0 +1,256 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespaceMachine a description of the machine powering a codespace. +type CodespaceMachine struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How many cores are available to the codespace. + cpus *int32 + // The display name of the machine includes cores, memory, and storage. + display_name *string + // How much memory is available to the codespace. + memory_in_bytes *int32 + // The name of the machine. + name *string + // The operating system of the machine. + operating_system *string + // Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + prebuild_availability *CodespaceMachine_prebuild_availability + // How much storage is available to the codespace. + storage_in_bytes *int32 +} +// NewCodespaceMachine instantiates a new CodespaceMachine and sets the default values. +func NewCodespaceMachine()(*CodespaceMachine) { + m := &CodespaceMachine{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespaceMachineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespaceMachineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespaceMachine(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespaceMachine) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCpus gets the cpus property value. How many cores are available to the codespace. +// returns a *int32 when successful +func (m *CodespaceMachine) GetCpus()(*int32) { + return m.cpus +} +// GetDisplayName gets the display_name property value. The display name of the machine includes cores, memory, and storage. +// returns a *string when successful +func (m *CodespaceMachine) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespaceMachine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cpus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCpus(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["memory_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMemoryInBytes(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["operating_system"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["prebuild_availability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespaceMachine_prebuild_availability) + if err != nil { + return err + } + if val != nil { + m.SetPrebuildAvailability(val.(*CodespaceMachine_prebuild_availability)) + } + return nil + } + res["storage_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStorageInBytes(val) + } + return nil + } + return res +} +// GetMemoryInBytes gets the memory_in_bytes property value. How much memory is available to the codespace. +// returns a *int32 when successful +func (m *CodespaceMachine) GetMemoryInBytes()(*int32) { + return m.memory_in_bytes +} +// GetName gets the name property value. The name of the machine. +// returns a *string when successful +func (m *CodespaceMachine) GetName()(*string) { + return m.name +} +// GetOperatingSystem gets the operating_system property value. The operating system of the machine. +// returns a *string when successful +func (m *CodespaceMachine) GetOperatingSystem()(*string) { + return m.operating_system +} +// GetPrebuildAvailability gets the prebuild_availability property value. Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. +// returns a *CodespaceMachine_prebuild_availability when successful +func (m *CodespaceMachine) GetPrebuildAvailability()(*CodespaceMachine_prebuild_availability) { + return m.prebuild_availability +} +// GetStorageInBytes gets the storage_in_bytes property value. How much storage is available to the codespace. +// returns a *int32 when successful +func (m *CodespaceMachine) GetStorageInBytes()(*int32) { + return m.storage_in_bytes +} +// Serialize serializes information the current object +func (m *CodespaceMachine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("cpus", m.GetCpus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("memory_in_bytes", m.GetMemoryInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operating_system", m.GetOperatingSystem()) + if err != nil { + return err + } + } + if m.GetPrebuildAvailability() != nil { + cast := (*m.GetPrebuildAvailability()).String() + err := writer.WriteStringValue("prebuild_availability", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("storage_in_bytes", m.GetStorageInBytes()) + 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 *CodespaceMachine) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCpus sets the cpus property value. How many cores are available to the codespace. +func (m *CodespaceMachine) SetCpus(value *int32)() { + m.cpus = value +} +// SetDisplayName sets the display_name property value. The display name of the machine includes cores, memory, and storage. +func (m *CodespaceMachine) SetDisplayName(value *string)() { + m.display_name = value +} +// SetMemoryInBytes sets the memory_in_bytes property value. How much memory is available to the codespace. +func (m *CodespaceMachine) SetMemoryInBytes(value *int32)() { + m.memory_in_bytes = value +} +// SetName sets the name property value. The name of the machine. +func (m *CodespaceMachine) SetName(value *string)() { + m.name = value +} +// SetOperatingSystem sets the operating_system property value. The operating system of the machine. +func (m *CodespaceMachine) SetOperatingSystem(value *string)() { + m.operating_system = value +} +// SetPrebuildAvailability sets the prebuild_availability property value. Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. +func (m *CodespaceMachine) SetPrebuildAvailability(value *CodespaceMachine_prebuild_availability)() { + m.prebuild_availability = value +} +// SetStorageInBytes sets the storage_in_bytes property value. How much storage is available to the codespace. +func (m *CodespaceMachine) SetStorageInBytes(value *int32)() { + m.storage_in_bytes = value +} +type CodespaceMachineable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCpus()(*int32) + GetDisplayName()(*string) + GetMemoryInBytes()(*int32) + GetName()(*string) + GetOperatingSystem()(*string) + GetPrebuildAvailability()(*CodespaceMachine_prebuild_availability) + GetStorageInBytes()(*int32) + SetCpus(value *int32)() + SetDisplayName(value *string)() + SetMemoryInBytes(value *int32)() + SetName(value *string)() + SetOperatingSystem(value *string)() + SetPrebuildAvailability(value *CodespaceMachine_prebuild_availability)() + SetStorageInBytes(value *int32)() +} diff --git a/pkg/github/models/codespace_machine_prebuild_availability.go b/pkg/github/models/codespace_machine_prebuild_availability.go new file mode 100644 index 0000000..a32badf --- /dev/null +++ b/pkg/github/models/codespace_machine_prebuild_availability.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. +type CodespaceMachine_prebuild_availability int + +const ( + NONE_CODESPACEMACHINE_PREBUILD_AVAILABILITY CodespaceMachine_prebuild_availability = iota + READY_CODESPACEMACHINE_PREBUILD_AVAILABILITY + IN_PROGRESS_CODESPACEMACHINE_PREBUILD_AVAILABILITY +) + +func (i CodespaceMachine_prebuild_availability) String() string { + return []string{"none", "ready", "in_progress"}[i] +} +func ParseCodespaceMachine_prebuild_availability(v string) (any, error) { + result := NONE_CODESPACEMACHINE_PREBUILD_AVAILABILITY + switch v { + case "none": + result = NONE_CODESPACEMACHINE_PREBUILD_AVAILABILITY + case "ready": + result = READY_CODESPACEMACHINE_PREBUILD_AVAILABILITY + case "in_progress": + result = IN_PROGRESS_CODESPACEMACHINE_PREBUILD_AVAILABILITY + default: + return 0, errors.New("Unknown CodespaceMachine_prebuild_availability value: " + v) + } + return &result, nil +} +func SerializeCodespaceMachine_prebuild_availability(values []CodespaceMachine_prebuild_availability) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespaceMachine_prebuild_availability) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespace_runtime_constraints.go b/pkg/github/models/codespace_runtime_constraints.go new file mode 100644 index 0000000..db25b3f --- /dev/null +++ b/pkg/github/models/codespace_runtime_constraints.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Codespace_runtime_constraints struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The privacy settings a user can select from when forwarding a port. + allowed_port_privacy_settings []string +} +// NewCodespace_runtime_constraints instantiates a new Codespace_runtime_constraints and sets the default values. +func NewCodespace_runtime_constraints()(*Codespace_runtime_constraints) { + m := &Codespace_runtime_constraints{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespace_runtime_constraintsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespace_runtime_constraintsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespace_runtime_constraints(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Codespace_runtime_constraints) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedPortPrivacySettings gets the allowed_port_privacy_settings property value. The privacy settings a user can select from when forwarding a port. +// returns a []string when successful +func (m *Codespace_runtime_constraints) GetAllowedPortPrivacySettings()([]string) { + return m.allowed_port_privacy_settings +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Codespace_runtime_constraints) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_port_privacy_settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAllowedPortPrivacySettings(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Codespace_runtime_constraints) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedPortPrivacySettings() != nil { + err := writer.WriteCollectionOfStringValues("allowed_port_privacy_settings", m.GetAllowedPortPrivacySettings()) + 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 *Codespace_runtime_constraints) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedPortPrivacySettings sets the allowed_port_privacy_settings property value. The privacy settings a user can select from when forwarding a port. +func (m *Codespace_runtime_constraints) SetAllowedPortPrivacySettings(value []string)() { + m.allowed_port_privacy_settings = value +} +type Codespace_runtime_constraintsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedPortPrivacySettings()([]string) + SetAllowedPortPrivacySettings(value []string)() +} diff --git a/pkg/github/models/codespace_state.go b/pkg/github/models/codespace_state.go new file mode 100644 index 0000000..c463395 --- /dev/null +++ b/pkg/github/models/codespace_state.go @@ -0,0 +1,82 @@ +package models +import ( + "errors" +) +// State of this codespace. +type Codespace_state int + +const ( + UNKNOWN_CODESPACE_STATE Codespace_state = iota + CREATED_CODESPACE_STATE + QUEUED_CODESPACE_STATE + PROVISIONING_CODESPACE_STATE + AVAILABLE_CODESPACE_STATE + AWAITING_CODESPACE_STATE + UNAVAILABLE_CODESPACE_STATE + DELETED_CODESPACE_STATE + MOVED_CODESPACE_STATE + SHUTDOWN_CODESPACE_STATE + ARCHIVED_CODESPACE_STATE + STARTING_CODESPACE_STATE + SHUTTINGDOWN_CODESPACE_STATE + FAILED_CODESPACE_STATE + EXPORTING_CODESPACE_STATE + UPDATING_CODESPACE_STATE + REBUILDING_CODESPACE_STATE +) + +func (i Codespace_state) String() string { + return []string{"Unknown", "Created", "Queued", "Provisioning", "Available", "Awaiting", "Unavailable", "Deleted", "Moved", "Shutdown", "Archived", "Starting", "ShuttingDown", "Failed", "Exporting", "Updating", "Rebuilding"}[i] +} +func ParseCodespace_state(v string) (any, error) { + result := UNKNOWN_CODESPACE_STATE + switch v { + case "Unknown": + result = UNKNOWN_CODESPACE_STATE + case "Created": + result = CREATED_CODESPACE_STATE + case "Queued": + result = QUEUED_CODESPACE_STATE + case "Provisioning": + result = PROVISIONING_CODESPACE_STATE + case "Available": + result = AVAILABLE_CODESPACE_STATE + case "Awaiting": + result = AWAITING_CODESPACE_STATE + case "Unavailable": + result = UNAVAILABLE_CODESPACE_STATE + case "Deleted": + result = DELETED_CODESPACE_STATE + case "Moved": + result = MOVED_CODESPACE_STATE + case "Shutdown": + result = SHUTDOWN_CODESPACE_STATE + case "Archived": + result = ARCHIVED_CODESPACE_STATE + case "Starting": + result = STARTING_CODESPACE_STATE + case "ShuttingDown": + result = SHUTTINGDOWN_CODESPACE_STATE + case "Failed": + result = FAILED_CODESPACE_STATE + case "Exporting": + result = EXPORTING_CODESPACE_STATE + case "Updating": + result = UPDATING_CODESPACE_STATE + case "Rebuilding": + result = REBUILDING_CODESPACE_STATE + default: + return 0, errors.New("Unknown Codespace_state value: " + v) + } + return &result, nil +} +func SerializeCodespace_state(values []Codespace_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Codespace_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespace_with_full_repository.go b/pkg/github/models/codespace_with_full_repository.go new file mode 100644 index 0000000..8bcc876 --- /dev/null +++ b/pkg/github/models/codespace_with_full_repository.go @@ -0,0 +1,960 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespaceWithFullRepository a codespace. +type CodespaceWithFullRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + billable_owner SimpleUserable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Path to devcontainer.json from repo root used to create Codespace. + devcontainer_path *string + // Display name for this codespace. + display_name *string + // UUID identifying this codespace's environment. + environment_id *string + // Details about the codespace's git repository. + git_status CodespaceWithFullRepository_git_statusable + // The id property + id *int64 + // The number of minutes of inactivity after which this codespace will be automatically stopped. + idle_timeout_minutes *int32 + // Text to show user when codespace idle timeout minutes has been overriden by an organization policy + idle_timeout_notice *string + // Last known time this codespace was started. + last_used_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The initally assigned location of a new codespace. + location *CodespaceWithFullRepository_location + // A description of the machine powering a codespace. + machine NullableCodespaceMachineable + // API URL to access available alternate machine types for this codespace. + machines_url *string + // Automatically generated name of this codespace. + name *string + // A GitHub user. + owner SimpleUserable + // Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. + pending_operation *bool + // Text to show user when codespace is disabled by a pending operation + pending_operation_disabled_reason *string + // Whether the codespace was created from a prebuild. + prebuild *bool + // API URL to publish this codespace to a new repository. + publish_url *string + // API URL for the Pull Request associated with this codespace, if any. + pulls_url *string + // The recent_folders property + recent_folders []string + // Full Repository + repository FullRepositoryable + // When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + retention_expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + retention_period_minutes *int32 + // The runtime_constraints property + runtime_constraints CodespaceWithFullRepository_runtime_constraintsable + // API URL to start this codespace. + start_url *string + // State of this codespace. + state *CodespaceWithFullRepository_state + // API URL to stop this codespace. + stop_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // API URL for this codespace. + url *string + // URL to access this codespace on the web. + web_url *string +} +// NewCodespaceWithFullRepository instantiates a new CodespaceWithFullRepository and sets the default values. +func NewCodespaceWithFullRepository()(*CodespaceWithFullRepository) { + m := &CodespaceWithFullRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespaceWithFullRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespaceWithFullRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespaceWithFullRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespaceWithFullRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillableOwner gets the billable_owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *CodespaceWithFullRepository) GetBillableOwner()(SimpleUserable) { + return m.billable_owner +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *CodespaceWithFullRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDevcontainerPath gets the devcontainer_path property value. Path to devcontainer.json from repo root used to create Codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetDisplayName gets the display_name property value. Display name for this codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetDisplayName()(*string) { + return m.display_name +} +// GetEnvironmentId gets the environment_id property value. UUID identifying this codespace's environment. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetEnvironmentId()(*string) { + return m.environment_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespaceWithFullRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["billable_owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillableOwner(val.(SimpleUserable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["environment_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentId(val) + } + return nil + } + res["git_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodespaceWithFullRepository_git_statusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGitStatus(val.(CodespaceWithFullRepository_git_statusable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["idle_timeout_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutMinutes(val) + } + return nil + } + res["idle_timeout_notice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutNotice(val) + } + return nil + } + res["last_used_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUsedAt(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespaceWithFullRepository_location) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(*CodespaceWithFullRepository_location)) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCodespaceMachineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMachine(val.(NullableCodespaceMachineable)) + } + return nil + } + res["machines_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachinesUrl(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["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["pending_operation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingOperation(val) + } + return nil + } + res["pending_operation_disabled_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingOperationDisabledReason(val) + } + return nil + } + res["prebuild"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrebuild(val) + } + return nil + } + res["publish_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishUrl(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["recent_folders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRecentFolders(res) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFullRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(FullRepositoryable)) + } + return nil + } + res["retention_expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRetentionExpiresAt(val) + } + return nil + } + res["retention_period_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRetentionPeriodMinutes(val) + } + return nil + } + res["runtime_constraints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodespaceWithFullRepository_runtime_constraintsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRuntimeConstraints(val.(CodespaceWithFullRepository_runtime_constraintsable)) + } + return nil + } + res["start_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStartUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespaceWithFullRepository_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CodespaceWithFullRepository_state)) + } + return nil + } + res["stop_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStopUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["web_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetGitStatus gets the git_status property value. Details about the codespace's git repository. +// returns a CodespaceWithFullRepository_git_statusable when successful +func (m *CodespaceWithFullRepository) GetGitStatus()(CodespaceWithFullRepository_git_statusable) { + return m.git_status +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *CodespaceWithFullRepository) GetId()(*int64) { + return m.id +} +// GetIdleTimeoutMinutes gets the idle_timeout_minutes property value. The number of minutes of inactivity after which this codespace will be automatically stopped. +// returns a *int32 when successful +func (m *CodespaceWithFullRepository) GetIdleTimeoutMinutes()(*int32) { + return m.idle_timeout_minutes +} +// GetIdleTimeoutNotice gets the idle_timeout_notice property value. Text to show user when codespace idle timeout minutes has been overriden by an organization policy +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetIdleTimeoutNotice()(*string) { + return m.idle_timeout_notice +} +// GetLastUsedAt gets the last_used_at property value. Last known time this codespace was started. +// returns a *Time when successful +func (m *CodespaceWithFullRepository) GetLastUsedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_used_at +} +// GetLocation gets the location property value. The initally assigned location of a new codespace. +// returns a *CodespaceWithFullRepository_location when successful +func (m *CodespaceWithFullRepository) GetLocation()(*CodespaceWithFullRepository_location) { + return m.location +} +// GetMachine gets the machine property value. A description of the machine powering a codespace. +// returns a NullableCodespaceMachineable when successful +func (m *CodespaceWithFullRepository) GetMachine()(NullableCodespaceMachineable) { + return m.machine +} +// GetMachinesUrl gets the machines_url property value. API URL to access available alternate machine types for this codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetMachinesUrl()(*string) { + return m.machines_url +} +// GetName gets the name property value. Automatically generated name of this codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetName()(*string) { + return m.name +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *CodespaceWithFullRepository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPendingOperation gets the pending_operation property value. Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. +// returns a *bool when successful +func (m *CodespaceWithFullRepository) GetPendingOperation()(*bool) { + return m.pending_operation +} +// GetPendingOperationDisabledReason gets the pending_operation_disabled_reason property value. Text to show user when codespace is disabled by a pending operation +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetPendingOperationDisabledReason()(*string) { + return m.pending_operation_disabled_reason +} +// GetPrebuild gets the prebuild property value. Whether the codespace was created from a prebuild. +// returns a *bool when successful +func (m *CodespaceWithFullRepository) GetPrebuild()(*bool) { + return m.prebuild +} +// GetPublishUrl gets the publish_url property value. API URL to publish this codespace to a new repository. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetPublishUrl()(*string) { + return m.publish_url +} +// GetPullsUrl gets the pulls_url property value. API URL for the Pull Request associated with this codespace, if any. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetRecentFolders gets the recent_folders property value. The recent_folders property +// returns a []string when successful +func (m *CodespaceWithFullRepository) GetRecentFolders()([]string) { + return m.recent_folders +} +// GetRepository gets the repository property value. Full Repository +// returns a FullRepositoryable when successful +func (m *CodespaceWithFullRepository) GetRepository()(FullRepositoryable) { + return m.repository +} +// GetRetentionExpiresAt gets the retention_expires_at property value. When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" +// returns a *Time when successful +func (m *CodespaceWithFullRepository) GetRetentionExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.retention_expires_at +} +// GetRetentionPeriodMinutes gets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +// returns a *int32 when successful +func (m *CodespaceWithFullRepository) GetRetentionPeriodMinutes()(*int32) { + return m.retention_period_minutes +} +// GetRuntimeConstraints gets the runtime_constraints property value. The runtime_constraints property +// returns a CodespaceWithFullRepository_runtime_constraintsable when successful +func (m *CodespaceWithFullRepository) GetRuntimeConstraints()(CodespaceWithFullRepository_runtime_constraintsable) { + return m.runtime_constraints +} +// GetStartUrl gets the start_url property value. API URL to start this codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetStartUrl()(*string) { + return m.start_url +} +// GetState gets the state property value. State of this codespace. +// returns a *CodespaceWithFullRepository_state when successful +func (m *CodespaceWithFullRepository) GetState()(*CodespaceWithFullRepository_state) { + return m.state +} +// GetStopUrl gets the stop_url property value. API URL to stop this codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetStopUrl()(*string) { + return m.stop_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CodespaceWithFullRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. API URL for this codespace. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetUrl()(*string) { + return m.url +} +// GetWebUrl gets the web_url property value. URL to access this codespace on the web. +// returns a *string when successful +func (m *CodespaceWithFullRepository) GetWebUrl()(*string) { + return m.web_url +} +// Serialize serializes information the current object +func (m *CodespaceWithFullRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("billable_owner", m.GetBillableOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment_id", m.GetEnvironmentId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("git_status", m.GetGitStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("idle_timeout_minutes", m.GetIdleTimeoutMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("idle_timeout_notice", m.GetIdleTimeoutNotice()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_used_at", m.GetLastUsedAt()) + if err != nil { + return err + } + } + if m.GetLocation() != nil { + cast := (*m.GetLocation()).String() + err := writer.WriteStringValue("location", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machines_url", m.GetMachinesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pending_operation", m.GetPendingOperation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pending_operation_disabled_reason", m.GetPendingOperationDisabledReason()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prebuild", m.GetPrebuild()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("publish_url", m.GetPublishUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + if m.GetRecentFolders() != nil { + err := writer.WriteCollectionOfStringValues("recent_folders", m.GetRecentFolders()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("retention_expires_at", m.GetRetentionExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("retention_period_minutes", m.GetRetentionPeriodMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("runtime_constraints", m.GetRuntimeConstraints()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("start_url", m.GetStartUrl()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stop_url", m.GetStopUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("web_url", m.GetWebUrl()) + 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 *CodespaceWithFullRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillableOwner sets the billable_owner property value. A GitHub user. +func (m *CodespaceWithFullRepository) SetBillableOwner(value SimpleUserable)() { + m.billable_owner = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *CodespaceWithFullRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDevcontainerPath sets the devcontainer_path property value. Path to devcontainer.json from repo root used to create Codespace. +func (m *CodespaceWithFullRepository) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetDisplayName sets the display_name property value. Display name for this codespace. +func (m *CodespaceWithFullRepository) SetDisplayName(value *string)() { + m.display_name = value +} +// SetEnvironmentId sets the environment_id property value. UUID identifying this codespace's environment. +func (m *CodespaceWithFullRepository) SetEnvironmentId(value *string)() { + m.environment_id = value +} +// SetGitStatus sets the git_status property value. Details about the codespace's git repository. +func (m *CodespaceWithFullRepository) SetGitStatus(value CodespaceWithFullRepository_git_statusable)() { + m.git_status = value +} +// SetId sets the id property value. The id property +func (m *CodespaceWithFullRepository) SetId(value *int64)() { + m.id = value +} +// SetIdleTimeoutMinutes sets the idle_timeout_minutes property value. The number of minutes of inactivity after which this codespace will be automatically stopped. +func (m *CodespaceWithFullRepository) SetIdleTimeoutMinutes(value *int32)() { + m.idle_timeout_minutes = value +} +// SetIdleTimeoutNotice sets the idle_timeout_notice property value. Text to show user when codespace idle timeout minutes has been overriden by an organization policy +func (m *CodespaceWithFullRepository) SetIdleTimeoutNotice(value *string)() { + m.idle_timeout_notice = value +} +// SetLastUsedAt sets the last_used_at property value. Last known time this codespace was started. +func (m *CodespaceWithFullRepository) SetLastUsedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_used_at = value +} +// SetLocation sets the location property value. The initally assigned location of a new codespace. +func (m *CodespaceWithFullRepository) SetLocation(value *CodespaceWithFullRepository_location)() { + m.location = value +} +// SetMachine sets the machine property value. A description of the machine powering a codespace. +func (m *CodespaceWithFullRepository) SetMachine(value NullableCodespaceMachineable)() { + m.machine = value +} +// SetMachinesUrl sets the machines_url property value. API URL to access available alternate machine types for this codespace. +func (m *CodespaceWithFullRepository) SetMachinesUrl(value *string)() { + m.machines_url = value +} +// SetName sets the name property value. Automatically generated name of this codespace. +func (m *CodespaceWithFullRepository) SetName(value *string)() { + m.name = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *CodespaceWithFullRepository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPendingOperation sets the pending_operation property value. Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. +func (m *CodespaceWithFullRepository) SetPendingOperation(value *bool)() { + m.pending_operation = value +} +// SetPendingOperationDisabledReason sets the pending_operation_disabled_reason property value. Text to show user when codespace is disabled by a pending operation +func (m *CodespaceWithFullRepository) SetPendingOperationDisabledReason(value *string)() { + m.pending_operation_disabled_reason = value +} +// SetPrebuild sets the prebuild property value. Whether the codespace was created from a prebuild. +func (m *CodespaceWithFullRepository) SetPrebuild(value *bool)() { + m.prebuild = value +} +// SetPublishUrl sets the publish_url property value. API URL to publish this codespace to a new repository. +func (m *CodespaceWithFullRepository) SetPublishUrl(value *string)() { + m.publish_url = value +} +// SetPullsUrl sets the pulls_url property value. API URL for the Pull Request associated with this codespace, if any. +func (m *CodespaceWithFullRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetRecentFolders sets the recent_folders property value. The recent_folders property +func (m *CodespaceWithFullRepository) SetRecentFolders(value []string)() { + m.recent_folders = value +} +// SetRepository sets the repository property value. Full Repository +func (m *CodespaceWithFullRepository) SetRepository(value FullRepositoryable)() { + m.repository = value +} +// SetRetentionExpiresAt sets the retention_expires_at property value. When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" +func (m *CodespaceWithFullRepository) SetRetentionExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.retention_expires_at = value +} +// SetRetentionPeriodMinutes sets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +func (m *CodespaceWithFullRepository) SetRetentionPeriodMinutes(value *int32)() { + m.retention_period_minutes = value +} +// SetRuntimeConstraints sets the runtime_constraints property value. The runtime_constraints property +func (m *CodespaceWithFullRepository) SetRuntimeConstraints(value CodespaceWithFullRepository_runtime_constraintsable)() { + m.runtime_constraints = value +} +// SetStartUrl sets the start_url property value. API URL to start this codespace. +func (m *CodespaceWithFullRepository) SetStartUrl(value *string)() { + m.start_url = value +} +// SetState sets the state property value. State of this codespace. +func (m *CodespaceWithFullRepository) SetState(value *CodespaceWithFullRepository_state)() { + m.state = value +} +// SetStopUrl sets the stop_url property value. API URL to stop this codespace. +func (m *CodespaceWithFullRepository) SetStopUrl(value *string)() { + m.stop_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CodespaceWithFullRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. API URL for this codespace. +func (m *CodespaceWithFullRepository) SetUrl(value *string)() { + m.url = value +} +// SetWebUrl sets the web_url property value. URL to access this codespace on the web. +func (m *CodespaceWithFullRepository) SetWebUrl(value *string)() { + m.web_url = value +} +type CodespaceWithFullRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillableOwner()(SimpleUserable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDevcontainerPath()(*string) + GetDisplayName()(*string) + GetEnvironmentId()(*string) + GetGitStatus()(CodespaceWithFullRepository_git_statusable) + GetId()(*int64) + GetIdleTimeoutMinutes()(*int32) + GetIdleTimeoutNotice()(*string) + GetLastUsedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocation()(*CodespaceWithFullRepository_location) + GetMachine()(NullableCodespaceMachineable) + GetMachinesUrl()(*string) + GetName()(*string) + GetOwner()(SimpleUserable) + GetPendingOperation()(*bool) + GetPendingOperationDisabledReason()(*string) + GetPrebuild()(*bool) + GetPublishUrl()(*string) + GetPullsUrl()(*string) + GetRecentFolders()([]string) + GetRepository()(FullRepositoryable) + GetRetentionExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRetentionPeriodMinutes()(*int32) + GetRuntimeConstraints()(CodespaceWithFullRepository_runtime_constraintsable) + GetStartUrl()(*string) + GetState()(*CodespaceWithFullRepository_state) + GetStopUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetWebUrl()(*string) + SetBillableOwner(value SimpleUserable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDevcontainerPath(value *string)() + SetDisplayName(value *string)() + SetEnvironmentId(value *string)() + SetGitStatus(value CodespaceWithFullRepository_git_statusable)() + SetId(value *int64)() + SetIdleTimeoutMinutes(value *int32)() + SetIdleTimeoutNotice(value *string)() + SetLastUsedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocation(value *CodespaceWithFullRepository_location)() + SetMachine(value NullableCodespaceMachineable)() + SetMachinesUrl(value *string)() + SetName(value *string)() + SetOwner(value SimpleUserable)() + SetPendingOperation(value *bool)() + SetPendingOperationDisabledReason(value *string)() + SetPrebuild(value *bool)() + SetPublishUrl(value *string)() + SetPullsUrl(value *string)() + SetRecentFolders(value []string)() + SetRepository(value FullRepositoryable)() + SetRetentionExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRetentionPeriodMinutes(value *int32)() + SetRuntimeConstraints(value CodespaceWithFullRepository_runtime_constraintsable)() + SetStartUrl(value *string)() + SetState(value *CodespaceWithFullRepository_state)() + SetStopUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/pkg/github/models/codespace_with_full_repository_git_status.go b/pkg/github/models/codespace_with_full_repository_git_status.go new file mode 100644 index 0000000..2a503bf --- /dev/null +++ b/pkg/github/models/codespace_with_full_repository_git_status.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespaceWithFullRepository_git_status details about the codespace's git repository. +type CodespaceWithFullRepository_git_status struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The number of commits the local repository is ahead of the remote. + ahead *int32 + // The number of commits the local repository is behind the remote. + behind *int32 + // Whether the local repository has uncommitted changes. + has_uncommitted_changes *bool + // Whether the local repository has unpushed changes. + has_unpushed_changes *bool + // The current branch (or SHA if in detached HEAD state) of the local repository. + ref *string +} +// NewCodespaceWithFullRepository_git_status instantiates a new CodespaceWithFullRepository_git_status and sets the default values. +func NewCodespaceWithFullRepository_git_status()(*CodespaceWithFullRepository_git_status) { + m := &CodespaceWithFullRepository_git_status{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespaceWithFullRepository_git_statusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespaceWithFullRepository_git_statusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespaceWithFullRepository_git_status(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespaceWithFullRepository_git_status) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAhead gets the ahead property value. The number of commits the local repository is ahead of the remote. +// returns a *int32 when successful +func (m *CodespaceWithFullRepository_git_status) GetAhead()(*int32) { + return m.ahead +} +// GetBehind gets the behind property value. The number of commits the local repository is behind the remote. +// returns a *int32 when successful +func (m *CodespaceWithFullRepository_git_status) GetBehind()(*int32) { + return m.behind +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespaceWithFullRepository_git_status) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ahead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAhead(val) + } + return nil + } + res["behind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBehind(val) + } + return nil + } + res["has_uncommitted_changes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasUncommittedChanges(val) + } + return nil + } + res["has_unpushed_changes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasUnpushedChanges(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + return res +} +// GetHasUncommittedChanges gets the has_uncommitted_changes property value. Whether the local repository has uncommitted changes. +// returns a *bool when successful +func (m *CodespaceWithFullRepository_git_status) GetHasUncommittedChanges()(*bool) { + return m.has_uncommitted_changes +} +// GetHasUnpushedChanges gets the has_unpushed_changes property value. Whether the local repository has unpushed changes. +// returns a *bool when successful +func (m *CodespaceWithFullRepository_git_status) GetHasUnpushedChanges()(*bool) { + return m.has_unpushed_changes +} +// GetRef gets the ref property value. The current branch (or SHA if in detached HEAD state) of the local repository. +// returns a *string when successful +func (m *CodespaceWithFullRepository_git_status) GetRef()(*string) { + return m.ref +} +// Serialize serializes information the current object +func (m *CodespaceWithFullRepository_git_status) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("ahead", m.GetAhead()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("behind", m.GetBehind()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_uncommitted_changes", m.GetHasUncommittedChanges()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_unpushed_changes", m.GetHasUnpushedChanges()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + 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 *CodespaceWithFullRepository_git_status) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAhead sets the ahead property value. The number of commits the local repository is ahead of the remote. +func (m *CodespaceWithFullRepository_git_status) SetAhead(value *int32)() { + m.ahead = value +} +// SetBehind sets the behind property value. The number of commits the local repository is behind the remote. +func (m *CodespaceWithFullRepository_git_status) SetBehind(value *int32)() { + m.behind = value +} +// SetHasUncommittedChanges sets the has_uncommitted_changes property value. Whether the local repository has uncommitted changes. +func (m *CodespaceWithFullRepository_git_status) SetHasUncommittedChanges(value *bool)() { + m.has_uncommitted_changes = value +} +// SetHasUnpushedChanges sets the has_unpushed_changes property value. Whether the local repository has unpushed changes. +func (m *CodespaceWithFullRepository_git_status) SetHasUnpushedChanges(value *bool)() { + m.has_unpushed_changes = value +} +// SetRef sets the ref property value. The current branch (or SHA if in detached HEAD state) of the local repository. +func (m *CodespaceWithFullRepository_git_status) SetRef(value *string)() { + m.ref = value +} +type CodespaceWithFullRepository_git_statusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAhead()(*int32) + GetBehind()(*int32) + GetHasUncommittedChanges()(*bool) + GetHasUnpushedChanges()(*bool) + GetRef()(*string) + SetAhead(value *int32)() + SetBehind(value *int32)() + SetHasUncommittedChanges(value *bool)() + SetHasUnpushedChanges(value *bool)() + SetRef(value *string)() +} diff --git a/pkg/github/models/codespace_with_full_repository_location.go b/pkg/github/models/codespace_with_full_repository_location.go new file mode 100644 index 0000000..b972709 --- /dev/null +++ b/pkg/github/models/codespace_with_full_repository_location.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The initally assigned location of a new codespace. +type CodespaceWithFullRepository_location int + +const ( + EASTUS_CODESPACEWITHFULLREPOSITORY_LOCATION CodespaceWithFullRepository_location = iota + SOUTHEASTASIA_CODESPACEWITHFULLREPOSITORY_LOCATION + WESTEUROPE_CODESPACEWITHFULLREPOSITORY_LOCATION + WESTUS2_CODESPACEWITHFULLREPOSITORY_LOCATION +) + +func (i CodespaceWithFullRepository_location) String() string { + return []string{"EastUs", "SouthEastAsia", "WestEurope", "WestUs2"}[i] +} +func ParseCodespaceWithFullRepository_location(v string) (any, error) { + result := EASTUS_CODESPACEWITHFULLREPOSITORY_LOCATION + switch v { + case "EastUs": + result = EASTUS_CODESPACEWITHFULLREPOSITORY_LOCATION + case "SouthEastAsia": + result = SOUTHEASTASIA_CODESPACEWITHFULLREPOSITORY_LOCATION + case "WestEurope": + result = WESTEUROPE_CODESPACEWITHFULLREPOSITORY_LOCATION + case "WestUs2": + result = WESTUS2_CODESPACEWITHFULLREPOSITORY_LOCATION + default: + return 0, errors.New("Unknown CodespaceWithFullRepository_location value: " + v) + } + return &result, nil +} +func SerializeCodespaceWithFullRepository_location(values []CodespaceWithFullRepository_location) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespaceWithFullRepository_location) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespace_with_full_repository_runtime_constraints.go b/pkg/github/models/codespace_with_full_repository_runtime_constraints.go new file mode 100644 index 0000000..66c441f --- /dev/null +++ b/pkg/github/models/codespace_with_full_repository_runtime_constraints.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespaceWithFullRepository_runtime_constraints struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The privacy settings a user can select from when forwarding a port. + allowed_port_privacy_settings []string +} +// NewCodespaceWithFullRepository_runtime_constraints instantiates a new CodespaceWithFullRepository_runtime_constraints and sets the default values. +func NewCodespaceWithFullRepository_runtime_constraints()(*CodespaceWithFullRepository_runtime_constraints) { + m := &CodespaceWithFullRepository_runtime_constraints{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespaceWithFullRepository_runtime_constraintsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespaceWithFullRepository_runtime_constraintsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespaceWithFullRepository_runtime_constraints(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespaceWithFullRepository_runtime_constraints) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedPortPrivacySettings gets the allowed_port_privacy_settings property value. The privacy settings a user can select from when forwarding a port. +// returns a []string when successful +func (m *CodespaceWithFullRepository_runtime_constraints) GetAllowedPortPrivacySettings()([]string) { + return m.allowed_port_privacy_settings +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespaceWithFullRepository_runtime_constraints) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_port_privacy_settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAllowedPortPrivacySettings(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CodespaceWithFullRepository_runtime_constraints) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedPortPrivacySettings() != nil { + err := writer.WriteCollectionOfStringValues("allowed_port_privacy_settings", m.GetAllowedPortPrivacySettings()) + 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 *CodespaceWithFullRepository_runtime_constraints) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedPortPrivacySettings sets the allowed_port_privacy_settings property value. The privacy settings a user can select from when forwarding a port. +func (m *CodespaceWithFullRepository_runtime_constraints) SetAllowedPortPrivacySettings(value []string)() { + m.allowed_port_privacy_settings = value +} +type CodespaceWithFullRepository_runtime_constraintsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedPortPrivacySettings()([]string) + SetAllowedPortPrivacySettings(value []string)() +} diff --git a/pkg/github/models/codespace_with_full_repository_state.go b/pkg/github/models/codespace_with_full_repository_state.go new file mode 100644 index 0000000..d8cb98b --- /dev/null +++ b/pkg/github/models/codespace_with_full_repository_state.go @@ -0,0 +1,82 @@ +package models +import ( + "errors" +) +// State of this codespace. +type CodespaceWithFullRepository_state int + +const ( + UNKNOWN_CODESPACEWITHFULLREPOSITORY_STATE CodespaceWithFullRepository_state = iota + CREATED_CODESPACEWITHFULLREPOSITORY_STATE + QUEUED_CODESPACEWITHFULLREPOSITORY_STATE + PROVISIONING_CODESPACEWITHFULLREPOSITORY_STATE + AVAILABLE_CODESPACEWITHFULLREPOSITORY_STATE + AWAITING_CODESPACEWITHFULLREPOSITORY_STATE + UNAVAILABLE_CODESPACEWITHFULLREPOSITORY_STATE + DELETED_CODESPACEWITHFULLREPOSITORY_STATE + MOVED_CODESPACEWITHFULLREPOSITORY_STATE + SHUTDOWN_CODESPACEWITHFULLREPOSITORY_STATE + ARCHIVED_CODESPACEWITHFULLREPOSITORY_STATE + STARTING_CODESPACEWITHFULLREPOSITORY_STATE + SHUTTINGDOWN_CODESPACEWITHFULLREPOSITORY_STATE + FAILED_CODESPACEWITHFULLREPOSITORY_STATE + EXPORTING_CODESPACEWITHFULLREPOSITORY_STATE + UPDATING_CODESPACEWITHFULLREPOSITORY_STATE + REBUILDING_CODESPACEWITHFULLREPOSITORY_STATE +) + +func (i CodespaceWithFullRepository_state) String() string { + return []string{"Unknown", "Created", "Queued", "Provisioning", "Available", "Awaiting", "Unavailable", "Deleted", "Moved", "Shutdown", "Archived", "Starting", "ShuttingDown", "Failed", "Exporting", "Updating", "Rebuilding"}[i] +} +func ParseCodespaceWithFullRepository_state(v string) (any, error) { + result := UNKNOWN_CODESPACEWITHFULLREPOSITORY_STATE + switch v { + case "Unknown": + result = UNKNOWN_CODESPACEWITHFULLREPOSITORY_STATE + case "Created": + result = CREATED_CODESPACEWITHFULLREPOSITORY_STATE + case "Queued": + result = QUEUED_CODESPACEWITHFULLREPOSITORY_STATE + case "Provisioning": + result = PROVISIONING_CODESPACEWITHFULLREPOSITORY_STATE + case "Available": + result = AVAILABLE_CODESPACEWITHFULLREPOSITORY_STATE + case "Awaiting": + result = AWAITING_CODESPACEWITHFULLREPOSITORY_STATE + case "Unavailable": + result = UNAVAILABLE_CODESPACEWITHFULLREPOSITORY_STATE + case "Deleted": + result = DELETED_CODESPACEWITHFULLREPOSITORY_STATE + case "Moved": + result = MOVED_CODESPACEWITHFULLREPOSITORY_STATE + case "Shutdown": + result = SHUTDOWN_CODESPACEWITHFULLREPOSITORY_STATE + case "Archived": + result = ARCHIVED_CODESPACEWITHFULLREPOSITORY_STATE + case "Starting": + result = STARTING_CODESPACEWITHFULLREPOSITORY_STATE + case "ShuttingDown": + result = SHUTTINGDOWN_CODESPACEWITHFULLREPOSITORY_STATE + case "Failed": + result = FAILED_CODESPACEWITHFULLREPOSITORY_STATE + case "Exporting": + result = EXPORTING_CODESPACEWITHFULLREPOSITORY_STATE + case "Updating": + result = UPDATING_CODESPACEWITHFULLREPOSITORY_STATE + case "Rebuilding": + result = REBUILDING_CODESPACEWITHFULLREPOSITORY_STATE + default: + return 0, errors.New("Unknown CodespaceWithFullRepository_state value: " + v) + } + return &result, nil +} +func SerializeCodespaceWithFullRepository_state(values []CodespaceWithFullRepository_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespaceWithFullRepository_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespaces_org_secret.go b/pkg/github/models/codespaces_org_secret.go new file mode 100644 index 0000000..3e855d9 --- /dev/null +++ b/pkg/github/models/codespaces_org_secret.go @@ -0,0 +1,199 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespacesOrgSecret secrets for a GitHub Codespace. +type CodespacesOrgSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret + name *string + // The API URL at which the list of repositories this secret is visible to can be retrieved + selected_repositories_url *string + // The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of repositories in the organization that the secret is visible to + visibility *CodespacesOrgSecret_visibility +} +// NewCodespacesOrgSecret instantiates a new CodespacesOrgSecret and sets the default values. +func NewCodespacesOrgSecret()(*CodespacesOrgSecret) { + m := &CodespacesOrgSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesOrgSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesOrgSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesOrgSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesOrgSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodespacesOrgSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesOrgSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespacesOrgSecret_visibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*CodespacesOrgSecret_visibility)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret +// returns a *string when successful +func (m *CodespacesOrgSecret) GetName()(*string) { + return m.name +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. The API URL at which the list of repositories this secret is visible to can be retrieved +// returns a *string when successful +func (m *CodespacesOrgSecret) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodespacesOrgSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetVisibility gets the visibility property value. The type of repositories in the organization that the secret is visible to +// returns a *CodespacesOrgSecret_visibility when successful +func (m *CodespacesOrgSecret) GetVisibility()(*CodespacesOrgSecret_visibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *CodespacesOrgSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err := writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodespacesOrgSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodespacesOrgSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret +func (m *CodespacesOrgSecret) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. The API URL at which the list of repositories this secret is visible to can be retrieved +func (m *CodespacesOrgSecret) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodespacesOrgSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetVisibility sets the visibility property value. The type of repositories in the organization that the secret is visible to +func (m *CodespacesOrgSecret) SetVisibility(value *CodespacesOrgSecret_visibility)() { + m.visibility = value +} +type CodespacesOrgSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSelectedRepositoriesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVisibility()(*CodespacesOrgSecret_visibility) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSelectedRepositoriesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVisibility(value *CodespacesOrgSecret_visibility)() +} diff --git a/pkg/github/models/codespaces_org_secret_visibility.go b/pkg/github/models/codespaces_org_secret_visibility.go new file mode 100644 index 0000000..d0769f2 --- /dev/null +++ b/pkg/github/models/codespaces_org_secret_visibility.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The type of repositories in the organization that the secret is visible to +type CodespacesOrgSecret_visibility int + +const ( + ALL_CODESPACESORGSECRET_VISIBILITY CodespacesOrgSecret_visibility = iota + PRIVATE_CODESPACESORGSECRET_VISIBILITY + SELECTED_CODESPACESORGSECRET_VISIBILITY +) + +func (i CodespacesOrgSecret_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseCodespacesOrgSecret_visibility(v string) (any, error) { + result := ALL_CODESPACESORGSECRET_VISIBILITY + switch v { + case "all": + result = ALL_CODESPACESORGSECRET_VISIBILITY + case "private": + result = PRIVATE_CODESPACESORGSECRET_VISIBILITY + case "selected": + result = SELECTED_CODESPACESORGSECRET_VISIBILITY + default: + return 0, errors.New("Unknown CodespacesOrgSecret_visibility value: " + v) + } + return &result, nil +} +func SerializeCodespacesOrgSecret_visibility(values []CodespacesOrgSecret_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespacesOrgSecret_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespaces_permissions_check_for_devcontainer.go b/pkg/github/models/codespaces_permissions_check_for_devcontainer.go new file mode 100644 index 0000000..10718a7 --- /dev/null +++ b/pkg/github/models/codespaces_permissions_check_for_devcontainer.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespacesPermissionsCheckForDevcontainer permission check result for a given devcontainer config. +type CodespacesPermissionsCheckForDevcontainer struct { + // Whether the user has accepted the permissions defined by the devcontainer config + accepted *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewCodespacesPermissionsCheckForDevcontainer instantiates a new CodespacesPermissionsCheckForDevcontainer and sets the default values. +func NewCodespacesPermissionsCheckForDevcontainer()(*CodespacesPermissionsCheckForDevcontainer) { + m := &CodespacesPermissionsCheckForDevcontainer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesPermissionsCheckForDevcontainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPermissionsCheckForDevcontainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesPermissionsCheckForDevcontainer(), nil +} +// GetAccepted gets the accepted property value. Whether the user has accepted the permissions defined by the devcontainer config +// returns a *bool when successful +func (m *CodespacesPermissionsCheckForDevcontainer) GetAccepted()(*bool) { + return m.accepted +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesPermissionsCheckForDevcontainer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPermissionsCheckForDevcontainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccepted(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CodespacesPermissionsCheckForDevcontainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("accepted", m.GetAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccepted sets the accepted property value. Whether the user has accepted the permissions defined by the devcontainer config +func (m *CodespacesPermissionsCheckForDevcontainer) SetAccepted(value *bool)() { + m.accepted = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodespacesPermissionsCheckForDevcontainer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type CodespacesPermissionsCheckForDevcontainerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccepted()(*bool) + SetAccepted(value *bool)() +} diff --git a/pkg/github/models/codespaces_permissions_check_for_devcontainer503_error.go b/pkg/github/models/codespaces_permissions_check_for_devcontainer503_error.go new file mode 100644 index 0000000..c9f5086 --- /dev/null +++ b/pkg/github/models/codespaces_permissions_check_for_devcontainer503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesPermissionsCheckForDevcontainer503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodespacesPermissionsCheckForDevcontainer503Error instantiates a new CodespacesPermissionsCheckForDevcontainer503Error and sets the default values. +func NewCodespacesPermissionsCheckForDevcontainer503Error()(*CodespacesPermissionsCheckForDevcontainer503Error) { + m := &CodespacesPermissionsCheckForDevcontainer503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesPermissionsCheckForDevcontainer503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPermissionsCheckForDevcontainer503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesPermissionsCheckForDevcontainer503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodespacesPermissionsCheckForDevcontainer503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesPermissionsCheckForDevcontainer503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodespacesPermissionsCheckForDevcontainer503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodespacesPermissionsCheckForDevcontainer503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPermissionsCheckForDevcontainer503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodespacesPermissionsCheckForDevcontainer503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodespacesPermissionsCheckForDevcontainer503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodespacesPermissionsCheckForDevcontainer503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodespacesPermissionsCheckForDevcontainer503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodespacesPermissionsCheckForDevcontainer503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodespacesPermissionsCheckForDevcontainer503Error) SetMessage(value *string)() { + m.message = value +} +type CodespacesPermissionsCheckForDevcontainer503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/codespaces_public_key.go b/pkg/github/models/codespaces_public_key.go new file mode 100644 index 0000000..980f32e --- /dev/null +++ b/pkg/github/models/codespaces_public_key.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespacesPublicKey the public key used for setting Codespaces secrets. +type CodespacesPublicKey struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The id property + id *int32 + // The Base64 encoded public key. + key *string + // The identifier for the key. + key_id *string + // The title property + title *string + // The url property + url *string +} +// NewCodespacesPublicKey instantiates a new CodespacesPublicKey and sets the default values. +func NewCodespacesPublicKey()(*CodespacesPublicKey) { + m := &CodespacesPublicKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesPublicKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPublicKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesPublicKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesPublicKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *CodespacesPublicKey) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPublicKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *CodespacesPublicKey) GetId()(*int32) { + return m.id +} +// GetKey gets the key property value. The Base64 encoded public key. +// returns a *string when successful +func (m *CodespacesPublicKey) GetKey()(*string) { + return m.key +} +// GetKeyId gets the key_id property value. The identifier for the key. +// returns a *string when successful +func (m *CodespacesPublicKey) GetKeyId()(*string) { + return m.key_id +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *CodespacesPublicKey) GetTitle()(*string) { + return m.title +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CodespacesPublicKey) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CodespacesPublicKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodespacesPublicKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *CodespacesPublicKey) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *CodespacesPublicKey) SetId(value *int32)() { + m.id = value +} +// SetKey sets the key property value. The Base64 encoded public key. +func (m *CodespacesPublicKey) SetKey(value *string)() { + m.key = value +} +// SetKeyId sets the key_id property value. The identifier for the key. +func (m *CodespacesPublicKey) SetKeyId(value *string)() { + m.key_id = value +} +// SetTitle sets the title property value. The title property +func (m *CodespacesPublicKey) SetTitle(value *string)() { + m.title = value +} +// SetUrl sets the url property value. The url property +func (m *CodespacesPublicKey) SetUrl(value *string)() { + m.url = value +} +type CodespacesPublicKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetId()(*int32) + GetKey()(*string) + GetKeyId()(*string) + GetTitle()(*string) + GetUrl()(*string) + SetCreatedAt(value *string)() + SetId(value *int32)() + SetKey(value *string)() + SetKeyId(value *string)() + SetTitle(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/codespaces_secret.go b/pkg/github/models/codespaces_secret.go new file mode 100644 index 0000000..94d86db --- /dev/null +++ b/pkg/github/models/codespaces_secret.go @@ -0,0 +1,199 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespacesSecret secrets for a GitHub Codespace. +type CodespacesSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret + name *string + // The API URL at which the list of repositories this secret is visible to can be retrieved + selected_repositories_url *string + // The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of repositories in the organization that the secret is visible to + visibility *CodespacesSecret_visibility +} +// NewCodespacesSecret instantiates a new CodespacesSecret and sets the default values. +func NewCodespacesSecret()(*CodespacesSecret) { + m := &CodespacesSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodespacesSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodespacesSecret_visibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*CodespacesSecret_visibility)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret +// returns a *string when successful +func (m *CodespacesSecret) GetName()(*string) { + return m.name +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. The API URL at which the list of repositories this secret is visible to can be retrieved +// returns a *string when successful +func (m *CodespacesSecret) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodespacesSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetVisibility gets the visibility property value. The type of repositories in the organization that the secret is visible to +// returns a *CodespacesSecret_visibility when successful +func (m *CodespacesSecret) GetVisibility()(*CodespacesSecret_visibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *CodespacesSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err := writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodespacesSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodespacesSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret +func (m *CodespacesSecret) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. The API URL at which the list of repositories this secret is visible to can be retrieved +func (m *CodespacesSecret) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodespacesSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetVisibility sets the visibility property value. The type of repositories in the organization that the secret is visible to +func (m *CodespacesSecret) SetVisibility(value *CodespacesSecret_visibility)() { + m.visibility = value +} +type CodespacesSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSelectedRepositoriesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVisibility()(*CodespacesSecret_visibility) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSelectedRepositoriesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVisibility(value *CodespacesSecret_visibility)() +} diff --git a/pkg/github/models/codespaces_secret_visibility.go b/pkg/github/models/codespaces_secret_visibility.go new file mode 100644 index 0000000..8d3552a --- /dev/null +++ b/pkg/github/models/codespaces_secret_visibility.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The type of repositories in the organization that the secret is visible to +type CodespacesSecret_visibility int + +const ( + ALL_CODESPACESSECRET_VISIBILITY CodespacesSecret_visibility = iota + PRIVATE_CODESPACESSECRET_VISIBILITY + SELECTED_CODESPACESSECRET_VISIBILITY +) + +func (i CodespacesSecret_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseCodespacesSecret_visibility(v string) (any, error) { + result := ALL_CODESPACESSECRET_VISIBILITY + switch v { + case "all": + result = ALL_CODESPACESSECRET_VISIBILITY + case "private": + result = PRIVATE_CODESPACESSECRET_VISIBILITY + case "selected": + result = SELECTED_CODESPACESSECRET_VISIBILITY + default: + return 0, errors.New("Unknown CodespacesSecret_visibility value: " + v) + } + return &result, nil +} +func SerializeCodespacesSecret_visibility(values []CodespacesSecret_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespacesSecret_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespaces_user_public_key.go b/pkg/github/models/codespaces_user_public_key.go new file mode 100644 index 0000000..d548504 --- /dev/null +++ b/pkg/github/models/codespaces_user_public_key.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespacesUserPublicKey the public key used for setting user Codespaces' Secrets. +type CodespacesUserPublicKey struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The Base64 encoded public key. + key *string + // The identifier for the key. + key_id *string +} +// NewCodespacesUserPublicKey instantiates a new CodespacesUserPublicKey and sets the default values. +func NewCodespacesUserPublicKey()(*CodespacesUserPublicKey) { + m := &CodespacesUserPublicKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesUserPublicKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesUserPublicKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesUserPublicKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesUserPublicKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesUserPublicKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The Base64 encoded public key. +// returns a *string when successful +func (m *CodespacesUserPublicKey) GetKey()(*string) { + return m.key +} +// GetKeyId gets the key_id property value. The identifier for the key. +// returns a *string when successful +func (m *CodespacesUserPublicKey) GetKeyId()(*string) { + return m.key_id +} +// Serialize serializes information the current object +func (m *CodespacesUserPublicKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + 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 *CodespacesUserPublicKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The Base64 encoded public key. +func (m *CodespacesUserPublicKey) SetKey(value *string)() { + m.key = value +} +// SetKeyId sets the key_id property value. The identifier for the key. +func (m *CodespacesUserPublicKey) SetKeyId(value *string)() { + m.key_id = value +} +type CodespacesUserPublicKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetKeyId()(*string) + SetKey(value *string)() + SetKeyId(value *string)() +} diff --git a/pkg/github/models/collaborator.go b/pkg/github/models/collaborator.go new file mode 100644 index 0000000..0511468 --- /dev/null +++ b/pkg/github/models/collaborator.go @@ -0,0 +1,690 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Collaborator collaborator +type Collaborator struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The email property + email *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The permissions property + permissions Collaborator_permissionsable + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The role_name property + role_name *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewCollaborator instantiates a new Collaborator and sets the default values. +func NewCollaborator()(*Collaborator) { + m := &Collaborator{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCollaboratorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCollaboratorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCollaborator(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Collaborator) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *Collaborator) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *Collaborator) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *Collaborator) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Collaborator) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCollaborator_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(Collaborator_permissionsable)) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["role_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *Collaborator) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *Collaborator) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *Collaborator) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *Collaborator) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Collaborator) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Collaborator) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *Collaborator) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Collaborator) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Collaborator) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *Collaborator) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetPermissions gets the permissions property value. The permissions property +// returns a Collaborator_permissionsable when successful +func (m *Collaborator) GetPermissions()(Collaborator_permissionsable) { + return m.permissions +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *Collaborator) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *Collaborator) GetReposUrl()(*string) { + return m.repos_url +} +// GetRoleName gets the role_name property value. The role_name property +// returns a *string when successful +func (m *Collaborator) GetRoleName()(*string) { + return m.role_name +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *Collaborator) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *Collaborator) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *Collaborator) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Collaborator) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Collaborator) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Collaborator) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role_name", m.GetRoleName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *Collaborator) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *Collaborator) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEmail sets the email property value. The email property +func (m *Collaborator) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *Collaborator) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *Collaborator) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *Collaborator) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *Collaborator) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *Collaborator) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Collaborator) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Collaborator) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *Collaborator) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *Collaborator) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Collaborator) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *Collaborator) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *Collaborator) SetPermissions(value Collaborator_permissionsable)() { + m.permissions = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *Collaborator) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *Collaborator) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetRoleName sets the role_name property value. The role_name property +func (m *Collaborator) SetRoleName(value *string)() { + m.role_name = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *Collaborator) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *Collaborator) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *Collaborator) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Collaborator) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *Collaborator) SetUrl(value *string)() { + m.url = value +} +type Collaboratorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetPermissions()(Collaborator_permissionsable) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetRoleName()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetPermissions(value Collaborator_permissionsable)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetRoleName(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/collaborator_permissions.go b/pkg/github/models/collaborator_permissions.go new file mode 100644 index 0000000..098a450 --- /dev/null +++ b/pkg/github/models/collaborator_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Collaborator_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewCollaborator_permissions instantiates a new Collaborator_permissions and sets the default values. +func NewCollaborator_permissions()(*Collaborator_permissions) { + m := &Collaborator_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCollaborator_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCollaborator_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCollaborator_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Collaborator_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *Collaborator_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Collaborator_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *Collaborator_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *Collaborator_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *Collaborator_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *Collaborator_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *Collaborator_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Collaborator_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *Collaborator_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *Collaborator_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *Collaborator_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *Collaborator_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *Collaborator_permissions) SetTriage(value *bool)() { + m.triage = value +} +type Collaborator_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/combined_billing_usage.go b/pkg/github/models/combined_billing_usage.go new file mode 100644 index 0000000..087b2e2 --- /dev/null +++ b/pkg/github/models/combined_billing_usage.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CombinedBillingUsage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Numbers of days left in billing cycle. + days_left_in_billing_cycle *int32 + // Estimated storage space (GB) used in billing cycle. + estimated_paid_storage_for_month *int32 + // Estimated sum of free and paid storage space (GB) used in billing cycle. + estimated_storage_for_month *int32 +} +// NewCombinedBillingUsage instantiates a new CombinedBillingUsage and sets the default values. +func NewCombinedBillingUsage()(*CombinedBillingUsage) { + m := &CombinedBillingUsage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCombinedBillingUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCombinedBillingUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCombinedBillingUsage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CombinedBillingUsage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDaysLeftInBillingCycle gets the days_left_in_billing_cycle property value. Numbers of days left in billing cycle. +// returns a *int32 when successful +func (m *CombinedBillingUsage) GetDaysLeftInBillingCycle()(*int32) { + return m.days_left_in_billing_cycle +} +// GetEstimatedPaidStorageForMonth gets the estimated_paid_storage_for_month property value. Estimated storage space (GB) used in billing cycle. +// returns a *int32 when successful +func (m *CombinedBillingUsage) GetEstimatedPaidStorageForMonth()(*int32) { + return m.estimated_paid_storage_for_month +} +// GetEstimatedStorageForMonth gets the estimated_storage_for_month property value. Estimated sum of free and paid storage space (GB) used in billing cycle. +// returns a *int32 when successful +func (m *CombinedBillingUsage) GetEstimatedStorageForMonth()(*int32) { + return m.estimated_storage_for_month +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CombinedBillingUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["days_left_in_billing_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDaysLeftInBillingCycle(val) + } + return nil + } + res["estimated_paid_storage_for_month"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEstimatedPaidStorageForMonth(val) + } + return nil + } + res["estimated_storage_for_month"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEstimatedStorageForMonth(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CombinedBillingUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("days_left_in_billing_cycle", m.GetDaysLeftInBillingCycle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("estimated_paid_storage_for_month", m.GetEstimatedPaidStorageForMonth()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("estimated_storage_for_month", m.GetEstimatedStorageForMonth()) + 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 *CombinedBillingUsage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDaysLeftInBillingCycle sets the days_left_in_billing_cycle property value. Numbers of days left in billing cycle. +func (m *CombinedBillingUsage) SetDaysLeftInBillingCycle(value *int32)() { + m.days_left_in_billing_cycle = value +} +// SetEstimatedPaidStorageForMonth sets the estimated_paid_storage_for_month property value. Estimated storage space (GB) used in billing cycle. +func (m *CombinedBillingUsage) SetEstimatedPaidStorageForMonth(value *int32)() { + m.estimated_paid_storage_for_month = value +} +// SetEstimatedStorageForMonth sets the estimated_storage_for_month property value. Estimated sum of free and paid storage space (GB) used in billing cycle. +func (m *CombinedBillingUsage) SetEstimatedStorageForMonth(value *int32)() { + m.estimated_storage_for_month = value +} +type CombinedBillingUsageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDaysLeftInBillingCycle()(*int32) + GetEstimatedPaidStorageForMonth()(*int32) + GetEstimatedStorageForMonth()(*int32) + SetDaysLeftInBillingCycle(value *int32)() + SetEstimatedPaidStorageForMonth(value *int32)() + SetEstimatedStorageForMonth(value *int32)() +} diff --git a/pkg/github/models/combined_commit_status.go b/pkg/github/models/combined_commit_status.go new file mode 100644 index 0000000..2d21556 --- /dev/null +++ b/pkg/github/models/combined_commit_status.go @@ -0,0 +1,267 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CombinedCommitStatus combined Commit Status +type CombinedCommitStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_url property + commit_url *string + // Minimal Repository + repository MinimalRepositoryable + // The sha property + sha *string + // The state property + state *string + // The statuses property + statuses []SimpleCommitStatusable + // The total_count property + total_count *int32 + // The url property + url *string +} +// NewCombinedCommitStatus instantiates a new CombinedCommitStatus and sets the default values. +func NewCombinedCommitStatus()(*CombinedCommitStatus) { + m := &CombinedCommitStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCombinedCommitStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCombinedCommitStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCombinedCommitStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CombinedCommitStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *CombinedCommitStatus) GetCommitUrl()(*string) { + return m.commit_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CombinedCommitStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["statuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleCommitStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleCommitStatusable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleCommitStatusable) + } + } + m.SetStatuses(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *CombinedCommitStatus) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *CombinedCommitStatus) GetSha()(*string) { + return m.sha +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *CombinedCommitStatus) GetState()(*string) { + return m.state +} +// GetStatuses gets the statuses property value. The statuses property +// returns a []SimpleCommitStatusable when successful +func (m *CombinedCommitStatus) GetStatuses()([]SimpleCommitStatusable) { + return m.statuses +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CombinedCommitStatus) GetTotalCount()(*int32) { + return m.total_count +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CombinedCommitStatus) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CombinedCommitStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + if m.GetStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStatuses())) + for i, v := range m.GetStatuses() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("statuses", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CombinedCommitStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *CombinedCommitStatus) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *CombinedCommitStatus) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetSha sets the sha property value. The sha property +func (m *CombinedCommitStatus) SetSha(value *string)() { + m.sha = value +} +// SetState sets the state property value. The state property +func (m *CombinedCommitStatus) SetState(value *string)() { + m.state = value +} +// SetStatuses sets the statuses property value. The statuses property +func (m *CombinedCommitStatus) SetStatuses(value []SimpleCommitStatusable)() { + m.statuses = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CombinedCommitStatus) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetUrl sets the url property value. The url property +func (m *CombinedCommitStatus) SetUrl(value *string)() { + m.url = value +} +type CombinedCommitStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommitUrl()(*string) + GetRepository()(MinimalRepositoryable) + GetSha()(*string) + GetState()(*string) + GetStatuses()([]SimpleCommitStatusable) + GetTotalCount()(*int32) + GetUrl()(*string) + SetCommitUrl(value *string)() + SetRepository(value MinimalRepositoryable)() + SetSha(value *string)() + SetState(value *string)() + SetStatuses(value []SimpleCommitStatusable)() + SetTotalCount(value *int32)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit.go b/pkg/github/models/commit.go new file mode 100644 index 0000000..1d0289d --- /dev/null +++ b/pkg/github/models/commit.go @@ -0,0 +1,561 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Commit commit +type Commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The author property + author Commit_Commit_authorable + // The comments_url property + comments_url *string + // The commit property + commit Commit_commitable + // The committer property + committer Commit_Commit_committerable + // The files property + files []DiffEntryable + // The html_url property + html_url *string + // The node_id property + node_id *string + // The parents property + parents []Commit_parentsable + // The sha property + sha *string + // The stats property + stats Commit_statsable + // The url property + url *string +} +// Commit_Commit_author composed type wrapper for classes EmptyObjectable, SimpleUserable +type Commit_Commit_author struct { + // Composed type representation for type EmptyObjectable + emptyObject EmptyObjectable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable +} +// NewCommit_Commit_author instantiates a new Commit_Commit_author and sets the default values. +func NewCommit_Commit_author()(*Commit_Commit_author) { + m := &Commit_Commit_author{ + } + return m +} +// CreateCommit_Commit_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit_Commit_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCommit_Commit_author() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetEmptyObject gets the emptyObject property value. Composed type representation for type EmptyObjectable +// returns a EmptyObjectable when successful +func (m *Commit_Commit_author) GetEmptyObject()(EmptyObjectable) { + return m.emptyObject +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit_Commit_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Commit_Commit_author) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *Commit_Commit_author) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// Serialize serializes information the current object +func (m *Commit_Commit_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEmptyObject() != nil { + err := writer.WriteObjectValue("", m.GetEmptyObject()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } + return nil +} +// SetEmptyObject sets the emptyObject property value. Composed type representation for type EmptyObjectable +func (m *Commit_Commit_author) SetEmptyObject(value EmptyObjectable)() { + m.emptyObject = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *Commit_Commit_author) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +// Commit_Commit_committer composed type wrapper for classes EmptyObjectable, SimpleUserable +type Commit_Commit_committer struct { + // Composed type representation for type EmptyObjectable + emptyObject EmptyObjectable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable +} +// NewCommit_Commit_committer instantiates a new Commit_Commit_committer and sets the default values. +func NewCommit_Commit_committer()(*Commit_Commit_committer) { + m := &Commit_Commit_committer{ + } + return m +} +// CreateCommit_Commit_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit_Commit_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCommit_Commit_committer() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetEmptyObject gets the emptyObject property value. Composed type representation for type EmptyObjectable +// returns a EmptyObjectable when successful +func (m *Commit_Commit_committer) GetEmptyObject()(EmptyObjectable) { + return m.emptyObject +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit_Commit_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Commit_Commit_committer) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *Commit_Commit_committer) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// Serialize serializes information the current object +func (m *Commit_Commit_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEmptyObject() != nil { + err := writer.WriteObjectValue("", m.GetEmptyObject()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } + return nil +} +// SetEmptyObject sets the emptyObject property value. Composed type representation for type EmptyObjectable +func (m *Commit_Commit_committer) SetEmptyObject(value EmptyObjectable)() { + m.emptyObject = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *Commit_Commit_committer) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +type Commit_Commit_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmptyObject()(EmptyObjectable) + GetSimpleUser()(SimpleUserable) + SetEmptyObject(value EmptyObjectable)() + SetSimpleUser(value SimpleUserable)() +} +type Commit_Commit_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmptyObject()(EmptyObjectable) + GetSimpleUser()(SimpleUserable) + SetEmptyObject(value EmptyObjectable)() + SetSimpleUser(value SimpleUserable)() +} +// NewCommit instantiates a new Commit and sets the default values. +func NewCommit()(*Commit) { + m := &Commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. The author property +// returns a Commit_Commit_authorable when successful +func (m *Commit) GetAuthor()(Commit_Commit_authorable) { + return m.author +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *Commit) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommit gets the commit property value. The commit property +// returns a Commit_commitable when successful +func (m *Commit) GetCommit()(Commit_commitable) { + return m.commit +} +// GetCommitter gets the committer property value. The committer property +// returns a Commit_Commit_committerable when successful +func (m *Commit) GetCommitter()(Commit_Commit_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommit_Commit_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(Commit_Commit_authorable)) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommit_commitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(Commit_commitable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommit_Commit_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(Commit_Commit_committerable)) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDiffEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DiffEntryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DiffEntryable) + } + } + m.SetFiles(res) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["parents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommit_parentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Commit_parentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Commit_parentsable) + } + } + m.SetParents(res) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["stats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommit_statsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStats(val.(Commit_statsable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFiles gets the files property value. The files property +// returns a []DiffEntryable when successful +func (m *Commit) GetFiles()([]DiffEntryable) { + return m.files +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Commit) GetHtmlUrl()(*string) { + return m.html_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Commit) GetNodeId()(*string) { + return m.node_id +} +// GetParents gets the parents property value. The parents property +// returns a []Commit_parentsable when successful +func (m *Commit) GetParents()([]Commit_parentsable) { + return m.parents +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Commit) GetSha()(*string) { + return m.sha +} +// GetStats gets the stats property value. The stats property +// returns a Commit_statsable when successful +func (m *Commit) GetStats()(Commit_statsable) { + return m.stats +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Commit) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + if m.GetFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFiles())) + for i, v := range m.GetFiles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("files", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetParents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParents())) + for i, v := range m.GetParents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("parents", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("stats", m.GetStats()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. The author property +func (m *Commit) SetAuthor(value Commit_Commit_authorable)() { + m.author = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *Commit) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommit sets the commit property value. The commit property +func (m *Commit) SetCommit(value Commit_commitable)() { + m.commit = value +} +// SetCommitter sets the committer property value. The committer property +func (m *Commit) SetCommitter(value Commit_Commit_committerable)() { + m.committer = value +} +// SetFiles sets the files property value. The files property +func (m *Commit) SetFiles(value []DiffEntryable)() { + m.files = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Commit) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Commit) SetNodeId(value *string)() { + m.node_id = value +} +// SetParents sets the parents property value. The parents property +func (m *Commit) SetParents(value []Commit_parentsable)() { + m.parents = value +} +// SetSha sets the sha property value. The sha property +func (m *Commit) SetSha(value *string)() { + m.sha = value +} +// SetStats sets the stats property value. The stats property +func (m *Commit) SetStats(value Commit_statsable)() { + m.stats = value +} +// SetUrl sets the url property value. The url property +func (m *Commit) SetUrl(value *string)() { + m.url = value +} +type Commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(Commit_Commit_authorable) + GetCommentsUrl()(*string) + GetCommit()(Commit_commitable) + GetCommitter()(Commit_Commit_committerable) + GetFiles()([]DiffEntryable) + GetHtmlUrl()(*string) + GetNodeId()(*string) + GetParents()([]Commit_parentsable) + GetSha()(*string) + GetStats()(Commit_statsable) + GetUrl()(*string) + SetAuthor(value Commit_Commit_authorable)() + SetCommentsUrl(value *string)() + SetCommit(value Commit_commitable)() + SetCommitter(value Commit_Commit_committerable)() + SetFiles(value []DiffEntryable)() + SetHtmlUrl(value *string)() + SetNodeId(value *string)() + SetParents(value []Commit_parentsable)() + SetSha(value *string)() + SetStats(value Commit_statsable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit503_error.go b/pkg/github/models/commit503_error.go new file mode 100644 index 0000000..1e17d90 --- /dev/null +++ b/pkg/github/models/commit503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commit503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCommit503Error instantiates a new Commit503Error and sets the default values. +func NewCommit503Error()(*Commit503Error) { + m := &Commit503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommit503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommit503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Commit503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commit503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Commit503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Commit503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Commit503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Commit503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Commit503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Commit503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Commit503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Commit503Error) SetMessage(value *string)() { + m.message = value +} +type Commit503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/commit_activity.go b/pkg/github/models/commit_activity.go new file mode 100644 index 0000000..58c70d8 --- /dev/null +++ b/pkg/github/models/commit_activity.go @@ -0,0 +1,145 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommitActivity commit Activity +type CommitActivity struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The days property + days []int32 + // The total property + total *int32 + // The week property + week *int32 +} +// NewCommitActivity instantiates a new CommitActivity and sets the default values. +func NewCommitActivity()(*CommitActivity) { + m := &CommitActivity{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitActivity(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitActivity) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDays gets the days property value. The days property +// returns a []int32 when successful +func (m *CommitActivity) GetDays()([]int32) { + return m.days +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["days"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetDays(res) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + res["week"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWeek(val) + } + return nil + } + return res +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *CommitActivity) GetTotal()(*int32) { + return m.total +} +// GetWeek gets the week property value. The week property +// returns a *int32 when successful +func (m *CommitActivity) GetWeek()(*int32) { + return m.week +} +// Serialize serializes information the current object +func (m *CommitActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDays() != nil { + err := writer.WriteCollectionOfInt32Values("days", m.GetDays()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("week", m.GetWeek()) + 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 *CommitActivity) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDays sets the days property value. The days property +func (m *CommitActivity) SetDays(value []int32)() { + m.days = value +} +// SetTotal sets the total property value. The total property +func (m *CommitActivity) SetTotal(value *int32)() { + m.total = value +} +// SetWeek sets the week property value. The week property +func (m *CommitActivity) SetWeek(value *int32)() { + m.week = value +} +type CommitActivityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDays()([]int32) + GetTotal()(*int32) + GetWeek()(*int32) + SetDays(value []int32)() + SetTotal(value *int32)() + SetWeek(value *int32)() +} diff --git a/pkg/github/models/commit_comment.go b/pkg/github/models/commit_comment.go new file mode 100644 index 0000000..4342765 --- /dev/null +++ b/pkg/github/models/commit_comment.go @@ -0,0 +1,460 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommitComment commit Comment +type CommitComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // The body property + body *string + // The commit_id property + commit_id *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // The id property + id *int32 + // The line property + line *int32 + // The node_id property + node_id *string + // The path property + path *string + // The position property + position *int32 + // The reactions property + reactions ReactionRollupable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewCommitComment instantiates a new CommitComment and sets the default values. +func NewCommitComment()(*CommitComment) { + m := &CommitComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *CommitComment) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *CommitComment) GetBody()(*string) { + return m.body +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *CommitComment) GetCommitId()(*string) { + return m.commit_id +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *CommitComment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CommitComment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *CommitComment) GetId()(*int32) { + return m.id +} +// GetLine gets the line property value. The line property +// returns a *int32 when successful +func (m *CommitComment) GetLine()(*int32) { + return m.line +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *CommitComment) GetNodeId()(*string) { + return m.node_id +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *CommitComment) GetPath()(*string) { + return m.path +} +// GetPosition gets the position property value. The position property +// returns a *int32 when successful +func (m *CommitComment) GetPosition()(*int32) { + return m.position +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *CommitComment) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CommitComment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CommitComment) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CommitComment) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *CommitComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *CommitComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *CommitComment) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The body property +func (m *CommitComment) SetBody(value *string)() { + m.body = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *CommitComment) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *CommitComment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CommitComment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *CommitComment) SetId(value *int32)() { + m.id = value +} +// SetLine sets the line property value. The line property +func (m *CommitComment) SetLine(value *int32)() { + m.line = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *CommitComment) SetNodeId(value *string)() { + m.node_id = value +} +// SetPath sets the path property value. The path property +func (m *CommitComment) SetPath(value *string)() { + m.path = value +} +// SetPosition sets the position property value. The position property +func (m *CommitComment) SetPosition(value *int32)() { + m.position = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *CommitComment) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CommitComment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *CommitComment) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *CommitComment) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type CommitCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetCommitId()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLine()(*int32) + GetNodeId()(*string) + GetPath()(*string) + GetPosition()(*int32) + GetReactions()(ReactionRollupable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetCommitId(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLine(value *int32)() + SetNodeId(value *string)() + SetPath(value *string)() + SetPosition(value *int32)() + SetReactions(value ReactionRollupable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/commit_commit.go b/pkg/github/models/commit_commit.go new file mode 100644 index 0000000..0ce6d82 --- /dev/null +++ b/pkg/github/models/commit_commit.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commit_commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Metaproperties for Git author/committer information. + author NullableGitUserable + // The comment_count property + comment_count *int32 + // Metaproperties for Git author/committer information. + committer NullableGitUserable + // The message property + message *string + // The tree property + tree Commit_commit_treeable + // The url property + url *string + // The verification property + verification Verificationable +} +// NewCommit_commit instantiates a new Commit_commit and sets the default values. +func NewCommit_commit()(*Commit_commit) { + m := &Commit_commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommit_commitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit_commitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommit_commit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commit_commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. Metaproperties for Git author/committer information. +// returns a NullableGitUserable when successful +func (m *Commit_commit) GetAuthor()(NullableGitUserable) { + return m.author +} +// GetCommentCount gets the comment_count property value. The comment_count property +// returns a *int32 when successful +func (m *Commit_commit) GetCommentCount()(*int32) { + return m.comment_count +} +// GetCommitter gets the committer property value. Metaproperties for Git author/committer information. +// returns a NullableGitUserable when successful +func (m *Commit_commit) GetCommitter()(NullableGitUserable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit_commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableGitUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(NullableGitUserable)) + } + return nil + } + res["comment_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommentCount(val) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableGitUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(NullableGitUserable)) + } + 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 + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommit_commit_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTree(val.(Commit_commit_treeable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerification(val.(Verificationable)) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Commit_commit) GetMessage()(*string) { + return m.message +} +// GetTree gets the tree property value. The tree property +// returns a Commit_commit_treeable when successful +func (m *Commit_commit) GetTree()(Commit_commit_treeable) { + return m.tree +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Commit_commit) GetUrl()(*string) { + return m.url +} +// GetVerification gets the verification property value. The verification property +// returns a Verificationable when successful +func (m *Commit_commit) GetVerification()(Verificationable) { + return m.verification +} +// Serialize serializes information the current object +func (m *Commit_commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comment_count", m.GetCommentCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tree", m.GetTree()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verification", m.GetVerification()) + 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 *Commit_commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. Metaproperties for Git author/committer information. +func (m *Commit_commit) SetAuthor(value NullableGitUserable)() { + m.author = value +} +// SetCommentCount sets the comment_count property value. The comment_count property +func (m *Commit_commit) SetCommentCount(value *int32)() { + m.comment_count = value +} +// SetCommitter sets the committer property value. Metaproperties for Git author/committer information. +func (m *Commit_commit) SetCommitter(value NullableGitUserable)() { + m.committer = value +} +// SetMessage sets the message property value. The message property +func (m *Commit_commit) SetMessage(value *string)() { + m.message = value +} +// SetTree sets the tree property value. The tree property +func (m *Commit_commit) SetTree(value Commit_commit_treeable)() { + m.tree = value +} +// SetUrl sets the url property value. The url property +func (m *Commit_commit) SetUrl(value *string)() { + m.url = value +} +// SetVerification sets the verification property value. The verification property +func (m *Commit_commit) SetVerification(value Verificationable)() { + m.verification = value +} +type Commit_commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(NullableGitUserable) + GetCommentCount()(*int32) + GetCommitter()(NullableGitUserable) + GetMessage()(*string) + GetTree()(Commit_commit_treeable) + GetUrl()(*string) + GetVerification()(Verificationable) + SetAuthor(value NullableGitUserable)() + SetCommentCount(value *int32)() + SetCommitter(value NullableGitUserable)() + SetMessage(value *string)() + SetTree(value Commit_commit_treeable)() + SetUrl(value *string)() + SetVerification(value Verificationable)() +} diff --git a/pkg/github/models/commit_commit_tree.go b/pkg/github/models/commit_commit_tree.go new file mode 100644 index 0000000..9620aa8 --- /dev/null +++ b/pkg/github/models/commit_commit_tree.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commit_commit_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewCommit_commit_tree instantiates a new Commit_commit_tree and sets the default values. +func NewCommit_commit_tree()(*Commit_commit_tree) { + m := &Commit_commit_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommit_commit_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit_commit_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommit_commit_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commit_commit_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit_commit_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Commit_commit_tree) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Commit_commit_tree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Commit_commit_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Commit_commit_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *Commit_commit_tree) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *Commit_commit_tree) SetUrl(value *string)() { + m.url = value +} +type Commit_commit_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit_comparison.go b/pkg/github/models/commit_comparison.go new file mode 100644 index 0000000..6b2a9f7 --- /dev/null +++ b/pkg/github/models/commit_comparison.go @@ -0,0 +1,454 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommitComparison commit Comparison +type CommitComparison struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ahead_by property + ahead_by *int32 + // Commit + base_commit Commitable + // The behind_by property + behind_by *int32 + // The commits property + commits []Commitable + // The diff_url property + diff_url *string + // The files property + files []DiffEntryable + // The html_url property + html_url *string + // Commit + merge_base_commit Commitable + // The patch_url property + patch_url *string + // The permalink_url property + permalink_url *string + // The status property + status *CommitComparison_status + // The total_commits property + total_commits *int32 + // The url property + url *string +} +// NewCommitComparison instantiates a new CommitComparison and sets the default values. +func NewCommitComparison()(*CommitComparison) { + m := &CommitComparison{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitComparisonFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitComparisonFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitComparison(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitComparison) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAheadBy gets the ahead_by property value. The ahead_by property +// returns a *int32 when successful +func (m *CommitComparison) GetAheadBy()(*int32) { + return m.ahead_by +} +// GetBaseCommit gets the base_commit property value. Commit +// returns a Commitable when successful +func (m *CommitComparison) GetBaseCommit()(Commitable) { + return m.base_commit +} +// GetBehindBy gets the behind_by property value. The behind_by property +// returns a *int32 when successful +func (m *CommitComparison) GetBehindBy()(*int32) { + return m.behind_by +} +// GetCommits gets the commits property value. The commits property +// returns a []Commitable when successful +func (m *CommitComparison) GetCommits()([]Commitable) { + return m.commits +} +// GetDiffUrl gets the diff_url property value. The diff_url property +// returns a *string when successful +func (m *CommitComparison) GetDiffUrl()(*string) { + return m.diff_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitComparison) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ahead_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAheadBy(val) + } + return nil + } + res["base_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBaseCommit(val.(Commitable)) + } + return nil + } + res["behind_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBehindBy(val) + } + return nil + } + res["commits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Commitable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Commitable) + } + } + m.SetCommits(res) + } + return nil + } + res["diff_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffUrl(val) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDiffEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DiffEntryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DiffEntryable) + } + } + m.SetFiles(res) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["merge_base_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMergeBaseCommit(val.(Commitable)) + } + return nil + } + res["patch_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchUrl(val) + } + return nil + } + res["permalink_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermalinkUrl(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCommitComparison_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CommitComparison_status)) + } + return nil + } + res["total_commits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCommits(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFiles gets the files property value. The files property +// returns a []DiffEntryable when successful +func (m *CommitComparison) GetFiles()([]DiffEntryable) { + return m.files +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CommitComparison) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMergeBaseCommit gets the merge_base_commit property value. Commit +// returns a Commitable when successful +func (m *CommitComparison) GetMergeBaseCommit()(Commitable) { + return m.merge_base_commit +} +// GetPatchUrl gets the patch_url property value. The patch_url property +// returns a *string when successful +func (m *CommitComparison) GetPatchUrl()(*string) { + return m.patch_url +} +// GetPermalinkUrl gets the permalink_url property value. The permalink_url property +// returns a *string when successful +func (m *CommitComparison) GetPermalinkUrl()(*string) { + return m.permalink_url +} +// GetStatus gets the status property value. The status property +// returns a *CommitComparison_status when successful +func (m *CommitComparison) GetStatus()(*CommitComparison_status) { + return m.status +} +// GetTotalCommits gets the total_commits property value. The total_commits property +// returns a *int32 when successful +func (m *CommitComparison) GetTotalCommits()(*int32) { + return m.total_commits +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CommitComparison) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CommitComparison) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("ahead_by", m.GetAheadBy()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("base_commit", m.GetBaseCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("behind_by", m.GetBehindBy()) + if err != nil { + return err + } + } + if m.GetCommits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCommits())) + for i, v := range m.GetCommits() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("commits", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("diff_url", m.GetDiffUrl()) + if err != nil { + return err + } + } + if m.GetFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFiles())) + for i, v := range m.GetFiles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("files", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("merge_base_commit", m.GetMergeBaseCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch_url", m.GetPatchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permalink_url", m.GetPermalinkUrl()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_commits", m.GetTotalCommits()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CommitComparison) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAheadBy sets the ahead_by property value. The ahead_by property +func (m *CommitComparison) SetAheadBy(value *int32)() { + m.ahead_by = value +} +// SetBaseCommit sets the base_commit property value. Commit +func (m *CommitComparison) SetBaseCommit(value Commitable)() { + m.base_commit = value +} +// SetBehindBy sets the behind_by property value. The behind_by property +func (m *CommitComparison) SetBehindBy(value *int32)() { + m.behind_by = value +} +// SetCommits sets the commits property value. The commits property +func (m *CommitComparison) SetCommits(value []Commitable)() { + m.commits = value +} +// SetDiffUrl sets the diff_url property value. The diff_url property +func (m *CommitComparison) SetDiffUrl(value *string)() { + m.diff_url = value +} +// SetFiles sets the files property value. The files property +func (m *CommitComparison) SetFiles(value []DiffEntryable)() { + m.files = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CommitComparison) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMergeBaseCommit sets the merge_base_commit property value. Commit +func (m *CommitComparison) SetMergeBaseCommit(value Commitable)() { + m.merge_base_commit = value +} +// SetPatchUrl sets the patch_url property value. The patch_url property +func (m *CommitComparison) SetPatchUrl(value *string)() { + m.patch_url = value +} +// SetPermalinkUrl sets the permalink_url property value. The permalink_url property +func (m *CommitComparison) SetPermalinkUrl(value *string)() { + m.permalink_url = value +} +// SetStatus sets the status property value. The status property +func (m *CommitComparison) SetStatus(value *CommitComparison_status)() { + m.status = value +} +// SetTotalCommits sets the total_commits property value. The total_commits property +func (m *CommitComparison) SetTotalCommits(value *int32)() { + m.total_commits = value +} +// SetUrl sets the url property value. The url property +func (m *CommitComparison) SetUrl(value *string)() { + m.url = value +} +type CommitComparisonable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAheadBy()(*int32) + GetBaseCommit()(Commitable) + GetBehindBy()(*int32) + GetCommits()([]Commitable) + GetDiffUrl()(*string) + GetFiles()([]DiffEntryable) + GetHtmlUrl()(*string) + GetMergeBaseCommit()(Commitable) + GetPatchUrl()(*string) + GetPermalinkUrl()(*string) + GetStatus()(*CommitComparison_status) + GetTotalCommits()(*int32) + GetUrl()(*string) + SetAheadBy(value *int32)() + SetBaseCommit(value Commitable)() + SetBehindBy(value *int32)() + SetCommits(value []Commitable)() + SetDiffUrl(value *string)() + SetFiles(value []DiffEntryable)() + SetHtmlUrl(value *string)() + SetMergeBaseCommit(value Commitable)() + SetPatchUrl(value *string)() + SetPermalinkUrl(value *string)() + SetStatus(value *CommitComparison_status)() + SetTotalCommits(value *int32)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit_comparison503_error.go b/pkg/github/models/commit_comparison503_error.go new file mode 100644 index 0000000..cd2f837 --- /dev/null +++ b/pkg/github/models/commit_comparison503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CommitComparison503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCommitComparison503Error instantiates a new CommitComparison503Error and sets the default values. +func NewCommitComparison503Error()(*CommitComparison503Error) { + m := &CommitComparison503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitComparison503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitComparison503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitComparison503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CommitComparison503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitComparison503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CommitComparison503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CommitComparison503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitComparison503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CommitComparison503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CommitComparison503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CommitComparison503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CommitComparison503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CommitComparison503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CommitComparison503Error) SetMessage(value *string)() { + m.message = value +} +type CommitComparison503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/commit_comparison_status.go b/pkg/github/models/commit_comparison_status.go new file mode 100644 index 0000000..e67c8e0 --- /dev/null +++ b/pkg/github/models/commit_comparison_status.go @@ -0,0 +1,42 @@ +package models +import ( + "errors" +) +type CommitComparison_status int + +const ( + DIVERGED_COMMITCOMPARISON_STATUS CommitComparison_status = iota + AHEAD_COMMITCOMPARISON_STATUS + BEHIND_COMMITCOMPARISON_STATUS + IDENTICAL_COMMITCOMPARISON_STATUS +) + +func (i CommitComparison_status) String() string { + return []string{"diverged", "ahead", "behind", "identical"}[i] +} +func ParseCommitComparison_status(v string) (any, error) { + result := DIVERGED_COMMITCOMPARISON_STATUS + switch v { + case "diverged": + result = DIVERGED_COMMITCOMPARISON_STATUS + case "ahead": + result = AHEAD_COMMITCOMPARISON_STATUS + case "behind": + result = BEHIND_COMMITCOMPARISON_STATUS + case "identical": + result = IDENTICAL_COMMITCOMPARISON_STATUS + default: + return 0, errors.New("Unknown CommitComparison_status value: " + v) + } + return &result, nil +} +func SerializeCommitComparison_status(values []CommitComparison_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CommitComparison_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/commit_parents.go b/pkg/github/models/commit_parents.go new file mode 100644 index 0000000..5c2fa42 --- /dev/null +++ b/pkg/github/models/commit_parents.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commit_parents struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The sha property + sha *string + // The url property + url *string +} +// NewCommit_parents instantiates a new Commit_parents and sets the default values. +func NewCommit_parents()(*Commit_parents) { + m := &Commit_parents{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommit_parentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit_parentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommit_parents(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commit_parents) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit_parents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Commit_parents) GetHtmlUrl()(*string) { + return m.html_url +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Commit_parents) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Commit_parents) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Commit_parents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Commit_parents) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Commit_parents) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetSha sets the sha property value. The sha property +func (m *Commit_parents) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *Commit_parents) SetUrl(value *string)() { + m.url = value +} +type Commit_parentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetSha()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit_search_result_item.go b/pkg/github/models/commit_search_result_item.go new file mode 100644 index 0000000..0838814 --- /dev/null +++ b/pkg/github/models/commit_search_result_item.go @@ -0,0 +1,424 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommitSearchResultItem commit Search Result Item +type CommitSearchResultItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + author NullableSimpleUserable + // The comments_url property + comments_url *string + // The commit property + commit CommitSearchResultItem_commitable + // Metaproperties for Git author/committer information. + committer NullableGitUserable + // The html_url property + html_url *string + // The node_id property + node_id *string + // The parents property + parents []CommitSearchResultItem_parentsable + // Minimal Repository + repository MinimalRepositoryable + // The score property + score *float64 + // The sha property + sha *string + // The text_matches property + text_matches []Commitsable + // The url property + url *string +} +// NewCommitSearchResultItem instantiates a new CommitSearchResultItem and sets the default values. +func NewCommitSearchResultItem()(*CommitSearchResultItem) { + m := &CommitSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitSearchResultItem(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CommitSearchResultItem) GetAuthor()(NullableSimpleUserable) { + return m.author +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *CommitSearchResultItem) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommit gets the commit property value. The commit property +// returns a CommitSearchResultItem_commitable when successful +func (m *CommitSearchResultItem) GetCommit()(CommitSearchResultItem_commitable) { + return m.commit +} +// GetCommitter gets the committer property value. Metaproperties for Git author/committer information. +// returns a NullableGitUserable when successful +func (m *CommitSearchResultItem) GetCommitter()(NullableGitUserable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(NullableSimpleUserable)) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommitSearchResultItem_commitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(CommitSearchResultItem_commitable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableGitUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(NullableGitUserable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["parents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommitSearchResultItem_parentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CommitSearchResultItem_parentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CommitSearchResultItem_parentsable) + } + } + m.SetParents(res) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommitsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Commitsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Commitsable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CommitSearchResultItem) GetHtmlUrl()(*string) { + return m.html_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *CommitSearchResultItem) GetNodeId()(*string) { + return m.node_id +} +// GetParents gets the parents property value. The parents property +// returns a []CommitSearchResultItem_parentsable when successful +func (m *CommitSearchResultItem) GetParents()([]CommitSearchResultItem_parentsable) { + return m.parents +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *CommitSearchResultItem) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *CommitSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *CommitSearchResultItem) GetSha()(*string) { + return m.sha +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Commitsable when successful +func (m *CommitSearchResultItem) GetTextMatches()([]Commitsable) { + return m.text_matches +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CommitSearchResultItem) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CommitSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetParents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParents())) + for i, v := range m.GetParents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("parents", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CommitSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. A GitHub user. +func (m *CommitSearchResultItem) SetAuthor(value NullableSimpleUserable)() { + m.author = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *CommitSearchResultItem) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommit sets the commit property value. The commit property +func (m *CommitSearchResultItem) SetCommit(value CommitSearchResultItem_commitable)() { + m.commit = value +} +// SetCommitter sets the committer property value. Metaproperties for Git author/committer information. +func (m *CommitSearchResultItem) SetCommitter(value NullableGitUserable)() { + m.committer = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CommitSearchResultItem) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *CommitSearchResultItem) SetNodeId(value *string)() { + m.node_id = value +} +// SetParents sets the parents property value. The parents property +func (m *CommitSearchResultItem) SetParents(value []CommitSearchResultItem_parentsable)() { + m.parents = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *CommitSearchResultItem) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetScore sets the score property value. The score property +func (m *CommitSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetSha sets the sha property value. The sha property +func (m *CommitSearchResultItem) SetSha(value *string)() { + m.sha = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *CommitSearchResultItem) SetTextMatches(value []Commitsable)() { + m.text_matches = value +} +// SetUrl sets the url property value. The url property +func (m *CommitSearchResultItem) SetUrl(value *string)() { + m.url = value +} +type CommitSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(NullableSimpleUserable) + GetCommentsUrl()(*string) + GetCommit()(CommitSearchResultItem_commitable) + GetCommitter()(NullableGitUserable) + GetHtmlUrl()(*string) + GetNodeId()(*string) + GetParents()([]CommitSearchResultItem_parentsable) + GetRepository()(MinimalRepositoryable) + GetScore()(*float64) + GetSha()(*string) + GetTextMatches()([]Commitsable) + GetUrl()(*string) + SetAuthor(value NullableSimpleUserable)() + SetCommentsUrl(value *string)() + SetCommit(value CommitSearchResultItem_commitable)() + SetCommitter(value NullableGitUserable)() + SetHtmlUrl(value *string)() + SetNodeId(value *string)() + SetParents(value []CommitSearchResultItem_parentsable)() + SetRepository(value MinimalRepositoryable)() + SetScore(value *float64)() + SetSha(value *string)() + SetTextMatches(value []Commitsable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit_search_result_item_commit.go b/pkg/github/models/commit_search_result_item_commit.go new file mode 100644 index 0000000..d734c2b --- /dev/null +++ b/pkg/github/models/commit_search_result_item_commit.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CommitSearchResultItem_commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The author property + author CommitSearchResultItem_commit_authorable + // The comment_count property + comment_count *int32 + // Metaproperties for Git author/committer information. + committer NullableGitUserable + // The message property + message *string + // The tree property + tree CommitSearchResultItem_commit_treeable + // The url property + url *string + // The verification property + verification Verificationable +} +// NewCommitSearchResultItem_commit instantiates a new CommitSearchResultItem_commit and sets the default values. +func NewCommitSearchResultItem_commit()(*CommitSearchResultItem_commit) { + m := &CommitSearchResultItem_commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitSearchResultItem_commitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitSearchResultItem_commitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitSearchResultItem_commit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitSearchResultItem_commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. The author property +// returns a CommitSearchResultItem_commit_authorable when successful +func (m *CommitSearchResultItem_commit) GetAuthor()(CommitSearchResultItem_commit_authorable) { + return m.author +} +// GetCommentCount gets the comment_count property value. The comment_count property +// returns a *int32 when successful +func (m *CommitSearchResultItem_commit) GetCommentCount()(*int32) { + return m.comment_count +} +// GetCommitter gets the committer property value. Metaproperties for Git author/committer information. +// returns a NullableGitUserable when successful +func (m *CommitSearchResultItem_commit) GetCommitter()(NullableGitUserable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitSearchResultItem_commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommitSearchResultItem_commit_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(CommitSearchResultItem_commit_authorable)) + } + return nil + } + res["comment_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommentCount(val) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableGitUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(NullableGitUserable)) + } + 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 + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommitSearchResultItem_commit_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTree(val.(CommitSearchResultItem_commit_treeable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerification(val.(Verificationable)) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CommitSearchResultItem_commit) GetMessage()(*string) { + return m.message +} +// GetTree gets the tree property value. The tree property +// returns a CommitSearchResultItem_commit_treeable when successful +func (m *CommitSearchResultItem_commit) GetTree()(CommitSearchResultItem_commit_treeable) { + return m.tree +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CommitSearchResultItem_commit) GetUrl()(*string) { + return m.url +} +// GetVerification gets the verification property value. The verification property +// returns a Verificationable when successful +func (m *CommitSearchResultItem_commit) GetVerification()(Verificationable) { + return m.verification +} +// Serialize serializes information the current object +func (m *CommitSearchResultItem_commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comment_count", m.GetCommentCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tree", m.GetTree()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verification", m.GetVerification()) + 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 *CommitSearchResultItem_commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. The author property +func (m *CommitSearchResultItem_commit) SetAuthor(value CommitSearchResultItem_commit_authorable)() { + m.author = value +} +// SetCommentCount sets the comment_count property value. The comment_count property +func (m *CommitSearchResultItem_commit) SetCommentCount(value *int32)() { + m.comment_count = value +} +// SetCommitter sets the committer property value. Metaproperties for Git author/committer information. +func (m *CommitSearchResultItem_commit) SetCommitter(value NullableGitUserable)() { + m.committer = value +} +// SetMessage sets the message property value. The message property +func (m *CommitSearchResultItem_commit) SetMessage(value *string)() { + m.message = value +} +// SetTree sets the tree property value. The tree property +func (m *CommitSearchResultItem_commit) SetTree(value CommitSearchResultItem_commit_treeable)() { + m.tree = value +} +// SetUrl sets the url property value. The url property +func (m *CommitSearchResultItem_commit) SetUrl(value *string)() { + m.url = value +} +// SetVerification sets the verification property value. The verification property +func (m *CommitSearchResultItem_commit) SetVerification(value Verificationable)() { + m.verification = value +} +type CommitSearchResultItem_commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(CommitSearchResultItem_commit_authorable) + GetCommentCount()(*int32) + GetCommitter()(NullableGitUserable) + GetMessage()(*string) + GetTree()(CommitSearchResultItem_commit_treeable) + GetUrl()(*string) + GetVerification()(Verificationable) + SetAuthor(value CommitSearchResultItem_commit_authorable)() + SetCommentCount(value *int32)() + SetCommitter(value NullableGitUserable)() + SetMessage(value *string)() + SetTree(value CommitSearchResultItem_commit_treeable)() + SetUrl(value *string)() + SetVerification(value Verificationable)() +} diff --git a/pkg/github/models/commit_search_result_item_commit_author.go b/pkg/github/models/commit_search_result_item_commit_author.go new file mode 100644 index 0000000..c6ee822 --- /dev/null +++ b/pkg/github/models/commit_search_result_item_commit_author.go @@ -0,0 +1,139 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CommitSearchResultItem_commit_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The email property + email *string + // The name property + name *string +} +// NewCommitSearchResultItem_commit_author instantiates a new CommitSearchResultItem_commit_author and sets the default values. +func NewCommitSearchResultItem_commit_author()(*CommitSearchResultItem_commit_author) { + m := &CommitSearchResultItem_commit_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitSearchResultItem_commit_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitSearchResultItem_commit_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitSearchResultItem_commit_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitSearchResultItem_commit_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *Time when successful +func (m *CommitSearchResultItem_commit_author) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *CommitSearchResultItem_commit_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitSearchResultItem_commit_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *CommitSearchResultItem_commit_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *CommitSearchResultItem_commit_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *CommitSearchResultItem_commit_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *CommitSearchResultItem_commit_author) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. The email property +func (m *CommitSearchResultItem_commit_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name property +func (m *CommitSearchResultItem_commit_author) SetName(value *string)() { + m.name = value +} +type CommitSearchResultItem_commit_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/commit_search_result_item_commit_tree.go b/pkg/github/models/commit_search_result_item_commit_tree.go new file mode 100644 index 0000000..4291d57 --- /dev/null +++ b/pkg/github/models/commit_search_result_item_commit_tree.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CommitSearchResultItem_commit_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewCommitSearchResultItem_commit_tree instantiates a new CommitSearchResultItem_commit_tree and sets the default values. +func NewCommitSearchResultItem_commit_tree()(*CommitSearchResultItem_commit_tree) { + m := &CommitSearchResultItem_commit_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitSearchResultItem_commit_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitSearchResultItem_commit_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitSearchResultItem_commit_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitSearchResultItem_commit_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitSearchResultItem_commit_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *CommitSearchResultItem_commit_tree) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CommitSearchResultItem_commit_tree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CommitSearchResultItem_commit_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CommitSearchResultItem_commit_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *CommitSearchResultItem_commit_tree) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *CommitSearchResultItem_commit_tree) SetUrl(value *string)() { + m.url = value +} +type CommitSearchResultItem_commit_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit_search_result_item_parents.go b/pkg/github/models/commit_search_result_item_parents.go new file mode 100644 index 0000000..f323c79 --- /dev/null +++ b/pkg/github/models/commit_search_result_item_parents.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CommitSearchResultItem_parents struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The sha property + sha *string + // The url property + url *string +} +// NewCommitSearchResultItem_parents instantiates a new CommitSearchResultItem_parents and sets the default values. +func NewCommitSearchResultItem_parents()(*CommitSearchResultItem_parents) { + m := &CommitSearchResultItem_parents{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitSearchResultItem_parentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitSearchResultItem_parentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitSearchResultItem_parents(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitSearchResultItem_parents) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitSearchResultItem_parents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *CommitSearchResultItem_parents) GetHtmlUrl()(*string) { + return m.html_url +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *CommitSearchResultItem_parents) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *CommitSearchResultItem_parents) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CommitSearchResultItem_parents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CommitSearchResultItem_parents) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *CommitSearchResultItem_parents) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetSha sets the sha property value. The sha property +func (m *CommitSearchResultItem_parents) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *CommitSearchResultItem_parents) SetUrl(value *string)() { + m.url = value +} +type CommitSearchResultItem_parentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetSha()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/commit_stats.go b/pkg/github/models/commit_stats.go new file mode 100644 index 0000000..2105df6 --- /dev/null +++ b/pkg/github/models/commit_stats.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commit_stats struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The additions property + additions *int32 + // The deletions property + deletions *int32 + // The total property + total *int32 +} +// NewCommit_stats instantiates a new Commit_stats and sets the default values. +func NewCommit_stats()(*Commit_stats) { + m := &Commit_stats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommit_statsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommit_statsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommit_stats(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commit_stats) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdditions gets the additions property value. The additions property +// returns a *int32 when successful +func (m *Commit_stats) GetAdditions()(*int32) { + return m.additions +} +// GetDeletions gets the deletions property value. The deletions property +// returns a *int32 when successful +func (m *Commit_stats) GetDeletions()(*int32) { + return m.deletions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commit_stats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdditions(val) + } + return nil + } + res["deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeletions(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *Commit_stats) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *Commit_stats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("additions", m.GetAdditions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deletions", m.GetDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Commit_stats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdditions sets the additions property value. The additions property +func (m *Commit_stats) SetAdditions(value *int32)() { + m.additions = value +} +// SetDeletions sets the deletions property value. The deletions property +func (m *Commit_stats) SetDeletions(value *int32)() { + m.deletions = value +} +// SetTotal sets the total property value. The total property +func (m *Commit_stats) SetTotal(value *int32)() { + m.total = value +} +type Commit_statsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditions()(*int32) + GetDeletions()(*int32) + GetTotal()(*int32) + SetAdditions(value *int32)() + SetDeletions(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/commits.go b/pkg/github/models/commits.go new file mode 100644 index 0000000..9cf7039 --- /dev/null +++ b/pkg/github/models/commits.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commits struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fragment property + fragment *string + // The matches property + matches []Commits_matchesable + // The object_type property + object_type *string + // The object_url property + object_url *string + // The property property + property *string +} +// NewCommits instantiates a new Commits and sets the default values. +func NewCommits()(*Commits) { + m := &Commits{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommits(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commits) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commits) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFragment(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommits_matchesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Commits_matchesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Commits_matchesable) + } + } + m.SetMatches(res) + } + return nil + } + res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectUrl(val) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + return res +} +// GetFragment gets the fragment property value. The fragment property +// returns a *string when successful +func (m *Commits) GetFragment()(*string) { + return m.fragment +} +// GetMatches gets the matches property value. The matches property +// returns a []Commits_matchesable when successful +func (m *Commits) GetMatches()([]Commits_matchesable) { + return m.matches +} +// GetObjectType gets the object_type property value. The object_type property +// returns a *string when successful +func (m *Commits) GetObjectType()(*string) { + return m.object_type +} +// GetObjectUrl gets the object_url property value. The object_url property +// returns a *string when successful +func (m *Commits) GetObjectUrl()(*string) { + return m.object_url +} +// GetProperty gets the property property value. The property property +// returns a *string when successful +func (m *Commits) GetProperty()(*string) { + return m.property +} +// Serialize serializes information the current object +func (m *Commits) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fragment", m.GetFragment()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_type", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + 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 *Commits) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFragment sets the fragment property value. The fragment property +func (m *Commits) SetFragment(value *string)() { + m.fragment = value +} +// SetMatches sets the matches property value. The matches property +func (m *Commits) SetMatches(value []Commits_matchesable)() { + m.matches = value +} +// SetObjectType sets the object_type property value. The object_type property +func (m *Commits) SetObjectType(value *string)() { + m.object_type = value +} +// SetObjectUrl sets the object_url property value. The object_url property +func (m *Commits) SetObjectUrl(value *string)() { + m.object_url = value +} +// SetProperty sets the property property value. The property property +func (m *Commits) SetProperty(value *string)() { + m.property = value +} +type Commitsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFragment()(*string) + GetMatches()([]Commits_matchesable) + GetObjectType()(*string) + GetObjectUrl()(*string) + GetProperty()(*string) + SetFragment(value *string)() + SetMatches(value []Commits_matchesable)() + SetObjectType(value *string)() + SetObjectUrl(value *string)() + SetProperty(value *string)() +} diff --git a/pkg/github/models/commits_matches.go b/pkg/github/models/commits_matches.go new file mode 100644 index 0000000..95e3a8d --- /dev/null +++ b/pkg/github/models/commits_matches.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Commits_matches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The indices property + indices []int32 + // The text property + text *string +} +// NewCommits_matches instantiates a new Commits_matches and sets the default values. +func NewCommits_matches()(*Commits_matches) { + m := &Commits_matches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommits_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommits_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommits_matches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Commits_matches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Commits_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetIndices(res) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetIndices gets the indices property value. The indices property +// returns a []int32 when successful +func (m *Commits_matches) GetIndices()([]int32) { + return m.indices +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *Commits_matches) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *Commits_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIndices() != nil { + err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Commits_matches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIndices sets the indices property value. The indices property +func (m *Commits_matches) SetIndices(value []int32)() { + m.indices = value +} +// SetText sets the text property value. The text property +func (m *Commits_matches) SetText(value *string)() { + m.text = value +} +type Commits_matchesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndices()([]int32) + GetText()(*string) + SetIndices(value []int32)() + SetText(value *string)() +} diff --git a/pkg/github/models/community_profile.go b/pkg/github/models/community_profile.go new file mode 100644 index 0000000..0010059 --- /dev/null +++ b/pkg/github/models/community_profile.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunityProfile community Profile +type CommunityProfile struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The content_reports_enabled property + content_reports_enabled *bool + // The description property + description *string + // The documentation property + documentation *string + // The files property + files CommunityProfile_filesable + // The health_percentage property + health_percentage *int32 + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCommunityProfile instantiates a new CommunityProfile and sets the default values. +func NewCommunityProfile()(*CommunityProfile) { + m := &CommunityProfile{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommunityProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommunityProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunityProfile(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommunityProfile) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentReportsEnabled gets the content_reports_enabled property value. The content_reports_enabled property +// returns a *bool when successful +func (m *CommunityProfile) GetContentReportsEnabled()(*bool) { + return m.content_reports_enabled +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *CommunityProfile) GetDescription()(*string) { + return m.description +} +// GetDocumentation gets the documentation property value. The documentation property +// returns a *string when successful +func (m *CommunityProfile) GetDocumentation()(*string) { + return m.documentation +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommunityProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_reports_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentReportsEnabled(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["documentation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentation(val) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommunityProfile_filesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFiles(val.(CommunityProfile_filesable)) + } + return nil + } + res["health_percentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHealthPercentage(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetFiles gets the files property value. The files property +// returns a CommunityProfile_filesable when successful +func (m *CommunityProfile) GetFiles()(CommunityProfile_filesable) { + return m.files +} +// GetHealthPercentage gets the health_percentage property value. The health_percentage property +// returns a *int32 when successful +func (m *CommunityProfile) GetHealthPercentage()(*int32) { + return m.health_percentage +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CommunityProfile) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CommunityProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("content_reports_enabled", m.GetContentReportsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation", m.GetDocumentation()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("files", m.GetFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("health_percentage", m.GetHealthPercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CommunityProfile) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentReportsEnabled sets the content_reports_enabled property value. The content_reports_enabled property +func (m *CommunityProfile) SetContentReportsEnabled(value *bool)() { + m.content_reports_enabled = value +} +// SetDescription sets the description property value. The description property +func (m *CommunityProfile) SetDescription(value *string)() { + m.description = value +} +// SetDocumentation sets the documentation property value. The documentation property +func (m *CommunityProfile) SetDocumentation(value *string)() { + m.documentation = value +} +// SetFiles sets the files property value. The files property +func (m *CommunityProfile) SetFiles(value CommunityProfile_filesable)() { + m.files = value +} +// SetHealthPercentage sets the health_percentage property value. The health_percentage property +func (m *CommunityProfile) SetHealthPercentage(value *int32)() { + m.health_percentage = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CommunityProfile) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CommunityProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentReportsEnabled()(*bool) + GetDescription()(*string) + GetDocumentation()(*string) + GetFiles()(CommunityProfile_filesable) + GetHealthPercentage()(*int32) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetContentReportsEnabled(value *bool)() + SetDescription(value *string)() + SetDocumentation(value *string)() + SetFiles(value CommunityProfile_filesable)() + SetHealthPercentage(value *int32)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/community_profile_files.go b/pkg/github/models/community_profile_files.go new file mode 100644 index 0000000..ddd527d --- /dev/null +++ b/pkg/github/models/community_profile_files.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CommunityProfile_files struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Code of Conduct Simple + code_of_conduct NullableCodeOfConductSimpleable + // The code_of_conduct_file property + code_of_conduct_file NullableCommunityHealthFileable + // The contributing property + contributing NullableCommunityHealthFileable + // The issue_template property + issue_template NullableCommunityHealthFileable + // License Simple + license NullableLicenseSimpleable + // The pull_request_template property + pull_request_template NullableCommunityHealthFileable + // The readme property + readme NullableCommunityHealthFileable +} +// NewCommunityProfile_files instantiates a new CommunityProfile_files and sets the default values. +func NewCommunityProfile_files()(*CommunityProfile_files) { + m := &CommunityProfile_files{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommunityProfile_filesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommunityProfile_filesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunityProfile_files(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommunityProfile_files) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodeOfConduct gets the code_of_conduct property value. Code of Conduct Simple +// returns a NullableCodeOfConductSimpleable when successful +func (m *CommunityProfile_files) GetCodeOfConduct()(NullableCodeOfConductSimpleable) { + return m.code_of_conduct +} +// GetCodeOfConductFile gets the code_of_conduct_file property value. The code_of_conduct_file property +// returns a NullableCommunityHealthFileable when successful +func (m *CommunityProfile_files) GetCodeOfConductFile()(NullableCommunityHealthFileable) { + return m.code_of_conduct_file +} +// GetContributing gets the contributing property value. The contributing property +// returns a NullableCommunityHealthFileable when successful +func (m *CommunityProfile_files) GetContributing()(NullableCommunityHealthFileable) { + return m.contributing +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommunityProfile_files) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code_of_conduct"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCodeOfConductSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeOfConduct(val.(NullableCodeOfConductSimpleable)) + } + return nil + } + res["code_of_conduct_file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCommunityHealthFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeOfConductFile(val.(NullableCommunityHealthFileable)) + } + return nil + } + res["contributing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCommunityHealthFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContributing(val.(NullableCommunityHealthFileable)) + } + return nil + } + res["issue_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCommunityHealthFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssueTemplate(val.(NullableCommunityHealthFileable)) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["pull_request_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCommunityHealthFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequestTemplate(val.(NullableCommunityHealthFileable)) + } + return nil + } + res["readme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCommunityHealthFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReadme(val.(NullableCommunityHealthFileable)) + } + return nil + } + return res +} +// GetIssueTemplate gets the issue_template property value. The issue_template property +// returns a NullableCommunityHealthFileable when successful +func (m *CommunityProfile_files) GetIssueTemplate()(NullableCommunityHealthFileable) { + return m.issue_template +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *CommunityProfile_files) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetPullRequestTemplate gets the pull_request_template property value. The pull_request_template property +// returns a NullableCommunityHealthFileable when successful +func (m *CommunityProfile_files) GetPullRequestTemplate()(NullableCommunityHealthFileable) { + return m.pull_request_template +} +// GetReadme gets the readme property value. The readme property +// returns a NullableCommunityHealthFileable when successful +func (m *CommunityProfile_files) GetReadme()(NullableCommunityHealthFileable) { + return m.readme +} +// Serialize serializes information the current object +func (m *CommunityProfile_files) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("code_of_conduct", m.GetCodeOfConduct()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("code_of_conduct_file", m.GetCodeOfConductFile()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("contributing", m.GetContributing()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("issue_template", m.GetIssueTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request_template", m.GetPullRequestTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("readme", m.GetReadme()) + 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 *CommunityProfile_files) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodeOfConduct sets the code_of_conduct property value. Code of Conduct Simple +func (m *CommunityProfile_files) SetCodeOfConduct(value NullableCodeOfConductSimpleable)() { + m.code_of_conduct = value +} +// SetCodeOfConductFile sets the code_of_conduct_file property value. The code_of_conduct_file property +func (m *CommunityProfile_files) SetCodeOfConductFile(value NullableCommunityHealthFileable)() { + m.code_of_conduct_file = value +} +// SetContributing sets the contributing property value. The contributing property +func (m *CommunityProfile_files) SetContributing(value NullableCommunityHealthFileable)() { + m.contributing = value +} +// SetIssueTemplate sets the issue_template property value. The issue_template property +func (m *CommunityProfile_files) SetIssueTemplate(value NullableCommunityHealthFileable)() { + m.issue_template = value +} +// SetLicense sets the license property value. License Simple +func (m *CommunityProfile_files) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetPullRequestTemplate sets the pull_request_template property value. The pull_request_template property +func (m *CommunityProfile_files) SetPullRequestTemplate(value NullableCommunityHealthFileable)() { + m.pull_request_template = value +} +// SetReadme sets the readme property value. The readme property +func (m *CommunityProfile_files) SetReadme(value NullableCommunityHealthFileable)() { + m.readme = value +} +type CommunityProfile_filesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodeOfConduct()(NullableCodeOfConductSimpleable) + GetCodeOfConductFile()(NullableCommunityHealthFileable) + GetContributing()(NullableCommunityHealthFileable) + GetIssueTemplate()(NullableCommunityHealthFileable) + GetLicense()(NullableLicenseSimpleable) + GetPullRequestTemplate()(NullableCommunityHealthFileable) + GetReadme()(NullableCommunityHealthFileable) + SetCodeOfConduct(value NullableCodeOfConductSimpleable)() + SetCodeOfConductFile(value NullableCommunityHealthFileable)() + SetContributing(value NullableCommunityHealthFileable)() + SetIssueTemplate(value NullableCommunityHealthFileable)() + SetLicense(value NullableLicenseSimpleable)() + SetPullRequestTemplate(value NullableCommunityHealthFileable)() + SetReadme(value NullableCommunityHealthFileable)() +} diff --git a/pkg/github/models/content_file.go b/pkg/github/models/content_file.go new file mode 100644 index 0000000..9a69043 --- /dev/null +++ b/pkg/github/models/content_file.go @@ -0,0 +1,459 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentFile content File +type ContentFile struct { + // The _links property + _links ContentFile__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The content property + content *string + // The download_url property + download_url *string + // The encoding property + encoding *string + // The git_url property + git_url *string + // The html_url property + html_url *string + // The name property + name *string + // The path property + path *string + // The sha property + sha *string + // The size property + size *int32 + // The submodule_git_url property + submodule_git_url *string + // The target property + target *string + // The type property + typeEscaped *ContentFile_type + // The url property + url *string +} +// NewContentFile instantiates a new ContentFile and sets the default values. +func NewContentFile()(*ContentFile) { + m := &ContentFile{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentFile(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentFile) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContent gets the content property value. The content property +// returns a *string when successful +func (m *ContentFile) GetContent()(*string) { + return m.content +} +// GetDownloadUrl gets the download_url property value. The download_url property +// returns a *string when successful +func (m *ContentFile) GetDownloadUrl()(*string) { + return m.download_url +} +// GetEncoding gets the encoding property value. The encoding property +// returns a *string when successful +func (m *ContentFile) GetEncoding()(*string) { + return m.encoding +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentFile__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(ContentFile__linksable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUrl(val) + } + return nil + } + res["encoding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncoding(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["submodule_git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmoduleGitUrl(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentFile_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*ContentFile_type)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *ContentFile) GetGitUrl()(*string) { + return m.git_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *ContentFile) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLinks gets the _links property value. The _links property +// returns a ContentFile__linksable when successful +func (m *ContentFile) GetLinks()(ContentFile__linksable) { + return m._links +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ContentFile) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ContentFile) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *ContentFile) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *ContentFile) GetSize()(*int32) { + return m.size +} +// GetSubmoduleGitUrl gets the submodule_git_url property value. The submodule_git_url property +// returns a *string when successful +func (m *ContentFile) GetSubmoduleGitUrl()(*string) { + return m.submodule_git_url +} +// GetTarget gets the target property value. The target property +// returns a *string when successful +func (m *ContentFile) GetTarget()(*string) { + return m.target +} +// GetTypeEscaped gets the type property value. The type property +// returns a *ContentFile_type when successful +func (m *ContentFile) GetTypeEscaped()(*ContentFile_type) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ContentFile) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ContentFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("download_url", m.GetDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("encoding", m.GetEncoding()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("submodule_git_url", m.GetSubmoduleGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *ContentFile) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContent sets the content property value. The content property +func (m *ContentFile) SetContent(value *string)() { + m.content = value +} +// SetDownloadUrl sets the download_url property value. The download_url property +func (m *ContentFile) SetDownloadUrl(value *string)() { + m.download_url = value +} +// SetEncoding sets the encoding property value. The encoding property +func (m *ContentFile) SetEncoding(value *string)() { + m.encoding = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *ContentFile) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *ContentFile) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLinks sets the _links property value. The _links property +func (m *ContentFile) SetLinks(value ContentFile__linksable)() { + m._links = value +} +// SetName sets the name property value. The name property +func (m *ContentFile) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *ContentFile) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The sha property +func (m *ContentFile) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *ContentFile) SetSize(value *int32)() { + m.size = value +} +// SetSubmoduleGitUrl sets the submodule_git_url property value. The submodule_git_url property +func (m *ContentFile) SetSubmoduleGitUrl(value *string)() { + m.submodule_git_url = value +} +// SetTarget sets the target property value. The target property +func (m *ContentFile) SetTarget(value *string)() { + m.target = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ContentFile) SetTypeEscaped(value *ContentFile_type)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *ContentFile) SetUrl(value *string)() { + m.url = value +} +type ContentFileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetDownloadUrl()(*string) + GetEncoding()(*string) + GetGitUrl()(*string) + GetHtmlUrl()(*string) + GetLinks()(ContentFile__linksable) + GetName()(*string) + GetPath()(*string) + GetSha()(*string) + GetSize()(*int32) + GetSubmoduleGitUrl()(*string) + GetTarget()(*string) + GetTypeEscaped()(*ContentFile_type) + GetUrl()(*string) + SetContent(value *string)() + SetDownloadUrl(value *string)() + SetEncoding(value *string)() + SetGitUrl(value *string)() + SetHtmlUrl(value *string)() + SetLinks(value ContentFile__linksable)() + SetName(value *string)() + SetPath(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetSubmoduleGitUrl(value *string)() + SetTarget(value *string)() + SetTypeEscaped(value *ContentFile_type)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/content_file__links.go b/pkg/github/models/content_file__links.go new file mode 100644 index 0000000..bb77d37 --- /dev/null +++ b/pkg/github/models/content_file__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ContentFile__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The git property + git *string + // The html property + html *string + // The self property + self *string +} +// NewContentFile__links instantiates a new ContentFile__links and sets the default values. +func NewContentFile__links()(*ContentFile__links) { + m := &ContentFile__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentFile__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentFile__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentFile__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentFile__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentFile__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["git"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGit(val) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtml(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetGit gets the git property value. The git property +// returns a *string when successful +func (m *ContentFile__links) GetGit()(*string) { + return m.git +} +// GetHtml gets the html property value. The html property +// returns a *string when successful +func (m *ContentFile__links) GetHtml()(*string) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *ContentFile__links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *ContentFile__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("git", m.GetGit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + 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 *ContentFile__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGit sets the git property value. The git property +func (m *ContentFile__links) SetGit(value *string)() { + m.git = value +} +// SetHtml sets the html property value. The html property +func (m *ContentFile__links) SetHtml(value *string)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *ContentFile__links) SetSelf(value *string)() { + m.self = value +} +type ContentFile__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGit()(*string) + GetHtml()(*string) + GetSelf()(*string) + SetGit(value *string)() + SetHtml(value *string)() + SetSelf(value *string)() +} diff --git a/pkg/github/models/content_file_type.go b/pkg/github/models/content_file_type.go new file mode 100644 index 0000000..2d06691 --- /dev/null +++ b/pkg/github/models/content_file_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type ContentFile_type int + +const ( + FILE_CONTENTFILE_TYPE ContentFile_type = iota +) + +func (i ContentFile_type) String() string { + return []string{"file"}[i] +} +func ParseContentFile_type(v string) (any, error) { + result := FILE_CONTENTFILE_TYPE + switch v { + case "file": + result = FILE_CONTENTFILE_TYPE + default: + return 0, errors.New("Unknown ContentFile_type value: " + v) + } + return &result, nil +} +func SerializeContentFile_type(values []ContentFile_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ContentFile_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/content_submodule.go b/pkg/github/models/content_submodule.go new file mode 100644 index 0000000..cb10541 --- /dev/null +++ b/pkg/github/models/content_submodule.go @@ -0,0 +1,372 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentSubmodule an object describing a submodule +type ContentSubmodule struct { + // The _links property + _links ContentSubmodule__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The download_url property + download_url *string + // The git_url property + git_url *string + // The html_url property + html_url *string + // The name property + name *string + // The path property + path *string + // The sha property + sha *string + // The size property + size *int32 + // The submodule_git_url property + submodule_git_url *string + // The type property + typeEscaped *ContentSubmodule_type + // The url property + url *string +} +// NewContentSubmodule instantiates a new ContentSubmodule and sets the default values. +func NewContentSubmodule()(*ContentSubmodule) { + m := &ContentSubmodule{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentSubmoduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentSubmoduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentSubmodule(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentSubmodule) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDownloadUrl gets the download_url property value. The download_url property +// returns a *string when successful +func (m *ContentSubmodule) GetDownloadUrl()(*string) { + return m.download_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentSubmodule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentSubmodule__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(ContentSubmodule__linksable)) + } + return nil + } + res["download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["submodule_git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmoduleGitUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentSubmodule_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*ContentSubmodule_type)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *ContentSubmodule) GetGitUrl()(*string) { + return m.git_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *ContentSubmodule) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLinks gets the _links property value. The _links property +// returns a ContentSubmodule__linksable when successful +func (m *ContentSubmodule) GetLinks()(ContentSubmodule__linksable) { + return m._links +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ContentSubmodule) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ContentSubmodule) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *ContentSubmodule) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *ContentSubmodule) GetSize()(*int32) { + return m.size +} +// GetSubmoduleGitUrl gets the submodule_git_url property value. The submodule_git_url property +// returns a *string when successful +func (m *ContentSubmodule) GetSubmoduleGitUrl()(*string) { + return m.submodule_git_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *ContentSubmodule_type when successful +func (m *ContentSubmodule) GetTypeEscaped()(*ContentSubmodule_type) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ContentSubmodule) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ContentSubmodule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("download_url", m.GetDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("submodule_git_url", m.GetSubmoduleGitUrl()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *ContentSubmodule) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDownloadUrl sets the download_url property value. The download_url property +func (m *ContentSubmodule) SetDownloadUrl(value *string)() { + m.download_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *ContentSubmodule) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *ContentSubmodule) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLinks sets the _links property value. The _links property +func (m *ContentSubmodule) SetLinks(value ContentSubmodule__linksable)() { + m._links = value +} +// SetName sets the name property value. The name property +func (m *ContentSubmodule) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *ContentSubmodule) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The sha property +func (m *ContentSubmodule) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *ContentSubmodule) SetSize(value *int32)() { + m.size = value +} +// SetSubmoduleGitUrl sets the submodule_git_url property value. The submodule_git_url property +func (m *ContentSubmodule) SetSubmoduleGitUrl(value *string)() { + m.submodule_git_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ContentSubmodule) SetTypeEscaped(value *ContentSubmodule_type)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *ContentSubmodule) SetUrl(value *string)() { + m.url = value +} +type ContentSubmoduleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDownloadUrl()(*string) + GetGitUrl()(*string) + GetHtmlUrl()(*string) + GetLinks()(ContentSubmodule__linksable) + GetName()(*string) + GetPath()(*string) + GetSha()(*string) + GetSize()(*int32) + GetSubmoduleGitUrl()(*string) + GetTypeEscaped()(*ContentSubmodule_type) + GetUrl()(*string) + SetDownloadUrl(value *string)() + SetGitUrl(value *string)() + SetHtmlUrl(value *string)() + SetLinks(value ContentSubmodule__linksable)() + SetName(value *string)() + SetPath(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetSubmoduleGitUrl(value *string)() + SetTypeEscaped(value *ContentSubmodule_type)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/content_submodule__links.go b/pkg/github/models/content_submodule__links.go new file mode 100644 index 0000000..bc48d47 --- /dev/null +++ b/pkg/github/models/content_submodule__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ContentSubmodule__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The git property + git *string + // The html property + html *string + // The self property + self *string +} +// NewContentSubmodule__links instantiates a new ContentSubmodule__links and sets the default values. +func NewContentSubmodule__links()(*ContentSubmodule__links) { + m := &ContentSubmodule__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentSubmodule__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentSubmodule__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentSubmodule__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentSubmodule__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentSubmodule__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["git"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGit(val) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtml(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetGit gets the git property value. The git property +// returns a *string when successful +func (m *ContentSubmodule__links) GetGit()(*string) { + return m.git +} +// GetHtml gets the html property value. The html property +// returns a *string when successful +func (m *ContentSubmodule__links) GetHtml()(*string) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *ContentSubmodule__links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *ContentSubmodule__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("git", m.GetGit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + 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 *ContentSubmodule__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGit sets the git property value. The git property +func (m *ContentSubmodule__links) SetGit(value *string)() { + m.git = value +} +// SetHtml sets the html property value. The html property +func (m *ContentSubmodule__links) SetHtml(value *string)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *ContentSubmodule__links) SetSelf(value *string)() { + m.self = value +} +type ContentSubmodule__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGit()(*string) + GetHtml()(*string) + GetSelf()(*string) + SetGit(value *string)() + SetHtml(value *string)() + SetSelf(value *string)() +} diff --git a/pkg/github/models/content_submodule_type.go b/pkg/github/models/content_submodule_type.go new file mode 100644 index 0000000..9e8ce3c --- /dev/null +++ b/pkg/github/models/content_submodule_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type ContentSubmodule_type int + +const ( + SUBMODULE_CONTENTSUBMODULE_TYPE ContentSubmodule_type = iota +) + +func (i ContentSubmodule_type) String() string { + return []string{"submodule"}[i] +} +func ParseContentSubmodule_type(v string) (any, error) { + result := SUBMODULE_CONTENTSUBMODULE_TYPE + switch v { + case "submodule": + result = SUBMODULE_CONTENTSUBMODULE_TYPE + default: + return 0, errors.New("Unknown ContentSubmodule_type value: " + v) + } + return &result, nil +} +func SerializeContentSubmodule_type(values []ContentSubmodule_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ContentSubmodule_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/content_symlink.go b/pkg/github/models/content_symlink.go new file mode 100644 index 0000000..48d3c21 --- /dev/null +++ b/pkg/github/models/content_symlink.go @@ -0,0 +1,372 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentSymlink an object describing a symlink +type ContentSymlink struct { + // The _links property + _links ContentSymlink__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The download_url property + download_url *string + // The git_url property + git_url *string + // The html_url property + html_url *string + // The name property + name *string + // The path property + path *string + // The sha property + sha *string + // The size property + size *int32 + // The target property + target *string + // The type property + typeEscaped *ContentSymlink_type + // The url property + url *string +} +// NewContentSymlink instantiates a new ContentSymlink and sets the default values. +func NewContentSymlink()(*ContentSymlink) { + m := &ContentSymlink{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentSymlinkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentSymlinkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentSymlink(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentSymlink) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDownloadUrl gets the download_url property value. The download_url property +// returns a *string when successful +func (m *ContentSymlink) GetDownloadUrl()(*string) { + return m.download_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentSymlink) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentSymlink__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(ContentSymlink__linksable)) + } + return nil + } + res["download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentSymlink_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*ContentSymlink_type)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *ContentSymlink) GetGitUrl()(*string) { + return m.git_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *ContentSymlink) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLinks gets the _links property value. The _links property +// returns a ContentSymlink__linksable when successful +func (m *ContentSymlink) GetLinks()(ContentSymlink__linksable) { + return m._links +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ContentSymlink) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ContentSymlink) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *ContentSymlink) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *ContentSymlink) GetSize()(*int32) { + return m.size +} +// GetTarget gets the target property value. The target property +// returns a *string when successful +func (m *ContentSymlink) GetTarget()(*string) { + return m.target +} +// GetTypeEscaped gets the type property value. The type property +// returns a *ContentSymlink_type when successful +func (m *ContentSymlink) GetTypeEscaped()(*ContentSymlink_type) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ContentSymlink) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ContentSymlink) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("download_url", m.GetDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *ContentSymlink) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDownloadUrl sets the download_url property value. The download_url property +func (m *ContentSymlink) SetDownloadUrl(value *string)() { + m.download_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *ContentSymlink) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *ContentSymlink) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLinks sets the _links property value. The _links property +func (m *ContentSymlink) SetLinks(value ContentSymlink__linksable)() { + m._links = value +} +// SetName sets the name property value. The name property +func (m *ContentSymlink) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *ContentSymlink) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The sha property +func (m *ContentSymlink) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *ContentSymlink) SetSize(value *int32)() { + m.size = value +} +// SetTarget sets the target property value. The target property +func (m *ContentSymlink) SetTarget(value *string)() { + m.target = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ContentSymlink) SetTypeEscaped(value *ContentSymlink_type)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *ContentSymlink) SetUrl(value *string)() { + m.url = value +} +type ContentSymlinkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDownloadUrl()(*string) + GetGitUrl()(*string) + GetHtmlUrl()(*string) + GetLinks()(ContentSymlink__linksable) + GetName()(*string) + GetPath()(*string) + GetSha()(*string) + GetSize()(*int32) + GetTarget()(*string) + GetTypeEscaped()(*ContentSymlink_type) + GetUrl()(*string) + SetDownloadUrl(value *string)() + SetGitUrl(value *string)() + SetHtmlUrl(value *string)() + SetLinks(value ContentSymlink__linksable)() + SetName(value *string)() + SetPath(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetTarget(value *string)() + SetTypeEscaped(value *ContentSymlink_type)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/content_symlink__links.go b/pkg/github/models/content_symlink__links.go new file mode 100644 index 0000000..14f012f --- /dev/null +++ b/pkg/github/models/content_symlink__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ContentSymlink__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The git property + git *string + // The html property + html *string + // The self property + self *string +} +// NewContentSymlink__links instantiates a new ContentSymlink__links and sets the default values. +func NewContentSymlink__links()(*ContentSymlink__links) { + m := &ContentSymlink__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentSymlink__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentSymlink__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentSymlink__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentSymlink__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentSymlink__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["git"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGit(val) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtml(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetGit gets the git property value. The git property +// returns a *string when successful +func (m *ContentSymlink__links) GetGit()(*string) { + return m.git +} +// GetHtml gets the html property value. The html property +// returns a *string when successful +func (m *ContentSymlink__links) GetHtml()(*string) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *ContentSymlink__links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *ContentSymlink__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("git", m.GetGit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + 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 *ContentSymlink__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGit sets the git property value. The git property +func (m *ContentSymlink__links) SetGit(value *string)() { + m.git = value +} +// SetHtml sets the html property value. The html property +func (m *ContentSymlink__links) SetHtml(value *string)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *ContentSymlink__links) SetSelf(value *string)() { + m.self = value +} +type ContentSymlink__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGit()(*string) + GetHtml()(*string) + GetSelf()(*string) + SetGit(value *string)() + SetHtml(value *string)() + SetSelf(value *string)() +} diff --git a/pkg/github/models/content_symlink_type.go b/pkg/github/models/content_symlink_type.go new file mode 100644 index 0000000..48973b3 --- /dev/null +++ b/pkg/github/models/content_symlink_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type ContentSymlink_type int + +const ( + SYMLINK_CONTENTSYMLINK_TYPE ContentSymlink_type = iota +) + +func (i ContentSymlink_type) String() string { + return []string{"symlink"}[i] +} +func ParseContentSymlink_type(v string) (any, error) { + result := SYMLINK_CONTENTSYMLINK_TYPE + switch v { + case "symlink": + result = SYMLINK_CONTENTSYMLINK_TYPE + default: + return 0, errors.New("Unknown ContentSymlink_type value: " + v) + } + return &result, nil +} +func SerializeContentSymlink_type(values []ContentSymlink_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ContentSymlink_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/content_traffic.go b/pkg/github/models/content_traffic.go new file mode 100644 index 0000000..5b78621 --- /dev/null +++ b/pkg/github/models/content_traffic.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTraffic content Traffic +type ContentTraffic struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The count property + count *int32 + // The path property + path *string + // The title property + title *string + // The uniques property + uniques *int32 +} +// NewContentTraffic instantiates a new ContentTraffic and sets the default values. +func NewContentTraffic()(*ContentTraffic) { + m := &ContentTraffic{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContentTrafficFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContentTrafficFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentTraffic(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContentTraffic) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCount gets the count property value. The count property +// returns a *int32 when successful +func (m *ContentTraffic) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContentTraffic) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["uniques"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniques(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ContentTraffic) GetPath()(*string) { + return m.path +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *ContentTraffic) GetTitle()(*string) { + return m.title +} +// GetUniques gets the uniques property value. The uniques property +// returns a *int32 when successful +func (m *ContentTraffic) GetUniques()(*int32) { + return m.uniques +} +// Serialize serializes information the current object +func (m *ContentTraffic) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniques", m.GetUniques()) + 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 *ContentTraffic) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCount sets the count property value. The count property +func (m *ContentTraffic) SetCount(value *int32)() { + m.count = value +} +// SetPath sets the path property value. The path property +func (m *ContentTraffic) SetPath(value *string)() { + m.path = value +} +// SetTitle sets the title property value. The title property +func (m *ContentTraffic) SetTitle(value *string)() { + m.title = value +} +// SetUniques sets the uniques property value. The uniques property +func (m *ContentTraffic) SetUniques(value *int32)() { + m.uniques = value +} +type ContentTrafficable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCount()(*int32) + GetPath()(*string) + GetTitle()(*string) + GetUniques()(*int32) + SetCount(value *int32)() + SetPath(value *string)() + SetTitle(value *string)() + SetUniques(value *int32)() +} diff --git a/pkg/github/models/contributor.go b/pkg/github/models/contributor.go new file mode 100644 index 0000000..08342ad --- /dev/null +++ b/pkg/github/models/contributor.go @@ -0,0 +1,661 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Contributor contributor +type Contributor struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The contributions property + contributions *int32 + // The email property + email *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int32 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewContributor instantiates a new Contributor and sets the default values. +func NewContributor()(*Contributor) { + m := &Contributor{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContributorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContributorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContributor(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Contributor) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *Contributor) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetContributions gets the contributions property value. The contributions property +// returns a *int32 when successful +func (m *Contributor) GetContributions()(*int32) { + return m.contributions +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *Contributor) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *Contributor) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Contributor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["contributions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetContributions(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *Contributor) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *Contributor) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *Contributor) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *Contributor) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Contributor) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Contributor) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *Contributor) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Contributor) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Contributor) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *Contributor) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *Contributor) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *Contributor) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *Contributor) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *Contributor) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *Contributor) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Contributor) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Contributor) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Contributor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("contributions", m.GetContributions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *Contributor) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *Contributor) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetContributions sets the contributions property value. The contributions property +func (m *Contributor) SetContributions(value *int32)() { + m.contributions = value +} +// SetEmail sets the email property value. The email property +func (m *Contributor) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *Contributor) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *Contributor) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *Contributor) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *Contributor) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *Contributor) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Contributor) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Contributor) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *Contributor) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *Contributor) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Contributor) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *Contributor) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *Contributor) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *Contributor) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *Contributor) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *Contributor) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *Contributor) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Contributor) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *Contributor) SetUrl(value *string)() { + m.url = value +} +type Contributorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetContributions()(*int32) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetContributions(value *int32)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/contributor_activity.go b/pkg/github/models/contributor_activity.go new file mode 100644 index 0000000..66abfa8 --- /dev/null +++ b/pkg/github/models/contributor_activity.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContributorActivity contributor Activity +type ContributorActivity struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + author NullableSimpleUserable + // The total property + total *int32 + // The weeks property + weeks []ContributorActivity_weeksable +} +// NewContributorActivity instantiates a new ContributorActivity and sets the default values. +func NewContributorActivity()(*ContributorActivity) { + m := &ContributorActivity{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContributorActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContributorActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContributorActivity(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContributorActivity) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *ContributorActivity) GetAuthor()(NullableSimpleUserable) { + return m.author +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContributorActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(NullableSimpleUserable)) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + res["weeks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContributorActivity_weeksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContributorActivity_weeksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ContributorActivity_weeksable) + } + } + m.SetWeeks(res) + } + return nil + } + return res +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *ContributorActivity) GetTotal()(*int32) { + return m.total +} +// GetWeeks gets the weeks property value. The weeks property +// returns a []ContributorActivity_weeksable when successful +func (m *ContributorActivity) GetWeeks()([]ContributorActivity_weeksable) { + return m.weeks +} +// Serialize serializes information the current object +func (m *ContributorActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + if m.GetWeeks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWeeks())) + for i, v := range m.GetWeeks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("weeks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ContributorActivity) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. A GitHub user. +func (m *ContributorActivity) SetAuthor(value NullableSimpleUserable)() { + m.author = value +} +// SetTotal sets the total property value. The total property +func (m *ContributorActivity) SetTotal(value *int32)() { + m.total = value +} +// SetWeeks sets the weeks property value. The weeks property +func (m *ContributorActivity) SetWeeks(value []ContributorActivity_weeksable)() { + m.weeks = value +} +type ContributorActivityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(NullableSimpleUserable) + GetTotal()(*int32) + GetWeeks()([]ContributorActivity_weeksable) + SetAuthor(value NullableSimpleUserable)() + SetTotal(value *int32)() + SetWeeks(value []ContributorActivity_weeksable)() +} diff --git a/pkg/github/models/contributor_activity_weeks.go b/pkg/github/models/contributor_activity_weeks.go new file mode 100644 index 0000000..8427f46 --- /dev/null +++ b/pkg/github/models/contributor_activity_weeks.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ContributorActivity_weeks struct { + // The a property + a *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The c property + c *int32 + // The d property + d *int32 + // The w property + w *int32 +} +// NewContributorActivity_weeks instantiates a new ContributorActivity_weeks and sets the default values. +func NewContributorActivity_weeks()(*ContributorActivity_weeks) { + m := &ContributorActivity_weeks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateContributorActivity_weeksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContributorActivity_weeksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContributorActivity_weeks(), nil +} +// GetA gets the a property value. The a property +// returns a *int32 when successful +func (m *ContributorActivity_weeks) GetA()(*int32) { + return m.a +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ContributorActivity_weeks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetC gets the c property value. The c property +// returns a *int32 when successful +func (m *ContributorActivity_weeks) GetC()(*int32) { + return m.c +} +// GetD gets the d property value. The d property +// returns a *int32 when successful +func (m *ContributorActivity_weeks) GetD()(*int32) { + return m.d +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContributorActivity_weeks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["a"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetA(val) + } + return nil + } + res["c"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetC(val) + } + return nil + } + res["d"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetD(val) + } + return nil + } + res["w"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetW(val) + } + return nil + } + return res +} +// GetW gets the w property value. The w property +// returns a *int32 when successful +func (m *ContributorActivity_weeks) GetW()(*int32) { + return m.w +} +// Serialize serializes information the current object +func (m *ContributorActivity_weeks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("a", m.GetA()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("c", m.GetC()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("d", m.GetD()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("w", m.GetW()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetA sets the a property value. The a property +func (m *ContributorActivity_weeks) SetA(value *int32)() { + m.a = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ContributorActivity_weeks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetC sets the c property value. The c property +func (m *ContributorActivity_weeks) SetC(value *int32)() { + m.c = value +} +// SetD sets the d property value. The d property +func (m *ContributorActivity_weeks) SetD(value *int32)() { + m.d = value +} +// SetW sets the w property value. The w property +func (m *ContributorActivity_weeks) SetW(value *int32)() { + m.w = value +} +type ContributorActivity_weeksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetA()(*int32) + GetC()(*int32) + GetD()(*int32) + GetW()(*int32) + SetA(value *int32)() + SetC(value *int32)() + SetD(value *int32)() + SetW(value *int32)() +} diff --git a/pkg/github/models/converted_note_to_issue_issue_event.go b/pkg/github/models/converted_note_to_issue_issue_event.go new file mode 100644 index 0000000..6a024bc --- /dev/null +++ b/pkg/github/models/converted_note_to_issue_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConvertedNoteToIssueIssueEvent converted Note to Issue Issue Event +type ConvertedNoteToIssueIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app Integrationable + // The project_card property + project_card ConvertedNoteToIssueIssueEvent_project_cardable + // The url property + url *string +} +// NewConvertedNoteToIssueIssueEvent instantiates a new ConvertedNoteToIssueIssueEvent and sets the default values. +func NewConvertedNoteToIssueIssueEvent()(*ConvertedNoteToIssueIssueEvent) { + m := &ConvertedNoteToIssueIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateConvertedNoteToIssueIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateConvertedNoteToIssueIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConvertedNoteToIssueIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ConvertedNoteToIssueIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ConvertedNoteToIssueIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ConvertedNoteToIssueIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(Integrationable)) + } + return nil + } + res["project_card"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConvertedNoteToIssueIssueEvent_project_cardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProjectCard(val.(ConvertedNoteToIssueIssueEvent_project_cardable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ConvertedNoteToIssueIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a Integrationable when successful +func (m *ConvertedNoteToIssueIssueEvent) GetPerformedViaGithubApp()(Integrationable) { + return m.performed_via_github_app +} +// GetProjectCard gets the project_card property value. The project_card property +// returns a ConvertedNoteToIssueIssueEvent_project_cardable when successful +func (m *ConvertedNoteToIssueIssueEvent) GetProjectCard()(ConvertedNoteToIssueIssueEvent_project_cardable) { + return m.project_card +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ConvertedNoteToIssueIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("project_card", m.GetProjectCard()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *ConvertedNoteToIssueIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ConvertedNoteToIssueIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *ConvertedNoteToIssueIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *ConvertedNoteToIssueIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ConvertedNoteToIssueIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *ConvertedNoteToIssueIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *ConvertedNoteToIssueIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ConvertedNoteToIssueIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *ConvertedNoteToIssueIssueEvent) SetPerformedViaGithubApp(value Integrationable)() { + m.performed_via_github_app = value +} +// SetProjectCard sets the project_card property value. The project_card property +func (m *ConvertedNoteToIssueIssueEvent) SetProjectCard(value ConvertedNoteToIssueIssueEvent_project_cardable)() { + m.project_card = value +} +// SetUrl sets the url property value. The url property +func (m *ConvertedNoteToIssueIssueEvent) SetUrl(value *string)() { + m.url = value +} +type ConvertedNoteToIssueIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(Integrationable) + GetProjectCard()(ConvertedNoteToIssueIssueEvent_project_cardable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value Integrationable)() + SetProjectCard(value ConvertedNoteToIssueIssueEvent_project_cardable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/converted_note_to_issue_issue_event_project_card.go b/pkg/github/models/converted_note_to_issue_issue_event_project_card.go new file mode 100644 index 0000000..2713ecf --- /dev/null +++ b/pkg/github/models/converted_note_to_issue_issue_event_project_card.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ConvertedNoteToIssueIssueEvent_project_card struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The column_name property + column_name *string + // The id property + id *int32 + // The previous_column_name property + previous_column_name *string + // The project_id property + project_id *int32 + // The project_url property + project_url *string + // The url property + url *string +} +// NewConvertedNoteToIssueIssueEvent_project_card instantiates a new ConvertedNoteToIssueIssueEvent_project_card and sets the default values. +func NewConvertedNoteToIssueIssueEvent_project_card()(*ConvertedNoteToIssueIssueEvent_project_card) { + m := &ConvertedNoteToIssueIssueEvent_project_card{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateConvertedNoteToIssueIssueEvent_project_cardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateConvertedNoteToIssueIssueEvent_project_cardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConvertedNoteToIssueIssueEvent_project_card(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumnName gets the column_name property value. The column_name property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetColumnName()(*string) { + return m.column_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["previous_column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousColumnName(val) + } + return nil + } + res["project_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProjectId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetId()(*int32) { + return m.id +} +// GetPreviousColumnName gets the previous_column_name property value. The previous_column_name property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetPreviousColumnName()(*string) { + return m.previous_column_name +} +// GetProjectId gets the project_id property value. The project_id property +// returns a *int32 when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetProjectId()(*int32) { + return m.project_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetProjectUrl()(*string) { + return m.project_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ConvertedNoteToIssueIssueEvent_project_card) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ConvertedNoteToIssueIssueEvent_project_card) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("column_name", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_column_name", m.GetPreviousColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("project_id", m.GetProjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumnName sets the column_name property value. The column_name property +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetColumnName(value *string)() { + m.column_name = value +} +// SetId sets the id property value. The id property +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetId(value *int32)() { + m.id = value +} +// SetPreviousColumnName sets the previous_column_name property value. The previous_column_name property +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetPreviousColumnName(value *string)() { + m.previous_column_name = value +} +// SetProjectId sets the project_id property value. The project_id property +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetProjectId(value *int32)() { + m.project_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUrl sets the url property value. The url property +func (m *ConvertedNoteToIssueIssueEvent_project_card) SetUrl(value *string)() { + m.url = value +} +type ConvertedNoteToIssueIssueEvent_project_cardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnName()(*string) + GetId()(*int32) + GetPreviousColumnName()(*string) + GetProjectId()(*int32) + GetProjectUrl()(*string) + GetUrl()(*string) + SetColumnName(value *string)() + SetId(value *int32)() + SetPreviousColumnName(value *string)() + SetProjectId(value *int32)() + SetProjectUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/copilot_organization_details.go b/pkg/github/models/copilot_organization_details.go new file mode 100644 index 0000000..1774e9e --- /dev/null +++ b/pkg/github/models/copilot_organization_details.go @@ -0,0 +1,231 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotOrganizationDetails information about the seat breakdown and policies set for an organization with a Copilot Business subscription. +type CopilotOrganizationDetails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + cli *CopilotOrganizationDetails_cli + // The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + ide_chat *CopilotOrganizationDetails_ide_chat + // The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + platform_chat *CopilotOrganizationDetails_platform_chat + // The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + public_code_suggestions *CopilotOrganizationDetails_public_code_suggestions + // The breakdown of Copilot Business seats for the organization. + seat_breakdown CopilotSeatBreakdownable + // The mode of assigning new seats. + seat_management_setting *CopilotOrganizationDetails_seat_management_setting +} +// NewCopilotOrganizationDetails instantiates a new CopilotOrganizationDetails and sets the default values. +func NewCopilotOrganizationDetails()(*CopilotOrganizationDetails) { + m := &CopilotOrganizationDetails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotOrganizationDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotOrganizationDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotOrganizationDetails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CopilotOrganizationDetails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCli gets the cli property value. The organization policy for allowing or disallowing organization members to use Copilot within their CLI. +// returns a *CopilotOrganizationDetails_cli when successful +func (m *CopilotOrganizationDetails) GetCli()(*CopilotOrganizationDetails_cli) { + return m.cli +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotOrganizationDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cli"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCopilotOrganizationDetails_cli) + if err != nil { + return err + } + if val != nil { + m.SetCli(val.(*CopilotOrganizationDetails_cli)) + } + return nil + } + res["ide_chat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCopilotOrganizationDetails_ide_chat) + if err != nil { + return err + } + if val != nil { + m.SetIdeChat(val.(*CopilotOrganizationDetails_ide_chat)) + } + return nil + } + res["platform_chat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCopilotOrganizationDetails_platform_chat) + if err != nil { + return err + } + if val != nil { + m.SetPlatformChat(val.(*CopilotOrganizationDetails_platform_chat)) + } + return nil + } + res["public_code_suggestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCopilotOrganizationDetails_public_code_suggestions) + if err != nil { + return err + } + if val != nil { + m.SetPublicCodeSuggestions(val.(*CopilotOrganizationDetails_public_code_suggestions)) + } + return nil + } + res["seat_breakdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotSeatBreakdownFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSeatBreakdown(val.(CopilotSeatBreakdownable)) + } + return nil + } + res["seat_management_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCopilotOrganizationDetails_seat_management_setting) + if err != nil { + return err + } + if val != nil { + m.SetSeatManagementSetting(val.(*CopilotOrganizationDetails_seat_management_setting)) + } + return nil + } + return res +} +// GetIdeChat gets the ide_chat property value. The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. +// returns a *CopilotOrganizationDetails_ide_chat when successful +func (m *CopilotOrganizationDetails) GetIdeChat()(*CopilotOrganizationDetails_ide_chat) { + return m.ide_chat +} +// GetPlatformChat gets the platform_chat property value. The organization policy for allowing or disallowing organization members to use Copilot features within github.com. +// returns a *CopilotOrganizationDetails_platform_chat when successful +func (m *CopilotOrganizationDetails) GetPlatformChat()(*CopilotOrganizationDetails_platform_chat) { + return m.platform_chat +} +// GetPublicCodeSuggestions gets the public_code_suggestions property value. The organization policy for allowing or disallowing Copilot to make suggestions that match public code. +// returns a *CopilotOrganizationDetails_public_code_suggestions when successful +func (m *CopilotOrganizationDetails) GetPublicCodeSuggestions()(*CopilotOrganizationDetails_public_code_suggestions) { + return m.public_code_suggestions +} +// GetSeatBreakdown gets the seat_breakdown property value. The breakdown of Copilot Business seats for the organization. +// returns a CopilotSeatBreakdownable when successful +func (m *CopilotOrganizationDetails) GetSeatBreakdown()(CopilotSeatBreakdownable) { + return m.seat_breakdown +} +// GetSeatManagementSetting gets the seat_management_setting property value. The mode of assigning new seats. +// returns a *CopilotOrganizationDetails_seat_management_setting when successful +func (m *CopilotOrganizationDetails) GetSeatManagementSetting()(*CopilotOrganizationDetails_seat_management_setting) { + return m.seat_management_setting +} +// Serialize serializes information the current object +func (m *CopilotOrganizationDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCli() != nil { + cast := (*m.GetCli()).String() + err := writer.WriteStringValue("cli", &cast) + if err != nil { + return err + } + } + if m.GetIdeChat() != nil { + cast := (*m.GetIdeChat()).String() + err := writer.WriteStringValue("ide_chat", &cast) + if err != nil { + return err + } + } + if m.GetPlatformChat() != nil { + cast := (*m.GetPlatformChat()).String() + err := writer.WriteStringValue("platform_chat", &cast) + if err != nil { + return err + } + } + if m.GetPublicCodeSuggestions() != nil { + cast := (*m.GetPublicCodeSuggestions()).String() + err := writer.WriteStringValue("public_code_suggestions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("seat_breakdown", m.GetSeatBreakdown()) + if err != nil { + return err + } + } + if m.GetSeatManagementSetting() != nil { + cast := (*m.GetSeatManagementSetting()).String() + err := writer.WriteStringValue("seat_management_setting", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CopilotOrganizationDetails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCli sets the cli property value. The organization policy for allowing or disallowing organization members to use Copilot within their CLI. +func (m *CopilotOrganizationDetails) SetCli(value *CopilotOrganizationDetails_cli)() { + m.cli = value +} +// SetIdeChat sets the ide_chat property value. The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. +func (m *CopilotOrganizationDetails) SetIdeChat(value *CopilotOrganizationDetails_ide_chat)() { + m.ide_chat = value +} +// SetPlatformChat sets the platform_chat property value. The organization policy for allowing or disallowing organization members to use Copilot features within github.com. +func (m *CopilotOrganizationDetails) SetPlatformChat(value *CopilotOrganizationDetails_platform_chat)() { + m.platform_chat = value +} +// SetPublicCodeSuggestions sets the public_code_suggestions property value. The organization policy for allowing or disallowing Copilot to make suggestions that match public code. +func (m *CopilotOrganizationDetails) SetPublicCodeSuggestions(value *CopilotOrganizationDetails_public_code_suggestions)() { + m.public_code_suggestions = value +} +// SetSeatBreakdown sets the seat_breakdown property value. The breakdown of Copilot Business seats for the organization. +func (m *CopilotOrganizationDetails) SetSeatBreakdown(value CopilotSeatBreakdownable)() { + m.seat_breakdown = value +} +// SetSeatManagementSetting sets the seat_management_setting property value. The mode of assigning new seats. +func (m *CopilotOrganizationDetails) SetSeatManagementSetting(value *CopilotOrganizationDetails_seat_management_setting)() { + m.seat_management_setting = value +} +type CopilotOrganizationDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCli()(*CopilotOrganizationDetails_cli) + GetIdeChat()(*CopilotOrganizationDetails_ide_chat) + GetPlatformChat()(*CopilotOrganizationDetails_platform_chat) + GetPublicCodeSuggestions()(*CopilotOrganizationDetails_public_code_suggestions) + GetSeatBreakdown()(CopilotSeatBreakdownable) + GetSeatManagementSetting()(*CopilotOrganizationDetails_seat_management_setting) + SetCli(value *CopilotOrganizationDetails_cli)() + SetIdeChat(value *CopilotOrganizationDetails_ide_chat)() + SetPlatformChat(value *CopilotOrganizationDetails_platform_chat)() + SetPublicCodeSuggestions(value *CopilotOrganizationDetails_public_code_suggestions)() + SetSeatBreakdown(value CopilotSeatBreakdownable)() + SetSeatManagementSetting(value *CopilotOrganizationDetails_seat_management_setting)() +} diff --git a/pkg/github/models/copilot_organization_details_cli.go b/pkg/github/models/copilot_organization_details_cli.go new file mode 100644 index 0000000..af8a63c --- /dev/null +++ b/pkg/github/models/copilot_organization_details_cli.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. +type CopilotOrganizationDetails_cli int + +const ( + ENABLED_COPILOTORGANIZATIONDETAILS_CLI CopilotOrganizationDetails_cli = iota + DISABLED_COPILOTORGANIZATIONDETAILS_CLI + UNCONFIGURED_COPILOTORGANIZATIONDETAILS_CLI +) + +func (i CopilotOrganizationDetails_cli) String() string { + return []string{"enabled", "disabled", "unconfigured"}[i] +} +func ParseCopilotOrganizationDetails_cli(v string) (any, error) { + result := ENABLED_COPILOTORGANIZATIONDETAILS_CLI + switch v { + case "enabled": + result = ENABLED_COPILOTORGANIZATIONDETAILS_CLI + case "disabled": + result = DISABLED_COPILOTORGANIZATIONDETAILS_CLI + case "unconfigured": + result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_CLI + default: + return 0, errors.New("Unknown CopilotOrganizationDetails_cli value: " + v) + } + return &result, nil +} +func SerializeCopilotOrganizationDetails_cli(values []CopilotOrganizationDetails_cli) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CopilotOrganizationDetails_cli) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/copilot_organization_details_ide_chat.go b/pkg/github/models/copilot_organization_details_ide_chat.go new file mode 100644 index 0000000..a89ad2f --- /dev/null +++ b/pkg/github/models/copilot_organization_details_ide_chat.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. +type CopilotOrganizationDetails_ide_chat int + +const ( + ENABLED_COPILOTORGANIZATIONDETAILS_IDE_CHAT CopilotOrganizationDetails_ide_chat = iota + DISABLED_COPILOTORGANIZATIONDETAILS_IDE_CHAT + UNCONFIGURED_COPILOTORGANIZATIONDETAILS_IDE_CHAT +) + +func (i CopilotOrganizationDetails_ide_chat) String() string { + return []string{"enabled", "disabled", "unconfigured"}[i] +} +func ParseCopilotOrganizationDetails_ide_chat(v string) (any, error) { + result := ENABLED_COPILOTORGANIZATIONDETAILS_IDE_CHAT + switch v { + case "enabled": + result = ENABLED_COPILOTORGANIZATIONDETAILS_IDE_CHAT + case "disabled": + result = DISABLED_COPILOTORGANIZATIONDETAILS_IDE_CHAT + case "unconfigured": + result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_IDE_CHAT + default: + return 0, errors.New("Unknown CopilotOrganizationDetails_ide_chat value: " + v) + } + return &result, nil +} +func SerializeCopilotOrganizationDetails_ide_chat(values []CopilotOrganizationDetails_ide_chat) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CopilotOrganizationDetails_ide_chat) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/copilot_organization_details_platform_chat.go b/pkg/github/models/copilot_organization_details_platform_chat.go new file mode 100644 index 0000000..d03a09e --- /dev/null +++ b/pkg/github/models/copilot_organization_details_platform_chat.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. +type CopilotOrganizationDetails_platform_chat int + +const ( + ENABLED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT CopilotOrganizationDetails_platform_chat = iota + DISABLED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT + UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT +) + +func (i CopilotOrganizationDetails_platform_chat) String() string { + return []string{"enabled", "disabled", "unconfigured"}[i] +} +func ParseCopilotOrganizationDetails_platform_chat(v string) (any, error) { + result := ENABLED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT + switch v { + case "enabled": + result = ENABLED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT + case "disabled": + result = DISABLED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT + case "unconfigured": + result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT + default: + return 0, errors.New("Unknown CopilotOrganizationDetails_platform_chat value: " + v) + } + return &result, nil +} +func SerializeCopilotOrganizationDetails_platform_chat(values []CopilotOrganizationDetails_platform_chat) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CopilotOrganizationDetails_platform_chat) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/copilot_organization_details_public_code_suggestions.go b/pkg/github/models/copilot_organization_details_public_code_suggestions.go new file mode 100644 index 0000000..6fe57db --- /dev/null +++ b/pkg/github/models/copilot_organization_details_public_code_suggestions.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. +type CopilotOrganizationDetails_public_code_suggestions int + +const ( + ALLOW_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS CopilotOrganizationDetails_public_code_suggestions = iota + BLOCK_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + UNKNOWN_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS +) + +func (i CopilotOrganizationDetails_public_code_suggestions) String() string { + return []string{"allow", "block", "unconfigured", "unknown"}[i] +} +func ParseCopilotOrganizationDetails_public_code_suggestions(v string) (any, error) { + result := ALLOW_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + switch v { + case "allow": + result = ALLOW_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + case "block": + result = BLOCK_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + case "unconfigured": + result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + case "unknown": + result = UNKNOWN_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS + default: + return 0, errors.New("Unknown CopilotOrganizationDetails_public_code_suggestions value: " + v) + } + return &result, nil +} +func SerializeCopilotOrganizationDetails_public_code_suggestions(values []CopilotOrganizationDetails_public_code_suggestions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CopilotOrganizationDetails_public_code_suggestions) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/copilot_organization_details_seat_management_setting.go b/pkg/github/models/copilot_organization_details_seat_management_setting.go new file mode 100644 index 0000000..b4b64ef --- /dev/null +++ b/pkg/github/models/copilot_organization_details_seat_management_setting.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The mode of assigning new seats. +type CopilotOrganizationDetails_seat_management_setting int + +const ( + ASSIGN_ALL_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING CopilotOrganizationDetails_seat_management_setting = iota + ASSIGN_SELECTED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + DISABLED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + UNCONFIGURED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING +) + +func (i CopilotOrganizationDetails_seat_management_setting) String() string { + return []string{"assign_all", "assign_selected", "disabled", "unconfigured"}[i] +} +func ParseCopilotOrganizationDetails_seat_management_setting(v string) (any, error) { + result := ASSIGN_ALL_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + switch v { + case "assign_all": + result = ASSIGN_ALL_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + case "assign_selected": + result = ASSIGN_SELECTED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + case "disabled": + result = DISABLED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + case "unconfigured": + result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING + default: + return 0, errors.New("Unknown CopilotOrganizationDetails_seat_management_setting value: " + v) + } + return &result, nil +} +func SerializeCopilotOrganizationDetails_seat_management_setting(values []CopilotOrganizationDetails_seat_management_setting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CopilotOrganizationDetails_seat_management_setting) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/copilot_seat_breakdown.go b/pkg/github/models/copilot_seat_breakdown.go new file mode 100644 index 0000000..87262c5 --- /dev/null +++ b/pkg/github/models/copilot_seat_breakdown.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotSeatBreakdown the breakdown of Copilot Business seats for the organization. +type CopilotSeatBreakdown struct { + // The number of seats that have used Copilot during the current billing cycle. + active_this_cycle *int32 + // Seats added during the current billing cycle. + added_this_cycle *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The number of seats that have not used Copilot during the current billing cycle. + inactive_this_cycle *int32 + // The number of seats that are pending cancellation at the end of the current billing cycle. + pending_cancellation *int32 + // The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + pending_invitation *int32 + // The total number of seats being billed for the organization as of the current billing cycle. + total *int32 +} +// NewCopilotSeatBreakdown instantiates a new CopilotSeatBreakdown and sets the default values. +func NewCopilotSeatBreakdown()(*CopilotSeatBreakdown) { + m := &CopilotSeatBreakdown{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotSeatBreakdownFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatBreakdownFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotSeatBreakdown(), nil +} +// GetActiveThisCycle gets the active_this_cycle property value. The number of seats that have used Copilot during the current billing cycle. +// returns a *int32 when successful +func (m *CopilotSeatBreakdown) GetActiveThisCycle()(*int32) { + return m.active_this_cycle +} +// GetAddedThisCycle gets the added_this_cycle property value. Seats added during the current billing cycle. +// returns a *int32 when successful +func (m *CopilotSeatBreakdown) GetAddedThisCycle()(*int32) { + return m.added_this_cycle +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CopilotSeatBreakdown) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatBreakdown) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active_this_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveThisCycle(val) + } + return nil + } + res["added_this_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAddedThisCycle(val) + } + return nil + } + res["inactive_this_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInactiveThisCycle(val) + } + return nil + } + res["pending_cancellation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCancellation(val) + } + return nil + } + res["pending_invitation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingInvitation(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetInactiveThisCycle gets the inactive_this_cycle property value. The number of seats that have not used Copilot during the current billing cycle. +// returns a *int32 when successful +func (m *CopilotSeatBreakdown) GetInactiveThisCycle()(*int32) { + return m.inactive_this_cycle +} +// GetPendingCancellation gets the pending_cancellation property value. The number of seats that are pending cancellation at the end of the current billing cycle. +// returns a *int32 when successful +func (m *CopilotSeatBreakdown) GetPendingCancellation()(*int32) { + return m.pending_cancellation +} +// GetPendingInvitation gets the pending_invitation property value. The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. +// returns a *int32 when successful +func (m *CopilotSeatBreakdown) GetPendingInvitation()(*int32) { + return m.pending_invitation +} +// GetTotal gets the total property value. The total number of seats being billed for the organization as of the current billing cycle. +// returns a *int32 when successful +func (m *CopilotSeatBreakdown) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *CopilotSeatBreakdown) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("active_this_cycle", m.GetActiveThisCycle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("added_this_cycle", m.GetAddedThisCycle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("inactive_this_cycle", m.GetInactiveThisCycle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pending_cancellation", m.GetPendingCancellation()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pending_invitation", m.GetPendingInvitation()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveThisCycle sets the active_this_cycle property value. The number of seats that have used Copilot during the current billing cycle. +func (m *CopilotSeatBreakdown) SetActiveThisCycle(value *int32)() { + m.active_this_cycle = value +} +// SetAddedThisCycle sets the added_this_cycle property value. Seats added during the current billing cycle. +func (m *CopilotSeatBreakdown) SetAddedThisCycle(value *int32)() { + m.added_this_cycle = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CopilotSeatBreakdown) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetInactiveThisCycle sets the inactive_this_cycle property value. The number of seats that have not used Copilot during the current billing cycle. +func (m *CopilotSeatBreakdown) SetInactiveThisCycle(value *int32)() { + m.inactive_this_cycle = value +} +// SetPendingCancellation sets the pending_cancellation property value. The number of seats that are pending cancellation at the end of the current billing cycle. +func (m *CopilotSeatBreakdown) SetPendingCancellation(value *int32)() { + m.pending_cancellation = value +} +// SetPendingInvitation sets the pending_invitation property value. The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. +func (m *CopilotSeatBreakdown) SetPendingInvitation(value *int32)() { + m.pending_invitation = value +} +// SetTotal sets the total property value. The total number of seats being billed for the organization as of the current billing cycle. +func (m *CopilotSeatBreakdown) SetTotal(value *int32)() { + m.total = value +} +type CopilotSeatBreakdownable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveThisCycle()(*int32) + GetAddedThisCycle()(*int32) + GetInactiveThisCycle()(*int32) + GetPendingCancellation()(*int32) + GetPendingInvitation()(*int32) + GetTotal()(*int32) + SetActiveThisCycle(value *int32)() + SetAddedThisCycle(value *int32)() + SetInactiveThisCycle(value *int32)() + SetPendingCancellation(value *int32)() + SetPendingInvitation(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/copilot_seat_details.go b/pkg/github/models/copilot_seat_details.go new file mode 100644 index 0000000..9ddf50a --- /dev/null +++ b/pkg/github/models/copilot_seat_details.go @@ -0,0 +1,450 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotSeatDetails information about a Copilot Business seat assignment for a user, team, or organization. +type CopilotSeatDetails struct { + // The assignee that has been granted access to GitHub Copilot. + assignee CopilotSeatDetails_CopilotSeatDetails_assigneeable + // The team through which the assignee is granted access to GitHub Copilot, if applicable. + assigning_team CopilotSeatDetails_CopilotSeatDetails_assigning_teamable + // Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + last_activity_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Last editor that was used by the user for a GitHub Copilot completion. + last_activity_editor *string + // The organization to which this seat belongs. + organization CopilotSeatDetails_organizationable + // The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. + pending_cancellation_date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// CopilotSeatDetails_CopilotSeatDetails_assignee composed type wrapper for classes Organizationable, SimpleUserable, Teamable +type CopilotSeatDetails_CopilotSeatDetails_assignee struct { + // Composed type representation for type Organizationable + organization Organizationable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable + // Composed type representation for type Teamable + team Teamable +} +// NewCopilotSeatDetails_CopilotSeatDetails_assignee instantiates a new CopilotSeatDetails_CopilotSeatDetails_assignee and sets the default values. +func NewCopilotSeatDetails_CopilotSeatDetails_assignee()(*CopilotSeatDetails_CopilotSeatDetails_assignee) { + m := &CopilotSeatDetails_CopilotSeatDetails_assignee{ + } + return m +} +// CreateCopilotSeatDetails_CopilotSeatDetails_assigneeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetails_CopilotSeatDetails_assigneeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCopilotSeatDetails_CopilotSeatDetails_assignee() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetIsComposedType()(bool) { + return true +} +// GetOrganization gets the organization property value. Composed type representation for type Organizationable +// returns a Organizationable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetOrganization()(Organizationable) { + return m.organization +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// GetTeam gets the team property value. Composed type representation for type Teamable +// returns a Teamable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetTeam()(Teamable) { + return m.team +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrganization() != nil { + err := writer.WriteObjectValue("", m.GetOrganization()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } else if m.GetTeam() != nil { + err := writer.WriteObjectValue("", m.GetTeam()) + if err != nil { + return err + } + } + return nil +} +// SetOrganization sets the organization property value. Composed type representation for type Organizationable +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetOrganization(value Organizationable)() { + m.organization = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +// SetTeam sets the team property value. Composed type representation for type Teamable +func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetTeam(value Teamable)() { + m.team = value +} +// CopilotSeatDetails_CopilotSeatDetails_assigning_team composed type wrapper for classes EnterpriseTeamable, Teamable +type CopilotSeatDetails_CopilotSeatDetails_assigning_team struct { + // Composed type representation for type EnterpriseTeamable + enterpriseTeam EnterpriseTeamable + // Composed type representation for type Teamable + team Teamable +} +// NewCopilotSeatDetails_CopilotSeatDetails_assigning_team instantiates a new CopilotSeatDetails_CopilotSeatDetails_assigning_team and sets the default values. +func NewCopilotSeatDetails_CopilotSeatDetails_assigning_team()(*CopilotSeatDetails_CopilotSeatDetails_assigning_team) { + m := &CopilotSeatDetails_CopilotSeatDetails_assigning_team{ + } + return m +} +// CreateCopilotSeatDetails_CopilotSeatDetails_assigning_teamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetails_CopilotSeatDetails_assigning_teamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCopilotSeatDetails_CopilotSeatDetails_assigning_team() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetEnterpriseTeam gets the enterpriseTeam property value. Composed type representation for type EnterpriseTeamable +// returns a EnterpriseTeamable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetEnterpriseTeam()(EnterpriseTeamable) { + return m.enterpriseTeam +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetIsComposedType()(bool) { + return true +} +// GetTeam gets the team property value. Composed type representation for type Teamable +// returns a Teamable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetTeam()(Teamable) { + return m.team +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterpriseTeam() != nil { + err := writer.WriteObjectValue("", m.GetEnterpriseTeam()) + if err != nil { + return err + } + } else if m.GetTeam() != nil { + err := writer.WriteObjectValue("", m.GetTeam()) + if err != nil { + return err + } + } + return nil +} +// SetEnterpriseTeam sets the enterpriseTeam property value. Composed type representation for type EnterpriseTeamable +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) SetEnterpriseTeam(value EnterpriseTeamable)() { + m.enterpriseTeam = value +} +// SetTeam sets the team property value. Composed type representation for type Teamable +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) SetTeam(value Teamable)() { + m.team = value +} +type CopilotSeatDetails_CopilotSeatDetails_assigneeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganization()(Organizationable) + GetSimpleUser()(SimpleUserable) + GetTeam()(Teamable) + SetOrganization(value Organizationable)() + SetSimpleUser(value SimpleUserable)() + SetTeam(value Teamable)() +} +type CopilotSeatDetails_CopilotSeatDetails_assigning_teamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterpriseTeam()(EnterpriseTeamable) + GetTeam()(Teamable) + SetEnterpriseTeam(value EnterpriseTeamable)() + SetTeam(value Teamable)() +} +// NewCopilotSeatDetails instantiates a new CopilotSeatDetails and sets the default values. +func NewCopilotSeatDetails()(*CopilotSeatDetails) { + m := &CopilotSeatDetails{ + } + return m +} +// CreateCopilotSeatDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotSeatDetails(), nil +} +// GetAssignee gets the assignee property value. The assignee that has been granted access to GitHub Copilot. +// returns a CopilotSeatDetails_CopilotSeatDetails_assigneeable when successful +func (m *CopilotSeatDetails) GetAssignee()(CopilotSeatDetails_CopilotSeatDetails_assigneeable) { + return m.assignee +} +// GetAssigningTeam gets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable. +// returns a CopilotSeatDetails_CopilotSeatDetails_assigning_teamable when successful +func (m *CopilotSeatDetails) GetAssigningTeam()(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable) { + return m.assigning_team +} +// GetCreatedAt gets the created_at property value. Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. +// returns a *Time when successful +func (m *CopilotSeatDetails) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotSeatDetails_CopilotSeatDetails_assigneeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(CopilotSeatDetails_CopilotSeatDetails_assigneeable)) + } + return nil + } + res["assigning_team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotSeatDetails_CopilotSeatDetails_assigning_teamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssigningTeam(val.(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["last_activity_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActivityAt(val) + } + return nil + } + res["last_activity_editor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActivityEditor(val) + } + return nil + } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotSeatDetails_organizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(CopilotSeatDetails_organizationable)) + } + return nil + } + res["pending_cancellation_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingCancellationDate(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetLastActivityAt gets the last_activity_at property value. Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. +// returns a *Time when successful +func (m *CopilotSeatDetails) GetLastActivityAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_activity_at +} +// GetLastActivityEditor gets the last_activity_editor property value. Last editor that was used by the user for a GitHub Copilot completion. +// returns a *string when successful +func (m *CopilotSeatDetails) GetLastActivityEditor()(*string) { + return m.last_activity_editor +} +// GetOrganization gets the organization property value. The organization to which this seat belongs. +// returns a CopilotSeatDetails_organizationable when successful +func (m *CopilotSeatDetails) GetOrganization()(CopilotSeatDetails_organizationable) { + return m.organization +} +// GetPendingCancellationDate gets the pending_cancellation_date property value. The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. +// returns a *DateOnly when successful +func (m *CopilotSeatDetails) GetPendingCancellationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.pending_cancellation_date +} +// GetUpdatedAt gets the updated_at property value. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. +// returns a *Time when successful +func (m *CopilotSeatDetails) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assigning_team", m.GetAssigningTeam()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_activity_at", m.GetLastActivityAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_activity_editor", m.GetLastActivityEditor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("pending_cancellation_date", m.GetPendingCancellationDate()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + return nil +} +// SetAssignee sets the assignee property value. The assignee that has been granted access to GitHub Copilot. +func (m *CopilotSeatDetails) SetAssignee(value CopilotSeatDetails_CopilotSeatDetails_assigneeable)() { + m.assignee = value +} +// SetAssigningTeam sets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable. +func (m *CopilotSeatDetails) SetAssigningTeam(value CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)() { + m.assigning_team = value +} +// SetCreatedAt sets the created_at property value. Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. +func (m *CopilotSeatDetails) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetLastActivityAt sets the last_activity_at property value. Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. +func (m *CopilotSeatDetails) SetLastActivityAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_activity_at = value +} +// SetLastActivityEditor sets the last_activity_editor property value. Last editor that was used by the user for a GitHub Copilot completion. +func (m *CopilotSeatDetails) SetLastActivityEditor(value *string)() { + m.last_activity_editor = value +} +// SetOrganization sets the organization property value. The organization to which this seat belongs. +func (m *CopilotSeatDetails) SetOrganization(value CopilotSeatDetails_organizationable)() { + m.organization = value +} +// SetPendingCancellationDate sets the pending_cancellation_date property value. The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. +func (m *CopilotSeatDetails) SetPendingCancellationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.pending_cancellation_date = value +} +// SetUpdatedAt sets the updated_at property value. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. +func (m *CopilotSeatDetails) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CopilotSeatDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignee()(CopilotSeatDetails_CopilotSeatDetails_assigneeable) + GetAssigningTeam()(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastActivityAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastActivityEditor()(*string) + GetOrganization()(CopilotSeatDetails_organizationable) + GetPendingCancellationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAssignee(value CopilotSeatDetails_CopilotSeatDetails_assigneeable)() + SetAssigningTeam(value CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastActivityAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastActivityEditor(value *string)() + SetOrganization(value CopilotSeatDetails_organizationable)() + SetPendingCancellationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/copilot_seat_details_organization.go b/pkg/github/models/copilot_seat_details_organization.go new file mode 100644 index 0000000..9ef2e10 --- /dev/null +++ b/pkg/github/models/copilot_seat_details_organization.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotSeatDetails_organization the organization to which this seat belongs. +type CopilotSeatDetails_organization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewCopilotSeatDetails_organization instantiates a new CopilotSeatDetails_organization and sets the default values. +func NewCopilotSeatDetails_organization()(*CopilotSeatDetails_organization) { + m := &CopilotSeatDetails_organization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotSeatDetails_organizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetails_organizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotSeatDetails_organization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CopilotSeatDetails_organization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails_organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails_organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CopilotSeatDetails_organization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type CopilotSeatDetails_organizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/copilot_usage_metrics.go b/pkg/github/models/copilot_usage_metrics.go new file mode 100644 index 0000000..0cee13e --- /dev/null +++ b/pkg/github/models/copilot_usage_metrics.go @@ -0,0 +1,335 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotUsageMetrics summary of Copilot usage. +type CopilotUsageMetrics struct { + // Breakdown of Copilot code completions usage by language and editor + breakdown []CopilotUsageMetrics_breakdownable + // The date for which the usage metrics are reported, in `YYYY-MM-DD` format. + day *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The total number of Copilot code completion suggestions accepted by users. + total_acceptances_count *int32 + // The total number of users who interacted with Copilot Chat in the IDE during the day specified. + total_active_chat_users *int32 + // The total number of users who were shown Copilot code completion suggestions during the day specified. + total_active_users *int32 + // The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). + total_chat_acceptances *int32 + // The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. + total_chat_turns *int32 + // The total number of lines of code completions accepted by users. + total_lines_accepted *int32 + // The total number of lines of code completions suggested by Copilot. + total_lines_suggested *int32 + // The total number of Copilot code completion suggestions shown to users. + total_suggestions_count *int32 +} +// NewCopilotUsageMetrics instantiates a new CopilotUsageMetrics and sets the default values. +func NewCopilotUsageMetrics()(*CopilotUsageMetrics) { + m := &CopilotUsageMetrics{ + } + return m +} +// CreateCopilotUsageMetricsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotUsageMetricsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotUsageMetrics(), nil +} +// GetBreakdown gets the breakdown property value. Breakdown of Copilot code completions usage by language and editor +// returns a []CopilotUsageMetrics_breakdownable when successful +func (m *CopilotUsageMetrics) GetBreakdown()([]CopilotUsageMetrics_breakdownable) { + return m.breakdown +} +// GetDay gets the day property value. The date for which the usage metrics are reported, in `YYYY-MM-DD` format. +// returns a *DateOnly when successful +func (m *CopilotUsageMetrics) GetDay()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.day +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotUsageMetrics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["breakdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotUsageMetrics_breakdownFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotUsageMetrics_breakdownable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotUsageMetrics_breakdownable) + } + } + m.SetBreakdown(res) + } + return nil + } + res["day"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDay(val) + } + return nil + } + res["total_acceptances_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAcceptancesCount(val) + } + return nil + } + res["total_active_chat_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalActiveChatUsers(val) + } + return nil + } + res["total_active_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalActiveUsers(val) + } + return nil + } + res["total_chat_acceptances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalChatAcceptances(val) + } + return nil + } + res["total_chat_turns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalChatTurns(val) + } + return nil + } + res["total_lines_accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLinesAccepted(val) + } + return nil + } + res["total_lines_suggested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLinesSuggested(val) + } + return nil + } + res["total_suggestions_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSuggestionsCount(val) + } + return nil + } + return res +} +// GetTotalAcceptancesCount gets the total_acceptances_count property value. The total number of Copilot code completion suggestions accepted by users. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalAcceptancesCount()(*int32) { + return m.total_acceptances_count +} +// GetTotalActiveChatUsers gets the total_active_chat_users property value. The total number of users who interacted with Copilot Chat in the IDE during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalActiveChatUsers()(*int32) { + return m.total_active_chat_users +} +// GetTotalActiveUsers gets the total_active_users property value. The total number of users who were shown Copilot code completion suggestions during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalActiveUsers()(*int32) { + return m.total_active_users +} +// GetTotalChatAcceptances gets the total_chat_acceptances property value. The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalChatAcceptances()(*int32) { + return m.total_chat_acceptances +} +// GetTotalChatTurns gets the total_chat_turns property value. The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalChatTurns()(*int32) { + return m.total_chat_turns +} +// GetTotalLinesAccepted gets the total_lines_accepted property value. The total number of lines of code completions accepted by users. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalLinesAccepted()(*int32) { + return m.total_lines_accepted +} +// GetTotalLinesSuggested gets the total_lines_suggested property value. The total number of lines of code completions suggested by Copilot. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalLinesSuggested()(*int32) { + return m.total_lines_suggested +} +// GetTotalSuggestionsCount gets the total_suggestions_count property value. The total number of Copilot code completion suggestions shown to users. +// returns a *int32 when successful +func (m *CopilotUsageMetrics) GetTotalSuggestionsCount()(*int32) { + return m.total_suggestions_count +} +// Serialize serializes information the current object +func (m *CopilotUsageMetrics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBreakdown() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBreakdown())) + for i, v := range m.GetBreakdown() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("breakdown", cast) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("day", m.GetDay()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_acceptances_count", m.GetTotalAcceptancesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_active_chat_users", m.GetTotalActiveChatUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_active_users", m.GetTotalActiveUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_chat_acceptances", m.GetTotalChatAcceptances()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_chat_turns", m.GetTotalChatTurns()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_lines_accepted", m.GetTotalLinesAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_lines_suggested", m.GetTotalLinesSuggested()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_suggestions_count", m.GetTotalSuggestionsCount()) + if err != nil { + return err + } + } + return nil +} +// SetBreakdown sets the breakdown property value. Breakdown of Copilot code completions usage by language and editor +func (m *CopilotUsageMetrics) SetBreakdown(value []CopilotUsageMetrics_breakdownable)() { + m.breakdown = value +} +// SetDay sets the day property value. The date for which the usage metrics are reported, in `YYYY-MM-DD` format. +func (m *CopilotUsageMetrics) SetDay(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.day = value +} +// SetTotalAcceptancesCount sets the total_acceptances_count property value. The total number of Copilot code completion suggestions accepted by users. +func (m *CopilotUsageMetrics) SetTotalAcceptancesCount(value *int32)() { + m.total_acceptances_count = value +} +// SetTotalActiveChatUsers sets the total_active_chat_users property value. The total number of users who interacted with Copilot Chat in the IDE during the day specified. +func (m *CopilotUsageMetrics) SetTotalActiveChatUsers(value *int32)() { + m.total_active_chat_users = value +} +// SetTotalActiveUsers sets the total_active_users property value. The total number of users who were shown Copilot code completion suggestions during the day specified. +func (m *CopilotUsageMetrics) SetTotalActiveUsers(value *int32)() { + m.total_active_users = value +} +// SetTotalChatAcceptances sets the total_chat_acceptances property value. The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). +func (m *CopilotUsageMetrics) SetTotalChatAcceptances(value *int32)() { + m.total_chat_acceptances = value +} +// SetTotalChatTurns sets the total_chat_turns property value. The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. +func (m *CopilotUsageMetrics) SetTotalChatTurns(value *int32)() { + m.total_chat_turns = value +} +// SetTotalLinesAccepted sets the total_lines_accepted property value. The total number of lines of code completions accepted by users. +func (m *CopilotUsageMetrics) SetTotalLinesAccepted(value *int32)() { + m.total_lines_accepted = value +} +// SetTotalLinesSuggested sets the total_lines_suggested property value. The total number of lines of code completions suggested by Copilot. +func (m *CopilotUsageMetrics) SetTotalLinesSuggested(value *int32)() { + m.total_lines_suggested = value +} +// SetTotalSuggestionsCount sets the total_suggestions_count property value. The total number of Copilot code completion suggestions shown to users. +func (m *CopilotUsageMetrics) SetTotalSuggestionsCount(value *int32)() { + m.total_suggestions_count = value +} +type CopilotUsageMetricsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBreakdown()([]CopilotUsageMetrics_breakdownable) + GetDay()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTotalAcceptancesCount()(*int32) + GetTotalActiveChatUsers()(*int32) + GetTotalActiveUsers()(*int32) + GetTotalChatAcceptances()(*int32) + GetTotalChatTurns()(*int32) + GetTotalLinesAccepted()(*int32) + GetTotalLinesSuggested()(*int32) + GetTotalSuggestionsCount()(*int32) + SetBreakdown(value []CopilotUsageMetrics_breakdownable)() + SetDay(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTotalAcceptancesCount(value *int32)() + SetTotalActiveChatUsers(value *int32)() + SetTotalActiveUsers(value *int32)() + SetTotalChatAcceptances(value *int32)() + SetTotalChatTurns(value *int32)() + SetTotalLinesAccepted(value *int32)() + SetTotalLinesSuggested(value *int32)() + SetTotalSuggestionsCount(value *int32)() +} diff --git a/pkg/github/models/copilot_usage_metrics_breakdown.go b/pkg/github/models/copilot_usage_metrics_breakdown.go new file mode 100644 index 0000000..9924ca1 --- /dev/null +++ b/pkg/github/models/copilot_usage_metrics_breakdown.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotUsageMetrics_breakdown breakdown of Copilot usage by editor for this language +type CopilotUsageMetrics_breakdown struct { + // The number of Copilot suggestions accepted by users in the editor specified during the day specified. + acceptances_count *int32 + // The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. + active_users *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The editor in which Copilot suggestions were shown to users for the specified language. + editor *string + // The language in which Copilot suggestions were shown to users in the specified editor. + language *string + // The number of lines of code accepted by users in the editor specified during the day specified. + lines_accepted *int32 + // The number of lines of code suggested by Copilot in the editor specified during the day specified. + lines_suggested *int32 + // The number of Copilot suggestions shown to users in the editor specified during the day specified. + suggestions_count *int32 +} +// NewCopilotUsageMetrics_breakdown instantiates a new CopilotUsageMetrics_breakdown and sets the default values. +func NewCopilotUsageMetrics_breakdown()(*CopilotUsageMetrics_breakdown) { + m := &CopilotUsageMetrics_breakdown{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotUsageMetrics_breakdownFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotUsageMetrics_breakdownFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotUsageMetrics_breakdown(), nil +} +// GetAcceptancesCount gets the acceptances_count property value. The number of Copilot suggestions accepted by users in the editor specified during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics_breakdown) GetAcceptancesCount()(*int32) { + return m.acceptances_count +} +// GetActiveUsers gets the active_users property value. The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics_breakdown) GetActiveUsers()(*int32) { + return m.active_users +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CopilotUsageMetrics_breakdown) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEditor gets the editor property value. The editor in which Copilot suggestions were shown to users for the specified language. +// returns a *string when successful +func (m *CopilotUsageMetrics_breakdown) GetEditor()(*string) { + return m.editor +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotUsageMetrics_breakdown) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["acceptances_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAcceptancesCount(val) + } + return nil + } + res["active_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveUsers(val) + } + return nil + } + res["editor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEditor(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["lines_accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLinesAccepted(val) + } + return nil + } + res["lines_suggested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLinesSuggested(val) + } + return nil + } + res["suggestions_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuggestionsCount(val) + } + return nil + } + return res +} +// GetLanguage gets the language property value. The language in which Copilot suggestions were shown to users in the specified editor. +// returns a *string when successful +func (m *CopilotUsageMetrics_breakdown) GetLanguage()(*string) { + return m.language +} +// GetLinesAccepted gets the lines_accepted property value. The number of lines of code accepted by users in the editor specified during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics_breakdown) GetLinesAccepted()(*int32) { + return m.lines_accepted +} +// GetLinesSuggested gets the lines_suggested property value. The number of lines of code suggested by Copilot in the editor specified during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics_breakdown) GetLinesSuggested()(*int32) { + return m.lines_suggested +} +// GetSuggestionsCount gets the suggestions_count property value. The number of Copilot suggestions shown to users in the editor specified during the day specified. +// returns a *int32 when successful +func (m *CopilotUsageMetrics_breakdown) GetSuggestionsCount()(*int32) { + return m.suggestions_count +} +// Serialize serializes information the current object +func (m *CopilotUsageMetrics_breakdown) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("acceptances_count", m.GetAcceptancesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("active_users", m.GetActiveUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("editor", m.GetEditor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("lines_accepted", m.GetLinesAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("lines_suggested", m.GetLinesSuggested()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("suggestions_count", m.GetSuggestionsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptancesCount sets the acceptances_count property value. The number of Copilot suggestions accepted by users in the editor specified during the day specified. +func (m *CopilotUsageMetrics_breakdown) SetAcceptancesCount(value *int32)() { + m.acceptances_count = value +} +// SetActiveUsers sets the active_users property value. The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. +func (m *CopilotUsageMetrics_breakdown) SetActiveUsers(value *int32)() { + m.active_users = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CopilotUsageMetrics_breakdown) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEditor sets the editor property value. The editor in which Copilot suggestions were shown to users for the specified language. +func (m *CopilotUsageMetrics_breakdown) SetEditor(value *string)() { + m.editor = value +} +// SetLanguage sets the language property value. The language in which Copilot suggestions were shown to users in the specified editor. +func (m *CopilotUsageMetrics_breakdown) SetLanguage(value *string)() { + m.language = value +} +// SetLinesAccepted sets the lines_accepted property value. The number of lines of code accepted by users in the editor specified during the day specified. +func (m *CopilotUsageMetrics_breakdown) SetLinesAccepted(value *int32)() { + m.lines_accepted = value +} +// SetLinesSuggested sets the lines_suggested property value. The number of lines of code suggested by Copilot in the editor specified during the day specified. +func (m *CopilotUsageMetrics_breakdown) SetLinesSuggested(value *int32)() { + m.lines_suggested = value +} +// SetSuggestionsCount sets the suggestions_count property value. The number of Copilot suggestions shown to users in the editor specified during the day specified. +func (m *CopilotUsageMetrics_breakdown) SetSuggestionsCount(value *int32)() { + m.suggestions_count = value +} +type CopilotUsageMetrics_breakdownable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptancesCount()(*int32) + GetActiveUsers()(*int32) + GetEditor()(*string) + GetLanguage()(*string) + GetLinesAccepted()(*int32) + GetLinesSuggested()(*int32) + GetSuggestionsCount()(*int32) + SetAcceptancesCount(value *int32)() + SetActiveUsers(value *int32)() + SetEditor(value *string)() + SetLanguage(value *string)() + SetLinesAccepted(value *int32)() + SetLinesSuggested(value *int32)() + SetSuggestionsCount(value *int32)() +} diff --git a/pkg/github/models/credential_authorization.go b/pkg/github/models/credential_authorization.go new file mode 100644 index 0000000..ec203c7 --- /dev/null +++ b/pkg/github/models/credential_authorization.go @@ -0,0 +1,407 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialAuthorization credential Authorization +type CredentialAuthorization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The expiry for the token. This will only be present when the credential is a token. + authorized_credential_expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The authorized_credential_id property + authorized_credential_id *int32 + // The note given to the token. This will only be present when the credential is a token. + authorized_credential_note *string + // The title given to the ssh key. This will only be present when the credential is an ssh key. + authorized_credential_title *string + // Date when the credential was last accessed. May be null if it was never accessed + credential_accessed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date when the credential was authorized for use. + credential_authorized_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Unique identifier for the credential. + credential_id *int32 + // Human-readable description of the credential type. + credential_type *string + // Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. + fingerprint *string + // User login that owns the underlying credential. + login *string + // List of oauth scopes the token has been granted. + scopes []string + // Last eight characters of the credential. Only included in responses with credential_type of personal access token. + token_last_eight *string +} +// NewCredentialAuthorization instantiates a new CredentialAuthorization and sets the default values. +func NewCredentialAuthorization()(*CredentialAuthorization) { + m := &CredentialAuthorization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCredentialAuthorizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCredentialAuthorizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialAuthorization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CredentialAuthorization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorizedCredentialExpiresAt gets the authorized_credential_expires_at property value. The expiry for the token. This will only be present when the credential is a token. +// returns a *Time when successful +func (m *CredentialAuthorization) GetAuthorizedCredentialExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.authorized_credential_expires_at +} +// GetAuthorizedCredentialId gets the authorized_credential_id property value. The authorized_credential_id property +// returns a *int32 when successful +func (m *CredentialAuthorization) GetAuthorizedCredentialId()(*int32) { + return m.authorized_credential_id +} +// GetAuthorizedCredentialNote gets the authorized_credential_note property value. The note given to the token. This will only be present when the credential is a token. +// returns a *string when successful +func (m *CredentialAuthorization) GetAuthorizedCredentialNote()(*string) { + return m.authorized_credential_note +} +// GetAuthorizedCredentialTitle gets the authorized_credential_title property value. The title given to the ssh key. This will only be present when the credential is an ssh key. +// returns a *string when successful +func (m *CredentialAuthorization) GetAuthorizedCredentialTitle()(*string) { + return m.authorized_credential_title +} +// GetCredentialAccessedAt gets the credential_accessed_at property value. Date when the credential was last accessed. May be null if it was never accessed +// returns a *Time when successful +func (m *CredentialAuthorization) GetCredentialAccessedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.credential_accessed_at +} +// GetCredentialAuthorizedAt gets the credential_authorized_at property value. Date when the credential was authorized for use. +// returns a *Time when successful +func (m *CredentialAuthorization) GetCredentialAuthorizedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.credential_authorized_at +} +// GetCredentialId gets the credential_id property value. Unique identifier for the credential. +// returns a *int32 when successful +func (m *CredentialAuthorization) GetCredentialId()(*int32) { + return m.credential_id +} +// GetCredentialType gets the credential_type property value. Human-readable description of the credential type. +// returns a *string when successful +func (m *CredentialAuthorization) GetCredentialType()(*string) { + return m.credential_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CredentialAuthorization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authorized_credential_expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedCredentialExpiresAt(val) + } + return nil + } + res["authorized_credential_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedCredentialId(val) + } + return nil + } + res["authorized_credential_note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedCredentialNote(val) + } + return nil + } + res["authorized_credential_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedCredentialTitle(val) + } + return nil + } + res["credential_accessed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCredentialAccessedAt(val) + } + return nil + } + res["credential_authorized_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCredentialAuthorizedAt(val) + } + return nil + } + res["credential_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCredentialId(val) + } + return nil + } + res["credential_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCredentialType(val) + } + return nil + } + res["fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprint(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["scopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetScopes(res) + } + return nil + } + res["token_last_eight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenLastEight(val) + } + return nil + } + return res +} +// GetFingerprint gets the fingerprint property value. Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. +// returns a *string when successful +func (m *CredentialAuthorization) GetFingerprint()(*string) { + return m.fingerprint +} +// GetLogin gets the login property value. User login that owns the underlying credential. +// returns a *string when successful +func (m *CredentialAuthorization) GetLogin()(*string) { + return m.login +} +// GetScopes gets the scopes property value. List of oauth scopes the token has been granted. +// returns a []string when successful +func (m *CredentialAuthorization) GetScopes()([]string) { + return m.scopes +} +// GetTokenLastEight gets the token_last_eight property value. Last eight characters of the credential. Only included in responses with credential_type of personal access token. +// returns a *string when successful +func (m *CredentialAuthorization) GetTokenLastEight()(*string) { + return m.token_last_eight +} +// Serialize serializes information the current object +func (m *CredentialAuthorization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("authorized_credential_expires_at", m.GetAuthorizedCredentialExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("authorized_credential_id", m.GetAuthorizedCredentialId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authorized_credential_note", m.GetAuthorizedCredentialNote()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authorized_credential_title", m.GetAuthorizedCredentialTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("credential_accessed_at", m.GetCredentialAccessedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("credential_authorized_at", m.GetCredentialAuthorizedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("credential_id", m.GetCredentialId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("credential_type", m.GetCredentialType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fingerprint", m.GetFingerprint()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + if m.GetScopes() != nil { + err := writer.WriteCollectionOfStringValues("scopes", m.GetScopes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_last_eight", m.GetTokenLastEight()) + 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 *CredentialAuthorization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorizedCredentialExpiresAt sets the authorized_credential_expires_at property value. The expiry for the token. This will only be present when the credential is a token. +func (m *CredentialAuthorization) SetAuthorizedCredentialExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.authorized_credential_expires_at = value +} +// SetAuthorizedCredentialId sets the authorized_credential_id property value. The authorized_credential_id property +func (m *CredentialAuthorization) SetAuthorizedCredentialId(value *int32)() { + m.authorized_credential_id = value +} +// SetAuthorizedCredentialNote sets the authorized_credential_note property value. The note given to the token. This will only be present when the credential is a token. +func (m *CredentialAuthorization) SetAuthorizedCredentialNote(value *string)() { + m.authorized_credential_note = value +} +// SetAuthorizedCredentialTitle sets the authorized_credential_title property value. The title given to the ssh key. This will only be present when the credential is an ssh key. +func (m *CredentialAuthorization) SetAuthorizedCredentialTitle(value *string)() { + m.authorized_credential_title = value +} +// SetCredentialAccessedAt sets the credential_accessed_at property value. Date when the credential was last accessed. May be null if it was never accessed +func (m *CredentialAuthorization) SetCredentialAccessedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.credential_accessed_at = value +} +// SetCredentialAuthorizedAt sets the credential_authorized_at property value. Date when the credential was authorized for use. +func (m *CredentialAuthorization) SetCredentialAuthorizedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.credential_authorized_at = value +} +// SetCredentialId sets the credential_id property value. Unique identifier for the credential. +func (m *CredentialAuthorization) SetCredentialId(value *int32)() { + m.credential_id = value +} +// SetCredentialType sets the credential_type property value. Human-readable description of the credential type. +func (m *CredentialAuthorization) SetCredentialType(value *string)() { + m.credential_type = value +} +// SetFingerprint sets the fingerprint property value. Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. +func (m *CredentialAuthorization) SetFingerprint(value *string)() { + m.fingerprint = value +} +// SetLogin sets the login property value. User login that owns the underlying credential. +func (m *CredentialAuthorization) SetLogin(value *string)() { + m.login = value +} +// SetScopes sets the scopes property value. List of oauth scopes the token has been granted. +func (m *CredentialAuthorization) SetScopes(value []string)() { + m.scopes = value +} +// SetTokenLastEight sets the token_last_eight property value. Last eight characters of the credential. Only included in responses with credential_type of personal access token. +func (m *CredentialAuthorization) SetTokenLastEight(value *string)() { + m.token_last_eight = value +} +type CredentialAuthorizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorizedCredentialExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAuthorizedCredentialId()(*int32) + GetAuthorizedCredentialNote()(*string) + GetAuthorizedCredentialTitle()(*string) + GetCredentialAccessedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCredentialAuthorizedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCredentialId()(*int32) + GetCredentialType()(*string) + GetFingerprint()(*string) + GetLogin()(*string) + GetScopes()([]string) + GetTokenLastEight()(*string) + SetAuthorizedCredentialExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAuthorizedCredentialId(value *int32)() + SetAuthorizedCredentialNote(value *string)() + SetAuthorizedCredentialTitle(value *string)() + SetCredentialAccessedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCredentialAuthorizedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCredentialId(value *int32)() + SetCredentialType(value *string)() + SetFingerprint(value *string)() + SetLogin(value *string)() + SetScopes(value []string)() + SetTokenLastEight(value *string)() +} diff --git a/pkg/github/models/custom_deployment_rule_app.go b/pkg/github/models/custom_deployment_rule_app.go new file mode 100644 index 0000000..9f1613c --- /dev/null +++ b/pkg/github/models/custom_deployment_rule_app.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomDeploymentRuleApp a GitHub App that is providing a custom deployment protection rule. +type CustomDeploymentRuleApp struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The unique identifier of the deployment protection rule integration. + id *int32 + // The URL for the endpoint to get details about the app. + integration_url *string + // The node ID for the deployment protection rule integration. + node_id *string + // The slugified name of the deployment protection rule integration. + slug *string +} +// NewCustomDeploymentRuleApp instantiates a new CustomDeploymentRuleApp and sets the default values. +func NewCustomDeploymentRuleApp()(*CustomDeploymentRuleApp) { + m := &CustomDeploymentRuleApp{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCustomDeploymentRuleAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomDeploymentRuleAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomDeploymentRuleApp(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CustomDeploymentRuleApp) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomDeploymentRuleApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["integration_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntegrationUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the deployment protection rule integration. +// returns a *int32 when successful +func (m *CustomDeploymentRuleApp) GetId()(*int32) { + return m.id +} +// GetIntegrationUrl gets the integration_url property value. The URL for the endpoint to get details about the app. +// returns a *string when successful +func (m *CustomDeploymentRuleApp) GetIntegrationUrl()(*string) { + return m.integration_url +} +// GetNodeId gets the node_id property value. The node ID for the deployment protection rule integration. +// returns a *string when successful +func (m *CustomDeploymentRuleApp) GetNodeId()(*string) { + return m.node_id +} +// GetSlug gets the slug property value. The slugified name of the deployment protection rule integration. +// returns a *string when successful +func (m *CustomDeploymentRuleApp) GetSlug()(*string) { + return m.slug +} +// Serialize serializes information the current object +func (m *CustomDeploymentRuleApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("integration_url", m.GetIntegrationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + 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 *CustomDeploymentRuleApp) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier of the deployment protection rule integration. +func (m *CustomDeploymentRuleApp) SetId(value *int32)() { + m.id = value +} +// SetIntegrationUrl sets the integration_url property value. The URL for the endpoint to get details about the app. +func (m *CustomDeploymentRuleApp) SetIntegrationUrl(value *string)() { + m.integration_url = value +} +// SetNodeId sets the node_id property value. The node ID for the deployment protection rule integration. +func (m *CustomDeploymentRuleApp) SetNodeId(value *string)() { + m.node_id = value +} +// SetSlug sets the slug property value. The slugified name of the deployment protection rule integration. +func (m *CustomDeploymentRuleApp) SetSlug(value *string)() { + m.slug = value +} +type CustomDeploymentRuleAppable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetIntegrationUrl()(*string) + GetNodeId()(*string) + GetSlug()(*string) + SetId(value *int32)() + SetIntegrationUrl(value *string)() + SetNodeId(value *string)() + SetSlug(value *string)() +} diff --git a/pkg/github/models/custom_property_value.go b/pkg/github/models/custom_property_value.go new file mode 100644 index 0000000..5608853 --- /dev/null +++ b/pkg/github/models/custom_property_value.go @@ -0,0 +1,181 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomPropertyValue custom property name and associated value +type CustomPropertyValue struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the property + property_name *string + // The value assigned to the property + value CustomPropertyValue_CustomPropertyValue_valueable +} +// CustomPropertyValue_CustomPropertyValue_value composed type wrapper for classes string +type CustomPropertyValue_CustomPropertyValue_value struct { + // Composed type representation for type string + string *string +} +// NewCustomPropertyValue_CustomPropertyValue_value instantiates a new CustomPropertyValue_CustomPropertyValue_value and sets the default values. +func NewCustomPropertyValue_CustomPropertyValue_value()(*CustomPropertyValue_CustomPropertyValue_value) { + m := &CustomPropertyValue_CustomPropertyValue_value{ + } + return m +} +// CreateCustomPropertyValue_CustomPropertyValue_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomPropertyValue_CustomPropertyValue_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCustomPropertyValue_CustomPropertyValue_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomPropertyValue_CustomPropertyValue_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CustomPropertyValue_CustomPropertyValue_value) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *CustomPropertyValue_CustomPropertyValue_value) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *CustomPropertyValue_CustomPropertyValue_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetString sets the string property value. Composed type representation for type string +func (m *CustomPropertyValue_CustomPropertyValue_value) SetString(value *string)() { + m.string = value +} +type CustomPropertyValue_CustomPropertyValue_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetString()(*string) + SetString(value *string)() +} +// NewCustomPropertyValue instantiates a new CustomPropertyValue and sets the default values. +func NewCustomPropertyValue()(*CustomPropertyValue) { + m := &CustomPropertyValue{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCustomPropertyValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomPropertyValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomPropertyValue(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CustomPropertyValue) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomPropertyValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["property_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPropertyName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomPropertyValue_CustomPropertyValue_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(CustomPropertyValue_CustomPropertyValue_valueable)) + } + return nil + } + return res +} +// GetPropertyName gets the property_name property value. The name of the property +// returns a *string when successful +func (m *CustomPropertyValue) GetPropertyName()(*string) { + return m.property_name +} +// GetValue gets the value property value. The value assigned to the property +// returns a CustomPropertyValue_CustomPropertyValue_valueable when successful +func (m *CustomPropertyValue) GetValue()(CustomPropertyValue_CustomPropertyValue_valueable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomPropertyValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("property_name", m.GetPropertyName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("value", m.GetValue()) + 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 *CustomPropertyValue) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPropertyName sets the property_name property value. The name of the property +func (m *CustomPropertyValue) SetPropertyName(value *string)() { + m.property_name = value +} +// SetValue sets the value property value. The value assigned to the property +func (m *CustomPropertyValue) SetValue(value CustomPropertyValue_CustomPropertyValue_valueable)() { + m.value = value +} +type CustomPropertyValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPropertyName()(*string) + GetValue()(CustomPropertyValue_CustomPropertyValue_valueable) + SetPropertyName(value *string)() + SetValue(value CustomPropertyValue_CustomPropertyValue_valueable)() +} diff --git a/pkg/github/models/databases503_error.go b/pkg/github/models/databases503_error.go new file mode 100644 index 0000000..671c2a4 --- /dev/null +++ b/pkg/github/models/databases503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Databases503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewDatabases503Error instantiates a new Databases503Error and sets the default values. +func NewDatabases503Error()(*Databases503Error) { + m := &Databases503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDatabases503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDatabases503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDatabases503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Databases503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Databases503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Databases503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Databases503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Databases503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Databases503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Databases503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Databases503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Databases503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Databases503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Databases503Error) SetMessage(value *string)() { + m.message = value +} +type Databases503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/demilestoned_issue_event.go b/pkg/github/models/demilestoned_issue_event.go new file mode 100644 index 0000000..ad3ecb1 --- /dev/null +++ b/pkg/github/models/demilestoned_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DemilestonedIssueEvent demilestoned Issue Event +type DemilestonedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The milestone property + milestone DemilestonedIssueEvent_milestoneable + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewDemilestonedIssueEvent instantiates a new DemilestonedIssueEvent and sets the default values. +func NewDemilestonedIssueEvent()(*DemilestonedIssueEvent) { + m := &DemilestonedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDemilestonedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDemilestonedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDemilestonedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *DemilestonedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DemilestonedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *DemilestonedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *DemilestonedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *DemilestonedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *DemilestonedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DemilestonedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDemilestonedIssueEvent_milestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(DemilestonedIssueEvent_milestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *DemilestonedIssueEvent) GetId()(*int32) { + return m.id +} +// GetMilestone gets the milestone property value. The milestone property +// returns a DemilestonedIssueEvent_milestoneable when successful +func (m *DemilestonedIssueEvent) GetMilestone()(DemilestonedIssueEvent_milestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *DemilestonedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *DemilestonedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *DemilestonedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DemilestonedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *DemilestonedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DemilestonedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *DemilestonedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *DemilestonedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *DemilestonedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *DemilestonedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *DemilestonedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetMilestone sets the milestone property value. The milestone property +func (m *DemilestonedIssueEvent) SetMilestone(value DemilestonedIssueEvent_milestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *DemilestonedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *DemilestonedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *DemilestonedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type DemilestonedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetMilestone()(DemilestonedIssueEvent_milestoneable) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetMilestone(value DemilestonedIssueEvent_milestoneable)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/demilestoned_issue_event_milestone.go b/pkg/github/models/demilestoned_issue_event_milestone.go new file mode 100644 index 0000000..e864bc2 --- /dev/null +++ b/pkg/github/models/demilestoned_issue_event_milestone.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DemilestonedIssueEvent_milestone struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The title property + title *string +} +// NewDemilestonedIssueEvent_milestone instantiates a new DemilestonedIssueEvent_milestone and sets the default values. +func NewDemilestonedIssueEvent_milestone()(*DemilestonedIssueEvent_milestone) { + m := &DemilestonedIssueEvent_milestone{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDemilestonedIssueEvent_milestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDemilestonedIssueEvent_milestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDemilestonedIssueEvent_milestone(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DemilestonedIssueEvent_milestone) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DemilestonedIssueEvent_milestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *DemilestonedIssueEvent_milestone) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *DemilestonedIssueEvent_milestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *DemilestonedIssueEvent_milestone) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTitle sets the title property value. The title property +func (m *DemilestonedIssueEvent_milestone) SetTitle(value *string)() { + m.title = value +} +type DemilestonedIssueEvent_milestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTitle()(*string) + SetTitle(value *string)() +} diff --git a/pkg/github/models/dependabot_alert.go b/pkg/github/models/dependabot_alert.go new file mode 100644 index 0000000..823058f --- /dev/null +++ b/pkg/github/models/dependabot_alert.go @@ -0,0 +1,398 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlert a Dependabot alert. +type DependabotAlert struct { + // The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + auto_dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Details for the vulnerable dependency. + dependency DependabotAlert_dependencyable + // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissed_by NullableSimpleUserable + // An optional comment associated with the alert's dismissal. + dismissed_comment *string + // The reason that the alert was dismissed. + dismissed_reason *DependabotAlert_dismissed_reason + // The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + fixed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The security alert number. + number *int32 + // Details for the GitHub Security Advisory. + security_advisory DependabotAlertSecurityAdvisoryable + // Details pertaining to one vulnerable version range for the advisory. + security_vulnerability DependabotAlertSecurityVulnerabilityable + // The state of the Dependabot alert. + state *DependabotAlert_state + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string +} +// NewDependabotAlert instantiates a new DependabotAlert and sets the default values. +func NewDependabotAlert()(*DependabotAlert) { + m := &DependabotAlert{ + } + return m +} +// CreateDependabotAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlert(), nil +} +// GetAutoDismissedAt gets the auto_dismissed_at property value. The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlert) GetAutoDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.auto_dismissed_at +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlert) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDependency gets the dependency property value. Details for the vulnerable dependency. +// returns a DependabotAlert_dependencyable when successful +func (m *DependabotAlert) GetDependency()(DependabotAlert_dependencyable) { + return m.dependency +} +// GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlert) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dismissed_at +} +// GetDismissedBy gets the dismissed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *DependabotAlert) GetDismissedBy()(NullableSimpleUserable) { + return m.dismissed_by +} +// GetDismissedComment gets the dismissed_comment property value. An optional comment associated with the alert's dismissal. +// returns a *string when successful +func (m *DependabotAlert) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetDismissedReason gets the dismissed_reason property value. The reason that the alert was dismissed. +// returns a *DependabotAlert_dismissed_reason when successful +func (m *DependabotAlert) GetDismissedReason()(*DependabotAlert_dismissed_reason) { + return m.dismissed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auto_dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoDismissedAt(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dependency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlert_dependencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependency(val.(DependabotAlert_dependencyable)) + } + return nil + } + res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedAt(val) + } + return nil + } + res["dismissed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + res["dismissed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlert_dismissed_reason) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReason(val.(*DependabotAlert_dismissed_reason)) + } + return nil + } + res["fixed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFixedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["security_advisory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertSecurityAdvisoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAdvisory(val.(DependabotAlertSecurityAdvisoryable)) + } + return nil + } + res["security_vulnerability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertSecurityVulnerabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityVulnerability(val.(DependabotAlertSecurityVulnerabilityable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlert_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*DependabotAlert_state)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFixedAt gets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlert) GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fixed_at +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *DependabotAlert) GetHtmlUrl()(*string) { + return m.html_url +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *DependabotAlert) GetNumber()(*int32) { + return m.number +} +// GetSecurityAdvisory gets the security_advisory property value. Details for the GitHub Security Advisory. +// returns a DependabotAlertSecurityAdvisoryable when successful +func (m *DependabotAlert) GetSecurityAdvisory()(DependabotAlertSecurityAdvisoryable) { + return m.security_advisory +} +// GetSecurityVulnerability gets the security_vulnerability property value. Details pertaining to one vulnerable version range for the advisory. +// returns a DependabotAlertSecurityVulnerabilityable when successful +func (m *DependabotAlert) GetSecurityVulnerability()(DependabotAlertSecurityVulnerabilityable) { + return m.security_vulnerability +} +// GetState gets the state property value. The state of the Dependabot alert. +// returns a *DependabotAlert_state when successful +func (m *DependabotAlert) GetState()(*DependabotAlert_state) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlert) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *DependabotAlert) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DependabotAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + if m.GetDismissedReason() != nil { + cast := (*m.GetDismissedReason()).String() + err := writer.WriteStringValue("dismissed_reason", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAutoDismissedAt sets the auto_dismissed_at property value. The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlert) SetAutoDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.auto_dismissed_at = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlert) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDependency sets the dependency property value. Details for the vulnerable dependency. +func (m *DependabotAlert) SetDependency(value DependabotAlert_dependencyable)() { + m.dependency = value +} +// SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlert) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dismissed_at = value +} +// SetDismissedBy sets the dismissed_by property value. A GitHub user. +func (m *DependabotAlert) SetDismissedBy(value NullableSimpleUserable)() { + m.dismissed_by = value +} +// SetDismissedComment sets the dismissed_comment property value. An optional comment associated with the alert's dismissal. +func (m *DependabotAlert) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +// SetDismissedReason sets the dismissed_reason property value. The reason that the alert was dismissed. +func (m *DependabotAlert) SetDismissedReason(value *DependabotAlert_dismissed_reason)() { + m.dismissed_reason = value +} +// SetFixedAt sets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlert) SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fixed_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *DependabotAlert) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetNumber sets the number property value. The security alert number. +func (m *DependabotAlert) SetNumber(value *int32)() { + m.number = value +} +// SetSecurityAdvisory sets the security_advisory property value. Details for the GitHub Security Advisory. +func (m *DependabotAlert) SetSecurityAdvisory(value DependabotAlertSecurityAdvisoryable)() { + m.security_advisory = value +} +// SetSecurityVulnerability sets the security_vulnerability property value. Details pertaining to one vulnerable version range for the advisory. +func (m *DependabotAlert) SetSecurityVulnerability(value DependabotAlertSecurityVulnerabilityable)() { + m.security_vulnerability = value +} +// SetState sets the state property value. The state of the Dependabot alert. +func (m *DependabotAlert) SetState(value *DependabotAlert_state)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlert) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *DependabotAlert) SetUrl(value *string)() { + m.url = value +} +type DependabotAlertable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDependency()(DependabotAlert_dependencyable) + GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedBy()(NullableSimpleUserable) + GetDismissedComment()(*string) + GetDismissedReason()(*DependabotAlert_dismissed_reason) + GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetNumber()(*int32) + GetSecurityAdvisory()(DependabotAlertSecurityAdvisoryable) + GetSecurityVulnerability()(DependabotAlertSecurityVulnerabilityable) + GetState()(*DependabotAlert_state) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAutoDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDependency(value DependabotAlert_dependencyable)() + SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedBy(value NullableSimpleUserable)() + SetDismissedComment(value *string)() + SetDismissedReason(value *DependabotAlert_dismissed_reason)() + SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetNumber(value *int32)() + SetSecurityAdvisory(value DependabotAlertSecurityAdvisoryable)() + SetSecurityVulnerability(value DependabotAlertSecurityVulnerabilityable)() + SetState(value *DependabotAlert_state)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_dependency.go b/pkg/github/models/dependabot_alert_dependency.go new file mode 100644 index 0000000..560bb6f --- /dev/null +++ b/pkg/github/models/dependabot_alert_dependency.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlert_dependency details for the vulnerable dependency. +type DependabotAlert_dependency struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The full path to the dependency manifest file, relative to the root of the repository. + manifest_path *string + // Details for the vulnerable package. + packageEscaped DependabotAlertPackageable + // The execution scope of the vulnerable dependency. + scope *DependabotAlert_dependency_scope +} +// NewDependabotAlert_dependency instantiates a new DependabotAlert_dependency and sets the default values. +func NewDependabotAlert_dependency()(*DependabotAlert_dependency) { + m := &DependabotAlert_dependency{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependabotAlert_dependencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlert_dependencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlert_dependency(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependabotAlert_dependency) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlert_dependency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["manifest_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManifestPath(val) + } + return nil + } + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(DependabotAlertPackageable)) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlert_dependency_scope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*DependabotAlert_dependency_scope)) + } + return nil + } + return res +} +// GetManifestPath gets the manifest_path property value. The full path to the dependency manifest file, relative to the root of the repository. +// returns a *string when successful +func (m *DependabotAlert_dependency) GetManifestPath()(*string) { + return m.manifest_path +} +// GetPackageEscaped gets the package property value. Details for the vulnerable package. +// returns a DependabotAlertPackageable when successful +func (m *DependabotAlert_dependency) GetPackageEscaped()(DependabotAlertPackageable) { + return m.packageEscaped +} +// GetScope gets the scope property value. The execution scope of the vulnerable dependency. +// returns a *DependabotAlert_dependency_scope when successful +func (m *DependabotAlert_dependency) GetScope()(*DependabotAlert_dependency_scope) { + return m.scope +} +// Serialize serializes information the current object +func (m *DependabotAlert_dependency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependabotAlert_dependency) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetManifestPath sets the manifest_path property value. The full path to the dependency manifest file, relative to the root of the repository. +func (m *DependabotAlert_dependency) SetManifestPath(value *string)() { + m.manifest_path = value +} +// SetPackageEscaped sets the package property value. Details for the vulnerable package. +func (m *DependabotAlert_dependency) SetPackageEscaped(value DependabotAlertPackageable)() { + m.packageEscaped = value +} +// SetScope sets the scope property value. The execution scope of the vulnerable dependency. +func (m *DependabotAlert_dependency) SetScope(value *DependabotAlert_dependency_scope)() { + m.scope = value +} +type DependabotAlert_dependencyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetManifestPath()(*string) + GetPackageEscaped()(DependabotAlertPackageable) + GetScope()(*DependabotAlert_dependency_scope) + SetManifestPath(value *string)() + SetPackageEscaped(value DependabotAlertPackageable)() + SetScope(value *DependabotAlert_dependency_scope)() +} diff --git a/pkg/github/models/dependabot_alert_dependency_scope.go b/pkg/github/models/dependabot_alert_dependency_scope.go new file mode 100644 index 0000000..4daff2e --- /dev/null +++ b/pkg/github/models/dependabot_alert_dependency_scope.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The execution scope of the vulnerable dependency. +type DependabotAlert_dependency_scope int + +const ( + DEVELOPMENT_DEPENDABOTALERT_DEPENDENCY_SCOPE DependabotAlert_dependency_scope = iota + RUNTIME_DEPENDABOTALERT_DEPENDENCY_SCOPE +) + +func (i DependabotAlert_dependency_scope) String() string { + return []string{"development", "runtime"}[i] +} +func ParseDependabotAlert_dependency_scope(v string) (any, error) { + result := DEVELOPMENT_DEPENDABOTALERT_DEPENDENCY_SCOPE + switch v { + case "development": + result = DEVELOPMENT_DEPENDABOTALERT_DEPENDENCY_SCOPE + case "runtime": + result = RUNTIME_DEPENDABOTALERT_DEPENDENCY_SCOPE + default: + return 0, errors.New("Unknown DependabotAlert_dependency_scope value: " + v) + } + return &result, nil +} +func SerializeDependabotAlert_dependency_scope(values []DependabotAlert_dependency_scope) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlert_dependency_scope) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_dismissed_reason.go b/pkg/github/models/dependabot_alert_dismissed_reason.go new file mode 100644 index 0000000..6226c65 --- /dev/null +++ b/pkg/github/models/dependabot_alert_dismissed_reason.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The reason that the alert was dismissed. +type DependabotAlert_dismissed_reason int + +const ( + FIX_STARTED_DEPENDABOTALERT_DISMISSED_REASON DependabotAlert_dismissed_reason = iota + INACCURATE_DEPENDABOTALERT_DISMISSED_REASON + NO_BANDWIDTH_DEPENDABOTALERT_DISMISSED_REASON + NOT_USED_DEPENDABOTALERT_DISMISSED_REASON + TOLERABLE_RISK_DEPENDABOTALERT_DISMISSED_REASON +) + +func (i DependabotAlert_dismissed_reason) String() string { + return []string{"fix_started", "inaccurate", "no_bandwidth", "not_used", "tolerable_risk"}[i] +} +func ParseDependabotAlert_dismissed_reason(v string) (any, error) { + result := FIX_STARTED_DEPENDABOTALERT_DISMISSED_REASON + switch v { + case "fix_started": + result = FIX_STARTED_DEPENDABOTALERT_DISMISSED_REASON + case "inaccurate": + result = INACCURATE_DEPENDABOTALERT_DISMISSED_REASON + case "no_bandwidth": + result = NO_BANDWIDTH_DEPENDABOTALERT_DISMISSED_REASON + case "not_used": + result = NOT_USED_DEPENDABOTALERT_DISMISSED_REASON + case "tolerable_risk": + result = TOLERABLE_RISK_DEPENDABOTALERT_DISMISSED_REASON + default: + return 0, errors.New("Unknown DependabotAlert_dismissed_reason value: " + v) + } + return &result, nil +} +func SerializeDependabotAlert_dismissed_reason(values []DependabotAlert_dismissed_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlert_dismissed_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_package.go b/pkg/github/models/dependabot_alert_package.go new file mode 100644 index 0000000..f142485 --- /dev/null +++ b/pkg/github/models/dependabot_alert_package.go @@ -0,0 +1,79 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertPackage details for the vulnerable package. +type DependabotAlertPackage struct { + // The package's language or package management ecosystem. + ecosystem *string + // The unique package name within its ecosystem. + name *string +} +// NewDependabotAlertPackage instantiates a new DependabotAlertPackage and sets the default values. +func NewDependabotAlertPackage()(*DependabotAlertPackage) { + m := &DependabotAlertPackage{ + } + return m +} +// CreateDependabotAlertPackageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertPackageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertPackage(), nil +} +// GetEcosystem gets the ecosystem property value. The package's language or package management ecosystem. +// returns a *string when successful +func (m *DependabotAlertPackage) GetEcosystem()(*string) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertPackage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(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 + } + return res +} +// GetName gets the name property value. The unique package name within its ecosystem. +// returns a *string when successful +func (m *DependabotAlertPackage) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *DependabotAlertPackage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetEcosystem sets the ecosystem property value. The package's language or package management ecosystem. +func (m *DependabotAlertPackage) SetEcosystem(value *string)() { + m.ecosystem = value +} +// SetName sets the name property value. The unique package name within its ecosystem. +func (m *DependabotAlertPackage) SetName(value *string)() { + m.name = value +} +type DependabotAlertPackageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystem()(*string) + GetName()(*string) + SetEcosystem(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_advisory.go b/pkg/github/models/dependabot_alert_security_advisory.go new file mode 100644 index 0000000..3d1cdad --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory.go @@ -0,0 +1,357 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityAdvisory details for the GitHub Security Advisory. +type DependabotAlertSecurityAdvisory struct { + // The unique CVE ID assigned to the advisory. + cve_id *string + // Details for the advisory pertaining to the Common Vulnerability Scoring System. + cvss DependabotAlertSecurityAdvisory_cvssable + // Details for the advisory pertaining to Common Weakness Enumeration. + cwes []DependabotAlertSecurityAdvisory_cwesable + // A long-form Markdown-supported description of the advisory. + description *string + // The unique GitHub Security Advisory ID assigned to the advisory. + ghsa_id *string + // Values that identify this advisory among security information sources. + identifiers []DependabotAlertSecurityAdvisory_identifiersable + // The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + published_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Links to additional advisory information. + references []DependabotAlertSecurityAdvisory_referencesable + // The severity of the advisory. + severity *DependabotAlertSecurityAdvisory_severity + // A short, plain text summary of the advisory. + summary *string + // The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Vulnerable version range information for the advisory. + vulnerabilities []DependabotAlertSecurityVulnerabilityable + // The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + withdrawn_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDependabotAlertSecurityAdvisory instantiates a new DependabotAlertSecurityAdvisory and sets the default values. +func NewDependabotAlertSecurityAdvisory()(*DependabotAlertSecurityAdvisory) { + m := &DependabotAlertSecurityAdvisory{ + } + return m +} +// CreateDependabotAlertSecurityAdvisoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityAdvisoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityAdvisory(), nil +} +// GetCveId gets the cve_id property value. The unique CVE ID assigned to the advisory. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory) GetCveId()(*string) { + return m.cve_id +} +// GetCvss gets the cvss property value. Details for the advisory pertaining to the Common Vulnerability Scoring System. +// returns a DependabotAlertSecurityAdvisory_cvssable when successful +func (m *DependabotAlertSecurityAdvisory) GetCvss()(DependabotAlertSecurityAdvisory_cvssable) { + return m.cvss +} +// GetCwes gets the cwes property value. Details for the advisory pertaining to Common Weakness Enumeration. +// returns a []DependabotAlertSecurityAdvisory_cwesable when successful +func (m *DependabotAlertSecurityAdvisory) GetCwes()([]DependabotAlertSecurityAdvisory_cwesable) { + return m.cwes +} +// GetDescription gets the description property value. A long-form Markdown-supported description of the advisory. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityAdvisory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cve_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCveId(val) + } + return nil + } + res["cvss"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertSecurityAdvisory_cvssFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCvss(val.(DependabotAlertSecurityAdvisory_cvssable)) + } + return nil + } + res["cwes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependabotAlertSecurityAdvisory_cwesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependabotAlertSecurityAdvisory_cwesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependabotAlertSecurityAdvisory_cwesable) + } + } + m.SetCwes(res) + } + 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["ghsa_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGhsaId(val) + } + return nil + } + res["identifiers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependabotAlertSecurityAdvisory_identifiersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependabotAlertSecurityAdvisory_identifiersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependabotAlertSecurityAdvisory_identifiersable) + } + } + m.SetIdentifiers(res) + } + return nil + } + res["published_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedAt(val) + } + return nil + } + res["references"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependabotAlertSecurityAdvisory_referencesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependabotAlertSecurityAdvisory_referencesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependabotAlertSecurityAdvisory_referencesable) + } + } + m.SetReferences(res) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertSecurityAdvisory_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*DependabotAlertSecurityAdvisory_severity)) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependabotAlertSecurityVulnerabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependabotAlertSecurityVulnerabilityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependabotAlertSecurityVulnerabilityable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + res["withdrawn_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWithdrawnAt(val) + } + return nil + } + return res +} +// GetGhsaId gets the ghsa_id property value. The unique GitHub Security Advisory ID assigned to the advisory. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory) GetGhsaId()(*string) { + return m.ghsa_id +} +// GetIdentifiers gets the identifiers property value. Values that identify this advisory among security information sources. +// returns a []DependabotAlertSecurityAdvisory_identifiersable when successful +func (m *DependabotAlertSecurityAdvisory) GetIdentifiers()([]DependabotAlertSecurityAdvisory_identifiersable) { + return m.identifiers +} +// GetPublishedAt gets the published_at property value. The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertSecurityAdvisory) GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.published_at +} +// GetReferences gets the references property value. Links to additional advisory information. +// returns a []DependabotAlertSecurityAdvisory_referencesable when successful +func (m *DependabotAlertSecurityAdvisory) GetReferences()([]DependabotAlertSecurityAdvisory_referencesable) { + return m.references +} +// GetSeverity gets the severity property value. The severity of the advisory. +// returns a *DependabotAlertSecurityAdvisory_severity when successful +func (m *DependabotAlertSecurityAdvisory) GetSeverity()(*DependabotAlertSecurityAdvisory_severity) { + return m.severity +} +// GetSummary gets the summary property value. A short, plain text summary of the advisory. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory) GetSummary()(*string) { + return m.summary +} +// GetUpdatedAt gets the updated_at property value. The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertSecurityAdvisory) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetVulnerabilities gets the vulnerabilities property value. Vulnerable version range information for the advisory. +// returns a []DependabotAlertSecurityVulnerabilityable when successful +func (m *DependabotAlertSecurityAdvisory) GetVulnerabilities()([]DependabotAlertSecurityVulnerabilityable) { + return m.vulnerabilities +} +// GetWithdrawnAt gets the withdrawn_at property value. The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertSecurityAdvisory) GetWithdrawnAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.withdrawn_at +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityAdvisory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetCveId sets the cve_id property value. The unique CVE ID assigned to the advisory. +func (m *DependabotAlertSecurityAdvisory) SetCveId(value *string)() { + m.cve_id = value +} +// SetCvss sets the cvss property value. Details for the advisory pertaining to the Common Vulnerability Scoring System. +func (m *DependabotAlertSecurityAdvisory) SetCvss(value DependabotAlertSecurityAdvisory_cvssable)() { + m.cvss = value +} +// SetCwes sets the cwes property value. Details for the advisory pertaining to Common Weakness Enumeration. +func (m *DependabotAlertSecurityAdvisory) SetCwes(value []DependabotAlertSecurityAdvisory_cwesable)() { + m.cwes = value +} +// SetDescription sets the description property value. A long-form Markdown-supported description of the advisory. +func (m *DependabotAlertSecurityAdvisory) SetDescription(value *string)() { + m.description = value +} +// SetGhsaId sets the ghsa_id property value. The unique GitHub Security Advisory ID assigned to the advisory. +func (m *DependabotAlertSecurityAdvisory) SetGhsaId(value *string)() { + m.ghsa_id = value +} +// SetIdentifiers sets the identifiers property value. Values that identify this advisory among security information sources. +func (m *DependabotAlertSecurityAdvisory) SetIdentifiers(value []DependabotAlertSecurityAdvisory_identifiersable)() { + m.identifiers = value +} +// SetPublishedAt sets the published_at property value. The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertSecurityAdvisory) SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.published_at = value +} +// SetReferences sets the references property value. Links to additional advisory information. +func (m *DependabotAlertSecurityAdvisory) SetReferences(value []DependabotAlertSecurityAdvisory_referencesable)() { + m.references = value +} +// SetSeverity sets the severity property value. The severity of the advisory. +func (m *DependabotAlertSecurityAdvisory) SetSeverity(value *DependabotAlertSecurityAdvisory_severity)() { + m.severity = value +} +// SetSummary sets the summary property value. A short, plain text summary of the advisory. +func (m *DependabotAlertSecurityAdvisory) SetSummary(value *string)() { + m.summary = value +} +// SetUpdatedAt sets the updated_at property value. The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertSecurityAdvisory) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetVulnerabilities sets the vulnerabilities property value. Vulnerable version range information for the advisory. +func (m *DependabotAlertSecurityAdvisory) SetVulnerabilities(value []DependabotAlertSecurityVulnerabilityable)() { + m.vulnerabilities = value +} +// SetWithdrawnAt sets the withdrawn_at property value. The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertSecurityAdvisory) SetWithdrawnAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.withdrawn_at = value +} +type DependabotAlertSecurityAdvisoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCveId()(*string) + GetCvss()(DependabotAlertSecurityAdvisory_cvssable) + GetCwes()([]DependabotAlertSecurityAdvisory_cwesable) + GetDescription()(*string) + GetGhsaId()(*string) + GetIdentifiers()([]DependabotAlertSecurityAdvisory_identifiersable) + GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReferences()([]DependabotAlertSecurityAdvisory_referencesable) + GetSeverity()(*DependabotAlertSecurityAdvisory_severity) + GetSummary()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVulnerabilities()([]DependabotAlertSecurityVulnerabilityable) + GetWithdrawnAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCveId(value *string)() + SetCvss(value DependabotAlertSecurityAdvisory_cvssable)() + SetCwes(value []DependabotAlertSecurityAdvisory_cwesable)() + SetDescription(value *string)() + SetGhsaId(value *string)() + SetIdentifiers(value []DependabotAlertSecurityAdvisory_identifiersable)() + SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReferences(value []DependabotAlertSecurityAdvisory_referencesable)() + SetSeverity(value *DependabotAlertSecurityAdvisory_severity)() + SetSummary(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVulnerabilities(value []DependabotAlertSecurityVulnerabilityable)() + SetWithdrawnAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/dependabot_alert_security_advisory_cvss.go b/pkg/github/models/dependabot_alert_security_advisory_cvss.go new file mode 100644 index 0000000..61ad5b9 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory_cvss.go @@ -0,0 +1,79 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityAdvisory_cvss details for the advisory pertaining to the Common Vulnerability Scoring System. +type DependabotAlertSecurityAdvisory_cvss struct { + // The overall CVSS score of the advisory. + score *float64 + // The full CVSS vector string for the advisory. + vector_string *string +} +// NewDependabotAlertSecurityAdvisory_cvss instantiates a new DependabotAlertSecurityAdvisory_cvss and sets the default values. +func NewDependabotAlertSecurityAdvisory_cvss()(*DependabotAlertSecurityAdvisory_cvss) { + m := &DependabotAlertSecurityAdvisory_cvss{ + } + return m +} +// CreateDependabotAlertSecurityAdvisory_cvssFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityAdvisory_cvssFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityAdvisory_cvss(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityAdvisory_cvss) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["vector_string"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVectorString(val) + } + return nil + } + return res +} +// GetScore gets the score property value. The overall CVSS score of the advisory. +// returns a *float64 when successful +func (m *DependabotAlertSecurityAdvisory_cvss) GetScore()(*float64) { + return m.score +} +// GetVectorString gets the vector_string property value. The full CVSS vector string for the advisory. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory_cvss) GetVectorString()(*string) { + return m.vector_string +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityAdvisory_cvss) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetScore sets the score property value. The overall CVSS score of the advisory. +func (m *DependabotAlertSecurityAdvisory_cvss) SetScore(value *float64)() { + m.score = value +} +// SetVectorString sets the vector_string property value. The full CVSS vector string for the advisory. +func (m *DependabotAlertSecurityAdvisory_cvss) SetVectorString(value *string)() { + m.vector_string = value +} +type DependabotAlertSecurityAdvisory_cvssable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetScore()(*float64) + GetVectorString()(*string) + SetScore(value *float64)() + SetVectorString(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_advisory_cwes.go b/pkg/github/models/dependabot_alert_security_advisory_cwes.go new file mode 100644 index 0000000..27e24d1 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory_cwes.go @@ -0,0 +1,79 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityAdvisory_cwes a CWE weakness assigned to the advisory. +type DependabotAlertSecurityAdvisory_cwes struct { + // The unique CWE ID. + cwe_id *string + // The short, plain text name of the CWE. + name *string +} +// NewDependabotAlertSecurityAdvisory_cwes instantiates a new DependabotAlertSecurityAdvisory_cwes and sets the default values. +func NewDependabotAlertSecurityAdvisory_cwes()(*DependabotAlertSecurityAdvisory_cwes) { + m := &DependabotAlertSecurityAdvisory_cwes{ + } + return m +} +// CreateDependabotAlertSecurityAdvisory_cwesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityAdvisory_cwesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityAdvisory_cwes(), nil +} +// GetCweId gets the cwe_id property value. The unique CWE ID. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory_cwes) GetCweId()(*string) { + return m.cwe_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityAdvisory_cwes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cwe_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCweId(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 + } + return res +} +// GetName gets the name property value. The short, plain text name of the CWE. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory_cwes) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityAdvisory_cwes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetCweId sets the cwe_id property value. The unique CWE ID. +func (m *DependabotAlertSecurityAdvisory_cwes) SetCweId(value *string)() { + m.cwe_id = value +} +// SetName sets the name property value. The short, plain text name of the CWE. +func (m *DependabotAlertSecurityAdvisory_cwes) SetName(value *string)() { + m.name = value +} +type DependabotAlertSecurityAdvisory_cwesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCweId()(*string) + GetName()(*string) + SetCweId(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_advisory_identifiers.go b/pkg/github/models/dependabot_alert_security_advisory_identifiers.go new file mode 100644 index 0000000..35b54af --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory_identifiers.go @@ -0,0 +1,79 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityAdvisory_identifiers an advisory identifier. +type DependabotAlertSecurityAdvisory_identifiers struct { + // The type of advisory identifier. + typeEscaped *DependabotAlertSecurityAdvisory_identifiers_type + // The value of the advisory identifer. + value *string +} +// NewDependabotAlertSecurityAdvisory_identifiers instantiates a new DependabotAlertSecurityAdvisory_identifiers and sets the default values. +func NewDependabotAlertSecurityAdvisory_identifiers()(*DependabotAlertSecurityAdvisory_identifiers) { + m := &DependabotAlertSecurityAdvisory_identifiers{ + } + return m +} +// CreateDependabotAlertSecurityAdvisory_identifiersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityAdvisory_identifiersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityAdvisory_identifiers(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityAdvisory_identifiers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertSecurityAdvisory_identifiers_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*DependabotAlertSecurityAdvisory_identifiers_type)) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type of advisory identifier. +// returns a *DependabotAlertSecurityAdvisory_identifiers_type when successful +func (m *DependabotAlertSecurityAdvisory_identifiers) GetTypeEscaped()(*DependabotAlertSecurityAdvisory_identifiers_type) { + return m.typeEscaped +} +// GetValue gets the value property value. The value of the advisory identifer. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory_identifiers) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityAdvisory_identifiers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetTypeEscaped sets the type property value. The type of advisory identifier. +func (m *DependabotAlertSecurityAdvisory_identifiers) SetTypeEscaped(value *DependabotAlertSecurityAdvisory_identifiers_type)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The value of the advisory identifer. +func (m *DependabotAlertSecurityAdvisory_identifiers) SetValue(value *string)() { + m.value = value +} +type DependabotAlertSecurityAdvisory_identifiersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*DependabotAlertSecurityAdvisory_identifiers_type) + GetValue()(*string) + SetTypeEscaped(value *DependabotAlertSecurityAdvisory_identifiers_type)() + SetValue(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go b/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go new file mode 100644 index 0000000..dad68d1 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of advisory identifier. +type DependabotAlertSecurityAdvisory_identifiers_type int + +const ( + CVE_DEPENDABOTALERTSECURITYADVISORY_IDENTIFIERS_TYPE DependabotAlertSecurityAdvisory_identifiers_type = iota + GHSA_DEPENDABOTALERTSECURITYADVISORY_IDENTIFIERS_TYPE +) + +func (i DependabotAlertSecurityAdvisory_identifiers_type) String() string { + return []string{"CVE", "GHSA"}[i] +} +func ParseDependabotAlertSecurityAdvisory_identifiers_type(v string) (any, error) { + result := CVE_DEPENDABOTALERTSECURITYADVISORY_IDENTIFIERS_TYPE + switch v { + case "CVE": + result = CVE_DEPENDABOTALERTSECURITYADVISORY_IDENTIFIERS_TYPE + case "GHSA": + result = GHSA_DEPENDABOTALERTSECURITYADVISORY_IDENTIFIERS_TYPE + default: + return 0, errors.New("Unknown DependabotAlertSecurityAdvisory_identifiers_type value: " + v) + } + return &result, nil +} +func SerializeDependabotAlertSecurityAdvisory_identifiers_type(values []DependabotAlertSecurityAdvisory_identifiers_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertSecurityAdvisory_identifiers_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_security_advisory_references.go b/pkg/github/models/dependabot_alert_security_advisory_references.go new file mode 100644 index 0000000..5211330 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory_references.go @@ -0,0 +1,56 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityAdvisory_references a link to additional advisory information. +type DependabotAlertSecurityAdvisory_references struct { + // The URL of the reference. + url *string +} +// NewDependabotAlertSecurityAdvisory_references instantiates a new DependabotAlertSecurityAdvisory_references and sets the default values. +func NewDependabotAlertSecurityAdvisory_references()(*DependabotAlertSecurityAdvisory_references) { + m := &DependabotAlertSecurityAdvisory_references{ + } + return m +} +// CreateDependabotAlertSecurityAdvisory_referencesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityAdvisory_referencesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityAdvisory_references(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityAdvisory_references) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The URL of the reference. +// returns a *string when successful +func (m *DependabotAlertSecurityAdvisory_references) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityAdvisory_references) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetUrl sets the url property value. The URL of the reference. +func (m *DependabotAlertSecurityAdvisory_references) SetUrl(value *string)() { + m.url = value +} +type DependabotAlertSecurityAdvisory_referencesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUrl()(*string) + SetUrl(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_advisory_severity.go b/pkg/github/models/dependabot_alert_security_advisory_severity.go new file mode 100644 index 0000000..8de14c8 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_advisory_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the advisory. +type DependabotAlertSecurityAdvisory_severity int + +const ( + LOW_DEPENDABOTALERTSECURITYADVISORY_SEVERITY DependabotAlertSecurityAdvisory_severity = iota + MEDIUM_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + HIGH_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + CRITICAL_DEPENDABOTALERTSECURITYADVISORY_SEVERITY +) + +func (i DependabotAlertSecurityAdvisory_severity) String() string { + return []string{"low", "medium", "high", "critical"}[i] +} +func ParseDependabotAlertSecurityAdvisory_severity(v string) (any, error) { + result := LOW_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + switch v { + case "low": + result = LOW_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + case "medium": + result = MEDIUM_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + case "high": + result = HIGH_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + case "critical": + result = CRITICAL_DEPENDABOTALERTSECURITYADVISORY_SEVERITY + default: + return 0, errors.New("Unknown DependabotAlertSecurityAdvisory_severity value: " + v) + } + return &result, nil +} +func SerializeDependabotAlertSecurityAdvisory_severity(values []DependabotAlertSecurityAdvisory_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertSecurityAdvisory_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_security_vulnerability.go b/pkg/github/models/dependabot_alert_security_vulnerability.go new file mode 100644 index 0000000..310fad1 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_vulnerability.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityVulnerability details pertaining to one vulnerable version range for the advisory. +type DependabotAlertSecurityVulnerability struct { + // Details pertaining to the package version that patches this vulnerability. + first_patched_version DependabotAlertSecurityVulnerability_first_patched_versionable + // Details for the vulnerable package. + packageEscaped DependabotAlertPackageable + // The severity of the vulnerability. + severity *DependabotAlertSecurityVulnerability_severity + // Conditions that identify vulnerable versions of this vulnerability's package. + vulnerable_version_range *string +} +// NewDependabotAlertSecurityVulnerability instantiates a new DependabotAlertSecurityVulnerability and sets the default values. +func NewDependabotAlertSecurityVulnerability()(*DependabotAlertSecurityVulnerability) { + m := &DependabotAlertSecurityVulnerability{ + } + return m +} +// CreateDependabotAlertSecurityVulnerabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityVulnerabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityVulnerability(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityVulnerability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["first_patched_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertSecurityVulnerability_first_patched_versionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFirstPatchedVersion(val.(DependabotAlertSecurityVulnerability_first_patched_versionable)) + } + return nil + } + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(DependabotAlertPackageable)) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertSecurityVulnerability_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*DependabotAlertSecurityVulnerability_severity)) + } + return nil + } + res["vulnerable_version_range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVulnerableVersionRange(val) + } + return nil + } + return res +} +// GetFirstPatchedVersion gets the first_patched_version property value. Details pertaining to the package version that patches this vulnerability. +// returns a DependabotAlertSecurityVulnerability_first_patched_versionable when successful +func (m *DependabotAlertSecurityVulnerability) GetFirstPatchedVersion()(DependabotAlertSecurityVulnerability_first_patched_versionable) { + return m.first_patched_version +} +// GetPackageEscaped gets the package property value. Details for the vulnerable package. +// returns a DependabotAlertPackageable when successful +func (m *DependabotAlertSecurityVulnerability) GetPackageEscaped()(DependabotAlertPackageable) { + return m.packageEscaped +} +// GetSeverity gets the severity property value. The severity of the vulnerability. +// returns a *DependabotAlertSecurityVulnerability_severity when successful +func (m *DependabotAlertSecurityVulnerability) GetSeverity()(*DependabotAlertSecurityVulnerability_severity) { + return m.severity +} +// GetVulnerableVersionRange gets the vulnerable_version_range property value. Conditions that identify vulnerable versions of this vulnerability's package. +// returns a *string when successful +func (m *DependabotAlertSecurityVulnerability) GetVulnerableVersionRange()(*string) { + return m.vulnerable_version_range +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityVulnerability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetFirstPatchedVersion sets the first_patched_version property value. Details pertaining to the package version that patches this vulnerability. +func (m *DependabotAlertSecurityVulnerability) SetFirstPatchedVersion(value DependabotAlertSecurityVulnerability_first_patched_versionable)() { + m.first_patched_version = value +} +// SetPackageEscaped sets the package property value. Details for the vulnerable package. +func (m *DependabotAlertSecurityVulnerability) SetPackageEscaped(value DependabotAlertPackageable)() { + m.packageEscaped = value +} +// SetSeverity sets the severity property value. The severity of the vulnerability. +func (m *DependabotAlertSecurityVulnerability) SetSeverity(value *DependabotAlertSecurityVulnerability_severity)() { + m.severity = value +} +// SetVulnerableVersionRange sets the vulnerable_version_range property value. Conditions that identify vulnerable versions of this vulnerability's package. +func (m *DependabotAlertSecurityVulnerability) SetVulnerableVersionRange(value *string)() { + m.vulnerable_version_range = value +} +type DependabotAlertSecurityVulnerabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFirstPatchedVersion()(DependabotAlertSecurityVulnerability_first_patched_versionable) + GetPackageEscaped()(DependabotAlertPackageable) + GetSeverity()(*DependabotAlertSecurityVulnerability_severity) + GetVulnerableVersionRange()(*string) + SetFirstPatchedVersion(value DependabotAlertSecurityVulnerability_first_patched_versionable)() + SetPackageEscaped(value DependabotAlertPackageable)() + SetSeverity(value *DependabotAlertSecurityVulnerability_severity)() + SetVulnerableVersionRange(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_vulnerability_first_patched_version.go b/pkg/github/models/dependabot_alert_security_vulnerability_first_patched_version.go new file mode 100644 index 0000000..bd96c08 --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_vulnerability_first_patched_version.go @@ -0,0 +1,56 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertSecurityVulnerability_first_patched_version details pertaining to the package version that patches this vulnerability. +type DependabotAlertSecurityVulnerability_first_patched_version struct { + // The package version that patches this vulnerability. + identifier *string +} +// NewDependabotAlertSecurityVulnerability_first_patched_version instantiates a new DependabotAlertSecurityVulnerability_first_patched_version and sets the default values. +func NewDependabotAlertSecurityVulnerability_first_patched_version()(*DependabotAlertSecurityVulnerability_first_patched_version) { + m := &DependabotAlertSecurityVulnerability_first_patched_version{ + } + return m +} +// CreateDependabotAlertSecurityVulnerability_first_patched_versionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertSecurityVulnerability_first_patched_versionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertSecurityVulnerability_first_patched_version(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertSecurityVulnerability_first_patched_version) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentifier(val) + } + return nil + } + return res +} +// GetIdentifier gets the identifier property value. The package version that patches this vulnerability. +// returns a *string when successful +func (m *DependabotAlertSecurityVulnerability_first_patched_version) GetIdentifier()(*string) { + return m.identifier +} +// Serialize serializes information the current object +func (m *DependabotAlertSecurityVulnerability_first_patched_version) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +// SetIdentifier sets the identifier property value. The package version that patches this vulnerability. +func (m *DependabotAlertSecurityVulnerability_first_patched_version) SetIdentifier(value *string)() { + m.identifier = value +} +type DependabotAlertSecurityVulnerability_first_patched_versionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentifier()(*string) + SetIdentifier(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_security_vulnerability_severity.go b/pkg/github/models/dependabot_alert_security_vulnerability_severity.go new file mode 100644 index 0000000..627c1cc --- /dev/null +++ b/pkg/github/models/dependabot_alert_security_vulnerability_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the vulnerability. +type DependabotAlertSecurityVulnerability_severity int + +const ( + LOW_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY DependabotAlertSecurityVulnerability_severity = iota + MEDIUM_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + HIGH_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + CRITICAL_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY +) + +func (i DependabotAlertSecurityVulnerability_severity) String() string { + return []string{"low", "medium", "high", "critical"}[i] +} +func ParseDependabotAlertSecurityVulnerability_severity(v string) (any, error) { + result := LOW_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + switch v { + case "low": + result = LOW_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + case "medium": + result = MEDIUM_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + case "high": + result = HIGH_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + case "critical": + result = CRITICAL_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY + default: + return 0, errors.New("Unknown DependabotAlertSecurityVulnerability_severity value: " + v) + } + return &result, nil +} +func SerializeDependabotAlertSecurityVulnerability_severity(values []DependabotAlertSecurityVulnerability_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertSecurityVulnerability_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_state.go b/pkg/github/models/dependabot_alert_state.go new file mode 100644 index 0000000..d50a35d --- /dev/null +++ b/pkg/github/models/dependabot_alert_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The state of the Dependabot alert. +type DependabotAlert_state int + +const ( + AUTO_DISMISSED_DEPENDABOTALERT_STATE DependabotAlert_state = iota + DISMISSED_DEPENDABOTALERT_STATE + FIXED_DEPENDABOTALERT_STATE + OPEN_DEPENDABOTALERT_STATE +) + +func (i DependabotAlert_state) String() string { + return []string{"auto_dismissed", "dismissed", "fixed", "open"}[i] +} +func ParseDependabotAlert_state(v string) (any, error) { + result := AUTO_DISMISSED_DEPENDABOTALERT_STATE + switch v { + case "auto_dismissed": + result = AUTO_DISMISSED_DEPENDABOTALERT_STATE + case "dismissed": + result = DISMISSED_DEPENDABOTALERT_STATE + case "fixed": + result = FIXED_DEPENDABOTALERT_STATE + case "open": + result = OPEN_DEPENDABOTALERT_STATE + default: + return 0, errors.New("Unknown DependabotAlert_state value: " + v) + } + return &result, nil +} +func SerializeDependabotAlert_state(values []DependabotAlert_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlert_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_with_repository.go b/pkg/github/models/dependabot_alert_with_repository.go new file mode 100644 index 0000000..15d6150 --- /dev/null +++ b/pkg/github/models/dependabot_alert_with_repository.go @@ -0,0 +1,427 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertWithRepository a Dependabot alert. +type DependabotAlertWithRepository struct { + // The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + auto_dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Details for the vulnerable dependency. + dependency DependabotAlertWithRepository_dependencyable + // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissed_by NullableSimpleUserable + // An optional comment associated with the alert's dismissal. + dismissed_comment *string + // The reason that the alert was dismissed. + dismissed_reason *DependabotAlertWithRepository_dismissed_reason + // The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + fixed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The security alert number. + number *int32 + // A GitHub repository. + repository SimpleRepositoryable + // Details for the GitHub Security Advisory. + security_advisory DependabotAlertSecurityAdvisoryable + // Details pertaining to one vulnerable version range for the advisory. + security_vulnerability DependabotAlertSecurityVulnerabilityable + // The state of the Dependabot alert. + state *DependabotAlertWithRepository_state + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string +} +// NewDependabotAlertWithRepository instantiates a new DependabotAlertWithRepository and sets the default values. +func NewDependabotAlertWithRepository()(*DependabotAlertWithRepository) { + m := &DependabotAlertWithRepository{ + } + return m +} +// CreateDependabotAlertWithRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertWithRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertWithRepository(), nil +} +// GetAutoDismissedAt gets the auto_dismissed_at property value. The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertWithRepository) GetAutoDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.auto_dismissed_at +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertWithRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDependency gets the dependency property value. Details for the vulnerable dependency. +// returns a DependabotAlertWithRepository_dependencyable when successful +func (m *DependabotAlertWithRepository) GetDependency()(DependabotAlertWithRepository_dependencyable) { + return m.dependency +} +// GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertWithRepository) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dismissed_at +} +// GetDismissedBy gets the dismissed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *DependabotAlertWithRepository) GetDismissedBy()(NullableSimpleUserable) { + return m.dismissed_by +} +// GetDismissedComment gets the dismissed_comment property value. An optional comment associated with the alert's dismissal. +// returns a *string when successful +func (m *DependabotAlertWithRepository) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetDismissedReason gets the dismissed_reason property value. The reason that the alert was dismissed. +// returns a *DependabotAlertWithRepository_dismissed_reason when successful +func (m *DependabotAlertWithRepository) GetDismissedReason()(*DependabotAlertWithRepository_dismissed_reason) { + return m.dismissed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertWithRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auto_dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoDismissedAt(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dependency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertWithRepository_dependencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependency(val.(DependabotAlertWithRepository_dependencyable)) + } + return nil + } + res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedAt(val) + } + return nil + } + res["dismissed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + res["dismissed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertWithRepository_dismissed_reason) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReason(val.(*DependabotAlertWithRepository_dismissed_reason)) + } + return nil + } + res["fixed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFixedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleRepositoryable)) + } + return nil + } + res["security_advisory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertSecurityAdvisoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAdvisory(val.(DependabotAlertSecurityAdvisoryable)) + } + return nil + } + res["security_vulnerability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertSecurityVulnerabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityVulnerability(val.(DependabotAlertSecurityVulnerabilityable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertWithRepository_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*DependabotAlertWithRepository_state)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFixedAt gets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertWithRepository) GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fixed_at +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *DependabotAlertWithRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *DependabotAlertWithRepository) GetNumber()(*int32) { + return m.number +} +// GetRepository gets the repository property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *DependabotAlertWithRepository) GetRepository()(SimpleRepositoryable) { + return m.repository +} +// GetSecurityAdvisory gets the security_advisory property value. Details for the GitHub Security Advisory. +// returns a DependabotAlertSecurityAdvisoryable when successful +func (m *DependabotAlertWithRepository) GetSecurityAdvisory()(DependabotAlertSecurityAdvisoryable) { + return m.security_advisory +} +// GetSecurityVulnerability gets the security_vulnerability property value. Details pertaining to one vulnerable version range for the advisory. +// returns a DependabotAlertSecurityVulnerabilityable when successful +func (m *DependabotAlertWithRepository) GetSecurityVulnerability()(DependabotAlertSecurityVulnerabilityable) { + return m.security_vulnerability +} +// GetState gets the state property value. The state of the Dependabot alert. +// returns a *DependabotAlertWithRepository_state when successful +func (m *DependabotAlertWithRepository) GetState()(*DependabotAlertWithRepository_state) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *DependabotAlertWithRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *DependabotAlertWithRepository) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DependabotAlertWithRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + if m.GetDismissedReason() != nil { + cast := (*m.GetDismissedReason()).String() + err := writer.WriteStringValue("dismissed_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + return nil +} +// SetAutoDismissedAt sets the auto_dismissed_at property value. The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertWithRepository) SetAutoDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.auto_dismissed_at = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertWithRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDependency sets the dependency property value. Details for the vulnerable dependency. +func (m *DependabotAlertWithRepository) SetDependency(value DependabotAlertWithRepository_dependencyable)() { + m.dependency = value +} +// SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertWithRepository) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dismissed_at = value +} +// SetDismissedBy sets the dismissed_by property value. A GitHub user. +func (m *DependabotAlertWithRepository) SetDismissedBy(value NullableSimpleUserable)() { + m.dismissed_by = value +} +// SetDismissedComment sets the dismissed_comment property value. An optional comment associated with the alert's dismissal. +func (m *DependabotAlertWithRepository) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +// SetDismissedReason sets the dismissed_reason property value. The reason that the alert was dismissed. +func (m *DependabotAlertWithRepository) SetDismissedReason(value *DependabotAlertWithRepository_dismissed_reason)() { + m.dismissed_reason = value +} +// SetFixedAt sets the fixed_at property value. The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertWithRepository) SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fixed_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *DependabotAlertWithRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetNumber sets the number property value. The security alert number. +func (m *DependabotAlertWithRepository) SetNumber(value *int32)() { + m.number = value +} +// SetRepository sets the repository property value. A GitHub repository. +func (m *DependabotAlertWithRepository) SetRepository(value SimpleRepositoryable)() { + m.repository = value +} +// SetSecurityAdvisory sets the security_advisory property value. Details for the GitHub Security Advisory. +func (m *DependabotAlertWithRepository) SetSecurityAdvisory(value DependabotAlertSecurityAdvisoryable)() { + m.security_advisory = value +} +// SetSecurityVulnerability sets the security_vulnerability property value. Details pertaining to one vulnerable version range for the advisory. +func (m *DependabotAlertWithRepository) SetSecurityVulnerability(value DependabotAlertSecurityVulnerabilityable)() { + m.security_vulnerability = value +} +// SetState sets the state property value. The state of the Dependabot alert. +func (m *DependabotAlertWithRepository) SetState(value *DependabotAlertWithRepository_state)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *DependabotAlertWithRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *DependabotAlertWithRepository) SetUrl(value *string)() { + m.url = value +} +type DependabotAlertWithRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDependency()(DependabotAlertWithRepository_dependencyable) + GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedBy()(NullableSimpleUserable) + GetDismissedComment()(*string) + GetDismissedReason()(*DependabotAlertWithRepository_dismissed_reason) + GetFixedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetNumber()(*int32) + GetRepository()(SimpleRepositoryable) + GetSecurityAdvisory()(DependabotAlertSecurityAdvisoryable) + GetSecurityVulnerability()(DependabotAlertSecurityVulnerabilityable) + GetState()(*DependabotAlertWithRepository_state) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAutoDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDependency(value DependabotAlertWithRepository_dependencyable)() + SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedBy(value NullableSimpleUserable)() + SetDismissedComment(value *string)() + SetDismissedReason(value *DependabotAlertWithRepository_dismissed_reason)() + SetFixedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetNumber(value *int32)() + SetRepository(value SimpleRepositoryable)() + SetSecurityAdvisory(value DependabotAlertSecurityAdvisoryable)() + SetSecurityVulnerability(value DependabotAlertSecurityVulnerabilityable)() + SetState(value *DependabotAlertWithRepository_state)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/dependabot_alert_with_repository_dependency.go b/pkg/github/models/dependabot_alert_with_repository_dependency.go new file mode 100644 index 0000000..b85c3d9 --- /dev/null +++ b/pkg/github/models/dependabot_alert_with_repository_dependency.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotAlertWithRepository_dependency details for the vulnerable dependency. +type DependabotAlertWithRepository_dependency struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The full path to the dependency manifest file, relative to the root of the repository. + manifest_path *string + // Details for the vulnerable package. + packageEscaped DependabotAlertPackageable + // The execution scope of the vulnerable dependency. + scope *DependabotAlertWithRepository_dependency_scope +} +// NewDependabotAlertWithRepository_dependency instantiates a new DependabotAlertWithRepository_dependency and sets the default values. +func NewDependabotAlertWithRepository_dependency()(*DependabotAlertWithRepository_dependency) { + m := &DependabotAlertWithRepository_dependency{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependabotAlertWithRepository_dependencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotAlertWithRepository_dependencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotAlertWithRepository_dependency(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependabotAlertWithRepository_dependency) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotAlertWithRepository_dependency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["manifest_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManifestPath(val) + } + return nil + } + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependabotAlertPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(DependabotAlertPackageable)) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertWithRepository_dependency_scope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*DependabotAlertWithRepository_dependency_scope)) + } + return nil + } + return res +} +// GetManifestPath gets the manifest_path property value. The full path to the dependency manifest file, relative to the root of the repository. +// returns a *string when successful +func (m *DependabotAlertWithRepository_dependency) GetManifestPath()(*string) { + return m.manifest_path +} +// GetPackageEscaped gets the package property value. Details for the vulnerable package. +// returns a DependabotAlertPackageable when successful +func (m *DependabotAlertWithRepository_dependency) GetPackageEscaped()(DependabotAlertPackageable) { + return m.packageEscaped +} +// GetScope gets the scope property value. The execution scope of the vulnerable dependency. +// returns a *DependabotAlertWithRepository_dependency_scope when successful +func (m *DependabotAlertWithRepository_dependency) GetScope()(*DependabotAlertWithRepository_dependency_scope) { + return m.scope +} +// Serialize serializes information the current object +func (m *DependabotAlertWithRepository_dependency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependabotAlertWithRepository_dependency) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetManifestPath sets the manifest_path property value. The full path to the dependency manifest file, relative to the root of the repository. +func (m *DependabotAlertWithRepository_dependency) SetManifestPath(value *string)() { + m.manifest_path = value +} +// SetPackageEscaped sets the package property value. Details for the vulnerable package. +func (m *DependabotAlertWithRepository_dependency) SetPackageEscaped(value DependabotAlertPackageable)() { + m.packageEscaped = value +} +// SetScope sets the scope property value. The execution scope of the vulnerable dependency. +func (m *DependabotAlertWithRepository_dependency) SetScope(value *DependabotAlertWithRepository_dependency_scope)() { + m.scope = value +} +type DependabotAlertWithRepository_dependencyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetManifestPath()(*string) + GetPackageEscaped()(DependabotAlertPackageable) + GetScope()(*DependabotAlertWithRepository_dependency_scope) + SetManifestPath(value *string)() + SetPackageEscaped(value DependabotAlertPackageable)() + SetScope(value *DependabotAlertWithRepository_dependency_scope)() +} diff --git a/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go b/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go new file mode 100644 index 0000000..0480320 --- /dev/null +++ b/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The execution scope of the vulnerable dependency. +type DependabotAlertWithRepository_dependency_scope int + +const ( + DEVELOPMENT_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_SCOPE DependabotAlertWithRepository_dependency_scope = iota + RUNTIME_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_SCOPE +) + +func (i DependabotAlertWithRepository_dependency_scope) String() string { + return []string{"development", "runtime"}[i] +} +func ParseDependabotAlertWithRepository_dependency_scope(v string) (any, error) { + result := DEVELOPMENT_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_SCOPE + switch v { + case "development": + result = DEVELOPMENT_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_SCOPE + case "runtime": + result = RUNTIME_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_SCOPE + default: + return 0, errors.New("Unknown DependabotAlertWithRepository_dependency_scope value: " + v) + } + return &result, nil +} +func SerializeDependabotAlertWithRepository_dependency_scope(values []DependabotAlertWithRepository_dependency_scope) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertWithRepository_dependency_scope) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go b/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go new file mode 100644 index 0000000..6e77055 --- /dev/null +++ b/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The reason that the alert was dismissed. +type DependabotAlertWithRepository_dismissed_reason int + +const ( + FIX_STARTED_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON DependabotAlertWithRepository_dismissed_reason = iota + INACCURATE_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + NO_BANDWIDTH_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + NOT_USED_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + TOLERABLE_RISK_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON +) + +func (i DependabotAlertWithRepository_dismissed_reason) String() string { + return []string{"fix_started", "inaccurate", "no_bandwidth", "not_used", "tolerable_risk"}[i] +} +func ParseDependabotAlertWithRepository_dismissed_reason(v string) (any, error) { + result := FIX_STARTED_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + switch v { + case "fix_started": + result = FIX_STARTED_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + case "inaccurate": + result = INACCURATE_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + case "no_bandwidth": + result = NO_BANDWIDTH_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + case "not_used": + result = NOT_USED_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + case "tolerable_risk": + result = TOLERABLE_RISK_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON + default: + return 0, errors.New("Unknown DependabotAlertWithRepository_dismissed_reason value: " + v) + } + return &result, nil +} +func SerializeDependabotAlertWithRepository_dismissed_reason(values []DependabotAlertWithRepository_dismissed_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertWithRepository_dismissed_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_with_repository_state.go b/pkg/github/models/dependabot_alert_with_repository_state.go new file mode 100644 index 0000000..b679d70 --- /dev/null +++ b/pkg/github/models/dependabot_alert_with_repository_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The state of the Dependabot alert. +type DependabotAlertWithRepository_state int + +const ( + AUTO_DISMISSED_DEPENDABOTALERTWITHREPOSITORY_STATE DependabotAlertWithRepository_state = iota + DISMISSED_DEPENDABOTALERTWITHREPOSITORY_STATE + FIXED_DEPENDABOTALERTWITHREPOSITORY_STATE + OPEN_DEPENDABOTALERTWITHREPOSITORY_STATE +) + +func (i DependabotAlertWithRepository_state) String() string { + return []string{"auto_dismissed", "dismissed", "fixed", "open"}[i] +} +func ParseDependabotAlertWithRepository_state(v string) (any, error) { + result := AUTO_DISMISSED_DEPENDABOTALERTWITHREPOSITORY_STATE + switch v { + case "auto_dismissed": + result = AUTO_DISMISSED_DEPENDABOTALERTWITHREPOSITORY_STATE + case "dismissed": + result = DISMISSED_DEPENDABOTALERTWITHREPOSITORY_STATE + case "fixed": + result = FIXED_DEPENDABOTALERTWITHREPOSITORY_STATE + case "open": + result = OPEN_DEPENDABOTALERTWITHREPOSITORY_STATE + default: + return 0, errors.New("Unknown DependabotAlertWithRepository_state value: " + v) + } + return &result, nil +} +func SerializeDependabotAlertWithRepository_state(values []DependabotAlertWithRepository_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertWithRepository_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_public_key.go b/pkg/github/models/dependabot_public_key.go new file mode 100644 index 0000000..2655586 --- /dev/null +++ b/pkg/github/models/dependabot_public_key.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotPublicKey the public key used for setting Dependabot Secrets. +type DependabotPublicKey struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The Base64 encoded public key. + key *string + // The identifier for the key. + key_id *string +} +// NewDependabotPublicKey instantiates a new DependabotPublicKey and sets the default values. +func NewDependabotPublicKey()(*DependabotPublicKey) { + m := &DependabotPublicKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependabotPublicKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotPublicKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotPublicKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependabotPublicKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotPublicKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The Base64 encoded public key. +// returns a *string when successful +func (m *DependabotPublicKey) GetKey()(*string) { + return m.key +} +// GetKeyId gets the key_id property value. The identifier for the key. +// returns a *string when successful +func (m *DependabotPublicKey) GetKeyId()(*string) { + return m.key_id +} +// Serialize serializes information the current object +func (m *DependabotPublicKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + 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 *DependabotPublicKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The Base64 encoded public key. +func (m *DependabotPublicKey) SetKey(value *string)() { + m.key = value +} +// SetKeyId sets the key_id property value. The identifier for the key. +func (m *DependabotPublicKey) SetKeyId(value *string)() { + m.key_id = value +} +type DependabotPublicKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetKeyId()(*string) + SetKey(value *string)() + SetKeyId(value *string)() +} diff --git a/pkg/github/models/dependabot_secret.go b/pkg/github/models/dependabot_secret.go new file mode 100644 index 0000000..f326e9b --- /dev/null +++ b/pkg/github/models/dependabot_secret.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependabotSecret set secrets for Dependabot. +type DependabotSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret. + name *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDependabotSecret instantiates a new DependabotSecret and sets the default values. +func NewDependabotSecret()(*DependabotSecret) { + m := &DependabotSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependabotSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependabotSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependabotSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependabotSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *DependabotSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependabotSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret. +// returns a *string when successful +func (m *DependabotSecret) GetName()(*string) { + return m.name +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *DependabotSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *DependabotSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependabotSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *DependabotSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret. +func (m *DependabotSecret) SetName(value *string)() { + m.name = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *DependabotSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type DependabotSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/dependency_graph_diff.go b/pkg/github/models/dependency_graph_diff.go new file mode 100644 index 0000000..c4760f9 --- /dev/null +++ b/pkg/github/models/dependency_graph_diff.go @@ -0,0 +1,355 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphDiff struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The change_type property + change_type *DependencyGraphDiff_change_type + // The ecosystem property + ecosystem *string + // The license property + license *string + // The manifest property + manifest *string + // The name property + name *string + // The package_url property + package_url *string + // Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + scope *DependencyGraphDiff_scope + // The source_repository_url property + source_repository_url *string + // The version property + version *string + // The vulnerabilities property + vulnerabilities []DependencyGraphDiff_vulnerabilitiesable +} +// NewDependencyGraphDiff instantiates a new DependencyGraphDiff and sets the default values. +func NewDependencyGraphDiff()(*DependencyGraphDiff) { + m := &DependencyGraphDiff{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphDiffFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphDiffFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphDiff(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphDiff) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChangeType gets the change_type property value. The change_type property +// returns a *DependencyGraphDiff_change_type when successful +func (m *DependencyGraphDiff) GetChangeType()(*DependencyGraphDiff_change_type) { + return m.change_type +} +// GetEcosystem gets the ecosystem property value. The ecosystem property +// returns a *string when successful +func (m *DependencyGraphDiff) GetEcosystem()(*string) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphDiff) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["change_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependencyGraphDiff_change_type) + if err != nil { + return err + } + if val != nil { + m.SetChangeType(val.(*DependencyGraphDiff_change_type)) + } + return nil + } + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicense(val) + } + return nil + } + res["manifest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManifest(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["package_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageUrl(val) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependencyGraphDiff_scope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*DependencyGraphDiff_scope)) + } + return nil + } + res["source_repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceRepositoryUrl(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependencyGraphDiff_vulnerabilitiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependencyGraphDiff_vulnerabilitiesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependencyGraphDiff_vulnerabilitiesable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + return res +} +// GetLicense gets the license property value. The license property +// returns a *string when successful +func (m *DependencyGraphDiff) GetLicense()(*string) { + return m.license +} +// GetManifest gets the manifest property value. The manifest property +// returns a *string when successful +func (m *DependencyGraphDiff) GetManifest()(*string) { + return m.manifest +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *DependencyGraphDiff) GetName()(*string) { + return m.name +} +// GetPackageUrl gets the package_url property value. The package_url property +// returns a *string when successful +func (m *DependencyGraphDiff) GetPackageUrl()(*string) { + return m.package_url +} +// GetScope gets the scope property value. Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. +// returns a *DependencyGraphDiff_scope when successful +func (m *DependencyGraphDiff) GetScope()(*DependencyGraphDiff_scope) { + return m.scope +} +// GetSourceRepositoryUrl gets the source_repository_url property value. The source_repository_url property +// returns a *string when successful +func (m *DependencyGraphDiff) GetSourceRepositoryUrl()(*string) { + return m.source_repository_url +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *DependencyGraphDiff) GetVersion()(*string) { + return m.version +} +// GetVulnerabilities gets the vulnerabilities property value. The vulnerabilities property +// returns a []DependencyGraphDiff_vulnerabilitiesable when successful +func (m *DependencyGraphDiff) GetVulnerabilities()([]DependencyGraphDiff_vulnerabilitiesable) { + return m.vulnerabilities +} +// Serialize serializes information the current object +func (m *DependencyGraphDiff) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChangeType() != nil { + cast := (*m.GetChangeType()).String() + err := writer.WriteStringValue("change_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ecosystem", m.GetEcosystem()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("manifest", m.GetManifest()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("package_url", m.GetPackageUrl()) + if err != nil { + return err + } + } + if m.GetScope() != nil { + cast := (*m.GetScope()).String() + err := writer.WriteStringValue("scope", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source_repository_url", m.GetSourceRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + if m.GetVulnerabilities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilities())) + for i, v := range m.GetVulnerabilities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("vulnerabilities", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphDiff) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChangeType sets the change_type property value. The change_type property +func (m *DependencyGraphDiff) SetChangeType(value *DependencyGraphDiff_change_type)() { + m.change_type = value +} +// SetEcosystem sets the ecosystem property value. The ecosystem property +func (m *DependencyGraphDiff) SetEcosystem(value *string)() { + m.ecosystem = value +} +// SetLicense sets the license property value. The license property +func (m *DependencyGraphDiff) SetLicense(value *string)() { + m.license = value +} +// SetManifest sets the manifest property value. The manifest property +func (m *DependencyGraphDiff) SetManifest(value *string)() { + m.manifest = value +} +// SetName sets the name property value. The name property +func (m *DependencyGraphDiff) SetName(value *string)() { + m.name = value +} +// SetPackageUrl sets the package_url property value. The package_url property +func (m *DependencyGraphDiff) SetPackageUrl(value *string)() { + m.package_url = value +} +// SetScope sets the scope property value. Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. +func (m *DependencyGraphDiff) SetScope(value *DependencyGraphDiff_scope)() { + m.scope = value +} +// SetSourceRepositoryUrl sets the source_repository_url property value. The source_repository_url property +func (m *DependencyGraphDiff) SetSourceRepositoryUrl(value *string)() { + m.source_repository_url = value +} +// SetVersion sets the version property value. The version property +func (m *DependencyGraphDiff) SetVersion(value *string)() { + m.version = value +} +// SetVulnerabilities sets the vulnerabilities property value. The vulnerabilities property +func (m *DependencyGraphDiff) SetVulnerabilities(value []DependencyGraphDiff_vulnerabilitiesable)() { + m.vulnerabilities = value +} +type DependencyGraphDiffable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeType()(*DependencyGraphDiff_change_type) + GetEcosystem()(*string) + GetLicense()(*string) + GetManifest()(*string) + GetName()(*string) + GetPackageUrl()(*string) + GetScope()(*DependencyGraphDiff_scope) + GetSourceRepositoryUrl()(*string) + GetVersion()(*string) + GetVulnerabilities()([]DependencyGraphDiff_vulnerabilitiesable) + SetChangeType(value *DependencyGraphDiff_change_type)() + SetEcosystem(value *string)() + SetLicense(value *string)() + SetManifest(value *string)() + SetName(value *string)() + SetPackageUrl(value *string)() + SetScope(value *DependencyGraphDiff_scope)() + SetSourceRepositoryUrl(value *string)() + SetVersion(value *string)() + SetVulnerabilities(value []DependencyGraphDiff_vulnerabilitiesable)() +} diff --git a/pkg/github/models/dependency_graph_diff_change_type.go b/pkg/github/models/dependency_graph_diff_change_type.go new file mode 100644 index 0000000..6fb0c85 --- /dev/null +++ b/pkg/github/models/dependency_graph_diff_change_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type DependencyGraphDiff_change_type int + +const ( + ADDED_DEPENDENCYGRAPHDIFF_CHANGE_TYPE DependencyGraphDiff_change_type = iota + REMOVED_DEPENDENCYGRAPHDIFF_CHANGE_TYPE +) + +func (i DependencyGraphDiff_change_type) String() string { + return []string{"added", "removed"}[i] +} +func ParseDependencyGraphDiff_change_type(v string) (any, error) { + result := ADDED_DEPENDENCYGRAPHDIFF_CHANGE_TYPE + switch v { + case "added": + result = ADDED_DEPENDENCYGRAPHDIFF_CHANGE_TYPE + case "removed": + result = REMOVED_DEPENDENCYGRAPHDIFF_CHANGE_TYPE + default: + return 0, errors.New("Unknown DependencyGraphDiff_change_type value: " + v) + } + return &result, nil +} +func SerializeDependencyGraphDiff_change_type(values []DependencyGraphDiff_change_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependencyGraphDiff_change_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependency_graph_diff_scope.go b/pkg/github/models/dependency_graph_diff_scope.go new file mode 100644 index 0000000..8b0eb32 --- /dev/null +++ b/pkg/github/models/dependency_graph_diff_scope.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. +type DependencyGraphDiff_scope int + +const ( + UNKNOWN_DEPENDENCYGRAPHDIFF_SCOPE DependencyGraphDiff_scope = iota + RUNTIME_DEPENDENCYGRAPHDIFF_SCOPE + DEVELOPMENT_DEPENDENCYGRAPHDIFF_SCOPE +) + +func (i DependencyGraphDiff_scope) String() string { + return []string{"unknown", "runtime", "development"}[i] +} +func ParseDependencyGraphDiff_scope(v string) (any, error) { + result := UNKNOWN_DEPENDENCYGRAPHDIFF_SCOPE + switch v { + case "unknown": + result = UNKNOWN_DEPENDENCYGRAPHDIFF_SCOPE + case "runtime": + result = RUNTIME_DEPENDENCYGRAPHDIFF_SCOPE + case "development": + result = DEVELOPMENT_DEPENDENCYGRAPHDIFF_SCOPE + default: + return 0, errors.New("Unknown DependencyGraphDiff_scope value: " + v) + } + return &result, nil +} +func SerializeDependencyGraphDiff_scope(values []DependencyGraphDiff_scope) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependencyGraphDiff_scope) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependency_graph_diff_vulnerabilities.go b/pkg/github/models/dependency_graph_diff_vulnerabilities.go new file mode 100644 index 0000000..e503493 --- /dev/null +++ b/pkg/github/models/dependency_graph_diff_vulnerabilities.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphDiff_vulnerabilities struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The advisory_ghsa_id property + advisory_ghsa_id *string + // The advisory_summary property + advisory_summary *string + // The advisory_url property + advisory_url *string + // The severity property + severity *string +} +// NewDependencyGraphDiff_vulnerabilities instantiates a new DependencyGraphDiff_vulnerabilities and sets the default values. +func NewDependencyGraphDiff_vulnerabilities()(*DependencyGraphDiff_vulnerabilities) { + m := &DependencyGraphDiff_vulnerabilities{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphDiff_vulnerabilitiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphDiff_vulnerabilitiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphDiff_vulnerabilities(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphDiff_vulnerabilities) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvisoryGhsaId gets the advisory_ghsa_id property value. The advisory_ghsa_id property +// returns a *string when successful +func (m *DependencyGraphDiff_vulnerabilities) GetAdvisoryGhsaId()(*string) { + return m.advisory_ghsa_id +} +// GetAdvisorySummary gets the advisory_summary property value. The advisory_summary property +// returns a *string when successful +func (m *DependencyGraphDiff_vulnerabilities) GetAdvisorySummary()(*string) { + return m.advisory_summary +} +// GetAdvisoryUrl gets the advisory_url property value. The advisory_url property +// returns a *string when successful +func (m *DependencyGraphDiff_vulnerabilities) GetAdvisoryUrl()(*string) { + return m.advisory_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphDiff_vulnerabilities) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advisory_ghsa_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvisoryGhsaId(val) + } + return nil + } + res["advisory_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvisorySummary(val) + } + return nil + } + res["advisory_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvisoryUrl(val) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val) + } + return nil + } + return res +} +// GetSeverity gets the severity property value. The severity property +// returns a *string when successful +func (m *DependencyGraphDiff_vulnerabilities) GetSeverity()(*string) { + return m.severity +} +// Serialize serializes information the current object +func (m *DependencyGraphDiff_vulnerabilities) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("advisory_ghsa_id", m.GetAdvisoryGhsaId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("advisory_summary", m.GetAdvisorySummary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("advisory_url", m.GetAdvisoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("severity", m.GetSeverity()) + 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 *DependencyGraphDiff_vulnerabilities) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvisoryGhsaId sets the advisory_ghsa_id property value. The advisory_ghsa_id property +func (m *DependencyGraphDiff_vulnerabilities) SetAdvisoryGhsaId(value *string)() { + m.advisory_ghsa_id = value +} +// SetAdvisorySummary sets the advisory_summary property value. The advisory_summary property +func (m *DependencyGraphDiff_vulnerabilities) SetAdvisorySummary(value *string)() { + m.advisory_summary = value +} +// SetAdvisoryUrl sets the advisory_url property value. The advisory_url property +func (m *DependencyGraphDiff_vulnerabilities) SetAdvisoryUrl(value *string)() { + m.advisory_url = value +} +// SetSeverity sets the severity property value. The severity property +func (m *DependencyGraphDiff_vulnerabilities) SetSeverity(value *string)() { + m.severity = value +} +type DependencyGraphDiff_vulnerabilitiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvisoryGhsaId()(*string) + GetAdvisorySummary()(*string) + GetAdvisoryUrl()(*string) + GetSeverity()(*string) + SetAdvisoryGhsaId(value *string)() + SetAdvisorySummary(value *string)() + SetAdvisoryUrl(value *string)() + SetSeverity(value *string)() +} diff --git a/pkg/github/models/dependency_graph_spdx_sbom.go b/pkg/github/models/dependency_graph_spdx_sbom.go new file mode 100644 index 0000000..69670e9 --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DependencyGraphSpdxSbom a schema for the SPDX JSON format returned by the Dependency Graph. +type DependencyGraphSpdxSbom struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sbom property + sbom DependencyGraphSpdxSbom_sbomable +} +// NewDependencyGraphSpdxSbom instantiates a new DependencyGraphSpdxSbom and sets the default values. +func NewDependencyGraphSpdxSbom()(*DependencyGraphSpdxSbom) { + m := &DependencyGraphSpdxSbom{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphSpdxSbom) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphSpdxSbom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sbom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependencyGraphSpdxSbom_sbomFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSbom(val.(DependencyGraphSpdxSbom_sbomable)) + } + return nil + } + return res +} +// GetSbom gets the sbom property value. The sbom property +// returns a DependencyGraphSpdxSbom_sbomable when successful +func (m *DependencyGraphSpdxSbom) GetSbom()(DependencyGraphSpdxSbom_sbomable) { + return m.sbom +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("sbom", m.GetSbom()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphSpdxSbom) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSbom sets the sbom property value. The sbom property +func (m *DependencyGraphSpdxSbom) SetSbom(value DependencyGraphSpdxSbom_sbomable)() { + m.sbom = value +} +type DependencyGraphSpdxSbomable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSbom()(DependencyGraphSpdxSbom_sbomable) + SetSbom(value DependencyGraphSpdxSbom_sbomable)() +} diff --git a/pkg/github/models/dependency_graph_spdx_sbom_sbom.go b/pkg/github/models/dependency_graph_spdx_sbom_sbom.go new file mode 100644 index 0000000..f283a71 --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom_sbom.go @@ -0,0 +1,301 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphSpdxSbom_sbom struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The creationInfo property + creationInfo DependencyGraphSpdxSbom_sbom_creationInfoable + // The license under which the SPDX document is licensed. + dataLicense *string + // The name of the repository that the SPDX document describes. + documentDescribes []string + // The namespace for the SPDX document. + documentNamespace *string + // The name of the SPDX document. + name *string + // The packages property + packages []DependencyGraphSpdxSbom_sbom_packagesable + // The SPDX identifier for the SPDX document. + sPDXID *string + // The version of the SPDX specification that this document conforms to. + spdxVersion *string +} +// NewDependencyGraphSpdxSbom_sbom instantiates a new DependencyGraphSpdxSbom_sbom and sets the default values. +func NewDependencyGraphSpdxSbom_sbom()(*DependencyGraphSpdxSbom_sbom) { + m := &DependencyGraphSpdxSbom_sbom{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbom_sbomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbom_sbomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom_sbom(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphSpdxSbom_sbom) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreationInfo gets the creationInfo property value. The creationInfo property +// returns a DependencyGraphSpdxSbom_sbom_creationInfoable when successful +func (m *DependencyGraphSpdxSbom_sbom) GetCreationInfo()(DependencyGraphSpdxSbom_sbom_creationInfoable) { + return m.creationInfo +} +// GetDataLicense gets the dataLicense property value. The license under which the SPDX document is licensed. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetDataLicense()(*string) { + return m.dataLicense +} +// GetDocumentDescribes gets the documentDescribes property value. The name of the repository that the SPDX document describes. +// returns a []string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetDocumentDescribes()([]string) { + return m.documentDescribes +} +// GetDocumentNamespace gets the documentNamespace property value. The namespace for the SPDX document. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetDocumentNamespace()(*string) { + return m.documentNamespace +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphSpdxSbom_sbom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["creationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreationInfo(val.(DependencyGraphSpdxSbom_sbom_creationInfoable)) + } + return nil + } + res["dataLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataLicense(val) + } + return nil + } + res["documentDescribes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetDocumentDescribes(res) + } + return nil + } + res["documentNamespace"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentNamespace(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["packages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependencyGraphSpdxSbom_sbom_packagesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependencyGraphSpdxSbom_sbom_packagesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependencyGraphSpdxSbom_sbom_packagesable) + } + } + m.SetPackages(res) + } + return nil + } + res["SPDXID"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSPDXID(val) + } + return nil + } + res["spdxVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxVersion(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the SPDX document. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetName()(*string) { + return m.name +} +// GetPackages gets the packages property value. The packages property +// returns a []DependencyGraphSpdxSbom_sbom_packagesable when successful +func (m *DependencyGraphSpdxSbom_sbom) GetPackages()([]DependencyGraphSpdxSbom_sbom_packagesable) { + return m.packages +} +// GetSPDXID gets the SPDXID property value. The SPDX identifier for the SPDX document. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetSPDXID()(*string) { + return m.sPDXID +} +// GetSpdxVersion gets the spdxVersion property value. The version of the SPDX specification that this document conforms to. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetSpdxVersion()(*string) { + return m.spdxVersion +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("creationInfo", m.GetCreationInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dataLicense", m.GetDataLicense()) + if err != nil { + return err + } + } + if m.GetDocumentDescribes() != nil { + err := writer.WriteCollectionOfStringValues("documentDescribes", m.GetDocumentDescribes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentNamespace", m.GetDocumentNamespace()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPackages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPackages())) + for i, v := range m.GetPackages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("packages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("SPDXID", m.GetSPDXID()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdxVersion", m.GetSpdxVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphSpdxSbom_sbom) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreationInfo sets the creationInfo property value. The creationInfo property +func (m *DependencyGraphSpdxSbom_sbom) SetCreationInfo(value DependencyGraphSpdxSbom_sbom_creationInfoable)() { + m.creationInfo = value +} +// SetDataLicense sets the dataLicense property value. The license under which the SPDX document is licensed. +func (m *DependencyGraphSpdxSbom_sbom) SetDataLicense(value *string)() { + m.dataLicense = value +} +// SetDocumentDescribes sets the documentDescribes property value. The name of the repository that the SPDX document describes. +func (m *DependencyGraphSpdxSbom_sbom) SetDocumentDescribes(value []string)() { + m.documentDescribes = value +} +// SetDocumentNamespace sets the documentNamespace property value. The namespace for the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom) SetDocumentNamespace(value *string)() { + m.documentNamespace = value +} +// SetName sets the name property value. The name of the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom) SetName(value *string)() { + m.name = value +} +// SetPackages sets the packages property value. The packages property +func (m *DependencyGraphSpdxSbom_sbom) SetPackages(value []DependencyGraphSpdxSbom_sbom_packagesable)() { + m.packages = value +} +// SetSPDXID sets the SPDXID property value. The SPDX identifier for the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom) SetSPDXID(value *string)() { + m.sPDXID = value +} +// SetSpdxVersion sets the spdxVersion property value. The version of the SPDX specification that this document conforms to. +func (m *DependencyGraphSpdxSbom_sbom) SetSpdxVersion(value *string)() { + m.spdxVersion = value +} +type DependencyGraphSpdxSbom_sbomable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreationInfo()(DependencyGraphSpdxSbom_sbom_creationInfoable) + GetDataLicense()(*string) + GetDocumentDescribes()([]string) + GetDocumentNamespace()(*string) + GetName()(*string) + GetPackages()([]DependencyGraphSpdxSbom_sbom_packagesable) + GetSPDXID()(*string) + GetSpdxVersion()(*string) + SetCreationInfo(value DependencyGraphSpdxSbom_sbom_creationInfoable)() + SetDataLicense(value *string)() + SetDocumentDescribes(value []string)() + SetDocumentNamespace(value *string)() + SetName(value *string)() + SetPackages(value []DependencyGraphSpdxSbom_sbom_packagesable)() + SetSPDXID(value *string)() + SetSpdxVersion(value *string)() +} diff --git a/pkg/github/models/dependency_graph_spdx_sbom_sbom_creation_info.go b/pkg/github/models/dependency_graph_spdx_sbom_sbom_creation_info.go new file mode 100644 index 0000000..26f794c --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom_sbom_creation_info.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphSpdxSbom_sbom_creationInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time the SPDX document was created. + created *string + // The tools that were used to generate the SPDX document. + creators []string +} +// NewDependencyGraphSpdxSbom_sbom_creationInfo instantiates a new DependencyGraphSpdxSbom_sbom_creationInfo and sets the default values. +func NewDependencyGraphSpdxSbom_sbom_creationInfo()(*DependencyGraphSpdxSbom_sbom_creationInfo) { + m := &DependencyGraphSpdxSbom_sbom_creationInfo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom_sbom_creationInfo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreated gets the created property value. The date and time the SPDX document was created. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) GetCreated()(*string) { + return m.created +} +// GetCreators gets the creators property value. The tools that were used to generate the SPDX document. +// returns a []string when successful +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) GetCreators()([]string) { + return m.creators +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreated(val) + } + return nil + } + res["creators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCreators(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created", m.GetCreated()) + if err != nil { + return err + } + } + if m.GetCreators() != nil { + err := writer.WriteCollectionOfStringValues("creators", m.GetCreators()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreated sets the created property value. The date and time the SPDX document was created. +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) SetCreated(value *string)() { + m.created = value +} +// SetCreators sets the creators property value. The tools that were used to generate the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom_creationInfo) SetCreators(value []string)() { + m.creators = value +} +type DependencyGraphSpdxSbom_sbom_creationInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreated()(*string) + GetCreators()([]string) + SetCreated(value *string)() + SetCreators(value []string)() +} diff --git a/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go b/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go new file mode 100644 index 0000000..b397ec6 --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go @@ -0,0 +1,353 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphSpdxSbom_sbom_packages struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The copyright holders of the package, and any dates present with those notices, if available. + copyrightText *string + // The location where the package can be downloaded,or NOASSERTION if this has not been determined. + downloadLocation *string + // The externalRefs property + externalRefs []DependencyGraphSpdxSbom_sbom_packages_externalRefsable + // Whether the package's file content has been subjected toanalysis during the creation of the SPDX document. + filesAnalyzed *bool + // The license of the package as determined while creating the SPDX document. + licenseConcluded *string + // The license of the package as declared by its author, or NOASSERTION if this informationwas not available when the SPDX document was created. + licenseDeclared *string + // The name of the package. + name *string + // A unique SPDX identifier for the package. + sPDXID *string + // The distribution source of this package, or NOASSERTION if this was not determined. + supplier *string + // The version of the package. If the package does not have an exact version specified,a version range is given. + versionInfo *string +} +// NewDependencyGraphSpdxSbom_sbom_packages instantiates a new DependencyGraphSpdxSbom_sbom_packages and sets the default values. +func NewDependencyGraphSpdxSbom_sbom_packages()(*DependencyGraphSpdxSbom_sbom_packages) { + m := &DependencyGraphSpdxSbom_sbom_packages{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbom_sbom_packagesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbom_sbom_packagesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom_sbom_packages(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCopyrightText gets the copyrightText property value. The copyright holders of the package, and any dates present with those notices, if available. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetCopyrightText()(*string) { + return m.copyrightText +} +// GetDownloadLocation gets the downloadLocation property value. The location where the package can be downloaded,or NOASSERTION if this has not been determined. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetDownloadLocation()(*string) { + return m.downloadLocation +} +// GetExternalRefs gets the externalRefs property value. The externalRefs property +// returns a []DependencyGraphSpdxSbom_sbom_packages_externalRefsable when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetExternalRefs()([]DependencyGraphSpdxSbom_sbom_packages_externalRefsable) { + return m.externalRefs +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["copyrightText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCopyrightText(val) + } + return nil + } + res["downloadLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadLocation(val) + } + return nil + } + res["externalRefs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependencyGraphSpdxSbom_sbom_packages_externalRefsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependencyGraphSpdxSbom_sbom_packages_externalRefsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependencyGraphSpdxSbom_sbom_packages_externalRefsable) + } + } + m.SetExternalRefs(res) + } + return nil + } + res["filesAnalyzed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFilesAnalyzed(val) + } + return nil + } + res["licenseConcluded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicenseConcluded(val) + } + return nil + } + res["licenseDeclared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicenseDeclared(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["SPDXID"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSPDXID(val) + } + return nil + } + res["supplier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupplier(val) + } + return nil + } + res["versionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionInfo(val) + } + return nil + } + return res +} +// GetFilesAnalyzed gets the filesAnalyzed property value. Whether the package's file content has been subjected toanalysis during the creation of the SPDX document. +// returns a *bool when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetFilesAnalyzed()(*bool) { + return m.filesAnalyzed +} +// GetLicenseConcluded gets the licenseConcluded property value. The license of the package as determined while creating the SPDX document. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetLicenseConcluded()(*string) { + return m.licenseConcluded +} +// GetLicenseDeclared gets the licenseDeclared property value. The license of the package as declared by its author, or NOASSERTION if this informationwas not available when the SPDX document was created. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetLicenseDeclared()(*string) { + return m.licenseDeclared +} +// GetName gets the name property value. The name of the package. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetName()(*string) { + return m.name +} +// GetSPDXID gets the SPDXID property value. A unique SPDX identifier for the package. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetSPDXID()(*string) { + return m.sPDXID +} +// GetSupplier gets the supplier property value. The distribution source of this package, or NOASSERTION if this was not determined. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetSupplier()(*string) { + return m.supplier +} +// GetVersionInfo gets the versionInfo property value. The version of the package. If the package does not have an exact version specified,a version range is given. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetVersionInfo()(*string) { + return m.versionInfo +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom_sbom_packages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("copyrightText", m.GetCopyrightText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloadLocation", m.GetDownloadLocation()) + if err != nil { + return err + } + } + if m.GetExternalRefs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExternalRefs())) + for i, v := range m.GetExternalRefs() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("externalRefs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("filesAnalyzed", m.GetFilesAnalyzed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("licenseConcluded", m.GetLicenseConcluded()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("licenseDeclared", m.GetLicenseDeclared()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("SPDXID", m.GetSPDXID()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("supplier", m.GetSupplier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("versionInfo", m.GetVersionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCopyrightText sets the copyrightText property value. The copyright holders of the package, and any dates present with those notices, if available. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetCopyrightText(value *string)() { + m.copyrightText = value +} +// SetDownloadLocation sets the downloadLocation property value. The location where the package can be downloaded,or NOASSERTION if this has not been determined. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetDownloadLocation(value *string)() { + m.downloadLocation = value +} +// SetExternalRefs sets the externalRefs property value. The externalRefs property +func (m *DependencyGraphSpdxSbom_sbom_packages) SetExternalRefs(value []DependencyGraphSpdxSbom_sbom_packages_externalRefsable)() { + m.externalRefs = value +} +// SetFilesAnalyzed sets the filesAnalyzed property value. Whether the package's file content has been subjected toanalysis during the creation of the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetFilesAnalyzed(value *bool)() { + m.filesAnalyzed = value +} +// SetLicenseConcluded sets the licenseConcluded property value. The license of the package as determined while creating the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetLicenseConcluded(value *string)() { + m.licenseConcluded = value +} +// SetLicenseDeclared sets the licenseDeclared property value. The license of the package as declared by its author, or NOASSERTION if this informationwas not available when the SPDX document was created. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetLicenseDeclared(value *string)() { + m.licenseDeclared = value +} +// SetName sets the name property value. The name of the package. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetName(value *string)() { + m.name = value +} +// SetSPDXID sets the SPDXID property value. A unique SPDX identifier for the package. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetSPDXID(value *string)() { + m.sPDXID = value +} +// SetSupplier sets the supplier property value. The distribution source of this package, or NOASSERTION if this was not determined. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetSupplier(value *string)() { + m.supplier = value +} +// SetVersionInfo sets the versionInfo property value. The version of the package. If the package does not have an exact version specified,a version range is given. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetVersionInfo(value *string)() { + m.versionInfo = value +} +type DependencyGraphSpdxSbom_sbom_packagesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCopyrightText()(*string) + GetDownloadLocation()(*string) + GetExternalRefs()([]DependencyGraphSpdxSbom_sbom_packages_externalRefsable) + GetFilesAnalyzed()(*bool) + GetLicenseConcluded()(*string) + GetLicenseDeclared()(*string) + GetName()(*string) + GetSPDXID()(*string) + GetSupplier()(*string) + GetVersionInfo()(*string) + SetCopyrightText(value *string)() + SetDownloadLocation(value *string)() + SetExternalRefs(value []DependencyGraphSpdxSbom_sbom_packages_externalRefsable)() + SetFilesAnalyzed(value *bool)() + SetLicenseConcluded(value *string)() + SetLicenseDeclared(value *string)() + SetName(value *string)() + SetSPDXID(value *string)() + SetSupplier(value *string)() + SetVersionInfo(value *string)() +} diff --git a/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages_external_refs.go b/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages_external_refs.go new file mode 100644 index 0000000..a161a0f --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages_external_refs.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphSpdxSbom_sbom_packages_externalRefs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The category of reference to an external resource this reference refers to. + referenceCategory *string + // A locator for the particular external resource this reference refers to. + referenceLocator *string + // The category of reference to an external resource this reference refers to. + referenceType *string +} +// NewDependencyGraphSpdxSbom_sbom_packages_externalRefs instantiates a new DependencyGraphSpdxSbom_sbom_packages_externalRefs and sets the default values. +func NewDependencyGraphSpdxSbom_sbom_packages_externalRefs()(*DependencyGraphSpdxSbom_sbom_packages_externalRefs) { + m := &DependencyGraphSpdxSbom_sbom_packages_externalRefs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbom_sbom_packages_externalRefsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbom_sbom_packages_externalRefsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom_sbom_packages_externalRefs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["referenceCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceCategory(val) + } + return nil + } + res["referenceLocator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceLocator(val) + } + return nil + } + res["referenceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceType(val) + } + return nil + } + return res +} +// GetReferenceCategory gets the referenceCategory property value. The category of reference to an external resource this reference refers to. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) GetReferenceCategory()(*string) { + return m.referenceCategory +} +// GetReferenceLocator gets the referenceLocator property value. A locator for the particular external resource this reference refers to. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) GetReferenceLocator()(*string) { + return m.referenceLocator +} +// GetReferenceType gets the referenceType property value. The category of reference to an external resource this reference refers to. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) GetReferenceType()(*string) { + return m.referenceType +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("referenceCategory", m.GetReferenceCategory()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("referenceLocator", m.GetReferenceLocator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("referenceType", m.GetReferenceType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReferenceCategory sets the referenceCategory property value. The category of reference to an external resource this reference refers to. +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) SetReferenceCategory(value *string)() { + m.referenceCategory = value +} +// SetReferenceLocator sets the referenceLocator property value. A locator for the particular external resource this reference refers to. +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) SetReferenceLocator(value *string)() { + m.referenceLocator = value +} +// SetReferenceType sets the referenceType property value. The category of reference to an external resource this reference refers to. +func (m *DependencyGraphSpdxSbom_sbom_packages_externalRefs) SetReferenceType(value *string)() { + m.referenceType = value +} +type DependencyGraphSpdxSbom_sbom_packages_externalRefsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReferenceCategory()(*string) + GetReferenceLocator()(*string) + GetReferenceType()(*string) + SetReferenceCategory(value *string)() + SetReferenceLocator(value *string)() + SetReferenceType(value *string)() +} diff --git a/pkg/github/models/deploy_key.go b/pkg/github/models/deploy_key.go new file mode 100644 index 0000000..e51d0d3 --- /dev/null +++ b/pkg/github/models/deploy_key.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeployKey an SSH key granting access to a single repository. +type DeployKey struct { + // The added_by property + added_by *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The id property + id *int32 + // The key property + key *string + // The last_used property + last_used *string + // The read_only property + read_only *bool + // The title property + title *string + // The url property + url *string + // The verified property + verified *bool +} +// NewDeployKey instantiates a new DeployKey and sets the default values. +func NewDeployKey()(*DeployKey) { + m := &DeployKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeployKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeployKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeployKey(), nil +} +// GetAddedBy gets the added_by property value. The added_by property +// returns a *string when successful +func (m *DeployKey) GetAddedBy()(*string) { + return m.added_by +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeployKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *DeployKey) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeployKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["added_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedBy(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["last_used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUsed(val) + } + return nil + } + res["read_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReadOnly(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *DeployKey) GetId()(*int32) { + return m.id +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *DeployKey) GetKey()(*string) { + return m.key +} +// GetLastUsed gets the last_used property value. The last_used property +// returns a *string when successful +func (m *DeployKey) GetLastUsed()(*string) { + return m.last_used +} +// GetReadOnly gets the read_only property value. The read_only property +// returns a *bool when successful +func (m *DeployKey) GetReadOnly()(*bool) { + return m.read_only +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *DeployKey) GetTitle()(*string) { + return m.title +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *DeployKey) GetUrl()(*string) { + return m.url +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *DeployKey) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *DeployKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("added_by", m.GetAddedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_used", m.GetLastUsed()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("read_only", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAddedBy sets the added_by property value. The added_by property +func (m *DeployKey) SetAddedBy(value *string)() { + m.added_by = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeployKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *DeployKey) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *DeployKey) SetId(value *int32)() { + m.id = value +} +// SetKey sets the key property value. The key property +func (m *DeployKey) SetKey(value *string)() { + m.key = value +} +// SetLastUsed sets the last_used property value. The last_used property +func (m *DeployKey) SetLastUsed(value *string)() { + m.last_used = value +} +// SetReadOnly sets the read_only property value. The read_only property +func (m *DeployKey) SetReadOnly(value *bool)() { + m.read_only = value +} +// SetTitle sets the title property value. The title property +func (m *DeployKey) SetTitle(value *string)() { + m.title = value +} +// SetUrl sets the url property value. The url property +func (m *DeployKey) SetUrl(value *string)() { + m.url = value +} +// SetVerified sets the verified property value. The verified property +func (m *DeployKey) SetVerified(value *bool)() { + m.verified = value +} +type DeployKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedBy()(*string) + GetCreatedAt()(*string) + GetId()(*int32) + GetKey()(*string) + GetLastUsed()(*string) + GetReadOnly()(*bool) + GetTitle()(*string) + GetUrl()(*string) + GetVerified()(*bool) + SetAddedBy(value *string)() + SetCreatedAt(value *string)() + SetId(value *int32)() + SetKey(value *string)() + SetLastUsed(value *string)() + SetReadOnly(value *bool)() + SetTitle(value *string)() + SetUrl(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/deployment.go b/pkg/github/models/deployment.go new file mode 100644 index 0000000..7b7f028 --- /dev/null +++ b/pkg/github/models/deployment.go @@ -0,0 +1,575 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deployment a request for a specific ref(branch,sha,tag) to be deployed +type Deployment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + creator NullableSimpleUserable + // The description property + description *string + // Name for the target deployment environment. + environment *string + // Unique identifier of the deployment + id *int64 + // The node_id property + node_id *string + // The original_environment property + original_environment *string + // The payload property + payload *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // Specifies if the given environment is one that end-users directly interact with. Default: false. + production_environment *bool + // The ref to deploy. This can be a branch, tag, or sha. + ref *string + // The repository_url property + repository_url *string + // The sha property + sha *string + // The statuses_url property + statuses_url *string + // Parameter to specify a task to execute + task *string + // Specifies if the given environment is will no longer exist at some point in the future. Default: false. + transient_environment *bool + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewDeployment instantiates a new Deployment and sets the default values. +func NewDeployment()(*Deployment) { + m := &Deployment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeployment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Deployment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Deployment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Deployment) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Deployment) GetDescription()(*string) { + return m.description +} +// GetEnvironment gets the environment property value. Name for the target deployment environment. +// returns a *string when successful +func (m *Deployment) GetEnvironment()(*string) { + return m.environment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Deployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + 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["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["original_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalEnvironment(val) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["production_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProductionEnvironment(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["task"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTask(val) + } + return nil + } + res["transient_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTransientEnvironment(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the deployment +// returns a *int64 when successful +func (m *Deployment) GetId()(*int64) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Deployment) GetNodeId()(*string) { + return m.node_id +} +// GetOriginalEnvironment gets the original_environment property value. The original_environment property +// returns a *string when successful +func (m *Deployment) GetOriginalEnvironment()(*string) { + return m.original_environment +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *Deployment) GetPayload()(*string) { + return m.payload +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *Deployment) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetProductionEnvironment gets the production_environment property value. Specifies if the given environment is one that end-users directly interact with. Default: false. +// returns a *bool when successful +func (m *Deployment) GetProductionEnvironment()(*bool) { + return m.production_environment +} +// GetRef gets the ref property value. The ref to deploy. This can be a branch, tag, or sha. +// returns a *string when successful +func (m *Deployment) GetRef()(*string) { + return m.ref +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *Deployment) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Deployment) GetSha()(*string) { + return m.sha +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *Deployment) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetTask gets the task property value. Parameter to specify a task to execute +// returns a *string when successful +func (m *Deployment) GetTask()(*string) { + return m.task +} +// GetTransientEnvironment gets the transient_environment property value. Specifies if the given environment is will no longer exist at some point in the future. Default: false. +// returns a *bool when successful +func (m *Deployment) GetTransientEnvironment()(*bool) { + return m.transient_environment +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Deployment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Deployment) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Deployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("original_environment", m.GetOriginalEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("production_environment", m.GetProductionEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("task", m.GetTask()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("transient_environment", m.GetTransientEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Deployment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Deployment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *Deployment) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetDescription sets the description property value. The description property +func (m *Deployment) SetDescription(value *string)() { + m.description = value +} +// SetEnvironment sets the environment property value. Name for the target deployment environment. +func (m *Deployment) SetEnvironment(value *string)() { + m.environment = value +} +// SetId sets the id property value. Unique identifier of the deployment +func (m *Deployment) SetId(value *int64)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Deployment) SetNodeId(value *string)() { + m.node_id = value +} +// SetOriginalEnvironment sets the original_environment property value. The original_environment property +func (m *Deployment) SetOriginalEnvironment(value *string)() { + m.original_environment = value +} +// SetPayload sets the payload property value. The payload property +func (m *Deployment) SetPayload(value *string)() { + m.payload = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *Deployment) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetProductionEnvironment sets the production_environment property value. Specifies if the given environment is one that end-users directly interact with. Default: false. +func (m *Deployment) SetProductionEnvironment(value *bool)() { + m.production_environment = value +} +// SetRef sets the ref property value. The ref to deploy. This can be a branch, tag, or sha. +func (m *Deployment) SetRef(value *string)() { + m.ref = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *Deployment) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetSha sets the sha property value. The sha property +func (m *Deployment) SetSha(value *string)() { + m.sha = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *Deployment) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetTask sets the task property value. Parameter to specify a task to execute +func (m *Deployment) SetTask(value *string)() { + m.task = value +} +// SetTransientEnvironment sets the transient_environment property value. Specifies if the given environment is will no longer exist at some point in the future. Default: false. +func (m *Deployment) SetTransientEnvironment(value *bool)() { + m.transient_environment = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Deployment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Deployment) SetUrl(value *string)() { + m.url = value +} +type Deploymentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(NullableSimpleUserable) + GetDescription()(*string) + GetEnvironment()(*string) + GetId()(*int64) + GetNodeId()(*string) + GetOriginalEnvironment()(*string) + GetPayload()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetProductionEnvironment()(*bool) + GetRef()(*string) + GetRepositoryUrl()(*string) + GetSha()(*string) + GetStatusesUrl()(*string) + GetTask()(*string) + GetTransientEnvironment()(*bool) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value NullableSimpleUserable)() + SetDescription(value *string)() + SetEnvironment(value *string)() + SetId(value *int64)() + SetNodeId(value *string)() + SetOriginalEnvironment(value *string)() + SetPayload(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetProductionEnvironment(value *bool)() + SetRef(value *string)() + SetRepositoryUrl(value *string)() + SetSha(value *string)() + SetStatusesUrl(value *string)() + SetTask(value *string)() + SetTransientEnvironment(value *bool)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/deployment_branch_policy.go b/pkg/github/models/deployment_branch_policy.go new file mode 100644 index 0000000..b09c45f --- /dev/null +++ b/pkg/github/models/deployment_branch_policy.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentBranchPolicy details of a deployment branch or tag policy. +type DeploymentBranchPolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The unique identifier of the branch or tag policy. + id *int32 + // The name pattern that branches or tags must match in order to deploy to the environment. + name *string + // The node_id property + node_id *string + // Whether this rule targets a branch or tag. + typeEscaped *DeploymentBranchPolicy_type +} +// NewDeploymentBranchPolicy instantiates a new DeploymentBranchPolicy and sets the default values. +func NewDeploymentBranchPolicy()(*DeploymentBranchPolicy) { + m := &DeploymentBranchPolicy{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentBranchPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentBranchPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentBranchPolicy(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentBranchPolicy) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentBranchPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentBranchPolicy_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*DeploymentBranchPolicy_type)) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the branch or tag policy. +// returns a *int32 when successful +func (m *DeploymentBranchPolicy) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name pattern that branches or tags must match in order to deploy to the environment. +// returns a *string when successful +func (m *DeploymentBranchPolicy) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *DeploymentBranchPolicy) GetNodeId()(*string) { + return m.node_id +} +// GetTypeEscaped gets the type property value. Whether this rule targets a branch or tag. +// returns a *DeploymentBranchPolicy_type when successful +func (m *DeploymentBranchPolicy) GetTypeEscaped()(*DeploymentBranchPolicy_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *DeploymentBranchPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentBranchPolicy) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier of the branch or tag policy. +func (m *DeploymentBranchPolicy) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name pattern that branches or tags must match in order to deploy to the environment. +func (m *DeploymentBranchPolicy) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *DeploymentBranchPolicy) SetNodeId(value *string)() { + m.node_id = value +} +// SetTypeEscaped sets the type property value. Whether this rule targets a branch or tag. +func (m *DeploymentBranchPolicy) SetTypeEscaped(value *DeploymentBranchPolicy_type)() { + m.typeEscaped = value +} +type DeploymentBranchPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetTypeEscaped()(*DeploymentBranchPolicy_type) + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetTypeEscaped(value *DeploymentBranchPolicy_type)() +} diff --git a/pkg/github/models/deployment_branch_policy_name_pattern.go b/pkg/github/models/deployment_branch_policy_name_pattern.go new file mode 100644 index 0000000..543ff4b --- /dev/null +++ b/pkg/github/models/deployment_branch_policy_name_pattern.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DeploymentBranchPolicyNamePattern struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name pattern that branches must match in order to deploy to the environment.Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + name *string +} +// NewDeploymentBranchPolicyNamePattern instantiates a new DeploymentBranchPolicyNamePattern and sets the default values. +func NewDeploymentBranchPolicyNamePattern()(*DeploymentBranchPolicyNamePattern) { + m := &DeploymentBranchPolicyNamePattern{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentBranchPolicyNamePatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentBranchPolicyNamePatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentBranchPolicyNamePattern(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentBranchPolicyNamePattern) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentBranchPolicyNamePattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name pattern that branches must match in order to deploy to the environment.Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). +// returns a *string when successful +func (m *DeploymentBranchPolicyNamePattern) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *DeploymentBranchPolicyNamePattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *DeploymentBranchPolicyNamePattern) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name pattern that branches must match in order to deploy to the environment.Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). +func (m *DeploymentBranchPolicyNamePattern) SetName(value *string)() { + m.name = value +} +type DeploymentBranchPolicyNamePatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/pkg/github/models/deployment_branch_policy_name_pattern_with_type.go b/pkg/github/models/deployment_branch_policy_name_pattern_with_type.go new file mode 100644 index 0000000..d0aa755 --- /dev/null +++ b/pkg/github/models/deployment_branch_policy_name_pattern_with_type.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DeploymentBranchPolicyNamePatternWithType struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name pattern that branches or tags must match in order to deploy to the environment.Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + name *string + // Whether this rule targets a branch or tag + typeEscaped *DeploymentBranchPolicyNamePatternWithType_type +} +// NewDeploymentBranchPolicyNamePatternWithType instantiates a new DeploymentBranchPolicyNamePatternWithType and sets the default values. +func NewDeploymentBranchPolicyNamePatternWithType()(*DeploymentBranchPolicyNamePatternWithType) { + m := &DeploymentBranchPolicyNamePatternWithType{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentBranchPolicyNamePatternWithTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentBranchPolicyNamePatternWithTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentBranchPolicyNamePatternWithType(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentBranchPolicyNamePatternWithType) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentBranchPolicyNamePatternWithType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentBranchPolicyNamePatternWithType_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*DeploymentBranchPolicyNamePatternWithType_type)) + } + return nil + } + return res +} +// GetName gets the name property value. The name pattern that branches or tags must match in order to deploy to the environment.Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). +// returns a *string when successful +func (m *DeploymentBranchPolicyNamePatternWithType) GetName()(*string) { + return m.name +} +// GetTypeEscaped gets the type property value. Whether this rule targets a branch or tag +// returns a *DeploymentBranchPolicyNamePatternWithType_type when successful +func (m *DeploymentBranchPolicyNamePatternWithType) GetTypeEscaped()(*DeploymentBranchPolicyNamePatternWithType_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *DeploymentBranchPolicyNamePatternWithType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentBranchPolicyNamePatternWithType) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name pattern that branches or tags must match in order to deploy to the environment.Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). +func (m *DeploymentBranchPolicyNamePatternWithType) SetName(value *string)() { + m.name = value +} +// SetTypeEscaped sets the type property value. Whether this rule targets a branch or tag +func (m *DeploymentBranchPolicyNamePatternWithType) SetTypeEscaped(value *DeploymentBranchPolicyNamePatternWithType_type)() { + m.typeEscaped = value +} +type DeploymentBranchPolicyNamePatternWithTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetTypeEscaped()(*DeploymentBranchPolicyNamePatternWithType_type) + SetName(value *string)() + SetTypeEscaped(value *DeploymentBranchPolicyNamePatternWithType_type)() +} diff --git a/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go b/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go new file mode 100644 index 0000000..8cb5c81 --- /dev/null +++ b/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Whether this rule targets a branch or tag +type DeploymentBranchPolicyNamePatternWithType_type int + +const ( + BRANCH_DEPLOYMENTBRANCHPOLICYNAMEPATTERNWITHTYPE_TYPE DeploymentBranchPolicyNamePatternWithType_type = iota + TAG_DEPLOYMENTBRANCHPOLICYNAMEPATTERNWITHTYPE_TYPE +) + +func (i DeploymentBranchPolicyNamePatternWithType_type) String() string { + return []string{"branch", "tag"}[i] +} +func ParseDeploymentBranchPolicyNamePatternWithType_type(v string) (any, error) { + result := BRANCH_DEPLOYMENTBRANCHPOLICYNAMEPATTERNWITHTYPE_TYPE + switch v { + case "branch": + result = BRANCH_DEPLOYMENTBRANCHPOLICYNAMEPATTERNWITHTYPE_TYPE + case "tag": + result = TAG_DEPLOYMENTBRANCHPOLICYNAMEPATTERNWITHTYPE_TYPE + default: + return 0, errors.New("Unknown DeploymentBranchPolicyNamePatternWithType_type value: " + v) + } + return &result, nil +} +func SerializeDeploymentBranchPolicyNamePatternWithType_type(values []DeploymentBranchPolicyNamePatternWithType_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DeploymentBranchPolicyNamePatternWithType_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/deployment_branch_policy_settings.go b/pkg/github/models/deployment_branch_policy_settings.go new file mode 100644 index 0000000..3724f40 --- /dev/null +++ b/pkg/github/models/deployment_branch_policy_settings.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentBranchPolicySettings the type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +type DeploymentBranchPolicySettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. + custom_branch_policies *bool + // Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. + protected_branches *bool +} +// NewDeploymentBranchPolicySettings instantiates a new DeploymentBranchPolicySettings and sets the default values. +func NewDeploymentBranchPolicySettings()(*DeploymentBranchPolicySettings) { + m := &DeploymentBranchPolicySettings{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentBranchPolicySettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentBranchPolicySettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentBranchPolicySettings(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentBranchPolicySettings) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomBranchPolicies gets the custom_branch_policies property value. Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. +// returns a *bool when successful +func (m *DeploymentBranchPolicySettings) GetCustomBranchPolicies()(*bool) { + return m.custom_branch_policies +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentBranchPolicySettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_branch_policies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBranchPolicies(val) + } + return nil + } + res["protected_branches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProtectedBranches(val) + } + return nil + } + return res +} +// GetProtectedBranches gets the protected_branches property value. Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. +// returns a *bool when successful +func (m *DeploymentBranchPolicySettings) GetProtectedBranches()(*bool) { + return m.protected_branches +} +// Serialize serializes information the current object +func (m *DeploymentBranchPolicySettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("custom_branch_policies", m.GetCustomBranchPolicies()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("protected_branches", m.GetProtectedBranches()) + 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 *DeploymentBranchPolicySettings) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomBranchPolicies sets the custom_branch_policies property value. Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. +func (m *DeploymentBranchPolicySettings) SetCustomBranchPolicies(value *bool)() { + m.custom_branch_policies = value +} +// SetProtectedBranches sets the protected_branches property value. Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. +func (m *DeploymentBranchPolicySettings) SetProtectedBranches(value *bool)() { + m.protected_branches = value +} +type DeploymentBranchPolicySettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomBranchPolicies()(*bool) + GetProtectedBranches()(*bool) + SetCustomBranchPolicies(value *bool)() + SetProtectedBranches(value *bool)() +} diff --git a/pkg/github/models/deployment_branch_policy_type.go b/pkg/github/models/deployment_branch_policy_type.go new file mode 100644 index 0000000..eed4159 --- /dev/null +++ b/pkg/github/models/deployment_branch_policy_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Whether this rule targets a branch or tag. +type DeploymentBranchPolicy_type int + +const ( + BRANCH_DEPLOYMENTBRANCHPOLICY_TYPE DeploymentBranchPolicy_type = iota + TAG_DEPLOYMENTBRANCHPOLICY_TYPE +) + +func (i DeploymentBranchPolicy_type) String() string { + return []string{"branch", "tag"}[i] +} +func ParseDeploymentBranchPolicy_type(v string) (any, error) { + result := BRANCH_DEPLOYMENTBRANCHPOLICY_TYPE + switch v { + case "branch": + result = BRANCH_DEPLOYMENTBRANCHPOLICY_TYPE + case "tag": + result = TAG_DEPLOYMENTBRANCHPOLICY_TYPE + default: + return 0, errors.New("Unknown DeploymentBranchPolicy_type value: " + v) + } + return &result, nil +} +func SerializeDeploymentBranchPolicy_type(values []DeploymentBranchPolicy_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DeploymentBranchPolicy_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/deployment_protection_rule.go b/pkg/github/models/deployment_protection_rule.go new file mode 100644 index 0000000..104d5e1 --- /dev/null +++ b/pkg/github/models/deployment_protection_rule.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentProtectionRule deployment protection rule +type DeploymentProtectionRule struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub App that is providing a custom deployment protection rule. + app CustomDeploymentRuleAppable + // Whether the deployment protection rule is enabled for the environment. + enabled *bool + // The unique identifier for the deployment protection rule. + id *int32 + // The node ID for the deployment protection rule. + node_id *string +} +// NewDeploymentProtectionRule instantiates a new DeploymentProtectionRule and sets the default values. +func NewDeploymentProtectionRule()(*DeploymentProtectionRule) { + m := &DeploymentProtectionRule{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentProtectionRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentProtectionRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentProtectionRule(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentProtectionRule) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApp gets the app property value. A GitHub App that is providing a custom deployment protection rule. +// returns a CustomDeploymentRuleAppable when successful +func (m *DeploymentProtectionRule) GetApp()(CustomDeploymentRuleAppable) { + return m.app +} +// GetEnabled gets the enabled property value. Whether the deployment protection rule is enabled for the environment. +// returns a *bool when successful +func (m *DeploymentProtectionRule) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentProtectionRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomDeploymentRuleAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApp(val.(CustomDeploymentRuleAppable)) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier for the deployment protection rule. +// returns a *int32 when successful +func (m *DeploymentProtectionRule) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node ID for the deployment protection rule. +// returns a *string when successful +func (m *DeploymentProtectionRule) GetNodeId()(*string) { + return m.node_id +} +// Serialize serializes information the current object +func (m *DeploymentProtectionRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("app", m.GetApp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + 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 *DeploymentProtectionRule) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApp sets the app property value. A GitHub App that is providing a custom deployment protection rule. +func (m *DeploymentProtectionRule) SetApp(value CustomDeploymentRuleAppable)() { + m.app = value +} +// SetEnabled sets the enabled property value. Whether the deployment protection rule is enabled for the environment. +func (m *DeploymentProtectionRule) SetEnabled(value *bool)() { + m.enabled = value +} +// SetId sets the id property value. The unique identifier for the deployment protection rule. +func (m *DeploymentProtectionRule) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node ID for the deployment protection rule. +func (m *DeploymentProtectionRule) SetNodeId(value *string)() { + m.node_id = value +} +type DeploymentProtectionRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApp()(CustomDeploymentRuleAppable) + GetEnabled()(*bool) + GetId()(*int32) + GetNodeId()(*string) + SetApp(value CustomDeploymentRuleAppable)() + SetEnabled(value *bool)() + SetId(value *int32)() + SetNodeId(value *string)() +} diff --git a/pkg/github/models/deployment_reviewer_type.go b/pkg/github/models/deployment_reviewer_type.go new file mode 100644 index 0000000..64d0295 --- /dev/null +++ b/pkg/github/models/deployment_reviewer_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of reviewer. +type DeploymentReviewerType int + +const ( + USER_DEPLOYMENTREVIEWERTYPE DeploymentReviewerType = iota + TEAM_DEPLOYMENTREVIEWERTYPE +) + +func (i DeploymentReviewerType) String() string { + return []string{"User", "Team"}[i] +} +func ParseDeploymentReviewerType(v string) (any, error) { + result := USER_DEPLOYMENTREVIEWERTYPE + switch v { + case "User": + result = USER_DEPLOYMENTREVIEWERTYPE + case "Team": + result = TEAM_DEPLOYMENTREVIEWERTYPE + default: + return 0, errors.New("Unknown DeploymentReviewerType value: " + v) + } + return &result, nil +} +func SerializeDeploymentReviewerType(values []DeploymentReviewerType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DeploymentReviewerType) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/deployment_simple.go b/pkg/github/models/deployment_simple.go new file mode 100644 index 0000000..1eb295a --- /dev/null +++ b/pkg/github/models/deployment_simple.go @@ -0,0 +1,459 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentSimple a deployment created as the result of an Actions check run from a workflow that references an environment +type DeploymentSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // Name for the target deployment environment. + environment *string + // Unique identifier of the deployment + id *int32 + // The node_id property + node_id *string + // The original_environment property + original_environment *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // Specifies if the given environment is one that end-users directly interact with. Default: false. + production_environment *bool + // The repository_url property + repository_url *string + // The statuses_url property + statuses_url *string + // Parameter to specify a task to execute + task *string + // Specifies if the given environment is will no longer exist at some point in the future. Default: false. + transient_environment *bool + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewDeploymentSimple instantiates a new DeploymentSimple and sets the default values. +func NewDeploymentSimple()(*DeploymentSimple) { + m := &DeploymentSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *DeploymentSimple) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *DeploymentSimple) GetDescription()(*string) { + return m.description +} +// GetEnvironment gets the environment property value. Name for the target deployment environment. +// returns a *string when successful +func (m *DeploymentSimple) GetEnvironment()(*string) { + return m.environment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["original_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalEnvironment(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["production_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProductionEnvironment(val) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["task"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTask(val) + } + return nil + } + res["transient_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTransientEnvironment(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the deployment +// returns a *int32 when successful +func (m *DeploymentSimple) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *DeploymentSimple) GetNodeId()(*string) { + return m.node_id +} +// GetOriginalEnvironment gets the original_environment property value. The original_environment property +// returns a *string when successful +func (m *DeploymentSimple) GetOriginalEnvironment()(*string) { + return m.original_environment +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *DeploymentSimple) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetProductionEnvironment gets the production_environment property value. Specifies if the given environment is one that end-users directly interact with. Default: false. +// returns a *bool when successful +func (m *DeploymentSimple) GetProductionEnvironment()(*bool) { + return m.production_environment +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *DeploymentSimple) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *DeploymentSimple) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetTask gets the task property value. Parameter to specify a task to execute +// returns a *string when successful +func (m *DeploymentSimple) GetTask()(*string) { + return m.task +} +// GetTransientEnvironment gets the transient_environment property value. Specifies if the given environment is will no longer exist at some point in the future. Default: false. +// returns a *bool when successful +func (m *DeploymentSimple) GetTransientEnvironment()(*bool) { + return m.transient_environment +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *DeploymentSimple) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *DeploymentSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DeploymentSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("original_environment", m.GetOriginalEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("production_environment", m.GetProductionEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("task", m.GetTask()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("transient_environment", m.GetTransientEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *DeploymentSimple) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *DeploymentSimple) SetDescription(value *string)() { + m.description = value +} +// SetEnvironment sets the environment property value. Name for the target deployment environment. +func (m *DeploymentSimple) SetEnvironment(value *string)() { + m.environment = value +} +// SetId sets the id property value. Unique identifier of the deployment +func (m *DeploymentSimple) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *DeploymentSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetOriginalEnvironment sets the original_environment property value. The original_environment property +func (m *DeploymentSimple) SetOriginalEnvironment(value *string)() { + m.original_environment = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *DeploymentSimple) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetProductionEnvironment sets the production_environment property value. Specifies if the given environment is one that end-users directly interact with. Default: false. +func (m *DeploymentSimple) SetProductionEnvironment(value *bool)() { + m.production_environment = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *DeploymentSimple) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *DeploymentSimple) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetTask sets the task property value. Parameter to specify a task to execute +func (m *DeploymentSimple) SetTask(value *string)() { + m.task = value +} +// SetTransientEnvironment sets the transient_environment property value. Specifies if the given environment is will no longer exist at some point in the future. Default: false. +func (m *DeploymentSimple) SetTransientEnvironment(value *bool)() { + m.transient_environment = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *DeploymentSimple) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *DeploymentSimple) SetUrl(value *string)() { + m.url = value +} +type DeploymentSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetEnvironment()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetOriginalEnvironment()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetProductionEnvironment()(*bool) + GetRepositoryUrl()(*string) + GetStatusesUrl()(*string) + GetTask()(*string) + GetTransientEnvironment()(*bool) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetEnvironment(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetOriginalEnvironment(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetProductionEnvironment(value *bool)() + SetRepositoryUrl(value *string)() + SetStatusesUrl(value *string)() + SetTask(value *string)() + SetTransientEnvironment(value *bool)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/deployment_status.go b/pkg/github/models/deployment_status.go new file mode 100644 index 0000000..6936789 --- /dev/null +++ b/pkg/github/models/deployment_status.go @@ -0,0 +1,489 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentStatus the status of a deployment. +type DeploymentStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + creator NullableSimpleUserable + // The deployment_url property + deployment_url *string + // A short description of the status. + description *string + // The environment of the deployment that the status is for. + environment *string + // The URL for accessing your environment. + environment_url *string + // The id property + id *int64 + // The URL to associate with this status. + log_url *string + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The repository_url property + repository_url *string + // The state of the status. + state *DeploymentStatus_state + // Deprecated: the URL to associate with this status. + target_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewDeploymentStatus instantiates a new DeploymentStatus and sets the default values. +func NewDeploymentStatus()(*DeploymentStatus) { + m := &DeploymentStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeploymentStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeploymentStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DeploymentStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *DeploymentStatus) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *DeploymentStatus) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetDeploymentUrl gets the deployment_url property value. The deployment_url property +// returns a *string when successful +func (m *DeploymentStatus) GetDeploymentUrl()(*string) { + return m.deployment_url +} +// GetDescription gets the description property value. A short description of the status. +// returns a *string when successful +func (m *DeploymentStatus) GetDescription()(*string) { + return m.description +} +// GetEnvironment gets the environment property value. The environment of the deployment that the status is for. +// returns a *string when successful +func (m *DeploymentStatus) GetEnvironment()(*string) { + return m.environment +} +// GetEnvironmentUrl gets the environment_url property value. The URL for accessing your environment. +// returns a *string when successful +func (m *DeploymentStatus) GetEnvironmentUrl()(*string) { + return m.environment_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + return nil + } + res["deployment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentUrl(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["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["environment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["log_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentStatus_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*DeploymentStatus_state)) + } + return nil + } + res["target_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *DeploymentStatus) GetId()(*int64) { + return m.id +} +// GetLogUrl gets the log_url property value. The URL to associate with this status. +// returns a *string when successful +func (m *DeploymentStatus) GetLogUrl()(*string) { + return m.log_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *DeploymentStatus) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *DeploymentStatus) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *DeploymentStatus) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetState gets the state property value. The state of the status. +// returns a *DeploymentStatus_state when successful +func (m *DeploymentStatus) GetState()(*DeploymentStatus_state) { + return m.state +} +// GetTargetUrl gets the target_url property value. Deprecated: the URL to associate with this status. +// returns a *string when successful +func (m *DeploymentStatus) GetTargetUrl()(*string) { + return m.target_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *DeploymentStatus) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *DeploymentStatus) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployment_url", m.GetDeploymentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment_url", m.GetEnvironmentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("log_url", m.GetLogUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_url", m.GetTargetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *DeploymentStatus) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *DeploymentStatus) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetDeploymentUrl sets the deployment_url property value. The deployment_url property +func (m *DeploymentStatus) SetDeploymentUrl(value *string)() { + m.deployment_url = value +} +// SetDescription sets the description property value. A short description of the status. +func (m *DeploymentStatus) SetDescription(value *string)() { + m.description = value +} +// SetEnvironment sets the environment property value. The environment of the deployment that the status is for. +func (m *DeploymentStatus) SetEnvironment(value *string)() { + m.environment = value +} +// SetEnvironmentUrl sets the environment_url property value. The URL for accessing your environment. +func (m *DeploymentStatus) SetEnvironmentUrl(value *string)() { + m.environment_url = value +} +// SetId sets the id property value. The id property +func (m *DeploymentStatus) SetId(value *int64)() { + m.id = value +} +// SetLogUrl sets the log_url property value. The URL to associate with this status. +func (m *DeploymentStatus) SetLogUrl(value *string)() { + m.log_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *DeploymentStatus) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *DeploymentStatus) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *DeploymentStatus) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetState sets the state property value. The state of the status. +func (m *DeploymentStatus) SetState(value *DeploymentStatus_state)() { + m.state = value +} +// SetTargetUrl sets the target_url property value. Deprecated: the URL to associate with this status. +func (m *DeploymentStatus) SetTargetUrl(value *string)() { + m.target_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *DeploymentStatus) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *DeploymentStatus) SetUrl(value *string)() { + m.url = value +} +type DeploymentStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(NullableSimpleUserable) + GetDeploymentUrl()(*string) + GetDescription()(*string) + GetEnvironment()(*string) + GetEnvironmentUrl()(*string) + GetId()(*int64) + GetLogUrl()(*string) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetRepositoryUrl()(*string) + GetState()(*DeploymentStatus_state) + GetTargetUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value NullableSimpleUserable)() + SetDeploymentUrl(value *string)() + SetDescription(value *string)() + SetEnvironment(value *string)() + SetEnvironmentUrl(value *string)() + SetId(value *int64)() + SetLogUrl(value *string)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetRepositoryUrl(value *string)() + SetState(value *DeploymentStatus_state)() + SetTargetUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/deployment_status_state.go b/pkg/github/models/deployment_status_state.go new file mode 100644 index 0000000..a9cf204 --- /dev/null +++ b/pkg/github/models/deployment_status_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// The state of the status. +type DeploymentStatus_state int + +const ( + ERROR_DEPLOYMENTSTATUS_STATE DeploymentStatus_state = iota + FAILURE_DEPLOYMENTSTATUS_STATE + INACTIVE_DEPLOYMENTSTATUS_STATE + PENDING_DEPLOYMENTSTATUS_STATE + SUCCESS_DEPLOYMENTSTATUS_STATE + QUEUED_DEPLOYMENTSTATUS_STATE + IN_PROGRESS_DEPLOYMENTSTATUS_STATE +) + +func (i DeploymentStatus_state) String() string { + return []string{"error", "failure", "inactive", "pending", "success", "queued", "in_progress"}[i] +} +func ParseDeploymentStatus_state(v string) (any, error) { + result := ERROR_DEPLOYMENTSTATUS_STATE + switch v { + case "error": + result = ERROR_DEPLOYMENTSTATUS_STATE + case "failure": + result = FAILURE_DEPLOYMENTSTATUS_STATE + case "inactive": + result = INACTIVE_DEPLOYMENTSTATUS_STATE + case "pending": + result = PENDING_DEPLOYMENTSTATUS_STATE + case "success": + result = SUCCESS_DEPLOYMENTSTATUS_STATE + case "queued": + result = QUEUED_DEPLOYMENTSTATUS_STATE + case "in_progress": + result = IN_PROGRESS_DEPLOYMENTSTATUS_STATE + default: + return 0, errors.New("Unknown DeploymentStatus_state value: " + v) + } + return &result, nil +} +func SerializeDeploymentStatus_state(values []DeploymentStatus_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DeploymentStatus_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/diff_entry.go b/pkg/github/models/diff_entry.go new file mode 100644 index 0000000..a6506c8 --- /dev/null +++ b/pkg/github/models/diff_entry.go @@ -0,0 +1,372 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DiffEntry diff Entry +type DiffEntry struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The additions property + additions *int32 + // The blob_url property + blob_url *string + // The changes property + changes *int32 + // The contents_url property + contents_url *string + // The deletions property + deletions *int32 + // The filename property + filename *string + // The patch property + patch *string + // The previous_filename property + previous_filename *string + // The raw_url property + raw_url *string + // The sha property + sha *string + // The status property + status *DiffEntry_status +} +// NewDiffEntry instantiates a new DiffEntry and sets the default values. +func NewDiffEntry()(*DiffEntry) { + m := &DiffEntry{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDiffEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDiffEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDiffEntry(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DiffEntry) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdditions gets the additions property value. The additions property +// returns a *int32 when successful +func (m *DiffEntry) GetAdditions()(*int32) { + return m.additions +} +// GetBlobUrl gets the blob_url property value. The blob_url property +// returns a *string when successful +func (m *DiffEntry) GetBlobUrl()(*string) { + return m.blob_url +} +// GetChanges gets the changes property value. The changes property +// returns a *int32 when successful +func (m *DiffEntry) GetChanges()(*int32) { + return m.changes +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *DiffEntry) GetContentsUrl()(*string) { + return m.contents_url +} +// GetDeletions gets the deletions property value. The deletions property +// returns a *int32 when successful +func (m *DiffEntry) GetDeletions()(*int32) { + return m.deletions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DiffEntry) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdditions(val) + } + return nil + } + res["blob_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobUrl(val) + } + return nil + } + res["changes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChanges(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeletions(val) + } + return nil + } + res["filename"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilename(val) + } + return nil + } + res["patch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatch(val) + } + return nil + } + res["previous_filename"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousFilename(val) + } + return nil + } + res["raw_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDiffEntry_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DiffEntry_status)) + } + return nil + } + return res +} +// GetFilename gets the filename property value. The filename property +// returns a *string when successful +func (m *DiffEntry) GetFilename()(*string) { + return m.filename +} +// GetPatch gets the patch property value. The patch property +// returns a *string when successful +func (m *DiffEntry) GetPatch()(*string) { + return m.patch +} +// GetPreviousFilename gets the previous_filename property value. The previous_filename property +// returns a *string when successful +func (m *DiffEntry) GetPreviousFilename()(*string) { + return m.previous_filename +} +// GetRawUrl gets the raw_url property value. The raw_url property +// returns a *string when successful +func (m *DiffEntry) GetRawUrl()(*string) { + return m.raw_url +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *DiffEntry) GetSha()(*string) { + return m.sha +} +// GetStatus gets the status property value. The status property +// returns a *DiffEntry_status when successful +func (m *DiffEntry) GetStatus()(*DiffEntry_status) { + return m.status +} +// Serialize serializes information the current object +func (m *DiffEntry) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("additions", m.GetAdditions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blob_url", m.GetBlobUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("changes", m.GetChanges()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deletions", m.GetDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("filename", m.GetFilename()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch", m.GetPatch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_filename", m.GetPreviousFilename()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("raw_url", m.GetRawUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.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 *DiffEntry) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdditions sets the additions property value. The additions property +func (m *DiffEntry) SetAdditions(value *int32)() { + m.additions = value +} +// SetBlobUrl sets the blob_url property value. The blob_url property +func (m *DiffEntry) SetBlobUrl(value *string)() { + m.blob_url = value +} +// SetChanges sets the changes property value. The changes property +func (m *DiffEntry) SetChanges(value *int32)() { + m.changes = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *DiffEntry) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetDeletions sets the deletions property value. The deletions property +func (m *DiffEntry) SetDeletions(value *int32)() { + m.deletions = value +} +// SetFilename sets the filename property value. The filename property +func (m *DiffEntry) SetFilename(value *string)() { + m.filename = value +} +// SetPatch sets the patch property value. The patch property +func (m *DiffEntry) SetPatch(value *string)() { + m.patch = value +} +// SetPreviousFilename sets the previous_filename property value. The previous_filename property +func (m *DiffEntry) SetPreviousFilename(value *string)() { + m.previous_filename = value +} +// SetRawUrl sets the raw_url property value. The raw_url property +func (m *DiffEntry) SetRawUrl(value *string)() { + m.raw_url = value +} +// SetSha sets the sha property value. The sha property +func (m *DiffEntry) SetSha(value *string)() { + m.sha = value +} +// SetStatus sets the status property value. The status property +func (m *DiffEntry) SetStatus(value *DiffEntry_status)() { + m.status = value +} +type DiffEntryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditions()(*int32) + GetBlobUrl()(*string) + GetChanges()(*int32) + GetContentsUrl()(*string) + GetDeletions()(*int32) + GetFilename()(*string) + GetPatch()(*string) + GetPreviousFilename()(*string) + GetRawUrl()(*string) + GetSha()(*string) + GetStatus()(*DiffEntry_status) + SetAdditions(value *int32)() + SetBlobUrl(value *string)() + SetChanges(value *int32)() + SetContentsUrl(value *string)() + SetDeletions(value *int32)() + SetFilename(value *string)() + SetPatch(value *string)() + SetPreviousFilename(value *string)() + SetRawUrl(value *string)() + SetSha(value *string)() + SetStatus(value *DiffEntry_status)() +} diff --git a/pkg/github/models/diff_entry_status.go b/pkg/github/models/diff_entry_status.go new file mode 100644 index 0000000..bd97efe --- /dev/null +++ b/pkg/github/models/diff_entry_status.go @@ -0,0 +1,51 @@ +package models +import ( + "errors" +) +type DiffEntry_status int + +const ( + ADDED_DIFFENTRY_STATUS DiffEntry_status = iota + REMOVED_DIFFENTRY_STATUS + MODIFIED_DIFFENTRY_STATUS + RENAMED_DIFFENTRY_STATUS + COPIED_DIFFENTRY_STATUS + CHANGED_DIFFENTRY_STATUS + UNCHANGED_DIFFENTRY_STATUS +) + +func (i DiffEntry_status) String() string { + return []string{"added", "removed", "modified", "renamed", "copied", "changed", "unchanged"}[i] +} +func ParseDiffEntry_status(v string) (any, error) { + result := ADDED_DIFFENTRY_STATUS + switch v { + case "added": + result = ADDED_DIFFENTRY_STATUS + case "removed": + result = REMOVED_DIFFENTRY_STATUS + case "modified": + result = MODIFIED_DIFFENTRY_STATUS + case "renamed": + result = RENAMED_DIFFENTRY_STATUS + case "copied": + result = COPIED_DIFFENTRY_STATUS + case "changed": + result = CHANGED_DIFFENTRY_STATUS + case "unchanged": + result = UNCHANGED_DIFFENTRY_STATUS + default: + return 0, errors.New("Unknown DiffEntry_status value: " + v) + } + return &result, nil +} +func SerializeDiffEntry_status(values []DiffEntry_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DiffEntry_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/email.go b/pkg/github/models/email.go new file mode 100644 index 0000000..1a663e7 --- /dev/null +++ b/pkg/github/models/email.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Email email +type Email struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email property + email *string + // The primary property + primary *bool + // The verified property + verified *bool + // The visibility property + visibility *string +} +// NewEmail instantiates a new Email and sets the default values. +func NewEmail()(*Email) { + m := &Email{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEmailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmail(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Email) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *Email) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Email) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimary(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + return res +} +// GetPrimary gets the primary property value. The primary property +// returns a *bool when successful +func (m *Email) GetPrimary()(*bool) { + return m.primary +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *Email) GetVerified()(*bool) { + return m.verified +} +// GetVisibility gets the visibility property value. The visibility property +// returns a *string when successful +func (m *Email) GetVisibility()(*string) { + return m.visibility +} +// Serialize serializes information the current object +func (m *Email) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("primary", m.GetPrimary()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + 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 *Email) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email property +func (m *Email) SetEmail(value *string)() { + m.email = value +} +// SetPrimary sets the primary property value. The primary property +func (m *Email) SetPrimary(value *bool)() { + m.primary = value +} +// SetVerified sets the verified property value. The verified property +func (m *Email) SetVerified(value *bool)() { + m.verified = value +} +// SetVisibility sets the visibility property value. The visibility property +func (m *Email) SetVisibility(value *string)() { + m.visibility = value +} +type Emailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetPrimary()(*bool) + GetVerified()(*bool) + GetVisibility()(*string) + SetEmail(value *string)() + SetPrimary(value *bool)() + SetVerified(value *bool)() + SetVisibility(value *string)() +} diff --git a/pkg/github/models/empty_object.go b/pkg/github/models/empty_object.go new file mode 100644 index 0000000..ac73b6f --- /dev/null +++ b/pkg/github/models/empty_object.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmptyObject an object without any properties. +type EmptyObject struct { +} +// NewEmptyObject instantiates a new EmptyObject and sets the default values. +func NewEmptyObject()(*EmptyObject) { + m := &EmptyObject{ + } + return m +} +// CreateEmptyObjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmptyObjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmptyObject(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmptyObject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *EmptyObject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +type EmptyObjectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/empty_object503_error.go b/pkg/github/models/empty_object503_error.go new file mode 100644 index 0000000..2e7d36e --- /dev/null +++ b/pkg/github/models/empty_object503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type EmptyObject503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewEmptyObject503Error instantiates a new EmptyObject503Error and sets the default values. +func NewEmptyObject503Error()(*EmptyObject503Error) { + m := &EmptyObject503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEmptyObject503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmptyObject503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmptyObject503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *EmptyObject503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EmptyObject503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *EmptyObject503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *EmptyObject503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmptyObject503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *EmptyObject503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *EmptyObject503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *EmptyObject503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *EmptyObject503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *EmptyObject503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *EmptyObject503Error) SetMessage(value *string)() { + m.message = value +} +type EmptyObject503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/enabled_organizations.go b/pkg/github/models/enabled_organizations.go new file mode 100644 index 0000000..e7f7639 --- /dev/null +++ b/pkg/github/models/enabled_organizations.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. +type EnabledOrganizations int + +const ( + ALL_ENABLEDORGANIZATIONS EnabledOrganizations = iota + NONE_ENABLEDORGANIZATIONS + SELECTED_ENABLEDORGANIZATIONS +) + +func (i EnabledOrganizations) String() string { + return []string{"all", "none", "selected"}[i] +} +func ParseEnabledOrganizations(v string) (any, error) { + result := ALL_ENABLEDORGANIZATIONS + switch v { + case "all": + result = ALL_ENABLEDORGANIZATIONS + case "none": + result = NONE_ENABLEDORGANIZATIONS + case "selected": + result = SELECTED_ENABLEDORGANIZATIONS + default: + return 0, errors.New("Unknown EnabledOrganizations value: " + v) + } + return &result, nil +} +func SerializeEnabledOrganizations(values []EnabledOrganizations) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i EnabledOrganizations) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/enabled_repositories.go b/pkg/github/models/enabled_repositories.go new file mode 100644 index 0000000..527bacd --- /dev/null +++ b/pkg/github/models/enabled_repositories.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The policy that controls the repositories in the organization that are allowed to run GitHub Actions. +type EnabledRepositories int + +const ( + ALL_ENABLEDREPOSITORIES EnabledRepositories = iota + NONE_ENABLEDREPOSITORIES + SELECTED_ENABLEDREPOSITORIES +) + +func (i EnabledRepositories) String() string { + return []string{"all", "none", "selected"}[i] +} +func ParseEnabledRepositories(v string) (any, error) { + result := ALL_ENABLEDREPOSITORIES + switch v { + case "all": + result = ALL_ENABLEDREPOSITORIES + case "none": + result = NONE_ENABLEDREPOSITORIES + case "selected": + result = SELECTED_ENABLEDREPOSITORIES + default: + return 0, errors.New("Unknown EnabledRepositories value: " + v) + } + return &result, nil +} +func SerializeEnabledRepositories(values []EnabledRepositories) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i EnabledRepositories) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/enterprise.go b/pkg/github/models/enterprise.go new file mode 100644 index 0000000..8a2e710 --- /dev/null +++ b/pkg/github/models/enterprise.go @@ -0,0 +1,343 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Enterprise an enterprise on GitHub. +type Enterprise struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A short description of the enterprise. + description *string + // The html_url property + html_url *string + // Unique identifier of the enterprise + id *int32 + // The name of the enterprise. + name *string + // The node_id property + node_id *string + // The slug url identifier for the enterprise. + slug *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The enterprise's website URL. + website_url *string +} +// NewEnterprise instantiates a new Enterprise and sets the default values. +func NewEnterprise()(*Enterprise) { + m := &Enterprise{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnterpriseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnterpriseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnterprise(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Enterprise) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *Enterprise) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Enterprise) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. A short description of the enterprise. +// returns a *string when successful +func (m *Enterprise) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Enterprise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["website_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebsiteUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Enterprise) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the enterprise +// returns a *int32 when successful +func (m *Enterprise) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the enterprise. +// returns a *string when successful +func (m *Enterprise) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Enterprise) GetNodeId()(*string) { + return m.node_id +} +// GetSlug gets the slug property value. The slug url identifier for the enterprise. +// returns a *string when successful +func (m *Enterprise) GetSlug()(*string) { + return m.slug +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Enterprise) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetWebsiteUrl gets the website_url property value. The enterprise's website URL. +// returns a *string when successful +func (m *Enterprise) GetWebsiteUrl()(*string) { + return m.website_url +} +// Serialize serializes information the current object +func (m *Enterprise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("website_url", m.GetWebsiteUrl()) + 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 *Enterprise) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *Enterprise) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Enterprise) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. A short description of the enterprise. +func (m *Enterprise) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Enterprise) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the enterprise +func (m *Enterprise) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the enterprise. +func (m *Enterprise) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Enterprise) SetNodeId(value *string)() { + m.node_id = value +} +// SetSlug sets the slug property value. The slug url identifier for the enterprise. +func (m *Enterprise) SetSlug(value *string)() { + m.slug = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Enterprise) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetWebsiteUrl sets the website_url property value. The enterprise's website URL. +func (m *Enterprise) SetWebsiteUrl(value *string)() { + m.website_url = value +} +type Enterpriseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetSlug()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWebsiteUrl()(*string) + SetAvatarUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetSlug(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWebsiteUrl(value *string)() +} diff --git a/pkg/github/models/enterprise_security_analysis_settings.go b/pkg/github/models/enterprise_security_analysis_settings.go new file mode 100644 index 0000000..cf48af1 --- /dev/null +++ b/pkg/github/models/enterprise_security_analysis_settings.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type EnterpriseSecurityAnalysisSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred tothis enterprise. + advanced_security_enabled_for_new_repositories *bool + // Whether GitHub Advanced Security is automatically enabled for new user namespace repositories. + advanced_security_enabled_for_new_user_namespace_repositories *bool + // Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to thisenterprise. + dependabot_alerts_enabled_for_new_repositories *bool + // Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisenterprise. + secret_scanning_enabled_for_new_repositories *bool + // An optional URL string to display to contributors who are blocked from pushing a secret. + secret_scanning_push_protection_custom_link *string + // Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this enterprise. + secret_scanning_push_protection_enabled_for_new_repositories *bool + // Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this enterprise. + secret_scanning_validity_checks_enabled *bool +} +// NewEnterpriseSecurityAnalysisSettings instantiates a new EnterpriseSecurityAnalysisSettings and sets the default values. +func NewEnterpriseSecurityAnalysisSettings()(*EnterpriseSecurityAnalysisSettings) { + m := &EnterpriseSecurityAnalysisSettings{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnterpriseSecurityAnalysisSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnterpriseSecurityAnalysisSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnterpriseSecurityAnalysisSettings(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EnterpriseSecurityAnalysisSettings) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred tothis enterprise. +// returns a *bool when successful +func (m *EnterpriseSecurityAnalysisSettings) GetAdvancedSecurityEnabledForNewRepositories()(*bool) { + return m.advanced_security_enabled_for_new_repositories +} +// GetAdvancedSecurityEnabledForNewUserNamespaceRepositories gets the advanced_security_enabled_for_new_user_namespace_repositories property value. Whether GitHub Advanced Security is automatically enabled for new user namespace repositories. +// returns a *bool when successful +func (m *EnterpriseSecurityAnalysisSettings) GetAdvancedSecurityEnabledForNewUserNamespaceRepositories()(*bool) { + return m.advanced_security_enabled_for_new_user_namespace_repositories +} +// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to thisenterprise. +// returns a *bool when successful +func (m *EnterpriseSecurityAnalysisSettings) GetDependabotAlertsEnabledForNewRepositories()(*bool) { + return m.dependabot_alerts_enabled_for_new_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EnterpriseSecurityAnalysisSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advanced_security_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityEnabledForNewRepositories(val) + } + return nil + } + res["advanced_security_enabled_for_new_user_namespace_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityEnabledForNewUserNamespaceRepositories(val) + } + return nil + } + res["dependabot_alerts_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependabotAlertsEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_push_protection_custom_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionCustomLink(val) + } + return nil + } + res["secret_scanning_push_protection_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_validity_checks_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningValidityChecksEnabled(val) + } + return nil + } + return res +} +// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisenterprise. +// returns a *bool when successful +func (m *EnterpriseSecurityAnalysisSettings) GetSecretScanningEnabledForNewRepositories()(*bool) { + return m.secret_scanning_enabled_for_new_repositories +} +// GetSecretScanningPushProtectionCustomLink gets the secret_scanning_push_protection_custom_link property value. An optional URL string to display to contributors who are blocked from pushing a secret. +// returns a *string when successful +func (m *EnterpriseSecurityAnalysisSettings) GetSecretScanningPushProtectionCustomLink()(*string) { + return m.secret_scanning_push_protection_custom_link +} +// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this enterprise. +// returns a *bool when successful +func (m *EnterpriseSecurityAnalysisSettings) GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) { + return m.secret_scanning_push_protection_enabled_for_new_repositories +} +// GetSecretScanningValidityChecksEnabled gets the secret_scanning_validity_checks_enabled property value. Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this enterprise. +// returns a *bool when successful +func (m *EnterpriseSecurityAnalysisSettings) GetSecretScanningValidityChecksEnabled()(*bool) { + return m.secret_scanning_validity_checks_enabled +} +// Serialize serializes information the current object +func (m *EnterpriseSecurityAnalysisSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("advanced_security_enabled_for_new_repositories", m.GetAdvancedSecurityEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("advanced_security_enabled_for_new_user_namespace_repositories", m.GetAdvancedSecurityEnabledForNewUserNamespaceRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", m.GetDependabotAlertsEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_enabled_for_new_repositories", m.GetSecretScanningEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_scanning_push_protection_custom_link", m.GetSecretScanningPushProtectionCustomLink()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_push_protection_enabled_for_new_repositories", m.GetSecretScanningPushProtectionEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_validity_checks_enabled", m.GetSecretScanningValidityChecksEnabled()) + 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 *EnterpriseSecurityAnalysisSettings) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred tothis enterprise. +func (m *EnterpriseSecurityAnalysisSettings) SetAdvancedSecurityEnabledForNewRepositories(value *bool)() { + m.advanced_security_enabled_for_new_repositories = value +} +// SetAdvancedSecurityEnabledForNewUserNamespaceRepositories sets the advanced_security_enabled_for_new_user_namespace_repositories property value. Whether GitHub Advanced Security is automatically enabled for new user namespace repositories. +func (m *EnterpriseSecurityAnalysisSettings) SetAdvancedSecurityEnabledForNewUserNamespaceRepositories(value *bool)() { + m.advanced_security_enabled_for_new_user_namespace_repositories = value +} +// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to thisenterprise. +func (m *EnterpriseSecurityAnalysisSettings) SetDependabotAlertsEnabledForNewRepositories(value *bool)() { + m.dependabot_alerts_enabled_for_new_repositories = value +} +// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisenterprise. +func (m *EnterpriseSecurityAnalysisSettings) SetSecretScanningEnabledForNewRepositories(value *bool)() { + m.secret_scanning_enabled_for_new_repositories = value +} +// SetSecretScanningPushProtectionCustomLink sets the secret_scanning_push_protection_custom_link property value. An optional URL string to display to contributors who are blocked from pushing a secret. +func (m *EnterpriseSecurityAnalysisSettings) SetSecretScanningPushProtectionCustomLink(value *string)() { + m.secret_scanning_push_protection_custom_link = value +} +// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this enterprise. +func (m *EnterpriseSecurityAnalysisSettings) SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() { + m.secret_scanning_push_protection_enabled_for_new_repositories = value +} +// SetSecretScanningValidityChecksEnabled sets the secret_scanning_validity_checks_enabled property value. Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this enterprise. +func (m *EnterpriseSecurityAnalysisSettings) SetSecretScanningValidityChecksEnabled(value *bool)() { + m.secret_scanning_validity_checks_enabled = value +} +type EnterpriseSecurityAnalysisSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurityEnabledForNewRepositories()(*bool) + GetAdvancedSecurityEnabledForNewUserNamespaceRepositories()(*bool) + GetDependabotAlertsEnabledForNewRepositories()(*bool) + GetSecretScanningEnabledForNewRepositories()(*bool) + GetSecretScanningPushProtectionCustomLink()(*string) + GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) + GetSecretScanningValidityChecksEnabled()(*bool) + SetAdvancedSecurityEnabledForNewRepositories(value *bool)() + SetAdvancedSecurityEnabledForNewUserNamespaceRepositories(value *bool)() + SetDependabotAlertsEnabledForNewRepositories(value *bool)() + SetSecretScanningEnabledForNewRepositories(value *bool)() + SetSecretScanningPushProtectionCustomLink(value *string)() + SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() + SetSecretScanningValidityChecksEnabled(value *bool)() +} diff --git a/pkg/github/models/enterprise_team.go b/pkg/github/models/enterprise_team.go new file mode 100644 index 0000000..18aa97b --- /dev/null +++ b/pkg/github/models/enterprise_team.go @@ -0,0 +1,343 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnterpriseTeam group of enterprise owners and/or members +type EnterpriseTeam struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The group_id property + group_id *int32 + // The html_url property + html_url *string + // The id property + id *int64 + // The members_url property + members_url *string + // The name property + name *string + // The slug property + slug *string + // The sync_to_organizations property + sync_to_organizations *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewEnterpriseTeam instantiates a new EnterpriseTeam and sets the default values. +func NewEnterpriseTeam()(*EnterpriseTeam) { + m := &EnterpriseTeam{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnterpriseTeamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnterpriseTeamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnterpriseTeam(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EnterpriseTeam) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *EnterpriseTeam) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EnterpriseTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["sync_to_organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncToOrganizations(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGroupId gets the group_id property value. The group_id property +// returns a *int32 when successful +func (m *EnterpriseTeam) GetGroupId()(*int32) { + return m.group_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *EnterpriseTeam) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *EnterpriseTeam) GetId()(*int64) { + return m.id +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *EnterpriseTeam) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *EnterpriseTeam) GetName()(*string) { + return m.name +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *EnterpriseTeam) GetSlug()(*string) { + return m.slug +} +// GetSyncToOrganizations gets the sync_to_organizations property value. The sync_to_organizations property +// returns a *string when successful +func (m *EnterpriseTeam) GetSyncToOrganizations()(*string) { + return m.sync_to_organizations +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *EnterpriseTeam) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *EnterpriseTeam) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *EnterpriseTeam) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sync_to_organizations", m.GetSyncToOrganizations()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *EnterpriseTeam) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *EnterpriseTeam) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetGroupId sets the group_id property value. The group_id property +func (m *EnterpriseTeam) SetGroupId(value *int32)() { + m.group_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *EnterpriseTeam) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *EnterpriseTeam) SetId(value *int64)() { + m.id = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *EnterpriseTeam) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *EnterpriseTeam) SetName(value *string)() { + m.name = value +} +// SetSlug sets the slug property value. The slug property +func (m *EnterpriseTeam) SetSlug(value *string)() { + m.slug = value +} +// SetSyncToOrganizations sets the sync_to_organizations property value. The sync_to_organizations property +func (m *EnterpriseTeam) SetSyncToOrganizations(value *string)() { + m.sync_to_organizations = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *EnterpriseTeam) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *EnterpriseTeam) SetUrl(value *string)() { + m.url = value +} +type EnterpriseTeamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupId()(*int32) + GetHtmlUrl()(*string) + GetId()(*int64) + GetMembersUrl()(*string) + GetName()(*string) + GetSlug()(*string) + GetSyncToOrganizations()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupId(value *int32)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetSlug(value *string)() + SetSyncToOrganizations(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/environment.go b/pkg/github/models/environment.go new file mode 100644 index 0000000..4731bc5 --- /dev/null +++ b/pkg/github/models/environment.go @@ -0,0 +1,437 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Environment details of a deployment environment +type Environment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the environment was created, in ISO 8601 format. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. + deployment_branch_policy DeploymentBranchPolicySettingsable + // The html_url property + html_url *string + // The id of the environment. + id *int32 + // The name of the environment. + name *string + // The node_id property + node_id *string + // Built-in deployment protection rules for the environment. + protection_rules []Environment_Environment_protection_rulesable + // The time that the environment was last updated, in ISO 8601 format. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// Environment_Environment_protection_rules composed type wrapper for classes Environment_protection_rulesMember1able, Environment_protection_rulesMember2able, Environment_protection_rulesMember3able +type Environment_Environment_protection_rules struct { + // Composed type representation for type Environment_protection_rulesMember1able + environment_protection_rulesMember1 Environment_protection_rulesMember1able + // Composed type representation for type Environment_protection_rulesMember2able + environment_protection_rulesMember2 Environment_protection_rulesMember2able + // Composed type representation for type Environment_protection_rulesMember3able + environment_protection_rulesMember3 Environment_protection_rulesMember3able +} +// NewEnvironment_Environment_protection_rules instantiates a new Environment_Environment_protection_rules and sets the default values. +func NewEnvironment_Environment_protection_rules()(*Environment_Environment_protection_rules) { + m := &Environment_Environment_protection_rules{ + } + return m +} +// CreateEnvironment_Environment_protection_rulesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironment_Environment_protection_rulesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewEnvironment_Environment_protection_rules() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateEnvironment_protection_rulesMember1FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Environment_protection_rulesMember1able); ok { + result.SetEnvironmentProtectionRulesMember1(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateEnvironment_protection_rulesMember2FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Environment_protection_rulesMember2able); ok { + result.SetEnvironmentProtectionRulesMember2(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateEnvironment_protection_rulesMember3FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Environment_protection_rulesMember3able); ok { + result.SetEnvironmentProtectionRulesMember3(cast) + } + } + } + return result, nil +} +// GetEnvironmentProtectionRulesMember1 gets the environment_protection_rulesMember1 property value. Composed type representation for type Environment_protection_rulesMember1able +// returns a Environment_protection_rulesMember1able when successful +func (m *Environment_Environment_protection_rules) GetEnvironmentProtectionRulesMember1()(Environment_protection_rulesMember1able) { + return m.environment_protection_rulesMember1 +} +// GetEnvironmentProtectionRulesMember2 gets the environment_protection_rulesMember2 property value. Composed type representation for type Environment_protection_rulesMember2able +// returns a Environment_protection_rulesMember2able when successful +func (m *Environment_Environment_protection_rules) GetEnvironmentProtectionRulesMember2()(Environment_protection_rulesMember2able) { + return m.environment_protection_rulesMember2 +} +// GetEnvironmentProtectionRulesMember3 gets the environment_protection_rulesMember3 property value. Composed type representation for type Environment_protection_rulesMember3able +// returns a Environment_protection_rulesMember3able when successful +func (m *Environment_Environment_protection_rules) GetEnvironmentProtectionRulesMember3()(Environment_protection_rulesMember3able) { + return m.environment_protection_rulesMember3 +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment_Environment_protection_rules) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Environment_Environment_protection_rules) GetIsComposedType()(bool) { + return true +} +// Serialize serializes information the current object +func (m *Environment_Environment_protection_rules) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnvironmentProtectionRulesMember1() != nil { + err := writer.WriteObjectValue("", m.GetEnvironmentProtectionRulesMember1()) + if err != nil { + return err + } + } else if m.GetEnvironmentProtectionRulesMember2() != nil { + err := writer.WriteObjectValue("", m.GetEnvironmentProtectionRulesMember2()) + if err != nil { + return err + } + } else if m.GetEnvironmentProtectionRulesMember3() != nil { + err := writer.WriteObjectValue("", m.GetEnvironmentProtectionRulesMember3()) + if err != nil { + return err + } + } + return nil +} +// SetEnvironmentProtectionRulesMember1 sets the environment_protection_rulesMember1 property value. Composed type representation for type Environment_protection_rulesMember1able +func (m *Environment_Environment_protection_rules) SetEnvironmentProtectionRulesMember1(value Environment_protection_rulesMember1able)() { + m.environment_protection_rulesMember1 = value +} +// SetEnvironmentProtectionRulesMember2 sets the environment_protection_rulesMember2 property value. Composed type representation for type Environment_protection_rulesMember2able +func (m *Environment_Environment_protection_rules) SetEnvironmentProtectionRulesMember2(value Environment_protection_rulesMember2able)() { + m.environment_protection_rulesMember2 = value +} +// SetEnvironmentProtectionRulesMember3 sets the environment_protection_rulesMember3 property value. Composed type representation for type Environment_protection_rulesMember3able +func (m *Environment_Environment_protection_rules) SetEnvironmentProtectionRulesMember3(value Environment_protection_rulesMember3able)() { + m.environment_protection_rulesMember3 = value +} +type Environment_Environment_protection_rulesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnvironmentProtectionRulesMember1()(Environment_protection_rulesMember1able) + GetEnvironmentProtectionRulesMember2()(Environment_protection_rulesMember2able) + GetEnvironmentProtectionRulesMember3()(Environment_protection_rulesMember3able) + SetEnvironmentProtectionRulesMember1(value Environment_protection_rulesMember1able)() + SetEnvironmentProtectionRulesMember2(value Environment_protection_rulesMember2able)() + SetEnvironmentProtectionRulesMember3(value Environment_protection_rulesMember3able)() +} +// NewEnvironment instantiates a new Environment and sets the default values. +func NewEnvironment()(*Environment) { + m := &Environment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Environment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the environment was created, in ISO 8601 format. +// returns a *Time when successful +func (m *Environment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeploymentBranchPolicy gets the deployment_branch_policy property value. The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +// returns a DeploymentBranchPolicySettingsable when successful +func (m *Environment) GetDeploymentBranchPolicy()(DeploymentBranchPolicySettingsable) { + return m.deployment_branch_policy +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deployment_branch_policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeploymentBranchPolicySettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentBranchPolicy(val.(DeploymentBranchPolicySettingsable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["protection_rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnvironment_Environment_protection_rulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Environment_Environment_protection_rulesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Environment_Environment_protection_rulesable) + } + } + m.SetProtectionRules(res) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Environment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id of the environment. +// returns a *int32 when successful +func (m *Environment) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the environment. +// returns a *string when successful +func (m *Environment) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Environment) GetNodeId()(*string) { + return m.node_id +} +// GetProtectionRules gets the protection_rules property value. Built-in deployment protection rules for the environment. +// returns a []Environment_Environment_protection_rulesable when successful +func (m *Environment) GetProtectionRules()([]Environment_Environment_protection_rulesable) { + return m.protection_rules +} +// GetUpdatedAt gets the updated_at property value. The time that the environment was last updated, in ISO 8601 format. +// returns a *Time when successful +func (m *Environment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Environment) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Environment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("deployment_branch_policy", m.GetDeploymentBranchPolicy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetProtectionRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProtectionRules())) + for i, v := range m.GetProtectionRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("protection_rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Environment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the environment was created, in ISO 8601 format. +func (m *Environment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeploymentBranchPolicy sets the deployment_branch_policy property value. The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +func (m *Environment) SetDeploymentBranchPolicy(value DeploymentBranchPolicySettingsable)() { + m.deployment_branch_policy = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Environment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id of the environment. +func (m *Environment) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the environment. +func (m *Environment) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Environment) SetNodeId(value *string)() { + m.node_id = value +} +// SetProtectionRules sets the protection_rules property value. Built-in deployment protection rules for the environment. +func (m *Environment) SetProtectionRules(value []Environment_Environment_protection_rulesable)() { + m.protection_rules = value +} +// SetUpdatedAt sets the updated_at property value. The time that the environment was last updated, in ISO 8601 format. +func (m *Environment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Environment) SetUrl(value *string)() { + m.url = value +} +type Environmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeploymentBranchPolicy()(DeploymentBranchPolicySettingsable) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetProtectionRules()([]Environment_Environment_protection_rulesable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeploymentBranchPolicy(value DeploymentBranchPolicySettingsable)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetProtectionRules(value []Environment_Environment_protection_rulesable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/environment_approvals.go b/pkg/github/models/environment_approvals.go new file mode 100644 index 0000000..eb5bcce --- /dev/null +++ b/pkg/github/models/environment_approvals.go @@ -0,0 +1,181 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnvironmentApprovals an entry in the reviews log for environment deployments +type EnvironmentApprovals struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comment submitted with the deployment review + comment *string + // The list of environments that were approved or rejected + environments []EnvironmentApprovals_environmentsable + // Whether deployment to the environment(s) was approved or rejected or pending (with comments) + state *EnvironmentApprovals_state + // A GitHub user. + user SimpleUserable +} +// NewEnvironmentApprovals instantiates a new EnvironmentApprovals and sets the default values. +func NewEnvironmentApprovals()(*EnvironmentApprovals) { + m := &EnvironmentApprovals{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironmentApprovalsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironmentApprovalsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironmentApprovals(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EnvironmentApprovals) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComment gets the comment property value. The comment submitted with the deployment review +// returns a *string when successful +func (m *EnvironmentApprovals) GetComment()(*string) { + return m.comment +} +// GetEnvironments gets the environments property value. The list of environments that were approved or rejected +// returns a []EnvironmentApprovals_environmentsable when successful +func (m *EnvironmentApprovals) GetEnvironments()([]EnvironmentApprovals_environmentsable) { + return m.environments +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EnvironmentApprovals) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["environments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnvironmentApprovals_environmentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnvironmentApprovals_environmentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(EnvironmentApprovals_environmentsable) + } + } + m.SetEnvironments(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnvironmentApprovals_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*EnvironmentApprovals_state)) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetState gets the state property value. Whether deployment to the environment(s) was approved or rejected or pending (with comments) +// returns a *EnvironmentApprovals_state when successful +func (m *EnvironmentApprovals) GetState()(*EnvironmentApprovals_state) { + return m.state +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *EnvironmentApprovals) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *EnvironmentApprovals) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + if m.GetEnvironments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEnvironments())) + for i, v := range m.GetEnvironments() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("environments", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *EnvironmentApprovals) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComment sets the comment property value. The comment submitted with the deployment review +func (m *EnvironmentApprovals) SetComment(value *string)() { + m.comment = value +} +// SetEnvironments sets the environments property value. The list of environments that were approved or rejected +func (m *EnvironmentApprovals) SetEnvironments(value []EnvironmentApprovals_environmentsable)() { + m.environments = value +} +// SetState sets the state property value. Whether deployment to the environment(s) was approved or rejected or pending (with comments) +func (m *EnvironmentApprovals) SetState(value *EnvironmentApprovals_state)() { + m.state = value +} +// SetUser sets the user property value. A GitHub user. +func (m *EnvironmentApprovals) SetUser(value SimpleUserable)() { + m.user = value +} +type EnvironmentApprovalsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetEnvironments()([]EnvironmentApprovals_environmentsable) + GetState()(*EnvironmentApprovals_state) + GetUser()(SimpleUserable) + SetComment(value *string)() + SetEnvironments(value []EnvironmentApprovals_environmentsable)() + SetState(value *EnvironmentApprovals_state)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/environment_approvals_environments.go b/pkg/github/models/environment_approvals_environments.go new file mode 100644 index 0000000..13efdbf --- /dev/null +++ b/pkg/github/models/environment_approvals_environments.go @@ -0,0 +1,255 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type EnvironmentApprovals_environments struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the environment was created, in ISO 8601 format. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // The id of the environment. + id *int32 + // The name of the environment. + name *string + // The node_id property + node_id *string + // The time that the environment was last updated, in ISO 8601 format. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewEnvironmentApprovals_environments instantiates a new EnvironmentApprovals_environments and sets the default values. +func NewEnvironmentApprovals_environments()(*EnvironmentApprovals_environments) { + m := &EnvironmentApprovals_environments{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironmentApprovals_environmentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironmentApprovals_environmentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironmentApprovals_environments(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EnvironmentApprovals_environments) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the environment was created, in ISO 8601 format. +// returns a *Time when successful +func (m *EnvironmentApprovals_environments) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EnvironmentApprovals_environments) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *EnvironmentApprovals_environments) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id of the environment. +// returns a *int32 when successful +func (m *EnvironmentApprovals_environments) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the environment. +// returns a *string when successful +func (m *EnvironmentApprovals_environments) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *EnvironmentApprovals_environments) GetNodeId()(*string) { + return m.node_id +} +// GetUpdatedAt gets the updated_at property value. The time that the environment was last updated, in ISO 8601 format. +// returns a *Time when successful +func (m *EnvironmentApprovals_environments) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *EnvironmentApprovals_environments) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *EnvironmentApprovals_environments) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *EnvironmentApprovals_environments) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the environment was created, in ISO 8601 format. +func (m *EnvironmentApprovals_environments) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *EnvironmentApprovals_environments) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id of the environment. +func (m *EnvironmentApprovals_environments) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the environment. +func (m *EnvironmentApprovals_environments) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *EnvironmentApprovals_environments) SetNodeId(value *string)() { + m.node_id = value +} +// SetUpdatedAt sets the updated_at property value. The time that the environment was last updated, in ISO 8601 format. +func (m *EnvironmentApprovals_environments) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *EnvironmentApprovals_environments) SetUrl(value *string)() { + m.url = value +} +type EnvironmentApprovals_environmentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/environment_approvals_state.go b/pkg/github/models/environment_approvals_state.go new file mode 100644 index 0000000..f3bacf7 --- /dev/null +++ b/pkg/github/models/environment_approvals_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Whether deployment to the environment(s) was approved or rejected or pending (with comments) +type EnvironmentApprovals_state int + +const ( + APPROVED_ENVIRONMENTAPPROVALS_STATE EnvironmentApprovals_state = iota + REJECTED_ENVIRONMENTAPPROVALS_STATE + PENDING_ENVIRONMENTAPPROVALS_STATE +) + +func (i EnvironmentApprovals_state) String() string { + return []string{"approved", "rejected", "pending"}[i] +} +func ParseEnvironmentApprovals_state(v string) (any, error) { + result := APPROVED_ENVIRONMENTAPPROVALS_STATE + switch v { + case "approved": + result = APPROVED_ENVIRONMENTAPPROVALS_STATE + case "rejected": + result = REJECTED_ENVIRONMENTAPPROVALS_STATE + case "pending": + result = PENDING_ENVIRONMENTAPPROVALS_STATE + default: + return 0, errors.New("Unknown EnvironmentApprovals_state value: " + v) + } + return &result, nil +} +func SerializeEnvironmentApprovals_state(values []EnvironmentApprovals_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i EnvironmentApprovals_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/environment_protection_rules_member1.go b/pkg/github/models/environment_protection_rules_member1.go new file mode 100644 index 0000000..b0c47b6 --- /dev/null +++ b/pkg/github/models/environment_protection_rules_member1.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Environment_protection_rulesMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The node_id property + node_id *string + // The type property + typeEscaped *string + // The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + wait_timer *int32 +} +// NewEnvironment_protection_rulesMember1 instantiates a new Environment_protection_rulesMember1 and sets the default values. +func NewEnvironment_protection_rulesMember1()(*Environment_protection_rulesMember1) { + m := &Environment_protection_rulesMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironment_protection_rulesMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironment_protection_rulesMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironment_protection_rulesMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Environment_protection_rulesMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment_protection_rulesMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["wait_timer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWaitTimer(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Environment_protection_rulesMember1) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Environment_protection_rulesMember1) GetNodeId()(*string) { + return m.node_id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Environment_protection_rulesMember1) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetWaitTimer gets the wait_timer property value. The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). +// returns a *int32 when successful +func (m *Environment_protection_rulesMember1) GetWaitTimer()(*int32) { + return m.wait_timer +} +// Serialize serializes information the current object +func (m *Environment_protection_rulesMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("wait_timer", m.GetWaitTimer()) + 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 *Environment_protection_rulesMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *Environment_protection_rulesMember1) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Environment_protection_rulesMember1) SetNodeId(value *string)() { + m.node_id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Environment_protection_rulesMember1) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetWaitTimer sets the wait_timer property value. The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). +func (m *Environment_protection_rulesMember1) SetWaitTimer(value *int32)() { + m.wait_timer = value +} +type Environment_protection_rulesMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetNodeId()(*string) + GetTypeEscaped()(*string) + GetWaitTimer()(*int32) + SetId(value *int32)() + SetNodeId(value *string)() + SetTypeEscaped(value *string)() + SetWaitTimer(value *int32)() +} diff --git a/pkg/github/models/environment_protection_rules_member2.go b/pkg/github/models/environment_protection_rules_member2.go new file mode 100644 index 0000000..def382f --- /dev/null +++ b/pkg/github/models/environment_protection_rules_member2.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Environment_protection_rulesMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The node_id property + node_id *string + // Whether deployments to this environment can be approved by the user who created the deployment. + prevent_self_review *bool + // The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + reviewers []Environment_protection_rulesMember2_reviewersable + // The type property + typeEscaped *string +} +// NewEnvironment_protection_rulesMember2 instantiates a new Environment_protection_rulesMember2 and sets the default values. +func NewEnvironment_protection_rulesMember2()(*Environment_protection_rulesMember2) { + m := &Environment_protection_rulesMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironment_protection_rulesMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironment_protection_rulesMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironment_protection_rulesMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Environment_protection_rulesMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment_protection_rulesMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["prevent_self_review"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPreventSelfReview(val) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnvironment_protection_rulesMember2_reviewersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Environment_protection_rulesMember2_reviewersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Environment_protection_rulesMember2_reviewersable) + } + } + m.SetReviewers(res) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Environment_protection_rulesMember2) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Environment_protection_rulesMember2) GetNodeId()(*string) { + return m.node_id +} +// GetPreventSelfReview gets the prevent_self_review property value. Whether deployments to this environment can be approved by the user who created the deployment. +// returns a *bool when successful +func (m *Environment_protection_rulesMember2) GetPreventSelfReview()(*bool) { + return m.prevent_self_review +} +// GetReviewers gets the reviewers property value. The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +// returns a []Environment_protection_rulesMember2_reviewersable when successful +func (m *Environment_protection_rulesMember2) GetReviewers()([]Environment_protection_rulesMember2_reviewersable) { + return m.reviewers +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Environment_protection_rulesMember2) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Environment_protection_rulesMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prevent_self_review", m.GetPreventSelfReview()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *Environment_protection_rulesMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *Environment_protection_rulesMember2) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Environment_protection_rulesMember2) SetNodeId(value *string)() { + m.node_id = value +} +// SetPreventSelfReview sets the prevent_self_review property value. Whether deployments to this environment can be approved by the user who created the deployment. +func (m *Environment_protection_rulesMember2) SetPreventSelfReview(value *bool)() { + m.prevent_self_review = value +} +// SetReviewers sets the reviewers property value. The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +func (m *Environment_protection_rulesMember2) SetReviewers(value []Environment_protection_rulesMember2_reviewersable)() { + m.reviewers = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Environment_protection_rulesMember2) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type Environment_protection_rulesMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetNodeId()(*string) + GetPreventSelfReview()(*bool) + GetReviewers()([]Environment_protection_rulesMember2_reviewersable) + GetTypeEscaped()(*string) + SetId(value *int32)() + SetNodeId(value *string)() + SetPreventSelfReview(value *bool)() + SetReviewers(value []Environment_protection_rulesMember2_reviewersable)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/environment_protection_rules_member2_reviewers.go b/pkg/github/models/environment_protection_rules_member2_reviewers.go new file mode 100644 index 0000000..f537c30 --- /dev/null +++ b/pkg/github/models/environment_protection_rules_member2_reviewers.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Environment_protection_rulesMember2_reviewers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The reviewer property + reviewer Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable + // The type of reviewer. + typeEscaped *DeploymentReviewerType +} +// Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer composed type wrapper for classes SimpleUserable, Teamable +type Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer struct { + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable + // Composed type representation for type Teamable + team Teamable +} +// NewEnvironment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer instantiates a new Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer and sets the default values. +func NewEnvironment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer()(*Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) { + m := &Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer{ + } + return m +} +// CreateEnvironment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewEnvironment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateSimpleUserFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(SimpleUserable); ok { + result.SetSimpleUser(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTeamFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Teamable); ok { + result.SetTeam(cast) + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// GetTeam gets the team property value. Composed type representation for type Teamable +// returns a Teamable when successful +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) GetTeam()(Teamable) { + return m.team +} +// Serialize serializes information the current object +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } else if m.GetTeam() != nil { + err := writer.WriteObjectValue("", m.GetTeam()) + if err != nil { + return err + } + } + return nil +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +// SetTeam sets the team property value. Composed type representation for type Teamable +func (m *Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewer) SetTeam(value Teamable)() { + m.team = value +} +type Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSimpleUser()(SimpleUserable) + GetTeam()(Teamable) + SetSimpleUser(value SimpleUserable)() + SetTeam(value Teamable)() +} +// NewEnvironment_protection_rulesMember2_reviewers instantiates a new Environment_protection_rulesMember2_reviewers and sets the default values. +func NewEnvironment_protection_rulesMember2_reviewers()(*Environment_protection_rulesMember2_reviewers) { + m := &Environment_protection_rulesMember2_reviewers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironment_protection_rulesMember2_reviewersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironment_protection_rulesMember2_reviewersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironment_protection_rulesMember2_reviewers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Environment_protection_rulesMember2_reviewers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment_protection_rulesMember2_reviewers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEnvironment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewer(val.(Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentReviewerType) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*DeploymentReviewerType)) + } + return nil + } + return res +} +// GetReviewer gets the reviewer property value. The reviewer property +// returns a Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable when successful +func (m *Environment_protection_rulesMember2_reviewers) GetReviewer()(Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable) { + return m.reviewer +} +// GetTypeEscaped gets the type property value. The type of reviewer. +// returns a *DeploymentReviewerType when successful +func (m *Environment_protection_rulesMember2_reviewers) GetTypeEscaped()(*DeploymentReviewerType) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Environment_protection_rulesMember2_reviewers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("reviewer", m.GetReviewer()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Environment_protection_rulesMember2_reviewers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReviewer sets the reviewer property value. The reviewer property +func (m *Environment_protection_rulesMember2_reviewers) SetReviewer(value Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable)() { + m.reviewer = value +} +// SetTypeEscaped sets the type property value. The type of reviewer. +func (m *Environment_protection_rulesMember2_reviewers) SetTypeEscaped(value *DeploymentReviewerType)() { + m.typeEscaped = value +} +type Environment_protection_rulesMember2_reviewersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReviewer()(Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable) + GetTypeEscaped()(*DeploymentReviewerType) + SetReviewer(value Environment_protection_rulesMember2_reviewers_Environment_protection_rulesMember2_reviewers_reviewerable)() + SetTypeEscaped(value *DeploymentReviewerType)() +} diff --git a/pkg/github/models/environment_protection_rules_member3.go b/pkg/github/models/environment_protection_rules_member3.go new file mode 100644 index 0000000..fdcb073 --- /dev/null +++ b/pkg/github/models/environment_protection_rules_member3.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Environment_protection_rulesMember3 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The node_id property + node_id *string + // The type property + typeEscaped *string +} +// NewEnvironment_protection_rulesMember3 instantiates a new Environment_protection_rulesMember3 and sets the default values. +func NewEnvironment_protection_rulesMember3()(*Environment_protection_rulesMember3) { + m := &Environment_protection_rulesMember3{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnvironment_protection_rulesMember3FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnvironment_protection_rulesMember3FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnvironment_protection_rulesMember3(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Environment_protection_rulesMember3) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Environment_protection_rulesMember3) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Environment_protection_rulesMember3) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Environment_protection_rulesMember3) GetNodeId()(*string) { + return m.node_id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Environment_protection_rulesMember3) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Environment_protection_rulesMember3) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *Environment_protection_rulesMember3) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *Environment_protection_rulesMember3) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Environment_protection_rulesMember3) SetNodeId(value *string)() { + m.node_id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Environment_protection_rulesMember3) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type Environment_protection_rulesMember3able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetNodeId()(*string) + GetTypeEscaped()(*string) + SetId(value *int32)() + SetNodeId(value *string)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/event.go b/pkg/github/models/event.go new file mode 100644 index 0000000..8b48f64 --- /dev/null +++ b/pkg/github/models/event.go @@ -0,0 +1,285 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Event event +type Event struct { + // Actor + actor Actorable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *string + // Actor + org Actorable + // The payload property + payload Event_payloadable + // The public property + public *bool + // The repo property + repo Event_repoable + // The type property + typeEscaped *string +} +// NewEvent instantiates a new Event and sets the default values. +func NewEvent()(*Event) { + m := &Event{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvent(), nil +} +// GetActor gets the actor property value. Actor +// returns a Actorable when successful +func (m *Event) GetActor()(Actorable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Event) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Event) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Event) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(Actorable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["org"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrg(val.(Actorable)) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEvent_payloadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPayload(val.(Event_payloadable)) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublic(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEvent_repoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(Event_repoable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *Event) GetId()(*string) { + return m.id +} +// GetOrg gets the org property value. Actor +// returns a Actorable when successful +func (m *Event) GetOrg()(Actorable) { + return m.org +} +// GetPayload gets the payload property value. The payload property +// returns a Event_payloadable when successful +func (m *Event) GetPayload()(Event_payloadable) { + return m.payload +} +// GetPublic gets the public property value. The public property +// returns a *bool when successful +func (m *Event) GetPublic()(*bool) { + return m.public +} +// GetRepo gets the repo property value. The repo property +// returns a Event_repoable when successful +func (m *Event) GetRepo()(Event_repoable) { + return m.repo +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Event) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Event) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("org", m.GetOrg()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public", m.GetPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. Actor +func (m *Event) SetActor(value Actorable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Event) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Event) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *Event) SetId(value *string)() { + m.id = value +} +// SetOrg sets the org property value. Actor +func (m *Event) SetOrg(value Actorable)() { + m.org = value +} +// SetPayload sets the payload property value. The payload property +func (m *Event) SetPayload(value Event_payloadable)() { + m.payload = value +} +// SetPublic sets the public property value. The public property +func (m *Event) SetPublic(value *bool)() { + m.public = value +} +// SetRepo sets the repo property value. The repo property +func (m *Event) SetRepo(value Event_repoable)() { + m.repo = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Event) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type Eventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(Actorable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*string) + GetOrg()(Actorable) + GetPayload()(Event_payloadable) + GetPublic()(*bool) + GetRepo()(Event_repoable) + GetTypeEscaped()(*string) + SetActor(value Actorable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *string)() + SetOrg(value Actorable)() + SetPayload(value Event_payloadable)() + SetPublic(value *bool)() + SetRepo(value Event_repoable)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/event_payload.go b/pkg/github/models/event_payload.go new file mode 100644 index 0000000..f3528f1 --- /dev/null +++ b/pkg/github/models/event_payload.go @@ -0,0 +1,179 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Event_payload struct { + // The action property + action *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Comments provide a way for people to collaborate on an issue. + comment IssueCommentable + // Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + issue Issueable + // The pages property + pages []Event_payload_pagesable +} +// NewEvent_payload instantiates a new Event_payload and sets the default values. +func NewEvent_payload()(*Event_payload) { + m := &Event_payload{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEvent_payloadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEvent_payloadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvent_payload(), nil +} +// GetAction gets the action property value. The action property +// returns a *string when successful +func (m *Event_payload) GetAction()(*string) { + return m.action +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Event_payload) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComment gets the comment property value. Comments provide a way for people to collaborate on an issue. +// returns a IssueCommentable when successful +func (m *Event_payload) GetComment()(IssueCommentable) { + return m.comment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Event_payload) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAction(val) + } + return nil + } + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetComment(val.(IssueCommentable)) + } + return nil + } + res["issue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssue(val.(Issueable)) + } + return nil + } + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEvent_payload_pagesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Event_payload_pagesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Event_payload_pagesable) + } + } + m.SetPages(res) + } + return nil + } + return res +} +// GetIssue gets the issue property value. Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +// returns a Issueable when successful +func (m *Event_payload) GetIssue()(Issueable) { + return m.issue +} +// GetPages gets the pages property value. The pages property +// returns a []Event_payload_pagesable when successful +func (m *Event_payload) GetPages()([]Event_payload_pagesable) { + return m.pages +} +// Serialize serializes information the current object +func (m *Event_payload) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("issue", m.GetIssue()) + if err != nil { + return err + } + } + if m.GetPages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPages())) + for i, v := range m.GetPages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("pages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *Event_payload) SetAction(value *string)() { + m.action = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Event_payload) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComment sets the comment property value. Comments provide a way for people to collaborate on an issue. +func (m *Event_payload) SetComment(value IssueCommentable)() { + m.comment = value +} +// SetIssue sets the issue property value. Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +func (m *Event_payload) SetIssue(value Issueable)() { + m.issue = value +} +// SetPages sets the pages property value. The pages property +func (m *Event_payload) SetPages(value []Event_payload_pagesable)() { + m.pages = value +} +type Event_payloadable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*string) + GetComment()(IssueCommentable) + GetIssue()(Issueable) + GetPages()([]Event_payload_pagesable) + SetAction(value *string)() + SetComment(value IssueCommentable)() + SetIssue(value Issueable)() + SetPages(value []Event_payload_pagesable)() +} diff --git a/pkg/github/models/event_payload_pages.go b/pkg/github/models/event_payload_pages.go new file mode 100644 index 0000000..73a9780 --- /dev/null +++ b/pkg/github/models/event_payload_pages.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Event_payload_pages struct { + // The action property + action *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The page_name property + page_name *string + // The sha property + sha *string + // The summary property + summary *string + // The title property + title *string +} +// NewEvent_payload_pages instantiates a new Event_payload_pages and sets the default values. +func NewEvent_payload_pages()(*Event_payload_pages) { + m := &Event_payload_pages{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEvent_payload_pagesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEvent_payload_pagesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvent_payload_pages(), nil +} +// GetAction gets the action property value. The action property +// returns a *string when successful +func (m *Event_payload_pages) GetAction()(*string) { + return m.action +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Event_payload_pages) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Event_payload_pages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAction(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["page_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPageName(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Event_payload_pages) GetHtmlUrl()(*string) { + return m.html_url +} +// GetPageName gets the page_name property value. The page_name property +// returns a *string when successful +func (m *Event_payload_pages) GetPageName()(*string) { + return m.page_name +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Event_payload_pages) GetSha()(*string) { + return m.sha +} +// GetSummary gets the summary property value. The summary property +// returns a *string when successful +func (m *Event_payload_pages) GetSummary()(*string) { + return m.summary +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *Event_payload_pages) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *Event_payload_pages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("page_name", m.GetPageName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *Event_payload_pages) SetAction(value *string)() { + m.action = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Event_payload_pages) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Event_payload_pages) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetPageName sets the page_name property value. The page_name property +func (m *Event_payload_pages) SetPageName(value *string)() { + m.page_name = value +} +// SetSha sets the sha property value. The sha property +func (m *Event_payload_pages) SetSha(value *string)() { + m.sha = value +} +// SetSummary sets the summary property value. The summary property +func (m *Event_payload_pages) SetSummary(value *string)() { + m.summary = value +} +// SetTitle sets the title property value. The title property +func (m *Event_payload_pages) SetTitle(value *string)() { + m.title = value +} +type Event_payload_pagesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*string) + GetHtmlUrl()(*string) + GetPageName()(*string) + GetSha()(*string) + GetSummary()(*string) + GetTitle()(*string) + SetAction(value *string)() + SetHtmlUrl(value *string)() + SetPageName(value *string)() + SetSha(value *string)() + SetSummary(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/models/event_repo.go b/pkg/github/models/event_repo.go new file mode 100644 index 0000000..cfc4bf9 --- /dev/null +++ b/pkg/github/models/event_repo.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Event_repo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The name property + name *string + // The url property + url *string +} +// NewEvent_repo instantiates a new Event_repo and sets the default values. +func NewEvent_repo()(*Event_repo) { + m := &Event_repo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEvent_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEvent_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvent_repo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Event_repo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Event_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Event_repo) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Event_repo) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Event_repo) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Event_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Event_repo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *Event_repo) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *Event_repo) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *Event_repo) SetUrl(value *string)() { + m.url = value +} +type Event_repoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetName()(*string) + GetUrl()(*string) + SetId(value *int32)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/events503_error.go b/pkg/github/models/events503_error.go new file mode 100644 index 0000000..31ef3b7 --- /dev/null +++ b/pkg/github/models/events503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Events503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewEvents503Error instantiates a new Events503Error and sets the default values. +func NewEvents503Error()(*Events503Error) { + m := &Events503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEvents503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEvents503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvents503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Events503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Events503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Events503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Events503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Events503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Events503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Events503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Events503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Events503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Events503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Events503Error) SetMessage(value *string)() { + m.message = value +} +type Events503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/external_group.go b/pkg/github/models/external_group.go new file mode 100644 index 0000000..41d4c3c --- /dev/null +++ b/pkg/github/models/external_group.go @@ -0,0 +1,221 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalGroup information about an external group's usage and its members +type ExternalGroup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The internal ID of the group + group_id *int32 + // The display name for the group + group_name *string + // An array of external members linked to this group + members []ExternalGroup_membersable + // An array of teams linked to this group + teams []ExternalGroup_teamsable + // The date when the group was last updated_at + updated_at *string +} +// NewExternalGroup instantiates a new ExternalGroup and sets the default values. +func NewExternalGroup()(*ExternalGroup) { + m := &ExternalGroup{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExternalGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExternalGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroup(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ExternalGroup) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExternalGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroup_membersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroup_membersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ExternalGroup_membersable) + } + } + m.SetMembers(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroup_teamsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroup_teamsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ExternalGroup_teamsable) + } + } + m.SetTeams(res) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetGroupId gets the group_id property value. The internal ID of the group +// returns a *int32 when successful +func (m *ExternalGroup) GetGroupId()(*int32) { + return m.group_id +} +// GetGroupName gets the group_name property value. The display name for the group +// returns a *string when successful +func (m *ExternalGroup) GetGroupName()(*string) { + return m.group_name +} +// GetMembers gets the members property value. An array of external members linked to this group +// returns a []ExternalGroup_membersable when successful +func (m *ExternalGroup) GetMembers()([]ExternalGroup_membersable) { + return m.members +} +// GetTeams gets the teams property value. An array of teams linked to this group +// returns a []ExternalGroup_teamsable when successful +func (m *ExternalGroup) GetTeams()([]ExternalGroup_teamsable) { + return m.teams +} +// GetUpdatedAt gets the updated_at property value. The date when the group was last updated_at +// returns a *string when successful +func (m *ExternalGroup) GetUpdatedAt()(*string) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *ExternalGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ExternalGroup) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroupId sets the group_id property value. The internal ID of the group +func (m *ExternalGroup) SetGroupId(value *int32)() { + m.group_id = value +} +// SetGroupName sets the group_name property value. The display name for the group +func (m *ExternalGroup) SetGroupName(value *string)() { + m.group_name = value +} +// SetMembers sets the members property value. An array of external members linked to this group +func (m *ExternalGroup) SetMembers(value []ExternalGroup_membersable)() { + m.members = value +} +// SetTeams sets the teams property value. An array of teams linked to this group +func (m *ExternalGroup) SetTeams(value []ExternalGroup_teamsable)() { + m.teams = value +} +// SetUpdatedAt sets the updated_at property value. The date when the group was last updated_at +func (m *ExternalGroup) SetUpdatedAt(value *string)() { + m.updated_at = value +} +type ExternalGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*int32) + GetGroupName()(*string) + GetMembers()([]ExternalGroup_membersable) + GetTeams()([]ExternalGroup_teamsable) + GetUpdatedAt()(*string) + SetGroupId(value *int32)() + SetGroupName(value *string)() + SetMembers(value []ExternalGroup_membersable)() + SetTeams(value []ExternalGroup_teamsable)() + SetUpdatedAt(value *string)() +} diff --git a/pkg/github/models/external_group_members.go b/pkg/github/models/external_group_members.go new file mode 100644 index 0000000..78d17d5 --- /dev/null +++ b/pkg/github/models/external_group_members.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ExternalGroup_members struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An email attached to a user + member_email *string + // The internal user ID of the identity + member_id *int32 + // The handle/login for the user + member_login *string + // The user display name/profile name + member_name *string +} +// NewExternalGroup_members instantiates a new ExternalGroup_members and sets the default values. +func NewExternalGroup_members()(*ExternalGroup_members) { + m := &ExternalGroup_members{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExternalGroup_membersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExternalGroup_membersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroup_members(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ExternalGroup_members) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExternalGroup_members) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["member_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMemberEmail(val) + } + return nil + } + res["member_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMemberId(val) + } + return nil + } + res["member_login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMemberLogin(val) + } + return nil + } + res["member_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMemberName(val) + } + return nil + } + return res +} +// GetMemberEmail gets the member_email property value. An email attached to a user +// returns a *string when successful +func (m *ExternalGroup_members) GetMemberEmail()(*string) { + return m.member_email +} +// GetMemberId gets the member_id property value. The internal user ID of the identity +// returns a *int32 when successful +func (m *ExternalGroup_members) GetMemberId()(*int32) { + return m.member_id +} +// GetMemberLogin gets the member_login property value. The handle/login for the user +// returns a *string when successful +func (m *ExternalGroup_members) GetMemberLogin()(*string) { + return m.member_login +} +// GetMemberName gets the member_name property value. The user display name/profile name +// returns a *string when successful +func (m *ExternalGroup_members) GetMemberName()(*string) { + return m.member_name +} +// Serialize serializes information the current object +func (m *ExternalGroup_members) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("member_email", m.GetMemberEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("member_id", m.GetMemberId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("member_login", m.GetMemberLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("member_name", m.GetMemberName()) + 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 *ExternalGroup_members) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMemberEmail sets the member_email property value. An email attached to a user +func (m *ExternalGroup_members) SetMemberEmail(value *string)() { + m.member_email = value +} +// SetMemberId sets the member_id property value. The internal user ID of the identity +func (m *ExternalGroup_members) SetMemberId(value *int32)() { + m.member_id = value +} +// SetMemberLogin sets the member_login property value. The handle/login for the user +func (m *ExternalGroup_members) SetMemberLogin(value *string)() { + m.member_login = value +} +// SetMemberName sets the member_name property value. The user display name/profile name +func (m *ExternalGroup_members) SetMemberName(value *string)() { + m.member_name = value +} +type ExternalGroup_membersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMemberEmail()(*string) + GetMemberId()(*int32) + GetMemberLogin()(*string) + GetMemberName()(*string) + SetMemberEmail(value *string)() + SetMemberId(value *int32)() + SetMemberLogin(value *string)() + SetMemberName(value *string)() +} diff --git a/pkg/github/models/external_group_teams.go b/pkg/github/models/external_group_teams.go new file mode 100644 index 0000000..601fc1b --- /dev/null +++ b/pkg/github/models/external_group_teams.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ExternalGroup_teams struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id for a team + team_id *int32 + // The name of the team + team_name *string +} +// NewExternalGroup_teams instantiates a new ExternalGroup_teams and sets the default values. +func NewExternalGroup_teams()(*ExternalGroup_teams) { + m := &ExternalGroup_teams{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExternalGroup_teamsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExternalGroup_teamsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroup_teams(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ExternalGroup_teams) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExternalGroup_teams) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["team_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamId(val) + } + return nil + } + res["team_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamName(val) + } + return nil + } + return res +} +// GetTeamId gets the team_id property value. The id for a team +// returns a *int32 when successful +func (m *ExternalGroup_teams) GetTeamId()(*int32) { + return m.team_id +} +// GetTeamName gets the team_name property value. The name of the team +// returns a *string when successful +func (m *ExternalGroup_teams) GetTeamName()(*string) { + return m.team_name +} +// Serialize serializes information the current object +func (m *ExternalGroup_teams) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("team_id", m.GetTeamId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("team_name", m.GetTeamName()) + 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 *ExternalGroup_teams) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTeamId sets the team_id property value. The id for a team +func (m *ExternalGroup_teams) SetTeamId(value *int32)() { + m.team_id = value +} +// SetTeamName sets the team_name property value. The name of the team +func (m *ExternalGroup_teams) SetTeamName(value *string)() { + m.team_name = value +} +type ExternalGroup_teamsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTeamId()(*int32) + GetTeamName()(*string) + SetTeamId(value *int32)() + SetTeamName(value *string)() +} diff --git a/pkg/github/models/external_groups.go b/pkg/github/models/external_groups.go new file mode 100644 index 0000000..15a6d2b --- /dev/null +++ b/pkg/github/models/external_groups.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalGroups a list of external groups available to be connected to a team +type ExternalGroups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of external groups available to be mapped to a team + groups []ExternalGroups_groupsable +} +// NewExternalGroups instantiates a new ExternalGroups and sets the default values. +func NewExternalGroups()(*ExternalGroups) { + m := &ExternalGroups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExternalGroupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExternalGroupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ExternalGroups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExternalGroups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroups_groupsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroups_groupsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ExternalGroups_groupsable) + } + } + m.SetGroups(res) + } + return nil + } + return res +} +// GetGroups gets the groups property value. An array of external groups available to be mapped to a team +// returns a []ExternalGroups_groupsable when successful +func (m *ExternalGroups) GetGroups()([]ExternalGroups_groupsable) { + return m.groups +} +// Serialize serializes information the current object +func (m *ExternalGroups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ExternalGroups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroups sets the groups property value. An array of external groups available to be mapped to a team +func (m *ExternalGroups) SetGroups(value []ExternalGroups_groupsable)() { + m.groups = value +} +type ExternalGroupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroups()([]ExternalGroups_groupsable) + SetGroups(value []ExternalGroups_groupsable)() +} diff --git a/pkg/github/models/external_groups_groups.go b/pkg/github/models/external_groups_groups.go new file mode 100644 index 0000000..0ae7e97 --- /dev/null +++ b/pkg/github/models/external_groups_groups.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ExternalGroups_groups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The internal ID of the group + group_id *int32 + // The display name of the group + group_name *string + // The time of the last update for this group + updated_at *string +} +// NewExternalGroups_groups instantiates a new ExternalGroups_groups and sets the default values. +func NewExternalGroups_groups()(*ExternalGroups_groups) { + m := &ExternalGroups_groups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExternalGroups_groupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExternalGroups_groupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroups_groups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ExternalGroups_groups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExternalGroups_groups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetGroupId gets the group_id property value. The internal ID of the group +// returns a *int32 when successful +func (m *ExternalGroups_groups) GetGroupId()(*int32) { + return m.group_id +} +// GetGroupName gets the group_name property value. The display name of the group +// returns a *string when successful +func (m *ExternalGroups_groups) GetGroupName()(*string) { + return m.group_name +} +// GetUpdatedAt gets the updated_at property value. The time of the last update for this group +// returns a *string when successful +func (m *ExternalGroups_groups) GetUpdatedAt()(*string) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *ExternalGroups_groups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ExternalGroups_groups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroupId sets the group_id property value. The internal ID of the group +func (m *ExternalGroups_groups) SetGroupId(value *int32)() { + m.group_id = value +} +// SetGroupName sets the group_name property value. The display name of the group +func (m *ExternalGroups_groups) SetGroupName(value *string)() { + m.group_name = value +} +// SetUpdatedAt sets the updated_at property value. The time of the last update for this group +func (m *ExternalGroups_groups) SetUpdatedAt(value *string)() { + m.updated_at = value +} +type ExternalGroups_groupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*int32) + GetGroupName()(*string) + GetUpdatedAt()(*string) + SetGroupId(value *int32)() + SetGroupName(value *string)() + SetUpdatedAt(value *string)() +} diff --git a/pkg/github/models/feed.go b/pkg/github/models/feed.go new file mode 100644 index 0000000..83ce8ad --- /dev/null +++ b/pkg/github/models/feed.go @@ -0,0 +1,377 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Feed feed +type Feed struct { + // The _links property + _links Feed__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The current_user_actor_url property + current_user_actor_url *string + // The current_user_organization_url property + current_user_organization_url *string + // The current_user_organization_urls property + current_user_organization_urls []string + // The current_user_public_url property + current_user_public_url *string + // The current_user_url property + current_user_url *string + // A feed of discussions for a given repository and category. + repository_discussions_category_url *string + // A feed of discussions for a given repository. + repository_discussions_url *string + // The security_advisories_url property + security_advisories_url *string + // The timeline_url property + timeline_url *string + // The user_url property + user_url *string +} +// NewFeed instantiates a new Feed and sets the default values. +func NewFeed()(*Feed) { + m := &Feed{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFeedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFeedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeed(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Feed) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCurrentUserActorUrl gets the current_user_actor_url property value. The current_user_actor_url property +// returns a *string when successful +func (m *Feed) GetCurrentUserActorUrl()(*string) { + return m.current_user_actor_url +} +// GetCurrentUserOrganizationUrl gets the current_user_organization_url property value. The current_user_organization_url property +// returns a *string when successful +func (m *Feed) GetCurrentUserOrganizationUrl()(*string) { + return m.current_user_organization_url +} +// GetCurrentUserOrganizationUrls gets the current_user_organization_urls property value. The current_user_organization_urls property +// returns a []string when successful +func (m *Feed) GetCurrentUserOrganizationUrls()([]string) { + return m.current_user_organization_urls +} +// GetCurrentUserPublicUrl gets the current_user_public_url property value. The current_user_public_url property +// returns a *string when successful +func (m *Feed) GetCurrentUserPublicUrl()(*string) { + return m.current_user_public_url +} +// GetCurrentUserUrl gets the current_user_url property value. The current_user_url property +// returns a *string when successful +func (m *Feed) GetCurrentUserUrl()(*string) { + return m.current_user_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Feed) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFeed__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(Feed__linksable)) + } + return nil + } + res["current_user_actor_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserActorUrl(val) + } + return nil + } + res["current_user_organization_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserOrganizationUrl(val) + } + return nil + } + res["current_user_organization_urls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCurrentUserOrganizationUrls(res) + } + return nil + } + res["current_user_public_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserPublicUrl(val) + } + return nil + } + res["current_user_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserUrl(val) + } + return nil + } + res["repository_discussions_category_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryDiscussionsCategoryUrl(val) + } + return nil + } + res["repository_discussions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryDiscussionsUrl(val) + } + return nil + } + res["security_advisories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityAdvisoriesUrl(val) + } + return nil + } + res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimelineUrl(val) + } + return nil + } + res["user_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserUrl(val) + } + return nil + } + return res +} +// GetLinks gets the _links property value. The _links property +// returns a Feed__linksable when successful +func (m *Feed) GetLinks()(Feed__linksable) { + return m._links +} +// GetRepositoryDiscussionsCategoryUrl gets the repository_discussions_category_url property value. A feed of discussions for a given repository and category. +// returns a *string when successful +func (m *Feed) GetRepositoryDiscussionsCategoryUrl()(*string) { + return m.repository_discussions_category_url +} +// GetRepositoryDiscussionsUrl gets the repository_discussions_url property value. A feed of discussions for a given repository. +// returns a *string when successful +func (m *Feed) GetRepositoryDiscussionsUrl()(*string) { + return m.repository_discussions_url +} +// GetSecurityAdvisoriesUrl gets the security_advisories_url property value. The security_advisories_url property +// returns a *string when successful +func (m *Feed) GetSecurityAdvisoriesUrl()(*string) { + return m.security_advisories_url +} +// GetTimelineUrl gets the timeline_url property value. The timeline_url property +// returns a *string when successful +func (m *Feed) GetTimelineUrl()(*string) { + return m.timeline_url +} +// GetUserUrl gets the user_url property value. The user_url property +// returns a *string when successful +func (m *Feed) GetUserUrl()(*string) { + return m.user_url +} +// Serialize serializes information the current object +func (m *Feed) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("current_user_actor_url", m.GetCurrentUserActorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("current_user_organization_url", m.GetCurrentUserOrganizationUrl()) + if err != nil { + return err + } + } + if m.GetCurrentUserOrganizationUrls() != nil { + err := writer.WriteCollectionOfStringValues("current_user_organization_urls", m.GetCurrentUserOrganizationUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("current_user_public_url", m.GetCurrentUserPublicUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("current_user_url", m.GetCurrentUserUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_discussions_category_url", m.GetRepositoryDiscussionsCategoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_discussions_url", m.GetRepositoryDiscussionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("security_advisories_url", m.GetSecurityAdvisoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user_url", m.GetUserUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *Feed) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCurrentUserActorUrl sets the current_user_actor_url property value. The current_user_actor_url property +func (m *Feed) SetCurrentUserActorUrl(value *string)() { + m.current_user_actor_url = value +} +// SetCurrentUserOrganizationUrl sets the current_user_organization_url property value. The current_user_organization_url property +func (m *Feed) SetCurrentUserOrganizationUrl(value *string)() { + m.current_user_organization_url = value +} +// SetCurrentUserOrganizationUrls sets the current_user_organization_urls property value. The current_user_organization_urls property +func (m *Feed) SetCurrentUserOrganizationUrls(value []string)() { + m.current_user_organization_urls = value +} +// SetCurrentUserPublicUrl sets the current_user_public_url property value. The current_user_public_url property +func (m *Feed) SetCurrentUserPublicUrl(value *string)() { + m.current_user_public_url = value +} +// SetCurrentUserUrl sets the current_user_url property value. The current_user_url property +func (m *Feed) SetCurrentUserUrl(value *string)() { + m.current_user_url = value +} +// SetLinks sets the _links property value. The _links property +func (m *Feed) SetLinks(value Feed__linksable)() { + m._links = value +} +// SetRepositoryDiscussionsCategoryUrl sets the repository_discussions_category_url property value. A feed of discussions for a given repository and category. +func (m *Feed) SetRepositoryDiscussionsCategoryUrl(value *string)() { + m.repository_discussions_category_url = value +} +// SetRepositoryDiscussionsUrl sets the repository_discussions_url property value. A feed of discussions for a given repository. +func (m *Feed) SetRepositoryDiscussionsUrl(value *string)() { + m.repository_discussions_url = value +} +// SetSecurityAdvisoriesUrl sets the security_advisories_url property value. The security_advisories_url property +func (m *Feed) SetSecurityAdvisoriesUrl(value *string)() { + m.security_advisories_url = value +} +// SetTimelineUrl sets the timeline_url property value. The timeline_url property +func (m *Feed) SetTimelineUrl(value *string)() { + m.timeline_url = value +} +// SetUserUrl sets the user_url property value. The user_url property +func (m *Feed) SetUserUrl(value *string)() { + m.user_url = value +} +type Feedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentUserActorUrl()(*string) + GetCurrentUserOrganizationUrl()(*string) + GetCurrentUserOrganizationUrls()([]string) + GetCurrentUserPublicUrl()(*string) + GetCurrentUserUrl()(*string) + GetLinks()(Feed__linksable) + GetRepositoryDiscussionsCategoryUrl()(*string) + GetRepositoryDiscussionsUrl()(*string) + GetSecurityAdvisoriesUrl()(*string) + GetTimelineUrl()(*string) + GetUserUrl()(*string) + SetCurrentUserActorUrl(value *string)() + SetCurrentUserOrganizationUrl(value *string)() + SetCurrentUserOrganizationUrls(value []string)() + SetCurrentUserPublicUrl(value *string)() + SetCurrentUserUrl(value *string)() + SetLinks(value Feed__linksable)() + SetRepositoryDiscussionsCategoryUrl(value *string)() + SetRepositoryDiscussionsUrl(value *string)() + SetSecurityAdvisoriesUrl(value *string)() + SetTimelineUrl(value *string)() + SetUserUrl(value *string)() +} diff --git a/pkg/github/models/feed__links.go b/pkg/github/models/feed__links.go new file mode 100644 index 0000000..c6a335b --- /dev/null +++ b/pkg/github/models/feed__links.go @@ -0,0 +1,353 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Feed__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Hypermedia Link with Type + current_user LinkWithTypeable + // Hypermedia Link with Type + current_user_actor LinkWithTypeable + // Hypermedia Link with Type + current_user_organization LinkWithTypeable + // The current_user_organizations property + current_user_organizations []LinkWithTypeable + // Hypermedia Link with Type + current_user_public LinkWithTypeable + // Hypermedia Link with Type + repository_discussions LinkWithTypeable + // Hypermedia Link with Type + repository_discussions_category LinkWithTypeable + // Hypermedia Link with Type + security_advisories LinkWithTypeable + // Hypermedia Link with Type + timeline LinkWithTypeable + // Hypermedia Link with Type + user LinkWithTypeable +} +// NewFeed__links instantiates a new Feed__links and sets the default values. +func NewFeed__links()(*Feed__links) { + m := &Feed__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFeed__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFeed__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeed__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Feed__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCurrentUser gets the current_user property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetCurrentUser()(LinkWithTypeable) { + return m.current_user +} +// GetCurrentUserActor gets the current_user_actor property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetCurrentUserActor()(LinkWithTypeable) { + return m.current_user_actor +} +// GetCurrentUserOrganization gets the current_user_organization property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetCurrentUserOrganization()(LinkWithTypeable) { + return m.current_user_organization +} +// GetCurrentUserOrganizations gets the current_user_organizations property value. The current_user_organizations property +// returns a []LinkWithTypeable when successful +func (m *Feed__links) GetCurrentUserOrganizations()([]LinkWithTypeable) { + return m.current_user_organizations +} +// GetCurrentUserPublic gets the current_user_public property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetCurrentUserPublic()(LinkWithTypeable) { + return m.current_user_public +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Feed__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["current_user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrentUser(val.(LinkWithTypeable)) + } + return nil + } + res["current_user_actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserActor(val.(LinkWithTypeable)) + } + return nil + } + res["current_user_organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserOrganization(val.(LinkWithTypeable)) + } + return nil + } + res["current_user_organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LinkWithTypeable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(LinkWithTypeable) + } + } + m.SetCurrentUserOrganizations(res) + } + return nil + } + res["current_user_public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserPublic(val.(LinkWithTypeable)) + } + return nil + } + res["repository_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepositoryDiscussions(val.(LinkWithTypeable)) + } + return nil + } + res["repository_discussions_category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepositoryDiscussionsCategory(val.(LinkWithTypeable)) + } + return nil + } + res["security_advisories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAdvisories(val.(LinkWithTypeable)) + } + return nil + } + res["timeline"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTimeline(val.(LinkWithTypeable)) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkWithTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(LinkWithTypeable)) + } + return nil + } + return res +} +// GetRepositoryDiscussions gets the repository_discussions property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetRepositoryDiscussions()(LinkWithTypeable) { + return m.repository_discussions +} +// GetRepositoryDiscussionsCategory gets the repository_discussions_category property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetRepositoryDiscussionsCategory()(LinkWithTypeable) { + return m.repository_discussions_category +} +// GetSecurityAdvisories gets the security_advisories property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetSecurityAdvisories()(LinkWithTypeable) { + return m.security_advisories +} +// GetTimeline gets the timeline property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetTimeline()(LinkWithTypeable) { + return m.timeline +} +// GetUser gets the user property value. Hypermedia Link with Type +// returns a LinkWithTypeable when successful +func (m *Feed__links) GetUser()(LinkWithTypeable) { + return m.user +} +// Serialize serializes information the current object +func (m *Feed__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("current_user", m.GetCurrentUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("current_user_actor", m.GetCurrentUserActor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("current_user_organization", m.GetCurrentUserOrganization()) + if err != nil { + return err + } + } + if m.GetCurrentUserOrganizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCurrentUserOrganizations())) + for i, v := range m.GetCurrentUserOrganizations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("current_user_organizations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("current_user_public", m.GetCurrentUserPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository_discussions", m.GetRepositoryDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository_discussions_category", m.GetRepositoryDiscussionsCategory()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("security_advisories", m.GetSecurityAdvisories()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("timeline", m.GetTimeline()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *Feed__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCurrentUser sets the current_user property value. Hypermedia Link with Type +func (m *Feed__links) SetCurrentUser(value LinkWithTypeable)() { + m.current_user = value +} +// SetCurrentUserActor sets the current_user_actor property value. Hypermedia Link with Type +func (m *Feed__links) SetCurrentUserActor(value LinkWithTypeable)() { + m.current_user_actor = value +} +// SetCurrentUserOrganization sets the current_user_organization property value. Hypermedia Link with Type +func (m *Feed__links) SetCurrentUserOrganization(value LinkWithTypeable)() { + m.current_user_organization = value +} +// SetCurrentUserOrganizations sets the current_user_organizations property value. The current_user_organizations property +func (m *Feed__links) SetCurrentUserOrganizations(value []LinkWithTypeable)() { + m.current_user_organizations = value +} +// SetCurrentUserPublic sets the current_user_public property value. Hypermedia Link with Type +func (m *Feed__links) SetCurrentUserPublic(value LinkWithTypeable)() { + m.current_user_public = value +} +// SetRepositoryDiscussions sets the repository_discussions property value. Hypermedia Link with Type +func (m *Feed__links) SetRepositoryDiscussions(value LinkWithTypeable)() { + m.repository_discussions = value +} +// SetRepositoryDiscussionsCategory sets the repository_discussions_category property value. Hypermedia Link with Type +func (m *Feed__links) SetRepositoryDiscussionsCategory(value LinkWithTypeable)() { + m.repository_discussions_category = value +} +// SetSecurityAdvisories sets the security_advisories property value. Hypermedia Link with Type +func (m *Feed__links) SetSecurityAdvisories(value LinkWithTypeable)() { + m.security_advisories = value +} +// SetTimeline sets the timeline property value. Hypermedia Link with Type +func (m *Feed__links) SetTimeline(value LinkWithTypeable)() { + m.timeline = value +} +// SetUser sets the user property value. Hypermedia Link with Type +func (m *Feed__links) SetUser(value LinkWithTypeable)() { + m.user = value +} +type Feed__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentUser()(LinkWithTypeable) + GetCurrentUserActor()(LinkWithTypeable) + GetCurrentUserOrganization()(LinkWithTypeable) + GetCurrentUserOrganizations()([]LinkWithTypeable) + GetCurrentUserPublic()(LinkWithTypeable) + GetRepositoryDiscussions()(LinkWithTypeable) + GetRepositoryDiscussionsCategory()(LinkWithTypeable) + GetSecurityAdvisories()(LinkWithTypeable) + GetTimeline()(LinkWithTypeable) + GetUser()(LinkWithTypeable) + SetCurrentUser(value LinkWithTypeable)() + SetCurrentUserActor(value LinkWithTypeable)() + SetCurrentUserOrganization(value LinkWithTypeable)() + SetCurrentUserOrganizations(value []LinkWithTypeable)() + SetCurrentUserPublic(value LinkWithTypeable)() + SetRepositoryDiscussions(value LinkWithTypeable)() + SetRepositoryDiscussionsCategory(value LinkWithTypeable)() + SetSecurityAdvisories(value LinkWithTypeable)() + SetTimeline(value LinkWithTypeable)() + SetUser(value LinkWithTypeable)() +} diff --git a/pkg/github/models/file_commit.go b/pkg/github/models/file_commit.go new file mode 100644 index 0000000..6183a9e --- /dev/null +++ b/pkg/github/models/file_commit.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileCommit file Commit +type FileCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit property + commit FileCommit_commitable + // The content property + content FileCommit_contentable +} +// NewFileCommit instantiates a new FileCommit and sets the default values. +func NewFileCommit()(*FileCommit) { + m := &FileCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommit gets the commit property value. The commit property +// returns a FileCommit_commitable when successful +func (m *FileCommit) GetCommit()(FileCommit_commitable) { + return m.commit +} +// GetContent gets the content property value. The content property +// returns a FileCommit_contentable when successful +func (m *FileCommit) GetContent()(FileCommit_contentable) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_commitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(FileCommit_commitable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_contentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(FileCommit_contentable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *FileCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("content", m.GetContent()) + 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 *FileCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommit sets the commit property value. The commit property +func (m *FileCommit) SetCommit(value FileCommit_commitable)() { + m.commit = value +} +// SetContent sets the content property value. The content property +func (m *FileCommit) SetContent(value FileCommit_contentable)() { + m.content = value +} +type FileCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommit()(FileCommit_commitable) + GetContent()(FileCommit_contentable) + SetCommit(value FileCommit_commitable)() + SetContent(value FileCommit_contentable)() +} diff --git a/pkg/github/models/file_commit503_error.go b/pkg/github/models/file_commit503_error.go new file mode 100644 index 0000000..3b309fd --- /dev/null +++ b/pkg/github/models/file_commit503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewFileCommit503Error instantiates a new FileCommit503Error and sets the default values. +func NewFileCommit503Error()(*FileCommit503Error) { + m := &FileCommit503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *FileCommit503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *FileCommit503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *FileCommit503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *FileCommit503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *FileCommit503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FileCommit503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *FileCommit503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *FileCommit503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *FileCommit503Error) SetMessage(value *string)() { + m.message = value +} +type FileCommit503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/file_commit_commit.go b/pkg/github/models/file_commit_commit.go new file mode 100644 index 0000000..b087f15 --- /dev/null +++ b/pkg/github/models/file_commit_commit.go @@ -0,0 +1,353 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The author property + author FileCommit_commit_authorable + // The committer property + committer FileCommit_commit_committerable + // The html_url property + html_url *string + // The message property + message *string + // The node_id property + node_id *string + // The parents property + parents []FileCommit_commit_parentsable + // The sha property + sha *string + // The tree property + tree FileCommit_commit_treeable + // The url property + url *string + // The verification property + verification FileCommit_commit_verificationable +} +// NewFileCommit_commit instantiates a new FileCommit_commit and sets the default values. +func NewFileCommit_commit()(*FileCommit_commit) { + m := &FileCommit_commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_commitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_commitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_commit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. The author property +// returns a FileCommit_commit_authorable when successful +func (m *FileCommit_commit) GetAuthor()(FileCommit_commit_authorable) { + return m.author +} +// GetCommitter gets the committer property value. The committer property +// returns a FileCommit_commit_committerable when successful +func (m *FileCommit_commit) GetCommitter()(FileCommit_commit_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_commit_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(FileCommit_commit_authorable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_commit_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(FileCommit_commit_committerable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["parents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileCommit_commit_parentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileCommit_commit_parentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(FileCommit_commit_parentsable) + } + } + m.SetParents(res) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_commit_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTree(val.(FileCommit_commit_treeable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_commit_verificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerification(val.(FileCommit_commit_verificationable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *FileCommit_commit) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *FileCommit_commit) GetMessage()(*string) { + return m.message +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *FileCommit_commit) GetNodeId()(*string) { + return m.node_id +} +// GetParents gets the parents property value. The parents property +// returns a []FileCommit_commit_parentsable when successful +func (m *FileCommit_commit) GetParents()([]FileCommit_commit_parentsable) { + return m.parents +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *FileCommit_commit) GetSha()(*string) { + return m.sha +} +// GetTree gets the tree property value. The tree property +// returns a FileCommit_commit_treeable when successful +func (m *FileCommit_commit) GetTree()(FileCommit_commit_treeable) { + return m.tree +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *FileCommit_commit) GetUrl()(*string) { + return m.url +} +// GetVerification gets the verification property value. The verification property +// returns a FileCommit_commit_verificationable when successful +func (m *FileCommit_commit) GetVerification()(FileCommit_commit_verificationable) { + return m.verification +} +// Serialize serializes information the current object +func (m *FileCommit_commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetParents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParents())) + for i, v := range m.GetParents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("parents", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tree", m.GetTree()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verification", m.GetVerification()) + 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 *FileCommit_commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. The author property +func (m *FileCommit_commit) SetAuthor(value FileCommit_commit_authorable)() { + m.author = value +} +// SetCommitter sets the committer property value. The committer property +func (m *FileCommit_commit) SetCommitter(value FileCommit_commit_committerable)() { + m.committer = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *FileCommit_commit) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMessage sets the message property value. The message property +func (m *FileCommit_commit) SetMessage(value *string)() { + m.message = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *FileCommit_commit) SetNodeId(value *string)() { + m.node_id = value +} +// SetParents sets the parents property value. The parents property +func (m *FileCommit_commit) SetParents(value []FileCommit_commit_parentsable)() { + m.parents = value +} +// SetSha sets the sha property value. The sha property +func (m *FileCommit_commit) SetSha(value *string)() { + m.sha = value +} +// SetTree sets the tree property value. The tree property +func (m *FileCommit_commit) SetTree(value FileCommit_commit_treeable)() { + m.tree = value +} +// SetUrl sets the url property value. The url property +func (m *FileCommit_commit) SetUrl(value *string)() { + m.url = value +} +// SetVerification sets the verification property value. The verification property +func (m *FileCommit_commit) SetVerification(value FileCommit_commit_verificationable)() { + m.verification = value +} +type FileCommit_commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(FileCommit_commit_authorable) + GetCommitter()(FileCommit_commit_committerable) + GetHtmlUrl()(*string) + GetMessage()(*string) + GetNodeId()(*string) + GetParents()([]FileCommit_commit_parentsable) + GetSha()(*string) + GetTree()(FileCommit_commit_treeable) + GetUrl()(*string) + GetVerification()(FileCommit_commit_verificationable) + SetAuthor(value FileCommit_commit_authorable)() + SetCommitter(value FileCommit_commit_committerable)() + SetHtmlUrl(value *string)() + SetMessage(value *string)() + SetNodeId(value *string)() + SetParents(value []FileCommit_commit_parentsable)() + SetSha(value *string)() + SetTree(value FileCommit_commit_treeable)() + SetUrl(value *string)() + SetVerification(value FileCommit_commit_verificationable)() +} diff --git a/pkg/github/models/file_commit_commit_author.go b/pkg/github/models/file_commit_commit_author.go new file mode 100644 index 0000000..0deddb0 --- /dev/null +++ b/pkg/github/models/file_commit_commit_author.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_commit_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The email property + email *string + // The name property + name *string +} +// NewFileCommit_commit_author instantiates a new FileCommit_commit_author and sets the default values. +func NewFileCommit_commit_author()(*FileCommit_commit_author) { + m := &FileCommit_commit_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_commit_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_commit_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_commit_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_commit_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *FileCommit_commit_author) GetDate()(*string) { + return m.date +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *FileCommit_commit_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_commit_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *FileCommit_commit_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *FileCommit_commit_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *FileCommit_commit_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *FileCommit_commit_author) SetDate(value *string)() { + m.date = value +} +// SetEmail sets the email property value. The email property +func (m *FileCommit_commit_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name property +func (m *FileCommit_commit_author) SetName(value *string)() { + m.name = value +} +type FileCommit_commit_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetEmail()(*string) + GetName()(*string) + SetDate(value *string)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/file_commit_commit_committer.go b/pkg/github/models/file_commit_commit_committer.go new file mode 100644 index 0000000..f472c4d --- /dev/null +++ b/pkg/github/models/file_commit_commit_committer.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_commit_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The email property + email *string + // The name property + name *string +} +// NewFileCommit_commit_committer instantiates a new FileCommit_commit_committer and sets the default values. +func NewFileCommit_commit_committer()(*FileCommit_commit_committer) { + m := &FileCommit_commit_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_commit_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_commit_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_commit_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_commit_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *FileCommit_commit_committer) GetDate()(*string) { + return m.date +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *FileCommit_commit_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_commit_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *FileCommit_commit_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *FileCommit_commit_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *FileCommit_commit_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *FileCommit_commit_committer) SetDate(value *string)() { + m.date = value +} +// SetEmail sets the email property value. The email property +func (m *FileCommit_commit_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name property +func (m *FileCommit_commit_committer) SetName(value *string)() { + m.name = value +} +type FileCommit_commit_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetEmail()(*string) + GetName()(*string) + SetDate(value *string)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/file_commit_commit_parents.go b/pkg/github/models/file_commit_commit_parents.go new file mode 100644 index 0000000..27e5991 --- /dev/null +++ b/pkg/github/models/file_commit_commit_parents.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_commit_parents struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The sha property + sha *string + // The url property + url *string +} +// NewFileCommit_commit_parents instantiates a new FileCommit_commit_parents and sets the default values. +func NewFileCommit_commit_parents()(*FileCommit_commit_parents) { + m := &FileCommit_commit_parents{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_commit_parentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_commit_parentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_commit_parents(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_commit_parents) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_commit_parents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *FileCommit_commit_parents) GetHtmlUrl()(*string) { + return m.html_url +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *FileCommit_commit_parents) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *FileCommit_commit_parents) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *FileCommit_commit_parents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FileCommit_commit_parents) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *FileCommit_commit_parents) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetSha sets the sha property value. The sha property +func (m *FileCommit_commit_parents) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *FileCommit_commit_parents) SetUrl(value *string)() { + m.url = value +} +type FileCommit_commit_parentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetSha()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/file_commit_commit_tree.go b/pkg/github/models/file_commit_commit_tree.go new file mode 100644 index 0000000..64583be --- /dev/null +++ b/pkg/github/models/file_commit_commit_tree.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_commit_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewFileCommit_commit_tree instantiates a new FileCommit_commit_tree and sets the default values. +func NewFileCommit_commit_tree()(*FileCommit_commit_tree) { + m := &FileCommit_commit_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_commit_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_commit_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_commit_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_commit_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_commit_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *FileCommit_commit_tree) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *FileCommit_commit_tree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *FileCommit_commit_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FileCommit_commit_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *FileCommit_commit_tree) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *FileCommit_commit_tree) SetUrl(value *string)() { + m.url = value +} +type FileCommit_commit_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/file_commit_commit_verification.go b/pkg/github/models/file_commit_commit_verification.go new file mode 100644 index 0000000..255b309 --- /dev/null +++ b/pkg/github/models/file_commit_commit_verification.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_commit_verification struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The payload property + payload *string + // The reason property + reason *string + // The signature property + signature *string + // The verified property + verified *bool +} +// NewFileCommit_commit_verification instantiates a new FileCommit_commit_verification and sets the default values. +func NewFileCommit_commit_verification()(*FileCommit_commit_verification) { + m := &FileCommit_commit_verification{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_commit_verificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_commit_verificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_commit_verification(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_commit_verification) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_commit_verification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["signature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignature(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *FileCommit_commit_verification) GetPayload()(*string) { + return m.payload +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *FileCommit_commit_verification) GetReason()(*string) { + return m.reason +} +// GetSignature gets the signature property value. The signature property +// returns a *string when successful +func (m *FileCommit_commit_verification) GetSignature()(*string) { + return m.signature +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *FileCommit_commit_verification) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *FileCommit_commit_verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signature", m.GetSignature()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *FileCommit_commit_verification) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPayload sets the payload property value. The payload property +func (m *FileCommit_commit_verification) SetPayload(value *string)() { + m.payload = value +} +// SetReason sets the reason property value. The reason property +func (m *FileCommit_commit_verification) SetReason(value *string)() { + m.reason = value +} +// SetSignature sets the signature property value. The signature property +func (m *FileCommit_commit_verification) SetSignature(value *string)() { + m.signature = value +} +// SetVerified sets the verified property value. The verified property +func (m *FileCommit_commit_verification) SetVerified(value *bool)() { + m.verified = value +} +type FileCommit_commit_verificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()(*string) + GetReason()(*string) + GetSignature()(*string) + GetVerified()(*bool) + SetPayload(value *string)() + SetReason(value *string)() + SetSignature(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/file_commit_content.go b/pkg/github/models/file_commit_content.go new file mode 100644 index 0000000..1e16357 --- /dev/null +++ b/pkg/github/models/file_commit_content.go @@ -0,0 +1,341 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_content struct { + // The _links property + _links FileCommit_content__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The download_url property + download_url *string + // The git_url property + git_url *string + // The html_url property + html_url *string + // The name property + name *string + // The path property + path *string + // The sha property + sha *string + // The size property + size *int32 + // The type property + typeEscaped *string + // The url property + url *string +} +// NewFileCommit_content instantiates a new FileCommit_content and sets the default values. +func NewFileCommit_content()(*FileCommit_content) { + m := &FileCommit_content{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_contentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_contentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_content(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_content) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDownloadUrl gets the download_url property value. The download_url property +// returns a *string when successful +func (m *FileCommit_content) GetDownloadUrl()(*string) { + return m.download_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_content) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileCommit_content__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(FileCommit_content__linksable)) + } + return nil + } + res["download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *FileCommit_content) GetGitUrl()(*string) { + return m.git_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *FileCommit_content) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLinks gets the _links property value. The _links property +// returns a FileCommit_content__linksable when successful +func (m *FileCommit_content) GetLinks()(FileCommit_content__linksable) { + return m._links +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *FileCommit_content) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *FileCommit_content) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *FileCommit_content) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *FileCommit_content) GetSize()(*int32) { + return m.size +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *FileCommit_content) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *FileCommit_content) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *FileCommit_content) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("download_url", m.GetDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *FileCommit_content) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDownloadUrl sets the download_url property value. The download_url property +func (m *FileCommit_content) SetDownloadUrl(value *string)() { + m.download_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *FileCommit_content) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *FileCommit_content) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLinks sets the _links property value. The _links property +func (m *FileCommit_content) SetLinks(value FileCommit_content__linksable)() { + m._links = value +} +// SetName sets the name property value. The name property +func (m *FileCommit_content) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *FileCommit_content) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The sha property +func (m *FileCommit_content) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *FileCommit_content) SetSize(value *int32)() { + m.size = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *FileCommit_content) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *FileCommit_content) SetUrl(value *string)() { + m.url = value +} +type FileCommit_contentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDownloadUrl()(*string) + GetGitUrl()(*string) + GetHtmlUrl()(*string) + GetLinks()(FileCommit_content__linksable) + GetName()(*string) + GetPath()(*string) + GetSha()(*string) + GetSize()(*int32) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetDownloadUrl(value *string)() + SetGitUrl(value *string)() + SetHtmlUrl(value *string)() + SetLinks(value FileCommit_content__linksable)() + SetName(value *string)() + SetPath(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/file_commit_content__links.go b/pkg/github/models/file_commit_content__links.go new file mode 100644 index 0000000..0d9ac3e --- /dev/null +++ b/pkg/github/models/file_commit_content__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FileCommit_content__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The git property + git *string + // The html property + html *string + // The self property + self *string +} +// NewFileCommit_content__links instantiates a new FileCommit_content__links and sets the default values. +func NewFileCommit_content__links()(*FileCommit_content__links) { + m := &FileCommit_content__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileCommit_content__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileCommit_content__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileCommit_content__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FileCommit_content__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileCommit_content__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["git"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGit(val) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtml(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetGit gets the git property value. The git property +// returns a *string when successful +func (m *FileCommit_content__links) GetGit()(*string) { + return m.git +} +// GetHtml gets the html property value. The html property +// returns a *string when successful +func (m *FileCommit_content__links) GetHtml()(*string) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *FileCommit_content__links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *FileCommit_content__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("git", m.GetGit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + 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 *FileCommit_content__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGit sets the git property value. The git property +func (m *FileCommit_content__links) SetGit(value *string)() { + m.git = value +} +// SetHtml sets the html property value. The html property +func (m *FileCommit_content__links) SetHtml(value *string)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *FileCommit_content__links) SetSelf(value *string)() { + m.self = value +} +type FileCommit_content__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGit()(*string) + GetHtml()(*string) + GetSelf()(*string) + SetGit(value *string)() + SetHtml(value *string)() + SetSelf(value *string)() +} diff --git a/pkg/github/models/file_extension_restriction.go b/pkg/github/models/file_extension_restriction.go new file mode 100644 index 0000000..cf261b7 --- /dev/null +++ b/pkg/github/models/file_extension_restriction.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// File_extension_restriction note: file_extension_restriction is in beta and subject to change.Prevent commits that include files with specified file extensions from being pushed to the commit graph. +type File_extension_restriction struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters File_extension_restriction_parametersable + // The type property + typeEscaped *File_extension_restriction_type +} +// NewFile_extension_restriction instantiates a new File_extension_restriction and sets the default values. +func NewFile_extension_restriction()(*File_extension_restriction) { + m := &File_extension_restriction{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFile_extension_restrictionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFile_extension_restrictionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFile_extension_restriction(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *File_extension_restriction) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *File_extension_restriction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFile_extension_restriction_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(File_extension_restriction_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFile_extension_restriction_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*File_extension_restriction_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a File_extension_restriction_parametersable when successful +func (m *File_extension_restriction) GetParameters()(File_extension_restriction_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *File_extension_restriction_type when successful +func (m *File_extension_restriction) GetTypeEscaped()(*File_extension_restriction_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *File_extension_restriction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *File_extension_restriction) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *File_extension_restriction) SetParameters(value File_extension_restriction_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *File_extension_restriction) SetTypeEscaped(value *File_extension_restriction_type)() { + m.typeEscaped = value +} +type File_extension_restrictionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(File_extension_restriction_parametersable) + GetTypeEscaped()(*File_extension_restriction_type) + SetParameters(value File_extension_restriction_parametersable)() + SetTypeEscaped(value *File_extension_restriction_type)() +} diff --git a/pkg/github/models/file_extension_restriction_parameters.go b/pkg/github/models/file_extension_restriction_parameters.go new file mode 100644 index 0000000..45e09bc --- /dev/null +++ b/pkg/github/models/file_extension_restriction_parameters.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type File_extension_restriction_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The file extensions that are restricted from being pushed to the commit graph. + restricted_file_extensions []string +} +// NewFile_extension_restriction_parameters instantiates a new File_extension_restriction_parameters and sets the default values. +func NewFile_extension_restriction_parameters()(*File_extension_restriction_parameters) { + m := &File_extension_restriction_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFile_extension_restriction_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFile_extension_restriction_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFile_extension_restriction_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *File_extension_restriction_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *File_extension_restriction_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["restricted_file_extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRestrictedFileExtensions(res) + } + return nil + } + return res +} +// GetRestrictedFileExtensions gets the restricted_file_extensions property value. The file extensions that are restricted from being pushed to the commit graph. +// returns a []string when successful +func (m *File_extension_restriction_parameters) GetRestrictedFileExtensions()([]string) { + return m.restricted_file_extensions +} +// Serialize serializes information the current object +func (m *File_extension_restriction_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRestrictedFileExtensions() != nil { + err := writer.WriteCollectionOfStringValues("restricted_file_extensions", m.GetRestrictedFileExtensions()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *File_extension_restriction_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRestrictedFileExtensions sets the restricted_file_extensions property value. The file extensions that are restricted from being pushed to the commit graph. +func (m *File_extension_restriction_parameters) SetRestrictedFileExtensions(value []string)() { + m.restricted_file_extensions = value +} +type File_extension_restriction_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRestrictedFileExtensions()([]string) + SetRestrictedFileExtensions(value []string)() +} diff --git a/pkg/github/models/file_extension_restriction_type.go b/pkg/github/models/file_extension_restriction_type.go new file mode 100644 index 0000000..d74668c --- /dev/null +++ b/pkg/github/models/file_extension_restriction_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type File_extension_restriction_type int + +const ( + FILE_EXTENSION_RESTRICTION_FILE_EXTENSION_RESTRICTION_TYPE File_extension_restriction_type = iota +) + +func (i File_extension_restriction_type) String() string { + return []string{"file_extension_restriction"}[i] +} +func ParseFile_extension_restriction_type(v string) (any, error) { + result := FILE_EXTENSION_RESTRICTION_FILE_EXTENSION_RESTRICTION_TYPE + switch v { + case "file_extension_restriction": + result = FILE_EXTENSION_RESTRICTION_FILE_EXTENSION_RESTRICTION_TYPE + default: + return 0, errors.New("Unknown File_extension_restriction_type value: " + v) + } + return &result, nil +} +func SerializeFile_extension_restriction_type(values []File_extension_restriction_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i File_extension_restriction_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/file_path_restriction.go b/pkg/github/models/file_path_restriction.go new file mode 100644 index 0000000..d45a964 --- /dev/null +++ b/pkg/github/models/file_path_restriction.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// File_path_restriction note: file_path_restriction is in beta and subject to change.Prevent commits that include changes in specified file paths from being pushed to the commit graph. +type File_path_restriction struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters File_path_restriction_parametersable + // The type property + typeEscaped *File_path_restriction_type +} +// NewFile_path_restriction instantiates a new File_path_restriction and sets the default values. +func NewFile_path_restriction()(*File_path_restriction) { + m := &File_path_restriction{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFile_path_restrictionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFile_path_restrictionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFile_path_restriction(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *File_path_restriction) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *File_path_restriction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFile_path_restriction_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(File_path_restriction_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFile_path_restriction_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*File_path_restriction_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a File_path_restriction_parametersable when successful +func (m *File_path_restriction) GetParameters()(File_path_restriction_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *File_path_restriction_type when successful +func (m *File_path_restriction) GetTypeEscaped()(*File_path_restriction_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *File_path_restriction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *File_path_restriction) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *File_path_restriction) SetParameters(value File_path_restriction_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *File_path_restriction) SetTypeEscaped(value *File_path_restriction_type)() { + m.typeEscaped = value +} +type File_path_restrictionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(File_path_restriction_parametersable) + GetTypeEscaped()(*File_path_restriction_type) + SetParameters(value File_path_restriction_parametersable)() + SetTypeEscaped(value *File_path_restriction_type)() +} diff --git a/pkg/github/models/file_path_restriction_parameters.go b/pkg/github/models/file_path_restriction_parameters.go new file mode 100644 index 0000000..860c651 --- /dev/null +++ b/pkg/github/models/file_path_restriction_parameters.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type File_path_restriction_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The file paths that are restricted from being pushed to the commit graph. + restricted_file_paths []string +} +// NewFile_path_restriction_parameters instantiates a new File_path_restriction_parameters and sets the default values. +func NewFile_path_restriction_parameters()(*File_path_restriction_parameters) { + m := &File_path_restriction_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFile_path_restriction_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFile_path_restriction_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFile_path_restriction_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *File_path_restriction_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *File_path_restriction_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["restricted_file_paths"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRestrictedFilePaths(res) + } + return nil + } + return res +} +// GetRestrictedFilePaths gets the restricted_file_paths property value. The file paths that are restricted from being pushed to the commit graph. +// returns a []string when successful +func (m *File_path_restriction_parameters) GetRestrictedFilePaths()([]string) { + return m.restricted_file_paths +} +// Serialize serializes information the current object +func (m *File_path_restriction_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRestrictedFilePaths() != nil { + err := writer.WriteCollectionOfStringValues("restricted_file_paths", m.GetRestrictedFilePaths()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *File_path_restriction_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRestrictedFilePaths sets the restricted_file_paths property value. The file paths that are restricted from being pushed to the commit graph. +func (m *File_path_restriction_parameters) SetRestrictedFilePaths(value []string)() { + m.restricted_file_paths = value +} +type File_path_restriction_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRestrictedFilePaths()([]string) + SetRestrictedFilePaths(value []string)() +} diff --git a/pkg/github/models/file_path_restriction_type.go b/pkg/github/models/file_path_restriction_type.go new file mode 100644 index 0000000..b73a369 --- /dev/null +++ b/pkg/github/models/file_path_restriction_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type File_path_restriction_type int + +const ( + FILE_PATH_RESTRICTION_FILE_PATH_RESTRICTION_TYPE File_path_restriction_type = iota +) + +func (i File_path_restriction_type) String() string { + return []string{"file_path_restriction"}[i] +} +func ParseFile_path_restriction_type(v string) (any, error) { + result := FILE_PATH_RESTRICTION_FILE_PATH_RESTRICTION_TYPE + switch v { + case "file_path_restriction": + result = FILE_PATH_RESTRICTION_FILE_PATH_RESTRICTION_TYPE + default: + return 0, errors.New("Unknown File_path_restriction_type value: " + v) + } + return &result, nil +} +func SerializeFile_path_restriction_type(values []File_path_restriction_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i File_path_restriction_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/files503_error.go b/pkg/github/models/files503_error.go new file mode 100644 index 0000000..886aef7 --- /dev/null +++ b/pkg/github/models/files503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Files503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewFiles503Error instantiates a new Files503Error and sets the default values. +func NewFiles503Error()(*Files503Error) { + m := &Files503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFiles503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFiles503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFiles503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Files503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Files503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Files503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Files503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Files503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Files503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Files503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Files503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Files503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Files503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Files503Error) SetMessage(value *string)() { + m.message = value +} +type Files503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/full_repository.go b/pkg/github/models/full_repository.go new file mode 100644 index 0000000..7744cef --- /dev/null +++ b/pkg/github/models/full_repository.go @@ -0,0 +1,3050 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FullRepository full Repository +type FullRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_auto_merge property + allow_auto_merge *bool + // The allow_forking property + allow_forking *bool + // The allow_merge_commit property + allow_merge_commit *bool + // The allow_rebase_merge property + allow_rebase_merge *bool + // The allow_squash_merge property + allow_squash_merge *bool + // The allow_update_branch property + allow_update_branch *bool + // Whether anonymous git access is allowed. + anonymous_access_enabled *bool + // The archive_url property + archive_url *string + // The archived property + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // Code of Conduct Simple + code_of_conduct CodeOfConductSimpleable + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. + custom_properties FullRepository_custom_propertiesable + // The default_branch property + default_branch *string + // The delete_branch_on_merge property + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // Returns whether or not this repository disabled. + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // The has_discussions property + has_discussions *bool + // The has_downloads property + has_downloads *bool + // The has_issues property + has_issues *bool + // The has_pages property + has_pages *bool + // The has_projects property + has_projects *bool + // The has_wiki property + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int64 + // The is_template property + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // License Simple + license NullableLicenseSimpleable + // The master_branch property + master_branch *string + // The 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. + merge_commit_message *FullRepository_merge_commit_message + // The default value for a merge commit title. - `PR_TITLE` - default to the pull request's title. - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_title *FullRepository_merge_commit_title + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name property + name *string + // The network_count property + network_count *int32 + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + organization NullableSimpleUserable + // A GitHub user. + owner SimpleUserable + // A repository on GitHub. + parent Repositoryable + // The permissions property + permissions FullRepository_permissionsable + // The private property + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The security_and_analysis property + security_and_analysis SecurityAndAnalysisable + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + size *int32 + // A repository on GitHub. + source Repositoryable + // 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. + squash_merge_commit_message *FullRepository_squash_merge_commit_message + // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_title *FullRepository_squash_merge_commit_title + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_count property + subscribers_count *int32 + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // A repository on GitHub. + template_repository NullableRepositoryable + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The use_squash_pr_title_as_default property + use_squash_pr_title_as_default *bool + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewFullRepository instantiates a new FullRepository and sets the default values. +func NewFullRepository()(*FullRepository) { + m := &FullRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFullRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFullRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFullRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FullRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. The allow_auto_merge property +// returns a *bool when successful +func (m *FullRepository) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowForking gets the allow_forking property value. The allow_forking property +// returns a *bool when successful +func (m *FullRepository) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. The allow_merge_commit property +// returns a *bool when successful +func (m *FullRepository) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. The allow_rebase_merge property +// returns a *bool when successful +func (m *FullRepository) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. The allow_squash_merge property +// returns a *bool when successful +func (m *FullRepository) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetAllowUpdateBranch gets the allow_update_branch property value. The allow_update_branch property +// returns a *bool when successful +func (m *FullRepository) GetAllowUpdateBranch()(*bool) { + return m.allow_update_branch +} +// GetAnonymousAccessEnabled gets the anonymous_access_enabled property value. Whether anonymous git access is allowed. +// returns a *bool when successful +func (m *FullRepository) GetAnonymousAccessEnabled()(*bool) { + return m.anonymous_access_enabled +} +// GetArchived gets the archived property value. The archived property +// returns a *bool when successful +func (m *FullRepository) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *FullRepository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *FullRepository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *FullRepository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *FullRepository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *FullRepository) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCodeOfConduct gets the code_of_conduct property value. Code of Conduct Simple +// returns a CodeOfConductSimpleable when successful +func (m *FullRepository) GetCodeOfConduct()(CodeOfConductSimpleable) { + return m.code_of_conduct +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *FullRepository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *FullRepository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *FullRepository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *FullRepository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *FullRepository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *FullRepository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *FullRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCustomProperties gets the custom_properties property value. The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. +// returns a FullRepository_custom_propertiesable when successful +func (m *FullRepository) GetCustomProperties()(FullRepository_custom_propertiesable) { + return m.custom_properties +} +// GetDefaultBranch gets the default_branch property value. The default_branch property +// returns a *string when successful +func (m *FullRepository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. The delete_branch_on_merge property +// returns a *bool when successful +func (m *FullRepository) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *FullRepository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *FullRepository) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. Returns whether or not this repository disabled. +// returns a *bool when successful +func (m *FullRepository) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *FullRepository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *FullRepository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FullRepository) 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["anonymous_access_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAnonymousAccessEnabled(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["code_of_conduct"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeOfConductSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeOfConduct(val.(CodeOfConductSimpleable)) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["custom_properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFullRepository_custom_propertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomProperties(val.(FullRepository_custom_propertiesable)) + } + 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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFullRepository_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitMessage(val.(*FullRepository_merge_commit_message)) + } + return nil + } + res["merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFullRepository_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitTitle(val.(*FullRepository_merge_commit_title)) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNetworkCount(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(NullableSimpleUserable)) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(Repositoryable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFullRepository_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(FullRepository_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["security_and_analysis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysisFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAndAnalysis(val.(SecurityAndAnalysisable)) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(Repositoryable)) + } + return nil + } + res["squash_merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFullRepository_squash_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitMessage(val.(*FullRepository_squash_merge_commit_message)) + } + return nil + } + res["squash_merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFullRepository_squash_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitTitle(val.(*FullRepository_squash_merge_commit_title)) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersCount(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["template_repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTemplateRepository(val.(NullableRepositoryable)) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["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["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *FullRepository) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *FullRepository) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *FullRepository) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *FullRepository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *FullRepository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *FullRepository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *FullRepository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *FullRepository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *FullRepository) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. The has_discussions property +// returns a *bool when successful +func (m *FullRepository) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. The has_downloads property +// returns a *bool when successful +func (m *FullRepository) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. The has_issues property +// returns a *bool when successful +func (m *FullRepository) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *FullRepository) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. The has_projects property +// returns a *bool when successful +func (m *FullRepository) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. The has_wiki property +// returns a *bool when successful +func (m *FullRepository) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *FullRepository) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *FullRepository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *FullRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *FullRepository) GetId()(*int64) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *FullRepository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *FullRepository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *FullRepository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. The is_template property +// returns a *bool when successful +func (m *FullRepository) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *FullRepository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *FullRepository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *FullRepository) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *FullRepository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *FullRepository) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *FullRepository) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergeCommitMessage gets the merge_commit_message property value. 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. +// returns a *FullRepository_merge_commit_message when successful +func (m *FullRepository) GetMergeCommitMessage()(*FullRepository_merge_commit_message) { + return m.merge_commit_message +} +// GetMergeCommitTitle gets the merge_commit_title property value. 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). +// returns a *FullRepository_merge_commit_title when successful +func (m *FullRepository) GetMergeCommitTitle()(*FullRepository_merge_commit_title) { + return m.merge_commit_title +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *FullRepository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *FullRepository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *FullRepository) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *FullRepository) GetName()(*string) { + return m.name +} +// GetNetworkCount gets the network_count property value. The network_count property +// returns a *int32 when successful +func (m *FullRepository) GetNetworkCount()(*int32) { + return m.network_count +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *FullRepository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *FullRepository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *FullRepository) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *FullRepository) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOrganization gets the organization property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *FullRepository) GetOrganization()(NullableSimpleUserable) { + return m.organization +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *FullRepository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetParent gets the parent property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *FullRepository) GetParent()(Repositoryable) { + return m.parent +} +// GetPermissions gets the permissions property value. The permissions property +// returns a FullRepository_permissionsable when successful +func (m *FullRepository) GetPermissions()(FullRepository_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. The private property +// returns a *bool when successful +func (m *FullRepository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *FullRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *FullRepository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *FullRepository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetSecurityAndAnalysis gets the security_and_analysis property value. The security_and_analysis property +// returns a SecurityAndAnalysisable when successful +func (m *FullRepository) GetSecurityAndAnalysis()(SecurityAndAnalysisable) { + return m.security_and_analysis +} +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +// returns a *int32 when successful +func (m *FullRepository) GetSize()(*int32) { + return m.size +} +// GetSource gets the source property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *FullRepository) GetSource()(Repositoryable) { + return m.source +} +// GetSquashMergeCommitMessage gets the squash_merge_commit_message property value. 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. +// returns a *FullRepository_squash_merge_commit_message when successful +func (m *FullRepository) GetSquashMergeCommitMessage()(*FullRepository_squash_merge_commit_message) { + return m.squash_merge_commit_message +} +// GetSquashMergeCommitTitle gets the squash_merge_commit_title property value. 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). +// returns a *FullRepository_squash_merge_commit_title when successful +func (m *FullRepository) GetSquashMergeCommitTitle()(*FullRepository_squash_merge_commit_title) { + return m.squash_merge_commit_title +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *FullRepository) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *FullRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *FullRepository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *FullRepository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersCount gets the subscribers_count property value. The subscribers_count property +// returns a *int32 when successful +func (m *FullRepository) GetSubscribersCount()(*int32) { + return m.subscribers_count +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *FullRepository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *FullRepository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *FullRepository) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *FullRepository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *FullRepository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *FullRepository) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTemplateRepository gets the template_repository property value. A repository on GitHub. +// returns a NullableRepositoryable when successful +func (m *FullRepository) GetTemplateRepository()(NullableRepositoryable) { + return m.template_repository +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *FullRepository) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *FullRepository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *FullRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *FullRepository) GetUrl()(*string) { + return m.url +} +// GetUseSquashPrTitleAsDefault gets the use_squash_pr_title_as_default property value. The use_squash_pr_title_as_default property +// returns a *bool when successful +func (m *FullRepository) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *FullRepository) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *FullRepository) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *FullRepository) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *FullRepository) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *FullRepository) 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("anonymous_access_enabled", m.GetAnonymousAccessEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("code_of_conduct", m.GetCodeOfConduct()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("custom_properties", m.GetCustomProperties()) + 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("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + if m.GetMergeCommitMessage() != nil { + cast := (*m.GetMergeCommitMessage()).String() + err := writer.WriteStringValue("merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetMergeCommitTitle() != nil { + cast := (*m.GetMergeCommitTitle()).String() + err := writer.WriteStringValue("merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("network_count", m.GetNetworkCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("security_and_analysis", m.GetSecurityAndAnalysis()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitMessage() != nil { + cast := (*m.GetSquashMergeCommitMessage()).String() + err := writer.WriteStringValue("squash_merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitTitle() != nil { + cast := (*m.GetSquashMergeCommitTitle()).String() + err := writer.WriteStringValue("squash_merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("subscribers_count", m.GetSubscribersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("template_repository", m.GetTemplateRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FullRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. The allow_auto_merge property +func (m *FullRepository) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowForking sets the allow_forking property value. The allow_forking property +func (m *FullRepository) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. The allow_merge_commit property +func (m *FullRepository) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. The allow_rebase_merge property +func (m *FullRepository) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. The allow_squash_merge property +func (m *FullRepository) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetAllowUpdateBranch sets the allow_update_branch property value. The allow_update_branch property +func (m *FullRepository) SetAllowUpdateBranch(value *bool)() { + m.allow_update_branch = value +} +// SetAnonymousAccessEnabled sets the anonymous_access_enabled property value. Whether anonymous git access is allowed. +func (m *FullRepository) SetAnonymousAccessEnabled(value *bool)() { + m.anonymous_access_enabled = value +} +// SetArchived sets the archived property value. The archived property +func (m *FullRepository) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *FullRepository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *FullRepository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *FullRepository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *FullRepository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *FullRepository) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCodeOfConduct sets the code_of_conduct property value. Code of Conduct Simple +func (m *FullRepository) SetCodeOfConduct(value CodeOfConductSimpleable)() { + m.code_of_conduct = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *FullRepository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *FullRepository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *FullRepository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *FullRepository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *FullRepository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *FullRepository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *FullRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCustomProperties sets the custom_properties property value. The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. +func (m *FullRepository) SetCustomProperties(value FullRepository_custom_propertiesable)() { + m.custom_properties = value +} +// SetDefaultBranch sets the default_branch property value. The default_branch property +func (m *FullRepository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. The delete_branch_on_merge property +func (m *FullRepository) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *FullRepository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *FullRepository) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. Returns whether or not this repository disabled. +func (m *FullRepository) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *FullRepository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *FullRepository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *FullRepository) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *FullRepository) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *FullRepository) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *FullRepository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *FullRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *FullRepository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *FullRepository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *FullRepository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *FullRepository) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. The has_discussions property +func (m *FullRepository) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. The has_downloads property +func (m *FullRepository) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. The has_issues property +func (m *FullRepository) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *FullRepository) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. The has_projects property +func (m *FullRepository) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. The has_wiki property +func (m *FullRepository) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *FullRepository) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *FullRepository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *FullRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *FullRepository) SetId(value *int64)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *FullRepository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *FullRepository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *FullRepository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. The is_template property +func (m *FullRepository) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *FullRepository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *FullRepository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *FullRepository) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *FullRepository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. License Simple +func (m *FullRepository) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *FullRepository) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergeCommitMessage sets the merge_commit_message property value. 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. +func (m *FullRepository) SetMergeCommitMessage(value *FullRepository_merge_commit_message)() { + m.merge_commit_message = value +} +// SetMergeCommitTitle sets the merge_commit_title property value. 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). +func (m *FullRepository) SetMergeCommitTitle(value *FullRepository_merge_commit_title)() { + m.merge_commit_title = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *FullRepository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *FullRepository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *FullRepository) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name property +func (m *FullRepository) SetName(value *string)() { + m.name = value +} +// SetNetworkCount sets the network_count property value. The network_count property +func (m *FullRepository) SetNetworkCount(value *int32)() { + m.network_count = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *FullRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *FullRepository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *FullRepository) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *FullRepository) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOrganization sets the organization property value. A GitHub user. +func (m *FullRepository) SetOrganization(value NullableSimpleUserable)() { + m.organization = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *FullRepository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetParent sets the parent property value. A repository on GitHub. +func (m *FullRepository) SetParent(value Repositoryable)() { + m.parent = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *FullRepository) SetPermissions(value FullRepository_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. The private property +func (m *FullRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *FullRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *FullRepository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *FullRepository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetSecurityAndAnalysis sets the security_and_analysis property value. The security_and_analysis property +func (m *FullRepository) SetSecurityAndAnalysis(value SecurityAndAnalysisable)() { + m.security_and_analysis = value +} +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +func (m *FullRepository) SetSize(value *int32)() { + m.size = value +} +// SetSource sets the source property value. A repository on GitHub. +func (m *FullRepository) SetSource(value Repositoryable)() { + m.source = value +} +// SetSquashMergeCommitMessage sets the squash_merge_commit_message property value. 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. +func (m *FullRepository) SetSquashMergeCommitMessage(value *FullRepository_squash_merge_commit_message)() { + m.squash_merge_commit_message = value +} +// SetSquashMergeCommitTitle sets the squash_merge_commit_title property value. 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). +func (m *FullRepository) SetSquashMergeCommitTitle(value *FullRepository_squash_merge_commit_title)() { + m.squash_merge_commit_title = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *FullRepository) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *FullRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *FullRepository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *FullRepository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersCount sets the subscribers_count property value. The subscribers_count property +func (m *FullRepository) SetSubscribersCount(value *int32)() { + m.subscribers_count = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *FullRepository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *FullRepository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *FullRepository) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *FullRepository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *FullRepository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *FullRepository) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTemplateRepository sets the template_repository property value. A repository on GitHub. +func (m *FullRepository) SetTemplateRepository(value NullableRepositoryable)() { + m.template_repository = value +} +// SetTopics sets the topics property value. The topics property +func (m *FullRepository) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *FullRepository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *FullRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *FullRepository) SetUrl(value *string)() { + m.url = value +} +// SetUseSquashPrTitleAsDefault sets the use_squash_pr_title_as_default property value. The use_squash_pr_title_as_default property +func (m *FullRepository) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *FullRepository) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *FullRepository) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *FullRepository) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *FullRepository) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type FullRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetAllowUpdateBranch()(*bool) + GetAnonymousAccessEnabled()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCodeOfConduct()(CodeOfConductSimpleable) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomProperties()(FullRepository_custom_propertiesable) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetMasterBranch()(*string) + GetMergeCommitMessage()(*FullRepository_merge_commit_message) + GetMergeCommitTitle()(*FullRepository_merge_commit_title) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNetworkCount()(*int32) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOrganization()(NullableSimpleUserable) + GetOwner()(SimpleUserable) + GetParent()(Repositoryable) + GetPermissions()(FullRepository_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetSecurityAndAnalysis()(SecurityAndAnalysisable) + GetSize()(*int32) + GetSource()(Repositoryable) + GetSquashMergeCommitMessage()(*FullRepository_squash_merge_commit_message) + GetSquashMergeCommitTitle()(*FullRepository_squash_merge_commit_title) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersCount()(*int32) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTemplateRepository()(NullableRepositoryable) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUseSquashPrTitleAsDefault()(*bool) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetAllowUpdateBranch(value *bool)() + SetAnonymousAccessEnabled(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCodeOfConduct(value CodeOfConductSimpleable)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomProperties(value FullRepository_custom_propertiesable)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetMasterBranch(value *string)() + SetMergeCommitMessage(value *FullRepository_merge_commit_message)() + SetMergeCommitTitle(value *FullRepository_merge_commit_title)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNetworkCount(value *int32)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOrganization(value NullableSimpleUserable)() + SetOwner(value SimpleUserable)() + SetParent(value Repositoryable)() + SetPermissions(value FullRepository_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetSecurityAndAnalysis(value SecurityAndAnalysisable)() + SetSize(value *int32)() + SetSource(value Repositoryable)() + SetSquashMergeCommitMessage(value *FullRepository_squash_merge_commit_message)() + SetSquashMergeCommitTitle(value *FullRepository_squash_merge_commit_title)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersCount(value *int32)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTemplateRepository(value NullableRepositoryable)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUseSquashPrTitleAsDefault(value *bool)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/full_repository_custom_properties.go b/pkg/github/models/full_repository_custom_properties.go new file mode 100644 index 0000000..4087296 --- /dev/null +++ b/pkg/github/models/full_repository_custom_properties.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FullRepository_custom_properties the custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. +type FullRepository_custom_properties struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewFullRepository_custom_properties instantiates a new FullRepository_custom_properties and sets the default values. +func NewFullRepository_custom_properties()(*FullRepository_custom_properties) { + m := &FullRepository_custom_properties{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFullRepository_custom_propertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFullRepository_custom_propertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFullRepository_custom_properties(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FullRepository_custom_properties) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FullRepository_custom_properties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *FullRepository_custom_properties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FullRepository_custom_properties) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type FullRepository_custom_propertiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/full_repository_merge_commit_message.go b/pkg/github/models/full_repository_merge_commit_message.go new file mode 100644 index 0000000..0f291c5 --- /dev/null +++ b/pkg/github/models/full_repository_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type FullRepository_merge_commit_message int + +const ( + PR_BODY_FULLREPOSITORY_MERGE_COMMIT_MESSAGE FullRepository_merge_commit_message = iota + PR_TITLE_FULLREPOSITORY_MERGE_COMMIT_MESSAGE + BLANK_FULLREPOSITORY_MERGE_COMMIT_MESSAGE +) + +func (i FullRepository_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseFullRepository_merge_commit_message(v string) (any, error) { + result := PR_BODY_FULLREPOSITORY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_FULLREPOSITORY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_FULLREPOSITORY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_FULLREPOSITORY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown FullRepository_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeFullRepository_merge_commit_message(values []FullRepository_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i FullRepository_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/full_repository_merge_commit_title.go b/pkg/github/models/full_repository_merge_commit_title.go new file mode 100644 index 0000000..582c9e6 --- /dev/null +++ b/pkg/github/models/full_repository_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a merge commit title. - `PR_TITLE` - default to the pull request's title. - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +type FullRepository_merge_commit_title int + +const ( + PR_TITLE_FULLREPOSITORY_MERGE_COMMIT_TITLE FullRepository_merge_commit_title = iota + MERGE_MESSAGE_FULLREPOSITORY_MERGE_COMMIT_TITLE +) + +func (i FullRepository_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseFullRepository_merge_commit_title(v string) (any, error) { + result := PR_TITLE_FULLREPOSITORY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_FULLREPOSITORY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_FULLREPOSITORY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown FullRepository_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeFullRepository_merge_commit_title(values []FullRepository_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i FullRepository_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/full_repository_permissions.go b/pkg/github/models/full_repository_permissions.go new file mode 100644 index 0000000..9915aa3 --- /dev/null +++ b/pkg/github/models/full_repository_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type FullRepository_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewFullRepository_permissions instantiates a new FullRepository_permissions and sets the default values. +func NewFullRepository_permissions()(*FullRepository_permissions) { + m := &FullRepository_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFullRepository_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFullRepository_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFullRepository_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *FullRepository_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *FullRepository_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FullRepository_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *FullRepository_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *FullRepository_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *FullRepository_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *FullRepository_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *FullRepository_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FullRepository_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *FullRepository_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *FullRepository_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *FullRepository_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *FullRepository_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *FullRepository_permissions) SetTriage(value *bool)() { + m.triage = value +} +type FullRepository_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/full_repository_squash_merge_commit_message.go b/pkg/github/models/full_repository_squash_merge_commit_message.go new file mode 100644 index 0000000..1564df2 --- /dev/null +++ b/pkg/github/models/full_repository_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type FullRepository_squash_merge_commit_message int + +const ( + PR_BODY_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE FullRepository_squash_merge_commit_message = iota + COMMIT_MESSAGES_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i FullRepository_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseFullRepository_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown FullRepository_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeFullRepository_squash_merge_commit_message(values []FullRepository_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i FullRepository_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/full_repository_squash_merge_commit_title.go b/pkg/github/models/full_repository_squash_merge_commit_title.go new file mode 100644 index 0000000..e99fbf5 --- /dev/null +++ b/pkg/github/models/full_repository_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type FullRepository_squash_merge_commit_title int + +const ( + PR_TITLE_FULLREPOSITORY_SQUASH_MERGE_COMMIT_TITLE FullRepository_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_FULLREPOSITORY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i FullRepository_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseFullRepository_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_FULLREPOSITORY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_FULLREPOSITORY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_FULLREPOSITORY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown FullRepository_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeFullRepository_squash_merge_commit_title(values []FullRepository_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i FullRepository_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/get_all_cost_centers.go b/pkg/github/models/get_all_cost_centers.go new file mode 100644 index 0000000..e4eb831 --- /dev/null +++ b/pkg/github/models/get_all_cost_centers.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetAllCostCenters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The costCenters property + costCenters []GetAllCostCenters_costCentersable +} +// NewGetAllCostCenters instantiates a new GetAllCostCenters and sets the default values. +func NewGetAllCostCenters()(*GetAllCostCenters) { + m := &GetAllCostCenters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetAllCostCentersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetAllCostCentersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetAllCostCenters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetAllCostCenters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCostCenters gets the costCenters property value. The costCenters property +// returns a []GetAllCostCenters_costCentersable when successful +func (m *GetAllCostCenters) GetCostCenters()([]GetAllCostCenters_costCentersable) { + return m.costCenters +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetAllCostCenters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["costCenters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGetAllCostCenters_costCentersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GetAllCostCenters_costCentersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GetAllCostCenters_costCentersable) + } + } + m.SetCostCenters(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *GetAllCostCenters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCostCenters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCostCenters())) + for i, v := range m.GetCostCenters() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("costCenters", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GetAllCostCenters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCostCenters sets the costCenters property value. The costCenters property +func (m *GetAllCostCenters) SetCostCenters(value []GetAllCostCenters_costCentersable)() { + m.costCenters = value +} +type GetAllCostCentersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCostCenters()([]GetAllCostCenters_costCentersable) + SetCostCenters(value []GetAllCostCenters_costCentersable)() +} diff --git a/pkg/github/models/get_all_cost_centers503_error.go b/pkg/github/models/get_all_cost_centers503_error.go new file mode 100644 index 0000000..6ba242a --- /dev/null +++ b/pkg/github/models/get_all_cost_centers503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetAllCostCenters503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewGetAllCostCenters503Error instantiates a new GetAllCostCenters503Error and sets the default values. +func NewGetAllCostCenters503Error()(*GetAllCostCenters503Error) { + m := &GetAllCostCenters503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetAllCostCenters503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetAllCostCenters503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetAllCostCenters503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *GetAllCostCenters503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetAllCostCenters503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *GetAllCostCenters503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *GetAllCostCenters503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetAllCostCenters503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *GetAllCostCenters503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *GetAllCostCenters503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GetAllCostCenters503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *GetAllCostCenters503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *GetAllCostCenters503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *GetAllCostCenters503Error) SetMessage(value *string)() { + m.message = value +} +type GetAllCostCenters503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/get_all_cost_centers_cost_centers.go b/pkg/github/models/get_all_cost_centers_cost_centers.go new file mode 100644 index 0000000..8aa38a8 --- /dev/null +++ b/pkg/github/models/get_all_cost_centers_cost_centers.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetAllCostCenters_costCenters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // ID of the cost center. + id *string + // Name of the cost center. + name *string + // The resources property + resources []GetAllCostCenters_costCenters_resourcesable +} +// NewGetAllCostCenters_costCenters instantiates a new GetAllCostCenters_costCenters and sets the default values. +func NewGetAllCostCenters_costCenters()(*GetAllCostCenters_costCenters) { + m := &GetAllCostCenters_costCenters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetAllCostCenters_costCentersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetAllCostCenters_costCentersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetAllCostCenters_costCenters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetAllCostCenters_costCenters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetAllCostCenters_costCenters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGetAllCostCenters_costCenters_resourcesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GetAllCostCenters_costCenters_resourcesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GetAllCostCenters_costCenters_resourcesable) + } + } + m.SetResources(res) + } + return nil + } + return res +} +// GetId gets the id property value. ID of the cost center. +// returns a *string when successful +func (m *GetAllCostCenters_costCenters) GetId()(*string) { + return m.id +} +// GetName gets the name property value. Name of the cost center. +// returns a *string when successful +func (m *GetAllCostCenters_costCenters) GetName()(*string) { + return m.name +} +// GetResources gets the resources property value. The resources property +// returns a []GetAllCostCenters_costCenters_resourcesable when successful +func (m *GetAllCostCenters_costCenters) GetResources()([]GetAllCostCenters_costCenters_resourcesable) { + return m.resources +} +// Serialize serializes information the current object +func (m *GetAllCostCenters_costCenters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GetAllCostCenters_costCenters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. ID of the cost center. +func (m *GetAllCostCenters_costCenters) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. Name of the cost center. +func (m *GetAllCostCenters_costCenters) SetName(value *string)() { + m.name = value +} +// SetResources sets the resources property value. The resources property +func (m *GetAllCostCenters_costCenters) SetResources(value []GetAllCostCenters_costCenters_resourcesable)() { + m.resources = value +} +type GetAllCostCenters_costCentersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetName()(*string) + GetResources()([]GetAllCostCenters_costCenters_resourcesable) + SetId(value *string)() + SetName(value *string)() + SetResources(value []GetAllCostCenters_costCenters_resourcesable)() +} diff --git a/pkg/github/models/get_all_cost_centers_cost_centers_resources.go b/pkg/github/models/get_all_cost_centers_cost_centers_resources.go new file mode 100644 index 0000000..7f07cca --- /dev/null +++ b/pkg/github/models/get_all_cost_centers_cost_centers_resources.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetAllCostCenters_costCenters_resources struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the resource. + name *string + // Type of the resource. + typeEscaped *string +} +// NewGetAllCostCenters_costCenters_resources instantiates a new GetAllCostCenters_costCenters_resources and sets the default values. +func NewGetAllCostCenters_costCenters_resources()(*GetAllCostCenters_costCenters_resources) { + m := &GetAllCostCenters_costCenters_resources{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetAllCostCenters_costCenters_resourcesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetAllCostCenters_costCenters_resourcesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetAllCostCenters_costCenters_resources(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetAllCostCenters_costCenters_resources) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetAllCostCenters_costCenters_resources) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the resource. +// returns a *string when successful +func (m *GetAllCostCenters_costCenters_resources) GetName()(*string) { + return m.name +} +// GetTypeEscaped gets the type property value. Type of the resource. +// returns a *string when successful +func (m *GetAllCostCenters_costCenters_resources) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *GetAllCostCenters_costCenters_resources) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *GetAllCostCenters_costCenters_resources) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the resource. +func (m *GetAllCostCenters_costCenters_resources) SetName(value *string)() { + m.name = value +} +// SetTypeEscaped sets the type property value. Type of the resource. +func (m *GetAllCostCenters_costCenters_resources) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type GetAllCostCenters_costCenters_resourcesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetTypeEscaped()(*string) + SetName(value *string)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/get_consumed_licenses.go b/pkg/github/models/get_consumed_licenses.go new file mode 100644 index 0000000..9d6f834 --- /dev/null +++ b/pkg/github/models/get_consumed_licenses.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GetConsumedLicenses a breakdown of the licenses consumed by an enterprise. +type GetConsumedLicenses struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_seats_consumed property + total_seats_consumed *int32 + // The total_seats_purchased property + total_seats_purchased *int32 + // The users property + users []GetConsumedLicenses_usersable +} +// NewGetConsumedLicenses instantiates a new GetConsumedLicenses and sets the default values. +func NewGetConsumedLicenses()(*GetConsumedLicenses) { + m := &GetConsumedLicenses{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetConsumedLicensesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetConsumedLicensesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetConsumedLicenses(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetConsumedLicenses) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetConsumedLicenses) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_seats_consumed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSeatsConsumed(val) + } + return nil + } + res["total_seats_purchased"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSeatsPurchased(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGetConsumedLicenses_usersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GetConsumedLicenses_usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GetConsumedLicenses_usersable) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTotalSeatsConsumed gets the total_seats_consumed property value. The total_seats_consumed property +// returns a *int32 when successful +func (m *GetConsumedLicenses) GetTotalSeatsConsumed()(*int32) { + return m.total_seats_consumed +} +// GetTotalSeatsPurchased gets the total_seats_purchased property value. The total_seats_purchased property +// returns a *int32 when successful +func (m *GetConsumedLicenses) GetTotalSeatsPurchased()(*int32) { + return m.total_seats_purchased +} +// GetUsers gets the users property value. The users property +// returns a []GetConsumedLicenses_usersable when successful +func (m *GetConsumedLicenses) GetUsers()([]GetConsumedLicenses_usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *GetConsumedLicenses) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_seats_consumed", m.GetTotalSeatsConsumed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_seats_purchased", m.GetTotalSeatsPurchased()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GetConsumedLicenses) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalSeatsConsumed sets the total_seats_consumed property value. The total_seats_consumed property +func (m *GetConsumedLicenses) SetTotalSeatsConsumed(value *int32)() { + m.total_seats_consumed = value +} +// SetTotalSeatsPurchased sets the total_seats_purchased property value. The total_seats_purchased property +func (m *GetConsumedLicenses) SetTotalSeatsPurchased(value *int32)() { + m.total_seats_purchased = value +} +// SetUsers sets the users property value. The users property +func (m *GetConsumedLicenses) SetUsers(value []GetConsumedLicenses_usersable)() { + m.users = value +} +type GetConsumedLicensesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalSeatsConsumed()(*int32) + GetTotalSeatsPurchased()(*int32) + GetUsers()([]GetConsumedLicenses_usersable) + SetTotalSeatsConsumed(value *int32)() + SetTotalSeatsPurchased(value *int32)() + SetUsers(value []GetConsumedLicenses_usersable)() +} diff --git a/pkg/github/models/get_consumed_licenses_users.go b/pkg/github/models/get_consumed_licenses_users.go new file mode 100644 index 0000000..a057c62 --- /dev/null +++ b/pkg/github/models/get_consumed_licenses_users.go @@ -0,0 +1,609 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetConsumedLicenses_users struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enterprise_server_emails property + enterprise_server_emails []string + // The enterprise_server_user property + enterprise_server_user *bool + // The enterprise_server_user_ids property + enterprise_server_user_ids []string + // All enterprise roles for a user. + github_com_enterprise_roles []string + // The github_com_login property + github_com_login *string + // The github_com_member_roles property + github_com_member_roles []string + // The github_com_name property + github_com_name *string + // The github_com_orgs_with_pending_invites property + github_com_orgs_with_pending_invites []string + // The github_com_profile property + github_com_profile *string + // The github_com_saml_name_id property + github_com_saml_name_id *string + // The github_com_two_factor_auth property + github_com_two_factor_auth *bool + // The github_com_user property + github_com_user *bool + // The github_com_verified_domain_emails property + github_com_verified_domain_emails []string + // The license_type property + license_type *string + // The total_user_accounts property + total_user_accounts *int32 + // The visual_studio_license_status property + visual_studio_license_status *string + // The visual_studio_subscription_email property + visual_studio_subscription_email *string + // The visual_studio_subscription_user property + visual_studio_subscription_user *bool +} +// NewGetConsumedLicenses_users instantiates a new GetConsumedLicenses_users and sets the default values. +func NewGetConsumedLicenses_users()(*GetConsumedLicenses_users) { + m := &GetConsumedLicenses_users{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetConsumedLicenses_usersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetConsumedLicenses_usersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetConsumedLicenses_users(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetConsumedLicenses_users) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnterpriseServerEmails gets the enterprise_server_emails property value. The enterprise_server_emails property +// returns a []string when successful +func (m *GetConsumedLicenses_users) GetEnterpriseServerEmails()([]string) { + return m.enterprise_server_emails +} +// GetEnterpriseServerUser gets the enterprise_server_user property value. The enterprise_server_user property +// returns a *bool when successful +func (m *GetConsumedLicenses_users) GetEnterpriseServerUser()(*bool) { + return m.enterprise_server_user +} +// GetEnterpriseServerUserIds gets the enterprise_server_user_ids property value. The enterprise_server_user_ids property +// returns a []string when successful +func (m *GetConsumedLicenses_users) GetEnterpriseServerUserIds()([]string) { + return m.enterprise_server_user_ids +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetConsumedLicenses_users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enterprise_server_emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEnterpriseServerEmails(res) + } + return nil + } + res["enterprise_server_user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnterpriseServerUser(val) + } + return nil + } + res["enterprise_server_user_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEnterpriseServerUserIds(res) + } + return nil + } + res["github_com_enterprise_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGithubComEnterpriseRoles(res) + } + return nil + } + res["github_com_login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubComLogin(val) + } + return nil + } + res["github_com_member_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGithubComMemberRoles(res) + } + return nil + } + res["github_com_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubComName(val) + } + return nil + } + res["github_com_orgs_with_pending_invites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGithubComOrgsWithPendingInvites(res) + } + return nil + } + res["github_com_profile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubComProfile(val) + } + return nil + } + res["github_com_saml_name_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubComSamlNameId(val) + } + return nil + } + res["github_com_two_factor_auth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubComTwoFactorAuth(val) + } + return nil + } + res["github_com_user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubComUser(val) + } + return nil + } + res["github_com_verified_domain_emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGithubComVerifiedDomainEmails(res) + } + return nil + } + res["license_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicenseType(val) + } + return nil + } + res["total_user_accounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUserAccounts(val) + } + return nil + } + res["visual_studio_license_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisualStudioLicenseStatus(val) + } + return nil + } + res["visual_studio_subscription_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisualStudioSubscriptionEmail(val) + } + return nil + } + res["visual_studio_subscription_user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVisualStudioSubscriptionUser(val) + } + return nil + } + return res +} +// GetGithubComEnterpriseRoles gets the github_com_enterprise_roles property value. All enterprise roles for a user. +// returns a []string when successful +func (m *GetConsumedLicenses_users) GetGithubComEnterpriseRoles()([]string) { + return m.github_com_enterprise_roles +} +// GetGithubComLogin gets the github_com_login property value. The github_com_login property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetGithubComLogin()(*string) { + return m.github_com_login +} +// GetGithubComMemberRoles gets the github_com_member_roles property value. The github_com_member_roles property +// returns a []string when successful +func (m *GetConsumedLicenses_users) GetGithubComMemberRoles()([]string) { + return m.github_com_member_roles +} +// GetGithubComName gets the github_com_name property value. The github_com_name property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetGithubComName()(*string) { + return m.github_com_name +} +// GetGithubComOrgsWithPendingInvites gets the github_com_orgs_with_pending_invites property value. The github_com_orgs_with_pending_invites property +// returns a []string when successful +func (m *GetConsumedLicenses_users) GetGithubComOrgsWithPendingInvites()([]string) { + return m.github_com_orgs_with_pending_invites +} +// GetGithubComProfile gets the github_com_profile property value. The github_com_profile property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetGithubComProfile()(*string) { + return m.github_com_profile +} +// GetGithubComSamlNameId gets the github_com_saml_name_id property value. The github_com_saml_name_id property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetGithubComSamlNameId()(*string) { + return m.github_com_saml_name_id +} +// GetGithubComTwoFactorAuth gets the github_com_two_factor_auth property value. The github_com_two_factor_auth property +// returns a *bool when successful +func (m *GetConsumedLicenses_users) GetGithubComTwoFactorAuth()(*bool) { + return m.github_com_two_factor_auth +} +// GetGithubComUser gets the github_com_user property value. The github_com_user property +// returns a *bool when successful +func (m *GetConsumedLicenses_users) GetGithubComUser()(*bool) { + return m.github_com_user +} +// GetGithubComVerifiedDomainEmails gets the github_com_verified_domain_emails property value. The github_com_verified_domain_emails property +// returns a []string when successful +func (m *GetConsumedLicenses_users) GetGithubComVerifiedDomainEmails()([]string) { + return m.github_com_verified_domain_emails +} +// GetLicenseType gets the license_type property value. The license_type property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetLicenseType()(*string) { + return m.license_type +} +// GetTotalUserAccounts gets the total_user_accounts property value. The total_user_accounts property +// returns a *int32 when successful +func (m *GetConsumedLicenses_users) GetTotalUserAccounts()(*int32) { + return m.total_user_accounts +} +// GetVisualStudioLicenseStatus gets the visual_studio_license_status property value. The visual_studio_license_status property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetVisualStudioLicenseStatus()(*string) { + return m.visual_studio_license_status +} +// GetVisualStudioSubscriptionEmail gets the visual_studio_subscription_email property value. The visual_studio_subscription_email property +// returns a *string when successful +func (m *GetConsumedLicenses_users) GetVisualStudioSubscriptionEmail()(*string) { + return m.visual_studio_subscription_email +} +// GetVisualStudioSubscriptionUser gets the visual_studio_subscription_user property value. The visual_studio_subscription_user property +// returns a *bool when successful +func (m *GetConsumedLicenses_users) GetVisualStudioSubscriptionUser()(*bool) { + return m.visual_studio_subscription_user +} +// Serialize serializes information the current object +func (m *GetConsumedLicenses_users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterpriseServerEmails() != nil { + err := writer.WriteCollectionOfStringValues("enterprise_server_emails", m.GetEnterpriseServerEmails()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enterprise_server_user", m.GetEnterpriseServerUser()) + if err != nil { + return err + } + } + if m.GetEnterpriseServerUserIds() != nil { + err := writer.WriteCollectionOfStringValues("enterprise_server_user_ids", m.GetEnterpriseServerUserIds()) + if err != nil { + return err + } + } + if m.GetGithubComEnterpriseRoles() != nil { + err := writer.WriteCollectionOfStringValues("github_com_enterprise_roles", m.GetGithubComEnterpriseRoles()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("github_com_login", m.GetGithubComLogin()) + if err != nil { + return err + } + } + if m.GetGithubComMemberRoles() != nil { + err := writer.WriteCollectionOfStringValues("github_com_member_roles", m.GetGithubComMemberRoles()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("github_com_name", m.GetGithubComName()) + if err != nil { + return err + } + } + if m.GetGithubComOrgsWithPendingInvites() != nil { + err := writer.WriteCollectionOfStringValues("github_com_orgs_with_pending_invites", m.GetGithubComOrgsWithPendingInvites()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("github_com_profile", m.GetGithubComProfile()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("github_com_saml_name_id", m.GetGithubComSamlNameId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("github_com_two_factor_auth", m.GetGithubComTwoFactorAuth()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("github_com_user", m.GetGithubComUser()) + if err != nil { + return err + } + } + if m.GetGithubComVerifiedDomainEmails() != nil { + err := writer.WriteCollectionOfStringValues("github_com_verified_domain_emails", m.GetGithubComVerifiedDomainEmails()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("license_type", m.GetLicenseType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_user_accounts", m.GetTotalUserAccounts()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visual_studio_license_status", m.GetVisualStudioLicenseStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visual_studio_subscription_email", m.GetVisualStudioSubscriptionEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("visual_studio_subscription_user", m.GetVisualStudioSubscriptionUser()) + 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 *GetConsumedLicenses_users) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnterpriseServerEmails sets the enterprise_server_emails property value. The enterprise_server_emails property +func (m *GetConsumedLicenses_users) SetEnterpriseServerEmails(value []string)() { + m.enterprise_server_emails = value +} +// SetEnterpriseServerUser sets the enterprise_server_user property value. The enterprise_server_user property +func (m *GetConsumedLicenses_users) SetEnterpriseServerUser(value *bool)() { + m.enterprise_server_user = value +} +// SetEnterpriseServerUserIds sets the enterprise_server_user_ids property value. The enterprise_server_user_ids property +func (m *GetConsumedLicenses_users) SetEnterpriseServerUserIds(value []string)() { + m.enterprise_server_user_ids = value +} +// SetGithubComEnterpriseRoles sets the github_com_enterprise_roles property value. All enterprise roles for a user. +func (m *GetConsumedLicenses_users) SetGithubComEnterpriseRoles(value []string)() { + m.github_com_enterprise_roles = value +} +// SetGithubComLogin sets the github_com_login property value. The github_com_login property +func (m *GetConsumedLicenses_users) SetGithubComLogin(value *string)() { + m.github_com_login = value +} +// SetGithubComMemberRoles sets the github_com_member_roles property value. The github_com_member_roles property +func (m *GetConsumedLicenses_users) SetGithubComMemberRoles(value []string)() { + m.github_com_member_roles = value +} +// SetGithubComName sets the github_com_name property value. The github_com_name property +func (m *GetConsumedLicenses_users) SetGithubComName(value *string)() { + m.github_com_name = value +} +// SetGithubComOrgsWithPendingInvites sets the github_com_orgs_with_pending_invites property value. The github_com_orgs_with_pending_invites property +func (m *GetConsumedLicenses_users) SetGithubComOrgsWithPendingInvites(value []string)() { + m.github_com_orgs_with_pending_invites = value +} +// SetGithubComProfile sets the github_com_profile property value. The github_com_profile property +func (m *GetConsumedLicenses_users) SetGithubComProfile(value *string)() { + m.github_com_profile = value +} +// SetGithubComSamlNameId sets the github_com_saml_name_id property value. The github_com_saml_name_id property +func (m *GetConsumedLicenses_users) SetGithubComSamlNameId(value *string)() { + m.github_com_saml_name_id = value +} +// SetGithubComTwoFactorAuth sets the github_com_two_factor_auth property value. The github_com_two_factor_auth property +func (m *GetConsumedLicenses_users) SetGithubComTwoFactorAuth(value *bool)() { + m.github_com_two_factor_auth = value +} +// SetGithubComUser sets the github_com_user property value. The github_com_user property +func (m *GetConsumedLicenses_users) SetGithubComUser(value *bool)() { + m.github_com_user = value +} +// SetGithubComVerifiedDomainEmails sets the github_com_verified_domain_emails property value. The github_com_verified_domain_emails property +func (m *GetConsumedLicenses_users) SetGithubComVerifiedDomainEmails(value []string)() { + m.github_com_verified_domain_emails = value +} +// SetLicenseType sets the license_type property value. The license_type property +func (m *GetConsumedLicenses_users) SetLicenseType(value *string)() { + m.license_type = value +} +// SetTotalUserAccounts sets the total_user_accounts property value. The total_user_accounts property +func (m *GetConsumedLicenses_users) SetTotalUserAccounts(value *int32)() { + m.total_user_accounts = value +} +// SetVisualStudioLicenseStatus sets the visual_studio_license_status property value. The visual_studio_license_status property +func (m *GetConsumedLicenses_users) SetVisualStudioLicenseStatus(value *string)() { + m.visual_studio_license_status = value +} +// SetVisualStudioSubscriptionEmail sets the visual_studio_subscription_email property value. The visual_studio_subscription_email property +func (m *GetConsumedLicenses_users) SetVisualStudioSubscriptionEmail(value *string)() { + m.visual_studio_subscription_email = value +} +// SetVisualStudioSubscriptionUser sets the visual_studio_subscription_user property value. The visual_studio_subscription_user property +func (m *GetConsumedLicenses_users) SetVisualStudioSubscriptionUser(value *bool)() { + m.visual_studio_subscription_user = value +} +type GetConsumedLicenses_usersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterpriseServerEmails()([]string) + GetEnterpriseServerUser()(*bool) + GetEnterpriseServerUserIds()([]string) + GetGithubComEnterpriseRoles()([]string) + GetGithubComLogin()(*string) + GetGithubComMemberRoles()([]string) + GetGithubComName()(*string) + GetGithubComOrgsWithPendingInvites()([]string) + GetGithubComProfile()(*string) + GetGithubComSamlNameId()(*string) + GetGithubComTwoFactorAuth()(*bool) + GetGithubComUser()(*bool) + GetGithubComVerifiedDomainEmails()([]string) + GetLicenseType()(*string) + GetTotalUserAccounts()(*int32) + GetVisualStudioLicenseStatus()(*string) + GetVisualStudioSubscriptionEmail()(*string) + GetVisualStudioSubscriptionUser()(*bool) + SetEnterpriseServerEmails(value []string)() + SetEnterpriseServerUser(value *bool)() + SetEnterpriseServerUserIds(value []string)() + SetGithubComEnterpriseRoles(value []string)() + SetGithubComLogin(value *string)() + SetGithubComMemberRoles(value []string)() + SetGithubComName(value *string)() + SetGithubComOrgsWithPendingInvites(value []string)() + SetGithubComProfile(value *string)() + SetGithubComSamlNameId(value *string)() + SetGithubComTwoFactorAuth(value *bool)() + SetGithubComUser(value *bool)() + SetGithubComVerifiedDomainEmails(value []string)() + SetLicenseType(value *string)() + SetTotalUserAccounts(value *int32)() + SetVisualStudioLicenseStatus(value *string)() + SetVisualStudioSubscriptionEmail(value *string)() + SetVisualStudioSubscriptionUser(value *bool)() +} diff --git a/pkg/github/models/get_license_sync_status.go b/pkg/github/models/get_license_sync_status.go new file mode 100644 index 0000000..823fc3d --- /dev/null +++ b/pkg/github/models/get_license_sync_status.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GetLicenseSyncStatus information about the status of a license sync job for an enterprise. +type GetLicenseSyncStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The server_instances property + server_instances []GetLicenseSyncStatus_server_instancesable +} +// NewGetLicenseSyncStatus instantiates a new GetLicenseSyncStatus and sets the default values. +func NewGetLicenseSyncStatus()(*GetLicenseSyncStatus) { + m := &GetLicenseSyncStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetLicenseSyncStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetLicenseSyncStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetLicenseSyncStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetLicenseSyncStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetLicenseSyncStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["server_instances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGetLicenseSyncStatus_server_instancesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GetLicenseSyncStatus_server_instancesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GetLicenseSyncStatus_server_instancesable) + } + } + m.SetServerInstances(res) + } + return nil + } + return res +} +// GetServerInstances gets the server_instances property value. The server_instances property +// returns a []GetLicenseSyncStatus_server_instancesable when successful +func (m *GetLicenseSyncStatus) GetServerInstances()([]GetLicenseSyncStatus_server_instancesable) { + return m.server_instances +} +// Serialize serializes information the current object +func (m *GetLicenseSyncStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetServerInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServerInstances())) + for i, v := range m.GetServerInstances() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("server_instances", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GetLicenseSyncStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetServerInstances sets the server_instances property value. The server_instances property +func (m *GetLicenseSyncStatus) SetServerInstances(value []GetLicenseSyncStatus_server_instancesable)() { + m.server_instances = value +} +type GetLicenseSyncStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetServerInstances()([]GetLicenseSyncStatus_server_instancesable) + SetServerInstances(value []GetLicenseSyncStatus_server_instancesable)() +} diff --git a/pkg/github/models/get_license_sync_status_server_instances.go b/pkg/github/models/get_license_sync_status_server_instances.go new file mode 100644 index 0000000..40a25e5 --- /dev/null +++ b/pkg/github/models/get_license_sync_status_server_instances.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetLicenseSyncStatus_server_instances struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The hostname property + hostname *string + // The last_sync property + last_sync GetLicenseSyncStatus_server_instances_last_syncable + // The server_id property + server_id *string +} +// NewGetLicenseSyncStatus_server_instances instantiates a new GetLicenseSyncStatus_server_instances and sets the default values. +func NewGetLicenseSyncStatus_server_instances()(*GetLicenseSyncStatus_server_instances) { + m := &GetLicenseSyncStatus_server_instances{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetLicenseSyncStatus_server_instancesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetLicenseSyncStatus_server_instancesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetLicenseSyncStatus_server_instances(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetLicenseSyncStatus_server_instances) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetLicenseSyncStatus_server_instances) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hostname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostname(val) + } + return nil + } + res["last_sync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGetLicenseSyncStatus_server_instances_last_syncFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastSync(val.(GetLicenseSyncStatus_server_instances_last_syncable)) + } + return nil + } + res["server_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerId(val) + } + return nil + } + return res +} +// GetHostname gets the hostname property value. The hostname property +// returns a *string when successful +func (m *GetLicenseSyncStatus_server_instances) GetHostname()(*string) { + return m.hostname +} +// GetLastSync gets the last_sync property value. The last_sync property +// returns a GetLicenseSyncStatus_server_instances_last_syncable when successful +func (m *GetLicenseSyncStatus_server_instances) GetLastSync()(GetLicenseSyncStatus_server_instances_last_syncable) { + return m.last_sync +} +// GetServerId gets the server_id property value. The server_id property +// returns a *string when successful +func (m *GetLicenseSyncStatus_server_instances) GetServerId()(*string) { + return m.server_id +} +// Serialize serializes information the current object +func (m *GetLicenseSyncStatus_server_instances) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("hostname", m.GetHostname()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("last_sync", m.GetLastSync()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("server_id", m.GetServerId()) + 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 *GetLicenseSyncStatus_server_instances) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHostname sets the hostname property value. The hostname property +func (m *GetLicenseSyncStatus_server_instances) SetHostname(value *string)() { + m.hostname = value +} +// SetLastSync sets the last_sync property value. The last_sync property +func (m *GetLicenseSyncStatus_server_instances) SetLastSync(value GetLicenseSyncStatus_server_instances_last_syncable)() { + m.last_sync = value +} +// SetServerId sets the server_id property value. The server_id property +func (m *GetLicenseSyncStatus_server_instances) SetServerId(value *string)() { + m.server_id = value +} +type GetLicenseSyncStatus_server_instancesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHostname()(*string) + GetLastSync()(GetLicenseSyncStatus_server_instances_last_syncable) + GetServerId()(*string) + SetHostname(value *string)() + SetLastSync(value GetLicenseSyncStatus_server_instances_last_syncable)() + SetServerId(value *string)() +} diff --git a/pkg/github/models/get_license_sync_status_server_instances_last_sync.go b/pkg/github/models/get_license_sync_status_server_instances_last_sync.go new file mode 100644 index 0000000..f152063 --- /dev/null +++ b/pkg/github/models/get_license_sync_status_server_instances_last_sync.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GetLicenseSyncStatus_server_instances_last_sync struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The error property + error *string + // The status property + status *string +} +// NewGetLicenseSyncStatus_server_instances_last_sync instantiates a new GetLicenseSyncStatus_server_instances_last_sync and sets the default values. +func NewGetLicenseSyncStatus_server_instances_last_sync()(*GetLicenseSyncStatus_server_instances_last_sync) { + m := &GetLicenseSyncStatus_server_instances_last_sync{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGetLicenseSyncStatus_server_instances_last_syncFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGetLicenseSyncStatus_server_instances_last_syncFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGetLicenseSyncStatus_server_instances_last_sync(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GetLicenseSyncStatus_server_instances_last_sync) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *GetLicenseSyncStatus_server_instances_last_sync) GetDate()(*string) { + return m.date +} +// GetError gets the error property value. The error property +// returns a *string when successful +func (m *GetLicenseSyncStatus_server_instances_last_sync) GetError()(*string) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GetLicenseSyncStatus_server_instances_last_sync) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetError(val) + } + return nil + } + 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. The status property +// returns a *string when successful +func (m *GetLicenseSyncStatus_server_instances_last_sync) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *GetLicenseSyncStatus_server_instances_last_sync) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("error", m.GetError()) + if err != nil { + return err + } + } + { + 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 *GetLicenseSyncStatus_server_instances_last_sync) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *GetLicenseSyncStatus_server_instances_last_sync) SetDate(value *string)() { + m.date = value +} +// SetError sets the error property value. The error property +func (m *GetLicenseSyncStatus_server_instances_last_sync) SetError(value *string)() { + m.error = value +} +// SetStatus sets the status property value. The status property +func (m *GetLicenseSyncStatus_server_instances_last_sync) SetStatus(value *string)() { + m.status = value +} +type GetLicenseSyncStatus_server_instances_last_syncable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetError()(*string) + GetStatus()(*string) + SetDate(value *string)() + SetError(value *string)() + SetStatus(value *string)() +} diff --git a/pkg/github/models/gist_comment.go b/pkg/github/models/gist_comment.go new file mode 100644 index 0000000..fcefb8e --- /dev/null +++ b/pkg/github/models/gist_comment.go @@ -0,0 +1,286 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GistComment a comment made to a gist. +type GistComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // The comment text. + body *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int32 + // The node_id property + node_id *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewGistComment instantiates a new GistComment and sets the default values. +func NewGistComment()(*GistComment) { + m := &GistComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *GistComment) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The comment text. +// returns a *string when successful +func (m *GistComment) GetBody()(*string) { + return m.body +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *GistComment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *GistComment) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *GistComment) GetNodeId()(*string) { + return m.node_id +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *GistComment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GistComment) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *GistComment) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *GistComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *GistComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *GistComment) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The comment text. +func (m *GistComment) SetBody(value *string)() { + m.body = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GistComment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *GistComment) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *GistComment) SetNodeId(value *string)() { + m.node_id = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *GistComment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *GistComment) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *GistComment) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type GistCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetNodeId()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetNodeId(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/gist_comment403_error.go b/pkg/github/models/gist_comment403_error.go new file mode 100644 index 0000000..1cdf600 --- /dev/null +++ b/pkg/github/models/gist_comment403_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistComment403Error 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 block property + block GistComment403Error_blockable + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewGistComment403Error instantiates a new GistComment403Error and sets the default values. +func NewGistComment403Error()(*GistComment403Error) { + m := &GistComment403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistComment403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistComment403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistComment403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *GistComment403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistComment403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBlock gets the block property value. The block property +// returns a GistComment403Error_blockable when successful +func (m *GistComment403Error) GetBlock()(GistComment403Error_blockable) { + return m.block +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *GistComment403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistComment403Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["block"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistComment403Error_blockFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBlock(val.(GistComment403Error_blockable)) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *GistComment403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *GistComment403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("block", m.GetBlock()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistComment403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBlock sets the block property value. The block property +func (m *GistComment403Error) SetBlock(value GistComment403Error_blockable)() { + m.block = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *GistComment403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *GistComment403Error) SetMessage(value *string)() { + m.message = value +} +type GistComment403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlock()(GistComment403Error_blockable) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetBlock(value GistComment403Error_blockable)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/gist_comment403_error_block.go b/pkg/github/models/gist_comment403_error_block.go new file mode 100644 index 0000000..b90ac29 --- /dev/null +++ b/pkg/github/models/gist_comment403_error_block.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistComment403Error_block struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The html_url property + html_url *string + // The reason property + reason *string +} +// NewGistComment403Error_block instantiates a new GistComment403Error_block and sets the default values. +func NewGistComment403Error_block()(*GistComment403Error_block) { + m := &GistComment403Error_block{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistComment403Error_blockFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistComment403Error_blockFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistComment403Error_block(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistComment403Error_block) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *GistComment403Error_block) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistComment403Error_block) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *GistComment403Error_block) GetHtmlUrl()(*string) { + return m.html_url +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *GistComment403Error_block) GetReason()(*string) { + return m.reason +} +// Serialize serializes information the current object +func (m *GistComment403Error_block) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + 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 *GistComment403Error_block) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GistComment403Error_block) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *GistComment403Error_block) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetReason sets the reason property value. The reason property +func (m *GistComment403Error_block) SetReason(value *string)() { + m.reason = value +} +type GistComment403Error_blockable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetHtmlUrl()(*string) + GetReason()(*string) + SetCreatedAt(value *string)() + SetHtmlUrl(value *string)() + SetReason(value *string)() +} diff --git a/pkg/github/models/gist_commit.go b/pkg/github/models/gist_commit.go new file mode 100644 index 0000000..3f92d64 --- /dev/null +++ b/pkg/github/models/gist_commit.go @@ -0,0 +1,198 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GistCommit gist Commit +type GistCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The change_status property + change_status GistCommit_change_statusable + // The committed_at property + committed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable + // The version property + version *string +} +// NewGistCommit instantiates a new GistCommit and sets the default values. +func NewGistCommit()(*GistCommit) { + m := &GistCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChangeStatus gets the change_status property value. The change_status property +// returns a GistCommit_change_statusable when successful +func (m *GistCommit) GetChangeStatus()(GistCommit_change_statusable) { + return m.change_status +} +// GetCommittedAt gets the committed_at property value. The committed_at property +// returns a *Time when successful +func (m *GistCommit) GetCommittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.committed_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["change_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistCommit_change_statusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChangeStatus(val.(GistCommit_change_statusable)) + } + return nil + } + res["committed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCommittedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GistCommit) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *GistCommit) GetUser()(NullableSimpleUserable) { + return m.user +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *GistCommit) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *GistCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("change_status", m.GetChangeStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("committed_at", m.GetCommittedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *GistCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChangeStatus sets the change_status property value. The change_status property +func (m *GistCommit) SetChangeStatus(value GistCommit_change_statusable)() { + m.change_status = value +} +// SetCommittedAt sets the committed_at property value. The committed_at property +func (m *GistCommit) SetCommittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.committed_at = value +} +// SetUrl sets the url property value. The url property +func (m *GistCommit) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *GistCommit) SetUser(value NullableSimpleUserable)() { + m.user = value +} +// SetVersion sets the version property value. The version property +func (m *GistCommit) SetVersion(value *string)() { + m.version = value +} +type GistCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeStatus()(GistCommit_change_statusable) + GetCommittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + GetVersion()(*string) + SetChangeStatus(value GistCommit_change_statusable)() + SetCommittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/gist_commit_change_status.go b/pkg/github/models/gist_commit_change_status.go new file mode 100644 index 0000000..356c9de --- /dev/null +++ b/pkg/github/models/gist_commit_change_status.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistCommit_change_status struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The additions property + additions *int32 + // The deletions property + deletions *int32 + // The total property + total *int32 +} +// NewGistCommit_change_status instantiates a new GistCommit_change_status and sets the default values. +func NewGistCommit_change_status()(*GistCommit_change_status) { + m := &GistCommit_change_status{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistCommit_change_statusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistCommit_change_statusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistCommit_change_status(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistCommit_change_status) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdditions gets the additions property value. The additions property +// returns a *int32 when successful +func (m *GistCommit_change_status) GetAdditions()(*int32) { + return m.additions +} +// GetDeletions gets the deletions property value. The deletions property +// returns a *int32 when successful +func (m *GistCommit_change_status) GetDeletions()(*int32) { + return m.deletions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistCommit_change_status) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdditions(val) + } + return nil + } + res["deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeletions(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *GistCommit_change_status) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *GistCommit_change_status) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("additions", m.GetAdditions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deletions", m.GetDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistCommit_change_status) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdditions sets the additions property value. The additions property +func (m *GistCommit_change_status) SetAdditions(value *int32)() { + m.additions = value +} +// SetDeletions sets the deletions property value. The deletions property +func (m *GistCommit_change_status) SetDeletions(value *int32)() { + m.deletions = value +} +// SetTotal sets the total property value. The total property +func (m *GistCommit_change_status) SetTotal(value *int32)() { + m.total = value +} +type GistCommit_change_statusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditions()(*int32) + GetDeletions()(*int32) + GetTotal()(*int32) + SetAdditions(value *int32)() + SetDeletions(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/gist_history.go b/pkg/github/models/gist_history.go new file mode 100644 index 0000000..1c1afaf --- /dev/null +++ b/pkg/github/models/gist_history.go @@ -0,0 +1,198 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GistHistory gist History +type GistHistory struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The change_status property + change_status GistHistory_change_statusable + // The committed_at property + committed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable + // The version property + version *string +} +// NewGistHistory instantiates a new GistHistory and sets the default values. +func NewGistHistory()(*GistHistory) { + m := &GistHistory{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistHistory(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistHistory) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChangeStatus gets the change_status property value. The change_status property +// returns a GistHistory_change_statusable when successful +func (m *GistHistory) GetChangeStatus()(GistHistory_change_statusable) { + return m.change_status +} +// GetCommittedAt gets the committed_at property value. The committed_at property +// returns a *Time when successful +func (m *GistHistory) GetCommittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.committed_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["change_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistHistory_change_statusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChangeStatus(val.(GistHistory_change_statusable)) + } + return nil + } + res["committed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCommittedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GistHistory) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *GistHistory) GetUser()(NullableSimpleUserable) { + return m.user +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *GistHistory) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *GistHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("change_status", m.GetChangeStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("committed_at", m.GetCommittedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *GistHistory) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChangeStatus sets the change_status property value. The change_status property +func (m *GistHistory) SetChangeStatus(value GistHistory_change_statusable)() { + m.change_status = value +} +// SetCommittedAt sets the committed_at property value. The committed_at property +func (m *GistHistory) SetCommittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.committed_at = value +} +// SetUrl sets the url property value. The url property +func (m *GistHistory) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *GistHistory) SetUser(value NullableSimpleUserable)() { + m.user = value +} +// SetVersion sets the version property value. The version property +func (m *GistHistory) SetVersion(value *string)() { + m.version = value +} +type GistHistoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeStatus()(GistHistory_change_statusable) + GetCommittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + GetVersion()(*string) + SetChangeStatus(value GistHistory_change_statusable)() + SetCommittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/gist_history_change_status.go b/pkg/github/models/gist_history_change_status.go new file mode 100644 index 0000000..6217ceb --- /dev/null +++ b/pkg/github/models/gist_history_change_status.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistHistory_change_status struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The additions property + additions *int32 + // The deletions property + deletions *int32 + // The total property + total *int32 +} +// NewGistHistory_change_status instantiates a new GistHistory_change_status and sets the default values. +func NewGistHistory_change_status()(*GistHistory_change_status) { + m := &GistHistory_change_status{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistHistory_change_statusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistHistory_change_statusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistHistory_change_status(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistHistory_change_status) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdditions gets the additions property value. The additions property +// returns a *int32 when successful +func (m *GistHistory_change_status) GetAdditions()(*int32) { + return m.additions +} +// GetDeletions gets the deletions property value. The deletions property +// returns a *int32 when successful +func (m *GistHistory_change_status) GetDeletions()(*int32) { + return m.deletions +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistHistory_change_status) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdditions(val) + } + return nil + } + res["deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeletions(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *GistHistory_change_status) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *GistHistory_change_status) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("additions", m.GetAdditions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deletions", m.GetDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistHistory_change_status) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdditions sets the additions property value. The additions property +func (m *GistHistory_change_status) SetAdditions(value *int32)() { + m.additions = value +} +// SetDeletions sets the deletions property value. The deletions property +func (m *GistHistory_change_status) SetDeletions(value *int32)() { + m.deletions = value +} +// SetTotal sets the total property value. The total property +func (m *GistHistory_change_status) SetTotal(value *int32)() { + m.total = value +} +type GistHistory_change_statusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditions()(*int32) + GetDeletions()(*int32) + GetTotal()(*int32) + SetAdditions(value *int32)() + SetDeletions(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/gist_simple.go b/pkg/github/models/gist_simple.go new file mode 100644 index 0000000..a6d9d04 --- /dev/null +++ b/pkg/github/models/gist_simple.go @@ -0,0 +1,691 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GistSimple gist Simple +type GistSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The created_at property + created_at *string + // The description property + description *string + // The files property + files GistSimple_filesable + // Gist + fork_of GistSimple_fork_ofable + // The forks property + // Deprecated: + forks []GistSimple_forksable + // The forks_url property + forks_url *string + // The git_pull_url property + git_pull_url *string + // The git_push_url property + git_push_url *string + // The history property + // Deprecated: + history []GistHistoryable + // The html_url property + html_url *string + // The id property + id *string + // The node_id property + node_id *string + // A GitHub user. + owner SimpleUserable + // The public property + public *bool + // The truncated property + truncated *bool + // The updated_at property + updated_at *string + // The url property + url *string + // The user property + user *string +} +// NewGistSimple instantiates a new GistSimple and sets the default values. +func NewGistSimple()(*GistSimple) { + m := &GistSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *GistSimple) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *GistSimple) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *GistSimple) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *GistSimple) GetCreatedAt()(*string) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *GistSimple) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistSimple_filesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFiles(val.(GistSimple_filesable)) + } + return nil + } + res["fork_of"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistSimple_fork_ofFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetForkOf(val.(GistSimple_fork_ofable)) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGistSimple_forksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GistSimple_forksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GistSimple_forksable) + } + } + m.SetForks(res) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["git_pull_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitPullUrl(val) + } + return nil + } + res["git_push_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitPushUrl(val) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGistHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GistHistoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GistHistoryable) + } + } + m.SetHistory(res) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublic(val) + } + return nil + } + res["truncated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTruncated(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUser(val) + } + return nil + } + return res +} +// GetFiles gets the files property value. The files property +// returns a GistSimple_filesable when successful +func (m *GistSimple) GetFiles()(GistSimple_filesable) { + return m.files +} +// GetForkOf gets the fork_of property value. Gist +// returns a GistSimple_fork_ofable when successful +func (m *GistSimple) GetForkOf()(GistSimple_fork_ofable) { + return m.fork_of +} +// GetForks gets the forks property value. The forks property +// Deprecated: +// returns a []GistSimple_forksable when successful +func (m *GistSimple) GetForks()([]GistSimple_forksable) { + return m.forks +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *GistSimple) GetForksUrl()(*string) { + return m.forks_url +} +// GetGitPullUrl gets the git_pull_url property value. The git_pull_url property +// returns a *string when successful +func (m *GistSimple) GetGitPullUrl()(*string) { + return m.git_pull_url +} +// GetGitPushUrl gets the git_push_url property value. The git_push_url property +// returns a *string when successful +func (m *GistSimple) GetGitPushUrl()(*string) { + return m.git_push_url +} +// GetHistory gets the history property value. The history property +// Deprecated: +// returns a []GistHistoryable when successful +func (m *GistSimple) GetHistory()([]GistHistoryable) { + return m.history +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *GistSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *GistSimple) GetId()(*string) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *GistSimple) GetNodeId()(*string) { + return m.node_id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *GistSimple) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPublic gets the public property value. The public property +// returns a *bool when successful +func (m *GistSimple) GetPublic()(*bool) { + return m.public +} +// GetTruncated gets the truncated property value. The truncated property +// returns a *bool when successful +func (m *GistSimple) GetTruncated()(*bool) { + return m.truncated +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *GistSimple) GetUpdatedAt()(*string) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GistSimple) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. The user property +// returns a *string when successful +func (m *GistSimple) GetUser()(*string) { + return m.user +} +// Serialize serializes information the current object +func (m *GistSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("files", m.GetFiles()) + if err != nil { + return err + } + } + if m.GetForks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetForks())) + for i, v := range m.GetForks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("forks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("fork_of", m.GetForkOf()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_pull_url", m.GetGitPullUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_push_url", m.GetGitPushUrl()) + if err != nil { + return err + } + } + if m.GetHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistory())) + for i, v := range m.GetHistory() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("history", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public", m.GetPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("truncated", m.GetTruncated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user", m.GetUser()) + 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 *GistSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. The comments property +func (m *GistSimple) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *GistSimple) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *GistSimple) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GistSimple) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *GistSimple) SetDescription(value *string)() { + m.description = value +} +// SetFiles sets the files property value. The files property +func (m *GistSimple) SetFiles(value GistSimple_filesable)() { + m.files = value +} +// SetForkOf sets the fork_of property value. Gist +func (m *GistSimple) SetForkOf(value GistSimple_fork_ofable)() { + m.fork_of = value +} +// SetForks sets the forks property value. The forks property +// Deprecated: +func (m *GistSimple) SetForks(value []GistSimple_forksable)() { + m.forks = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *GistSimple) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetGitPullUrl sets the git_pull_url property value. The git_pull_url property +func (m *GistSimple) SetGitPullUrl(value *string)() { + m.git_pull_url = value +} +// SetGitPushUrl sets the git_push_url property value. The git_push_url property +func (m *GistSimple) SetGitPushUrl(value *string)() { + m.git_push_url = value +} +// SetHistory sets the history property value. The history property +// Deprecated: +func (m *GistSimple) SetHistory(value []GistHistoryable)() { + m.history = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *GistSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *GistSimple) SetId(value *string)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *GistSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *GistSimple) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPublic sets the public property value. The public property +func (m *GistSimple) SetPublic(value *bool)() { + m.public = value +} +// SetTruncated sets the truncated property value. The truncated property +func (m *GistSimple) SetTruncated(value *bool)() { + m.truncated = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *GistSimple) SetUpdatedAt(value *string)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *GistSimple) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. The user property +func (m *GistSimple) SetUser(value *string)() { + m.user = value +} +type GistSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCreatedAt()(*string) + GetDescription()(*string) + GetFiles()(GistSimple_filesable) + GetForkOf()(GistSimple_fork_ofable) + GetForks()([]GistSimple_forksable) + GetForksUrl()(*string) + GetGitPullUrl()(*string) + GetGitPushUrl()(*string) + GetHistory()([]GistHistoryable) + GetHtmlUrl()(*string) + GetId()(*string) + GetNodeId()(*string) + GetOwner()(SimpleUserable) + GetPublic()(*bool) + GetTruncated()(*bool) + GetUpdatedAt()(*string) + GetUrl()(*string) + GetUser()(*string) + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCreatedAt(value *string)() + SetDescription(value *string)() + SetFiles(value GistSimple_filesable)() + SetForkOf(value GistSimple_fork_ofable)() + SetForks(value []GistSimple_forksable)() + SetForksUrl(value *string)() + SetGitPullUrl(value *string)() + SetGitPushUrl(value *string)() + SetHistory(value []GistHistoryable)() + SetHtmlUrl(value *string)() + SetId(value *string)() + SetNodeId(value *string)() + SetOwner(value SimpleUserable)() + SetPublic(value *bool)() + SetTruncated(value *bool)() + SetUpdatedAt(value *string)() + SetUrl(value *string)() + SetUser(value *string)() +} diff --git a/pkg/github/models/gist_simple403_error.go b/pkg/github/models/gist_simple403_error.go new file mode 100644 index 0000000..fa0e175 --- /dev/null +++ b/pkg/github/models/gist_simple403_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistSimple403Error 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 block property + block GistSimple403Error_blockable + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewGistSimple403Error instantiates a new GistSimple403Error and sets the default values. +func NewGistSimple403Error()(*GistSimple403Error) { + m := &GistSimple403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimple403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimple403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *GistSimple403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBlock gets the block property value. The block property +// returns a GistSimple403Error_blockable when successful +func (m *GistSimple403Error) GetBlock()(GistSimple403Error_blockable) { + return m.block +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *GistSimple403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple403Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["block"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistSimple403Error_blockFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBlock(val.(GistSimple403Error_blockable)) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *GistSimple403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *GistSimple403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("block", m.GetBlock()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistSimple403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBlock sets the block property value. The block property +func (m *GistSimple403Error) SetBlock(value GistSimple403Error_blockable)() { + m.block = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *GistSimple403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *GistSimple403Error) SetMessage(value *string)() { + m.message = value +} +type GistSimple403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlock()(GistSimple403Error_blockable) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetBlock(value GistSimple403Error_blockable)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/gist_simple403_error_block.go b/pkg/github/models/gist_simple403_error_block.go new file mode 100644 index 0000000..b5a16f2 --- /dev/null +++ b/pkg/github/models/gist_simple403_error_block.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistSimple403Error_block struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The html_url property + html_url *string + // The reason property + reason *string +} +// NewGistSimple403Error_block instantiates a new GistSimple403Error_block and sets the default values. +func NewGistSimple403Error_block()(*GistSimple403Error_block) { + m := &GistSimple403Error_block{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimple403Error_blockFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimple403Error_blockFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple403Error_block(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple403Error_block) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *GistSimple403Error_block) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple403Error_block) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *GistSimple403Error_block) GetHtmlUrl()(*string) { + return m.html_url +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *GistSimple403Error_block) GetReason()(*string) { + return m.reason +} +// Serialize serializes information the current object +func (m *GistSimple403Error_block) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + 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 *GistSimple403Error_block) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GistSimple403Error_block) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *GistSimple403Error_block) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetReason sets the reason property value. The reason property +func (m *GistSimple403Error_block) SetReason(value *string)() { + m.reason = value +} +type GistSimple403Error_blockable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetHtmlUrl()(*string) + GetReason()(*string) + SetCreatedAt(value *string)() + SetHtmlUrl(value *string)() + SetReason(value *string)() +} diff --git a/pkg/github/models/gist_simple_files.go b/pkg/github/models/gist_simple_files.go new file mode 100644 index 0000000..aff8eb1 --- /dev/null +++ b/pkg/github/models/gist_simple_files.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistSimple_files struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewGistSimple_files instantiates a new GistSimple_files and sets the default values. +func NewGistSimple_files()(*GistSimple_files) { + m := &GistSimple_files{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimple_filesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimple_filesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple_files(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple_files) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple_files) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *GistSimple_files) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistSimple_files) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type GistSimple_filesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/gist_simple_fork_of.go b/pkg/github/models/gist_simple_fork_of.go new file mode 100644 index 0000000..2971159 --- /dev/null +++ b/pkg/github/models/gist_simple_fork_of.go @@ -0,0 +1,633 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GistSimple_fork_of gist +type GistSimple_fork_of struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The files property + files GistSimple_fork_of_filesable + // The forks property + forks i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable + // The forks_url property + forks_url *string + // The git_pull_url property + git_pull_url *string + // The git_push_url property + git_push_url *string + // The history property + history i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable + // The html_url property + html_url *string + // The id property + id *string + // The node_id property + node_id *string + // A GitHub user. + owner NullableSimpleUserable + // The public property + public *bool + // The truncated property + truncated *bool + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewGistSimple_fork_of instantiates a new GistSimple_fork_of and sets the default values. +func NewGistSimple_fork_of()(*GistSimple_fork_of) { + m := &GistSimple_fork_of{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimple_fork_ofFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimple_fork_ofFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple_fork_of(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple_fork_of) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *GistSimple_fork_of) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *GistSimple_fork_of) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *GistSimple_fork_of) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple_fork_of) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGistSimple_fork_of_filesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFiles(val.(GistSimple_fork_of_filesable)) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetForks(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["git_pull_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitPullUrl(val) + } + return nil + } + res["git_push_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitPushUrl(val) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHistory(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublic(val) + } + return nil + } + res["truncated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTruncated(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetFiles gets the files property value. The files property +// returns a GistSimple_fork_of_filesable when successful +func (m *GistSimple_fork_of) GetFiles()(GistSimple_fork_of_filesable) { + return m.files +} +// GetForks gets the forks property value. The forks property +// returns a UntypedNodeable when successful +func (m *GistSimple_fork_of) GetForks()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) { + return m.forks +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetForksUrl()(*string) { + return m.forks_url +} +// GetGitPullUrl gets the git_pull_url property value. The git_pull_url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetGitPullUrl()(*string) { + return m.git_pull_url +} +// GetGitPushUrl gets the git_push_url property value. The git_push_url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetGitPushUrl()(*string) { + return m.git_push_url +} +// GetHistory gets the history property value. The history property +// returns a UntypedNodeable when successful +func (m *GistSimple_fork_of) GetHistory()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) { + return m.history +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *GistSimple_fork_of) GetId()(*string) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *GistSimple_fork_of) GetNodeId()(*string) { + return m.node_id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *GistSimple_fork_of) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetPublic gets the public property value. The public property +// returns a *bool when successful +func (m *GistSimple_fork_of) GetPublic()(*bool) { + return m.public +} +// GetTruncated gets the truncated property value. The truncated property +// returns a *bool when successful +func (m *GistSimple_fork_of) GetTruncated()(*bool) { + return m.truncated +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *GistSimple_fork_of) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GistSimple_fork_of) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *GistSimple_fork_of) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *GistSimple_fork_of) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("files", m.GetFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_pull_url", m.GetGitPullUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_push_url", m.GetGitPushUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("history", m.GetHistory()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public", m.GetPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("truncated", m.GetTruncated()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *GistSimple_fork_of) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. The comments property +func (m *GistSimple_fork_of) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *GistSimple_fork_of) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *GistSimple_fork_of) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GistSimple_fork_of) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *GistSimple_fork_of) SetDescription(value *string)() { + m.description = value +} +// SetFiles sets the files property value. The files property +func (m *GistSimple_fork_of) SetFiles(value GistSimple_fork_of_filesable)() { + m.files = value +} +// SetForks sets the forks property value. The forks property +func (m *GistSimple_fork_of) SetForks(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() { + m.forks = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *GistSimple_fork_of) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetGitPullUrl sets the git_pull_url property value. The git_pull_url property +func (m *GistSimple_fork_of) SetGitPullUrl(value *string)() { + m.git_pull_url = value +} +// SetGitPushUrl sets the git_push_url property value. The git_push_url property +func (m *GistSimple_fork_of) SetGitPushUrl(value *string)() { + m.git_push_url = value +} +// SetHistory sets the history property value. The history property +func (m *GistSimple_fork_of) SetHistory(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() { + m.history = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *GistSimple_fork_of) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *GistSimple_fork_of) SetId(value *string)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *GistSimple_fork_of) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *GistSimple_fork_of) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetPublic sets the public property value. The public property +func (m *GistSimple_fork_of) SetPublic(value *bool)() { + m.public = value +} +// SetTruncated sets the truncated property value. The truncated property +func (m *GistSimple_fork_of) SetTruncated(value *bool)() { + m.truncated = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *GistSimple_fork_of) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *GistSimple_fork_of) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *GistSimple_fork_of) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type GistSimple_fork_ofable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetFiles()(GistSimple_fork_of_filesable) + GetForks()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) + GetForksUrl()(*string) + GetGitPullUrl()(*string) + GetGitPushUrl()(*string) + GetHistory()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) + GetHtmlUrl()(*string) + GetId()(*string) + GetNodeId()(*string) + GetOwner()(NullableSimpleUserable) + GetPublic()(*bool) + GetTruncated()(*bool) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetFiles(value GistSimple_fork_of_filesable)() + SetForks(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() + SetForksUrl(value *string)() + SetGitPullUrl(value *string)() + SetGitPushUrl(value *string)() + SetHistory(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() + SetHtmlUrl(value *string)() + SetId(value *string)() + SetNodeId(value *string)() + SetOwner(value NullableSimpleUserable)() + SetPublic(value *bool)() + SetTruncated(value *bool)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/gist_simple_fork_of_files.go b/pkg/github/models/gist_simple_fork_of_files.go new file mode 100644 index 0000000..9c4e858 --- /dev/null +++ b/pkg/github/models/gist_simple_fork_of_files.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistSimple_fork_of_files struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewGistSimple_fork_of_files instantiates a new GistSimple_fork_of_files and sets the default values. +func NewGistSimple_fork_of_files()(*GistSimple_fork_of_files) { + m := &GistSimple_fork_of_files{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimple_fork_of_filesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimple_fork_of_filesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple_fork_of_files(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple_fork_of_files) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple_fork_of_files) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *GistSimple_fork_of_files) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GistSimple_fork_of_files) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type GistSimple_fork_of_filesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/gist_simple_forks.go b/pkg/github/models/gist_simple_forks.go new file mode 100644 index 0000000..7f07a35 --- /dev/null +++ b/pkg/github/models/gist_simple_forks.go @@ -0,0 +1,197 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GistSimple_forks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // Public User + user PublicUserable +} +// NewGistSimple_forks instantiates a new GistSimple_forks and sets the default values. +func NewGistSimple_forks()(*GistSimple_forks) { + m := &GistSimple_forks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGistSimple_forksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGistSimple_forksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGistSimple_forks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GistSimple_forks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *GistSimple_forks) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GistSimple_forks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(PublicUserable)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *GistSimple_forks) GetId()(*string) { + return m.id +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *GistSimple_forks) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GistSimple_forks) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. Public User +// returns a PublicUserable when successful +func (m *GistSimple_forks) GetUser()(PublicUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *GistSimple_forks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *GistSimple_forks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GistSimple_forks) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *GistSimple_forks) SetId(value *string)() { + m.id = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *GistSimple_forks) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *GistSimple_forks) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. Public User +func (m *GistSimple_forks) SetUser(value PublicUserable)() { + m.user = value +} +type GistSimple_forksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(PublicUserable) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value PublicUserable)() +} diff --git a/pkg/github/models/git_commit.go b/pkg/github/models/git_commit.go new file mode 100644 index 0000000..47e8825 --- /dev/null +++ b/pkg/github/models/git_commit.go @@ -0,0 +1,354 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitCommit low-level Git commit operations within a repository +type GitCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Identifying information for the git-user + author GitCommit_authorable + // Identifying information for the git-user + committer GitCommit_committerable + // The html_url property + html_url *string + // Message describing the purpose of the commit + message *string + // The node_id property + node_id *string + // The parents property + parents []GitCommit_parentsable + // SHA for the commit + sha *string + // The tree property + tree GitCommit_treeable + // The url property + url *string + // The verification property + verification GitCommit_verificationable +} +// NewGitCommit instantiates a new GitCommit and sets the default values. +func NewGitCommit()(*GitCommit) { + m := &GitCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. Identifying information for the git-user +// returns a GitCommit_authorable when successful +func (m *GitCommit) GetAuthor()(GitCommit_authorable) { + return m.author +} +// GetCommitter gets the committer property value. Identifying information for the git-user +// returns a GitCommit_committerable when successful +func (m *GitCommit) GetCommitter()(GitCommit_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitCommit_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(GitCommit_authorable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitCommit_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(GitCommit_committerable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["parents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGitCommit_parentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GitCommit_parentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GitCommit_parentsable) + } + } + m.SetParents(res) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitCommit_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTree(val.(GitCommit_treeable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitCommit_verificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerification(val.(GitCommit_verificationable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *GitCommit) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMessage gets the message property value. Message describing the purpose of the commit +// returns a *string when successful +func (m *GitCommit) GetMessage()(*string) { + return m.message +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *GitCommit) GetNodeId()(*string) { + return m.node_id +} +// GetParents gets the parents property value. The parents property +// returns a []GitCommit_parentsable when successful +func (m *GitCommit) GetParents()([]GitCommit_parentsable) { + return m.parents +} +// GetSha gets the sha property value. SHA for the commit +// returns a *string when successful +func (m *GitCommit) GetSha()(*string) { + return m.sha +} +// GetTree gets the tree property value. The tree property +// returns a GitCommit_treeable when successful +func (m *GitCommit) GetTree()(GitCommit_treeable) { + return m.tree +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitCommit) GetUrl()(*string) { + return m.url +} +// GetVerification gets the verification property value. The verification property +// returns a GitCommit_verificationable when successful +func (m *GitCommit) GetVerification()(GitCommit_verificationable) { + return m.verification +} +// Serialize serializes information the current object +func (m *GitCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetParents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParents())) + for i, v := range m.GetParents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("parents", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tree", m.GetTree()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verification", m.GetVerification()) + 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 *GitCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. Identifying information for the git-user +func (m *GitCommit) SetAuthor(value GitCommit_authorable)() { + m.author = value +} +// SetCommitter sets the committer property value. Identifying information for the git-user +func (m *GitCommit) SetCommitter(value GitCommit_committerable)() { + m.committer = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *GitCommit) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMessage sets the message property value. Message describing the purpose of the commit +func (m *GitCommit) SetMessage(value *string)() { + m.message = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *GitCommit) SetNodeId(value *string)() { + m.node_id = value +} +// SetParents sets the parents property value. The parents property +func (m *GitCommit) SetParents(value []GitCommit_parentsable)() { + m.parents = value +} +// SetSha sets the sha property value. SHA for the commit +func (m *GitCommit) SetSha(value *string)() { + m.sha = value +} +// SetTree sets the tree property value. The tree property +func (m *GitCommit) SetTree(value GitCommit_treeable)() { + m.tree = value +} +// SetUrl sets the url property value. The url property +func (m *GitCommit) SetUrl(value *string)() { + m.url = value +} +// SetVerification sets the verification property value. The verification property +func (m *GitCommit) SetVerification(value GitCommit_verificationable)() { + m.verification = value +} +type GitCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(GitCommit_authorable) + GetCommitter()(GitCommit_committerable) + GetHtmlUrl()(*string) + GetMessage()(*string) + GetNodeId()(*string) + GetParents()([]GitCommit_parentsable) + GetSha()(*string) + GetTree()(GitCommit_treeable) + GetUrl()(*string) + GetVerification()(GitCommit_verificationable) + SetAuthor(value GitCommit_authorable)() + SetCommitter(value GitCommit_committerable)() + SetHtmlUrl(value *string)() + SetMessage(value *string)() + SetNodeId(value *string)() + SetParents(value []GitCommit_parentsable)() + SetSha(value *string)() + SetTree(value GitCommit_treeable)() + SetUrl(value *string)() + SetVerification(value GitCommit_verificationable)() +} diff --git a/pkg/github/models/git_commit_author.go b/pkg/github/models/git_commit_author.go new file mode 100644 index 0000000..c385fac --- /dev/null +++ b/pkg/github/models/git_commit_author.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitCommit_author identifying information for the git-user +type GitCommit_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Timestamp of the commit + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Git email address of the user + email *string + // Name of the git user + name *string +} +// NewGitCommit_author instantiates a new GitCommit_author and sets the default values. +func NewGitCommit_author()(*GitCommit_author) { + m := &GitCommit_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitCommit_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitCommit_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitCommit_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitCommit_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Timestamp of the commit +// returns a *Time when successful +func (m *GitCommit_author) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. Git email address of the user +// returns a *string when successful +func (m *GitCommit_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitCommit_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the git user +// returns a *string when successful +func (m *GitCommit_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *GitCommit_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *GitCommit_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Timestamp of the commit +func (m *GitCommit_author) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. Git email address of the user +func (m *GitCommit_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the git user +func (m *GitCommit_author) SetName(value *string)() { + m.name = value +} +type GitCommit_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/git_commit_committer.go b/pkg/github/models/git_commit_committer.go new file mode 100644 index 0000000..45b9e14 --- /dev/null +++ b/pkg/github/models/git_commit_committer.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitCommit_committer identifying information for the git-user +type GitCommit_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Timestamp of the commit + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Git email address of the user + email *string + // Name of the git user + name *string +} +// NewGitCommit_committer instantiates a new GitCommit_committer and sets the default values. +func NewGitCommit_committer()(*GitCommit_committer) { + m := &GitCommit_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitCommit_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitCommit_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitCommit_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitCommit_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Timestamp of the commit +// returns a *Time when successful +func (m *GitCommit_committer) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. Git email address of the user +// returns a *string when successful +func (m *GitCommit_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitCommit_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the git user +// returns a *string when successful +func (m *GitCommit_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *GitCommit_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *GitCommit_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Timestamp of the commit +func (m *GitCommit_committer) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. Git email address of the user +func (m *GitCommit_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the git user +func (m *GitCommit_committer) SetName(value *string)() { + m.name = value +} +type GitCommit_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/git_commit_parents.go b/pkg/github/models/git_commit_parents.go new file mode 100644 index 0000000..f439f62 --- /dev/null +++ b/pkg/github/models/git_commit_parents.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitCommit_parents struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // SHA for the commit + sha *string + // The url property + url *string +} +// NewGitCommit_parents instantiates a new GitCommit_parents and sets the default values. +func NewGitCommit_parents()(*GitCommit_parents) { + m := &GitCommit_parents{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitCommit_parentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitCommit_parentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitCommit_parents(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitCommit_parents) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitCommit_parents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *GitCommit_parents) GetHtmlUrl()(*string) { + return m.html_url +} +// GetSha gets the sha property value. SHA for the commit +// returns a *string when successful +func (m *GitCommit_parents) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitCommit_parents) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitCommit_parents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GitCommit_parents) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *GitCommit_parents) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetSha sets the sha property value. SHA for the commit +func (m *GitCommit_parents) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *GitCommit_parents) SetUrl(value *string)() { + m.url = value +} +type GitCommit_parentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetSha()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/git_commit_tree.go b/pkg/github/models/git_commit_tree.go new file mode 100644 index 0000000..6c2fb88 --- /dev/null +++ b/pkg/github/models/git_commit_tree.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitCommit_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // SHA for the commit + sha *string + // The url property + url *string +} +// NewGitCommit_tree instantiates a new GitCommit_tree and sets the default values. +func NewGitCommit_tree()(*GitCommit_tree) { + m := &GitCommit_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitCommit_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitCommit_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitCommit_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitCommit_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitCommit_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. SHA for the commit +// returns a *string when successful +func (m *GitCommit_tree) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitCommit_tree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitCommit_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GitCommit_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. SHA for the commit +func (m *GitCommit_tree) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *GitCommit_tree) SetUrl(value *string)() { + m.url = value +} +type GitCommit_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/git_commit_verification.go b/pkg/github/models/git_commit_verification.go new file mode 100644 index 0000000..aa55574 --- /dev/null +++ b/pkg/github/models/git_commit_verification.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitCommit_verification struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The payload property + payload *string + // The reason property + reason *string + // The signature property + signature *string + // The verified property + verified *bool +} +// NewGitCommit_verification instantiates a new GitCommit_verification and sets the default values. +func NewGitCommit_verification()(*GitCommit_verification) { + m := &GitCommit_verification{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitCommit_verificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitCommit_verificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitCommit_verification(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitCommit_verification) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitCommit_verification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["signature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignature(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *GitCommit_verification) GetPayload()(*string) { + return m.payload +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *GitCommit_verification) GetReason()(*string) { + return m.reason +} +// GetSignature gets the signature property value. The signature property +// returns a *string when successful +func (m *GitCommit_verification) GetSignature()(*string) { + return m.signature +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *GitCommit_verification) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *GitCommit_verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signature", m.GetSignature()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *GitCommit_verification) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPayload sets the payload property value. The payload property +func (m *GitCommit_verification) SetPayload(value *string)() { + m.payload = value +} +// SetReason sets the reason property value. The reason property +func (m *GitCommit_verification) SetReason(value *string)() { + m.reason = value +} +// SetSignature sets the signature property value. The signature property +func (m *GitCommit_verification) SetSignature(value *string)() { + m.signature = value +} +// SetVerified sets the verified property value. The verified property +func (m *GitCommit_verification) SetVerified(value *bool)() { + m.verified = value +} +type GitCommit_verificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()(*string) + GetReason()(*string) + GetSignature()(*string) + GetVerified()(*bool) + SetPayload(value *string)() + SetReason(value *string)() + SetSignature(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/git_ref.go b/pkg/github/models/git_ref.go new file mode 100644 index 0000000..c99f171 --- /dev/null +++ b/pkg/github/models/git_ref.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitRef git references within a repository +type GitRef struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The node_id property + node_id *string + // The object property + object GitRef_objectable + // The ref property + ref *string + // The url property + url *string +} +// NewGitRef instantiates a new GitRef and sets the default values. +func NewGitRef()(*GitRef) { + m := &GitRef{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitRefFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitRefFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitRef(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitRef) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitRef) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["object"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitRef_objectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetObject(val.(GitRef_objectable)) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *GitRef) GetNodeId()(*string) { + return m.node_id +} +// GetObject gets the object property value. The object property +// returns a GitRef_objectable when successful +func (m *GitRef) GetObject()(GitRef_objectable) { + return m.object +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *GitRef) GetRef()(*string) { + return m.ref +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitRef) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitRef) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("object", m.GetObject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GitRef) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *GitRef) SetNodeId(value *string)() { + m.node_id = value +} +// SetObject sets the object property value. The object property +func (m *GitRef) SetObject(value GitRef_objectable)() { + m.object = value +} +// SetRef sets the ref property value. The ref property +func (m *GitRef) SetRef(value *string)() { + m.ref = value +} +// SetUrl sets the url property value. The url property +func (m *GitRef) SetUrl(value *string)() { + m.url = value +} +type GitRefable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNodeId()(*string) + GetObject()(GitRef_objectable) + GetRef()(*string) + GetUrl()(*string) + SetNodeId(value *string)() + SetObject(value GitRef_objectable)() + SetRef(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/git_ref_object.go b/pkg/github/models/git_ref_object.go new file mode 100644 index 0000000..594d4e8 --- /dev/null +++ b/pkg/github/models/git_ref_object.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitRef_object struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // SHA for the reference + sha *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewGitRef_object instantiates a new GitRef_object and sets the default values. +func NewGitRef_object()(*GitRef_object) { + m := &GitRef_object{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitRef_objectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitRef_objectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitRef_object(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitRef_object) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitRef_object) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. SHA for the reference +// returns a *string when successful +func (m *GitRef_object) GetSha()(*string) { + return m.sha +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *GitRef_object) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitRef_object) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitRef_object) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *GitRef_object) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. SHA for the reference +func (m *GitRef_object) SetSha(value *string)() { + m.sha = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *GitRef_object) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *GitRef_object) SetUrl(value *string)() { + m.url = value +} +type GitRef_objectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/git_tag.go b/pkg/github/models/git_tag.go new file mode 100644 index 0000000..1a3d31c --- /dev/null +++ b/pkg/github/models/git_tag.go @@ -0,0 +1,284 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitTag metadata for a Git tag +type GitTag struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Message describing the purpose of the tag + message *string + // The node_id property + node_id *string + // The object property + object GitTag_objectable + // The sha property + sha *string + // Name of the tag + tag *string + // The tagger property + tagger GitTag_taggerable + // URL for the tag + url *string + // The verification property + verification Verificationable +} +// NewGitTag instantiates a new GitTag and sets the default values. +func NewGitTag()(*GitTag) { + m := &GitTag{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitTag(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitTag) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitTag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["object"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitTag_objectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetObject(val.(GitTag_objectable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["tag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTag(val) + } + return nil + } + res["tagger"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGitTag_taggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTagger(val.(GitTag_taggerable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerification(val.(Verificationable)) + } + return nil + } + return res +} +// GetMessage gets the message property value. Message describing the purpose of the tag +// returns a *string when successful +func (m *GitTag) GetMessage()(*string) { + return m.message +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *GitTag) GetNodeId()(*string) { + return m.node_id +} +// GetObject gets the object property value. The object property +// returns a GitTag_objectable when successful +func (m *GitTag) GetObject()(GitTag_objectable) { + return m.object +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *GitTag) GetSha()(*string) { + return m.sha +} +// GetTag gets the tag property value. Name of the tag +// returns a *string when successful +func (m *GitTag) GetTag()(*string) { + return m.tag +} +// GetTagger gets the tagger property value. The tagger property +// returns a GitTag_taggerable when successful +func (m *GitTag) GetTagger()(GitTag_taggerable) { + return m.tagger +} +// GetUrl gets the url property value. URL for the tag +// returns a *string when successful +func (m *GitTag) GetUrl()(*string) { + return m.url +} +// GetVerification gets the verification property value. The verification property +// returns a Verificationable when successful +func (m *GitTag) GetVerification()(Verificationable) { + return m.verification +} +// Serialize serializes information the current object +func (m *GitTag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("object", m.GetObject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tag", m.GetTag()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tagger", m.GetTagger()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verification", m.GetVerification()) + 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 *GitTag) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. Message describing the purpose of the tag +func (m *GitTag) SetMessage(value *string)() { + m.message = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *GitTag) SetNodeId(value *string)() { + m.node_id = value +} +// SetObject sets the object property value. The object property +func (m *GitTag) SetObject(value GitTag_objectable)() { + m.object = value +} +// SetSha sets the sha property value. The sha property +func (m *GitTag) SetSha(value *string)() { + m.sha = value +} +// SetTag sets the tag property value. Name of the tag +func (m *GitTag) SetTag(value *string)() { + m.tag = value +} +// SetTagger sets the tagger property value. The tagger property +func (m *GitTag) SetTagger(value GitTag_taggerable)() { + m.tagger = value +} +// SetUrl sets the url property value. URL for the tag +func (m *GitTag) SetUrl(value *string)() { + m.url = value +} +// SetVerification sets the verification property value. The verification property +func (m *GitTag) SetVerification(value Verificationable)() { + m.verification = value +} +type GitTagable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetNodeId()(*string) + GetObject()(GitTag_objectable) + GetSha()(*string) + GetTag()(*string) + GetTagger()(GitTag_taggerable) + GetUrl()(*string) + GetVerification()(Verificationable) + SetMessage(value *string)() + SetNodeId(value *string)() + SetObject(value GitTag_objectable)() + SetSha(value *string)() + SetTag(value *string)() + SetTagger(value GitTag_taggerable)() + SetUrl(value *string)() + SetVerification(value Verificationable)() +} diff --git a/pkg/github/models/git_tag_object.go b/pkg/github/models/git_tag_object.go new file mode 100644 index 0000000..dd8dff4 --- /dev/null +++ b/pkg/github/models/git_tag_object.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitTag_object struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewGitTag_object instantiates a new GitTag_object and sets the default values. +func NewGitTag_object()(*GitTag_object) { + m := &GitTag_object{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitTag_objectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitTag_objectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitTag_object(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitTag_object) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitTag_object) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *GitTag_object) GetSha()(*string) { + return m.sha +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *GitTag_object) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitTag_object) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitTag_object) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *GitTag_object) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *GitTag_object) SetSha(value *string)() { + m.sha = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *GitTag_object) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *GitTag_object) SetUrl(value *string)() { + m.url = value +} +type GitTag_objectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/git_tag_tagger.go b/pkg/github/models/git_tag_tagger.go new file mode 100644 index 0000000..b4f8c32 --- /dev/null +++ b/pkg/github/models/git_tag_tagger.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitTag_tagger struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The email property + email *string + // The name property + name *string +} +// NewGitTag_tagger instantiates a new GitTag_tagger and sets the default values. +func NewGitTag_tagger()(*GitTag_tagger) { + m := &GitTag_tagger{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitTag_taggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitTag_taggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitTag_tagger(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitTag_tagger) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *GitTag_tagger) GetDate()(*string) { + return m.date +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *GitTag_tagger) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitTag_tagger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *GitTag_tagger) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *GitTag_tagger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *GitTag_tagger) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *GitTag_tagger) SetDate(value *string)() { + m.date = value +} +// SetEmail sets the email property value. The email property +func (m *GitTag_tagger) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name property +func (m *GitTag_tagger) SetName(value *string)() { + m.name = value +} +type GitTag_taggerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetEmail()(*string) + GetName()(*string) + SetDate(value *string)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/git_tree.go b/pkg/github/models/git_tree.go new file mode 100644 index 0000000..6bc98bf --- /dev/null +++ b/pkg/github/models/git_tree.go @@ -0,0 +1,180 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitTree the hierarchy between files in a Git repository. +type GitTree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // Objects specifying a tree structure + tree []GitTree_treeable + // The truncated property + truncated *bool + // The url property + url *string +} +// NewGitTree instantiates a new GitTree and sets the default values. +func NewGitTree()(*GitTree) { + m := &GitTree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitTreeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitTreeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitTree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitTree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitTree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGitTree_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GitTree_treeable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GitTree_treeable) + } + } + m.SetTree(res) + } + return nil + } + res["truncated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTruncated(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *GitTree) GetSha()(*string) { + return m.sha +} +// GetTree gets the tree property value. Objects specifying a tree structure +// returns a []GitTree_treeable when successful +func (m *GitTree) GetTree()([]GitTree_treeable) { + return m.tree +} +// GetTruncated gets the truncated property value. The truncated property +// returns a *bool when successful +func (m *GitTree) GetTruncated()(*bool) { + return m.truncated +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitTree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitTree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + if m.GetTree() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTree())) + for i, v := range m.GetTree() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("tree", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("truncated", m.GetTruncated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GitTree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *GitTree) SetSha(value *string)() { + m.sha = value +} +// SetTree sets the tree property value. Objects specifying a tree structure +func (m *GitTree) SetTree(value []GitTree_treeable)() { + m.tree = value +} +// SetTruncated sets the truncated property value. The truncated property +func (m *GitTree) SetTruncated(value *bool)() { + m.truncated = value +} +// SetUrl sets the url property value. The url property +func (m *GitTree) SetUrl(value *string)() { + m.url = value +} +type GitTreeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetTree()([]GitTree_treeable) + GetTruncated()(*bool) + GetUrl()(*string) + SetSha(value *string)() + SetTree(value []GitTree_treeable)() + SetTruncated(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/git_tree_tree.go b/pkg/github/models/git_tree_tree.go new file mode 100644 index 0000000..de2ab5c --- /dev/null +++ b/pkg/github/models/git_tree_tree.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GitTree_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The mode property + mode *string + // The path property + path *string + // The sha property + sha *string + // The size property + size *int32 + // The type property + typeEscaped *string + // The url property + url *string +} +// NewGitTree_tree instantiates a new GitTree_tree and sets the default values. +func NewGitTree_tree()(*GitTree_tree) { + m := &GitTree_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitTree_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitTree_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitTree_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitTree_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitTree_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMode(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetMode gets the mode property value. The mode property +// returns a *string when successful +func (m *GitTree_tree) GetMode()(*string) { + return m.mode +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *GitTree_tree) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *GitTree_tree) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *GitTree_tree) GetSize()(*int32) { + return m.size +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *GitTree_tree) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *GitTree_tree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *GitTree_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("mode", m.GetMode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *GitTree_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMode sets the mode property value. The mode property +func (m *GitTree_tree) SetMode(value *string)() { + m.mode = value +} +// SetPath sets the path property value. The path property +func (m *GitTree_tree) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The sha property +func (m *GitTree_tree) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *GitTree_tree) SetSize(value *int32)() { + m.size = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *GitTree_tree) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *GitTree_tree) SetUrl(value *string)() { + m.url = value +} +type GitTree_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMode()(*string) + GetPath()(*string) + GetSha()(*string) + GetSize()(*int32) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetMode(value *string)() + SetPath(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/gitignore_template.go b/pkg/github/models/gitignore_template.go new file mode 100644 index 0000000..0ddd602 --- /dev/null +++ b/pkg/github/models/gitignore_template.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GitignoreTemplate gitignore Template +type GitignoreTemplate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name property + name *string + // The source property + source *string +} +// NewGitignoreTemplate instantiates a new GitignoreTemplate and sets the default values. +func NewGitignoreTemplate()(*GitignoreTemplate) { + m := &GitignoreTemplate{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGitignoreTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGitignoreTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGitignoreTemplate(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GitignoreTemplate) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GitignoreTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *GitignoreTemplate) GetName()(*string) { + return m.name +} +// GetSource gets the source property value. The source property +// returns a *string when successful +func (m *GitignoreTemplate) GetSource()(*string) { + return m.source +} +// Serialize serializes information the current object +func (m *GitignoreTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source", m.GetSource()) + 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 *GitignoreTemplate) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name property +func (m *GitignoreTemplate) SetName(value *string)() { + m.name = value +} +// SetSource sets the source property value. The source property +func (m *GitignoreTemplate) SetSource(value *string)() { + m.source = value +} +type GitignoreTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetSource()(*string) + SetName(value *string)() + SetSource(value *string)() +} diff --git a/pkg/github/models/global_advisory.go b/pkg/github/models/global_advisory.go new file mode 100644 index 0000000..931d0b4 --- /dev/null +++ b/pkg/github/models/global_advisory.go @@ -0,0 +1,608 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GlobalAdvisory a GitHub Security Advisory. +type GlobalAdvisory struct { + // The users who contributed to the advisory. + credits []GlobalAdvisory_creditsable + // The Common Vulnerabilities and Exposures (CVE) ID. + cve_id *string + // The cvss property + cvss GlobalAdvisory_cvssable + // The cwes property + cwes []GlobalAdvisory_cwesable + // A detailed description of what the advisory entails. + description *string + // The GitHub Security Advisory ID. + ghsa_id *string + // The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format. + github_reviewed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The URL for the advisory. + html_url *string + // The identifiers property + identifiers []GlobalAdvisory_identifiersable + // The date and time when the advisory was published in the National Vulnerability Database, in ISO 8601 format.This field is only populated when the advisory is imported from the National Vulnerability Database. + nvd_published_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time of when the advisory was published, in ISO 8601 format. + published_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The references property + references []string + // The API URL for the repository advisory. + repository_advisory_url *string + // The severity of the advisory. + severity *GlobalAdvisory_severity + // The URL of the advisory's source code. + source_code_location *string + // A short summary of the advisory. + summary *string + // The type of advisory. + typeEscaped *GlobalAdvisory_type + // The date and time of when the advisory was last updated, in ISO 8601 format. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The API URL for the advisory. + url *string + // The products and respective version ranges affected by the advisory. + vulnerabilities []Vulnerabilityable + // The date and time of when the advisory was withdrawn, in ISO 8601 format. + withdrawn_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewGlobalAdvisory instantiates a new GlobalAdvisory and sets the default values. +func NewGlobalAdvisory()(*GlobalAdvisory) { + m := &GlobalAdvisory{ + } + return m +} +// CreateGlobalAdvisoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGlobalAdvisoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGlobalAdvisory(), nil +} +// GetCredits gets the credits property value. The users who contributed to the advisory. +// returns a []GlobalAdvisory_creditsable when successful +func (m *GlobalAdvisory) GetCredits()([]GlobalAdvisory_creditsable) { + return m.credits +} +// GetCveId gets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +// returns a *string when successful +func (m *GlobalAdvisory) GetCveId()(*string) { + return m.cve_id +} +// GetCvss gets the cvss property value. The cvss property +// returns a GlobalAdvisory_cvssable when successful +func (m *GlobalAdvisory) GetCvss()(GlobalAdvisory_cvssable) { + return m.cvss +} +// GetCwes gets the cwes property value. The cwes property +// returns a []GlobalAdvisory_cwesable when successful +func (m *GlobalAdvisory) GetCwes()([]GlobalAdvisory_cwesable) { + return m.cwes +} +// GetDescription gets the description property value. A detailed description of what the advisory entails. +// returns a *string when successful +func (m *GlobalAdvisory) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GlobalAdvisory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["credits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGlobalAdvisory_creditsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GlobalAdvisory_creditsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GlobalAdvisory_creditsable) + } + } + m.SetCredits(res) + } + return nil + } + res["cve_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCveId(val) + } + return nil + } + res["cvss"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGlobalAdvisory_cvssFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCvss(val.(GlobalAdvisory_cvssable)) + } + return nil + } + res["cwes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGlobalAdvisory_cwesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GlobalAdvisory_cwesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GlobalAdvisory_cwesable) + } + } + m.SetCwes(res) + } + 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["ghsa_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGhsaId(val) + } + return nil + } + res["github_reviewed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubReviewedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["identifiers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGlobalAdvisory_identifiersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GlobalAdvisory_identifiersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GlobalAdvisory_identifiersable) + } + } + m.SetIdentifiers(res) + } + return nil + } + res["nvd_published_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetNvdPublishedAt(val) + } + return nil + } + res["published_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedAt(val) + } + return nil + } + res["references"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetReferences(res) + } + return nil + } + res["repository_advisory_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryAdvisoryUrl(val) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGlobalAdvisory_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*GlobalAdvisory_severity)) + } + return nil + } + res["source_code_location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceCodeLocation(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGlobalAdvisory_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*GlobalAdvisory_type)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVulnerabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Vulnerabilityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Vulnerabilityable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + res["withdrawn_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWithdrawnAt(val) + } + return nil + } + return res +} +// GetGhsaId gets the ghsa_id property value. The GitHub Security Advisory ID. +// returns a *string when successful +func (m *GlobalAdvisory) GetGhsaId()(*string) { + return m.ghsa_id +} +// GetGithubReviewedAt gets the github_reviewed_at property value. The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format. +// returns a *Time when successful +func (m *GlobalAdvisory) GetGithubReviewedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.github_reviewed_at +} +// GetHtmlUrl gets the html_url property value. The URL for the advisory. +// returns a *string when successful +func (m *GlobalAdvisory) GetHtmlUrl()(*string) { + return m.html_url +} +// GetIdentifiers gets the identifiers property value. The identifiers property +// returns a []GlobalAdvisory_identifiersable when successful +func (m *GlobalAdvisory) GetIdentifiers()([]GlobalAdvisory_identifiersable) { + return m.identifiers +} +// GetNvdPublishedAt gets the nvd_published_at property value. The date and time when the advisory was published in the National Vulnerability Database, in ISO 8601 format.This field is only populated when the advisory is imported from the National Vulnerability Database. +// returns a *Time when successful +func (m *GlobalAdvisory) GetNvdPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.nvd_published_at +} +// GetPublishedAt gets the published_at property value. The date and time of when the advisory was published, in ISO 8601 format. +// returns a *Time when successful +func (m *GlobalAdvisory) GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.published_at +} +// GetReferences gets the references property value. The references property +// returns a []string when successful +func (m *GlobalAdvisory) GetReferences()([]string) { + return m.references +} +// GetRepositoryAdvisoryUrl gets the repository_advisory_url property value. The API URL for the repository advisory. +// returns a *string when successful +func (m *GlobalAdvisory) GetRepositoryAdvisoryUrl()(*string) { + return m.repository_advisory_url +} +// GetSeverity gets the severity property value. The severity of the advisory. +// returns a *GlobalAdvisory_severity when successful +func (m *GlobalAdvisory) GetSeverity()(*GlobalAdvisory_severity) { + return m.severity +} +// GetSourceCodeLocation gets the source_code_location property value. The URL of the advisory's source code. +// returns a *string when successful +func (m *GlobalAdvisory) GetSourceCodeLocation()(*string) { + return m.source_code_location +} +// GetSummary gets the summary property value. A short summary of the advisory. +// returns a *string when successful +func (m *GlobalAdvisory) GetSummary()(*string) { + return m.summary +} +// GetTypeEscaped gets the type property value. The type of advisory. +// returns a *GlobalAdvisory_type when successful +func (m *GlobalAdvisory) GetTypeEscaped()(*GlobalAdvisory_type) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The date and time of when the advisory was last updated, in ISO 8601 format. +// returns a *Time when successful +func (m *GlobalAdvisory) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The API URL for the advisory. +// returns a *string when successful +func (m *GlobalAdvisory) GetUrl()(*string) { + return m.url +} +// GetVulnerabilities gets the vulnerabilities property value. The products and respective version ranges affected by the advisory. +// returns a []Vulnerabilityable when successful +func (m *GlobalAdvisory) GetVulnerabilities()([]Vulnerabilityable) { + return m.vulnerabilities +} +// GetWithdrawnAt gets the withdrawn_at property value. The date and time of when the advisory was withdrawn, in ISO 8601 format. +// returns a *Time when successful +func (m *GlobalAdvisory) GetWithdrawnAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.withdrawn_at +} +// Serialize serializes information the current object +func (m *GlobalAdvisory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("cvss", m.GetCvss()) + if err != nil { + return err + } + } + if m.GetCwes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCwes())) + for i, v := range m.GetCwes() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("cwes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetReferences() != nil { + err := writer.WriteCollectionOfStringValues("references", m.GetReferences()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source_code_location", m.GetSourceCodeLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetVulnerabilities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilities())) + for i, v := range m.GetVulnerabilities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("vulnerabilities", cast) + if err != nil { + return err + } + } + return nil +} +// SetCredits sets the credits property value. The users who contributed to the advisory. +func (m *GlobalAdvisory) SetCredits(value []GlobalAdvisory_creditsable)() { + m.credits = value +} +// SetCveId sets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +func (m *GlobalAdvisory) SetCveId(value *string)() { + m.cve_id = value +} +// SetCvss sets the cvss property value. The cvss property +func (m *GlobalAdvisory) SetCvss(value GlobalAdvisory_cvssable)() { + m.cvss = value +} +// SetCwes sets the cwes property value. The cwes property +func (m *GlobalAdvisory) SetCwes(value []GlobalAdvisory_cwesable)() { + m.cwes = value +} +// SetDescription sets the description property value. A detailed description of what the advisory entails. +func (m *GlobalAdvisory) SetDescription(value *string)() { + m.description = value +} +// SetGhsaId sets the ghsa_id property value. The GitHub Security Advisory ID. +func (m *GlobalAdvisory) SetGhsaId(value *string)() { + m.ghsa_id = value +} +// SetGithubReviewedAt sets the github_reviewed_at property value. The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format. +func (m *GlobalAdvisory) SetGithubReviewedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.github_reviewed_at = value +} +// SetHtmlUrl sets the html_url property value. The URL for the advisory. +func (m *GlobalAdvisory) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetIdentifiers sets the identifiers property value. The identifiers property +func (m *GlobalAdvisory) SetIdentifiers(value []GlobalAdvisory_identifiersable)() { + m.identifiers = value +} +// SetNvdPublishedAt sets the nvd_published_at property value. The date and time when the advisory was published in the National Vulnerability Database, in ISO 8601 format.This field is only populated when the advisory is imported from the National Vulnerability Database. +func (m *GlobalAdvisory) SetNvdPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.nvd_published_at = value +} +// SetPublishedAt sets the published_at property value. The date and time of when the advisory was published, in ISO 8601 format. +func (m *GlobalAdvisory) SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.published_at = value +} +// SetReferences sets the references property value. The references property +func (m *GlobalAdvisory) SetReferences(value []string)() { + m.references = value +} +// SetRepositoryAdvisoryUrl sets the repository_advisory_url property value. The API URL for the repository advisory. +func (m *GlobalAdvisory) SetRepositoryAdvisoryUrl(value *string)() { + m.repository_advisory_url = value +} +// SetSeverity sets the severity property value. The severity of the advisory. +func (m *GlobalAdvisory) SetSeverity(value *GlobalAdvisory_severity)() { + m.severity = value +} +// SetSourceCodeLocation sets the source_code_location property value. The URL of the advisory's source code. +func (m *GlobalAdvisory) SetSourceCodeLocation(value *string)() { + m.source_code_location = value +} +// SetSummary sets the summary property value. A short summary of the advisory. +func (m *GlobalAdvisory) SetSummary(value *string)() { + m.summary = value +} +// SetTypeEscaped sets the type property value. The type of advisory. +func (m *GlobalAdvisory) SetTypeEscaped(value *GlobalAdvisory_type)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The date and time of when the advisory was last updated, in ISO 8601 format. +func (m *GlobalAdvisory) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The API URL for the advisory. +func (m *GlobalAdvisory) SetUrl(value *string)() { + m.url = value +} +// SetVulnerabilities sets the vulnerabilities property value. The products and respective version ranges affected by the advisory. +func (m *GlobalAdvisory) SetVulnerabilities(value []Vulnerabilityable)() { + m.vulnerabilities = value +} +// SetWithdrawnAt sets the withdrawn_at property value. The date and time of when the advisory was withdrawn, in ISO 8601 format. +func (m *GlobalAdvisory) SetWithdrawnAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.withdrawn_at = value +} +type GlobalAdvisoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCredits()([]GlobalAdvisory_creditsable) + GetCveId()(*string) + GetCvss()(GlobalAdvisory_cvssable) + GetCwes()([]GlobalAdvisory_cwesable) + GetDescription()(*string) + GetGhsaId()(*string) + GetGithubReviewedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetIdentifiers()([]GlobalAdvisory_identifiersable) + GetNvdPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReferences()([]string) + GetRepositoryAdvisoryUrl()(*string) + GetSeverity()(*GlobalAdvisory_severity) + GetSourceCodeLocation()(*string) + GetSummary()(*string) + GetTypeEscaped()(*GlobalAdvisory_type) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVulnerabilities()([]Vulnerabilityable) + GetWithdrawnAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCredits(value []GlobalAdvisory_creditsable)() + SetCveId(value *string)() + SetCvss(value GlobalAdvisory_cvssable)() + SetCwes(value []GlobalAdvisory_cwesable)() + SetDescription(value *string)() + SetGhsaId(value *string)() + SetGithubReviewedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetIdentifiers(value []GlobalAdvisory_identifiersable)() + SetNvdPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReferences(value []string)() + SetRepositoryAdvisoryUrl(value *string)() + SetSeverity(value *GlobalAdvisory_severity)() + SetSourceCodeLocation(value *string)() + SetSummary(value *string)() + SetTypeEscaped(value *GlobalAdvisory_type)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVulnerabilities(value []Vulnerabilityable)() + SetWithdrawnAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/global_advisory_credits.go b/pkg/github/models/global_advisory_credits.go new file mode 100644 index 0000000..43eb168 --- /dev/null +++ b/pkg/github/models/global_advisory_credits.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GlobalAdvisory_credits struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type of credit the user is receiving. + typeEscaped *SecurityAdvisoryCreditTypes + // A GitHub user. + user SimpleUserable +} +// NewGlobalAdvisory_credits instantiates a new GlobalAdvisory_credits and sets the default values. +func NewGlobalAdvisory_credits()(*GlobalAdvisory_credits) { + m := &GlobalAdvisory_credits{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGlobalAdvisory_creditsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGlobalAdvisory_creditsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGlobalAdvisory_credits(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GlobalAdvisory_credits) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GlobalAdvisory_credits) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryCreditTypes) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SecurityAdvisoryCreditTypes)) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type of credit the user is receiving. +// returns a *SecurityAdvisoryCreditTypes when successful +func (m *GlobalAdvisory_credits) GetTypeEscaped()(*SecurityAdvisoryCreditTypes) { + return m.typeEscaped +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *GlobalAdvisory_credits) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *GlobalAdvisory_credits) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *GlobalAdvisory_credits) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type of credit the user is receiving. +func (m *GlobalAdvisory_credits) SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() { + m.typeEscaped = value +} +// SetUser sets the user property value. A GitHub user. +func (m *GlobalAdvisory_credits) SetUser(value SimpleUserable)() { + m.user = value +} +type GlobalAdvisory_creditsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*SecurityAdvisoryCreditTypes) + GetUser()(SimpleUserable) + SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/global_advisory_cvss.go b/pkg/github/models/global_advisory_cvss.go new file mode 100644 index 0000000..f3d2576 --- /dev/null +++ b/pkg/github/models/global_advisory_cvss.go @@ -0,0 +1,103 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GlobalAdvisory_cvss struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The CVSS score. + score *float64 + // The CVSS vector. + vector_string *string +} +// NewGlobalAdvisory_cvss instantiates a new GlobalAdvisory_cvss and sets the default values. +func NewGlobalAdvisory_cvss()(*GlobalAdvisory_cvss) { + m := &GlobalAdvisory_cvss{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGlobalAdvisory_cvssFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGlobalAdvisory_cvssFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGlobalAdvisory_cvss(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GlobalAdvisory_cvss) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GlobalAdvisory_cvss) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["vector_string"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVectorString(val) + } + return nil + } + return res +} +// GetScore gets the score property value. The CVSS score. +// returns a *float64 when successful +func (m *GlobalAdvisory_cvss) GetScore()(*float64) { + return m.score +} +// GetVectorString gets the vector_string property value. The CVSS vector. +// returns a *string when successful +func (m *GlobalAdvisory_cvss) GetVectorString()(*string) { + return m.vector_string +} +// Serialize serializes information the current object +func (m *GlobalAdvisory_cvss) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("vector_string", m.GetVectorString()) + 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 *GlobalAdvisory_cvss) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetScore sets the score property value. The CVSS score. +func (m *GlobalAdvisory_cvss) SetScore(value *float64)() { + m.score = value +} +// SetVectorString sets the vector_string property value. The CVSS vector. +func (m *GlobalAdvisory_cvss) SetVectorString(value *string)() { + m.vector_string = value +} +type GlobalAdvisory_cvssable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetScore()(*float64) + GetVectorString()(*string) + SetScore(value *float64)() + SetVectorString(value *string)() +} diff --git a/pkg/github/models/global_advisory_cwes.go b/pkg/github/models/global_advisory_cwes.go new file mode 100644 index 0000000..e041244 --- /dev/null +++ b/pkg/github/models/global_advisory_cwes.go @@ -0,0 +1,103 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GlobalAdvisory_cwes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The Common Weakness Enumeration (CWE) identifier. + cwe_id *string + // The name of the CWE. + name *string +} +// NewGlobalAdvisory_cwes instantiates a new GlobalAdvisory_cwes and sets the default values. +func NewGlobalAdvisory_cwes()(*GlobalAdvisory_cwes) { + m := &GlobalAdvisory_cwes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGlobalAdvisory_cwesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGlobalAdvisory_cwesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGlobalAdvisory_cwes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GlobalAdvisory_cwes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCweId gets the cwe_id property value. The Common Weakness Enumeration (CWE) identifier. +// returns a *string when successful +func (m *GlobalAdvisory_cwes) GetCweId()(*string) { + return m.cwe_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GlobalAdvisory_cwes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cwe_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCweId(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 + } + return res +} +// GetName gets the name property value. The name of the CWE. +// returns a *string when successful +func (m *GlobalAdvisory_cwes) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *GlobalAdvisory_cwes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cwe_id", m.GetCweId()) + 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 *GlobalAdvisory_cwes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCweId sets the cwe_id property value. The Common Weakness Enumeration (CWE) identifier. +func (m *GlobalAdvisory_cwes) SetCweId(value *string)() { + m.cwe_id = value +} +// SetName sets the name property value. The name of the CWE. +func (m *GlobalAdvisory_cwes) SetName(value *string)() { + m.name = value +} +type GlobalAdvisory_cwesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCweId()(*string) + GetName()(*string) + SetCweId(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/global_advisory_identifiers.go b/pkg/github/models/global_advisory_identifiers.go new file mode 100644 index 0000000..51e94cf --- /dev/null +++ b/pkg/github/models/global_advisory_identifiers.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GlobalAdvisory_identifiers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type of identifier. + typeEscaped *GlobalAdvisory_identifiers_type + // The identifier value. + value *string +} +// NewGlobalAdvisory_identifiers instantiates a new GlobalAdvisory_identifiers and sets the default values. +func NewGlobalAdvisory_identifiers()(*GlobalAdvisory_identifiers) { + m := &GlobalAdvisory_identifiers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGlobalAdvisory_identifiersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGlobalAdvisory_identifiersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGlobalAdvisory_identifiers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GlobalAdvisory_identifiers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GlobalAdvisory_identifiers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGlobalAdvisory_identifiers_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*GlobalAdvisory_identifiers_type)) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type of identifier. +// returns a *GlobalAdvisory_identifiers_type when successful +func (m *GlobalAdvisory_identifiers) GetTypeEscaped()(*GlobalAdvisory_identifiers_type) { + return m.typeEscaped +} +// GetValue gets the value property value. The identifier value. +// returns a *string when successful +func (m *GlobalAdvisory_identifiers) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *GlobalAdvisory_identifiers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *GlobalAdvisory_identifiers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type of identifier. +func (m *GlobalAdvisory_identifiers) SetTypeEscaped(value *GlobalAdvisory_identifiers_type)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The identifier value. +func (m *GlobalAdvisory_identifiers) SetValue(value *string)() { + m.value = value +} +type GlobalAdvisory_identifiersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*GlobalAdvisory_identifiers_type) + GetValue()(*string) + SetTypeEscaped(value *GlobalAdvisory_identifiers_type)() + SetValue(value *string)() +} diff --git a/pkg/github/models/global_advisory_identifiers_type.go b/pkg/github/models/global_advisory_identifiers_type.go new file mode 100644 index 0000000..6bb3338 --- /dev/null +++ b/pkg/github/models/global_advisory_identifiers_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of identifier. +type GlobalAdvisory_identifiers_type int + +const ( + CVE_GLOBALADVISORY_IDENTIFIERS_TYPE GlobalAdvisory_identifiers_type = iota + GHSA_GLOBALADVISORY_IDENTIFIERS_TYPE +) + +func (i GlobalAdvisory_identifiers_type) String() string { + return []string{"CVE", "GHSA"}[i] +} +func ParseGlobalAdvisory_identifiers_type(v string) (any, error) { + result := CVE_GLOBALADVISORY_IDENTIFIERS_TYPE + switch v { + case "CVE": + result = CVE_GLOBALADVISORY_IDENTIFIERS_TYPE + case "GHSA": + result = GHSA_GLOBALADVISORY_IDENTIFIERS_TYPE + default: + return 0, errors.New("Unknown GlobalAdvisory_identifiers_type value: " + v) + } + return &result, nil +} +func SerializeGlobalAdvisory_identifiers_type(values []GlobalAdvisory_identifiers_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GlobalAdvisory_identifiers_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/global_advisory_severity.go b/pkg/github/models/global_advisory_severity.go new file mode 100644 index 0000000..c486526 --- /dev/null +++ b/pkg/github/models/global_advisory_severity.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The severity of the advisory. +type GlobalAdvisory_severity int + +const ( + CRITICAL_GLOBALADVISORY_SEVERITY GlobalAdvisory_severity = iota + HIGH_GLOBALADVISORY_SEVERITY + MEDIUM_GLOBALADVISORY_SEVERITY + LOW_GLOBALADVISORY_SEVERITY + UNKNOWN_GLOBALADVISORY_SEVERITY +) + +func (i GlobalAdvisory_severity) String() string { + return []string{"critical", "high", "medium", "low", "unknown"}[i] +} +func ParseGlobalAdvisory_severity(v string) (any, error) { + result := CRITICAL_GLOBALADVISORY_SEVERITY + switch v { + case "critical": + result = CRITICAL_GLOBALADVISORY_SEVERITY + case "high": + result = HIGH_GLOBALADVISORY_SEVERITY + case "medium": + result = MEDIUM_GLOBALADVISORY_SEVERITY + case "low": + result = LOW_GLOBALADVISORY_SEVERITY + case "unknown": + result = UNKNOWN_GLOBALADVISORY_SEVERITY + default: + return 0, errors.New("Unknown GlobalAdvisory_severity value: " + v) + } + return &result, nil +} +func SerializeGlobalAdvisory_severity(values []GlobalAdvisory_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GlobalAdvisory_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/global_advisory_type.go b/pkg/github/models/global_advisory_type.go new file mode 100644 index 0000000..56c44a2 --- /dev/null +++ b/pkg/github/models/global_advisory_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The type of advisory. +type GlobalAdvisory_type int + +const ( + REVIEWED_GLOBALADVISORY_TYPE GlobalAdvisory_type = iota + UNREVIEWED_GLOBALADVISORY_TYPE + MALWARE_GLOBALADVISORY_TYPE +) + +func (i GlobalAdvisory_type) String() string { + return []string{"reviewed", "unreviewed", "malware"}[i] +} +func ParseGlobalAdvisory_type(v string) (any, error) { + result := REVIEWED_GLOBALADVISORY_TYPE + switch v { + case "reviewed": + result = REVIEWED_GLOBALADVISORY_TYPE + case "unreviewed": + result = UNREVIEWED_GLOBALADVISORY_TYPE + case "malware": + result = MALWARE_GLOBALADVISORY_TYPE + default: + return 0, errors.New("Unknown GlobalAdvisory_type value: " + v) + } + return &result, nil +} +func SerializeGlobalAdvisory_type(values []GlobalAdvisory_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GlobalAdvisory_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/gpg_key.go b/pkg/github/models/gpg_key.go new file mode 100644 index 0000000..6e3e5e3 --- /dev/null +++ b/pkg/github/models/gpg_key.go @@ -0,0 +1,512 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GpgKey a unique encryption key +type GpgKey struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The can_certify property + can_certify *bool + // The can_encrypt_comms property + can_encrypt_comms *bool + // The can_encrypt_storage property + can_encrypt_storage *bool + // The can_sign property + can_sign *bool + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The emails property + emails []GpgKey_emailsable + // The expires_at property + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int64 + // The key_id property + key_id *string + // The name property + name *string + // The primary_key_id property + primary_key_id *int32 + // The public_key property + public_key *string + // The raw_key property + raw_key *string + // The revoked property + revoked *bool + // The subkeys property + subkeys []GpgKey_subkeysable +} +// NewGpgKey instantiates a new GpgKey and sets the default values. +func NewGpgKey()(*GpgKey) { + m := &GpgKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGpgKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGpgKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGpgKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GpgKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanCertify gets the can_certify property value. The can_certify property +// returns a *bool when successful +func (m *GpgKey) GetCanCertify()(*bool) { + return m.can_certify +} +// GetCanEncryptComms gets the can_encrypt_comms property value. The can_encrypt_comms property +// returns a *bool when successful +func (m *GpgKey) GetCanEncryptComms()(*bool) { + return m.can_encrypt_comms +} +// GetCanEncryptStorage gets the can_encrypt_storage property value. The can_encrypt_storage property +// returns a *bool when successful +func (m *GpgKey) GetCanEncryptStorage()(*bool) { + return m.can_encrypt_storage +} +// GetCanSign gets the can_sign property value. The can_sign property +// returns a *bool when successful +func (m *GpgKey) GetCanSign()(*bool) { + return m.can_sign +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *GpgKey) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetEmails gets the emails property value. The emails property +// returns a []GpgKey_emailsable when successful +func (m *GpgKey) GetEmails()([]GpgKey_emailsable) { + return m.emails +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *Time when successful +func (m *GpgKey) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GpgKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can_certify"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanCertify(val) + } + return nil + } + res["can_encrypt_comms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanEncryptComms(val) + } + return nil + } + res["can_encrypt_storage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanEncryptStorage(val) + } + return nil + } + res["can_sign"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanSign(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGpgKey_emailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GpgKey_emailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GpgKey_emailsable) + } + } + m.SetEmails(res) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(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["primary_key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryKeyId(val) + } + return nil + } + res["public_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicKey(val) + } + return nil + } + res["raw_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawKey(val) + } + return nil + } + res["revoked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRevoked(val) + } + return nil + } + res["subkeys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGpgKey_subkeysFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GpgKey_subkeysable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GpgKey_subkeysable) + } + } + m.SetSubkeys(res) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *GpgKey) GetId()(*int64) { + return m.id +} +// GetKeyId gets the key_id property value. The key_id property +// returns a *string when successful +func (m *GpgKey) GetKeyId()(*string) { + return m.key_id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *GpgKey) GetName()(*string) { + return m.name +} +// GetPrimaryKeyId gets the primary_key_id property value. The primary_key_id property +// returns a *int32 when successful +func (m *GpgKey) GetPrimaryKeyId()(*int32) { + return m.primary_key_id +} +// GetPublicKey gets the public_key property value. The public_key property +// returns a *string when successful +func (m *GpgKey) GetPublicKey()(*string) { + return m.public_key +} +// GetRawKey gets the raw_key property value. The raw_key property +// returns a *string when successful +func (m *GpgKey) GetRawKey()(*string) { + return m.raw_key +} +// GetRevoked gets the revoked property value. The revoked property +// returns a *bool when successful +func (m *GpgKey) GetRevoked()(*bool) { + return m.revoked +} +// GetSubkeys gets the subkeys property value. The subkeys property +// returns a []GpgKey_subkeysable when successful +func (m *GpgKey) GetSubkeys()([]GpgKey_subkeysable) { + return m.subkeys +} +// Serialize serializes information the current object +func (m *GpgKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can_certify", m.GetCanCertify()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can_encrypt_comms", m.GetCanEncryptComms()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can_encrypt_storage", m.GetCanEncryptStorage()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can_sign", m.GetCanSign()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("primary_key_id", m.GetPrimaryKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_key", m.GetPublicKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("raw_key", m.GetRawKey()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("revoked", m.GetRevoked()) + if err != nil { + return err + } + } + if m.GetSubkeys() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubkeys())) + for i, v := range m.GetSubkeys() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("subkeys", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GpgKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanCertify sets the can_certify property value. The can_certify property +func (m *GpgKey) SetCanCertify(value *bool)() { + m.can_certify = value +} +// SetCanEncryptComms sets the can_encrypt_comms property value. The can_encrypt_comms property +func (m *GpgKey) SetCanEncryptComms(value *bool)() { + m.can_encrypt_comms = value +} +// SetCanEncryptStorage sets the can_encrypt_storage property value. The can_encrypt_storage property +func (m *GpgKey) SetCanEncryptStorage(value *bool)() { + m.can_encrypt_storage = value +} +// SetCanSign sets the can_sign property value. The can_sign property +func (m *GpgKey) SetCanSign(value *bool)() { + m.can_sign = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GpgKey) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetEmails sets the emails property value. The emails property +func (m *GpgKey) SetEmails(value []GpgKey_emailsable)() { + m.emails = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *GpgKey) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +// SetId sets the id property value. The id property +func (m *GpgKey) SetId(value *int64)() { + m.id = value +} +// SetKeyId sets the key_id property value. The key_id property +func (m *GpgKey) SetKeyId(value *string)() { + m.key_id = value +} +// SetName sets the name property value. The name property +func (m *GpgKey) SetName(value *string)() { + m.name = value +} +// SetPrimaryKeyId sets the primary_key_id property value. The primary_key_id property +func (m *GpgKey) SetPrimaryKeyId(value *int32)() { + m.primary_key_id = value +} +// SetPublicKey sets the public_key property value. The public_key property +func (m *GpgKey) SetPublicKey(value *string)() { + m.public_key = value +} +// SetRawKey sets the raw_key property value. The raw_key property +func (m *GpgKey) SetRawKey(value *string)() { + m.raw_key = value +} +// SetRevoked sets the revoked property value. The revoked property +func (m *GpgKey) SetRevoked(value *bool)() { + m.revoked = value +} +// SetSubkeys sets the subkeys property value. The subkeys property +func (m *GpgKey) SetSubkeys(value []GpgKey_subkeysable)() { + m.subkeys = value +} +type GpgKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanCertify()(*bool) + GetCanEncryptComms()(*bool) + GetCanEncryptStorage()(*bool) + GetCanSign()(*bool) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmails()([]GpgKey_emailsable) + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int64) + GetKeyId()(*string) + GetName()(*string) + GetPrimaryKeyId()(*int32) + GetPublicKey()(*string) + GetRawKey()(*string) + GetRevoked()(*bool) + GetSubkeys()([]GpgKey_subkeysable) + SetCanCertify(value *bool)() + SetCanEncryptComms(value *bool)() + SetCanEncryptStorage(value *bool)() + SetCanSign(value *bool)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmails(value []GpgKey_emailsable)() + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int64)() + SetKeyId(value *string)() + SetName(value *string)() + SetPrimaryKeyId(value *int32)() + SetPublicKey(value *string)() + SetRawKey(value *string)() + SetRevoked(value *bool)() + SetSubkeys(value []GpgKey_subkeysable)() +} diff --git a/pkg/github/models/gpg_key_emails.go b/pkg/github/models/gpg_key_emails.go new file mode 100644 index 0000000..9a75970 --- /dev/null +++ b/pkg/github/models/gpg_key_emails.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GpgKey_emails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email property + email *string + // The verified property + verified *bool +} +// NewGpgKey_emails instantiates a new GpgKey_emails and sets the default values. +func NewGpgKey_emails()(*GpgKey_emails) { + m := &GpgKey_emails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGpgKey_emailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGpgKey_emailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGpgKey_emails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GpgKey_emails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *GpgKey_emails) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GpgKey_emails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *GpgKey_emails) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *GpgKey_emails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *GpgKey_emails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email property +func (m *GpgKey_emails) SetEmail(value *string)() { + m.email = value +} +// SetVerified sets the verified property value. The verified property +func (m *GpgKey_emails) SetVerified(value *bool)() { + m.verified = value +} +type GpgKey_emailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetVerified()(*bool) + SetEmail(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/gpg_key_subkeys.go b/pkg/github/models/gpg_key_subkeys.go new file mode 100644 index 0000000..5eb328b --- /dev/null +++ b/pkg/github/models/gpg_key_subkeys.go @@ -0,0 +1,469 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GpgKey_subkeys struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The can_certify property + can_certify *bool + // The can_encrypt_comms property + can_encrypt_comms *bool + // The can_encrypt_storage property + can_encrypt_storage *bool + // The can_sign property + can_sign *bool + // The created_at property + created_at *string + // The emails property + emails []GpgKey_subkeys_emailsable + // The expires_at property + expires_at *string + // The id property + id *int64 + // The key_id property + key_id *string + // The primary_key_id property + primary_key_id *int32 + // The public_key property + public_key *string + // The raw_key property + raw_key *string + // The revoked property + revoked *bool + // The subkeys property + subkeys i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable +} +// NewGpgKey_subkeys instantiates a new GpgKey_subkeys and sets the default values. +func NewGpgKey_subkeys()(*GpgKey_subkeys) { + m := &GpgKey_subkeys{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGpgKey_subkeysFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGpgKey_subkeysFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGpgKey_subkeys(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GpgKey_subkeys) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanCertify gets the can_certify property value. The can_certify property +// returns a *bool when successful +func (m *GpgKey_subkeys) GetCanCertify()(*bool) { + return m.can_certify +} +// GetCanEncryptComms gets the can_encrypt_comms property value. The can_encrypt_comms property +// returns a *bool when successful +func (m *GpgKey_subkeys) GetCanEncryptComms()(*bool) { + return m.can_encrypt_comms +} +// GetCanEncryptStorage gets the can_encrypt_storage property value. The can_encrypt_storage property +// returns a *bool when successful +func (m *GpgKey_subkeys) GetCanEncryptStorage()(*bool) { + return m.can_encrypt_storage +} +// GetCanSign gets the can_sign property value. The can_sign property +// returns a *bool when successful +func (m *GpgKey_subkeys) GetCanSign()(*bool) { + return m.can_sign +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *GpgKey_subkeys) GetCreatedAt()(*string) { + return m.created_at +} +// GetEmails gets the emails property value. The emails property +// returns a []GpgKey_subkeys_emailsable when successful +func (m *GpgKey_subkeys) GetEmails()([]GpgKey_subkeys_emailsable) { + return m.emails +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *string when successful +func (m *GpgKey_subkeys) GetExpiresAt()(*string) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GpgKey_subkeys) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can_certify"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanCertify(val) + } + return nil + } + res["can_encrypt_comms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanEncryptComms(val) + } + return nil + } + res["can_encrypt_storage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanEncryptStorage(val) + } + return nil + } + res["can_sign"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanSign(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGpgKey_subkeys_emailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GpgKey_subkeys_emailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GpgKey_subkeys_emailsable) + } + } + m.SetEmails(res) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["primary_key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryKeyId(val) + } + return nil + } + res["public_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicKey(val) + } + return nil + } + res["raw_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawKey(val) + } + return nil + } + res["revoked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRevoked(val) + } + return nil + } + res["subkeys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubkeys(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *GpgKey_subkeys) GetId()(*int64) { + return m.id +} +// GetKeyId gets the key_id property value. The key_id property +// returns a *string when successful +func (m *GpgKey_subkeys) GetKeyId()(*string) { + return m.key_id +} +// GetPrimaryKeyId gets the primary_key_id property value. The primary_key_id property +// returns a *int32 when successful +func (m *GpgKey_subkeys) GetPrimaryKeyId()(*int32) { + return m.primary_key_id +} +// GetPublicKey gets the public_key property value. The public_key property +// returns a *string when successful +func (m *GpgKey_subkeys) GetPublicKey()(*string) { + return m.public_key +} +// GetRawKey gets the raw_key property value. The raw_key property +// returns a *string when successful +func (m *GpgKey_subkeys) GetRawKey()(*string) { + return m.raw_key +} +// GetRevoked gets the revoked property value. The revoked property +// returns a *bool when successful +func (m *GpgKey_subkeys) GetRevoked()(*bool) { + return m.revoked +} +// GetSubkeys gets the subkeys property value. The subkeys property +// returns a UntypedNodeable when successful +func (m *GpgKey_subkeys) GetSubkeys()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) { + return m.subkeys +} +// Serialize serializes information the current object +func (m *GpgKey_subkeys) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can_certify", m.GetCanCertify()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can_encrypt_comms", m.GetCanEncryptComms()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can_encrypt_storage", m.GetCanEncryptStorage()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("can_sign", m.GetCanSign()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("primary_key_id", m.GetPrimaryKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_key", m.GetPublicKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("raw_key", m.GetRawKey()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("revoked", m.GetRevoked()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("subkeys", m.GetSubkeys()) + 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 *GpgKey_subkeys) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanCertify sets the can_certify property value. The can_certify property +func (m *GpgKey_subkeys) SetCanCertify(value *bool)() { + m.can_certify = value +} +// SetCanEncryptComms sets the can_encrypt_comms property value. The can_encrypt_comms property +func (m *GpgKey_subkeys) SetCanEncryptComms(value *bool)() { + m.can_encrypt_comms = value +} +// SetCanEncryptStorage sets the can_encrypt_storage property value. The can_encrypt_storage property +func (m *GpgKey_subkeys) SetCanEncryptStorage(value *bool)() { + m.can_encrypt_storage = value +} +// SetCanSign sets the can_sign property value. The can_sign property +func (m *GpgKey_subkeys) SetCanSign(value *bool)() { + m.can_sign = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *GpgKey_subkeys) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEmails sets the emails property value. The emails property +func (m *GpgKey_subkeys) SetEmails(value []GpgKey_subkeys_emailsable)() { + m.emails = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *GpgKey_subkeys) SetExpiresAt(value *string)() { + m.expires_at = value +} +// SetId sets the id property value. The id property +func (m *GpgKey_subkeys) SetId(value *int64)() { + m.id = value +} +// SetKeyId sets the key_id property value. The key_id property +func (m *GpgKey_subkeys) SetKeyId(value *string)() { + m.key_id = value +} +// SetPrimaryKeyId sets the primary_key_id property value. The primary_key_id property +func (m *GpgKey_subkeys) SetPrimaryKeyId(value *int32)() { + m.primary_key_id = value +} +// SetPublicKey sets the public_key property value. The public_key property +func (m *GpgKey_subkeys) SetPublicKey(value *string)() { + m.public_key = value +} +// SetRawKey sets the raw_key property value. The raw_key property +func (m *GpgKey_subkeys) SetRawKey(value *string)() { + m.raw_key = value +} +// SetRevoked sets the revoked property value. The revoked property +func (m *GpgKey_subkeys) SetRevoked(value *bool)() { + m.revoked = value +} +// SetSubkeys sets the subkeys property value. The subkeys property +func (m *GpgKey_subkeys) SetSubkeys(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() { + m.subkeys = value +} +type GpgKey_subkeysable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanCertify()(*bool) + GetCanEncryptComms()(*bool) + GetCanEncryptStorage()(*bool) + GetCanSign()(*bool) + GetCreatedAt()(*string) + GetEmails()([]GpgKey_subkeys_emailsable) + GetExpiresAt()(*string) + GetId()(*int64) + GetKeyId()(*string) + GetPrimaryKeyId()(*int32) + GetPublicKey()(*string) + GetRawKey()(*string) + GetRevoked()(*bool) + GetSubkeys()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) + SetCanCertify(value *bool)() + SetCanEncryptComms(value *bool)() + SetCanEncryptStorage(value *bool)() + SetCanSign(value *bool)() + SetCreatedAt(value *string)() + SetEmails(value []GpgKey_subkeys_emailsable)() + SetExpiresAt(value *string)() + SetId(value *int64)() + SetKeyId(value *string)() + SetPrimaryKeyId(value *int32)() + SetPublicKey(value *string)() + SetRawKey(value *string)() + SetRevoked(value *bool)() + SetSubkeys(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() +} diff --git a/pkg/github/models/gpg_key_subkeys_emails.go b/pkg/github/models/gpg_key_subkeys_emails.go new file mode 100644 index 0000000..7fdffcc --- /dev/null +++ b/pkg/github/models/gpg_key_subkeys_emails.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GpgKey_subkeys_emails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email property + email *string + // The verified property + verified *bool +} +// NewGpgKey_subkeys_emails instantiates a new GpgKey_subkeys_emails and sets the default values. +func NewGpgKey_subkeys_emails()(*GpgKey_subkeys_emails) { + m := &GpgKey_subkeys_emails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGpgKey_subkeys_emailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGpgKey_subkeys_emailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGpgKey_subkeys_emails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GpgKey_subkeys_emails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *GpgKey_subkeys_emails) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GpgKey_subkeys_emails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *GpgKey_subkeys_emails) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *GpgKey_subkeys_emails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *GpgKey_subkeys_emails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email property +func (m *GpgKey_subkeys_emails) SetEmail(value *string)() { + m.email = value +} +// SetVerified sets the verified property value. The verified property +func (m *GpgKey_subkeys_emails) SetVerified(value *bool)() { + m.verified = value +} +type GpgKey_subkeys_emailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetVerified()(*bool) + SetEmail(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/group.go b/pkg/github/models/group.go new file mode 100644 index 0000000..acc4dd7 --- /dev/null +++ b/pkg/github/models/group.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Group struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A human-readable name for a security group. + displayName *string + // A unique identifier for the resource as defined by the provisioning client. + externalId *string + // The group members. + members []Group_membersable + // The URIs that are used to indicate the namespaces of the SCIM schemas. + schemas []Group_schemas +} +// NewGroup instantiates a new Group and sets the default values. +func NewGroup()(*Group) { + m := &Group{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroup(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Group) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. A human-readable name for a security group. +// returns a *string when successful +func (m *Group) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +// returns a *string when successful +func (m *Group) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Group) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroup_membersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Group_membersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Group_membersable) + } + } + m.SetMembers(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseGroup_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]Group_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*Group_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. The group members. +// returns a []Group_membersable when successful +func (m *Group) GetMembers()([]Group_membersable) { + return m.members +} +// GetSchemas gets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +// returns a []Group_schemas when successful +func (m *Group) GetSchemas()([]Group_schemas) { + return m.schemas +} +// Serialize serializes information the current object +func (m *Group) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializeGroup_schemas(m.GetSchemas())) + 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 *Group) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. A human-readable name for a security group. +func (m *Group) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +func (m *Group) SetExternalId(value *string)() { + m.externalId = value +} +// SetMembers sets the members property value. The group members. +func (m *Group) SetMembers(value []Group_membersable)() { + m.members = value +} +// SetSchemas sets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +func (m *Group) SetSchemas(value []Group_schemas)() { + m.schemas = value +} +type Groupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetExternalId()(*string) + GetMembers()([]Group_membersable) + GetSchemas()([]Group_schemas) + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetMembers(value []Group_membersable)() + SetSchemas(value []Group_schemas)() +} diff --git a/pkg/github/models/group_mapping.go b/pkg/github/models/group_mapping.go new file mode 100644 index 0000000..3313981 --- /dev/null +++ b/pkg/github/models/group_mapping.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupMapping external Groups to be mapped to a team for membership +type GroupMapping struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Array of groups to be mapped to this team + groups []GroupMapping_groupsable +} +// NewGroupMapping instantiates a new GroupMapping and sets the default values. +func NewGroupMapping()(*GroupMapping) { + m := &GroupMapping{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGroupMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGroupMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupMapping(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GroupMapping) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GroupMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupMapping_groupsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupMapping_groupsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GroupMapping_groupsable) + } + } + m.SetGroups(res) + } + return nil + } + return res +} +// GetGroups gets the groups property value. Array of groups to be mapped to this team +// returns a []GroupMapping_groupsable when successful +func (m *GroupMapping) GetGroups()([]GroupMapping_groupsable) { + return m.groups +} +// Serialize serializes information the current object +func (m *GroupMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *GroupMapping) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroups sets the groups property value. Array of groups to be mapped to this team +func (m *GroupMapping) SetGroups(value []GroupMapping_groupsable)() { + m.groups = value +} +type GroupMappingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroups()([]GroupMapping_groupsable) + SetGroups(value []GroupMapping_groupsable)() +} diff --git a/pkg/github/models/group_mapping_groups.go b/pkg/github/models/group_mapping_groups.go new file mode 100644 index 0000000..c949ccf --- /dev/null +++ b/pkg/github/models/group_mapping_groups.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GroupMapping_groups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // a description of the group + group_description *string + // The ID of the group + group_id *string + // The name of the group + group_name *string + // synchronization status for this group mapping + status *string + // the time of the last sync for this group-mapping + synced_at *string +} +// NewGroupMapping_groups instantiates a new GroupMapping_groups and sets the default values. +func NewGroupMapping_groups()(*GroupMapping_groups) { + m := &GroupMapping_groups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGroupMapping_groupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGroupMapping_groupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupMapping_groups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GroupMapping_groups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GroupMapping_groups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["group_description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupDescription(val) + } + return nil + } + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["synced_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncedAt(val) + } + return nil + } + return res +} +// GetGroupDescription gets the group_description property value. a description of the group +// returns a *string when successful +func (m *GroupMapping_groups) GetGroupDescription()(*string) { + return m.group_description +} +// GetGroupId gets the group_id property value. The ID of the group +// returns a *string when successful +func (m *GroupMapping_groups) GetGroupId()(*string) { + return m.group_id +} +// GetGroupName gets the group_name property value. The name of the group +// returns a *string when successful +func (m *GroupMapping_groups) GetGroupName()(*string) { + return m.group_name +} +// GetStatus gets the status property value. synchronization status for this group mapping +// returns a *string when successful +func (m *GroupMapping_groups) GetStatus()(*string) { + return m.status +} +// GetSyncedAt gets the synced_at property value. the time of the last sync for this group-mapping +// returns a *string when successful +func (m *GroupMapping_groups) GetSyncedAt()(*string) { + return m.synced_at +} +// Serialize serializes information the current object +func (m *GroupMapping_groups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("group_description", m.GetGroupDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("synced_at", m.GetSyncedAt()) + 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 *GroupMapping_groups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroupDescription sets the group_description property value. a description of the group +func (m *GroupMapping_groups) SetGroupDescription(value *string)() { + m.group_description = value +} +// SetGroupId sets the group_id property value. The ID of the group +func (m *GroupMapping_groups) SetGroupId(value *string)() { + m.group_id = value +} +// SetGroupName sets the group_name property value. The name of the group +func (m *GroupMapping_groups) SetGroupName(value *string)() { + m.group_name = value +} +// SetStatus sets the status property value. synchronization status for this group mapping +func (m *GroupMapping_groups) SetStatus(value *string)() { + m.status = value +} +// SetSyncedAt sets the synced_at property value. the time of the last sync for this group-mapping +func (m *GroupMapping_groups) SetSyncedAt(value *string)() { + m.synced_at = value +} +type GroupMapping_groupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupDescription()(*string) + GetGroupId()(*string) + GetGroupName()(*string) + GetStatus()(*string) + GetSyncedAt()(*string) + SetGroupDescription(value *string)() + SetGroupId(value *string)() + SetGroupName(value *string)() + SetStatus(value *string)() + SetSyncedAt(value *string)() +} diff --git a/pkg/github/models/group_members.go b/pkg/github/models/group_members.go new file mode 100644 index 0000000..367f949 --- /dev/null +++ b/pkg/github/models/group_members.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Group_members struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display name associated with the member + displayName *string + // The local unique identifier for the member + value *string +} +// NewGroup_members instantiates a new Group_members and sets the default values. +func NewGroup_members()(*Group_members) { + m := &Group_members{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGroup_membersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGroup_membersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroup_members(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Group_members) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name associated with the member +// returns a *string when successful +func (m *Group_members) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Group_members) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The local unique identifier for the member +// returns a *string when successful +func (m *Group_members) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *Group_members) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *Group_members) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name associated with the member +func (m *Group_members) SetDisplayName(value *string)() { + m.displayName = value +} +// SetValue sets the value property value. The local unique identifier for the member +func (m *Group_members) SetValue(value *string)() { + m.value = value +} +type Group_membersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetValue()(*string) + SetDisplayName(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/group_response.go b/pkg/github/models/group_response.go new file mode 100644 index 0000000..0e2abf3 --- /dev/null +++ b/pkg/github/models/group_response.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GroupResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A human-readable name for a security group. + displayName *string + // A unique identifier for the resource as defined by the provisioning client. + externalId *string + // The group members. + members []GroupResponse_membersable + // The URIs that are used to indicate the namespaces of the SCIM schemas. + schemas []GroupResponse_schemas +} +// NewGroupResponse instantiates a new GroupResponse and sets the default values. +func NewGroupResponse()(*GroupResponse) { + m := &GroupResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGroupResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGroupResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GroupResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. A human-readable name for a security group. +// returns a *string when successful +func (m *GroupResponse) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +// returns a *string when successful +func (m *GroupResponse) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GroupResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupResponse_membersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupResponse_membersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GroupResponse_membersable) + } + } + m.SetMembers(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseGroupResponse_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]GroupResponse_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*GroupResponse_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. The group members. +// returns a []GroupResponse_membersable when successful +func (m *GroupResponse) GetMembers()([]GroupResponse_membersable) { + return m.members +} +// GetSchemas gets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +// returns a []GroupResponse_schemas when successful +func (m *GroupResponse) GetSchemas()([]GroupResponse_schemas) { + return m.schemas +} +// Serialize serializes information the current object +func (m *GroupResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializeGroupResponse_schemas(m.GetSchemas())) + 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 *GroupResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. A human-readable name for a security group. +func (m *GroupResponse) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +func (m *GroupResponse) SetExternalId(value *string)() { + m.externalId = value +} +// SetMembers sets the members property value. The group members. +func (m *GroupResponse) SetMembers(value []GroupResponse_membersable)() { + m.members = value +} +// SetSchemas sets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +func (m *GroupResponse) SetSchemas(value []GroupResponse_schemas)() { + m.schemas = value +} +type GroupResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetExternalId()(*string) + GetMembers()([]GroupResponse_membersable) + GetSchemas()([]GroupResponse_schemas) + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetMembers(value []GroupResponse_membersable)() + SetSchemas(value []GroupResponse_schemas)() +} diff --git a/pkg/github/models/group_response_members.go b/pkg/github/models/group_response_members.go new file mode 100644 index 0000000..7dd3d03 --- /dev/null +++ b/pkg/github/models/group_response_members.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GroupResponse_members struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display name associated with the member + display *string + // The Ref property + ref *string + // The local unique identifier for the member + value *string +} +// NewGroupResponse_members instantiates a new GroupResponse_members and sets the default values. +func NewGroupResponse_members()(*GroupResponse_members) { + m := &GroupResponse_members{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGroupResponse_membersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGroupResponse_membersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupResponse_members(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *GroupResponse_members) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplay gets the display property value. The display name associated with the member +// returns a *string when successful +func (m *GroupResponse_members) GetDisplay()(*string) { + return m.display +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GroupResponse_members) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplay(val) + } + return nil + } + res["$ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetRef gets the $ref property value. The Ref property +// returns a *string when successful +func (m *GroupResponse_members) GetRef()(*string) { + return m.ref +} +// GetValue gets the value property value. The local unique identifier for the member +// returns a *string when successful +func (m *GroupResponse_members) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupResponse_members) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display", m.GetDisplay()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("$ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *GroupResponse_members) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplay sets the display property value. The display name associated with the member +func (m *GroupResponse_members) SetDisplay(value *string)() { + m.display = value +} +// SetRef sets the $ref property value. The Ref property +func (m *GroupResponse_members) SetRef(value *string)() { + m.ref = value +} +// SetValue sets the value property value. The local unique identifier for the member +func (m *GroupResponse_members) SetValue(value *string)() { + m.value = value +} +type GroupResponse_membersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplay()(*string) + GetRef()(*string) + GetValue()(*string) + SetDisplay(value *string)() + SetRef(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/group_response_schemas.go b/pkg/github/models/group_response_schemas.go new file mode 100644 index 0000000..11528e6 --- /dev/null +++ b/pkg/github/models/group_response_schemas.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type GroupResponse_schemas int + +const ( + URNIETFPARAMSSCIMSCHEMASCORE20GROUP_GROUPRESPONSE_SCHEMAS GroupResponse_schemas = iota + URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_GROUPRESPONSE_SCHEMAS +) + +func (i GroupResponse_schemas) String() string { + return []string{"urn:ietf:params:scim:schemas:core:2.0:Group", "urn:ietf:params:scim:api:messages:2.0:ListResponse"}[i] +} +func ParseGroupResponse_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMSCHEMASCORE20GROUP_GROUPRESPONSE_SCHEMAS + switch v { + case "urn:ietf:params:scim:schemas:core:2.0:Group": + result = URNIETFPARAMSSCIMSCHEMASCORE20GROUP_GROUPRESPONSE_SCHEMAS + case "urn:ietf:params:scim:api:messages:2.0:ListResponse": + result = URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_GROUPRESPONSE_SCHEMAS + default: + return 0, errors.New("Unknown GroupResponse_schemas value: " + v) + } + return &result, nil +} +func SerializeGroupResponse_schemas(values []GroupResponse_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GroupResponse_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/group_schemas.go b/pkg/github/models/group_schemas.go new file mode 100644 index 0000000..42528be --- /dev/null +++ b/pkg/github/models/group_schemas.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type Group_schemas int + +const ( + URNIETFPARAMSSCIMSCHEMASCORE20GROUP_GROUP_SCHEMAS Group_schemas = iota +) + +func (i Group_schemas) String() string { + return []string{"urn:ietf:params:scim:schemas:core:2.0:Group"}[i] +} +func ParseGroup_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMSCHEMASCORE20GROUP_GROUP_SCHEMAS + switch v { + case "urn:ietf:params:scim:schemas:core:2.0:Group": + result = URNIETFPARAMSSCIMSCHEMASCORE20GROUP_GROUP_SCHEMAS + default: + return 0, errors.New("Unknown Group_schemas value: " + v) + } + return &result, nil +} +func SerializeGroup_schemas(values []Group_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Group_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/hook.go b/pkg/github/models/hook.go new file mode 100644 index 0000000..83d41cf --- /dev/null +++ b/pkg/github/models/hook.go @@ -0,0 +1,436 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Hook webhooks for repositories. +type Hook struct { + // Determines whether the hook is actually triggered on pushes. + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Configuration object of the webhook + config WebhookConfigable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deliveries_url property + deliveries_url *string + // Determines what events the hook is triggered for. Default: ['push']. + events []string + // Unique identifier of the webhook. + id *int32 + // The last_response property + last_response HookResponseable + // The name of a valid service, use 'web' for a webhook. + name *string + // The ping_url property + ping_url *string + // The test_url property + test_url *string + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewHook instantiates a new Hook and sets the default values. +func NewHook()(*Hook) { + m := &Hook{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHook(), nil +} +// GetActive gets the active property value. Determines whether the hook is actually triggered on pushes. +// returns a *bool when successful +func (m *Hook) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Hook) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfig gets the config property value. Configuration object of the webhook +// returns a WebhookConfigable when successful +func (m *Hook) GetConfig()(WebhookConfigable) { + return m.config +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Hook) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeliveriesUrl gets the deliveries_url property value. The deliveries_url property +// returns a *string when successful +func (m *Hook) GetDeliveriesUrl()(*string) { + return m.deliveries_url +} +// GetEvents gets the events property value. Determines what events the hook is triggered for. Default: ['push']. +// returns a []string when successful +func (m *Hook) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Hook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWebhookConfigFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfig(val.(WebhookConfigable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deliveries_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveriesUrl(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["last_response"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHookResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastResponse(val.(HookResponseable)) + } + 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["ping_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPingUrl(val) + } + return nil + } + res["test_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTestUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the webhook. +// returns a *int32 when successful +func (m *Hook) GetId()(*int32) { + return m.id +} +// GetLastResponse gets the last_response property value. The last_response property +// returns a HookResponseable when successful +func (m *Hook) GetLastResponse()(HookResponseable) { + return m.last_response +} +// GetName gets the name property value. The name of a valid service, use 'web' for a webhook. +// returns a *string when successful +func (m *Hook) GetName()(*string) { + return m.name +} +// GetPingUrl gets the ping_url property value. The ping_url property +// returns a *string when successful +func (m *Hook) GetPingUrl()(*string) { + return m.ping_url +} +// GetTestUrl gets the test_url property value. The test_url property +// returns a *string when successful +func (m *Hook) GetTestUrl()(*string) { + return m.test_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Hook) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Hook) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Hook) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Hook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("config", m.GetConfig()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deliveries_url", m.GetDeliveriesUrl()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("last_response", m.GetLastResponse()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ping_url", m.GetPingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("test_url", m.GetTestUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Determines whether the hook is actually triggered on pushes. +func (m *Hook) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Hook) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfig sets the config property value. Configuration object of the webhook +func (m *Hook) SetConfig(value WebhookConfigable)() { + m.config = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Hook) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeliveriesUrl sets the deliveries_url property value. The deliveries_url property +func (m *Hook) SetDeliveriesUrl(value *string)() { + m.deliveries_url = value +} +// SetEvents sets the events property value. Determines what events the hook is triggered for. Default: ['push']. +func (m *Hook) SetEvents(value []string)() { + m.events = value +} +// SetId sets the id property value. Unique identifier of the webhook. +func (m *Hook) SetId(value *int32)() { + m.id = value +} +// SetLastResponse sets the last_response property value. The last_response property +func (m *Hook) SetLastResponse(value HookResponseable)() { + m.last_response = value +} +// SetName sets the name property value. The name of a valid service, use 'web' for a webhook. +func (m *Hook) SetName(value *string)() { + m.name = value +} +// SetPingUrl sets the ping_url property value. The ping_url property +func (m *Hook) SetPingUrl(value *string)() { + m.ping_url = value +} +// SetTestUrl sets the test_url property value. The test_url property +func (m *Hook) SetTestUrl(value *string)() { + m.test_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Hook) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Hook) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Hook) SetUrl(value *string)() { + m.url = value +} +type Hookable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetConfig()(WebhookConfigable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeliveriesUrl()(*string) + GetEvents()([]string) + GetId()(*int32) + GetLastResponse()(HookResponseable) + GetName()(*string) + GetPingUrl()(*string) + GetTestUrl()(*string) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetActive(value *bool)() + SetConfig(value WebhookConfigable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeliveriesUrl(value *string)() + SetEvents(value []string)() + SetId(value *int32)() + SetLastResponse(value HookResponseable)() + SetName(value *string)() + SetPingUrl(value *string)() + SetTestUrl(value *string)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/hook_delivery.go b/pkg/github/models/hook_delivery.go new file mode 100644 index 0000000..a2e0b7a --- /dev/null +++ b/pkg/github/models/hook_delivery.go @@ -0,0 +1,488 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HookDelivery delivery made by a webhook. +type HookDelivery struct { + // The type of activity for the event that triggered the delivery. + action *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Time when the delivery was delivered. + delivered_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Time spent delivering. + duration *float64 + // The event that triggered the delivery. + event *string + // Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + guid *string + // Unique identifier of the delivery. + id *int32 + // The id of the GitHub App installation associated with this event. + installation_id *int32 + // Whether the delivery is a redelivery. + redelivery *bool + // The id of the repository associated with this event. + repository_id *int32 + // The request property + request HookDelivery_requestable + // The response property + response HookDelivery_responseable + // Description of the status of the attempted delivery + status *string + // Status code received when delivery was made. + status_code *int32 + // Time when the webhook delivery was throttled. + throttled_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The URL target of the delivery. + url *string +} +// NewHookDelivery instantiates a new HookDelivery and sets the default values. +func NewHookDelivery()(*HookDelivery) { + m := &HookDelivery{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDeliveryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDeliveryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDelivery(), nil +} +// GetAction gets the action property value. The type of activity for the event that triggered the delivery. +// returns a *string when successful +func (m *HookDelivery) GetAction()(*string) { + return m.action +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDelivery) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDeliveredAt gets the delivered_at property value. Time when the delivery was delivered. +// returns a *Time when successful +func (m *HookDelivery) GetDeliveredAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.delivered_at +} +// GetDuration gets the duration property value. Time spent delivering. +// returns a *float64 when successful +func (m *HookDelivery) GetDuration()(*float64) { + return m.duration +} +// GetEvent gets the event property value. The event that triggered the delivery. +// returns a *string when successful +func (m *HookDelivery) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDelivery) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAction(val) + } + return nil + } + res["delivered_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveredAt(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["guid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGuid(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["installation_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstallationId(val) + } + return nil + } + res["redelivery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRedelivery(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHookDelivery_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequest(val.(HookDelivery_requestable)) + } + return nil + } + res["response"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHookDelivery_responseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResponse(val.(HookDelivery_responseable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["status_code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStatusCode(val) + } + return nil + } + res["throttled_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetThrottledAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGuid gets the guid property value. Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). +// returns a *string when successful +func (m *HookDelivery) GetGuid()(*string) { + return m.guid +} +// GetId gets the id property value. Unique identifier of the delivery. +// returns a *int32 when successful +func (m *HookDelivery) GetId()(*int32) { + return m.id +} +// GetInstallationId gets the installation_id property value. The id of the GitHub App installation associated with this event. +// returns a *int32 when successful +func (m *HookDelivery) GetInstallationId()(*int32) { + return m.installation_id +} +// GetRedelivery gets the redelivery property value. Whether the delivery is a redelivery. +// returns a *bool when successful +func (m *HookDelivery) GetRedelivery()(*bool) { + return m.redelivery +} +// GetRepositoryId gets the repository_id property value. The id of the repository associated with this event. +// returns a *int32 when successful +func (m *HookDelivery) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetRequest gets the request property value. The request property +// returns a HookDelivery_requestable when successful +func (m *HookDelivery) GetRequest()(HookDelivery_requestable) { + return m.request +} +// GetResponse gets the response property value. The response property +// returns a HookDelivery_responseable when successful +func (m *HookDelivery) GetResponse()(HookDelivery_responseable) { + return m.response +} +// GetStatus gets the status property value. Description of the status of the attempted delivery +// returns a *string when successful +func (m *HookDelivery) GetStatus()(*string) { + return m.status +} +// GetStatusCode gets the status_code property value. Status code received when delivery was made. +// returns a *int32 when successful +func (m *HookDelivery) GetStatusCode()(*int32) { + return m.status_code +} +// GetThrottledAt gets the throttled_at property value. Time when the webhook delivery was throttled. +// returns a *Time when successful +func (m *HookDelivery) GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.throttled_at +} +// GetUrl gets the url property value. The URL target of the delivery. +// returns a *string when successful +func (m *HookDelivery) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *HookDelivery) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("delivered_at", m.GetDeliveredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("guid", m.GetGuid()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("installation_id", m.GetInstallationId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("redelivery", m.GetRedelivery()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("request", m.GetRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("response", m.GetResponse()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("status_code", m.GetStatusCode()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("throttled_at", m.GetThrottledAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The type of activity for the event that triggered the delivery. +func (m *HookDelivery) SetAction(value *string)() { + m.action = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookDelivery) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDeliveredAt sets the delivered_at property value. Time when the delivery was delivered. +func (m *HookDelivery) SetDeliveredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.delivered_at = value +} +// SetDuration sets the duration property value. Time spent delivering. +func (m *HookDelivery) SetDuration(value *float64)() { + m.duration = value +} +// SetEvent sets the event property value. The event that triggered the delivery. +func (m *HookDelivery) SetEvent(value *string)() { + m.event = value +} +// SetGuid sets the guid property value. Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). +func (m *HookDelivery) SetGuid(value *string)() { + m.guid = value +} +// SetId sets the id property value. Unique identifier of the delivery. +func (m *HookDelivery) SetId(value *int32)() { + m.id = value +} +// SetInstallationId sets the installation_id property value. The id of the GitHub App installation associated with this event. +func (m *HookDelivery) SetInstallationId(value *int32)() { + m.installation_id = value +} +// SetRedelivery sets the redelivery property value. Whether the delivery is a redelivery. +func (m *HookDelivery) SetRedelivery(value *bool)() { + m.redelivery = value +} +// SetRepositoryId sets the repository_id property value. The id of the repository associated with this event. +func (m *HookDelivery) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetRequest sets the request property value. The request property +func (m *HookDelivery) SetRequest(value HookDelivery_requestable)() { + m.request = value +} +// SetResponse sets the response property value. The response property +func (m *HookDelivery) SetResponse(value HookDelivery_responseable)() { + m.response = value +} +// SetStatus sets the status property value. Description of the status of the attempted delivery +func (m *HookDelivery) SetStatus(value *string)() { + m.status = value +} +// SetStatusCode sets the status_code property value. Status code received when delivery was made. +func (m *HookDelivery) SetStatusCode(value *int32)() { + m.status_code = value +} +// SetThrottledAt sets the throttled_at property value. Time when the webhook delivery was throttled. +func (m *HookDelivery) SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.throttled_at = value +} +// SetUrl sets the url property value. The URL target of the delivery. +func (m *HookDelivery) SetUrl(value *string)() { + m.url = value +} +type HookDeliveryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*string) + GetDeliveredAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDuration()(*float64) + GetEvent()(*string) + GetGuid()(*string) + GetId()(*int32) + GetInstallationId()(*int32) + GetRedelivery()(*bool) + GetRepositoryId()(*int32) + GetRequest()(HookDelivery_requestable) + GetResponse()(HookDelivery_responseable) + GetStatus()(*string) + GetStatusCode()(*int32) + GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAction(value *string)() + SetDeliveredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDuration(value *float64)() + SetEvent(value *string)() + SetGuid(value *string)() + SetId(value *int32)() + SetInstallationId(value *int32)() + SetRedelivery(value *bool)() + SetRepositoryId(value *int32)() + SetRequest(value HookDelivery_requestable)() + SetResponse(value HookDelivery_responseable)() + SetStatus(value *string)() + SetStatusCode(value *int32)() + SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/hook_delivery_item.go b/pkg/github/models/hook_delivery_item.go new file mode 100644 index 0000000..0340ded --- /dev/null +++ b/pkg/github/models/hook_delivery_item.go @@ -0,0 +1,401 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HookDeliveryItem delivery made by a webhook, without request and response information. +type HookDeliveryItem struct { + // The type of activity for the event that triggered the delivery. + action *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Time when the webhook delivery occurred. + delivered_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Time spent delivering. + duration *float64 + // The event that triggered the delivery. + event *string + // Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + guid *string + // Unique identifier of the webhook delivery. + id *int32 + // The id of the GitHub App installation associated with this event. + installation_id *int32 + // Whether the webhook delivery is a redelivery. + redelivery *bool + // The id of the repository associated with this event. + repository_id *int32 + // Describes the response returned after attempting the delivery. + status *string + // Status code received when delivery was made. + status_code *int32 + // Time when the webhook delivery was throttled. + throttled_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewHookDeliveryItem instantiates a new HookDeliveryItem and sets the default values. +func NewHookDeliveryItem()(*HookDeliveryItem) { + m := &HookDeliveryItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDeliveryItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDeliveryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDeliveryItem(), nil +} +// GetAction gets the action property value. The type of activity for the event that triggered the delivery. +// returns a *string when successful +func (m *HookDeliveryItem) GetAction()(*string) { + return m.action +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDeliveryItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDeliveredAt gets the delivered_at property value. Time when the webhook delivery occurred. +// returns a *Time when successful +func (m *HookDeliveryItem) GetDeliveredAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.delivered_at +} +// GetDuration gets the duration property value. Time spent delivering. +// returns a *float64 when successful +func (m *HookDeliveryItem) GetDuration()(*float64) { + return m.duration +} +// GetEvent gets the event property value. The event that triggered the delivery. +// returns a *string when successful +func (m *HookDeliveryItem) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDeliveryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAction(val) + } + return nil + } + res["delivered_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveredAt(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["guid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGuid(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["installation_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstallationId(val) + } + return nil + } + res["redelivery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRedelivery(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["status_code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStatusCode(val) + } + return nil + } + res["throttled_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetThrottledAt(val) + } + return nil + } + return res +} +// GetGuid gets the guid property value. Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). +// returns a *string when successful +func (m *HookDeliveryItem) GetGuid()(*string) { + return m.guid +} +// GetId gets the id property value. Unique identifier of the webhook delivery. +// returns a *int32 when successful +func (m *HookDeliveryItem) GetId()(*int32) { + return m.id +} +// GetInstallationId gets the installation_id property value. The id of the GitHub App installation associated with this event. +// returns a *int32 when successful +func (m *HookDeliveryItem) GetInstallationId()(*int32) { + return m.installation_id +} +// GetRedelivery gets the redelivery property value. Whether the webhook delivery is a redelivery. +// returns a *bool when successful +func (m *HookDeliveryItem) GetRedelivery()(*bool) { + return m.redelivery +} +// GetRepositoryId gets the repository_id property value. The id of the repository associated with this event. +// returns a *int32 when successful +func (m *HookDeliveryItem) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetStatus gets the status property value. Describes the response returned after attempting the delivery. +// returns a *string when successful +func (m *HookDeliveryItem) GetStatus()(*string) { + return m.status +} +// GetStatusCode gets the status_code property value. Status code received when delivery was made. +// returns a *int32 when successful +func (m *HookDeliveryItem) GetStatusCode()(*int32) { + return m.status_code +} +// GetThrottledAt gets the throttled_at property value. Time when the webhook delivery was throttled. +// returns a *Time when successful +func (m *HookDeliveryItem) GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.throttled_at +} +// Serialize serializes information the current object +func (m *HookDeliveryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("delivered_at", m.GetDeliveredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("guid", m.GetGuid()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("installation_id", m.GetInstallationId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("redelivery", m.GetRedelivery()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("status_code", m.GetStatusCode()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("throttled_at", m.GetThrottledAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The type of activity for the event that triggered the delivery. +func (m *HookDeliveryItem) SetAction(value *string)() { + m.action = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookDeliveryItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDeliveredAt sets the delivered_at property value. Time when the webhook delivery occurred. +func (m *HookDeliveryItem) SetDeliveredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.delivered_at = value +} +// SetDuration sets the duration property value. Time spent delivering. +func (m *HookDeliveryItem) SetDuration(value *float64)() { + m.duration = value +} +// SetEvent sets the event property value. The event that triggered the delivery. +func (m *HookDeliveryItem) SetEvent(value *string)() { + m.event = value +} +// SetGuid sets the guid property value. Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). +func (m *HookDeliveryItem) SetGuid(value *string)() { + m.guid = value +} +// SetId sets the id property value. Unique identifier of the webhook delivery. +func (m *HookDeliveryItem) SetId(value *int32)() { + m.id = value +} +// SetInstallationId sets the installation_id property value. The id of the GitHub App installation associated with this event. +func (m *HookDeliveryItem) SetInstallationId(value *int32)() { + m.installation_id = value +} +// SetRedelivery sets the redelivery property value. Whether the webhook delivery is a redelivery. +func (m *HookDeliveryItem) SetRedelivery(value *bool)() { + m.redelivery = value +} +// SetRepositoryId sets the repository_id property value. The id of the repository associated with this event. +func (m *HookDeliveryItem) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetStatus sets the status property value. Describes the response returned after attempting the delivery. +func (m *HookDeliveryItem) SetStatus(value *string)() { + m.status = value +} +// SetStatusCode sets the status_code property value. Status code received when delivery was made. +func (m *HookDeliveryItem) SetStatusCode(value *int32)() { + m.status_code = value +} +// SetThrottledAt sets the throttled_at property value. Time when the webhook delivery was throttled. +func (m *HookDeliveryItem) SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.throttled_at = value +} +type HookDeliveryItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*string) + GetDeliveredAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDuration()(*float64) + GetEvent()(*string) + GetGuid()(*string) + GetId()(*int32) + GetInstallationId()(*int32) + GetRedelivery()(*bool) + GetRepositoryId()(*int32) + GetStatus()(*string) + GetStatusCode()(*int32) + GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAction(value *string)() + SetDeliveredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDuration(value *float64)() + SetEvent(value *string)() + SetGuid(value *string)() + SetId(value *int32)() + SetInstallationId(value *int32)() + SetRedelivery(value *bool)() + SetRepositoryId(value *int32)() + SetStatus(value *string)() + SetStatusCode(value *int32)() + SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/hook_delivery_request.go b/pkg/github/models/hook_delivery_request.go new file mode 100644 index 0000000..9a116e4 --- /dev/null +++ b/pkg/github/models/hook_delivery_request.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type HookDelivery_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The request headers sent with the webhook delivery. + headers HookDelivery_request_headersable + // The webhook payload. + payload HookDelivery_request_payloadable +} +// NewHookDelivery_request instantiates a new HookDelivery_request and sets the default values. +func NewHookDelivery_request()(*HookDelivery_request) { + m := &HookDelivery_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDelivery_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDelivery_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDelivery_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDelivery_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDelivery_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["headers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHookDelivery_request_headersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHeaders(val.(HookDelivery_request_headersable)) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHookDelivery_request_payloadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPayload(val.(HookDelivery_request_payloadable)) + } + return nil + } + return res +} +// GetHeaders gets the headers property value. The request headers sent with the webhook delivery. +// returns a HookDelivery_request_headersable when successful +func (m *HookDelivery_request) GetHeaders()(HookDelivery_request_headersable) { + return m.headers +} +// GetPayload gets the payload property value. The webhook payload. +// returns a HookDelivery_request_payloadable when successful +func (m *HookDelivery_request) GetPayload()(HookDelivery_request_payloadable) { + return m.payload +} +// Serialize serializes information the current object +func (m *HookDelivery_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("headers", m.GetHeaders()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("payload", m.GetPayload()) + 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 *HookDelivery_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHeaders sets the headers property value. The request headers sent with the webhook delivery. +func (m *HookDelivery_request) SetHeaders(value HookDelivery_request_headersable)() { + m.headers = value +} +// SetPayload sets the payload property value. The webhook payload. +func (m *HookDelivery_request) SetPayload(value HookDelivery_request_payloadable)() { + m.payload = value +} +type HookDelivery_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHeaders()(HookDelivery_request_headersable) + GetPayload()(HookDelivery_request_payloadable) + SetHeaders(value HookDelivery_request_headersable)() + SetPayload(value HookDelivery_request_payloadable)() +} diff --git a/pkg/github/models/hook_delivery_request_headers.go b/pkg/github/models/hook_delivery_request_headers.go new file mode 100644 index 0000000..24156df --- /dev/null +++ b/pkg/github/models/hook_delivery_request_headers.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HookDelivery_request_headers the request headers sent with the webhook delivery. +type HookDelivery_request_headers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewHookDelivery_request_headers instantiates a new HookDelivery_request_headers and sets the default values. +func NewHookDelivery_request_headers()(*HookDelivery_request_headers) { + m := &HookDelivery_request_headers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDelivery_request_headersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDelivery_request_headersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDelivery_request_headers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDelivery_request_headers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDelivery_request_headers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *HookDelivery_request_headers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookDelivery_request_headers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type HookDelivery_request_headersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/hook_delivery_request_payload.go b/pkg/github/models/hook_delivery_request_payload.go new file mode 100644 index 0000000..5eb11a2 --- /dev/null +++ b/pkg/github/models/hook_delivery_request_payload.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HookDelivery_request_payload the webhook payload. +type HookDelivery_request_payload struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewHookDelivery_request_payload instantiates a new HookDelivery_request_payload and sets the default values. +func NewHookDelivery_request_payload()(*HookDelivery_request_payload) { + m := &HookDelivery_request_payload{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDelivery_request_payloadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDelivery_request_payloadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDelivery_request_payload(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDelivery_request_payload) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDelivery_request_payload) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *HookDelivery_request_payload) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookDelivery_request_payload) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type HookDelivery_request_payloadable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/hook_delivery_response.go b/pkg/github/models/hook_delivery_response.go new file mode 100644 index 0000000..5f86f88 --- /dev/null +++ b/pkg/github/models/hook_delivery_response.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type HookDelivery_response struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The response headers received when the delivery was made. + headers HookDelivery_response_headersable + // The response payload received. + payload *string +} +// NewHookDelivery_response instantiates a new HookDelivery_response and sets the default values. +func NewHookDelivery_response()(*HookDelivery_response) { + m := &HookDelivery_response{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDelivery_responseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDelivery_responseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDelivery_response(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDelivery_response) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDelivery_response) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["headers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHookDelivery_response_headersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHeaders(val.(HookDelivery_response_headersable)) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + return res +} +// GetHeaders gets the headers property value. The response headers received when the delivery was made. +// returns a HookDelivery_response_headersable when successful +func (m *HookDelivery_response) GetHeaders()(HookDelivery_response_headersable) { + return m.headers +} +// GetPayload gets the payload property value. The response payload received. +// returns a *string when successful +func (m *HookDelivery_response) GetPayload()(*string) { + return m.payload +} +// Serialize serializes information the current object +func (m *HookDelivery_response) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("headers", m.GetHeaders()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("payload", m.GetPayload()) + 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 *HookDelivery_response) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHeaders sets the headers property value. The response headers received when the delivery was made. +func (m *HookDelivery_response) SetHeaders(value HookDelivery_response_headersable)() { + m.headers = value +} +// SetPayload sets the payload property value. The response payload received. +func (m *HookDelivery_response) SetPayload(value *string)() { + m.payload = value +} +type HookDelivery_responseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHeaders()(HookDelivery_response_headersable) + GetPayload()(*string) + SetHeaders(value HookDelivery_response_headersable)() + SetPayload(value *string)() +} diff --git a/pkg/github/models/hook_delivery_response_headers.go b/pkg/github/models/hook_delivery_response_headers.go new file mode 100644 index 0000000..dde90a9 --- /dev/null +++ b/pkg/github/models/hook_delivery_response_headers.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HookDelivery_response_headers the response headers received when the delivery was made. +type HookDelivery_response_headers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewHookDelivery_response_headers instantiates a new HookDelivery_response_headers and sets the default values. +func NewHookDelivery_response_headers()(*HookDelivery_response_headers) { + m := &HookDelivery_response_headers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookDelivery_response_headersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookDelivery_response_headersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookDelivery_response_headers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookDelivery_response_headers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookDelivery_response_headers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *HookDelivery_response_headers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *HookDelivery_response_headers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type HookDelivery_response_headersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/hook_response.go b/pkg/github/models/hook_response.go new file mode 100644 index 0000000..98bd921 --- /dev/null +++ b/pkg/github/models/hook_response.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type HookResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *int32 + // The message property + message *string + // The status property + status *string +} +// NewHookResponse instantiates a new HookResponse and sets the default values. +func NewHookResponse()(*HookResponse) { + m := &HookResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHookResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHookResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHookResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *HookResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *int32 when successful +func (m *HookResponse) GetCode()(*int32) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HookResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCode(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 + } + 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 +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *HookResponse) GetMessage()(*string) { + return m.message +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *HookResponse) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *HookResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + 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 *HookResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *HookResponse) SetCode(value *int32)() { + m.code = value +} +// SetMessage sets the message property value. The message property +func (m *HookResponse) SetMessage(value *string)() { + m.message = value +} +// SetStatus sets the status property value. The status property +func (m *HookResponse) SetStatus(value *string)() { + m.status = value +} +type HookResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*int32) + GetMessage()(*string) + GetStatus()(*string) + SetCode(value *int32)() + SetMessage(value *string)() + SetStatus(value *string)() +} diff --git a/pkg/github/models/hovercard.go b/pkg/github/models/hovercard.go new file mode 100644 index 0000000..f3ab974 --- /dev/null +++ b/pkg/github/models/hovercard.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Hovercard hovercard +type Hovercard struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contexts property + contexts []Hovercard_contextsable +} +// NewHovercard instantiates a new Hovercard and sets the default values. +func NewHovercard()(*Hovercard) { + m := &Hovercard{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHovercardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHovercardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHovercard(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Hovercard) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContexts gets the contexts property value. The contexts property +// returns a []Hovercard_contextsable when successful +func (m *Hovercard) GetContexts()([]Hovercard_contextsable) { + return m.contexts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Hovercard) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHovercard_contextsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Hovercard_contextsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Hovercard_contextsable) + } + } + m.SetContexts(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Hovercard) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContexts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContexts())) + for i, v := range m.GetContexts() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("contexts", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Hovercard) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContexts sets the contexts property value. The contexts property +func (m *Hovercard) SetContexts(value []Hovercard_contextsable)() { + m.contexts = value +} +type Hovercardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContexts()([]Hovercard_contextsable) + SetContexts(value []Hovercard_contextsable)() +} diff --git a/pkg/github/models/hovercard_contexts.go b/pkg/github/models/hovercard_contexts.go new file mode 100644 index 0000000..9239a0f --- /dev/null +++ b/pkg/github/models/hovercard_contexts.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Hovercard_contexts struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string + // The octicon property + octicon *string +} +// NewHovercard_contexts instantiates a new Hovercard_contexts and sets the default values. +func NewHovercard_contexts()(*Hovercard_contexts) { + m := &Hovercard_contexts{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateHovercard_contextsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHovercard_contextsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHovercard_contexts(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Hovercard_contexts) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Hovercard_contexts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["octicon"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOcticon(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Hovercard_contexts) GetMessage()(*string) { + return m.message +} +// GetOcticon gets the octicon property value. The octicon property +// returns a *string when successful +func (m *Hovercard_contexts) GetOcticon()(*string) { + return m.octicon +} +// Serialize serializes information the current object +func (m *Hovercard_contexts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("octicon", m.GetOcticon()) + 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 *Hovercard_contexts) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *Hovercard_contexts) SetMessage(value *string)() { + m.message = value +} +// SetOcticon sets the octicon property value. The octicon property +func (m *Hovercard_contexts) SetOcticon(value *string)() { + m.octicon = value +} +type Hovercard_contextsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetOcticon()(*string) + SetMessage(value *string)() + SetOcticon(value *string)() +} diff --git a/pkg/github/models/import_escaped.go b/pkg/github/models/import_escaped.go new file mode 100644 index 0000000..a0f2ef9 --- /dev/null +++ b/pkg/github/models/import_escaped.go @@ -0,0 +1,732 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportEscaped a repository import from an external source. +type ImportEscaped struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The authors_count property + authors_count *int32 + // The authors_url property + authors_url *string + // The commit_count property + commit_count *int32 + // The error_message property + error_message *string + // The failed_step property + failed_step *string + // The has_large_files property + has_large_files *bool + // The html_url property + html_url *string + // The import_percent property + import_percent *int32 + // The large_files_count property + large_files_count *int32 + // The large_files_size property + large_files_size *int32 + // The message property + message *string + // The project_choices property + project_choices []Import_project_choicesable + // The push_percent property + push_percent *int32 + // The repository_url property + repository_url *string + // The status property + status *Import_status + // The status_text property + status_text *string + // The svc_root property + svc_root *string + // The svn_root property + svn_root *string + // The tfvc_project property + tfvc_project *string + // The url property + url *string + // The use_lfs property + use_lfs *bool + // The vcs property + vcs *string + // The URL of the originating repository. + vcs_url *string +} +// NewImportEscaped instantiates a new ImportEscaped and sets the default values. +func NewImportEscaped()(*ImportEscaped) { + m := &ImportEscaped{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateImportEscapedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateImportEscapedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportEscaped(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ImportEscaped) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorsCount gets the authors_count property value. The authors_count property +// returns a *int32 when successful +func (m *ImportEscaped) GetAuthorsCount()(*int32) { + return m.authors_count +} +// GetAuthorsUrl gets the authors_url property value. The authors_url property +// returns a *string when successful +func (m *ImportEscaped) GetAuthorsUrl()(*string) { + return m.authors_url +} +// GetCommitCount gets the commit_count property value. The commit_count property +// returns a *int32 when successful +func (m *ImportEscaped) GetCommitCount()(*int32) { + return m.commit_count +} +// GetErrorMessage gets the error_message property value. The error_message property +// returns a *string when successful +func (m *ImportEscaped) GetErrorMessage()(*string) { + return m.error_message +} +// GetFailedStep gets the failed_step property value. The failed_step property +// returns a *string when successful +func (m *ImportEscaped) GetFailedStep()(*string) { + return m.failed_step +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ImportEscaped) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authors_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAuthorsCount(val) + } + return nil + } + res["authors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorsUrl(val) + } + return nil + } + res["commit_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommitCount(val) + } + return nil + } + res["error_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(val) + } + return nil + } + res["failed_step"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailedStep(val) + } + return nil + } + res["has_large_files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasLargeFiles(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["import_percent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetImportPercent(val) + } + return nil + } + res["large_files_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLargeFilesCount(val) + } + return nil + } + res["large_files_size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLargeFilesSize(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 + } + res["project_choices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImport_project_choicesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Import_project_choicesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Import_project_choicesable) + } + } + m.SetProjectChoices(res) + } + return nil + } + res["push_percent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPushPercent(val) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImport_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*Import_status)) + } + return nil + } + res["status_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusText(val) + } + return nil + } + res["svc_root"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvcRoot(val) + } + return nil + } + res["svn_root"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnRoot(val) + } + return nil + } + res["tfvc_project"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTfvcProject(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["use_lfs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseLfs(val) + } + return nil + } + res["vcs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcs(val) + } + return nil + } + res["vcs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcsUrl(val) + } + return nil + } + return res +} +// GetHasLargeFiles gets the has_large_files property value. The has_large_files property +// returns a *bool when successful +func (m *ImportEscaped) GetHasLargeFiles()(*bool) { + return m.has_large_files +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *ImportEscaped) GetHtmlUrl()(*string) { + return m.html_url +} +// GetImportPercent gets the import_percent property value. The import_percent property +// returns a *int32 when successful +func (m *ImportEscaped) GetImportPercent()(*int32) { + return m.import_percent +} +// GetLargeFilesCount gets the large_files_count property value. The large_files_count property +// returns a *int32 when successful +func (m *ImportEscaped) GetLargeFilesCount()(*int32) { + return m.large_files_count +} +// GetLargeFilesSize gets the large_files_size property value. The large_files_size property +// returns a *int32 when successful +func (m *ImportEscaped) GetLargeFilesSize()(*int32) { + return m.large_files_size +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ImportEscaped) GetMessage()(*string) { + return m.message +} +// GetProjectChoices gets the project_choices property value. The project_choices property +// returns a []Import_project_choicesable when successful +func (m *ImportEscaped) GetProjectChoices()([]Import_project_choicesable) { + return m.project_choices +} +// GetPushPercent gets the push_percent property value. The push_percent property +// returns a *int32 when successful +func (m *ImportEscaped) GetPushPercent()(*int32) { + return m.push_percent +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *ImportEscaped) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetStatus gets the status property value. The status property +// returns a *Import_status when successful +func (m *ImportEscaped) GetStatus()(*Import_status) { + return m.status +} +// GetStatusText gets the status_text property value. The status_text property +// returns a *string when successful +func (m *ImportEscaped) GetStatusText()(*string) { + return m.status_text +} +// GetSvcRoot gets the svc_root property value. The svc_root property +// returns a *string when successful +func (m *ImportEscaped) GetSvcRoot()(*string) { + return m.svc_root +} +// GetSvnRoot gets the svn_root property value. The svn_root property +// returns a *string when successful +func (m *ImportEscaped) GetSvnRoot()(*string) { + return m.svn_root +} +// GetTfvcProject gets the tfvc_project property value. The tfvc_project property +// returns a *string when successful +func (m *ImportEscaped) GetTfvcProject()(*string) { + return m.tfvc_project +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ImportEscaped) GetUrl()(*string) { + return m.url +} +// GetUseLfs gets the use_lfs property value. The use_lfs property +// returns a *bool when successful +func (m *ImportEscaped) GetUseLfs()(*bool) { + return m.use_lfs +} +// GetVcs gets the vcs property value. The vcs property +// returns a *string when successful +func (m *ImportEscaped) GetVcs()(*string) { + return m.vcs +} +// GetVcsUrl gets the vcs_url property value. The URL of the originating repository. +// returns a *string when successful +func (m *ImportEscaped) GetVcsUrl()(*string) { + return m.vcs_url +} +// Serialize serializes information the current object +func (m *ImportEscaped) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("authors_count", m.GetAuthorsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authors_url", m.GetAuthorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("commit_count", m.GetCommitCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("error_message", m.GetErrorMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failed_step", m.GetFailedStep()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_large_files", m.GetHasLargeFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("import_percent", m.GetImportPercent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("large_files_count", m.GetLargeFilesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("large_files_size", m.GetLargeFilesSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + if m.GetProjectChoices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProjectChoices())) + for i, v := range m.GetProjectChoices() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("project_choices", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("push_percent", m.GetPushPercent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status_text", m.GetStatusText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svc_root", m.GetSvcRoot()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_root", m.GetSvnRoot()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tfvc_project", m.GetTfvcProject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_lfs", m.GetUseLfs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs", m.GetVcs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs_url", m.GetVcsUrl()) + 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 *ImportEscaped) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorsCount sets the authors_count property value. The authors_count property +func (m *ImportEscaped) SetAuthorsCount(value *int32)() { + m.authors_count = value +} +// SetAuthorsUrl sets the authors_url property value. The authors_url property +func (m *ImportEscaped) SetAuthorsUrl(value *string)() { + m.authors_url = value +} +// SetCommitCount sets the commit_count property value. The commit_count property +func (m *ImportEscaped) SetCommitCount(value *int32)() { + m.commit_count = value +} +// SetErrorMessage sets the error_message property value. The error_message property +func (m *ImportEscaped) SetErrorMessage(value *string)() { + m.error_message = value +} +// SetFailedStep sets the failed_step property value. The failed_step property +func (m *ImportEscaped) SetFailedStep(value *string)() { + m.failed_step = value +} +// SetHasLargeFiles sets the has_large_files property value. The has_large_files property +func (m *ImportEscaped) SetHasLargeFiles(value *bool)() { + m.has_large_files = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *ImportEscaped) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetImportPercent sets the import_percent property value. The import_percent property +func (m *ImportEscaped) SetImportPercent(value *int32)() { + m.import_percent = value +} +// SetLargeFilesCount sets the large_files_count property value. The large_files_count property +func (m *ImportEscaped) SetLargeFilesCount(value *int32)() { + m.large_files_count = value +} +// SetLargeFilesSize sets the large_files_size property value. The large_files_size property +func (m *ImportEscaped) SetLargeFilesSize(value *int32)() { + m.large_files_size = value +} +// SetMessage sets the message property value. The message property +func (m *ImportEscaped) SetMessage(value *string)() { + m.message = value +} +// SetProjectChoices sets the project_choices property value. The project_choices property +func (m *ImportEscaped) SetProjectChoices(value []Import_project_choicesable)() { + m.project_choices = value +} +// SetPushPercent sets the push_percent property value. The push_percent property +func (m *ImportEscaped) SetPushPercent(value *int32)() { + m.push_percent = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *ImportEscaped) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetStatus sets the status property value. The status property +func (m *ImportEscaped) SetStatus(value *Import_status)() { + m.status = value +} +// SetStatusText sets the status_text property value. The status_text property +func (m *ImportEscaped) SetStatusText(value *string)() { + m.status_text = value +} +// SetSvcRoot sets the svc_root property value. The svc_root property +func (m *ImportEscaped) SetSvcRoot(value *string)() { + m.svc_root = value +} +// SetSvnRoot sets the svn_root property value. The svn_root property +func (m *ImportEscaped) SetSvnRoot(value *string)() { + m.svn_root = value +} +// SetTfvcProject sets the tfvc_project property value. The tfvc_project property +func (m *ImportEscaped) SetTfvcProject(value *string)() { + m.tfvc_project = value +} +// SetUrl sets the url property value. The url property +func (m *ImportEscaped) SetUrl(value *string)() { + m.url = value +} +// SetUseLfs sets the use_lfs property value. The use_lfs property +func (m *ImportEscaped) SetUseLfs(value *bool)() { + m.use_lfs = value +} +// SetVcs sets the vcs property value. The vcs property +func (m *ImportEscaped) SetVcs(value *string)() { + m.vcs = value +} +// SetVcsUrl sets the vcs_url property value. The URL of the originating repository. +func (m *ImportEscaped) SetVcsUrl(value *string)() { + m.vcs_url = value +} +type ImportEscapedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorsCount()(*int32) + GetAuthorsUrl()(*string) + GetCommitCount()(*int32) + GetErrorMessage()(*string) + GetFailedStep()(*string) + GetHasLargeFiles()(*bool) + GetHtmlUrl()(*string) + GetImportPercent()(*int32) + GetLargeFilesCount()(*int32) + GetLargeFilesSize()(*int32) + GetMessage()(*string) + GetProjectChoices()([]Import_project_choicesable) + GetPushPercent()(*int32) + GetRepositoryUrl()(*string) + GetStatus()(*Import_status) + GetStatusText()(*string) + GetSvcRoot()(*string) + GetSvnRoot()(*string) + GetTfvcProject()(*string) + GetUrl()(*string) + GetUseLfs()(*bool) + GetVcs()(*string) + GetVcsUrl()(*string) + SetAuthorsCount(value *int32)() + SetAuthorsUrl(value *string)() + SetCommitCount(value *int32)() + SetErrorMessage(value *string)() + SetFailedStep(value *string)() + SetHasLargeFiles(value *bool)() + SetHtmlUrl(value *string)() + SetImportPercent(value *int32)() + SetLargeFilesCount(value *int32)() + SetLargeFilesSize(value *int32)() + SetMessage(value *string)() + SetProjectChoices(value []Import_project_choicesable)() + SetPushPercent(value *int32)() + SetRepositoryUrl(value *string)() + SetStatus(value *Import_status)() + SetStatusText(value *string)() + SetSvcRoot(value *string)() + SetSvnRoot(value *string)() + SetTfvcProject(value *string)() + SetUrl(value *string)() + SetUseLfs(value *bool)() + SetVcs(value *string)() + SetVcsUrl(value *string)() +} diff --git a/pkg/github/models/import_project_choices.go b/pkg/github/models/import_project_choices.go new file mode 100644 index 0000000..9f4d14c --- /dev/null +++ b/pkg/github/models/import_project_choices.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Import_project_choices struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The human_name property + human_name *string + // The tfvc_project property + tfvc_project *string + // The vcs property + vcs *string +} +// NewImport_project_choices instantiates a new Import_project_choices and sets the default values. +func NewImport_project_choices()(*Import_project_choices) { + m := &Import_project_choices{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateImport_project_choicesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateImport_project_choicesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImport_project_choices(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Import_project_choices) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Import_project_choices) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["human_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHumanName(val) + } + return nil + } + res["tfvc_project"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTfvcProject(val) + } + return nil + } + res["vcs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcs(val) + } + return nil + } + return res +} +// GetHumanName gets the human_name property value. The human_name property +// returns a *string when successful +func (m *Import_project_choices) GetHumanName()(*string) { + return m.human_name +} +// GetTfvcProject gets the tfvc_project property value. The tfvc_project property +// returns a *string when successful +func (m *Import_project_choices) GetTfvcProject()(*string) { + return m.tfvc_project +} +// GetVcs gets the vcs property value. The vcs property +// returns a *string when successful +func (m *Import_project_choices) GetVcs()(*string) { + return m.vcs +} +// Serialize serializes information the current object +func (m *Import_project_choices) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("human_name", m.GetHumanName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tfvc_project", m.GetTfvcProject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs", m.GetVcs()) + 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 *Import_project_choices) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHumanName sets the human_name property value. The human_name property +func (m *Import_project_choices) SetHumanName(value *string)() { + m.human_name = value +} +// SetTfvcProject sets the tfvc_project property value. The tfvc_project property +func (m *Import_project_choices) SetTfvcProject(value *string)() { + m.tfvc_project = value +} +// SetVcs sets the vcs property value. The vcs property +func (m *Import_project_choices) SetVcs(value *string)() { + m.vcs = value +} +type Import_project_choicesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHumanName()(*string) + GetTfvcProject()(*string) + GetVcs()(*string) + SetHumanName(value *string)() + SetTfvcProject(value *string)() + SetVcs(value *string)() +} diff --git a/pkg/github/models/import_status.go b/pkg/github/models/import_status.go new file mode 100644 index 0000000..eae6261 --- /dev/null +++ b/pkg/github/models/import_status.go @@ -0,0 +1,78 @@ +package models +import ( + "errors" +) +type Import_status int + +const ( + AUTH_IMPORT_STATUS Import_status = iota + ERROR_IMPORT_STATUS + NONE_IMPORT_STATUS + DETECTING_IMPORT_STATUS + CHOOSE_IMPORT_STATUS + AUTH_FAILED_IMPORT_STATUS + IMPORTING_IMPORT_STATUS + MAPPING_IMPORT_STATUS + WAITING_TO_PUSH_IMPORT_STATUS + PUSHING_IMPORT_STATUS + COMPLETE_IMPORT_STATUS + SETUP_IMPORT_STATUS + UNKNOWN_IMPORT_STATUS + DETECTION_FOUND_MULTIPLE_IMPORT_STATUS + DETECTION_FOUND_NOTHING_IMPORT_STATUS + DETECTION_NEEDS_AUTH_IMPORT_STATUS +) + +func (i Import_status) String() string { + return []string{"auth", "error", "none", "detecting", "choose", "auth_failed", "importing", "mapping", "waiting_to_push", "pushing", "complete", "setup", "unknown", "detection_found_multiple", "detection_found_nothing", "detection_needs_auth"}[i] +} +func ParseImport_status(v string) (any, error) { + result := AUTH_IMPORT_STATUS + switch v { + case "auth": + result = AUTH_IMPORT_STATUS + case "error": + result = ERROR_IMPORT_STATUS + case "none": + result = NONE_IMPORT_STATUS + case "detecting": + result = DETECTING_IMPORT_STATUS + case "choose": + result = CHOOSE_IMPORT_STATUS + case "auth_failed": + result = AUTH_FAILED_IMPORT_STATUS + case "importing": + result = IMPORTING_IMPORT_STATUS + case "mapping": + result = MAPPING_IMPORT_STATUS + case "waiting_to_push": + result = WAITING_TO_PUSH_IMPORT_STATUS + case "pushing": + result = PUSHING_IMPORT_STATUS + case "complete": + result = COMPLETE_IMPORT_STATUS + case "setup": + result = SETUP_IMPORT_STATUS + case "unknown": + result = UNKNOWN_IMPORT_STATUS + case "detection_found_multiple": + result = DETECTION_FOUND_MULTIPLE_IMPORT_STATUS + case "detection_found_nothing": + result = DETECTION_FOUND_NOTHING_IMPORT_STATUS + case "detection_needs_auth": + result = DETECTION_NEEDS_AUTH_IMPORT_STATUS + default: + return 0, errors.New("Unknown Import_status value: " + v) + } + return &result, nil +} +func SerializeImport_status(values []Import_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Import_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/installation.go b/pkg/github/models/installation.go new file mode 100644 index 0000000..dc40355 --- /dev/null +++ b/pkg/github/models/installation.go @@ -0,0 +1,732 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Installation installation +type Installation struct { + // The access_tokens_url property + access_tokens_url *string + // The account property + account Installation_Installation_accountable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The app_id property + app_id *int32 + // The app_slug property + app_slug *string + // The contact_email property + contact_email *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The events property + events []string + // The has_multiple_single_files property + has_multiple_single_files *bool + // The html_url property + html_url *string + // The ID of the installation. + id *int32 + // The permissions granted to the user access token. + permissions AppPermissionsable + // The repositories_url property + repositories_url *string + // Describe whether all repositories have been selected or there's a selection involved + repository_selection *Installation_repository_selection + // The single_file_name property + single_file_name *string + // The single_file_paths property + single_file_paths []string + // The suspended_at property + suspended_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + suspended_by NullableSimpleUserable + // The ID of the user or organization this token is being scoped to. + target_id *int32 + // The target_type property + target_type *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// Installation_Installation_account composed type wrapper for classes Enterpriseable, SimpleUserable +type Installation_Installation_account struct { + // Composed type representation for type Enterpriseable + enterprise Enterpriseable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable +} +// NewInstallation_Installation_account instantiates a new Installation_Installation_account and sets the default values. +func NewInstallation_Installation_account()(*Installation_Installation_account) { + m := &Installation_Installation_account{ + } + return m +} +// CreateInstallation_Installation_accountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstallation_Installation_accountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewInstallation_Installation_account() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateEnterpriseFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Enterpriseable); ok { + result.SetEnterprise(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateSimpleUserFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(SimpleUserable); ok { + result.SetSimpleUser(cast) + } + } + } + return result, nil +} +// GetEnterprise gets the enterprise property value. Composed type representation for type Enterpriseable +// returns a Enterpriseable when successful +func (m *Installation_Installation_account) GetEnterprise()(Enterpriseable) { + return m.enterprise +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Installation_Installation_account) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Installation_Installation_account) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *Installation_Installation_account) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// Serialize serializes information the current object +func (m *Installation_Installation_account) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterprise() != nil { + err := writer.WriteObjectValue("", m.GetEnterprise()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } + return nil +} +// SetEnterprise sets the enterprise property value. Composed type representation for type Enterpriseable +func (m *Installation_Installation_account) SetEnterprise(value Enterpriseable)() { + m.enterprise = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *Installation_Installation_account) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +type Installation_Installation_accountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterprise()(Enterpriseable) + GetSimpleUser()(SimpleUserable) + SetEnterprise(value Enterpriseable)() + SetSimpleUser(value SimpleUserable)() +} +// NewInstallation instantiates a new Installation and sets the default values. +func NewInstallation()(*Installation) { + m := &Installation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInstallationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstallationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstallation(), nil +} +// GetAccessTokensUrl gets the access_tokens_url property value. The access_tokens_url property +// returns a *string when successful +func (m *Installation) GetAccessTokensUrl()(*string) { + return m.access_tokens_url +} +// GetAccount gets the account property value. The account property +// returns a Installation_Installation_accountable when successful +func (m *Installation) GetAccount()(Installation_Installation_accountable) { + return m.account +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Installation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The app_id property +// returns a *int32 when successful +func (m *Installation) GetAppId()(*int32) { + return m.app_id +} +// GetAppSlug gets the app_slug property value. The app_slug property +// returns a *string when successful +func (m *Installation) GetAppSlug()(*string) { + return m.app_slug +} +// GetContactEmail gets the contact_email property value. The contact_email property +// returns a *string when successful +func (m *Installation) GetContactEmail()(*string) { + return m.contact_email +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Installation) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetEvents gets the events property value. The events property +// returns a []string when successful +func (m *Installation) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Installation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_tokens_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessTokensUrl(val) + } + return nil + } + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInstallation_Installation_accountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Installation_Installation_accountable)) + } + return nil + } + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["app_slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppSlug(val) + } + return nil + } + res["contact_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactEmail(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["has_multiple_single_files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMultipleSingleFiles(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppPermissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(AppPermissionsable)) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInstallation_repository_selection) + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val.(*Installation_repository_selection)) + } + return nil + } + res["single_file_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleFileName(val) + } + return nil + } + res["single_file_paths"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSingleFilePaths(res) + } + return nil + } + res["suspended_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSuspendedAt(val) + } + return nil + } + res["suspended_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSuspendedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["target_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTargetId(val) + } + return nil + } + res["target_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetHasMultipleSingleFiles gets the has_multiple_single_files property value. The has_multiple_single_files property +// returns a *bool when successful +func (m *Installation) GetHasMultipleSingleFiles()(*bool) { + return m.has_multiple_single_files +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Installation) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The ID of the installation. +// returns a *int32 when successful +func (m *Installation) GetId()(*int32) { + return m.id +} +// GetPermissions gets the permissions property value. The permissions granted to the user access token. +// returns a AppPermissionsable when successful +func (m *Installation) GetPermissions()(AppPermissionsable) { + return m.permissions +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *Installation) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetRepositorySelection gets the repository_selection property value. Describe whether all repositories have been selected or there's a selection involved +// returns a *Installation_repository_selection when successful +func (m *Installation) GetRepositorySelection()(*Installation_repository_selection) { + return m.repository_selection +} +// GetSingleFileName gets the single_file_name property value. The single_file_name property +// returns a *string when successful +func (m *Installation) GetSingleFileName()(*string) { + return m.single_file_name +} +// GetSingleFilePaths gets the single_file_paths property value. The single_file_paths property +// returns a []string when successful +func (m *Installation) GetSingleFilePaths()([]string) { + return m.single_file_paths +} +// GetSuspendedAt gets the suspended_at property value. The suspended_at property +// returns a *Time when successful +func (m *Installation) GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.suspended_at +} +// GetSuspendedBy gets the suspended_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Installation) GetSuspendedBy()(NullableSimpleUserable) { + return m.suspended_by +} +// GetTargetId gets the target_id property value. The ID of the user or organization this token is being scoped to. +// returns a *int32 when successful +func (m *Installation) GetTargetId()(*int32) { + return m.target_id +} +// GetTargetType gets the target_type property value. The target_type property +// returns a *string when successful +func (m *Installation) GetTargetType()(*string) { + return m.target_type +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Installation) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *Installation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_tokens_url", m.GetAccessTokensUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("app_slug", m.GetAppSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contact_email", m.GetContactEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_multiple_single_files", m.GetHasMultipleSingleFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + if m.GetRepositorySelection() != nil { + cast := (*m.GetRepositorySelection()).String() + err := writer.WriteStringValue("repository_selection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("single_file_name", m.GetSingleFileName()) + if err != nil { + return err + } + } + if m.GetSingleFilePaths() != nil { + err := writer.WriteCollectionOfStringValues("single_file_paths", m.GetSingleFilePaths()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("suspended_at", m.GetSuspendedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("suspended_by", m.GetSuspendedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("target_id", m.GetTargetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_type", m.GetTargetType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessTokensUrl sets the access_tokens_url property value. The access_tokens_url property +func (m *Installation) SetAccessTokensUrl(value *string)() { + m.access_tokens_url = value +} +// SetAccount sets the account property value. The account property +func (m *Installation) SetAccount(value Installation_Installation_accountable)() { + m.account = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Installation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The app_id property +func (m *Installation) SetAppId(value *int32)() { + m.app_id = value +} +// SetAppSlug sets the app_slug property value. The app_slug property +func (m *Installation) SetAppSlug(value *string)() { + m.app_slug = value +} +// SetContactEmail sets the contact_email property value. The contact_email property +func (m *Installation) SetContactEmail(value *string)() { + m.contact_email = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Installation) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetEvents sets the events property value. The events property +func (m *Installation) SetEvents(value []string)() { + m.events = value +} +// SetHasMultipleSingleFiles sets the has_multiple_single_files property value. The has_multiple_single_files property +func (m *Installation) SetHasMultipleSingleFiles(value *bool)() { + m.has_multiple_single_files = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Installation) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The ID of the installation. +func (m *Installation) SetId(value *int32)() { + m.id = value +} +// SetPermissions sets the permissions property value. The permissions granted to the user access token. +func (m *Installation) SetPermissions(value AppPermissionsable)() { + m.permissions = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *Installation) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetRepositorySelection sets the repository_selection property value. Describe whether all repositories have been selected or there's a selection involved +func (m *Installation) SetRepositorySelection(value *Installation_repository_selection)() { + m.repository_selection = value +} +// SetSingleFileName sets the single_file_name property value. The single_file_name property +func (m *Installation) SetSingleFileName(value *string)() { + m.single_file_name = value +} +// SetSingleFilePaths sets the single_file_paths property value. The single_file_paths property +func (m *Installation) SetSingleFilePaths(value []string)() { + m.single_file_paths = value +} +// SetSuspendedAt sets the suspended_at property value. The suspended_at property +func (m *Installation) SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.suspended_at = value +} +// SetSuspendedBy sets the suspended_by property value. A GitHub user. +func (m *Installation) SetSuspendedBy(value NullableSimpleUserable)() { + m.suspended_by = value +} +// SetTargetId sets the target_id property value. The ID of the user or organization this token is being scoped to. +func (m *Installation) SetTargetId(value *int32)() { + m.target_id = value +} +// SetTargetType sets the target_type property value. The target_type property +func (m *Installation) SetTargetType(value *string)() { + m.target_type = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Installation) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type Installationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessTokensUrl()(*string) + GetAccount()(Installation_Installation_accountable) + GetAppId()(*int32) + GetAppSlug()(*string) + GetContactEmail()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEvents()([]string) + GetHasMultipleSingleFiles()(*bool) + GetHtmlUrl()(*string) + GetId()(*int32) + GetPermissions()(AppPermissionsable) + GetRepositoriesUrl()(*string) + GetRepositorySelection()(*Installation_repository_selection) + GetSingleFileName()(*string) + GetSingleFilePaths()([]string) + GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSuspendedBy()(NullableSimpleUserable) + GetTargetId()(*int32) + GetTargetType()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccessTokensUrl(value *string)() + SetAccount(value Installation_Installation_accountable)() + SetAppId(value *int32)() + SetAppSlug(value *string)() + SetContactEmail(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEvents(value []string)() + SetHasMultipleSingleFiles(value *bool)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetPermissions(value AppPermissionsable)() + SetRepositoriesUrl(value *string)() + SetRepositorySelection(value *Installation_repository_selection)() + SetSingleFileName(value *string)() + SetSingleFilePaths(value []string)() + SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSuspendedBy(value NullableSimpleUserable)() + SetTargetId(value *int32)() + SetTargetType(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/installation_repository_selection.go b/pkg/github/models/installation_repository_selection.go new file mode 100644 index 0000000..8f8e8b0 --- /dev/null +++ b/pkg/github/models/installation_repository_selection.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Describe whether all repositories have been selected or there's a selection involved +type Installation_repository_selection int + +const ( + ALL_INSTALLATION_REPOSITORY_SELECTION Installation_repository_selection = iota + SELECTED_INSTALLATION_REPOSITORY_SELECTION +) + +func (i Installation_repository_selection) String() string { + return []string{"all", "selected"}[i] +} +func ParseInstallation_repository_selection(v string) (any, error) { + result := ALL_INSTALLATION_REPOSITORY_SELECTION + switch v { + case "all": + result = ALL_INSTALLATION_REPOSITORY_SELECTION + case "selected": + result = SELECTED_INSTALLATION_REPOSITORY_SELECTION + default: + return 0, errors.New("Unknown Installation_repository_selection value: " + v) + } + return &result, nil +} +func SerializeInstallation_repository_selection(values []Installation_repository_selection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Installation_repository_selection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/installation_token.go b/pkg/github/models/installation_token.go new file mode 100644 index 0000000..e84bbad --- /dev/null +++ b/pkg/github/models/installation_token.go @@ -0,0 +1,303 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InstallationToken authentication token for a GitHub App installed on a user or org. +type InstallationToken struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The expires_at property + expires_at *string + // The has_multiple_single_files property + has_multiple_single_files *bool + // The permissions granted to the user access token. + permissions AppPermissionsable + // The repositories property + repositories []Repositoryable + // The repository_selection property + repository_selection *InstallationToken_repository_selection + // The single_file property + single_file *string + // The single_file_paths property + single_file_paths []string + // The token property + token *string +} +// NewInstallationToken instantiates a new InstallationToken and sets the default values. +func NewInstallationToken()(*InstallationToken) { + m := &InstallationToken{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInstallationTokenFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstallationTokenFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstallationToken(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *InstallationToken) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *string when successful +func (m *InstallationToken) GetExpiresAt()(*string) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *InstallationToken) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["has_multiple_single_files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMultipleSingleFiles(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppPermissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(AppPermissionsable)) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Repositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Repositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInstallationToken_repository_selection) + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val.(*InstallationToken_repository_selection)) + } + return nil + } + res["single_file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleFile(val) + } + return nil + } + res["single_file_paths"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSingleFilePaths(res) + } + return nil + } + res["token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetToken(val) + } + return nil + } + return res +} +// GetHasMultipleSingleFiles gets the has_multiple_single_files property value. The has_multiple_single_files property +// returns a *bool when successful +func (m *InstallationToken) GetHasMultipleSingleFiles()(*bool) { + return m.has_multiple_single_files +} +// GetPermissions gets the permissions property value. The permissions granted to the user access token. +// returns a AppPermissionsable when successful +func (m *InstallationToken) GetPermissions()(AppPermissionsable) { + return m.permissions +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []Repositoryable when successful +func (m *InstallationToken) GetRepositories()([]Repositoryable) { + return m.repositories +} +// GetRepositorySelection gets the repository_selection property value. The repository_selection property +// returns a *InstallationToken_repository_selection when successful +func (m *InstallationToken) GetRepositorySelection()(*InstallationToken_repository_selection) { + return m.repository_selection +} +// GetSingleFile gets the single_file property value. The single_file property +// returns a *string when successful +func (m *InstallationToken) GetSingleFile()(*string) { + return m.single_file +} +// GetSingleFilePaths gets the single_file_paths property value. The single_file_paths property +// returns a []string when successful +func (m *InstallationToken) GetSingleFilePaths()([]string) { + return m.single_file_paths +} +// GetToken gets the token property value. The token property +// returns a *string when successful +func (m *InstallationToken) GetToken()(*string) { + return m.token +} +// Serialize serializes information the current object +func (m *InstallationToken) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_multiple_single_files", m.GetHasMultipleSingleFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + if m.GetRepositorySelection() != nil { + cast := (*m.GetRepositorySelection()).String() + err := writer.WriteStringValue("repository_selection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("single_file", m.GetSingleFile()) + if err != nil { + return err + } + } + if m.GetSingleFilePaths() != nil { + err := writer.WriteCollectionOfStringValues("single_file_paths", m.GetSingleFilePaths()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token", m.GetToken()) + 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 *InstallationToken) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *InstallationToken) SetExpiresAt(value *string)() { + m.expires_at = value +} +// SetHasMultipleSingleFiles sets the has_multiple_single_files property value. The has_multiple_single_files property +func (m *InstallationToken) SetHasMultipleSingleFiles(value *bool)() { + m.has_multiple_single_files = value +} +// SetPermissions sets the permissions property value. The permissions granted to the user access token. +func (m *InstallationToken) SetPermissions(value AppPermissionsable)() { + m.permissions = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *InstallationToken) SetRepositories(value []Repositoryable)() { + m.repositories = value +} +// SetRepositorySelection sets the repository_selection property value. The repository_selection property +func (m *InstallationToken) SetRepositorySelection(value *InstallationToken_repository_selection)() { + m.repository_selection = value +} +// SetSingleFile sets the single_file property value. The single_file property +func (m *InstallationToken) SetSingleFile(value *string)() { + m.single_file = value +} +// SetSingleFilePaths sets the single_file_paths property value. The single_file_paths property +func (m *InstallationToken) SetSingleFilePaths(value []string)() { + m.single_file_paths = value +} +// SetToken sets the token property value. The token property +func (m *InstallationToken) SetToken(value *string)() { + m.token = value +} +type InstallationTokenable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiresAt()(*string) + GetHasMultipleSingleFiles()(*bool) + GetPermissions()(AppPermissionsable) + GetRepositories()([]Repositoryable) + GetRepositorySelection()(*InstallationToken_repository_selection) + GetSingleFile()(*string) + GetSingleFilePaths()([]string) + GetToken()(*string) + SetExpiresAt(value *string)() + SetHasMultipleSingleFiles(value *bool)() + SetPermissions(value AppPermissionsable)() + SetRepositories(value []Repositoryable)() + SetRepositorySelection(value *InstallationToken_repository_selection)() + SetSingleFile(value *string)() + SetSingleFilePaths(value []string)() + SetToken(value *string)() +} diff --git a/pkg/github/models/installation_token_repository_selection.go b/pkg/github/models/installation_token_repository_selection.go new file mode 100644 index 0000000..75a9837 --- /dev/null +++ b/pkg/github/models/installation_token_repository_selection.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type InstallationToken_repository_selection int + +const ( + ALL_INSTALLATIONTOKEN_REPOSITORY_SELECTION InstallationToken_repository_selection = iota + SELECTED_INSTALLATIONTOKEN_REPOSITORY_SELECTION +) + +func (i InstallationToken_repository_selection) String() string { + return []string{"all", "selected"}[i] +} +func ParseInstallationToken_repository_selection(v string) (any, error) { + result := ALL_INSTALLATIONTOKEN_REPOSITORY_SELECTION + switch v { + case "all": + result = ALL_INSTALLATIONTOKEN_REPOSITORY_SELECTION + case "selected": + result = SELECTED_INSTALLATIONTOKEN_REPOSITORY_SELECTION + default: + return 0, errors.New("Unknown InstallationToken_repository_selection value: " + v) + } + return &result, nil +} +func SerializeInstallationToken_repository_selection(values []InstallationToken_repository_selection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i InstallationToken_repository_selection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/instances503_error.go b/pkg/github/models/instances503_error.go new file mode 100644 index 0000000..6361ee8 --- /dev/null +++ b/pkg/github/models/instances503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Instances503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewInstances503Error instantiates a new Instances503Error and sets the default values. +func NewInstances503Error()(*Instances503Error) { + m := &Instances503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInstances503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstances503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstances503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Instances503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Instances503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Instances503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Instances503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Instances503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Instances503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Instances503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Instances503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Instances503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Instances503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Instances503Error) SetMessage(value *string)() { + m.message = value +} +type Instances503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/integration.go b/pkg/github/models/integration.go new file mode 100644 index 0000000..414a294 --- /dev/null +++ b/pkg/github/models/integration.go @@ -0,0 +1,552 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Integration gitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +type Integration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The client_id property + client_id *string + // The client_secret property + client_secret *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The list of events for the GitHub app + events []string + // The external_url property + external_url *string + // The html_url property + html_url *string + // Unique identifier of the GitHub app + id *int32 + // The number of installations associated with the GitHub app + installations_count *int32 + // The name of the GitHub app + name *string + // The node_id property + node_id *string + // A GitHub user. + owner NullableSimpleUserable + // The pem property + pem *string + // The set of permissions for the GitHub app + permissions Integration_permissionsable + // The slug name of the GitHub app + slug *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The webhook_secret property + webhook_secret *string +} +// NewIntegration instantiates a new Integration and sets the default values. +func NewIntegration()(*Integration) { + m := &Integration{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIntegrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIntegrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntegration(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Integration) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientId gets the client_id property value. The client_id property +// returns a *string when successful +func (m *Integration) GetClientId()(*string) { + return m.client_id +} +// GetClientSecret gets the client_secret property value. The client_secret property +// returns a *string when successful +func (m *Integration) GetClientSecret()(*string) { + return m.client_secret +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Integration) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Integration) GetDescription()(*string) { + return m.description +} +// GetEvents gets the events property value. The list of events for the GitHub app +// returns a []string when successful +func (m *Integration) GetEvents()([]string) { + return m.events +} +// GetExternalUrl gets the external_url property value. The external_url property +// returns a *string when successful +func (m *Integration) GetExternalUrl()(*string) { + return m.external_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Integration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["client_secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientSecret(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["external_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["installations_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstallationsCount(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["pem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPem(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegration_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(Integration_permissionsable)) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["webhook_secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebhookSecret(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Integration) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the GitHub app +// returns a *int32 when successful +func (m *Integration) GetId()(*int32) { + return m.id +} +// GetInstallationsCount gets the installations_count property value. The number of installations associated with the GitHub app +// returns a *int32 when successful +func (m *Integration) GetInstallationsCount()(*int32) { + return m.installations_count +} +// GetName gets the name property value. The name of the GitHub app +// returns a *string when successful +func (m *Integration) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Integration) GetNodeId()(*string) { + return m.node_id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Integration) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetPem gets the pem property value. The pem property +// returns a *string when successful +func (m *Integration) GetPem()(*string) { + return m.pem +} +// GetPermissions gets the permissions property value. The set of permissions for the GitHub app +// returns a Integration_permissionsable when successful +func (m *Integration) GetPermissions()(Integration_permissionsable) { + return m.permissions +} +// GetSlug gets the slug property value. The slug name of the GitHub app +// returns a *string when successful +func (m *Integration) GetSlug()(*string) { + return m.slug +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Integration) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetWebhookSecret gets the webhook_secret property value. The webhook_secret property +// returns a *string when successful +func (m *Integration) GetWebhookSecret()(*string) { + return m.webhook_secret +} +// Serialize serializes information the current object +func (m *Integration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client_id", m.GetClientId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("client_secret", m.GetClientSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("external_url", m.GetExternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("installations_count", m.GetInstallationsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pem", m.GetPem()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webhook_secret", m.GetWebhookSecret()) + 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 *Integration) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientId sets the client_id property value. The client_id property +func (m *Integration) SetClientId(value *string)() { + m.client_id = value +} +// SetClientSecret sets the client_secret property value. The client_secret property +func (m *Integration) SetClientSecret(value *string)() { + m.client_secret = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Integration) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *Integration) SetDescription(value *string)() { + m.description = value +} +// SetEvents sets the events property value. The list of events for the GitHub app +func (m *Integration) SetEvents(value []string)() { + m.events = value +} +// SetExternalUrl sets the external_url property value. The external_url property +func (m *Integration) SetExternalUrl(value *string)() { + m.external_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Integration) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the GitHub app +func (m *Integration) SetId(value *int32)() { + m.id = value +} +// SetInstallationsCount sets the installations_count property value. The number of installations associated with the GitHub app +func (m *Integration) SetInstallationsCount(value *int32)() { + m.installations_count = value +} +// SetName sets the name property value. The name of the GitHub app +func (m *Integration) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Integration) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *Integration) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetPem sets the pem property value. The pem property +func (m *Integration) SetPem(value *string)() { + m.pem = value +} +// SetPermissions sets the permissions property value. The set of permissions for the GitHub app +func (m *Integration) SetPermissions(value Integration_permissionsable)() { + m.permissions = value +} +// SetSlug sets the slug property value. The slug name of the GitHub app +func (m *Integration) SetSlug(value *string)() { + m.slug = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Integration) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetWebhookSecret sets the webhook_secret property value. The webhook_secret property +func (m *Integration) SetWebhookSecret(value *string)() { + m.webhook_secret = value +} +type Integrationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientId()(*string) + GetClientSecret()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetEvents()([]string) + GetExternalUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetInstallationsCount()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetOwner()(NullableSimpleUserable) + GetPem()(*string) + GetPermissions()(Integration_permissionsable) + GetSlug()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWebhookSecret()(*string) + SetClientId(value *string)() + SetClientSecret(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetEvents(value []string)() + SetExternalUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetInstallationsCount(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetOwner(value NullableSimpleUserable)() + SetPem(value *string)() + SetPermissions(value Integration_permissionsable)() + SetSlug(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWebhookSecret(value *string)() +} diff --git a/pkg/github/models/integration_installation_request.go b/pkg/github/models/integration_installation_request.go new file mode 100644 index 0000000..c524829 --- /dev/null +++ b/pkg/github/models/integration_installation_request.go @@ -0,0 +1,284 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntegrationInstallationRequest request to install an integration on a target +type IntegrationInstallationRequest struct { + // The account property + account IntegrationInstallationRequest_IntegrationInstallationRequest_accountable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Unique identifier of the request installation. + id *int32 + // The node_id property + node_id *string + // A GitHub user. + requester SimpleUserable +} +// IntegrationInstallationRequest_IntegrationInstallationRequest_account composed type wrapper for classes Enterpriseable, SimpleUserable +type IntegrationInstallationRequest_IntegrationInstallationRequest_account struct { + // Composed type representation for type Enterpriseable + enterprise Enterpriseable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable +} +// NewIntegrationInstallationRequest_IntegrationInstallationRequest_account instantiates a new IntegrationInstallationRequest_IntegrationInstallationRequest_account and sets the default values. +func NewIntegrationInstallationRequest_IntegrationInstallationRequest_account()(*IntegrationInstallationRequest_IntegrationInstallationRequest_account) { + m := &IntegrationInstallationRequest_IntegrationInstallationRequest_account{ + } + return m +} +// CreateIntegrationInstallationRequest_IntegrationInstallationRequest_accountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIntegrationInstallationRequest_IntegrationInstallationRequest_accountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewIntegrationInstallationRequest_IntegrationInstallationRequest_account() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateEnterpriseFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Enterpriseable); ok { + result.SetEnterprise(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateSimpleUserFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(SimpleUserable); ok { + result.SetSimpleUser(cast) + } + } + } + return result, nil +} +// GetEnterprise gets the enterprise property value. Composed type representation for type Enterpriseable +// returns a Enterpriseable when successful +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) GetEnterprise()(Enterpriseable) { + return m.enterprise +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// Serialize serializes information the current object +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterprise() != nil { + err := writer.WriteObjectValue("", m.GetEnterprise()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } + return nil +} +// SetEnterprise sets the enterprise property value. Composed type representation for type Enterpriseable +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) SetEnterprise(value Enterpriseable)() { + m.enterprise = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *IntegrationInstallationRequest_IntegrationInstallationRequest_account) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +type IntegrationInstallationRequest_IntegrationInstallationRequest_accountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterprise()(Enterpriseable) + GetSimpleUser()(SimpleUserable) + SetEnterprise(value Enterpriseable)() + SetSimpleUser(value SimpleUserable)() +} +// NewIntegrationInstallationRequest instantiates a new IntegrationInstallationRequest and sets the default values. +func NewIntegrationInstallationRequest()(*IntegrationInstallationRequest) { + m := &IntegrationInstallationRequest{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIntegrationInstallationRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIntegrationInstallationRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntegrationInstallationRequest(), nil +} +// GetAccount gets the account property value. The account property +// returns a IntegrationInstallationRequest_IntegrationInstallationRequest_accountable when successful +func (m *IntegrationInstallationRequest) GetAccount()(IntegrationInstallationRequest_IntegrationInstallationRequest_accountable) { + return m.account +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IntegrationInstallationRequest) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *IntegrationInstallationRequest) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IntegrationInstallationRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegrationInstallationRequest_IntegrationInstallationRequest_accountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(IntegrationInstallationRequest_IntegrationInstallationRequest_accountable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["requester"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequester(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the request installation. +// returns a *int32 when successful +func (m *IntegrationInstallationRequest) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *IntegrationInstallationRequest) GetNodeId()(*string) { + return m.node_id +} +// GetRequester gets the requester property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *IntegrationInstallationRequest) GetRequester()(SimpleUserable) { + return m.requester +} +// Serialize serializes information the current object +func (m *IntegrationInstallationRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requester", m.GetRequester()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *IntegrationInstallationRequest) SetAccount(value IntegrationInstallationRequest_IntegrationInstallationRequest_accountable)() { + m.account = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IntegrationInstallationRequest) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *IntegrationInstallationRequest) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. Unique identifier of the request installation. +func (m *IntegrationInstallationRequest) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *IntegrationInstallationRequest) SetNodeId(value *string)() { + m.node_id = value +} +// SetRequester sets the requester property value. A GitHub user. +func (m *IntegrationInstallationRequest) SetRequester(value SimpleUserable)() { + m.requester = value +} +type IntegrationInstallationRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(IntegrationInstallationRequest_IntegrationInstallationRequest_accountable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetNodeId()(*string) + GetRequester()(SimpleUserable) + SetAccount(value IntegrationInstallationRequest_IntegrationInstallationRequest_accountable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetNodeId(value *string)() + SetRequester(value SimpleUserable)() +} diff --git a/pkg/github/models/integration_permissions.go b/pkg/github/models/integration_permissions.go new file mode 100644 index 0000000..b147bc9 --- /dev/null +++ b/pkg/github/models/integration_permissions.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Integration_permissions the set of permissions for the GitHub app +type Integration_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The checks property + checks *string + // The contents property + contents *string + // The deployments property + deployments *string + // The issues property + issues *string + // The metadata property + metadata *string +} +// NewIntegration_permissions instantiates a new Integration_permissions and sets the default values. +func NewIntegration_permissions()(*Integration_permissions) { + m := &Integration_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIntegration_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIntegration_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntegration_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Integration_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChecks gets the checks property value. The checks property +// returns a *string when successful +func (m *Integration_permissions) GetChecks()(*string) { + return m.checks +} +// GetContents gets the contents property value. The contents property +// returns a *string when successful +func (m *Integration_permissions) GetContents()(*string) { + return m.contents +} +// GetDeployments gets the deployments property value. The deployments property +// returns a *string when successful +func (m *Integration_permissions) GetDeployments()(*string) { + return m.deployments +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Integration_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChecks(val) + } + return nil + } + res["contents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContents(val) + } + return nil + } + res["deployments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployments(val) + } + return nil + } + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssues(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val) + } + return nil + } + return res +} +// GetIssues gets the issues property value. The issues property +// returns a *string when successful +func (m *Integration_permissions) GetIssues()(*string) { + return m.issues +} +// GetMetadata gets the metadata property value. The metadata property +// returns a *string when successful +func (m *Integration_permissions) GetMetadata()(*string) { + return m.metadata +} +// Serialize serializes information the current object +func (m *Integration_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("checks", m.GetChecks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents", m.GetContents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments", m.GetDeployments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues", m.GetIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("metadata", m.GetMetadata()) + 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 *Integration_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChecks sets the checks property value. The checks property +func (m *Integration_permissions) SetChecks(value *string)() { + m.checks = value +} +// SetContents sets the contents property value. The contents property +func (m *Integration_permissions) SetContents(value *string)() { + m.contents = value +} +// SetDeployments sets the deployments property value. The deployments property +func (m *Integration_permissions) SetDeployments(value *string)() { + m.deployments = value +} +// SetIssues sets the issues property value. The issues property +func (m *Integration_permissions) SetIssues(value *string)() { + m.issues = value +} +// SetMetadata sets the metadata property value. The metadata property +func (m *Integration_permissions) SetMetadata(value *string)() { + m.metadata = value +} +type Integration_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecks()(*string) + GetContents()(*string) + GetDeployments()(*string) + GetIssues()(*string) + GetMetadata()(*string) + SetChecks(value *string)() + SetContents(value *string)() + SetDeployments(value *string)() + SetIssues(value *string)() + SetMetadata(value *string)() +} diff --git a/pkg/github/models/interaction_expiry.go b/pkg/github/models/interaction_expiry.go new file mode 100644 index 0000000..f49b20e --- /dev/null +++ b/pkg/github/models/interaction_expiry.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The duration of the interaction restriction. Default: `one_day`. +type InteractionExpiry int + +const ( + ONE_DAY_INTERACTIONEXPIRY InteractionExpiry = iota + THREE_DAYS_INTERACTIONEXPIRY + ONE_WEEK_INTERACTIONEXPIRY + ONE_MONTH_INTERACTIONEXPIRY + SIX_MONTHS_INTERACTIONEXPIRY +) + +func (i InteractionExpiry) String() string { + return []string{"one_day", "three_days", "one_week", "one_month", "six_months"}[i] +} +func ParseInteractionExpiry(v string) (any, error) { + result := ONE_DAY_INTERACTIONEXPIRY + switch v { + case "one_day": + result = ONE_DAY_INTERACTIONEXPIRY + case "three_days": + result = THREE_DAYS_INTERACTIONEXPIRY + case "one_week": + result = ONE_WEEK_INTERACTIONEXPIRY + case "one_month": + result = ONE_MONTH_INTERACTIONEXPIRY + case "six_months": + result = SIX_MONTHS_INTERACTIONEXPIRY + default: + return 0, errors.New("Unknown InteractionExpiry value: " + v) + } + return &result, nil +} +func SerializeInteractionExpiry(values []InteractionExpiry) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i InteractionExpiry) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/interaction_group.go b/pkg/github/models/interaction_group.go new file mode 100644 index 0000000..38a73fe --- /dev/null +++ b/pkg/github/models/interaction_group.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. +type InteractionGroup int + +const ( + EXISTING_USERS_INTERACTIONGROUP InteractionGroup = iota + CONTRIBUTORS_ONLY_INTERACTIONGROUP + COLLABORATORS_ONLY_INTERACTIONGROUP +) + +func (i InteractionGroup) String() string { + return []string{"existing_users", "contributors_only", "collaborators_only"}[i] +} +func ParseInteractionGroup(v string) (any, error) { + result := EXISTING_USERS_INTERACTIONGROUP + switch v { + case "existing_users": + result = EXISTING_USERS_INTERACTIONGROUP + case "contributors_only": + result = CONTRIBUTORS_ONLY_INTERACTIONGROUP + case "collaborators_only": + result = COLLABORATORS_ONLY_INTERACTIONGROUP + default: + return 0, errors.New("Unknown InteractionGroup value: " + v) + } + return &result, nil +} +func SerializeInteractionGroup(values []InteractionGroup) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i InteractionGroup) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/interaction_limit.go b/pkg/github/models/interaction_limit.go new file mode 100644 index 0000000..739001b --- /dev/null +++ b/pkg/github/models/interaction_limit.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InteractionLimit limit interactions to a specific type of user for a specified duration +type InteractionLimit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The duration of the interaction restriction. Default: `one_day`. + expiry *InteractionExpiry + // The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + limit *InteractionGroup +} +// NewInteractionLimit instantiates a new InteractionLimit and sets the default values. +func NewInteractionLimit()(*InteractionLimit) { + m := &InteractionLimit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInteractionLimitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInteractionLimitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInteractionLimit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *InteractionLimit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpiry gets the expiry property value. The duration of the interaction restriction. Default: `one_day`. +// returns a *InteractionExpiry when successful +func (m *InteractionLimit) GetExpiry()(*InteractionExpiry) { + return m.expiry +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *InteractionLimit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expiry"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInteractionExpiry) + if err != nil { + return err + } + if val != nil { + m.SetExpiry(val.(*InteractionExpiry)) + } + return nil + } + res["limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInteractionGroup) + if err != nil { + return err + } + if val != nil { + m.SetLimit(val.(*InteractionGroup)) + } + return nil + } + return res +} +// GetLimit gets the limit property value. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. +// returns a *InteractionGroup when successful +func (m *InteractionLimit) GetLimit()(*InteractionGroup) { + return m.limit +} +// Serialize serializes information the current object +func (m *InteractionLimit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExpiry() != nil { + cast := (*m.GetExpiry()).String() + err := writer.WriteStringValue("expiry", &cast) + if err != nil { + return err + } + } + if m.GetLimit() != nil { + cast := (*m.GetLimit()).String() + err := writer.WriteStringValue("limit", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *InteractionLimit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpiry sets the expiry property value. The duration of the interaction restriction. Default: `one_day`. +func (m *InteractionLimit) SetExpiry(value *InteractionExpiry)() { + m.expiry = value +} +// SetLimit sets the limit property value. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. +func (m *InteractionLimit) SetLimit(value *InteractionGroup)() { + m.limit = value +} +type InteractionLimitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiry()(*InteractionExpiry) + GetLimit()(*InteractionGroup) + SetExpiry(value *InteractionExpiry)() + SetLimit(value *InteractionGroup)() +} diff --git a/pkg/github/models/interaction_limit_response.go b/pkg/github/models/interaction_limit_response.go new file mode 100644 index 0000000..6d1434a --- /dev/null +++ b/pkg/github/models/interaction_limit_response.go @@ -0,0 +1,141 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InteractionLimitResponse interaction limit settings. +type InteractionLimitResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The expires_at property + expires_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + limit *InteractionGroup + // The origin property + origin *string +} +// NewInteractionLimitResponse instantiates a new InteractionLimitResponse and sets the default values. +func NewInteractionLimitResponse()(*InteractionLimitResponse) { + m := &InteractionLimitResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInteractionLimitResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInteractionLimitResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInteractionLimitResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *InteractionLimitResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *Time when successful +func (m *InteractionLimitResponse) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *InteractionLimitResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInteractionGroup) + if err != nil { + return err + } + if val != nil { + m.SetLimit(val.(*InteractionGroup)) + } + return nil + } + res["origin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrigin(val) + } + return nil + } + return res +} +// GetLimit gets the limit property value. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. +// returns a *InteractionGroup when successful +func (m *InteractionLimitResponse) GetLimit()(*InteractionGroup) { + return m.limit +} +// GetOrigin gets the origin property value. The origin property +// returns a *string when successful +func (m *InteractionLimitResponse) GetOrigin()(*string) { + return m.origin +} +// Serialize serializes information the current object +func (m *InteractionLimitResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + if m.GetLimit() != nil { + cast := (*m.GetLimit()).String() + err := writer.WriteStringValue("limit", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("origin", m.GetOrigin()) + 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 *InteractionLimitResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *InteractionLimitResponse) SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expires_at = value +} +// SetLimit sets the limit property value. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. +func (m *InteractionLimitResponse) SetLimit(value *InteractionGroup)() { + m.limit = value +} +// SetOrigin sets the origin property value. The origin property +func (m *InteractionLimitResponse) SetOrigin(value *string)() { + m.origin = value +} +type InteractionLimitResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLimit()(*InteractionGroup) + GetOrigin()(*string) + SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLimit(value *InteractionGroup)() + SetOrigin(value *string)() +} diff --git a/pkg/github/models/issue.go b/pkg/github/models/issue.go new file mode 100644 index 0000000..465c7bb --- /dev/null +++ b/pkg/github/models/issue.go @@ -0,0 +1,1059 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Issue issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +type Issue struct { + // The active_lock_reason property + active_lock_reason *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee NullableSimpleUserable + // The assignees property + assignees []SimpleUserable + // How the author is associated with the repository. + author_association *AuthorAssociation + // Contents of the issue + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + closed_by NullableSimpleUserable + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The draft property + draft *bool + // The events_url property + events_url *string + // The html_url property + html_url *string + // The id property + id *int64 + // Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + labels []string + // The labels_url property + labels_url *string + // The locked property + locked *bool + // A collection of related issues and pull requests. + milestone NullableMilestoneable + // The node_id property + node_id *string + // Number uniquely identifying the issue within its repository + number *int32 + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The pull_request property + pull_request Issue_pull_requestable + // The reactions property + reactions ReactionRollupable + // A repository on GitHub. + repository Repositoryable + // The repository_url property + repository_url *string + // State of the issue; either 'open' or 'closed' + state *string + // The reason for the current state + state_reason *Issue_state_reason + // The timeline_url property + timeline_url *string + // Title of the issue + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the issue + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewIssue instantiates a new Issue and sets the default values. +func NewIssue()(*Issue) { + m := &Issue{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssue(), nil +} +// GetActiveLockReason gets the active_lock_reason property value. The active_lock_reason property +// returns a *string when successful +func (m *Issue) GetActiveLockReason()(*string) { + return m.active_lock_reason +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Issue) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Issue) GetAssignee()(NullableSimpleUserable) { + return m.assignee +} +// GetAssignees gets the assignees property value. The assignees property +// returns a []SimpleUserable when successful +func (m *Issue) GetAssignees()([]SimpleUserable) { + return m.assignees +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *Issue) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. Contents of the issue +// returns a *string when successful +func (m *Issue) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *Issue) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *Issue) GetBodyText()(*string) { + return m.body_text +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *Issue) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetClosedBy gets the closed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Issue) GetClosedBy()(NullableSimpleUserable) { + return m.closed_by +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *Issue) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *Issue) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Issue) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDraft gets the draft property value. The draft property +// returns a *bool when successful +func (m *Issue) GetDraft()(*bool) { + return m.draft +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *Issue) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Issue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active_lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveLockReason(val) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(NullableSimpleUserable)) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetAssignees(res) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["closed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClosedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["locked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocked(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMilestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(NullableMilestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssue_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(Issue_pull_requestable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(Repositoryable)) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["state_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIssue_state_reason) + if err != nil { + return err + } + if val != nil { + m.SetStateReason(val.(*Issue_state_reason)) + } + return nil + } + res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimelineUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Issue) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Issue) GetId()(*int64) { + return m.id +} +// GetLabels gets the labels property value. Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository +// returns a []string when successful +func (m *Issue) GetLabels()([]string) { + return m.labels +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *Issue) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLocked gets the locked property value. The locked property +// returns a *bool when successful +func (m *Issue) GetLocked()(*bool) { + return m.locked +} +// GetMilestone gets the milestone property value. A collection of related issues and pull requests. +// returns a NullableMilestoneable when successful +func (m *Issue) GetMilestone()(NullableMilestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Issue) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. Number uniquely identifying the issue within its repository +// returns a *int32 when successful +func (m *Issue) GetNumber()(*int32) { + return m.number +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *Issue) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetPullRequest gets the pull_request property value. The pull_request property +// returns a Issue_pull_requestable when successful +func (m *Issue) GetPullRequest()(Issue_pull_requestable) { + return m.pull_request +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *Issue) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetRepository gets the repository property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *Issue) GetRepository()(Repositoryable) { + return m.repository +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *Issue) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetState gets the state property value. State of the issue; either 'open' or 'closed' +// returns a *string when successful +func (m *Issue) GetState()(*string) { + return m.state +} +// GetStateReason gets the state_reason property value. The reason for the current state +// returns a *Issue_state_reason when successful +func (m *Issue) GetStateReason()(*Issue_state_reason) { + return m.state_reason +} +// GetTimelineUrl gets the timeline_url property value. The timeline_url property +// returns a *string when successful +func (m *Issue) GetTimelineUrl()(*string) { + return m.timeline_url +} +// GetTitle gets the title property value. Title of the issue +// returns a *string when successful +func (m *Issue) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Issue) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the issue +// returns a *string when successful +func (m *Issue) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Issue) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *Issue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("active_lock_reason", m.GetActiveLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignees())) + for i, v := range m.GetAssignees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("assignees", cast) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("closed_by", m.GetClosedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("locked", m.GetLocked()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + if m.GetStateReason() != nil { + cast := (*m.GetStateReason()).String() + err := writer.WriteStringValue("state_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveLockReason sets the active_lock_reason property value. The active_lock_reason property +func (m *Issue) SetActiveLockReason(value *string)() { + m.active_lock_reason = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Issue) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *Issue) SetAssignee(value NullableSimpleUserable)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. The assignees property +func (m *Issue) SetAssignees(value []SimpleUserable)() { + m.assignees = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *Issue) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. Contents of the issue +func (m *Issue) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *Issue) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *Issue) SetBodyText(value *string)() { + m.body_text = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *Issue) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetClosedBy sets the closed_by property value. A GitHub user. +func (m *Issue) SetClosedBy(value NullableSimpleUserable)() { + m.closed_by = value +} +// SetComments sets the comments property value. The comments property +func (m *Issue) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *Issue) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Issue) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDraft sets the draft property value. The draft property +func (m *Issue) SetDraft(value *bool)() { + m.draft = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *Issue) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Issue) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Issue) SetId(value *int64)() { + m.id = value +} +// SetLabels sets the labels property value. Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository +func (m *Issue) SetLabels(value []string)() { + m.labels = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *Issue) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLocked sets the locked property value. The locked property +func (m *Issue) SetLocked(value *bool)() { + m.locked = value +} +// SetMilestone sets the milestone property value. A collection of related issues and pull requests. +func (m *Issue) SetMilestone(value NullableMilestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Issue) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. Number uniquely identifying the issue within its repository +func (m *Issue) SetNumber(value *int32)() { + m.number = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *Issue) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetPullRequest sets the pull_request property value. The pull_request property +func (m *Issue) SetPullRequest(value Issue_pull_requestable)() { + m.pull_request = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *Issue) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetRepository sets the repository property value. A repository on GitHub. +func (m *Issue) SetRepository(value Repositoryable)() { + m.repository = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *Issue) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetState sets the state property value. State of the issue; either 'open' or 'closed' +func (m *Issue) SetState(value *string)() { + m.state = value +} +// SetStateReason sets the state_reason property value. The reason for the current state +func (m *Issue) SetStateReason(value *Issue_state_reason)() { + m.state_reason = value +} +// SetTimelineUrl sets the timeline_url property value. The timeline_url property +func (m *Issue) SetTimelineUrl(value *string)() { + m.timeline_url = value +} +// SetTitle sets the title property value. Title of the issue +func (m *Issue) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Issue) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the issue +func (m *Issue) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *Issue) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type Issueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveLockReason()(*string) + GetAssignee()(NullableSimpleUserable) + GetAssignees()([]SimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetClosedBy()(NullableSimpleUserable) + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDraft()(*bool) + GetEventsUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLabels()([]string) + GetLabelsUrl()(*string) + GetLocked()(*bool) + GetMilestone()(NullableMilestoneable) + GetNodeId()(*string) + GetNumber()(*int32) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetPullRequest()(Issue_pull_requestable) + GetReactions()(ReactionRollupable) + GetRepository()(Repositoryable) + GetRepositoryUrl()(*string) + GetState()(*string) + GetStateReason()(*Issue_state_reason) + GetTimelineUrl()(*string) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetActiveLockReason(value *string)() + SetAssignee(value NullableSimpleUserable)() + SetAssignees(value []SimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetClosedBy(value NullableSimpleUserable)() + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDraft(value *bool)() + SetEventsUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLabels(value []string)() + SetLabelsUrl(value *string)() + SetLocked(value *bool)() + SetMilestone(value NullableMilestoneable)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetPullRequest(value Issue_pull_requestable)() + SetReactions(value ReactionRollupable)() + SetRepository(value Repositoryable)() + SetRepositoryUrl(value *string)() + SetState(value *string)() + SetStateReason(value *Issue_state_reason)() + SetTimelineUrl(value *string)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/issue503_error.go b/pkg/github/models/issue503_error.go new file mode 100644 index 0000000..13e279b --- /dev/null +++ b/pkg/github/models/issue503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Issue503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewIssue503Error instantiates a new Issue503Error and sets the default values. +func NewIssue503Error()(*Issue503Error) { + m := &Issue503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssue503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssue503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssue503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Issue503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Issue503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Issue503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Issue503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Issue503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Issue503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Issue503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Issue503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Issue503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Issue503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Issue503Error) SetMessage(value *string)() { + m.message = value +} +type Issue503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/issue_comment.go b/pkg/github/models/issue_comment.go new file mode 100644 index 0000000..f462410 --- /dev/null +++ b/pkg/github/models/issue_comment.go @@ -0,0 +1,460 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueComment comments provide a way for people to collaborate on an issue. +type IssueComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // Contents of the issue comment + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // Unique identifier of the issue comment + id *int64 + // The issue_url property + issue_url *string + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The reactions property + reactions ReactionRollupable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the issue comment + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewIssueComment instantiates a new IssueComment and sets the default values. +func NewIssueComment()(*IssueComment) { + m := &IssueComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *IssueComment) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. Contents of the issue comment +// returns a *string when successful +func (m *IssueComment) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *IssueComment) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *IssueComment) GetBodyText()(*string) { + return m.body_text +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *IssueComment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issue_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *IssueComment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the issue comment +// returns a *int64 when successful +func (m *IssueComment) GetId()(*int64) { + return m.id +} +// GetIssueUrl gets the issue_url property value. The issue_url property +// returns a *string when successful +func (m *IssueComment) GetIssueUrl()(*string) { + return m.issue_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *IssueComment) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *IssueComment) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *IssueComment) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *IssueComment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the issue comment +// returns a *string when successful +func (m *IssueComment) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueComment) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *IssueComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_url", m.GetIssueUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *IssueComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *IssueComment) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. Contents of the issue comment +func (m *IssueComment) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *IssueComment) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *IssueComment) SetBodyText(value *string)() { + m.body_text = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *IssueComment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *IssueComment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the issue comment +func (m *IssueComment) SetId(value *int64)() { + m.id = value +} +// SetIssueUrl sets the issue_url property value. The issue_url property +func (m *IssueComment) SetIssueUrl(value *string)() { + m.issue_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *IssueComment) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *IssueComment) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *IssueComment) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *IssueComment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the issue comment +func (m *IssueComment) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *IssueComment) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type IssueCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueUrl()(*string) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetReactions()(ReactionRollupable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueUrl(value *string)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetReactions(value ReactionRollupable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/issue_event.go b/pkg/github/models/issue_event.go new file mode 100644 index 0000000..43fcef6 --- /dev/null +++ b/pkg/github/models/issue_event.go @@ -0,0 +1,692 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueEvent issue Event +type IssueEvent struct { + // A GitHub user. + actor NullableSimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee NullableSimpleUserable + // A GitHub user. + assigner NullableSimpleUserable + // How the author is associated with the repository. + author_association *AuthorAssociation + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The dismissed_review property + dismissed_review IssueEventDismissedReviewable + // The event property + event *string + // The id property + id *int64 + // Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + issue NullableIssueable + // Issue Event Label + label IssueEventLabelable + // The lock_reason property + lock_reason *string + // Issue Event Milestone + milestone IssueEventMilestoneable + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // Issue Event Project Card + project_card IssueEventProjectCardable + // Issue Event Rename + rename IssueEventRenameable + // A GitHub user. + requested_reviewer NullableSimpleUserable + // Groups of organization members that gives permissions on specified repositories. + requested_team Teamable + // A GitHub user. + review_requester NullableSimpleUserable + // The url property + url *string +} +// NewIssueEvent instantiates a new IssueEvent and sets the default values. +func NewIssueEvent()(*IssueEvent) { + m := &IssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueEvent) GetActor()(NullableSimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueEvent) GetAssignee()(NullableSimpleUserable) { + return m.assignee +} +// GetAssigner gets the assigner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueEvent) GetAssigner()(NullableSimpleUserable) { + return m.assigner +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *IssueEvent) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *IssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *IssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *IssueEvent) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDismissedReview gets the dismissed_review property value. The dismissed_review property +// returns a IssueEventDismissedReviewable when successful +func (m *IssueEvent) GetDismissedReview()(IssueEventDismissedReviewable) { + return m.dismissed_review +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *IssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(NullableSimpleUserable)) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(NullableSimpleUserable)) + } + return nil + } + res["assigner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssigner(val.(NullableSimpleUserable)) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dismissed_review"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueEventDismissedReviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReview(val.(IssueEventDismissedReviewable)) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssue(val.(NullableIssueable)) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueEventLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabel(val.(IssueEventLabelable)) + } + return nil + } + res["lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLockReason(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueEventMilestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(IssueEventMilestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["project_card"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueEventProjectCardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProjectCard(val.(IssueEventProjectCardable)) + } + return nil + } + res["rename"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueEventRenameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRename(val.(IssueEventRenameable)) + } + return nil + } + res["requested_reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedReviewer(val.(NullableSimpleUserable)) + } + return nil + } + res["requested_team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedTeam(val.(Teamable)) + } + return nil + } + res["review_requester"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewRequester(val.(NullableSimpleUserable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *IssueEvent) GetId()(*int64) { + return m.id +} +// GetIssue gets the issue property value. Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +// returns a NullableIssueable when successful +func (m *IssueEvent) GetIssue()(NullableIssueable) { + return m.issue +} +// GetLabel gets the label property value. Issue Event Label +// returns a IssueEventLabelable when successful +func (m *IssueEvent) GetLabel()(IssueEventLabelable) { + return m.label +} +// GetLockReason gets the lock_reason property value. The lock_reason property +// returns a *string when successful +func (m *IssueEvent) GetLockReason()(*string) { + return m.lock_reason +} +// GetMilestone gets the milestone property value. Issue Event Milestone +// returns a IssueEventMilestoneable when successful +func (m *IssueEvent) GetMilestone()(IssueEventMilestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *IssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *IssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetProjectCard gets the project_card property value. Issue Event Project Card +// returns a IssueEventProjectCardable when successful +func (m *IssueEvent) GetProjectCard()(IssueEventProjectCardable) { + return m.project_card +} +// GetRename gets the rename property value. Issue Event Rename +// returns a IssueEventRenameable when successful +func (m *IssueEvent) GetRename()(IssueEventRenameable) { + return m.rename +} +// GetRequestedReviewer gets the requested_reviewer property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueEvent) GetRequestedReviewer()(NullableSimpleUserable) { + return m.requested_reviewer +} +// GetRequestedTeam gets the requested_team property value. Groups of organization members that gives permissions on specified repositories. +// returns a Teamable when successful +func (m *IssueEvent) GetRequestedTeam()(Teamable) { + return m.requested_team +} +// GetReviewRequester gets the review_requester property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueEvent) GetReviewRequester()(NullableSimpleUserable) { + return m.review_requester +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *IssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *IssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assigner", m.GetAssigner()) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dismissed_review", m.GetDismissedReview()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("issue", m.GetIssue()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lock_reason", m.GetLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("project_card", m.GetProjectCard()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rename", m.GetRename()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requested_reviewer", m.GetRequestedReviewer()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requested_team", m.GetRequestedTeam()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_requester", m.GetReviewRequester()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *IssueEvent) SetActor(value NullableSimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *IssueEvent) SetAssignee(value NullableSimpleUserable)() { + m.assignee = value +} +// SetAssigner sets the assigner property value. A GitHub user. +func (m *IssueEvent) SetAssigner(value NullableSimpleUserable)() { + m.assigner = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *IssueEvent) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *IssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *IssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *IssueEvent) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDismissedReview sets the dismissed_review property value. The dismissed_review property +func (m *IssueEvent) SetDismissedReview(value IssueEventDismissedReviewable)() { + m.dismissed_review = value +} +// SetEvent sets the event property value. The event property +func (m *IssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *IssueEvent) SetId(value *int64)() { + m.id = value +} +// SetIssue sets the issue property value. Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +func (m *IssueEvent) SetIssue(value NullableIssueable)() { + m.issue = value +} +// SetLabel sets the label property value. Issue Event Label +func (m *IssueEvent) SetLabel(value IssueEventLabelable)() { + m.label = value +} +// SetLockReason sets the lock_reason property value. The lock_reason property +func (m *IssueEvent) SetLockReason(value *string)() { + m.lock_reason = value +} +// SetMilestone sets the milestone property value. Issue Event Milestone +func (m *IssueEvent) SetMilestone(value IssueEventMilestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *IssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *IssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetProjectCard sets the project_card property value. Issue Event Project Card +func (m *IssueEvent) SetProjectCard(value IssueEventProjectCardable)() { + m.project_card = value +} +// SetRename sets the rename property value. Issue Event Rename +func (m *IssueEvent) SetRename(value IssueEventRenameable)() { + m.rename = value +} +// SetRequestedReviewer sets the requested_reviewer property value. A GitHub user. +func (m *IssueEvent) SetRequestedReviewer(value NullableSimpleUserable)() { + m.requested_reviewer = value +} +// SetRequestedTeam sets the requested_team property value. Groups of organization members that gives permissions on specified repositories. +func (m *IssueEvent) SetRequestedTeam(value Teamable)() { + m.requested_team = value +} +// SetReviewRequester sets the review_requester property value. A GitHub user. +func (m *IssueEvent) SetReviewRequester(value NullableSimpleUserable)() { + m.review_requester = value +} +// SetUrl sets the url property value. The url property +func (m *IssueEvent) SetUrl(value *string)() { + m.url = value +} +type IssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(NullableSimpleUserable) + GetAssignee()(NullableSimpleUserable) + GetAssigner()(NullableSimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedReview()(IssueEventDismissedReviewable) + GetEvent()(*string) + GetId()(*int64) + GetIssue()(NullableIssueable) + GetLabel()(IssueEventLabelable) + GetLockReason()(*string) + GetMilestone()(IssueEventMilestoneable) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetProjectCard()(IssueEventProjectCardable) + GetRename()(IssueEventRenameable) + GetRequestedReviewer()(NullableSimpleUserable) + GetRequestedTeam()(Teamable) + GetReviewRequester()(NullableSimpleUserable) + GetUrl()(*string) + SetActor(value NullableSimpleUserable)() + SetAssignee(value NullableSimpleUserable)() + SetAssigner(value NullableSimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedReview(value IssueEventDismissedReviewable)() + SetEvent(value *string)() + SetId(value *int64)() + SetIssue(value NullableIssueable)() + SetLabel(value IssueEventLabelable)() + SetLockReason(value *string)() + SetMilestone(value IssueEventMilestoneable)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetProjectCard(value IssueEventProjectCardable)() + SetRename(value IssueEventRenameable)() + SetRequestedReviewer(value NullableSimpleUserable)() + SetRequestedTeam(value Teamable)() + SetReviewRequester(value NullableSimpleUserable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/issue_event_dismissed_review.go b/pkg/github/models/issue_event_dismissed_review.go new file mode 100644 index 0000000..4e4a9e3 --- /dev/null +++ b/pkg/github/models/issue_event_dismissed_review.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IssueEventDismissedReview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dismissal_commit_id property + dismissal_commit_id *string + // The dismissal_message property + dismissal_message *string + // The review_id property + review_id *int32 + // The state property + state *string +} +// NewIssueEventDismissedReview instantiates a new IssueEventDismissedReview and sets the default values. +func NewIssueEventDismissedReview()(*IssueEventDismissedReview) { + m := &IssueEventDismissedReview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueEventDismissedReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventDismissedReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueEventDismissedReview(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueEventDismissedReview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDismissalCommitId gets the dismissal_commit_id property value. The dismissal_commit_id property +// returns a *string when successful +func (m *IssueEventDismissedReview) GetDismissalCommitId()(*string) { + return m.dismissal_commit_id +} +// GetDismissalMessage gets the dismissal_message property value. The dismissal_message property +// returns a *string when successful +func (m *IssueEventDismissedReview) GetDismissalMessage()(*string) { + return m.dismissal_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEventDismissedReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dismissal_commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissalCommitId(val) + } + return nil + } + res["dismissal_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissalMessage(val) + } + return nil + } + res["review_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReviewId(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetReviewId gets the review_id property value. The review_id property +// returns a *int32 when successful +func (m *IssueEventDismissedReview) GetReviewId()(*int32) { + return m.review_id +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *IssueEventDismissedReview) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *IssueEventDismissedReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dismissal_commit_id", m.GetDismissalCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissal_message", m.GetDismissalMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("review_id", m.GetReviewId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *IssueEventDismissedReview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDismissalCommitId sets the dismissal_commit_id property value. The dismissal_commit_id property +func (m *IssueEventDismissedReview) SetDismissalCommitId(value *string)() { + m.dismissal_commit_id = value +} +// SetDismissalMessage sets the dismissal_message property value. The dismissal_message property +func (m *IssueEventDismissedReview) SetDismissalMessage(value *string)() { + m.dismissal_message = value +} +// SetReviewId sets the review_id property value. The review_id property +func (m *IssueEventDismissedReview) SetReviewId(value *int32)() { + m.review_id = value +} +// SetState sets the state property value. The state property +func (m *IssueEventDismissedReview) SetState(value *string)() { + m.state = value +} +type IssueEventDismissedReviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDismissalCommitId()(*string) + GetDismissalMessage()(*string) + GetReviewId()(*int32) + GetState()(*string) + SetDismissalCommitId(value *string)() + SetDismissalMessage(value *string)() + SetReviewId(value *int32)() + SetState(value *string)() +} diff --git a/pkg/github/models/issue_event_for_issue.go b/pkg/github/models/issue_event_for_issue.go new file mode 100644 index 0000000..498fd5c --- /dev/null +++ b/pkg/github/models/issue_event_for_issue.go @@ -0,0 +1,417 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueEventForIssue composed type wrapper for classes AddedToProjectIssueEventable, AssignedIssueEventable, ConvertedNoteToIssueIssueEventable, DemilestonedIssueEventable, LabeledIssueEventable, LockedIssueEventable, MilestonedIssueEventable, MovedColumnInProjectIssueEventable, RemovedFromProjectIssueEventable, RenamedIssueEventable, ReviewDismissedIssueEventable, ReviewRequestedIssueEventable, ReviewRequestRemovedIssueEventable, UnassignedIssueEventable, UnlabeledIssueEventable +type IssueEventForIssue struct { + // Composed type representation for type AddedToProjectIssueEventable + addedToProjectIssueEvent AddedToProjectIssueEventable + // Composed type representation for type AssignedIssueEventable + assignedIssueEvent AssignedIssueEventable + // Composed type representation for type ConvertedNoteToIssueIssueEventable + convertedNoteToIssueIssueEvent ConvertedNoteToIssueIssueEventable + // Composed type representation for type DemilestonedIssueEventable + demilestonedIssueEvent DemilestonedIssueEventable + // Composed type representation for type LabeledIssueEventable + labeledIssueEvent LabeledIssueEventable + // Composed type representation for type LockedIssueEventable + lockedIssueEvent LockedIssueEventable + // Composed type representation for type MilestonedIssueEventable + milestonedIssueEvent MilestonedIssueEventable + // Composed type representation for type MovedColumnInProjectIssueEventable + movedColumnInProjectIssueEvent MovedColumnInProjectIssueEventable + // Composed type representation for type RemovedFromProjectIssueEventable + removedFromProjectIssueEvent RemovedFromProjectIssueEventable + // Composed type representation for type RenamedIssueEventable + renamedIssueEvent RenamedIssueEventable + // Composed type representation for type ReviewDismissedIssueEventable + reviewDismissedIssueEvent ReviewDismissedIssueEventable + // Composed type representation for type ReviewRequestedIssueEventable + reviewRequestedIssueEvent ReviewRequestedIssueEventable + // Composed type representation for type ReviewRequestRemovedIssueEventable + reviewRequestRemovedIssueEvent ReviewRequestRemovedIssueEventable + // Composed type representation for type UnassignedIssueEventable + unassignedIssueEvent UnassignedIssueEventable + // Composed type representation for type UnlabeledIssueEventable + unlabeledIssueEvent UnlabeledIssueEventable +} +// NewIssueEventForIssue instantiates a new IssueEventForIssue and sets the default values. +func NewIssueEventForIssue()(*IssueEventForIssue) { + m := &IssueEventForIssue{ + } + return m +} +// CreateIssueEventForIssueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventForIssueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewIssueEventForIssue() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateAddedToProjectIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(AddedToProjectIssueEventable); ok { + result.SetAddedToProjectIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateAssignedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(AssignedIssueEventable); ok { + result.SetAssignedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateConvertedNoteToIssueIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ConvertedNoteToIssueIssueEventable); ok { + result.SetConvertedNoteToIssueIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateDemilestonedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(DemilestonedIssueEventable); ok { + result.SetDemilestonedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateLabeledIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(LabeledIssueEventable); ok { + result.SetLabeledIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateLockedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(LockedIssueEventable); ok { + result.SetLockedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateMilestonedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(MilestonedIssueEventable); ok { + result.SetMilestonedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateMovedColumnInProjectIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(MovedColumnInProjectIssueEventable); ok { + result.SetMovedColumnInProjectIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateRemovedFromProjectIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(RemovedFromProjectIssueEventable); ok { + result.SetRemovedFromProjectIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateRenamedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(RenamedIssueEventable); ok { + result.SetRenamedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateReviewDismissedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ReviewDismissedIssueEventable); ok { + result.SetReviewDismissedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateReviewRequestedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ReviewRequestedIssueEventable); ok { + result.SetReviewRequestedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateReviewRequestRemovedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ReviewRequestRemovedIssueEventable); ok { + result.SetReviewRequestRemovedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateUnassignedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(UnassignedIssueEventable); ok { + result.SetUnassignedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateUnlabeledIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(UnlabeledIssueEventable); ok { + result.SetUnlabeledIssueEvent(cast) + } + } + } + return result, nil +} +// GetAddedToProjectIssueEvent gets the addedToProjectIssueEvent property value. Composed type representation for type AddedToProjectIssueEventable +// returns a AddedToProjectIssueEventable when successful +func (m *IssueEventForIssue) GetAddedToProjectIssueEvent()(AddedToProjectIssueEventable) { + return m.addedToProjectIssueEvent +} +// GetAssignedIssueEvent gets the assignedIssueEvent property value. Composed type representation for type AssignedIssueEventable +// returns a AssignedIssueEventable when successful +func (m *IssueEventForIssue) GetAssignedIssueEvent()(AssignedIssueEventable) { + return m.assignedIssueEvent +} +// GetConvertedNoteToIssueIssueEvent gets the convertedNoteToIssueIssueEvent property value. Composed type representation for type ConvertedNoteToIssueIssueEventable +// returns a ConvertedNoteToIssueIssueEventable when successful +func (m *IssueEventForIssue) GetConvertedNoteToIssueIssueEvent()(ConvertedNoteToIssueIssueEventable) { + return m.convertedNoteToIssueIssueEvent +} +// GetDemilestonedIssueEvent gets the demilestonedIssueEvent property value. Composed type representation for type DemilestonedIssueEventable +// returns a DemilestonedIssueEventable when successful +func (m *IssueEventForIssue) GetDemilestonedIssueEvent()(DemilestonedIssueEventable) { + return m.demilestonedIssueEvent +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEventForIssue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *IssueEventForIssue) GetIsComposedType()(bool) { + return true +} +// GetLabeledIssueEvent gets the labeledIssueEvent property value. Composed type representation for type LabeledIssueEventable +// returns a LabeledIssueEventable when successful +func (m *IssueEventForIssue) GetLabeledIssueEvent()(LabeledIssueEventable) { + return m.labeledIssueEvent +} +// GetLockedIssueEvent gets the lockedIssueEvent property value. Composed type representation for type LockedIssueEventable +// returns a LockedIssueEventable when successful +func (m *IssueEventForIssue) GetLockedIssueEvent()(LockedIssueEventable) { + return m.lockedIssueEvent +} +// GetMilestonedIssueEvent gets the milestonedIssueEvent property value. Composed type representation for type MilestonedIssueEventable +// returns a MilestonedIssueEventable when successful +func (m *IssueEventForIssue) GetMilestonedIssueEvent()(MilestonedIssueEventable) { + return m.milestonedIssueEvent +} +// GetMovedColumnInProjectIssueEvent gets the movedColumnInProjectIssueEvent property value. Composed type representation for type MovedColumnInProjectIssueEventable +// returns a MovedColumnInProjectIssueEventable when successful +func (m *IssueEventForIssue) GetMovedColumnInProjectIssueEvent()(MovedColumnInProjectIssueEventable) { + return m.movedColumnInProjectIssueEvent +} +// GetRemovedFromProjectIssueEvent gets the removedFromProjectIssueEvent property value. Composed type representation for type RemovedFromProjectIssueEventable +// returns a RemovedFromProjectIssueEventable when successful +func (m *IssueEventForIssue) GetRemovedFromProjectIssueEvent()(RemovedFromProjectIssueEventable) { + return m.removedFromProjectIssueEvent +} +// GetRenamedIssueEvent gets the renamedIssueEvent property value. Composed type representation for type RenamedIssueEventable +// returns a RenamedIssueEventable when successful +func (m *IssueEventForIssue) GetRenamedIssueEvent()(RenamedIssueEventable) { + return m.renamedIssueEvent +} +// GetReviewDismissedIssueEvent gets the reviewDismissedIssueEvent property value. Composed type representation for type ReviewDismissedIssueEventable +// returns a ReviewDismissedIssueEventable when successful +func (m *IssueEventForIssue) GetReviewDismissedIssueEvent()(ReviewDismissedIssueEventable) { + return m.reviewDismissedIssueEvent +} +// GetReviewRequestedIssueEvent gets the reviewRequestedIssueEvent property value. Composed type representation for type ReviewRequestedIssueEventable +// returns a ReviewRequestedIssueEventable when successful +func (m *IssueEventForIssue) GetReviewRequestedIssueEvent()(ReviewRequestedIssueEventable) { + return m.reviewRequestedIssueEvent +} +// GetReviewRequestRemovedIssueEvent gets the reviewRequestRemovedIssueEvent property value. Composed type representation for type ReviewRequestRemovedIssueEventable +// returns a ReviewRequestRemovedIssueEventable when successful +func (m *IssueEventForIssue) GetReviewRequestRemovedIssueEvent()(ReviewRequestRemovedIssueEventable) { + return m.reviewRequestRemovedIssueEvent +} +// GetUnassignedIssueEvent gets the unassignedIssueEvent property value. Composed type representation for type UnassignedIssueEventable +// returns a UnassignedIssueEventable when successful +func (m *IssueEventForIssue) GetUnassignedIssueEvent()(UnassignedIssueEventable) { + return m.unassignedIssueEvent +} +// GetUnlabeledIssueEvent gets the unlabeledIssueEvent property value. Composed type representation for type UnlabeledIssueEventable +// returns a UnlabeledIssueEventable when successful +func (m *IssueEventForIssue) GetUnlabeledIssueEvent()(UnlabeledIssueEventable) { + return m.unlabeledIssueEvent +} +// Serialize serializes information the current object +func (m *IssueEventForIssue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAddedToProjectIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetAddedToProjectIssueEvent()) + if err != nil { + return err + } + } else if m.GetAssignedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetAssignedIssueEvent()) + if err != nil { + return err + } + } else if m.GetConvertedNoteToIssueIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetConvertedNoteToIssueIssueEvent()) + if err != nil { + return err + } + } else if m.GetDemilestonedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetDemilestonedIssueEvent()) + if err != nil { + return err + } + } else if m.GetLabeledIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetLabeledIssueEvent()) + if err != nil { + return err + } + } else if m.GetLockedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetLockedIssueEvent()) + if err != nil { + return err + } + } else if m.GetMilestonedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetMilestonedIssueEvent()) + if err != nil { + return err + } + } else if m.GetMovedColumnInProjectIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetMovedColumnInProjectIssueEvent()) + if err != nil { + return err + } + } else if m.GetRemovedFromProjectIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetRemovedFromProjectIssueEvent()) + if err != nil { + return err + } + } else if m.GetRenamedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetRenamedIssueEvent()) + if err != nil { + return err + } + } else if m.GetReviewDismissedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetReviewDismissedIssueEvent()) + if err != nil { + return err + } + } else if m.GetReviewRequestedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetReviewRequestedIssueEvent()) + if err != nil { + return err + } + } else if m.GetReviewRequestRemovedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetReviewRequestRemovedIssueEvent()) + if err != nil { + return err + } + } else if m.GetUnassignedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetUnassignedIssueEvent()) + if err != nil { + return err + } + } else if m.GetUnlabeledIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetUnlabeledIssueEvent()) + if err != nil { + return err + } + } + return nil +} +// SetAddedToProjectIssueEvent sets the addedToProjectIssueEvent property value. Composed type representation for type AddedToProjectIssueEventable +func (m *IssueEventForIssue) SetAddedToProjectIssueEvent(value AddedToProjectIssueEventable)() { + m.addedToProjectIssueEvent = value +} +// SetAssignedIssueEvent sets the assignedIssueEvent property value. Composed type representation for type AssignedIssueEventable +func (m *IssueEventForIssue) SetAssignedIssueEvent(value AssignedIssueEventable)() { + m.assignedIssueEvent = value +} +// SetConvertedNoteToIssueIssueEvent sets the convertedNoteToIssueIssueEvent property value. Composed type representation for type ConvertedNoteToIssueIssueEventable +func (m *IssueEventForIssue) SetConvertedNoteToIssueIssueEvent(value ConvertedNoteToIssueIssueEventable)() { + m.convertedNoteToIssueIssueEvent = value +} +// SetDemilestonedIssueEvent sets the demilestonedIssueEvent property value. Composed type representation for type DemilestonedIssueEventable +func (m *IssueEventForIssue) SetDemilestonedIssueEvent(value DemilestonedIssueEventable)() { + m.demilestonedIssueEvent = value +} +// SetLabeledIssueEvent sets the labeledIssueEvent property value. Composed type representation for type LabeledIssueEventable +func (m *IssueEventForIssue) SetLabeledIssueEvent(value LabeledIssueEventable)() { + m.labeledIssueEvent = value +} +// SetLockedIssueEvent sets the lockedIssueEvent property value. Composed type representation for type LockedIssueEventable +func (m *IssueEventForIssue) SetLockedIssueEvent(value LockedIssueEventable)() { + m.lockedIssueEvent = value +} +// SetMilestonedIssueEvent sets the milestonedIssueEvent property value. Composed type representation for type MilestonedIssueEventable +func (m *IssueEventForIssue) SetMilestonedIssueEvent(value MilestonedIssueEventable)() { + m.milestonedIssueEvent = value +} +// SetMovedColumnInProjectIssueEvent sets the movedColumnInProjectIssueEvent property value. Composed type representation for type MovedColumnInProjectIssueEventable +func (m *IssueEventForIssue) SetMovedColumnInProjectIssueEvent(value MovedColumnInProjectIssueEventable)() { + m.movedColumnInProjectIssueEvent = value +} +// SetRemovedFromProjectIssueEvent sets the removedFromProjectIssueEvent property value. Composed type representation for type RemovedFromProjectIssueEventable +func (m *IssueEventForIssue) SetRemovedFromProjectIssueEvent(value RemovedFromProjectIssueEventable)() { + m.removedFromProjectIssueEvent = value +} +// SetRenamedIssueEvent sets the renamedIssueEvent property value. Composed type representation for type RenamedIssueEventable +func (m *IssueEventForIssue) SetRenamedIssueEvent(value RenamedIssueEventable)() { + m.renamedIssueEvent = value +} +// SetReviewDismissedIssueEvent sets the reviewDismissedIssueEvent property value. Composed type representation for type ReviewDismissedIssueEventable +func (m *IssueEventForIssue) SetReviewDismissedIssueEvent(value ReviewDismissedIssueEventable)() { + m.reviewDismissedIssueEvent = value +} +// SetReviewRequestedIssueEvent sets the reviewRequestedIssueEvent property value. Composed type representation for type ReviewRequestedIssueEventable +func (m *IssueEventForIssue) SetReviewRequestedIssueEvent(value ReviewRequestedIssueEventable)() { + m.reviewRequestedIssueEvent = value +} +// SetReviewRequestRemovedIssueEvent sets the reviewRequestRemovedIssueEvent property value. Composed type representation for type ReviewRequestRemovedIssueEventable +func (m *IssueEventForIssue) SetReviewRequestRemovedIssueEvent(value ReviewRequestRemovedIssueEventable)() { + m.reviewRequestRemovedIssueEvent = value +} +// SetUnassignedIssueEvent sets the unassignedIssueEvent property value. Composed type representation for type UnassignedIssueEventable +func (m *IssueEventForIssue) SetUnassignedIssueEvent(value UnassignedIssueEventable)() { + m.unassignedIssueEvent = value +} +// SetUnlabeledIssueEvent sets the unlabeledIssueEvent property value. Composed type representation for type UnlabeledIssueEventable +func (m *IssueEventForIssue) SetUnlabeledIssueEvent(value UnlabeledIssueEventable)() { + m.unlabeledIssueEvent = value +} +type IssueEventForIssueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedToProjectIssueEvent()(AddedToProjectIssueEventable) + GetAssignedIssueEvent()(AssignedIssueEventable) + GetConvertedNoteToIssueIssueEvent()(ConvertedNoteToIssueIssueEventable) + GetDemilestonedIssueEvent()(DemilestonedIssueEventable) + GetLabeledIssueEvent()(LabeledIssueEventable) + GetLockedIssueEvent()(LockedIssueEventable) + GetMilestonedIssueEvent()(MilestonedIssueEventable) + GetMovedColumnInProjectIssueEvent()(MovedColumnInProjectIssueEventable) + GetRemovedFromProjectIssueEvent()(RemovedFromProjectIssueEventable) + GetRenamedIssueEvent()(RenamedIssueEventable) + GetReviewDismissedIssueEvent()(ReviewDismissedIssueEventable) + GetReviewRequestedIssueEvent()(ReviewRequestedIssueEventable) + GetReviewRequestRemovedIssueEvent()(ReviewRequestRemovedIssueEventable) + GetUnassignedIssueEvent()(UnassignedIssueEventable) + GetUnlabeledIssueEvent()(UnlabeledIssueEventable) + SetAddedToProjectIssueEvent(value AddedToProjectIssueEventable)() + SetAssignedIssueEvent(value AssignedIssueEventable)() + SetConvertedNoteToIssueIssueEvent(value ConvertedNoteToIssueIssueEventable)() + SetDemilestonedIssueEvent(value DemilestonedIssueEventable)() + SetLabeledIssueEvent(value LabeledIssueEventable)() + SetLockedIssueEvent(value LockedIssueEventable)() + SetMilestonedIssueEvent(value MilestonedIssueEventable)() + SetMovedColumnInProjectIssueEvent(value MovedColumnInProjectIssueEventable)() + SetRemovedFromProjectIssueEvent(value RemovedFromProjectIssueEventable)() + SetRenamedIssueEvent(value RenamedIssueEventable)() + SetReviewDismissedIssueEvent(value ReviewDismissedIssueEventable)() + SetReviewRequestedIssueEvent(value ReviewRequestedIssueEventable)() + SetReviewRequestRemovedIssueEvent(value ReviewRequestRemovedIssueEventable)() + SetUnassignedIssueEvent(value UnassignedIssueEventable)() + SetUnlabeledIssueEvent(value UnlabeledIssueEventable)() +} diff --git a/pkg/github/models/issue_event_label.go b/pkg/github/models/issue_event_label.go new file mode 100644 index 0000000..8cd5a97 --- /dev/null +++ b/pkg/github/models/issue_event_label.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueEventLabel issue Event Label +type IssueEventLabel struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The name property + name *string +} +// NewIssueEventLabel instantiates a new IssueEventLabel and sets the default values. +func NewIssueEventLabel()(*IssueEventLabel) { + m := &IssueEventLabel{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueEventLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueEventLabel(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueEventLabel) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *IssueEventLabel) GetColor()(*string) { + return m.color +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEventLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(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 + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *IssueEventLabel) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *IssueEventLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *IssueEventLabel) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *IssueEventLabel) SetColor(value *string)() { + m.color = value +} +// SetName sets the name property value. The name property +func (m *IssueEventLabel) SetName(value *string)() { + m.name = value +} +type IssueEventLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetName()(*string) + SetColor(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/issue_event_milestone.go b/pkg/github/models/issue_event_milestone.go new file mode 100644 index 0000000..e43340d --- /dev/null +++ b/pkg/github/models/issue_event_milestone.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueEventMilestone issue Event Milestone +type IssueEventMilestone struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The title property + title *string +} +// NewIssueEventMilestone instantiates a new IssueEventMilestone and sets the default values. +func NewIssueEventMilestone()(*IssueEventMilestone) { + m := &IssueEventMilestone{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueEventMilestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventMilestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueEventMilestone(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueEventMilestone) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEventMilestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *IssueEventMilestone) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *IssueEventMilestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *IssueEventMilestone) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTitle sets the title property value. The title property +func (m *IssueEventMilestone) SetTitle(value *string)() { + m.title = value +} +type IssueEventMilestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTitle()(*string) + SetTitle(value *string)() +} diff --git a/pkg/github/models/issue_event_project_card.go b/pkg/github/models/issue_event_project_card.go new file mode 100644 index 0000000..ca87cbd --- /dev/null +++ b/pkg/github/models/issue_event_project_card.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueEventProjectCard issue Event Project Card +type IssueEventProjectCard struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The column_name property + column_name *string + // The id property + id *int32 + // The previous_column_name property + previous_column_name *string + // The project_id property + project_id *int32 + // The project_url property + project_url *string + // The url property + url *string +} +// NewIssueEventProjectCard instantiates a new IssueEventProjectCard and sets the default values. +func NewIssueEventProjectCard()(*IssueEventProjectCard) { + m := &IssueEventProjectCard{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueEventProjectCardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventProjectCardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueEventProjectCard(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueEventProjectCard) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumnName gets the column_name property value. The column_name property +// returns a *string when successful +func (m *IssueEventProjectCard) GetColumnName()(*string) { + return m.column_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEventProjectCard) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["previous_column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousColumnName(val) + } + return nil + } + res["project_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProjectId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *IssueEventProjectCard) GetId()(*int32) { + return m.id +} +// GetPreviousColumnName gets the previous_column_name property value. The previous_column_name property +// returns a *string when successful +func (m *IssueEventProjectCard) GetPreviousColumnName()(*string) { + return m.previous_column_name +} +// GetProjectId gets the project_id property value. The project_id property +// returns a *int32 when successful +func (m *IssueEventProjectCard) GetProjectId()(*int32) { + return m.project_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *IssueEventProjectCard) GetProjectUrl()(*string) { + return m.project_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *IssueEventProjectCard) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *IssueEventProjectCard) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("column_name", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_column_name", m.GetPreviousColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("project_id", m.GetProjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IssueEventProjectCard) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumnName sets the column_name property value. The column_name property +func (m *IssueEventProjectCard) SetColumnName(value *string)() { + m.column_name = value +} +// SetId sets the id property value. The id property +func (m *IssueEventProjectCard) SetId(value *int32)() { + m.id = value +} +// SetPreviousColumnName sets the previous_column_name property value. The previous_column_name property +func (m *IssueEventProjectCard) SetPreviousColumnName(value *string)() { + m.previous_column_name = value +} +// SetProjectId sets the project_id property value. The project_id property +func (m *IssueEventProjectCard) SetProjectId(value *int32)() { + m.project_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *IssueEventProjectCard) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUrl sets the url property value. The url property +func (m *IssueEventProjectCard) SetUrl(value *string)() { + m.url = value +} +type IssueEventProjectCardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnName()(*string) + GetId()(*int32) + GetPreviousColumnName()(*string) + GetProjectId()(*int32) + GetProjectUrl()(*string) + GetUrl()(*string) + SetColumnName(value *string)() + SetId(value *int32)() + SetPreviousColumnName(value *string)() + SetProjectId(value *int32)() + SetProjectUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/issue_event_rename.go b/pkg/github/models/issue_event_rename.go new file mode 100644 index 0000000..0d8b43c --- /dev/null +++ b/pkg/github/models/issue_event_rename.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueEventRename issue Event Rename +type IssueEventRename struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The from property + from *string + // The to property + to *string +} +// NewIssueEventRename instantiates a new IssueEventRename and sets the default values. +func NewIssueEventRename()(*IssueEventRename) { + m := &IssueEventRename{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueEventRenameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueEventRenameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueEventRename(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueEventRename) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueEventRename) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFrom(val) + } + return nil + } + res["to"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTo(val) + } + return nil + } + return res +} +// GetFrom gets the from property value. The from property +// returns a *string when successful +func (m *IssueEventRename) GetFrom()(*string) { + return m.from +} +// GetTo gets the to property value. The to property +// returns a *string when successful +func (m *IssueEventRename) GetTo()(*string) { + return m.to +} +// Serialize serializes information the current object +func (m *IssueEventRename) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("to", m.GetTo()) + 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 *IssueEventRename) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFrom sets the from property value. The from property +func (m *IssueEventRename) SetFrom(value *string)() { + m.from = value +} +// SetTo sets the to property value. The to property +func (m *IssueEventRename) SetTo(value *string)() { + m.to = value +} +type IssueEventRenameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFrom()(*string) + GetTo()(*string) + SetFrom(value *string)() + SetTo(value *string)() +} diff --git a/pkg/github/models/issue_pull_request.go b/pkg/github/models/issue_pull_request.go new file mode 100644 index 0000000..d34957e --- /dev/null +++ b/pkg/github/models/issue_pull_request.go @@ -0,0 +1,197 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Issue_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The diff_url property + diff_url *string + // The html_url property + html_url *string + // The merged_at property + merged_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The patch_url property + patch_url *string + // The url property + url *string +} +// NewIssue_pull_request instantiates a new Issue_pull_request and sets the default values. +func NewIssue_pull_request()(*Issue_pull_request) { + m := &Issue_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssue_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssue_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssue_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Issue_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiffUrl gets the diff_url property value. The diff_url property +// returns a *string when successful +func (m *Issue_pull_request) GetDiffUrl()(*string) { + return m.diff_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Issue_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["diff_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["merged_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMergedAt(val) + } + return nil + } + res["patch_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Issue_pull_request) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMergedAt gets the merged_at property value. The merged_at property +// returns a *Time when successful +func (m *Issue_pull_request) GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.merged_at +} +// GetPatchUrl gets the patch_url property value. The patch_url property +// returns a *string when successful +func (m *Issue_pull_request) GetPatchUrl()(*string) { + return m.patch_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Issue_pull_request) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Issue_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("diff_url", m.GetDiffUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("merged_at", m.GetMergedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch_url", m.GetPatchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Issue_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiffUrl sets the diff_url property value. The diff_url property +func (m *Issue_pull_request) SetDiffUrl(value *string)() { + m.diff_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Issue_pull_request) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMergedAt sets the merged_at property value. The merged_at property +func (m *Issue_pull_request) SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.merged_at = value +} +// SetPatchUrl sets the patch_url property value. The patch_url property +func (m *Issue_pull_request) SetPatchUrl(value *string)() { + m.patch_url = value +} +// SetUrl sets the url property value. The url property +func (m *Issue_pull_request) SetUrl(value *string)() { + m.url = value +} +type Issue_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiffUrl()(*string) + GetHtmlUrl()(*string) + GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPatchUrl()(*string) + GetUrl()(*string) + SetDiffUrl(value *string)() + SetHtmlUrl(value *string)() + SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPatchUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/issue_search_result_item.go b/pkg/github/models/issue_search_result_item.go new file mode 100644 index 0000000..bb48360 --- /dev/null +++ b/pkg/github/models/issue_search_result_item.go @@ -0,0 +1,1105 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IssueSearchResultItem issue Search Result Item +type IssueSearchResultItem struct { + // The active_lock_reason property + active_lock_reason *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee NullableSimpleUserable + // The assignees property + assignees []SimpleUserable + // How the author is associated with the repository. + author_association *AuthorAssociation + // The body property + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The draft property + draft *bool + // The events_url property + events_url *string + // The html_url property + html_url *string + // The id property + id *int64 + // The labels property + labels []IssueSearchResultItem_labelsable + // The labels_url property + labels_url *string + // The locked property + locked *bool + // A collection of related issues and pull requests. + milestone NullableMilestoneable + // The node_id property + node_id *string + // The number property + number *int32 + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The pull_request property + pull_request IssueSearchResultItem_pull_requestable + // The reactions property + reactions ReactionRollupable + // A repository on GitHub. + repository Repositoryable + // The repository_url property + repository_url *string + // The score property + score *float64 + // The state property + state *string + // The state_reason property + state_reason *string + // The text_matches property + text_matches []Issuesable + // The timeline_url property + timeline_url *string + // The title property + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewIssueSearchResultItem instantiates a new IssueSearchResultItem and sets the default values. +func NewIssueSearchResultItem()(*IssueSearchResultItem) { + m := &IssueSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueSearchResultItem(), nil +} +// GetActiveLockReason gets the active_lock_reason property value. The active_lock_reason property +// returns a *string when successful +func (m *IssueSearchResultItem) GetActiveLockReason()(*string) { + return m.active_lock_reason +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueSearchResultItem) GetAssignee()(NullableSimpleUserable) { + return m.assignee +} +// GetAssignees gets the assignees property value. The assignees property +// returns a []SimpleUserable when successful +func (m *IssueSearchResultItem) GetAssignees()([]SimpleUserable) { + return m.assignees +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *IssueSearchResultItem) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *IssueSearchResultItem) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *IssueSearchResultItem) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *IssueSearchResultItem) GetBodyText()(*string) { + return m.body_text +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *IssueSearchResultItem) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *IssueSearchResultItem) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *IssueSearchResultItem) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDraft gets the draft property value. The draft property +// returns a *bool when successful +func (m *IssueSearchResultItem) GetDraft()(*bool) { + return m.draft +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active_lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveLockReason(val) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(NullableSimpleUserable)) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetAssignees(res) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIssueSearchResultItem_labelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IssueSearchResultItem_labelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(IssueSearchResultItem_labelsable) + } + } + m.SetLabels(res) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["locked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocked(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMilestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(NullableMilestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueSearchResultItem_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(IssueSearchResultItem_pull_requestable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(Repositoryable)) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["state_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStateReason(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIssuesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Issuesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Issuesable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimelineUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *IssueSearchResultItem) GetId()(*int64) { + return m.id +} +// GetLabels gets the labels property value. The labels property +// returns a []IssueSearchResultItem_labelsable when successful +func (m *IssueSearchResultItem) GetLabels()([]IssueSearchResultItem_labelsable) { + return m.labels +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLocked gets the locked property value. The locked property +// returns a *bool when successful +func (m *IssueSearchResultItem) GetLocked()(*bool) { + return m.locked +} +// GetMilestone gets the milestone property value. A collection of related issues and pull requests. +// returns a NullableMilestoneable when successful +func (m *IssueSearchResultItem) GetMilestone()(NullableMilestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *IssueSearchResultItem) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *IssueSearchResultItem) GetNumber()(*int32) { + return m.number +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *IssueSearchResultItem) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetPullRequest gets the pull_request property value. The pull_request property +// returns a IssueSearchResultItem_pull_requestable when successful +func (m *IssueSearchResultItem) GetPullRequest()(IssueSearchResultItem_pull_requestable) { + return m.pull_request +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *IssueSearchResultItem) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetRepository gets the repository property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *IssueSearchResultItem) GetRepository()(Repositoryable) { + return m.repository +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *IssueSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *IssueSearchResultItem) GetState()(*string) { + return m.state +} +// GetStateReason gets the state_reason property value. The state_reason property +// returns a *string when successful +func (m *IssueSearchResultItem) GetStateReason()(*string) { + return m.state_reason +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Issuesable when successful +func (m *IssueSearchResultItem) GetTextMatches()([]Issuesable) { + return m.text_matches +} +// GetTimelineUrl gets the timeline_url property value. The timeline_url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetTimelineUrl()(*string) { + return m.timeline_url +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *IssueSearchResultItem) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *IssueSearchResultItem) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *IssueSearchResultItem) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *IssueSearchResultItem) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *IssueSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("active_lock_reason", m.GetActiveLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignees())) + for i, v := range m.GetAssignees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("assignees", cast) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("locked", m.GetLocked()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state_reason", m.GetStateReason()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveLockReason sets the active_lock_reason property value. The active_lock_reason property +func (m *IssueSearchResultItem) SetActiveLockReason(value *string)() { + m.active_lock_reason = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IssueSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *IssueSearchResultItem) SetAssignee(value NullableSimpleUserable)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. The assignees property +func (m *IssueSearchResultItem) SetAssignees(value []SimpleUserable)() { + m.assignees = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *IssueSearchResultItem) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The body property +func (m *IssueSearchResultItem) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *IssueSearchResultItem) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *IssueSearchResultItem) SetBodyText(value *string)() { + m.body_text = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *IssueSearchResultItem) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetComments sets the comments property value. The comments property +func (m *IssueSearchResultItem) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *IssueSearchResultItem) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *IssueSearchResultItem) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDraft sets the draft property value. The draft property +func (m *IssueSearchResultItem) SetDraft(value *bool)() { + m.draft = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *IssueSearchResultItem) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *IssueSearchResultItem) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *IssueSearchResultItem) SetId(value *int64)() { + m.id = value +} +// SetLabels sets the labels property value. The labels property +func (m *IssueSearchResultItem) SetLabels(value []IssueSearchResultItem_labelsable)() { + m.labels = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *IssueSearchResultItem) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLocked sets the locked property value. The locked property +func (m *IssueSearchResultItem) SetLocked(value *bool)() { + m.locked = value +} +// SetMilestone sets the milestone property value. A collection of related issues and pull requests. +func (m *IssueSearchResultItem) SetMilestone(value NullableMilestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *IssueSearchResultItem) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The number property +func (m *IssueSearchResultItem) SetNumber(value *int32)() { + m.number = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *IssueSearchResultItem) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetPullRequest sets the pull_request property value. The pull_request property +func (m *IssueSearchResultItem) SetPullRequest(value IssueSearchResultItem_pull_requestable)() { + m.pull_request = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *IssueSearchResultItem) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetRepository sets the repository property value. A repository on GitHub. +func (m *IssueSearchResultItem) SetRepository(value Repositoryable)() { + m.repository = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *IssueSearchResultItem) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetScore sets the score property value. The score property +func (m *IssueSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetState sets the state property value. The state property +func (m *IssueSearchResultItem) SetState(value *string)() { + m.state = value +} +// SetStateReason sets the state_reason property value. The state_reason property +func (m *IssueSearchResultItem) SetStateReason(value *string)() { + m.state_reason = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *IssueSearchResultItem) SetTextMatches(value []Issuesable)() { + m.text_matches = value +} +// SetTimelineUrl sets the timeline_url property value. The timeline_url property +func (m *IssueSearchResultItem) SetTimelineUrl(value *string)() { + m.timeline_url = value +} +// SetTitle sets the title property value. The title property +func (m *IssueSearchResultItem) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *IssueSearchResultItem) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *IssueSearchResultItem) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *IssueSearchResultItem) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type IssueSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveLockReason()(*string) + GetAssignee()(NullableSimpleUserable) + GetAssignees()([]SimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDraft()(*bool) + GetEventsUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLabels()([]IssueSearchResultItem_labelsable) + GetLabelsUrl()(*string) + GetLocked()(*bool) + GetMilestone()(NullableMilestoneable) + GetNodeId()(*string) + GetNumber()(*int32) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetPullRequest()(IssueSearchResultItem_pull_requestable) + GetReactions()(ReactionRollupable) + GetRepository()(Repositoryable) + GetRepositoryUrl()(*string) + GetScore()(*float64) + GetState()(*string) + GetStateReason()(*string) + GetTextMatches()([]Issuesable) + GetTimelineUrl()(*string) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetActiveLockReason(value *string)() + SetAssignee(value NullableSimpleUserable)() + SetAssignees(value []SimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDraft(value *bool)() + SetEventsUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLabels(value []IssueSearchResultItem_labelsable)() + SetLabelsUrl(value *string)() + SetLocked(value *bool)() + SetMilestone(value NullableMilestoneable)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetPullRequest(value IssueSearchResultItem_pull_requestable)() + SetReactions(value ReactionRollupable)() + SetRepository(value Repositoryable)() + SetRepositoryUrl(value *string)() + SetScore(value *float64)() + SetState(value *string)() + SetStateReason(value *string)() + SetTextMatches(value []Issuesable)() + SetTimelineUrl(value *string)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/issue_search_result_item_labels.go b/pkg/github/models/issue_search_result_item_labels.go new file mode 100644 index 0000000..e360356 --- /dev/null +++ b/pkg/github/models/issue_search_result_item_labels.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IssueSearchResultItem_labels struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The default property + defaultEscaped *bool + // The description property + description *string + // The id property + id *int64 + // The name property + name *string + // The node_id property + node_id *string + // The url property + url *string +} +// NewIssueSearchResultItem_labels instantiates a new IssueSearchResultItem_labels and sets the default values. +func NewIssueSearchResultItem_labels()(*IssueSearchResultItem_labels) { + m := &IssueSearchResultItem_labels{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueSearchResultItem_labelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueSearchResultItem_labelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueSearchResultItem_labels(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueSearchResultItem_labels) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *IssueSearchResultItem_labels) GetColor()(*string) { + return m.color +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *IssueSearchResultItem_labels) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *IssueSearchResultItem_labels) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueSearchResultItem_labels) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *IssueSearchResultItem_labels) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *IssueSearchResultItem_labels) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *IssueSearchResultItem_labels) GetNodeId()(*string) { + return m.node_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *IssueSearchResultItem_labels) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *IssueSearchResultItem_labels) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IssueSearchResultItem_labels) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *IssueSearchResultItem_labels) SetColor(value *string)() { + m.color = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *IssueSearchResultItem_labels) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetDescription sets the description property value. The description property +func (m *IssueSearchResultItem_labels) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *IssueSearchResultItem_labels) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *IssueSearchResultItem_labels) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *IssueSearchResultItem_labels) SetNodeId(value *string)() { + m.node_id = value +} +// SetUrl sets the url property value. The url property +func (m *IssueSearchResultItem_labels) SetUrl(value *string)() { + m.url = value +} +type IssueSearchResultItem_labelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDefaultEscaped()(*bool) + GetDescription()(*string) + GetId()(*int64) + GetName()(*string) + GetNodeId()(*string) + GetUrl()(*string) + SetColor(value *string)() + SetDefaultEscaped(value *bool)() + SetDescription(value *string)() + SetId(value *int64)() + SetName(value *string)() + SetNodeId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/issue_search_result_item_pull_request.go b/pkg/github/models/issue_search_result_item_pull_request.go new file mode 100644 index 0000000..d6568fb --- /dev/null +++ b/pkg/github/models/issue_search_result_item_pull_request.go @@ -0,0 +1,197 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IssueSearchResultItem_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The diff_url property + diff_url *string + // The html_url property + html_url *string + // The merged_at property + merged_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The patch_url property + patch_url *string + // The url property + url *string +} +// NewIssueSearchResultItem_pull_request instantiates a new IssueSearchResultItem_pull_request and sets the default values. +func NewIssueSearchResultItem_pull_request()(*IssueSearchResultItem_pull_request) { + m := &IssueSearchResultItem_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueSearchResultItem_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueSearchResultItem_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueSearchResultItem_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueSearchResultItem_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiffUrl gets the diff_url property value. The diff_url property +// returns a *string when successful +func (m *IssueSearchResultItem_pull_request) GetDiffUrl()(*string) { + return m.diff_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueSearchResultItem_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["diff_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["merged_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMergedAt(val) + } + return nil + } + res["patch_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *IssueSearchResultItem_pull_request) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMergedAt gets the merged_at property value. The merged_at property +// returns a *Time when successful +func (m *IssueSearchResultItem_pull_request) GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.merged_at +} +// GetPatchUrl gets the patch_url property value. The patch_url property +// returns a *string when successful +func (m *IssueSearchResultItem_pull_request) GetPatchUrl()(*string) { + return m.patch_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *IssueSearchResultItem_pull_request) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *IssueSearchResultItem_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("diff_url", m.GetDiffUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("merged_at", m.GetMergedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch_url", m.GetPatchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IssueSearchResultItem_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiffUrl sets the diff_url property value. The diff_url property +func (m *IssueSearchResultItem_pull_request) SetDiffUrl(value *string)() { + m.diff_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *IssueSearchResultItem_pull_request) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMergedAt sets the merged_at property value. The merged_at property +func (m *IssueSearchResultItem_pull_request) SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.merged_at = value +} +// SetPatchUrl sets the patch_url property value. The patch_url property +func (m *IssueSearchResultItem_pull_request) SetPatchUrl(value *string)() { + m.patch_url = value +} +// SetUrl sets the url property value. The url property +func (m *IssueSearchResultItem_pull_request) SetUrl(value *string)() { + m.url = value +} +type IssueSearchResultItem_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiffUrl()(*string) + GetHtmlUrl()(*string) + GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPatchUrl()(*string) + GetUrl()(*string) + SetDiffUrl(value *string)() + SetHtmlUrl(value *string)() + SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPatchUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/issue_state_reason.go b/pkg/github/models/issue_state_reason.go new file mode 100644 index 0000000..130c6b6 --- /dev/null +++ b/pkg/github/models/issue_state_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The reason for the current state +type Issue_state_reason int + +const ( + COMPLETED_ISSUE_STATE_REASON Issue_state_reason = iota + REOPENED_ISSUE_STATE_REASON + NOT_PLANNED_ISSUE_STATE_REASON +) + +func (i Issue_state_reason) String() string { + return []string{"completed", "reopened", "not_planned"}[i] +} +func ParseIssue_state_reason(v string) (any, error) { + result := COMPLETED_ISSUE_STATE_REASON + switch v { + case "completed": + result = COMPLETED_ISSUE_STATE_REASON + case "reopened": + result = REOPENED_ISSUE_STATE_REASON + case "not_planned": + result = NOT_PLANNED_ISSUE_STATE_REASON + default: + return 0, errors.New("Unknown Issue_state_reason value: " + v) + } + return &result, nil +} +func SerializeIssue_state_reason(values []Issue_state_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Issue_state_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/issues.go b/pkg/github/models/issues.go new file mode 100644 index 0000000..1f21783 --- /dev/null +++ b/pkg/github/models/issues.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Issues struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fragment property + fragment *string + // The matches property + matches []Issues_matchesable + // The object_type property + object_type *string + // The object_url property + object_url *string + // The property property + property *string +} +// NewIssues instantiates a new Issues and sets the default values. +func NewIssues()(*Issues) { + m := &Issues{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssuesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssuesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssues(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Issues) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Issues) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFragment(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIssues_matchesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Issues_matchesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Issues_matchesable) + } + } + m.SetMatches(res) + } + return nil + } + res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectUrl(val) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + return res +} +// GetFragment gets the fragment property value. The fragment property +// returns a *string when successful +func (m *Issues) GetFragment()(*string) { + return m.fragment +} +// GetMatches gets the matches property value. The matches property +// returns a []Issues_matchesable when successful +func (m *Issues) GetMatches()([]Issues_matchesable) { + return m.matches +} +// GetObjectType gets the object_type property value. The object_type property +// returns a *string when successful +func (m *Issues) GetObjectType()(*string) { + return m.object_type +} +// GetObjectUrl gets the object_url property value. The object_url property +// returns a *string when successful +func (m *Issues) GetObjectUrl()(*string) { + return m.object_url +} +// GetProperty gets the property property value. The property property +// returns a *string when successful +func (m *Issues) GetProperty()(*string) { + return m.property +} +// Serialize serializes information the current object +func (m *Issues) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fragment", m.GetFragment()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_type", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + 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 *Issues) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFragment sets the fragment property value. The fragment property +func (m *Issues) SetFragment(value *string)() { + m.fragment = value +} +// SetMatches sets the matches property value. The matches property +func (m *Issues) SetMatches(value []Issues_matchesable)() { + m.matches = value +} +// SetObjectType sets the object_type property value. The object_type property +func (m *Issues) SetObjectType(value *string)() { + m.object_type = value +} +// SetObjectUrl sets the object_url property value. The object_url property +func (m *Issues) SetObjectUrl(value *string)() { + m.object_url = value +} +// SetProperty sets the property property value. The property property +func (m *Issues) SetProperty(value *string)() { + m.property = value +} +type Issuesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFragment()(*string) + GetMatches()([]Issues_matchesable) + GetObjectType()(*string) + GetObjectUrl()(*string) + GetProperty()(*string) + SetFragment(value *string)() + SetMatches(value []Issues_matchesable)() + SetObjectType(value *string)() + SetObjectUrl(value *string)() + SetProperty(value *string)() +} diff --git a/pkg/github/models/issues503_error.go b/pkg/github/models/issues503_error.go new file mode 100644 index 0000000..6d8d509 --- /dev/null +++ b/pkg/github/models/issues503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Issues503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewIssues503Error instantiates a new Issues503Error and sets the default values. +func NewIssues503Error()(*Issues503Error) { + m := &Issues503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssues503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssues503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssues503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Issues503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Issues503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Issues503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Issues503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Issues503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Issues503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Issues503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Issues503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Issues503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Issues503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Issues503Error) SetMessage(value *string)() { + m.message = value +} +type Issues503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/issues_matches.go b/pkg/github/models/issues_matches.go new file mode 100644 index 0000000..918b2c5 --- /dev/null +++ b/pkg/github/models/issues_matches.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Issues_matches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The indices property + indices []int32 + // The text property + text *string +} +// NewIssues_matches instantiates a new Issues_matches and sets the default values. +func NewIssues_matches()(*Issues_matches) { + m := &Issues_matches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssues_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssues_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssues_matches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Issues_matches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Issues_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetIndices(res) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetIndices gets the indices property value. The indices property +// returns a []int32 when successful +func (m *Issues_matches) GetIndices()([]int32) { + return m.indices +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *Issues_matches) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *Issues_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIndices() != nil { + err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Issues_matches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIndices sets the indices property value. The indices property +func (m *Issues_matches) SetIndices(value []int32)() { + m.indices = value +} +// SetText sets the text property value. The text property +func (m *Issues_matches) SetText(value *string)() { + m.text = value +} +type Issues_matchesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndices()([]int32) + GetText()(*string) + SetIndices(value []int32)() + SetText(value *string)() +} diff --git a/pkg/github/models/job.go b/pkg/github/models/job.go new file mode 100644 index 0000000..48fbc93 --- /dev/null +++ b/pkg/github/models/job.go @@ -0,0 +1,740 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Job information of a job execution in a workflow run +type Job struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The check_run_url property + check_run_url *string + // The time that the job finished, in ISO 8601 format. + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The outcome of the job. + conclusion *Job_conclusion + // The time that the job created, in ISO 8601 format. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the current branch. + head_branch *string + // The SHA of the commit that is being run. + head_sha *string + // The html_url property + html_url *string + // The id of the job. + id *int32 + // Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + labels []string + // The name of the job. + name *string + // The node_id property + node_id *string + // Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + run_attempt *int32 + // The id of the associated workflow run. + run_id *int32 + // The run_url property + run_url *string + // The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + runner_group_id *int32 + // The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + runner_group_name *string + // The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + runner_id *int32 + // The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + runner_name *string + // The time that the job started, in ISO 8601 format. + started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The phase of the lifecycle that the job is currently in. + status *Job_status + // Steps in this job. + steps []Job_stepsable + // The url property + url *string + // The name of the workflow. + workflow_name *string +} +// NewJob instantiates a new Job and sets the default values. +func NewJob()(*Job) { + m := &Job{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateJobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateJobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJob(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Job) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCheckRunUrl gets the check_run_url property value. The check_run_url property +// returns a *string when successful +func (m *Job) GetCheckRunUrl()(*string) { + return m.check_run_url +} +// GetCompletedAt gets the completed_at property value. The time that the job finished, in ISO 8601 format. +// returns a *Time when successful +func (m *Job) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetConclusion gets the conclusion property value. The outcome of the job. +// returns a *Job_conclusion when successful +func (m *Job) GetConclusion()(*Job_conclusion) { + return m.conclusion +} +// GetCreatedAt gets the created_at property value. The time that the job created, in ISO 8601 format. +// returns a *Time when successful +func (m *Job) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Job) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["check_run_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckRunUrl(val) + } + return nil + } + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["conclusion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseJob_conclusion) + if err != nil { + return err + } + if val != nil { + m.SetConclusion(val.(*Job_conclusion)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["head_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadBranch(val) + } + return nil + } + res["head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadSha(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["run_attempt"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunAttempt(val) + } + return nil + } + res["run_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunId(val) + } + return nil + } + res["run_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunUrl(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + res["runner_group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupName(val) + } + return nil + } + res["runner_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerId(val) + } + return nil + } + res["runner_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnerName(val) + } + return nil + } + res["started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedAt(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseJob_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*Job_status)) + } + return nil + } + res["steps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJob_stepsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Job_stepsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Job_stepsable) + } + } + m.SetSteps(res) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["workflow_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowName(val) + } + return nil + } + return res +} +// GetHeadBranch gets the head_branch property value. The name of the current branch. +// returns a *string when successful +func (m *Job) GetHeadBranch()(*string) { + return m.head_branch +} +// GetHeadSha gets the head_sha property value. The SHA of the commit that is being run. +// returns a *string when successful +func (m *Job) GetHeadSha()(*string) { + return m.head_sha +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Job) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id of the job. +// returns a *int32 when successful +func (m *Job) GetId()(*int32) { + return m.id +} +// GetLabels gets the labels property value. Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. +// returns a []string when successful +func (m *Job) GetLabels()([]string) { + return m.labels +} +// GetName gets the name property value. The name of the job. +// returns a *string when successful +func (m *Job) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Job) GetNodeId()(*string) { + return m.node_id +} +// GetRunAttempt gets the run_attempt property value. Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. +// returns a *int32 when successful +func (m *Job) GetRunAttempt()(*int32) { + return m.run_attempt +} +// GetRunId gets the run_id property value. The id of the associated workflow run. +// returns a *int32 when successful +func (m *Job) GetRunId()(*int32) { + return m.run_id +} +// GetRunnerGroupId gets the runner_group_id property value. The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +// returns a *int32 when successful +func (m *Job) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetRunnerGroupName gets the runner_group_name property value. The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +// returns a *string when successful +func (m *Job) GetRunnerGroupName()(*string) { + return m.runner_group_name +} +// GetRunnerId gets the runner_id property value. The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +// returns a *int32 when successful +func (m *Job) GetRunnerId()(*int32) { + return m.runner_id +} +// GetRunnerName gets the runner_name property value. The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +// returns a *string when successful +func (m *Job) GetRunnerName()(*string) { + return m.runner_name +} +// GetRunUrl gets the run_url property value. The run_url property +// returns a *string when successful +func (m *Job) GetRunUrl()(*string) { + return m.run_url +} +// GetStartedAt gets the started_at property value. The time that the job started, in ISO 8601 format. +// returns a *Time when successful +func (m *Job) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.started_at +} +// GetStatus gets the status property value. The phase of the lifecycle that the job is currently in. +// returns a *Job_status when successful +func (m *Job) GetStatus()(*Job_status) { + return m.status +} +// GetSteps gets the steps property value. Steps in this job. +// returns a []Job_stepsable when successful +func (m *Job) GetSteps()([]Job_stepsable) { + return m.steps +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Job) GetUrl()(*string) { + return m.url +} +// GetWorkflowName gets the workflow_name property value. The name of the workflow. +// returns a *string when successful +func (m *Job) GetWorkflowName()(*string) { + return m.workflow_name +} +// Serialize serializes information the current object +func (m *Job) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("check_run_url", m.GetCheckRunUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + if m.GetConclusion() != nil { + cast := (*m.GetConclusion()).String() + err := writer.WriteStringValue("conclusion", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_branch", m.GetHeadBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_sha", m.GetHeadSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("runner_group_name", m.GetRunnerGroupName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_id", m.GetRunnerId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("runner_name", m.GetRunnerName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("run_attempt", m.GetRunAttempt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("run_id", m.GetRunId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("run_url", m.GetRunUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("started_at", m.GetStartedAt()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetSteps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSteps())) + for i, v := range m.GetSteps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("steps", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("workflow_name", m.GetWorkflowName()) + 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 *Job) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCheckRunUrl sets the check_run_url property value. The check_run_url property +func (m *Job) SetCheckRunUrl(value *string)() { + m.check_run_url = value +} +// SetCompletedAt sets the completed_at property value. The time that the job finished, in ISO 8601 format. +func (m *Job) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetConclusion sets the conclusion property value. The outcome of the job. +func (m *Job) SetConclusion(value *Job_conclusion)() { + m.conclusion = value +} +// SetCreatedAt sets the created_at property value. The time that the job created, in ISO 8601 format. +func (m *Job) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHeadBranch sets the head_branch property value. The name of the current branch. +func (m *Job) SetHeadBranch(value *string)() { + m.head_branch = value +} +// SetHeadSha sets the head_sha property value. The SHA of the commit that is being run. +func (m *Job) SetHeadSha(value *string)() { + m.head_sha = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Job) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id of the job. +func (m *Job) SetId(value *int32)() { + m.id = value +} +// SetLabels sets the labels property value. Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. +func (m *Job) SetLabels(value []string)() { + m.labels = value +} +// SetName sets the name property value. The name of the job. +func (m *Job) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Job) SetNodeId(value *string)() { + m.node_id = value +} +// SetRunAttempt sets the run_attempt property value. Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. +func (m *Job) SetRunAttempt(value *int32)() { + m.run_attempt = value +} +// SetRunId sets the run_id property value. The id of the associated workflow run. +func (m *Job) SetRunId(value *int32)() { + m.run_id = value +} +// SetRunnerGroupId sets the runner_group_id property value. The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +func (m *Job) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetRunnerGroupName sets the runner_group_name property value. The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +func (m *Job) SetRunnerGroupName(value *string)() { + m.runner_group_name = value +} +// SetRunnerId sets the runner_id property value. The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +func (m *Job) SetRunnerId(value *int32)() { + m.runner_id = value +} +// SetRunnerName sets the runner_name property value. The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +func (m *Job) SetRunnerName(value *string)() { + m.runner_name = value +} +// SetRunUrl sets the run_url property value. The run_url property +func (m *Job) SetRunUrl(value *string)() { + m.run_url = value +} +// SetStartedAt sets the started_at property value. The time that the job started, in ISO 8601 format. +func (m *Job) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.started_at = value +} +// SetStatus sets the status property value. The phase of the lifecycle that the job is currently in. +func (m *Job) SetStatus(value *Job_status)() { + m.status = value +} +// SetSteps sets the steps property value. Steps in this job. +func (m *Job) SetSteps(value []Job_stepsable)() { + m.steps = value +} +// SetUrl sets the url property value. The url property +func (m *Job) SetUrl(value *string)() { + m.url = value +} +// SetWorkflowName sets the workflow_name property value. The name of the workflow. +func (m *Job) SetWorkflowName(value *string)() { + m.workflow_name = value +} +type Jobable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckRunUrl()(*string) + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetConclusion()(*Job_conclusion) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHeadBranch()(*string) + GetHeadSha()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLabels()([]string) + GetName()(*string) + GetNodeId()(*string) + GetRunAttempt()(*int32) + GetRunId()(*int32) + GetRunnerGroupId()(*int32) + GetRunnerGroupName()(*string) + GetRunnerId()(*int32) + GetRunnerName()(*string) + GetRunUrl()(*string) + GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*Job_status) + GetSteps()([]Job_stepsable) + GetUrl()(*string) + GetWorkflowName()(*string) + SetCheckRunUrl(value *string)() + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetConclusion(value *Job_conclusion)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHeadBranch(value *string)() + SetHeadSha(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLabels(value []string)() + SetName(value *string)() + SetNodeId(value *string)() + SetRunAttempt(value *int32)() + SetRunId(value *int32)() + SetRunnerGroupId(value *int32)() + SetRunnerGroupName(value *string)() + SetRunnerId(value *int32)() + SetRunnerName(value *string)() + SetRunUrl(value *string)() + SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *Job_status)() + SetSteps(value []Job_stepsable)() + SetUrl(value *string)() + SetWorkflowName(value *string)() +} diff --git a/pkg/github/models/job_conclusion.go b/pkg/github/models/job_conclusion.go new file mode 100644 index 0000000..7bd35d8 --- /dev/null +++ b/pkg/github/models/job_conclusion.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// The outcome of the job. +type Job_conclusion int + +const ( + SUCCESS_JOB_CONCLUSION Job_conclusion = iota + FAILURE_JOB_CONCLUSION + NEUTRAL_JOB_CONCLUSION + CANCELLED_JOB_CONCLUSION + SKIPPED_JOB_CONCLUSION + TIMED_OUT_JOB_CONCLUSION + ACTION_REQUIRED_JOB_CONCLUSION +) + +func (i Job_conclusion) String() string { + return []string{"success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"}[i] +} +func ParseJob_conclusion(v string) (any, error) { + result := SUCCESS_JOB_CONCLUSION + switch v { + case "success": + result = SUCCESS_JOB_CONCLUSION + case "failure": + result = FAILURE_JOB_CONCLUSION + case "neutral": + result = NEUTRAL_JOB_CONCLUSION + case "cancelled": + result = CANCELLED_JOB_CONCLUSION + case "skipped": + result = SKIPPED_JOB_CONCLUSION + case "timed_out": + result = TIMED_OUT_JOB_CONCLUSION + case "action_required": + result = ACTION_REQUIRED_JOB_CONCLUSION + default: + return 0, errors.New("Unknown Job_conclusion value: " + v) + } + return &result, nil +} +func SerializeJob_conclusion(values []Job_conclusion) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Job_conclusion) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/job_status.go b/pkg/github/models/job_status.go new file mode 100644 index 0000000..ad86954 --- /dev/null +++ b/pkg/github/models/job_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The phase of the lifecycle that the job is currently in. +type Job_status int + +const ( + QUEUED_JOB_STATUS Job_status = iota + IN_PROGRESS_JOB_STATUS + COMPLETED_JOB_STATUS + WAITING_JOB_STATUS + REQUESTED_JOB_STATUS + PENDING_JOB_STATUS +) + +func (i Job_status) String() string { + return []string{"queued", "in_progress", "completed", "waiting", "requested", "pending"}[i] +} +func ParseJob_status(v string) (any, error) { + result := QUEUED_JOB_STATUS + switch v { + case "queued": + result = QUEUED_JOB_STATUS + case "in_progress": + result = IN_PROGRESS_JOB_STATUS + case "completed": + result = COMPLETED_JOB_STATUS + case "waiting": + result = WAITING_JOB_STATUS + case "requested": + result = REQUESTED_JOB_STATUS + case "pending": + result = PENDING_JOB_STATUS + default: + return 0, errors.New("Unknown Job_status value: " + v) + } + return &result, nil +} +func SerializeJob_status(values []Job_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Job_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/job_steps.go b/pkg/github/models/job_steps.go new file mode 100644 index 0000000..cc92642 --- /dev/null +++ b/pkg/github/models/job_steps.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Job_steps struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the job finished, in ISO 8601 format. + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The outcome of the job. + conclusion *string + // The name of the job. + name *string + // The number property + number *int32 + // The time that the step started, in ISO 8601 format. + started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The phase of the lifecycle that the job is currently in. + status *Job_steps_status +} +// NewJob_steps instantiates a new Job_steps and sets the default values. +func NewJob_steps()(*Job_steps) { + m := &Job_steps{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateJob_stepsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateJob_stepsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJob_steps(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Job_steps) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompletedAt gets the completed_at property value. The time that the job finished, in ISO 8601 format. +// returns a *Time when successful +func (m *Job_steps) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetConclusion gets the conclusion property value. The outcome of the job. +// returns a *string when successful +func (m *Job_steps) GetConclusion()(*string) { + return m.conclusion +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Job_steps) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["conclusion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConclusion(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["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedAt(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseJob_steps_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*Job_steps_status)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the job. +// returns a *string when successful +func (m *Job_steps) GetName()(*string) { + return m.name +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *Job_steps) GetNumber()(*int32) { + return m.number +} +// GetStartedAt gets the started_at property value. The time that the step started, in ISO 8601 format. +// returns a *Time when successful +func (m *Job_steps) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.started_at +} +// GetStatus gets the status property value. The phase of the lifecycle that the job is currently in. +// returns a *Job_steps_status when successful +func (m *Job_steps) GetStatus()(*Job_steps_status) { + return m.status +} +// Serialize serializes information the current object +func (m *Job_steps) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("conclusion", m.GetConclusion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("started_at", m.GetStartedAt()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.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 *Job_steps) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompletedAt sets the completed_at property value. The time that the job finished, in ISO 8601 format. +func (m *Job_steps) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetConclusion sets the conclusion property value. The outcome of the job. +func (m *Job_steps) SetConclusion(value *string)() { + m.conclusion = value +} +// SetName sets the name property value. The name of the job. +func (m *Job_steps) SetName(value *string)() { + m.name = value +} +// SetNumber sets the number property value. The number property +func (m *Job_steps) SetNumber(value *int32)() { + m.number = value +} +// SetStartedAt sets the started_at property value. The time that the step started, in ISO 8601 format. +func (m *Job_steps) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.started_at = value +} +// SetStatus sets the status property value. The phase of the lifecycle that the job is currently in. +func (m *Job_steps) SetStatus(value *Job_steps_status)() { + m.status = value +} +type Job_stepsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetConclusion()(*string) + GetName()(*string) + GetNumber()(*int32) + GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*Job_steps_status) + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetConclusion(value *string)() + SetName(value *string)() + SetNumber(value *int32)() + SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *Job_steps_status)() +} diff --git a/pkg/github/models/job_steps_status.go b/pkg/github/models/job_steps_status.go new file mode 100644 index 0000000..d6163e4 --- /dev/null +++ b/pkg/github/models/job_steps_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The phase of the lifecycle that the job is currently in. +type Job_steps_status int + +const ( + QUEUED_JOB_STEPS_STATUS Job_steps_status = iota + IN_PROGRESS_JOB_STEPS_STATUS + COMPLETED_JOB_STEPS_STATUS +) + +func (i Job_steps_status) String() string { + return []string{"queued", "in_progress", "completed"}[i] +} +func ParseJob_steps_status(v string) (any, error) { + result := QUEUED_JOB_STEPS_STATUS + switch v { + case "queued": + result = QUEUED_JOB_STEPS_STATUS + case "in_progress": + result = IN_PROGRESS_JOB_STEPS_STATUS + case "completed": + result = COMPLETED_JOB_STEPS_STATUS + default: + return 0, errors.New("Unknown Job_steps_status value: " + v) + } + return &result, nil +} +func SerializeJob_steps_status(values []Job_steps_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Job_steps_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/key.go b/pkg/github/models/key.go new file mode 100644 index 0000000..0ab58bc --- /dev/null +++ b/pkg/github/models/key.go @@ -0,0 +1,256 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Key key +type Key struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int64 + // The key property + key *string + // The read_only property + read_only *bool + // The title property + title *string + // The url property + url *string + // The verified property + verified *bool +} +// NewKey instantiates a new Key and sets the default values. +func NewKey()(*Key) { + m := &Key{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Key) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Key) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Key) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["read_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReadOnly(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Key) GetId()(*int64) { + return m.id +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *Key) GetKey()(*string) { + return m.key +} +// GetReadOnly gets the read_only property value. The read_only property +// returns a *bool when successful +func (m *Key) GetReadOnly()(*bool) { + return m.read_only +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *Key) GetTitle()(*string) { + return m.title +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Key) GetUrl()(*string) { + return m.url +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *Key) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *Key) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("read_only", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *Key) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Key) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *Key) SetId(value *int64)() { + m.id = value +} +// SetKey sets the key property value. The key property +func (m *Key) SetKey(value *string)() { + m.key = value +} +// SetReadOnly sets the read_only property value. The read_only property +func (m *Key) SetReadOnly(value *bool)() { + m.read_only = value +} +// SetTitle sets the title property value. The title property +func (m *Key) SetTitle(value *string)() { + m.title = value +} +// SetUrl sets the url property value. The url property +func (m *Key) SetUrl(value *string)() { + m.url = value +} +// SetVerified sets the verified property value. The verified property +func (m *Key) SetVerified(value *bool)() { + m.verified = value +} +type Keyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int64) + GetKey()(*string) + GetReadOnly()(*bool) + GetTitle()(*string) + GetUrl()(*string) + GetVerified()(*bool) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int64)() + SetKey(value *string)() + SetReadOnly(value *bool)() + SetTitle(value *string)() + SetUrl(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/key_simple.go b/pkg/github/models/key_simple.go new file mode 100644 index 0000000..0dfbdac --- /dev/null +++ b/pkg/github/models/key_simple.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeySimple key Simple +type KeySimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The key property + key *string +} +// NewKeySimple instantiates a new KeySimple and sets the default values. +func NewKeySimple()(*KeySimple) { + m := &KeySimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateKeySimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateKeySimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeySimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *KeySimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *KeySimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *KeySimple) GetId()(*int32) { + return m.id +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *KeySimple) GetKey()(*string) { + return m.key +} +// Serialize serializes information the current object +func (m *KeySimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + 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 *KeySimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *KeySimple) SetId(value *int32)() { + m.id = value +} +// SetKey sets the key property value. The key property +func (m *KeySimple) SetKey(value *string)() { + m.key = value +} +type KeySimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetKey()(*string) + SetId(value *int32)() + SetKey(value *string)() +} diff --git a/pkg/github/models/label.go b/pkg/github/models/label.go new file mode 100644 index 0000000..ba41053 --- /dev/null +++ b/pkg/github/models/label.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Label color-coded labels help you categorize and filter your issues (just like labels in Gmail). +type Label struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // 6-character hex code, without the leading #, identifying the color + color *string + // The default property + defaultEscaped *bool + // The description property + description *string + // The id property + id *int64 + // The name of the label. + name *string + // The node_id property + node_id *string + // URL for the label + url *string +} +// NewLabel instantiates a new Label and sets the default values. +func NewLabel()(*Label) { + m := &Label{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabel(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Label) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. 6-character hex code, without the leading #, identifying the color +// returns a *string when successful +func (m *Label) GetColor()(*string) { + return m.color +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *Label) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Label) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Label) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Label) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name of the label. +// returns a *string when successful +func (m *Label) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Label) GetNodeId()(*string) { + return m.node_id +} +// GetUrl gets the url property value. URL for the label +// returns a *string when successful +func (m *Label) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Label) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Label) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. 6-character hex code, without the leading #, identifying the color +func (m *Label) SetColor(value *string)() { + m.color = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *Label) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetDescription sets the description property value. The description property +func (m *Label) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *Label) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name of the label. +func (m *Label) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Label) SetNodeId(value *string)() { + m.node_id = value +} +// SetUrl sets the url property value. URL for the label +func (m *Label) SetUrl(value *string)() { + m.url = value +} +type Labelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDefaultEscaped()(*bool) + GetDescription()(*string) + GetId()(*int64) + GetName()(*string) + GetNodeId()(*string) + GetUrl()(*string) + SetColor(value *string)() + SetDefaultEscaped(value *bool)() + SetDescription(value *string)() + SetId(value *int64)() + SetName(value *string)() + SetNodeId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/label_search_result_item.go b/pkg/github/models/label_search_result_item.go new file mode 100644 index 0000000..be1ea86 --- /dev/null +++ b/pkg/github/models/label_search_result_item.go @@ -0,0 +1,325 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelSearchResultItem label Search Result Item +type LabelSearchResultItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The default property + defaultEscaped *bool + // The description property + description *string + // The id property + id *int32 + // The name property + name *string + // The node_id property + node_id *string + // The score property + score *float64 + // The text_matches property + text_matches []Labelsable + // The url property + url *string +} +// NewLabelSearchResultItem instantiates a new LabelSearchResultItem and sets the default values. +func NewLabelSearchResultItem()(*LabelSearchResultItem) { + m := &LabelSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabelSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabelSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelSearchResultItem(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LabelSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *LabelSearchResultItem) GetColor()(*string) { + return m.color +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *LabelSearchResultItem) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *LabelSearchResultItem) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LabelSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Labelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Labelsable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *LabelSearchResultItem) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *LabelSearchResultItem) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *LabelSearchResultItem) GetNodeId()(*string) { + return m.node_id +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *LabelSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Labelsable when successful +func (m *LabelSearchResultItem) GetTextMatches()([]Labelsable) { + return m.text_matches +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *LabelSearchResultItem) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *LabelSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LabelSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *LabelSearchResultItem) SetColor(value *string)() { + m.color = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *LabelSearchResultItem) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetDescription sets the description property value. The description property +func (m *LabelSearchResultItem) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *LabelSearchResultItem) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *LabelSearchResultItem) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *LabelSearchResultItem) SetNodeId(value *string)() { + m.node_id = value +} +// SetScore sets the score property value. The score property +func (m *LabelSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *LabelSearchResultItem) SetTextMatches(value []Labelsable)() { + m.text_matches = value +} +// SetUrl sets the url property value. The url property +func (m *LabelSearchResultItem) SetUrl(value *string)() { + m.url = value +} +type LabelSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDefaultEscaped()(*bool) + GetDescription()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetScore()(*float64) + GetTextMatches()([]Labelsable) + GetUrl()(*string) + SetColor(value *string)() + SetDefaultEscaped(value *bool)() + SetDescription(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetScore(value *float64)() + SetTextMatches(value []Labelsable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/labeled_issue_event.go b/pkg/github/models/labeled_issue_event.go new file mode 100644 index 0000000..414317d --- /dev/null +++ b/pkg/github/models/labeled_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabeledIssueEvent labeled Issue Event +type LabeledIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The label property + label LabeledIssueEvent_labelable + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewLabeledIssueEvent instantiates a new LabeledIssueEvent and sets the default values. +func NewLabeledIssueEvent()(*LabeledIssueEvent) { + m := &LabeledIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabeledIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabeledIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabeledIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *LabeledIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LabeledIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *LabeledIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *LabeledIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *LabeledIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *LabeledIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LabeledIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLabeledIssueEvent_labelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabel(val.(LabeledIssueEvent_labelable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *LabeledIssueEvent) GetId()(*int32) { + return m.id +} +// GetLabel gets the label property value. The label property +// returns a LabeledIssueEvent_labelable when successful +func (m *LabeledIssueEvent) GetLabel()(LabeledIssueEvent_labelable) { + return m.label +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *LabeledIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *LabeledIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *LabeledIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *LabeledIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *LabeledIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LabeledIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *LabeledIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *LabeledIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *LabeledIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *LabeledIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *LabeledIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetLabel sets the label property value. The label property +func (m *LabeledIssueEvent) SetLabel(value LabeledIssueEvent_labelable)() { + m.label = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *LabeledIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *LabeledIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *LabeledIssueEvent) SetUrl(value *string)() { + m.url = value +} +type LabeledIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetLabel()(LabeledIssueEvent_labelable) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetLabel(value LabeledIssueEvent_labelable)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/labeled_issue_event_label.go b/pkg/github/models/labeled_issue_event_label.go new file mode 100644 index 0000000..07147d2 --- /dev/null +++ b/pkg/github/models/labeled_issue_event_label.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type LabeledIssueEvent_label struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The name property + name *string +} +// NewLabeledIssueEvent_label instantiates a new LabeledIssueEvent_label and sets the default values. +func NewLabeledIssueEvent_label()(*LabeledIssueEvent_label) { + m := &LabeledIssueEvent_label{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabeledIssueEvent_labelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabeledIssueEvent_labelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabeledIssueEvent_label(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LabeledIssueEvent_label) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *LabeledIssueEvent_label) GetColor()(*string) { + return m.color +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LabeledIssueEvent_label) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(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 + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *LabeledIssueEvent_label) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *LabeledIssueEvent_label) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *LabeledIssueEvent_label) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *LabeledIssueEvent_label) SetColor(value *string)() { + m.color = value +} +// SetName sets the name property value. The name property +func (m *LabeledIssueEvent_label) SetName(value *string)() { + m.name = value +} +type LabeledIssueEvent_labelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetName()(*string) + SetColor(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/labels.go b/pkg/github/models/labels.go new file mode 100644 index 0000000..03d0d7f --- /dev/null +++ b/pkg/github/models/labels.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Labels struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fragment property + fragment *string + // The matches property + matches []Labels_matchesable + // The object_type property + object_type *string + // The object_url property + object_url *string + // The property property + property *string +} +// NewLabels instantiates a new Labels and sets the default values. +func NewLabels()(*Labels) { + m := &Labels{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabels(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Labels) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Labels) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFragment(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabels_matchesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Labels_matchesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Labels_matchesable) + } + } + m.SetMatches(res) + } + return nil + } + res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectUrl(val) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + return res +} +// GetFragment gets the fragment property value. The fragment property +// returns a *string when successful +func (m *Labels) GetFragment()(*string) { + return m.fragment +} +// GetMatches gets the matches property value. The matches property +// returns a []Labels_matchesable when successful +func (m *Labels) GetMatches()([]Labels_matchesable) { + return m.matches +} +// GetObjectType gets the object_type property value. The object_type property +// returns a *string when successful +func (m *Labels) GetObjectType()(*string) { + return m.object_type +} +// GetObjectUrl gets the object_url property value. The object_url property +// returns a *string when successful +func (m *Labels) GetObjectUrl()(*string) { + return m.object_url +} +// GetProperty gets the property property value. The property property +// returns a *string when successful +func (m *Labels) GetProperty()(*string) { + return m.property +} +// Serialize serializes information the current object +func (m *Labels) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fragment", m.GetFragment()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_type", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + 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 *Labels) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFragment sets the fragment property value. The fragment property +func (m *Labels) SetFragment(value *string)() { + m.fragment = value +} +// SetMatches sets the matches property value. The matches property +func (m *Labels) SetMatches(value []Labels_matchesable)() { + m.matches = value +} +// SetObjectType sets the object_type property value. The object_type property +func (m *Labels) SetObjectType(value *string)() { + m.object_type = value +} +// SetObjectUrl sets the object_url property value. The object_url property +func (m *Labels) SetObjectUrl(value *string)() { + m.object_url = value +} +// SetProperty sets the property property value. The property property +func (m *Labels) SetProperty(value *string)() { + m.property = value +} +type Labelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFragment()(*string) + GetMatches()([]Labels_matchesable) + GetObjectType()(*string) + GetObjectUrl()(*string) + GetProperty()(*string) + SetFragment(value *string)() + SetMatches(value []Labels_matchesable)() + SetObjectType(value *string)() + SetObjectUrl(value *string)() + SetProperty(value *string)() +} diff --git a/pkg/github/models/labels_matches.go b/pkg/github/models/labels_matches.go new file mode 100644 index 0000000..d8ee820 --- /dev/null +++ b/pkg/github/models/labels_matches.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Labels_matches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The indices property + indices []int32 + // The text property + text *string +} +// NewLabels_matches instantiates a new Labels_matches and sets the default values. +func NewLabels_matches()(*Labels_matches) { + m := &Labels_matches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabels_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabels_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabels_matches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Labels_matches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Labels_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetIndices(res) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetIndices gets the indices property value. The indices property +// returns a []int32 when successful +func (m *Labels_matches) GetIndices()([]int32) { + return m.indices +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *Labels_matches) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *Labels_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIndices() != nil { + err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Labels_matches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIndices sets the indices property value. The indices property +func (m *Labels_matches) SetIndices(value []int32)() { + m.indices = value +} +// SetText sets the text property value. The text property +func (m *Labels_matches) SetText(value *string)() { + m.text = value +} +type Labels_matchesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndices()([]int32) + GetText()(*string) + SetIndices(value []int32)() + SetText(value *string)() +} diff --git a/pkg/github/models/language.go b/pkg/github/models/language.go new file mode 100644 index 0000000..8ac27c3 --- /dev/null +++ b/pkg/github/models/language.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Language language +type Language struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewLanguage instantiates a new Language and sets the default values. +func NewLanguage()(*Language) { + m := &Language{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLanguageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLanguageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLanguage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Language) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Language) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *Language) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Language) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type Languageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/license.go b/pkg/github/models/license.go new file mode 100644 index 0000000..adb21e6 --- /dev/null +++ b/pkg/github/models/license.go @@ -0,0 +1,447 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// License license +type License struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The body property + body *string + // The conditions property + conditions []string + // The description property + description *string + // The featured property + featured *bool + // The html_url property + html_url *string + // The implementation property + implementation *string + // The key property + key *string + // The limitations property + limitations []string + // The name property + name *string + // The node_id property + node_id *string + // The permissions property + permissions []string + // The spdx_id property + spdx_id *string + // The url property + url *string +} +// NewLicense instantiates a new License and sets the default values. +func NewLicense()(*License) { + m := &License{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLicenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLicenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicense(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *License) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *License) GetBody()(*string) { + return m.body +} +// GetConditions gets the conditions property value. The conditions property +// returns a []string when successful +func (m *License) GetConditions()([]string) { + return m.conditions +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *License) GetDescription()(*string) { + return m.description +} +// GetFeatured gets the featured property value. The featured property +// returns a *bool when successful +func (m *License) GetFeatured()(*bool) { + return m.featured +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *License) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetConditions(res) + } + 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["featured"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFeatured(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["implementation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImplementation(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["limitations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLimitations(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + res["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *License) GetHtmlUrl()(*string) { + return m.html_url +} +// GetImplementation gets the implementation property value. The implementation property +// returns a *string when successful +func (m *License) GetImplementation()(*string) { + return m.implementation +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *License) GetKey()(*string) { + return m.key +} +// GetLimitations gets the limitations property value. The limitations property +// returns a []string when successful +func (m *License) GetLimitations()([]string) { + return m.limitations +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *License) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *License) GetNodeId()(*string) { + return m.node_id +} +// GetPermissions gets the permissions property value. The permissions property +// returns a []string when successful +func (m *License) GetPermissions()([]string) { + return m.permissions +} +// GetSpdxId gets the spdx_id property value. The spdx_id property +// returns a *string when successful +func (m *License) GetSpdxId()(*string) { + return m.spdx_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *License) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *License) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + if m.GetConditions() != nil { + err := writer.WriteCollectionOfStringValues("conditions", m.GetConditions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("featured", m.GetFeatured()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("implementation", m.GetImplementation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + if m.GetLimitations() != nil { + err := writer.WriteCollectionOfStringValues("limitations", m.GetLimitations()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdx_id", m.GetSpdxId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *License) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The body property +func (m *License) SetBody(value *string)() { + m.body = value +} +// SetConditions sets the conditions property value. The conditions property +func (m *License) SetConditions(value []string)() { + m.conditions = value +} +// SetDescription sets the description property value. The description property +func (m *License) SetDescription(value *string)() { + m.description = value +} +// SetFeatured sets the featured property value. The featured property +func (m *License) SetFeatured(value *bool)() { + m.featured = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *License) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetImplementation sets the implementation property value. The implementation property +func (m *License) SetImplementation(value *string)() { + m.implementation = value +} +// SetKey sets the key property value. The key property +func (m *License) SetKey(value *string)() { + m.key = value +} +// SetLimitations sets the limitations property value. The limitations property +func (m *License) SetLimitations(value []string)() { + m.limitations = value +} +// SetName sets the name property value. The name property +func (m *License) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *License) SetNodeId(value *string)() { + m.node_id = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *License) SetPermissions(value []string)() { + m.permissions = value +} +// SetSpdxId sets the spdx_id property value. The spdx_id property +func (m *License) SetSpdxId(value *string)() { + m.spdx_id = value +} +// SetUrl sets the url property value. The url property +func (m *License) SetUrl(value *string)() { + m.url = value +} +type Licenseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetConditions()([]string) + GetDescription()(*string) + GetFeatured()(*bool) + GetHtmlUrl()(*string) + GetImplementation()(*string) + GetKey()(*string) + GetLimitations()([]string) + GetName()(*string) + GetNodeId()(*string) + GetPermissions()([]string) + GetSpdxId()(*string) + GetUrl()(*string) + SetBody(value *string)() + SetConditions(value []string)() + SetDescription(value *string)() + SetFeatured(value *bool)() + SetHtmlUrl(value *string)() + SetImplementation(value *string)() + SetKey(value *string)() + SetLimitations(value []string)() + SetName(value *string)() + SetNodeId(value *string)() + SetPermissions(value []string)() + SetSpdxId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/license_content.go b/pkg/github/models/license_content.go new file mode 100644 index 0000000..2b8ebed --- /dev/null +++ b/pkg/github/models/license_content.go @@ -0,0 +1,429 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseContent license Content +type LicenseContent struct { + // The _links property + _links LicenseContent__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The content property + content *string + // The download_url property + download_url *string + // The encoding property + encoding *string + // The git_url property + git_url *string + // The html_url property + html_url *string + // License Simple + license NullableLicenseSimpleable + // The name property + name *string + // The path property + path *string + // The sha property + sha *string + // The size property + size *int32 + // The type property + typeEscaped *string + // The url property + url *string +} +// NewLicenseContent instantiates a new LicenseContent and sets the default values. +func NewLicenseContent()(*LicenseContent) { + m := &LicenseContent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLicenseContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLicenseContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseContent(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LicenseContent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContent gets the content property value. The content property +// returns a *string when successful +func (m *LicenseContent) GetContent()(*string) { + return m.content +} +// GetDownloadUrl gets the download_url property value. The download_url property +// returns a *string when successful +func (m *LicenseContent) GetDownloadUrl()(*string) { + return m.download_url +} +// GetEncoding gets the encoding property value. The encoding property +// returns a *string when successful +func (m *LicenseContent) GetEncoding()(*string) { + return m.encoding +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LicenseContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLicenseContent__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(LicenseContent__linksable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUrl(val) + } + return nil + } + res["encoding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncoding(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *LicenseContent) GetGitUrl()(*string) { + return m.git_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *LicenseContent) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *LicenseContent) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetLinks gets the _links property value. The _links property +// returns a LicenseContent__linksable when successful +func (m *LicenseContent) GetLinks()(LicenseContent__linksable) { + return m._links +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *LicenseContent) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *LicenseContent) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *LicenseContent) GetSha()(*string) { + return m.sha +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *LicenseContent) GetSize()(*int32) { + return m.size +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *LicenseContent) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *LicenseContent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *LicenseContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("download_url", m.GetDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("encoding", m.GetEncoding()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *LicenseContent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContent sets the content property value. The content property +func (m *LicenseContent) SetContent(value *string)() { + m.content = value +} +// SetDownloadUrl sets the download_url property value. The download_url property +func (m *LicenseContent) SetDownloadUrl(value *string)() { + m.download_url = value +} +// SetEncoding sets the encoding property value. The encoding property +func (m *LicenseContent) SetEncoding(value *string)() { + m.encoding = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *LicenseContent) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *LicenseContent) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLicense sets the license property value. License Simple +func (m *LicenseContent) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetLinks sets the _links property value. The _links property +func (m *LicenseContent) SetLinks(value LicenseContent__linksable)() { + m._links = value +} +// SetName sets the name property value. The name property +func (m *LicenseContent) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *LicenseContent) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The sha property +func (m *LicenseContent) SetSha(value *string)() { + m.sha = value +} +// SetSize sets the size property value. The size property +func (m *LicenseContent) SetSize(value *int32)() { + m.size = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *LicenseContent) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *LicenseContent) SetUrl(value *string)() { + m.url = value +} +type LicenseContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetDownloadUrl()(*string) + GetEncoding()(*string) + GetGitUrl()(*string) + GetHtmlUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetLinks()(LicenseContent__linksable) + GetName()(*string) + GetPath()(*string) + GetSha()(*string) + GetSize()(*int32) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetContent(value *string)() + SetDownloadUrl(value *string)() + SetEncoding(value *string)() + SetGitUrl(value *string)() + SetHtmlUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetLinks(value LicenseContent__linksable)() + SetName(value *string)() + SetPath(value *string)() + SetSha(value *string)() + SetSize(value *int32)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/license_content__links.go b/pkg/github/models/license_content__links.go new file mode 100644 index 0000000..a6137d5 --- /dev/null +++ b/pkg/github/models/license_content__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type LicenseContent__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The git property + git *string + // The html property + html *string + // The self property + self *string +} +// NewLicenseContent__links instantiates a new LicenseContent__links and sets the default values. +func NewLicenseContent__links()(*LicenseContent__links) { + m := &LicenseContent__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLicenseContent__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLicenseContent__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseContent__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LicenseContent__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LicenseContent__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["git"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGit(val) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtml(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetGit gets the git property value. The git property +// returns a *string when successful +func (m *LicenseContent__links) GetGit()(*string) { + return m.git +} +// GetHtml gets the html property value. The html property +// returns a *string when successful +func (m *LicenseContent__links) GetHtml()(*string) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a *string when successful +func (m *LicenseContent__links) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *LicenseContent__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("git", m.GetGit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + 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 *LicenseContent__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGit sets the git property value. The git property +func (m *LicenseContent__links) SetGit(value *string)() { + m.git = value +} +// SetHtml sets the html property value. The html property +func (m *LicenseContent__links) SetHtml(value *string)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *LicenseContent__links) SetSelf(value *string)() { + m.self = value +} +type LicenseContent__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGit()(*string) + GetHtml()(*string) + GetSelf()(*string) + SetGit(value *string)() + SetHtml(value *string)() + SetSelf(value *string)() +} diff --git a/pkg/github/models/license_simple.go b/pkg/github/models/license_simple.go new file mode 100644 index 0000000..48241e6 --- /dev/null +++ b/pkg/github/models/license_simple.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseSimple license Simple +type LicenseSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The key property + key *string + // The name property + name *string + // The node_id property + node_id *string + // The spdx_id property + spdx_id *string + // The url property + url *string +} +// NewLicenseSimple instantiates a new LicenseSimple and sets the default values. +func NewLicenseSimple()(*LicenseSimple) { + m := &LicenseSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLicenseSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLicenseSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LicenseSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LicenseSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *LicenseSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *LicenseSimple) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *LicenseSimple) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *LicenseSimple) GetNodeId()(*string) { + return m.node_id +} +// GetSpdxId gets the spdx_id property value. The spdx_id property +// returns a *string when successful +func (m *LicenseSimple) GetSpdxId()(*string) { + return m.spdx_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *LicenseSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *LicenseSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdx_id", m.GetSpdxId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LicenseSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *LicenseSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetKey sets the key property value. The key property +func (m *LicenseSimple) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *LicenseSimple) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *LicenseSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetSpdxId sets the spdx_id property value. The spdx_id property +func (m *LicenseSimple) SetSpdxId(value *string)() { + m.spdx_id = value +} +// SetUrl sets the url property value. The url property +func (m *LicenseSimple) SetUrl(value *string)() { + m.url = value +} +type LicenseSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetKey()(*string) + GetName()(*string) + GetNodeId()(*string) + GetSpdxId()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetKey(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetSpdxId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/link.go b/pkg/github/models/link.go new file mode 100644 index 0000000..66228f9 --- /dev/null +++ b/pkg/github/models/link.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Link hypermedia Link +type Link struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewLink instantiates a new Link and sets the default values. +func NewLink()(*Link) { + m := &Link{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLinkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLinkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLink(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Link) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Link) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *Link) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *Link) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *Link) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *Link) SetHref(value *string)() { + m.href = value +} +type Linkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/link_with_type.go b/pkg/github/models/link_with_type.go new file mode 100644 index 0000000..5666a0a --- /dev/null +++ b/pkg/github/models/link_with_type.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LinkWithType hypermedia Link with Type +type LinkWithType struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string + // The type property + typeEscaped *string +} +// NewLinkWithType instantiates a new LinkWithType and sets the default values. +func NewLinkWithType()(*LinkWithType) { + m := &LinkWithType{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLinkWithTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLinkWithTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLinkWithType(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LinkWithType) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LinkWithType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *LinkWithType) GetHref()(*string) { + return m.href +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *LinkWithType) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *LinkWithType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *LinkWithType) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *LinkWithType) SetHref(value *string)() { + m.href = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *LinkWithType) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type LinkWithTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + GetTypeEscaped()(*string) + SetHref(value *string)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/locations503_error.go b/pkg/github/models/locations503_error.go new file mode 100644 index 0000000..57633e1 --- /dev/null +++ b/pkg/github/models/locations503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Locations503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewLocations503Error instantiates a new Locations503Error and sets the default values. +func NewLocations503Error()(*Locations503Error) { + m := &Locations503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLocations503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLocations503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocations503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Locations503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Locations503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Locations503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Locations503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Locations503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Locations503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Locations503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Locations503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Locations503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Locations503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Locations503Error) SetMessage(value *string)() { + m.message = value +} +type Locations503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/locked_issue_event.go b/pkg/github/models/locked_issue_event.go new file mode 100644 index 0000000..e31d978 --- /dev/null +++ b/pkg/github/models/locked_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LockedIssueEvent locked Issue Event +type LockedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The lock_reason property + lock_reason *string + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewLockedIssueEvent instantiates a new LockedIssueEvent and sets the default values. +func NewLockedIssueEvent()(*LockedIssueEvent) { + m := &LockedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLockedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLockedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLockedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *LockedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LockedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *LockedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *LockedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *LockedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *LockedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LockedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLockReason(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *LockedIssueEvent) GetId()(*int32) { + return m.id +} +// GetLockReason gets the lock_reason property value. The lock_reason property +// returns a *string when successful +func (m *LockedIssueEvent) GetLockReason()(*string) { + return m.lock_reason +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *LockedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *LockedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *LockedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *LockedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lock_reason", m.GetLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *LockedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LockedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *LockedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *LockedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *LockedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *LockedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *LockedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetLockReason sets the lock_reason property value. The lock_reason property +func (m *LockedIssueEvent) SetLockReason(value *string)() { + m.lock_reason = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *LockedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *LockedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *LockedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type LockedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetLockReason()(*string) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetLockReason(value *string)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/marketplace_account.go b/pkg/github/models/marketplace_account.go new file mode 100644 index 0000000..ced3cfb --- /dev/null +++ b/pkg/github/models/marketplace_account.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MarketplaceAccount struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email property + email *string + // The id property + id *int32 + // The login property + login *string + // The node_id property + node_id *string + // The organization_billing_email property + organization_billing_email *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewMarketplaceAccount instantiates a new MarketplaceAccount and sets the default values. +func NewMarketplaceAccount()(*MarketplaceAccount) { + m := &MarketplaceAccount{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMarketplaceAccountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMarketplaceAccountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMarketplaceAccount(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MarketplaceAccount) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *MarketplaceAccount) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MarketplaceAccount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organization_billing_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationBillingEmail(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MarketplaceAccount) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *MarketplaceAccount) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *MarketplaceAccount) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationBillingEmail gets the organization_billing_email property value. The organization_billing_email property +// returns a *string when successful +func (m *MarketplaceAccount) GetOrganizationBillingEmail()(*string) { + return m.organization_billing_email +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *MarketplaceAccount) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MarketplaceAccount) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *MarketplaceAccount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_billing_email", m.GetOrganizationBillingEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *MarketplaceAccount) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email property +func (m *MarketplaceAccount) SetEmail(value *string)() { + m.email = value +} +// SetId sets the id property value. The id property +func (m *MarketplaceAccount) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *MarketplaceAccount) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *MarketplaceAccount) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationBillingEmail sets the organization_billing_email property value. The organization_billing_email property +func (m *MarketplaceAccount) SetOrganizationBillingEmail(value *string)() { + m.organization_billing_email = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *MarketplaceAccount) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *MarketplaceAccount) SetUrl(value *string)() { + m.url = value +} +type MarketplaceAccountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetId()(*int32) + GetLogin()(*string) + GetNodeId()(*string) + GetOrganizationBillingEmail()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetEmail(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetOrganizationBillingEmail(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/marketplace_listing_plan.go b/pkg/github/models/marketplace_listing_plan.go new file mode 100644 index 0000000..9646843 --- /dev/null +++ b/pkg/github/models/marketplace_listing_plan.go @@ -0,0 +1,436 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MarketplaceListingPlan marketplace Listing Plan +type MarketplaceListingPlan struct { + // The accounts_url property + accounts_url *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The bullets property + bullets []string + // The description property + description *string + // The has_free_trial property + has_free_trial *bool + // The id property + id *int32 + // The monthly_price_in_cents property + monthly_price_in_cents *int32 + // The name property + name *string + // The number property + number *int32 + // The price_model property + price_model *MarketplaceListingPlan_price_model + // The state property + state *string + // The unit_name property + unit_name *string + // The url property + url *string + // The yearly_price_in_cents property + yearly_price_in_cents *int32 +} +// NewMarketplaceListingPlan instantiates a new MarketplaceListingPlan and sets the default values. +func NewMarketplaceListingPlan()(*MarketplaceListingPlan) { + m := &MarketplaceListingPlan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMarketplaceListingPlanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMarketplaceListingPlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMarketplaceListingPlan(), nil +} +// GetAccountsUrl gets the accounts_url property value. The accounts_url property +// returns a *string when successful +func (m *MarketplaceListingPlan) GetAccountsUrl()(*string) { + return m.accounts_url +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MarketplaceListingPlan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBullets gets the bullets property value. The bullets property +// returns a []string when successful +func (m *MarketplaceListingPlan) GetBullets()([]string) { + return m.bullets +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *MarketplaceListingPlan) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MarketplaceListingPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accounts_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountsUrl(val) + } + return nil + } + res["bullets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetBullets(res) + } + 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_free_trial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasFreeTrial(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["monthly_price_in_cents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMonthlyPriceInCents(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["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["price_model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMarketplaceListingPlan_price_model) + if err != nil { + return err + } + if val != nil { + m.SetPriceModel(val.(*MarketplaceListingPlan_price_model)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["unit_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["yearly_price_in_cents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetYearlyPriceInCents(val) + } + return nil + } + return res +} +// GetHasFreeTrial gets the has_free_trial property value. The has_free_trial property +// returns a *bool when successful +func (m *MarketplaceListingPlan) GetHasFreeTrial()(*bool) { + return m.has_free_trial +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MarketplaceListingPlan) GetId()(*int32) { + return m.id +} +// GetMonthlyPriceInCents gets the monthly_price_in_cents property value. The monthly_price_in_cents property +// returns a *int32 when successful +func (m *MarketplaceListingPlan) GetMonthlyPriceInCents()(*int32) { + return m.monthly_price_in_cents +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *MarketplaceListingPlan) GetName()(*string) { + return m.name +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *MarketplaceListingPlan) GetNumber()(*int32) { + return m.number +} +// GetPriceModel gets the price_model property value. The price_model property +// returns a *MarketplaceListingPlan_price_model when successful +func (m *MarketplaceListingPlan) GetPriceModel()(*MarketplaceListingPlan_price_model) { + return m.price_model +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *MarketplaceListingPlan) GetState()(*string) { + return m.state +} +// GetUnitName gets the unit_name property value. The unit_name property +// returns a *string when successful +func (m *MarketplaceListingPlan) GetUnitName()(*string) { + return m.unit_name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MarketplaceListingPlan) GetUrl()(*string) { + return m.url +} +// GetYearlyPriceInCents gets the yearly_price_in_cents property value. The yearly_price_in_cents property +// returns a *int32 when successful +func (m *MarketplaceListingPlan) GetYearlyPriceInCents()(*int32) { + return m.yearly_price_in_cents +} +// Serialize serializes information the current object +func (m *MarketplaceListingPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("accounts_url", m.GetAccountsUrl()) + if err != nil { + return err + } + } + if m.GetBullets() != nil { + err := writer.WriteCollectionOfStringValues("bullets", m.GetBullets()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_free_trial", m.GetHasFreeTrial()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("monthly_price_in_cents", m.GetMonthlyPriceInCents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + if m.GetPriceModel() != nil { + cast := (*m.GetPriceModel()).String() + err := writer.WriteStringValue("price_model", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("unit_name", m.GetUnitName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("yearly_price_in_cents", m.GetYearlyPriceInCents()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountsUrl sets the accounts_url property value. The accounts_url property +func (m *MarketplaceListingPlan) SetAccountsUrl(value *string)() { + m.accounts_url = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MarketplaceListingPlan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBullets sets the bullets property value. The bullets property +func (m *MarketplaceListingPlan) SetBullets(value []string)() { + m.bullets = value +} +// SetDescription sets the description property value. The description property +func (m *MarketplaceListingPlan) SetDescription(value *string)() { + m.description = value +} +// SetHasFreeTrial sets the has_free_trial property value. The has_free_trial property +func (m *MarketplaceListingPlan) SetHasFreeTrial(value *bool)() { + m.has_free_trial = value +} +// SetId sets the id property value. The id property +func (m *MarketplaceListingPlan) SetId(value *int32)() { + m.id = value +} +// SetMonthlyPriceInCents sets the monthly_price_in_cents property value. The monthly_price_in_cents property +func (m *MarketplaceListingPlan) SetMonthlyPriceInCents(value *int32)() { + m.monthly_price_in_cents = value +} +// SetName sets the name property value. The name property +func (m *MarketplaceListingPlan) SetName(value *string)() { + m.name = value +} +// SetNumber sets the number property value. The number property +func (m *MarketplaceListingPlan) SetNumber(value *int32)() { + m.number = value +} +// SetPriceModel sets the price_model property value. The price_model property +func (m *MarketplaceListingPlan) SetPriceModel(value *MarketplaceListingPlan_price_model)() { + m.price_model = value +} +// SetState sets the state property value. The state property +func (m *MarketplaceListingPlan) SetState(value *string)() { + m.state = value +} +// SetUnitName sets the unit_name property value. The unit_name property +func (m *MarketplaceListingPlan) SetUnitName(value *string)() { + m.unit_name = value +} +// SetUrl sets the url property value. The url property +func (m *MarketplaceListingPlan) SetUrl(value *string)() { + m.url = value +} +// SetYearlyPriceInCents sets the yearly_price_in_cents property value. The yearly_price_in_cents property +func (m *MarketplaceListingPlan) SetYearlyPriceInCents(value *int32)() { + m.yearly_price_in_cents = value +} +type MarketplaceListingPlanable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountsUrl()(*string) + GetBullets()([]string) + GetDescription()(*string) + GetHasFreeTrial()(*bool) + GetId()(*int32) + GetMonthlyPriceInCents()(*int32) + GetName()(*string) + GetNumber()(*int32) + GetPriceModel()(*MarketplaceListingPlan_price_model) + GetState()(*string) + GetUnitName()(*string) + GetUrl()(*string) + GetYearlyPriceInCents()(*int32) + SetAccountsUrl(value *string)() + SetBullets(value []string)() + SetDescription(value *string)() + SetHasFreeTrial(value *bool)() + SetId(value *int32)() + SetMonthlyPriceInCents(value *int32)() + SetName(value *string)() + SetNumber(value *int32)() + SetPriceModel(value *MarketplaceListingPlan_price_model)() + SetState(value *string)() + SetUnitName(value *string)() + SetUrl(value *string)() + SetYearlyPriceInCents(value *int32)() +} diff --git a/pkg/github/models/marketplace_listing_plan_price_model.go b/pkg/github/models/marketplace_listing_plan_price_model.go new file mode 100644 index 0000000..1905efb --- /dev/null +++ b/pkg/github/models/marketplace_listing_plan_price_model.go @@ -0,0 +1,39 @@ +package models +import ( + "errors" +) +type MarketplaceListingPlan_price_model int + +const ( + FREE_MARKETPLACELISTINGPLAN_PRICE_MODEL MarketplaceListingPlan_price_model = iota + FLAT_RATE_MARKETPLACELISTINGPLAN_PRICE_MODEL + PER_UNIT_MARKETPLACELISTINGPLAN_PRICE_MODEL +) + +func (i MarketplaceListingPlan_price_model) String() string { + return []string{"FREE", "FLAT_RATE", "PER_UNIT"}[i] +} +func ParseMarketplaceListingPlan_price_model(v string) (any, error) { + result := FREE_MARKETPLACELISTINGPLAN_PRICE_MODEL + switch v { + case "FREE": + result = FREE_MARKETPLACELISTINGPLAN_PRICE_MODEL + case "FLAT_RATE": + result = FLAT_RATE_MARKETPLACELISTINGPLAN_PRICE_MODEL + case "PER_UNIT": + result = PER_UNIT_MARKETPLACELISTINGPLAN_PRICE_MODEL + default: + return 0, errors.New("Unknown MarketplaceListingPlan_price_model value: " + v) + } + return &result, nil +} +func SerializeMarketplaceListingPlan_price_model(values []MarketplaceListingPlan_price_model) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MarketplaceListingPlan_price_model) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/marketplace_purchase.go b/pkg/github/models/marketplace_purchase.go new file mode 100644 index 0000000..87ee43a --- /dev/null +++ b/pkg/github/models/marketplace_purchase.go @@ -0,0 +1,284 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MarketplacePurchase marketplace Purchase +type MarketplacePurchase struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email property + email *string + // The id property + id *int32 + // The login property + login *string + // The marketplace_pending_change property + marketplace_pending_change MarketplacePurchase_marketplace_pending_changeable + // The marketplace_purchase property + marketplace_purchase MarketplacePurchase_marketplace_purchaseable + // The organization_billing_email property + organization_billing_email *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewMarketplacePurchase instantiates a new MarketplacePurchase and sets the default values. +func NewMarketplacePurchase()(*MarketplacePurchase) { + m := &MarketplacePurchase{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMarketplacePurchaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMarketplacePurchaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMarketplacePurchase(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MarketplacePurchase) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *MarketplacePurchase) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MarketplacePurchase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["marketplace_pending_change"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMarketplacePurchase_marketplace_pending_changeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMarketplacePendingChange(val.(MarketplacePurchase_marketplace_pending_changeable)) + } + return nil + } + res["marketplace_purchase"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMarketplacePurchase_marketplace_purchaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMarketplacePurchase(val.(MarketplacePurchase_marketplace_purchaseable)) + } + return nil + } + res["organization_billing_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationBillingEmail(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MarketplacePurchase) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *MarketplacePurchase) GetLogin()(*string) { + return m.login +} +// GetMarketplacePendingChange gets the marketplace_pending_change property value. The marketplace_pending_change property +// returns a MarketplacePurchase_marketplace_pending_changeable when successful +func (m *MarketplacePurchase) GetMarketplacePendingChange()(MarketplacePurchase_marketplace_pending_changeable) { + return m.marketplace_pending_change +} +// GetMarketplacePurchase gets the marketplace_purchase property value. The marketplace_purchase property +// returns a MarketplacePurchase_marketplace_purchaseable when successful +func (m *MarketplacePurchase) GetMarketplacePurchase()(MarketplacePurchase_marketplace_purchaseable) { + return m.marketplace_purchase +} +// GetOrganizationBillingEmail gets the organization_billing_email property value. The organization_billing_email property +// returns a *string when successful +func (m *MarketplacePurchase) GetOrganizationBillingEmail()(*string) { + return m.organization_billing_email +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *MarketplacePurchase) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MarketplacePurchase) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *MarketplacePurchase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("marketplace_pending_change", m.GetMarketplacePendingChange()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("marketplace_purchase", m.GetMarketplacePurchase()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_billing_email", m.GetOrganizationBillingEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *MarketplacePurchase) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email property +func (m *MarketplacePurchase) SetEmail(value *string)() { + m.email = value +} +// SetId sets the id property value. The id property +func (m *MarketplacePurchase) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *MarketplacePurchase) SetLogin(value *string)() { + m.login = value +} +// SetMarketplacePendingChange sets the marketplace_pending_change property value. The marketplace_pending_change property +func (m *MarketplacePurchase) SetMarketplacePendingChange(value MarketplacePurchase_marketplace_pending_changeable)() { + m.marketplace_pending_change = value +} +// SetMarketplacePurchase sets the marketplace_purchase property value. The marketplace_purchase property +func (m *MarketplacePurchase) SetMarketplacePurchase(value MarketplacePurchase_marketplace_purchaseable)() { + m.marketplace_purchase = value +} +// SetOrganizationBillingEmail sets the organization_billing_email property value. The organization_billing_email property +func (m *MarketplacePurchase) SetOrganizationBillingEmail(value *string)() { + m.organization_billing_email = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *MarketplacePurchase) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *MarketplacePurchase) SetUrl(value *string)() { + m.url = value +} +type MarketplacePurchaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetId()(*int32) + GetLogin()(*string) + GetMarketplacePendingChange()(MarketplacePurchase_marketplace_pending_changeable) + GetMarketplacePurchase()(MarketplacePurchase_marketplace_purchaseable) + GetOrganizationBillingEmail()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetEmail(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetMarketplacePendingChange(value MarketplacePurchase_marketplace_pending_changeable)() + SetMarketplacePurchase(value MarketplacePurchase_marketplace_purchaseable)() + SetOrganizationBillingEmail(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/marketplace_purchase_marketplace_pending_change.go b/pkg/github/models/marketplace_purchase_marketplace_pending_change.go new file mode 100644 index 0000000..d14fed7 --- /dev/null +++ b/pkg/github/models/marketplace_purchase_marketplace_pending_change.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MarketplacePurchase_marketplace_pending_change struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The effective_date property + effective_date *string + // The id property + id *int32 + // The is_installed property + is_installed *bool + // Marketplace Listing Plan + plan MarketplaceListingPlanable + // The unit_count property + unit_count *int32 +} +// NewMarketplacePurchase_marketplace_pending_change instantiates a new MarketplacePurchase_marketplace_pending_change and sets the default values. +func NewMarketplacePurchase_marketplace_pending_change()(*MarketplacePurchase_marketplace_pending_change) { + m := &MarketplacePurchase_marketplace_pending_change{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMarketplacePurchase_marketplace_pending_changeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMarketplacePurchase_marketplace_pending_changeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMarketplacePurchase_marketplace_pending_change(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEffectiveDate gets the effective_date property value. The effective_date property +// returns a *string when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetEffectiveDate()(*string) { + return m.effective_date +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["effective_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEffectiveDate(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_installed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInstalled(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMarketplaceListingPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(MarketplaceListingPlanable)) + } + return nil + } + res["unit_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitCount(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetId()(*int32) { + return m.id +} +// GetIsInstalled gets the is_installed property value. The is_installed property +// returns a *bool when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetIsInstalled()(*bool) { + return m.is_installed +} +// GetPlan gets the plan property value. Marketplace Listing Plan +// returns a MarketplaceListingPlanable when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetPlan()(MarketplaceListingPlanable) { + return m.plan +} +// GetUnitCount gets the unit_count property value. The unit_count property +// returns a *int32 when successful +func (m *MarketplacePurchase_marketplace_pending_change) GetUnitCount()(*int32) { + return m.unit_count +} +// Serialize serializes information the current object +func (m *MarketplacePurchase_marketplace_pending_change) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("effective_date", m.GetEffectiveDate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_installed", m.GetIsInstalled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unit_count", m.GetUnitCount()) + 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 *MarketplacePurchase_marketplace_pending_change) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEffectiveDate sets the effective_date property value. The effective_date property +func (m *MarketplacePurchase_marketplace_pending_change) SetEffectiveDate(value *string)() { + m.effective_date = value +} +// SetId sets the id property value. The id property +func (m *MarketplacePurchase_marketplace_pending_change) SetId(value *int32)() { + m.id = value +} +// SetIsInstalled sets the is_installed property value. The is_installed property +func (m *MarketplacePurchase_marketplace_pending_change) SetIsInstalled(value *bool)() { + m.is_installed = value +} +// SetPlan sets the plan property value. Marketplace Listing Plan +func (m *MarketplacePurchase_marketplace_pending_change) SetPlan(value MarketplaceListingPlanable)() { + m.plan = value +} +// SetUnitCount sets the unit_count property value. The unit_count property +func (m *MarketplacePurchase_marketplace_pending_change) SetUnitCount(value *int32)() { + m.unit_count = value +} +type MarketplacePurchase_marketplace_pending_changeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEffectiveDate()(*string) + GetId()(*int32) + GetIsInstalled()(*bool) + GetPlan()(MarketplaceListingPlanable) + GetUnitCount()(*int32) + SetEffectiveDate(value *string)() + SetId(value *int32)() + SetIsInstalled(value *bool)() + SetPlan(value MarketplaceListingPlanable)() + SetUnitCount(value *int32)() +} diff --git a/pkg/github/models/marketplace_purchase_marketplace_purchase.go b/pkg/github/models/marketplace_purchase_marketplace_purchase.go new file mode 100644 index 0000000..4bee05b --- /dev/null +++ b/pkg/github/models/marketplace_purchase_marketplace_purchase.go @@ -0,0 +1,283 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MarketplacePurchase_marketplace_purchase struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The billing_cycle property + billing_cycle *string + // The free_trial_ends_on property + free_trial_ends_on *string + // The is_installed property + is_installed *bool + // The next_billing_date property + next_billing_date *string + // The on_free_trial property + on_free_trial *bool + // Marketplace Listing Plan + plan MarketplaceListingPlanable + // The unit_count property + unit_count *int32 + // The updated_at property + updated_at *string +} +// NewMarketplacePurchase_marketplace_purchase instantiates a new MarketplacePurchase_marketplace_purchase and sets the default values. +func NewMarketplacePurchase_marketplace_purchase()(*MarketplacePurchase_marketplace_purchase) { + m := &MarketplacePurchase_marketplace_purchase{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMarketplacePurchase_marketplace_purchaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMarketplacePurchase_marketplace_purchaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMarketplacePurchase_marketplace_purchase(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MarketplacePurchase_marketplace_purchase) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillingCycle gets the billing_cycle property value. The billing_cycle property +// returns a *string when successful +func (m *MarketplacePurchase_marketplace_purchase) GetBillingCycle()(*string) { + return m.billing_cycle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MarketplacePurchase_marketplace_purchase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["billing_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillingCycle(val) + } + return nil + } + res["free_trial_ends_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFreeTrialEndsOn(val) + } + return nil + } + res["is_installed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInstalled(val) + } + return nil + } + res["next_billing_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNextBillingDate(val) + } + return nil + } + res["on_free_trial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnFreeTrial(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMarketplaceListingPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(MarketplaceListingPlanable)) + } + return nil + } + res["unit_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitCount(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetFreeTrialEndsOn gets the free_trial_ends_on property value. The free_trial_ends_on property +// returns a *string when successful +func (m *MarketplacePurchase_marketplace_purchase) GetFreeTrialEndsOn()(*string) { + return m.free_trial_ends_on +} +// GetIsInstalled gets the is_installed property value. The is_installed property +// returns a *bool when successful +func (m *MarketplacePurchase_marketplace_purchase) GetIsInstalled()(*bool) { + return m.is_installed +} +// GetNextBillingDate gets the next_billing_date property value. The next_billing_date property +// returns a *string when successful +func (m *MarketplacePurchase_marketplace_purchase) GetNextBillingDate()(*string) { + return m.next_billing_date +} +// GetOnFreeTrial gets the on_free_trial property value. The on_free_trial property +// returns a *bool when successful +func (m *MarketplacePurchase_marketplace_purchase) GetOnFreeTrial()(*bool) { + return m.on_free_trial +} +// GetPlan gets the plan property value. Marketplace Listing Plan +// returns a MarketplaceListingPlanable when successful +func (m *MarketplacePurchase_marketplace_purchase) GetPlan()(MarketplaceListingPlanable) { + return m.plan +} +// GetUnitCount gets the unit_count property value. The unit_count property +// returns a *int32 when successful +func (m *MarketplacePurchase_marketplace_purchase) GetUnitCount()(*int32) { + return m.unit_count +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *MarketplacePurchase_marketplace_purchase) GetUpdatedAt()(*string) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *MarketplacePurchase_marketplace_purchase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("billing_cycle", m.GetBillingCycle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("free_trial_ends_on", m.GetFreeTrialEndsOn()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_installed", m.GetIsInstalled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("next_billing_date", m.GetNextBillingDate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("on_free_trial", m.GetOnFreeTrial()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unit_count", m.GetUnitCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MarketplacePurchase_marketplace_purchase) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillingCycle sets the billing_cycle property value. The billing_cycle property +func (m *MarketplacePurchase_marketplace_purchase) SetBillingCycle(value *string)() { + m.billing_cycle = value +} +// SetFreeTrialEndsOn sets the free_trial_ends_on property value. The free_trial_ends_on property +func (m *MarketplacePurchase_marketplace_purchase) SetFreeTrialEndsOn(value *string)() { + m.free_trial_ends_on = value +} +// SetIsInstalled sets the is_installed property value. The is_installed property +func (m *MarketplacePurchase_marketplace_purchase) SetIsInstalled(value *bool)() { + m.is_installed = value +} +// SetNextBillingDate sets the next_billing_date property value. The next_billing_date property +func (m *MarketplacePurchase_marketplace_purchase) SetNextBillingDate(value *string)() { + m.next_billing_date = value +} +// SetOnFreeTrial sets the on_free_trial property value. The on_free_trial property +func (m *MarketplacePurchase_marketplace_purchase) SetOnFreeTrial(value *bool)() { + m.on_free_trial = value +} +// SetPlan sets the plan property value. Marketplace Listing Plan +func (m *MarketplacePurchase_marketplace_purchase) SetPlan(value MarketplaceListingPlanable)() { + m.plan = value +} +// SetUnitCount sets the unit_count property value. The unit_count property +func (m *MarketplacePurchase_marketplace_purchase) SetUnitCount(value *int32)() { + m.unit_count = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *MarketplacePurchase_marketplace_purchase) SetUpdatedAt(value *string)() { + m.updated_at = value +} +type MarketplacePurchase_marketplace_purchaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillingCycle()(*string) + GetFreeTrialEndsOn()(*string) + GetIsInstalled()(*bool) + GetNextBillingDate()(*string) + GetOnFreeTrial()(*bool) + GetPlan()(MarketplaceListingPlanable) + GetUnitCount()(*int32) + GetUpdatedAt()(*string) + SetBillingCycle(value *string)() + SetFreeTrialEndsOn(value *string)() + SetIsInstalled(value *bool)() + SetNextBillingDate(value *string)() + SetOnFreeTrial(value *bool)() + SetPlan(value MarketplaceListingPlanable)() + SetUnitCount(value *int32)() + SetUpdatedAt(value *string)() +} diff --git a/pkg/github/models/max_file_path_length.go b/pkg/github/models/max_file_path_length.go new file mode 100644 index 0000000..ec4fe6f --- /dev/null +++ b/pkg/github/models/max_file_path_length.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Max_file_path_length note: max_file_path_length is in beta and subject to change.Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. +type Max_file_path_length struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters Max_file_path_length_parametersable + // The type property + typeEscaped *Max_file_path_length_type +} +// NewMax_file_path_length instantiates a new Max_file_path_length and sets the default values. +func NewMax_file_path_length()(*Max_file_path_length) { + m := &Max_file_path_length{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_path_lengthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_path_lengthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_path_length(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Max_file_path_length) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Max_file_path_length) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMax_file_path_length_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(Max_file_path_length_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMax_file_path_length_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Max_file_path_length_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a Max_file_path_length_parametersable when successful +func (m *Max_file_path_length) GetParameters()(Max_file_path_length_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Max_file_path_length_type when successful +func (m *Max_file_path_length) GetTypeEscaped()(*Max_file_path_length_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Max_file_path_length) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Max_file_path_length) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *Max_file_path_length) SetParameters(value Max_file_path_length_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Max_file_path_length) SetTypeEscaped(value *Max_file_path_length_type)() { + m.typeEscaped = value +} +type Max_file_path_lengthable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(Max_file_path_length_parametersable) + GetTypeEscaped()(*Max_file_path_length_type) + SetParameters(value Max_file_path_length_parametersable)() + SetTypeEscaped(value *Max_file_path_length_type)() +} diff --git a/pkg/github/models/max_file_path_length_parameters.go b/pkg/github/models/max_file_path_length_parameters.go new file mode 100644 index 0000000..bde936d --- /dev/null +++ b/pkg/github/models/max_file_path_length_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Max_file_path_length_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The maximum amount of characters allowed in file paths + max_file_path_length *int32 +} +// NewMax_file_path_length_parameters instantiates a new Max_file_path_length_parameters and sets the default values. +func NewMax_file_path_length_parameters()(*Max_file_path_length_parameters) { + m := &Max_file_path_length_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_path_length_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_path_length_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_path_length_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Max_file_path_length_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Max_file_path_length_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["max_file_path_length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxFilePathLength(val) + } + return nil + } + return res +} +// GetMaxFilePathLength gets the max_file_path_length property value. The maximum amount of characters allowed in file paths +// returns a *int32 when successful +func (m *Max_file_path_length_parameters) GetMaxFilePathLength()(*int32) { + return m.max_file_path_length +} +// Serialize serializes information the current object +func (m *Max_file_path_length_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("max_file_path_length", m.GetMaxFilePathLength()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Max_file_path_length_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaxFilePathLength sets the max_file_path_length property value. The maximum amount of characters allowed in file paths +func (m *Max_file_path_length_parameters) SetMaxFilePathLength(value *int32)() { + m.max_file_path_length = value +} +type Max_file_path_length_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxFilePathLength()(*int32) + SetMaxFilePathLength(value *int32)() +} diff --git a/pkg/github/models/max_file_path_length_type.go b/pkg/github/models/max_file_path_length_type.go new file mode 100644 index 0000000..daaf062 --- /dev/null +++ b/pkg/github/models/max_file_path_length_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type Max_file_path_length_type int + +const ( + MAX_FILE_PATH_LENGTH_MAX_FILE_PATH_LENGTH_TYPE Max_file_path_length_type = iota +) + +func (i Max_file_path_length_type) String() string { + return []string{"max_file_path_length"}[i] +} +func ParseMax_file_path_length_type(v string) (any, error) { + result := MAX_FILE_PATH_LENGTH_MAX_FILE_PATH_LENGTH_TYPE + switch v { + case "max_file_path_length": + result = MAX_FILE_PATH_LENGTH_MAX_FILE_PATH_LENGTH_TYPE + default: + return 0, errors.New("Unknown Max_file_path_length_type value: " + v) + } + return &result, nil +} +func SerializeMax_file_path_length_type(values []Max_file_path_length_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Max_file_path_length_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/max_file_size.go b/pkg/github/models/max_file_size.go new file mode 100644 index 0000000..9bf5bb5 --- /dev/null +++ b/pkg/github/models/max_file_size.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Max_file_size note: max_file_size is in beta and subject to change.Prevent commits that exceed a specified file size limit from being pushed to the commit. +type Max_file_size struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters Max_file_size_parametersable + // The type property + typeEscaped *Max_file_size_type +} +// NewMax_file_size instantiates a new Max_file_size and sets the default values. +func NewMax_file_size()(*Max_file_size) { + m := &Max_file_size{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_sizeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_sizeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_size(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Max_file_size) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Max_file_size) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMax_file_size_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(Max_file_size_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMax_file_size_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Max_file_size_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a Max_file_size_parametersable when successful +func (m *Max_file_size) GetParameters()(Max_file_size_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Max_file_size_type when successful +func (m *Max_file_size) GetTypeEscaped()(*Max_file_size_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Max_file_size) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Max_file_size) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *Max_file_size) SetParameters(value Max_file_size_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Max_file_size) SetTypeEscaped(value *Max_file_size_type)() { + m.typeEscaped = value +} +type Max_file_sizeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(Max_file_size_parametersable) + GetTypeEscaped()(*Max_file_size_type) + SetParameters(value Max_file_size_parametersable)() + SetTypeEscaped(value *Max_file_size_type)() +} diff --git a/pkg/github/models/max_file_size_parameters.go b/pkg/github/models/max_file_size_parameters.go new file mode 100644 index 0000000..9bb3785 --- /dev/null +++ b/pkg/github/models/max_file_size_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Max_file_size_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). + max_file_size *int32 +} +// NewMax_file_size_parameters instantiates a new Max_file_size_parameters and sets the default values. +func NewMax_file_size_parameters()(*Max_file_size_parameters) { + m := &Max_file_size_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_size_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_size_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_size_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Max_file_size_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Max_file_size_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["max_file_size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxFileSize(val) + } + return nil + } + return res +} +// GetMaxFileSize gets the max_file_size property value. The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). +// returns a *int32 when successful +func (m *Max_file_size_parameters) GetMaxFileSize()(*int32) { + return m.max_file_size +} +// Serialize serializes information the current object +func (m *Max_file_size_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("max_file_size", m.GetMaxFileSize()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Max_file_size_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaxFileSize sets the max_file_size property value. The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). +func (m *Max_file_size_parameters) SetMaxFileSize(value *int32)() { + m.max_file_size = value +} +type Max_file_size_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxFileSize()(*int32) + SetMaxFileSize(value *int32)() +} diff --git a/pkg/github/models/max_file_size_type.go b/pkg/github/models/max_file_size_type.go new file mode 100644 index 0000000..f4b53a3 --- /dev/null +++ b/pkg/github/models/max_file_size_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type Max_file_size_type int + +const ( + MAX_FILE_SIZE_MAX_FILE_SIZE_TYPE Max_file_size_type = iota +) + +func (i Max_file_size_type) String() string { + return []string{"max_file_size"}[i] +} +func ParseMax_file_size_type(v string) (any, error) { + result := MAX_FILE_SIZE_MAX_FILE_SIZE_TYPE + switch v { + case "max_file_size": + result = MAX_FILE_SIZE_MAX_FILE_SIZE_TYPE + default: + return 0, errors.New("Unknown Max_file_size_type value: " + v) + } + return &result, nil +} +func SerializeMax_file_size_type(values []Max_file_size_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Max_file_size_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/merged_upstream.go b/pkg/github/models/merged_upstream.go new file mode 100644 index 0000000..42558b5 --- /dev/null +++ b/pkg/github/models/merged_upstream.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MergedUpstream results of a successful merge upstream request +type MergedUpstream struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The base_branch property + base_branch *string + // The merge_type property + merge_type *MergedUpstream_merge_type + // The message property + message *string +} +// NewMergedUpstream instantiates a new MergedUpstream and sets the default values. +func NewMergedUpstream()(*MergedUpstream) { + m := &MergedUpstream{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMergedUpstreamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMergedUpstreamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMergedUpstream(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MergedUpstream) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBaseBranch gets the base_branch property value. The base_branch property +// returns a *string when successful +func (m *MergedUpstream) GetBaseBranch()(*string) { + return m.base_branch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MergedUpstream) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseBranch(val) + } + return nil + } + res["merge_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMergedUpstream_merge_type) + if err != nil { + return err + } + if val != nil { + m.SetMergeType(val.(*MergedUpstream_merge_type)) + } + 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 +} +// GetMergeType gets the merge_type property value. The merge_type property +// returns a *MergedUpstream_merge_type when successful +func (m *MergedUpstream) GetMergeType()(*MergedUpstream_merge_type) { + return m.merge_type +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *MergedUpstream) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *MergedUpstream) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("base_branch", m.GetBaseBranch()) + if err != nil { + return err + } + } + if m.GetMergeType() != nil { + cast := (*m.GetMergeType()).String() + err := writer.WriteStringValue("merge_type", &cast) + 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 *MergedUpstream) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBaseBranch sets the base_branch property value. The base_branch property +func (m *MergedUpstream) SetBaseBranch(value *string)() { + m.base_branch = value +} +// SetMergeType sets the merge_type property value. The merge_type property +func (m *MergedUpstream) SetMergeType(value *MergedUpstream_merge_type)() { + m.merge_type = value +} +// SetMessage sets the message property value. The message property +func (m *MergedUpstream) SetMessage(value *string)() { + m.message = value +} +type MergedUpstreamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseBranch()(*string) + GetMergeType()(*MergedUpstream_merge_type) + GetMessage()(*string) + SetBaseBranch(value *string)() + SetMergeType(value *MergedUpstream_merge_type)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/merged_upstream_merge_type.go b/pkg/github/models/merged_upstream_merge_type.go new file mode 100644 index 0000000..e869041 --- /dev/null +++ b/pkg/github/models/merged_upstream_merge_type.go @@ -0,0 +1,39 @@ +package models +import ( + "errors" +) +type MergedUpstream_merge_type int + +const ( + MERGE_MERGEDUPSTREAM_MERGE_TYPE MergedUpstream_merge_type = iota + FASTFORWARD_MERGEDUPSTREAM_MERGE_TYPE + NONE_MERGEDUPSTREAM_MERGE_TYPE +) + +func (i MergedUpstream_merge_type) String() string { + return []string{"merge", "fast-forward", "none"}[i] +} +func ParseMergedUpstream_merge_type(v string) (any, error) { + result := MERGE_MERGEDUPSTREAM_MERGE_TYPE + switch v { + case "merge": + result = MERGE_MERGEDUPSTREAM_MERGE_TYPE + case "fast-forward": + result = FASTFORWARD_MERGEDUPSTREAM_MERGE_TYPE + case "none": + result = NONE_MERGEDUPSTREAM_MERGE_TYPE + default: + return 0, errors.New("Unknown MergedUpstream_merge_type value: " + v) + } + return &result, nil +} +func SerializeMergedUpstream_merge_type(values []MergedUpstream_merge_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MergedUpstream_merge_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/meta.go b/pkg/github/models/meta.go new file mode 100644 index 0000000..3ef6093 --- /dev/null +++ b/pkg/github/models/meta.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Meta the metadata associated with the creation/updates to the user. +type Meta struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A date and time when the user was created. + created *string + // A data and time when the user was last modified. + lastModified *string + // A URL location of an object + location *string + // A type of a resource + resourceType *Meta_resourceType +} +// NewMeta instantiates a new Meta and sets the default values. +func NewMeta()(*Meta) { + m := &Meta{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMetaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMetaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeta(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Meta) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreated gets the created property value. A date and time when the user was created. +// returns a *string when successful +func (m *Meta) GetCreated()(*string) { + return m.created +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Meta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreated(val) + } + return nil + } + res["lastModified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModified(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["resourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMeta_resourceType) + if err != nil { + return err + } + if val != nil { + m.SetResourceType(val.(*Meta_resourceType)) + } + return nil + } + return res +} +// GetLastModified gets the lastModified property value. A data and time when the user was last modified. +// returns a *string when successful +func (m *Meta) GetLastModified()(*string) { + return m.lastModified +} +// GetLocation gets the location property value. A URL location of an object +// returns a *string when successful +func (m *Meta) GetLocation()(*string) { + return m.location +} +// GetResourceType gets the resourceType property value. A type of a resource +// returns a *Meta_resourceType when successful +func (m *Meta) GetResourceType()(*Meta_resourceType) { + return m.resourceType +} +// Serialize serializes information the current object +func (m *Meta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created", m.GetCreated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lastModified", m.GetLastModified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + if m.GetResourceType() != nil { + cast := (*m.GetResourceType()).String() + err := writer.WriteStringValue("resourceType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Meta) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreated sets the created property value. A date and time when the user was created. +func (m *Meta) SetCreated(value *string)() { + m.created = value +} +// SetLastModified sets the lastModified property value. A data and time when the user was last modified. +func (m *Meta) SetLastModified(value *string)() { + m.lastModified = value +} +// SetLocation sets the location property value. A URL location of an object +func (m *Meta) SetLocation(value *string)() { + m.location = value +} +// SetResourceType sets the resourceType property value. A type of a resource +func (m *Meta) SetResourceType(value *Meta_resourceType)() { + m.resourceType = value +} +type Metaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreated()(*string) + GetLastModified()(*string) + GetLocation()(*string) + GetResourceType()(*Meta_resourceType) + SetCreated(value *string)() + SetLastModified(value *string)() + SetLocation(value *string)() + SetResourceType(value *Meta_resourceType)() +} diff --git a/pkg/github/models/meta_resource_type.go b/pkg/github/models/meta_resource_type.go new file mode 100644 index 0000000..2435c33 --- /dev/null +++ b/pkg/github/models/meta_resource_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// A type of a resource +type Meta_resourceType int + +const ( + USER_META_RESOURCETYPE Meta_resourceType = iota + GROUP_META_RESOURCETYPE +) + +func (i Meta_resourceType) String() string { + return []string{"User", "Group"}[i] +} +func ParseMeta_resourceType(v string) (any, error) { + result := USER_META_RESOURCETYPE + switch v { + case "User": + result = USER_META_RESOURCETYPE + case "Group": + result = GROUP_META_RESOURCETYPE + default: + return 0, errors.New("Unknown Meta_resourceType value: " + v) + } + return &result, nil +} +func SerializeMeta_resourceType(values []Meta_resourceType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Meta_resourceType) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/metadata.go b/pkg/github/models/metadata.go new file mode 100644 index 0000000..06ce8d1 --- /dev/null +++ b/pkg/github/models/metadata.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Metadata user-defined metadata to store domain-specific information limited to 8 keys with scalar values. +type Metadata struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewMetadata instantiates a new Metadata and sets the default values. +func NewMetadata()(*Metadata) { + m := &Metadata{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMetadataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMetadataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetadata(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Metadata) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Metadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *Metadata) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Metadata) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type Metadataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/migration.go b/pkg/github/models/migration.go new file mode 100644 index 0000000..247d723 --- /dev/null +++ b/pkg/github/models/migration.go @@ -0,0 +1,593 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Migration a migration. +type Migration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The archive_url property + archive_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. + exclude []string + // The exclude_attachments property + exclude_attachments *bool + // The exclude_git_data property + exclude_git_data *bool + // The exclude_metadata property + exclude_metadata *bool + // The exclude_owner_projects property + exclude_owner_projects *bool + // The exclude_releases property + exclude_releases *bool + // The guid property + guid *string + // The id property + id *int64 + // The lock_repositories property + lock_repositories *bool + // The node_id property + node_id *string + // The org_metadata_only property + org_metadata_only *bool + // A GitHub user. + owner NullableSimpleUserable + // The repositories included in the migration. Only returned for export migrations. + repositories []Repositoryable + // The state property + state *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewMigration instantiates a new Migration and sets the default values. +func NewMigration()(*Migration) { + m := &Migration{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMigrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMigrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMigration(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Migration) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *Migration) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Migration) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetExclude gets the exclude property value. Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. +// returns a []string when successful +func (m *Migration) GetExclude()([]string) { + return m.exclude +} +// GetExcludeAttachments gets the exclude_attachments property value. The exclude_attachments property +// returns a *bool when successful +func (m *Migration) GetExcludeAttachments()(*bool) { + return m.exclude_attachments +} +// GetExcludeGitData gets the exclude_git_data property value. The exclude_git_data property +// returns a *bool when successful +func (m *Migration) GetExcludeGitData()(*bool) { + return m.exclude_git_data +} +// GetExcludeMetadata gets the exclude_metadata property value. The exclude_metadata property +// returns a *bool when successful +func (m *Migration) GetExcludeMetadata()(*bool) { + return m.exclude_metadata +} +// GetExcludeOwnerProjects gets the exclude_owner_projects property value. The exclude_owner_projects property +// returns a *bool when successful +func (m *Migration) GetExcludeOwnerProjects()(*bool) { + return m.exclude_owner_projects +} +// GetExcludeReleases gets the exclude_releases property value. The exclude_releases property +// returns a *bool when successful +func (m *Migration) GetExcludeReleases()(*bool) { + return m.exclude_releases +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Migration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["exclude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetExclude(res) + } + return nil + } + res["exclude_attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeAttachments(val) + } + return nil + } + res["exclude_git_data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeGitData(val) + } + return nil + } + res["exclude_metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeMetadata(val) + } + return nil + } + res["exclude_owner_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeOwnerProjects(val) + } + return nil + } + res["exclude_releases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeReleases(val) + } + return nil + } + res["guid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGuid(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["lock_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockRepositories(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["org_metadata_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOrgMetadataOnly(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Repositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Repositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGuid gets the guid property value. The guid property +// returns a *string when successful +func (m *Migration) GetGuid()(*string) { + return m.guid +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *Migration) GetId()(*int64) { + return m.id +} +// GetLockRepositories gets the lock_repositories property value. The lock_repositories property +// returns a *bool when successful +func (m *Migration) GetLockRepositories()(*bool) { + return m.lock_repositories +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Migration) GetNodeId()(*string) { + return m.node_id +} +// GetOrgMetadataOnly gets the org_metadata_only property value. The org_metadata_only property +// returns a *bool when successful +func (m *Migration) GetOrgMetadataOnly()(*bool) { + return m.org_metadata_only +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Migration) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetRepositories gets the repositories property value. The repositories included in the migration. Only returned for export migrations. +// returns a []Repositoryable when successful +func (m *Migration) GetRepositories()([]Repositoryable) { + return m.repositories +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *Migration) GetState()(*string) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Migration) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Migration) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Migration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetExclude() != nil { + err := writer.WriteCollectionOfStringValues("exclude", m.GetExclude()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_attachments", m.GetExcludeAttachments()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_git_data", m.GetExcludeGitData()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_metadata", m.GetExcludeMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_owner_projects", m.GetExcludeOwnerProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_releases", m.GetExcludeReleases()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("guid", m.GetGuid()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("lock_repositories", m.GetLockRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("org_metadata_only", m.GetOrgMetadataOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Migration) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *Migration) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Migration) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetExclude sets the exclude property value. Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. +func (m *Migration) SetExclude(value []string)() { + m.exclude = value +} +// SetExcludeAttachments sets the exclude_attachments property value. The exclude_attachments property +func (m *Migration) SetExcludeAttachments(value *bool)() { + m.exclude_attachments = value +} +// SetExcludeGitData sets the exclude_git_data property value. The exclude_git_data property +func (m *Migration) SetExcludeGitData(value *bool)() { + m.exclude_git_data = value +} +// SetExcludeMetadata sets the exclude_metadata property value. The exclude_metadata property +func (m *Migration) SetExcludeMetadata(value *bool)() { + m.exclude_metadata = value +} +// SetExcludeOwnerProjects sets the exclude_owner_projects property value. The exclude_owner_projects property +func (m *Migration) SetExcludeOwnerProjects(value *bool)() { + m.exclude_owner_projects = value +} +// SetExcludeReleases sets the exclude_releases property value. The exclude_releases property +func (m *Migration) SetExcludeReleases(value *bool)() { + m.exclude_releases = value +} +// SetGuid sets the guid property value. The guid property +func (m *Migration) SetGuid(value *string)() { + m.guid = value +} +// SetId sets the id property value. The id property +func (m *Migration) SetId(value *int64)() { + m.id = value +} +// SetLockRepositories sets the lock_repositories property value. The lock_repositories property +func (m *Migration) SetLockRepositories(value *bool)() { + m.lock_repositories = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Migration) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrgMetadataOnly sets the org_metadata_only property value. The org_metadata_only property +func (m *Migration) SetOrgMetadataOnly(value *bool)() { + m.org_metadata_only = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *Migration) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetRepositories sets the repositories property value. The repositories included in the migration. Only returned for export migrations. +func (m *Migration) SetRepositories(value []Repositoryable)() { + m.repositories = value +} +// SetState sets the state property value. The state property +func (m *Migration) SetState(value *string)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Migration) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Migration) SetUrl(value *string)() { + m.url = value +} +type Migrationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchiveUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExclude()([]string) + GetExcludeAttachments()(*bool) + GetExcludeGitData()(*bool) + GetExcludeMetadata()(*bool) + GetExcludeOwnerProjects()(*bool) + GetExcludeReleases()(*bool) + GetGuid()(*string) + GetId()(*int64) + GetLockRepositories()(*bool) + GetNodeId()(*string) + GetOrgMetadataOnly()(*bool) + GetOwner()(NullableSimpleUserable) + GetRepositories()([]Repositoryable) + GetState()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetArchiveUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExclude(value []string)() + SetExcludeAttachments(value *bool)() + SetExcludeGitData(value *bool)() + SetExcludeMetadata(value *bool)() + SetExcludeOwnerProjects(value *bool)() + SetExcludeReleases(value *bool)() + SetGuid(value *string)() + SetId(value *int64)() + SetLockRepositories(value *bool)() + SetNodeId(value *string)() + SetOrgMetadataOnly(value *bool)() + SetOwner(value NullableSimpleUserable)() + SetRepositories(value []Repositoryable)() + SetState(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/milestone.go b/pkg/github/models/milestone.go new file mode 100644 index 0000000..6e613c0 --- /dev/null +++ b/pkg/github/models/milestone.go @@ -0,0 +1,520 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Milestone a collection of related issues and pull requests. +type Milestone struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The closed_issues property + closed_issues *int32 + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + creator NullableSimpleUserable + // The description property + description *string + // The due_on property + due_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // The id property + id *int32 + // The labels_url property + labels_url *string + // The node_id property + node_id *string + // The number of the milestone. + number *int32 + // The open_issues property + open_issues *int32 + // The state of the milestone. + state *Milestone_state + // The title of the milestone. + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewMilestone instantiates a new Milestone and sets the default values. +func NewMilestone()(*Milestone) { + m := &Milestone{ + } + m.SetAdditionalData(make(map[string]any)) + stateValue := OPEN_MILESTONE_STATE + m.SetState(&stateValue) + return m +} +// CreateMilestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMilestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMilestone(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Milestone) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *Milestone) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetClosedIssues gets the closed_issues property value. The closed_issues property +// returns a *int32 when successful +func (m *Milestone) GetClosedIssues()(*int32) { + return m.closed_issues +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Milestone) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Milestone) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Milestone) GetDescription()(*string) { + return m.description +} +// GetDueOn gets the due_on property value. The due_on property +// returns a *Time when successful +func (m *Milestone) GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.due_on +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Milestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["closed_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetClosedIssues(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + 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["due_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueOn(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMilestone_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*Milestone_state)) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Milestone) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Milestone) GetId()(*int32) { + return m.id +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *Milestone) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Milestone) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The number of the milestone. +// returns a *int32 when successful +func (m *Milestone) GetNumber()(*int32) { + return m.number +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *Milestone) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetState gets the state property value. The state of the milestone. +// returns a *Milestone_state when successful +func (m *Milestone) GetState()(*Milestone_state) { + return m.state +} +// GetTitle gets the title property value. The title of the milestone. +// returns a *string when successful +func (m *Milestone) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Milestone) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Milestone) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Milestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("closed_issues", m.GetClosedIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("due_on", m.GetDueOn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Milestone) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *Milestone) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetClosedIssues sets the closed_issues property value. The closed_issues property +func (m *Milestone) SetClosedIssues(value *int32)() { + m.closed_issues = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Milestone) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *Milestone) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetDescription sets the description property value. The description property +func (m *Milestone) SetDescription(value *string)() { + m.description = value +} +// SetDueOn sets the due_on property value. The due_on property +func (m *Milestone) SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.due_on = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Milestone) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Milestone) SetId(value *int32)() { + m.id = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *Milestone) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Milestone) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The number of the milestone. +func (m *Milestone) SetNumber(value *int32)() { + m.number = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *Milestone) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetState sets the state property value. The state of the milestone. +func (m *Milestone) SetState(value *Milestone_state)() { + m.state = value +} +// SetTitle sets the title property value. The title of the milestone. +func (m *Milestone) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Milestone) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Milestone) SetUrl(value *string)() { + m.url = value +} +type Milestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetClosedIssues()(*int32) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(NullableSimpleUserable) + GetDescription()(*string) + GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLabelsUrl()(*string) + GetNodeId()(*string) + GetNumber()(*int32) + GetOpenIssues()(*int32) + GetState()(*Milestone_state) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetClosedIssues(value *int32)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value NullableSimpleUserable)() + SetDescription(value *string)() + SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLabelsUrl(value *string)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetOpenIssues(value *int32)() + SetState(value *Milestone_state)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/milestone_state.go b/pkg/github/models/milestone_state.go new file mode 100644 index 0000000..1ff9c49 --- /dev/null +++ b/pkg/github/models/milestone_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The state of the milestone. +type Milestone_state int + +const ( + OPEN_MILESTONE_STATE Milestone_state = iota + CLOSED_MILESTONE_STATE +) + +func (i Milestone_state) String() string { + return []string{"open", "closed"}[i] +} +func ParseMilestone_state(v string) (any, error) { + result := OPEN_MILESTONE_STATE + switch v { + case "open": + result = OPEN_MILESTONE_STATE + case "closed": + result = CLOSED_MILESTONE_STATE + default: + return 0, errors.New("Unknown Milestone_state value: " + v) + } + return &result, nil +} +func SerializeMilestone_state(values []Milestone_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Milestone_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/milestoned_issue_event.go b/pkg/github/models/milestoned_issue_event.go new file mode 100644 index 0000000..0184fee --- /dev/null +++ b/pkg/github/models/milestoned_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MilestonedIssueEvent milestoned Issue Event +type MilestonedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The milestone property + milestone MilestonedIssueEvent_milestoneable + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewMilestonedIssueEvent instantiates a new MilestonedIssueEvent and sets the default values. +func NewMilestonedIssueEvent()(*MilestonedIssueEvent) { + m := &MilestonedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMilestonedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMilestonedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMilestonedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *MilestonedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MilestonedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *MilestonedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *MilestonedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *MilestonedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *MilestonedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MilestonedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMilestonedIssueEvent_milestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(MilestonedIssueEvent_milestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MilestonedIssueEvent) GetId()(*int32) { + return m.id +} +// GetMilestone gets the milestone property value. The milestone property +// returns a MilestonedIssueEvent_milestoneable when successful +func (m *MilestonedIssueEvent) GetMilestone()(MilestonedIssueEvent_milestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *MilestonedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *MilestonedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MilestonedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *MilestonedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *MilestonedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MilestonedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *MilestonedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *MilestonedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *MilestonedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *MilestonedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *MilestonedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetMilestone sets the milestone property value. The milestone property +func (m *MilestonedIssueEvent) SetMilestone(value MilestonedIssueEvent_milestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *MilestonedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *MilestonedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *MilestonedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type MilestonedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetMilestone()(MilestonedIssueEvent_milestoneable) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetMilestone(value MilestonedIssueEvent_milestoneable)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/milestoned_issue_event_milestone.go b/pkg/github/models/milestoned_issue_event_milestone.go new file mode 100644 index 0000000..bfb5749 --- /dev/null +++ b/pkg/github/models/milestoned_issue_event_milestone.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MilestonedIssueEvent_milestone struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The title property + title *string +} +// NewMilestonedIssueEvent_milestone instantiates a new MilestonedIssueEvent_milestone and sets the default values. +func NewMilestonedIssueEvent_milestone()(*MilestonedIssueEvent_milestone) { + m := &MilestonedIssueEvent_milestone{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMilestonedIssueEvent_milestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMilestonedIssueEvent_milestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMilestonedIssueEvent_milestone(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MilestonedIssueEvent_milestone) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MilestonedIssueEvent_milestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *MilestonedIssueEvent_milestone) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *MilestonedIssueEvent_milestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *MilestonedIssueEvent_milestone) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTitle sets the title property value. The title property +func (m *MilestonedIssueEvent_milestone) SetTitle(value *string)() { + m.title = value +} +type MilestonedIssueEvent_milestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTitle()(*string) + SetTitle(value *string)() +} diff --git a/pkg/github/models/minimal_repository.go b/pkg/github/models/minimal_repository.go new file mode 100644 index 0000000..3957616 --- /dev/null +++ b/pkg/github/models/minimal_repository.go @@ -0,0 +1,2582 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MinimalRepository minimal Repository +type MinimalRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_forking property + allow_forking *bool + // The archive_url property + archive_url *string + // The archived property + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // Code Of Conduct + code_of_conduct CodeOfConductable + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_branch property + default_branch *string + // The delete_branch_on_merge property + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // The disabled property + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // The has_discussions property + has_discussions *bool + // The has_downloads property + has_downloads *bool + // The has_issues property + has_issues *bool + // The has_pages property + has_pages *bool + // The has_projects property + has_projects *bool + // The has_wiki property + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int64 + // The is_template property + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // The license property + license MinimalRepository_licenseable + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name property + name *string + // The network_count property + network_count *int32 + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + owner SimpleUserable + // The permissions property + permissions MinimalRepository_permissionsable + // The private property + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The role_name property + role_name *string + // The security_and_analysis property + security_and_analysis SecurityAndAnalysisable + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + size *int32 + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_count property + subscribers_count *int32 + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The visibility property + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewMinimalRepository instantiates a new MinimalRepository and sets the default values. +func NewMinimalRepository()(*MinimalRepository) { + m := &MinimalRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMinimalRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMinimalRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMinimalRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MinimalRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowForking gets the allow_forking property value. The allow_forking property +// returns a *bool when successful +func (m *MinimalRepository) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetArchived gets the archived property value. The archived property +// returns a *bool when successful +func (m *MinimalRepository) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *MinimalRepository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *MinimalRepository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *MinimalRepository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *MinimalRepository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *MinimalRepository) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCodeOfConduct gets the code_of_conduct property value. Code Of Conduct +// returns a CodeOfConductable when successful +func (m *MinimalRepository) GetCodeOfConduct()(CodeOfConductable) { + return m.code_of_conduct +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *MinimalRepository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *MinimalRepository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *MinimalRepository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *MinimalRepository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *MinimalRepository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *MinimalRepository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *MinimalRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default_branch property +// returns a *string when successful +func (m *MinimalRepository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. The delete_branch_on_merge property +// returns a *bool when successful +func (m *MinimalRepository) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *MinimalRepository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *MinimalRepository) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. The disabled property +// returns a *bool when successful +func (m *MinimalRepository) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *MinimalRepository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *MinimalRepository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MinimalRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForking(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["code_of_conduct"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeOfConductFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeOfConduct(val.(CodeOfConductable)) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepository_licenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(MinimalRepository_licenseable)) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNetworkCount(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepository_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(MinimalRepository_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["role_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["security_and_analysis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysisFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAndAnalysis(val.(SecurityAndAnalysisable)) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersCount(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *MinimalRepository) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *MinimalRepository) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *MinimalRepository) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *MinimalRepository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *MinimalRepository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *MinimalRepository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *MinimalRepository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *MinimalRepository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *MinimalRepository) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. The has_discussions property +// returns a *bool when successful +func (m *MinimalRepository) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. The has_downloads property +// returns a *bool when successful +func (m *MinimalRepository) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. The has_issues property +// returns a *bool when successful +func (m *MinimalRepository) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *MinimalRepository) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. The has_projects property +// returns a *bool when successful +func (m *MinimalRepository) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. The has_wiki property +// returns a *bool when successful +func (m *MinimalRepository) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *MinimalRepository) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *MinimalRepository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *MinimalRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *MinimalRepository) GetId()(*int64) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *MinimalRepository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *MinimalRepository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *MinimalRepository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. The is_template property +// returns a *bool when successful +func (m *MinimalRepository) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *MinimalRepository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *MinimalRepository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *MinimalRepository) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *MinimalRepository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. The license property +// returns a MinimalRepository_licenseable when successful +func (m *MinimalRepository) GetLicense()(MinimalRepository_licenseable) { + return m.license +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *MinimalRepository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *MinimalRepository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *MinimalRepository) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *MinimalRepository) GetName()(*string) { + return m.name +} +// GetNetworkCount gets the network_count property value. The network_count property +// returns a *int32 when successful +func (m *MinimalRepository) GetNetworkCount()(*int32) { + return m.network_count +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *MinimalRepository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *MinimalRepository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *MinimalRepository) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *MinimalRepository) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *MinimalRepository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a MinimalRepository_permissionsable when successful +func (m *MinimalRepository) GetPermissions()(MinimalRepository_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. The private property +// returns a *bool when successful +func (m *MinimalRepository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *MinimalRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *MinimalRepository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *MinimalRepository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetRoleName gets the role_name property value. The role_name property +// returns a *string when successful +func (m *MinimalRepository) GetRoleName()(*string) { + return m.role_name +} +// GetSecurityAndAnalysis gets the security_and_analysis property value. The security_and_analysis property +// returns a SecurityAndAnalysisable when successful +func (m *MinimalRepository) GetSecurityAndAnalysis()(SecurityAndAnalysisable) { + return m.security_and_analysis +} +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +// returns a *int32 when successful +func (m *MinimalRepository) GetSize()(*int32) { + return m.size +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *MinimalRepository) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *MinimalRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *MinimalRepository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *MinimalRepository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersCount gets the subscribers_count property value. The subscribers_count property +// returns a *int32 when successful +func (m *MinimalRepository) GetSubscribersCount()(*int32) { + return m.subscribers_count +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *MinimalRepository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *MinimalRepository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *MinimalRepository) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *MinimalRepository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *MinimalRepository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *MinimalRepository) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *MinimalRepository) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *MinimalRepository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *MinimalRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MinimalRepository) GetUrl()(*string) { + return m.url +} +// GetVisibility gets the visibility property value. The visibility property +// returns a *string when successful +func (m *MinimalRepository) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *MinimalRepository) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *MinimalRepository) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *MinimalRepository) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *MinimalRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("code_of_conduct", m.GetCodeOfConduct()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("network_count", m.GetNetworkCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role_name", m.GetRoleName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("security_and_analysis", m.GetSecurityAndAnalysis()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("subscribers_count", m.GetSubscribersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MinimalRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowForking sets the allow_forking property value. The allow_forking property +func (m *MinimalRepository) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetArchived sets the archived property value. The archived property +func (m *MinimalRepository) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *MinimalRepository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *MinimalRepository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *MinimalRepository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *MinimalRepository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *MinimalRepository) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCodeOfConduct sets the code_of_conduct property value. Code Of Conduct +func (m *MinimalRepository) SetCodeOfConduct(value CodeOfConductable)() { + m.code_of_conduct = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *MinimalRepository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *MinimalRepository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *MinimalRepository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *MinimalRepository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *MinimalRepository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *MinimalRepository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *MinimalRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default_branch property +func (m *MinimalRepository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. The delete_branch_on_merge property +func (m *MinimalRepository) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *MinimalRepository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *MinimalRepository) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. The disabled property +func (m *MinimalRepository) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *MinimalRepository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *MinimalRepository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *MinimalRepository) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *MinimalRepository) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *MinimalRepository) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *MinimalRepository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *MinimalRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *MinimalRepository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *MinimalRepository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *MinimalRepository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *MinimalRepository) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. The has_discussions property +func (m *MinimalRepository) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. The has_downloads property +func (m *MinimalRepository) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. The has_issues property +func (m *MinimalRepository) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *MinimalRepository) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. The has_projects property +func (m *MinimalRepository) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. The has_wiki property +func (m *MinimalRepository) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *MinimalRepository) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *MinimalRepository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *MinimalRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *MinimalRepository) SetId(value *int64)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *MinimalRepository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *MinimalRepository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *MinimalRepository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. The is_template property +func (m *MinimalRepository) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *MinimalRepository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *MinimalRepository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *MinimalRepository) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *MinimalRepository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. The license property +func (m *MinimalRepository) SetLicense(value MinimalRepository_licenseable)() { + m.license = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *MinimalRepository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *MinimalRepository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *MinimalRepository) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name property +func (m *MinimalRepository) SetName(value *string)() { + m.name = value +} +// SetNetworkCount sets the network_count property value. The network_count property +func (m *MinimalRepository) SetNetworkCount(value *int32)() { + m.network_count = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *MinimalRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *MinimalRepository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *MinimalRepository) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *MinimalRepository) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *MinimalRepository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *MinimalRepository) SetPermissions(value MinimalRepository_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. The private property +func (m *MinimalRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *MinimalRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *MinimalRepository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *MinimalRepository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetRoleName sets the role_name property value. The role_name property +func (m *MinimalRepository) SetRoleName(value *string)() { + m.role_name = value +} +// SetSecurityAndAnalysis sets the security_and_analysis property value. The security_and_analysis property +func (m *MinimalRepository) SetSecurityAndAnalysis(value SecurityAndAnalysisable)() { + m.security_and_analysis = value +} +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +func (m *MinimalRepository) SetSize(value *int32)() { + m.size = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *MinimalRepository) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *MinimalRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *MinimalRepository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *MinimalRepository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersCount sets the subscribers_count property value. The subscribers_count property +func (m *MinimalRepository) SetSubscribersCount(value *int32)() { + m.subscribers_count = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *MinimalRepository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *MinimalRepository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *MinimalRepository) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *MinimalRepository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *MinimalRepository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *MinimalRepository) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *MinimalRepository) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *MinimalRepository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *MinimalRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *MinimalRepository) SetUrl(value *string)() { + m.url = value +} +// SetVisibility sets the visibility property value. The visibility property +func (m *MinimalRepository) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *MinimalRepository) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *MinimalRepository) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *MinimalRepository) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type MinimalRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowForking()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCodeOfConduct()(CodeOfConductable) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(MinimalRepository_licenseable) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNetworkCount()(*int32) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(SimpleUserable) + GetPermissions()(MinimalRepository_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetRoleName()(*string) + GetSecurityAndAnalysis()(SecurityAndAnalysisable) + GetSize()(*int32) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersCount()(*int32) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowForking(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCodeOfConduct(value CodeOfConductable)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value MinimalRepository_licenseable)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNetworkCount(value *int32)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value SimpleUserable)() + SetPermissions(value MinimalRepository_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetRoleName(value *string)() + SetSecurityAndAnalysis(value SecurityAndAnalysisable)() + SetSize(value *int32)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersCount(value *int32)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/minimal_repository_license.go b/pkg/github/models/minimal_repository_license.go new file mode 100644 index 0000000..24e81d1 --- /dev/null +++ b/pkg/github/models/minimal_repository_license.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MinimalRepository_license struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The key property + key *string + // The name property + name *string + // The node_id property + node_id *string + // The spdx_id property + spdx_id *string + // The url property + url *string +} +// NewMinimalRepository_license instantiates a new MinimalRepository_license and sets the default values. +func NewMinimalRepository_license()(*MinimalRepository_license) { + m := &MinimalRepository_license{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMinimalRepository_licenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMinimalRepository_licenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMinimalRepository_license(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MinimalRepository_license) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MinimalRepository_license) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *MinimalRepository_license) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *MinimalRepository_license) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *MinimalRepository_license) GetNodeId()(*string) { + return m.node_id +} +// GetSpdxId gets the spdx_id property value. The spdx_id property +// returns a *string when successful +func (m *MinimalRepository_license) GetSpdxId()(*string) { + return m.spdx_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MinimalRepository_license) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *MinimalRepository_license) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdx_id", m.GetSpdxId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MinimalRepository_license) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The key property +func (m *MinimalRepository_license) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *MinimalRepository_license) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *MinimalRepository_license) SetNodeId(value *string)() { + m.node_id = value +} +// SetSpdxId sets the spdx_id property value. The spdx_id property +func (m *MinimalRepository_license) SetSpdxId(value *string)() { + m.spdx_id = value +} +// SetUrl sets the url property value. The url property +func (m *MinimalRepository_license) SetUrl(value *string)() { + m.url = value +} +type MinimalRepository_licenseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetName()(*string) + GetNodeId()(*string) + GetSpdxId()(*string) + GetUrl()(*string) + SetKey(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetSpdxId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/minimal_repository_permissions.go b/pkg/github/models/minimal_repository_permissions.go new file mode 100644 index 0000000..b52bacc --- /dev/null +++ b/pkg/github/models/minimal_repository_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MinimalRepository_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewMinimalRepository_permissions instantiates a new MinimalRepository_permissions and sets the default values. +func NewMinimalRepository_permissions()(*MinimalRepository_permissions) { + m := &MinimalRepository_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMinimalRepository_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMinimalRepository_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMinimalRepository_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MinimalRepository_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *MinimalRepository_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MinimalRepository_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *MinimalRepository_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *MinimalRepository_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *MinimalRepository_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *MinimalRepository_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *MinimalRepository_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MinimalRepository_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *MinimalRepository_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *MinimalRepository_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *MinimalRepository_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *MinimalRepository_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *MinimalRepository_permissions) SetTriage(value *bool)() { + m.triage = value +} +type MinimalRepository_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/moved_column_in_project_issue_event.go b/pkg/github/models/moved_column_in_project_issue_event.go new file mode 100644 index 0000000..bc06070 --- /dev/null +++ b/pkg/github/models/moved_column_in_project_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MovedColumnInProjectIssueEvent moved Column in Project Issue Event +type MovedColumnInProjectIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The project_card property + project_card MovedColumnInProjectIssueEvent_project_cardable + // The url property + url *string +} +// NewMovedColumnInProjectIssueEvent instantiates a new MovedColumnInProjectIssueEvent and sets the default values. +func NewMovedColumnInProjectIssueEvent()(*MovedColumnInProjectIssueEvent) { + m := &MovedColumnInProjectIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMovedColumnInProjectIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMovedColumnInProjectIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMovedColumnInProjectIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *MovedColumnInProjectIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MovedColumnInProjectIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MovedColumnInProjectIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["project_card"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMovedColumnInProjectIssueEvent_project_cardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProjectCard(val.(MovedColumnInProjectIssueEvent_project_cardable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MovedColumnInProjectIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *MovedColumnInProjectIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetProjectCard gets the project_card property value. The project_card property +// returns a MovedColumnInProjectIssueEvent_project_cardable when successful +func (m *MovedColumnInProjectIssueEvent) GetProjectCard()(MovedColumnInProjectIssueEvent_project_cardable) { + return m.project_card +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *MovedColumnInProjectIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("project_card", m.GetProjectCard()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *MovedColumnInProjectIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MovedColumnInProjectIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *MovedColumnInProjectIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *MovedColumnInProjectIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *MovedColumnInProjectIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *MovedColumnInProjectIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *MovedColumnInProjectIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *MovedColumnInProjectIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *MovedColumnInProjectIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetProjectCard sets the project_card property value. The project_card property +func (m *MovedColumnInProjectIssueEvent) SetProjectCard(value MovedColumnInProjectIssueEvent_project_cardable)() { + m.project_card = value +} +// SetUrl sets the url property value. The url property +func (m *MovedColumnInProjectIssueEvent) SetUrl(value *string)() { + m.url = value +} +type MovedColumnInProjectIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetProjectCard()(MovedColumnInProjectIssueEvent_project_cardable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetProjectCard(value MovedColumnInProjectIssueEvent_project_cardable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/moved_column_in_project_issue_event_project_card.go b/pkg/github/models/moved_column_in_project_issue_event_project_card.go new file mode 100644 index 0000000..b0542ec --- /dev/null +++ b/pkg/github/models/moved_column_in_project_issue_event_project_card.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MovedColumnInProjectIssueEvent_project_card struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The column_name property + column_name *string + // The id property + id *int32 + // The previous_column_name property + previous_column_name *string + // The project_id property + project_id *int32 + // The project_url property + project_url *string + // The url property + url *string +} +// NewMovedColumnInProjectIssueEvent_project_card instantiates a new MovedColumnInProjectIssueEvent_project_card and sets the default values. +func NewMovedColumnInProjectIssueEvent_project_card()(*MovedColumnInProjectIssueEvent_project_card) { + m := &MovedColumnInProjectIssueEvent_project_card{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMovedColumnInProjectIssueEvent_project_cardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMovedColumnInProjectIssueEvent_project_cardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMovedColumnInProjectIssueEvent_project_card(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumnName gets the column_name property value. The column_name property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetColumnName()(*string) { + return m.column_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["previous_column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousColumnName(val) + } + return nil + } + res["project_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProjectId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetId()(*int32) { + return m.id +} +// GetPreviousColumnName gets the previous_column_name property value. The previous_column_name property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetPreviousColumnName()(*string) { + return m.previous_column_name +} +// GetProjectId gets the project_id property value. The project_id property +// returns a *int32 when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetProjectId()(*int32) { + return m.project_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetProjectUrl()(*string) { + return m.project_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *MovedColumnInProjectIssueEvent_project_card) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *MovedColumnInProjectIssueEvent_project_card) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("column_name", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_column_name", m.GetPreviousColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("project_id", m.GetProjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MovedColumnInProjectIssueEvent_project_card) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumnName sets the column_name property value. The column_name property +func (m *MovedColumnInProjectIssueEvent_project_card) SetColumnName(value *string)() { + m.column_name = value +} +// SetId sets the id property value. The id property +func (m *MovedColumnInProjectIssueEvent_project_card) SetId(value *int32)() { + m.id = value +} +// SetPreviousColumnName sets the previous_column_name property value. The previous_column_name property +func (m *MovedColumnInProjectIssueEvent_project_card) SetPreviousColumnName(value *string)() { + m.previous_column_name = value +} +// SetProjectId sets the project_id property value. The project_id property +func (m *MovedColumnInProjectIssueEvent_project_card) SetProjectId(value *int32)() { + m.project_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *MovedColumnInProjectIssueEvent_project_card) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUrl sets the url property value. The url property +func (m *MovedColumnInProjectIssueEvent_project_card) SetUrl(value *string)() { + m.url = value +} +type MovedColumnInProjectIssueEvent_project_cardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnName()(*string) + GetId()(*int32) + GetPreviousColumnName()(*string) + GetProjectId()(*int32) + GetProjectUrl()(*string) + GetUrl()(*string) + SetColumnName(value *string)() + SetId(value *int32)() + SetPreviousColumnName(value *string)() + SetProjectId(value *int32)() + SetProjectUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_code_of_conduct_simple.go b/pkg/github/models/nullable_code_of_conduct_simple.go new file mode 100644 index 0000000..5c00acd --- /dev/null +++ b/pkg/github/models/nullable_code_of_conduct_simple.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableCodeOfConductSimple code of Conduct Simple +type NullableCodeOfConductSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The key property + key *string + // The name property + name *string + // The url property + url *string +} +// NewNullableCodeOfConductSimple instantiates a new NullableCodeOfConductSimple and sets the default values. +func NewNullableCodeOfConductSimple()(*NullableCodeOfConductSimple) { + m := &NullableCodeOfConductSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableCodeOfConductSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableCodeOfConductSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableCodeOfConductSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableCodeOfConductSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableCodeOfConductSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableCodeOfConductSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *NullableCodeOfConductSimple) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableCodeOfConductSimple) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableCodeOfConductSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableCodeOfConductSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableCodeOfConductSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableCodeOfConductSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetKey sets the key property value. The key property +func (m *NullableCodeOfConductSimple) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *NullableCodeOfConductSimple) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *NullableCodeOfConductSimple) SetUrl(value *string)() { + m.url = value +} +type NullableCodeOfConductSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetKey()(*string) + GetName()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetKey(value *string)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_codespace_machine.go b/pkg/github/models/nullable_codespace_machine.go new file mode 100644 index 0000000..e564816 --- /dev/null +++ b/pkg/github/models/nullable_codespace_machine.go @@ -0,0 +1,256 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableCodespaceMachine a description of the machine powering a codespace. +type NullableCodespaceMachine struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How many cores are available to the codespace. + cpus *int32 + // The display name of the machine includes cores, memory, and storage. + display_name *string + // How much memory is available to the codespace. + memory_in_bytes *int32 + // The name of the machine. + name *string + // The operating system of the machine. + operating_system *string + // Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + prebuild_availability *NullableCodespaceMachine_prebuild_availability + // How much storage is available to the codespace. + storage_in_bytes *int32 +} +// NewNullableCodespaceMachine instantiates a new NullableCodespaceMachine and sets the default values. +func NewNullableCodespaceMachine()(*NullableCodespaceMachine) { + m := &NullableCodespaceMachine{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableCodespaceMachineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableCodespaceMachineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableCodespaceMachine(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableCodespaceMachine) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCpus gets the cpus property value. How many cores are available to the codespace. +// returns a *int32 when successful +func (m *NullableCodespaceMachine) GetCpus()(*int32) { + return m.cpus +} +// GetDisplayName gets the display_name property value. The display name of the machine includes cores, memory, and storage. +// returns a *string when successful +func (m *NullableCodespaceMachine) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableCodespaceMachine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cpus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCpus(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["memory_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMemoryInBytes(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["operating_system"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["prebuild_availability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableCodespaceMachine_prebuild_availability) + if err != nil { + return err + } + if val != nil { + m.SetPrebuildAvailability(val.(*NullableCodespaceMachine_prebuild_availability)) + } + return nil + } + res["storage_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStorageInBytes(val) + } + return nil + } + return res +} +// GetMemoryInBytes gets the memory_in_bytes property value. How much memory is available to the codespace. +// returns a *int32 when successful +func (m *NullableCodespaceMachine) GetMemoryInBytes()(*int32) { + return m.memory_in_bytes +} +// GetName gets the name property value. The name of the machine. +// returns a *string when successful +func (m *NullableCodespaceMachine) GetName()(*string) { + return m.name +} +// GetOperatingSystem gets the operating_system property value. The operating system of the machine. +// returns a *string when successful +func (m *NullableCodespaceMachine) GetOperatingSystem()(*string) { + return m.operating_system +} +// GetPrebuildAvailability gets the prebuild_availability property value. Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. +// returns a *NullableCodespaceMachine_prebuild_availability when successful +func (m *NullableCodespaceMachine) GetPrebuildAvailability()(*NullableCodespaceMachine_prebuild_availability) { + return m.prebuild_availability +} +// GetStorageInBytes gets the storage_in_bytes property value. How much storage is available to the codespace. +// returns a *int32 when successful +func (m *NullableCodespaceMachine) GetStorageInBytes()(*int32) { + return m.storage_in_bytes +} +// Serialize serializes information the current object +func (m *NullableCodespaceMachine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("cpus", m.GetCpus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("memory_in_bytes", m.GetMemoryInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operating_system", m.GetOperatingSystem()) + if err != nil { + return err + } + } + if m.GetPrebuildAvailability() != nil { + cast := (*m.GetPrebuildAvailability()).String() + err := writer.WriteStringValue("prebuild_availability", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("storage_in_bytes", m.GetStorageInBytes()) + 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 *NullableCodespaceMachine) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCpus sets the cpus property value. How many cores are available to the codespace. +func (m *NullableCodespaceMachine) SetCpus(value *int32)() { + m.cpus = value +} +// SetDisplayName sets the display_name property value. The display name of the machine includes cores, memory, and storage. +func (m *NullableCodespaceMachine) SetDisplayName(value *string)() { + m.display_name = value +} +// SetMemoryInBytes sets the memory_in_bytes property value. How much memory is available to the codespace. +func (m *NullableCodespaceMachine) SetMemoryInBytes(value *int32)() { + m.memory_in_bytes = value +} +// SetName sets the name property value. The name of the machine. +func (m *NullableCodespaceMachine) SetName(value *string)() { + m.name = value +} +// SetOperatingSystem sets the operating_system property value. The operating system of the machine. +func (m *NullableCodespaceMachine) SetOperatingSystem(value *string)() { + m.operating_system = value +} +// SetPrebuildAvailability sets the prebuild_availability property value. Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. +func (m *NullableCodespaceMachine) SetPrebuildAvailability(value *NullableCodespaceMachine_prebuild_availability)() { + m.prebuild_availability = value +} +// SetStorageInBytes sets the storage_in_bytes property value. How much storage is available to the codespace. +func (m *NullableCodespaceMachine) SetStorageInBytes(value *int32)() { + m.storage_in_bytes = value +} +type NullableCodespaceMachineable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCpus()(*int32) + GetDisplayName()(*string) + GetMemoryInBytes()(*int32) + GetName()(*string) + GetOperatingSystem()(*string) + GetPrebuildAvailability()(*NullableCodespaceMachine_prebuild_availability) + GetStorageInBytes()(*int32) + SetCpus(value *int32)() + SetDisplayName(value *string)() + SetMemoryInBytes(value *int32)() + SetName(value *string)() + SetOperatingSystem(value *string)() + SetPrebuildAvailability(value *NullableCodespaceMachine_prebuild_availability)() + SetStorageInBytes(value *int32)() +} diff --git a/pkg/github/models/nullable_codespace_machine_prebuild_availability.go b/pkg/github/models/nullable_codespace_machine_prebuild_availability.go new file mode 100644 index 0000000..c690735 --- /dev/null +++ b/pkg/github/models/nullable_codespace_machine_prebuild_availability.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. +type NullableCodespaceMachine_prebuild_availability int + +const ( + NONE_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY NullableCodespaceMachine_prebuild_availability = iota + READY_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY + IN_PROGRESS_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY +) + +func (i NullableCodespaceMachine_prebuild_availability) String() string { + return []string{"none", "ready", "in_progress"}[i] +} +func ParseNullableCodespaceMachine_prebuild_availability(v string) (any, error) { + result := NONE_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY + switch v { + case "none": + result = NONE_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY + case "ready": + result = READY_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY + case "in_progress": + result = IN_PROGRESS_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY + default: + return 0, errors.New("Unknown NullableCodespaceMachine_prebuild_availability value: " + v) + } + return &result, nil +} +func SerializeNullableCodespaceMachine_prebuild_availability(values []NullableCodespaceMachine_prebuild_availability) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableCodespaceMachine_prebuild_availability) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_collaborator.go b/pkg/github/models/nullable_collaborator.go new file mode 100644 index 0000000..3eab0a5 --- /dev/null +++ b/pkg/github/models/nullable_collaborator.go @@ -0,0 +1,690 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableCollaborator collaborator +type NullableCollaborator struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The email property + email *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The permissions property + permissions NullableCollaborator_permissionsable + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The role_name property + role_name *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewNullableCollaborator instantiates a new NullableCollaborator and sets the default values. +func NewNullableCollaborator()(*NullableCollaborator) { + m := &NullableCollaborator{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableCollaboratorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableCollaboratorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableCollaborator(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableCollaborator) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *NullableCollaborator) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *NullableCollaborator) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *NullableCollaborator) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableCollaborator) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCollaborator_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(NullableCollaborator_permissionsable)) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["role_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *NullableCollaborator) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *NullableCollaborator) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *NullableCollaborator) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *NullableCollaborator) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableCollaborator) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *NullableCollaborator) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *NullableCollaborator) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableCollaborator) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableCollaborator) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *NullableCollaborator) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetPermissions gets the permissions property value. The permissions property +// returns a NullableCollaborator_permissionsable when successful +func (m *NullableCollaborator) GetPermissions()(NullableCollaborator_permissionsable) { + return m.permissions +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *NullableCollaborator) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *NullableCollaborator) GetReposUrl()(*string) { + return m.repos_url +} +// GetRoleName gets the role_name property value. The role_name property +// returns a *string when successful +func (m *NullableCollaborator) GetRoleName()(*string) { + return m.role_name +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *NullableCollaborator) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *NullableCollaborator) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *NullableCollaborator) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *NullableCollaborator) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableCollaborator) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableCollaborator) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role_name", m.GetRoleName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *NullableCollaborator) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *NullableCollaborator) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEmail sets the email property value. The email property +func (m *NullableCollaborator) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *NullableCollaborator) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *NullableCollaborator) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *NullableCollaborator) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *NullableCollaborator) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *NullableCollaborator) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableCollaborator) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *NullableCollaborator) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *NullableCollaborator) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *NullableCollaborator) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableCollaborator) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *NullableCollaborator) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *NullableCollaborator) SetPermissions(value NullableCollaborator_permissionsable)() { + m.permissions = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *NullableCollaborator) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *NullableCollaborator) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetRoleName sets the role_name property value. The role_name property +func (m *NullableCollaborator) SetRoleName(value *string)() { + m.role_name = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *NullableCollaborator) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *NullableCollaborator) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *NullableCollaborator) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *NullableCollaborator) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *NullableCollaborator) SetUrl(value *string)() { + m.url = value +} +type NullableCollaboratorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetPermissions()(NullableCollaborator_permissionsable) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetRoleName()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetPermissions(value NullableCollaborator_permissionsable)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetRoleName(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_collaborator_permissions.go b/pkg/github/models/nullable_collaborator_permissions.go new file mode 100644 index 0000000..fb3065f --- /dev/null +++ b/pkg/github/models/nullable_collaborator_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableCollaborator_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewNullableCollaborator_permissions instantiates a new NullableCollaborator_permissions and sets the default values. +func NewNullableCollaborator_permissions()(*NullableCollaborator_permissions) { + m := &NullableCollaborator_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableCollaborator_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableCollaborator_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableCollaborator_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableCollaborator_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *NullableCollaborator_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableCollaborator_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *NullableCollaborator_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *NullableCollaborator_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *NullableCollaborator_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *NullableCollaborator_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *NullableCollaborator_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableCollaborator_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *NullableCollaborator_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *NullableCollaborator_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *NullableCollaborator_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *NullableCollaborator_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *NullableCollaborator_permissions) SetTriage(value *bool)() { + m.triage = value +} +type NullableCollaborator_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/nullable_community_health_file.go b/pkg/github/models/nullable_community_health_file.go new file mode 100644 index 0000000..a221c43 --- /dev/null +++ b/pkg/github/models/nullable_community_health_file.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableCommunityHealthFile struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The url property + url *string +} +// NewNullableCommunityHealthFile instantiates a new NullableCommunityHealthFile and sets the default values. +func NewNullableCommunityHealthFile()(*NullableCommunityHealthFile) { + m := &NullableCommunityHealthFile{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableCommunityHealthFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableCommunityHealthFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableCommunityHealthFile(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableCommunityHealthFile) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableCommunityHealthFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableCommunityHealthFile) GetHtmlUrl()(*string) { + return m.html_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableCommunityHealthFile) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableCommunityHealthFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableCommunityHealthFile) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableCommunityHealthFile) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetUrl sets the url property value. The url property +func (m *NullableCommunityHealthFile) SetUrl(value *string)() { + m.url = value +} +type NullableCommunityHealthFileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_git_user.go b/pkg/github/models/nullable_git_user.go new file mode 100644 index 0000000..ab70ce3 --- /dev/null +++ b/pkg/github/models/nullable_git_user.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableGitUser metaproperties for Git author/committer information. +type NullableGitUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The email property + email *string + // The name property + name *string +} +// NewNullableGitUser instantiates a new NullableGitUser and sets the default values. +func NewNullableGitUser()(*NullableGitUser) { + m := &NullableGitUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableGitUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableGitUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableGitUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableGitUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *NullableGitUser) GetDate()(*string) { + return m.date +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *NullableGitUser) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableGitUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableGitUser) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *NullableGitUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *NullableGitUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *NullableGitUser) SetDate(value *string)() { + m.date = value +} +// SetEmail sets the email property value. The email property +func (m *NullableGitUser) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name property +func (m *NullableGitUser) SetName(value *string)() { + m.name = value +} +type NullableGitUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetEmail()(*string) + GetName()(*string) + SetDate(value *string)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/nullable_integration.go b/pkg/github/models/nullable_integration.go new file mode 100644 index 0000000..8cc0ccf --- /dev/null +++ b/pkg/github/models/nullable_integration.go @@ -0,0 +1,552 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableIntegration gitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +type NullableIntegration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The client_id property + client_id *string + // The client_secret property + client_secret *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The list of events for the GitHub app + events []string + // The external_url property + external_url *string + // The html_url property + html_url *string + // Unique identifier of the GitHub app + id *int32 + // The number of installations associated with the GitHub app + installations_count *int32 + // The name of the GitHub app + name *string + // The node_id property + node_id *string + // A GitHub user. + owner NullableSimpleUserable + // The pem property + pem *string + // The set of permissions for the GitHub app + permissions NullableIntegration_permissionsable + // The slug name of the GitHub app + slug *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The webhook_secret property + webhook_secret *string +} +// NewNullableIntegration instantiates a new NullableIntegration and sets the default values. +func NewNullableIntegration()(*NullableIntegration) { + m := &NullableIntegration{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableIntegrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableIntegrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableIntegration(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableIntegration) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientId gets the client_id property value. The client_id property +// returns a *string when successful +func (m *NullableIntegration) GetClientId()(*string) { + return m.client_id +} +// GetClientSecret gets the client_secret property value. The client_secret property +// returns a *string when successful +func (m *NullableIntegration) GetClientSecret()(*string) { + return m.client_secret +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *NullableIntegration) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *NullableIntegration) GetDescription()(*string) { + return m.description +} +// GetEvents gets the events property value. The list of events for the GitHub app +// returns a []string when successful +func (m *NullableIntegration) GetEvents()([]string) { + return m.events +} +// GetExternalUrl gets the external_url property value. The external_url property +// returns a *string when successful +func (m *NullableIntegration) GetExternalUrl()(*string) { + return m.external_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableIntegration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["client_secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientSecret(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["external_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["installations_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstallationsCount(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["pem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPem(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegration_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(NullableIntegration_permissionsable)) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["webhook_secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebhookSecret(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableIntegration) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the GitHub app +// returns a *int32 when successful +func (m *NullableIntegration) GetId()(*int32) { + return m.id +} +// GetInstallationsCount gets the installations_count property value. The number of installations associated with the GitHub app +// returns a *int32 when successful +func (m *NullableIntegration) GetInstallationsCount()(*int32) { + return m.installations_count +} +// GetName gets the name property value. The name of the GitHub app +// returns a *string when successful +func (m *NullableIntegration) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableIntegration) GetNodeId()(*string) { + return m.node_id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *NullableIntegration) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetPem gets the pem property value. The pem property +// returns a *string when successful +func (m *NullableIntegration) GetPem()(*string) { + return m.pem +} +// GetPermissions gets the permissions property value. The set of permissions for the GitHub app +// returns a NullableIntegration_permissionsable when successful +func (m *NullableIntegration) GetPermissions()(NullableIntegration_permissionsable) { + return m.permissions +} +// GetSlug gets the slug property value. The slug name of the GitHub app +// returns a *string when successful +func (m *NullableIntegration) GetSlug()(*string) { + return m.slug +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *NullableIntegration) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetWebhookSecret gets the webhook_secret property value. The webhook_secret property +// returns a *string when successful +func (m *NullableIntegration) GetWebhookSecret()(*string) { + return m.webhook_secret +} +// Serialize serializes information the current object +func (m *NullableIntegration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client_id", m.GetClientId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("client_secret", m.GetClientSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("external_url", m.GetExternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("installations_count", m.GetInstallationsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pem", m.GetPem()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webhook_secret", m.GetWebhookSecret()) + 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 *NullableIntegration) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientId sets the client_id property value. The client_id property +func (m *NullableIntegration) SetClientId(value *string)() { + m.client_id = value +} +// SetClientSecret sets the client_secret property value. The client_secret property +func (m *NullableIntegration) SetClientSecret(value *string)() { + m.client_secret = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *NullableIntegration) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *NullableIntegration) SetDescription(value *string)() { + m.description = value +} +// SetEvents sets the events property value. The list of events for the GitHub app +func (m *NullableIntegration) SetEvents(value []string)() { + m.events = value +} +// SetExternalUrl sets the external_url property value. The external_url property +func (m *NullableIntegration) SetExternalUrl(value *string)() { + m.external_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableIntegration) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the GitHub app +func (m *NullableIntegration) SetId(value *int32)() { + m.id = value +} +// SetInstallationsCount sets the installations_count property value. The number of installations associated with the GitHub app +func (m *NullableIntegration) SetInstallationsCount(value *int32)() { + m.installations_count = value +} +// SetName sets the name property value. The name of the GitHub app +func (m *NullableIntegration) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableIntegration) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *NullableIntegration) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetPem sets the pem property value. The pem property +func (m *NullableIntegration) SetPem(value *string)() { + m.pem = value +} +// SetPermissions sets the permissions property value. The set of permissions for the GitHub app +func (m *NullableIntegration) SetPermissions(value NullableIntegration_permissionsable)() { + m.permissions = value +} +// SetSlug sets the slug property value. The slug name of the GitHub app +func (m *NullableIntegration) SetSlug(value *string)() { + m.slug = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *NullableIntegration) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetWebhookSecret sets the webhook_secret property value. The webhook_secret property +func (m *NullableIntegration) SetWebhookSecret(value *string)() { + m.webhook_secret = value +} +type NullableIntegrationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientId()(*string) + GetClientSecret()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetEvents()([]string) + GetExternalUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetInstallationsCount()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetOwner()(NullableSimpleUserable) + GetPem()(*string) + GetPermissions()(NullableIntegration_permissionsable) + GetSlug()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWebhookSecret()(*string) + SetClientId(value *string)() + SetClientSecret(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetEvents(value []string)() + SetExternalUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetInstallationsCount(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetOwner(value NullableSimpleUserable)() + SetPem(value *string)() + SetPermissions(value NullableIntegration_permissionsable)() + SetSlug(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWebhookSecret(value *string)() +} diff --git a/pkg/github/models/nullable_integration_permissions.go b/pkg/github/models/nullable_integration_permissions.go new file mode 100644 index 0000000..d7f5b02 --- /dev/null +++ b/pkg/github/models/nullable_integration_permissions.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableIntegration_permissions the set of permissions for the GitHub app +type NullableIntegration_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The checks property + checks *string + // The contents property + contents *string + // The deployments property + deployments *string + // The issues property + issues *string + // The metadata property + metadata *string +} +// NewNullableIntegration_permissions instantiates a new NullableIntegration_permissions and sets the default values. +func NewNullableIntegration_permissions()(*NullableIntegration_permissions) { + m := &NullableIntegration_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableIntegration_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableIntegration_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableIntegration_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableIntegration_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChecks gets the checks property value. The checks property +// returns a *string when successful +func (m *NullableIntegration_permissions) GetChecks()(*string) { + return m.checks +} +// GetContents gets the contents property value. The contents property +// returns a *string when successful +func (m *NullableIntegration_permissions) GetContents()(*string) { + return m.contents +} +// GetDeployments gets the deployments property value. The deployments property +// returns a *string when successful +func (m *NullableIntegration_permissions) GetDeployments()(*string) { + return m.deployments +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableIntegration_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChecks(val) + } + return nil + } + res["contents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContents(val) + } + return nil + } + res["deployments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployments(val) + } + return nil + } + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssues(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val) + } + return nil + } + return res +} +// GetIssues gets the issues property value. The issues property +// returns a *string when successful +func (m *NullableIntegration_permissions) GetIssues()(*string) { + return m.issues +} +// GetMetadata gets the metadata property value. The metadata property +// returns a *string when successful +func (m *NullableIntegration_permissions) GetMetadata()(*string) { + return m.metadata +} +// Serialize serializes information the current object +func (m *NullableIntegration_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("checks", m.GetChecks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents", m.GetContents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments", m.GetDeployments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues", m.GetIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("metadata", m.GetMetadata()) + 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 *NullableIntegration_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChecks sets the checks property value. The checks property +func (m *NullableIntegration_permissions) SetChecks(value *string)() { + m.checks = value +} +// SetContents sets the contents property value. The contents property +func (m *NullableIntegration_permissions) SetContents(value *string)() { + m.contents = value +} +// SetDeployments sets the deployments property value. The deployments property +func (m *NullableIntegration_permissions) SetDeployments(value *string)() { + m.deployments = value +} +// SetIssues sets the issues property value. The issues property +func (m *NullableIntegration_permissions) SetIssues(value *string)() { + m.issues = value +} +// SetMetadata sets the metadata property value. The metadata property +func (m *NullableIntegration_permissions) SetMetadata(value *string)() { + m.metadata = value +} +type NullableIntegration_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecks()(*string) + GetContents()(*string) + GetDeployments()(*string) + GetIssues()(*string) + GetMetadata()(*string) + SetChecks(value *string)() + SetContents(value *string)() + SetDeployments(value *string)() + SetIssues(value *string)() + SetMetadata(value *string)() +} diff --git a/pkg/github/models/nullable_issue.go b/pkg/github/models/nullable_issue.go new file mode 100644 index 0000000..8eb356a --- /dev/null +++ b/pkg/github/models/nullable_issue.go @@ -0,0 +1,1059 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableIssue issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +type NullableIssue struct { + // The active_lock_reason property + active_lock_reason *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee NullableSimpleUserable + // The assignees property + assignees []SimpleUserable + // How the author is associated with the repository. + author_association *AuthorAssociation + // Contents of the issue + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + closed_by NullableSimpleUserable + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The draft property + draft *bool + // The events_url property + events_url *string + // The html_url property + html_url *string + // The id property + id *int64 + // Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + labels []string + // The labels_url property + labels_url *string + // The locked property + locked *bool + // A collection of related issues and pull requests. + milestone NullableMilestoneable + // The node_id property + node_id *string + // Number uniquely identifying the issue within its repository + number *int32 + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The pull_request property + pull_request NullableIssue_pull_requestable + // The reactions property + reactions ReactionRollupable + // A repository on GitHub. + repository Repositoryable + // The repository_url property + repository_url *string + // State of the issue; either 'open' or 'closed' + state *string + // The reason for the current state + state_reason *NullableIssue_state_reason + // The timeline_url property + timeline_url *string + // Title of the issue + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the issue + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewNullableIssue instantiates a new NullableIssue and sets the default values. +func NewNullableIssue()(*NullableIssue) { + m := &NullableIssue{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableIssueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableIssueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableIssue(), nil +} +// GetActiveLockReason gets the active_lock_reason property value. The active_lock_reason property +// returns a *string when successful +func (m *NullableIssue) GetActiveLockReason()(*string) { + return m.active_lock_reason +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableIssue) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *NullableIssue) GetAssignee()(NullableSimpleUserable) { + return m.assignee +} +// GetAssignees gets the assignees property value. The assignees property +// returns a []SimpleUserable when successful +func (m *NullableIssue) GetAssignees()([]SimpleUserable) { + return m.assignees +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *NullableIssue) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. Contents of the issue +// returns a *string when successful +func (m *NullableIssue) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *NullableIssue) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *NullableIssue) GetBodyText()(*string) { + return m.body_text +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *NullableIssue) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetClosedBy gets the closed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *NullableIssue) GetClosedBy()(NullableSimpleUserable) { + return m.closed_by +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *NullableIssue) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *NullableIssue) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *NullableIssue) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDraft gets the draft property value. The draft property +// returns a *bool when successful +func (m *NullableIssue) GetDraft()(*bool) { + return m.draft +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *NullableIssue) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableIssue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active_lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveLockReason(val) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(NullableSimpleUserable)) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetAssignees(res) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["closed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClosedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["locked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocked(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMilestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(NullableMilestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIssue_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(NullableIssue_pull_requestable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(Repositoryable)) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["state_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableIssue_state_reason) + if err != nil { + return err + } + if val != nil { + m.SetStateReason(val.(*NullableIssue_state_reason)) + } + return nil + } + res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimelineUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableIssue) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *NullableIssue) GetId()(*int64) { + return m.id +} +// GetLabels gets the labels property value. Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository +// returns a []string when successful +func (m *NullableIssue) GetLabels()([]string) { + return m.labels +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *NullableIssue) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLocked gets the locked property value. The locked property +// returns a *bool when successful +func (m *NullableIssue) GetLocked()(*bool) { + return m.locked +} +// GetMilestone gets the milestone property value. A collection of related issues and pull requests. +// returns a NullableMilestoneable when successful +func (m *NullableIssue) GetMilestone()(NullableMilestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableIssue) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. Number uniquely identifying the issue within its repository +// returns a *int32 when successful +func (m *NullableIssue) GetNumber()(*int32) { + return m.number +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *NullableIssue) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetPullRequest gets the pull_request property value. The pull_request property +// returns a NullableIssue_pull_requestable when successful +func (m *NullableIssue) GetPullRequest()(NullableIssue_pull_requestable) { + return m.pull_request +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *NullableIssue) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetRepository gets the repository property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *NullableIssue) GetRepository()(Repositoryable) { + return m.repository +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *NullableIssue) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetState gets the state property value. State of the issue; either 'open' or 'closed' +// returns a *string when successful +func (m *NullableIssue) GetState()(*string) { + return m.state +} +// GetStateReason gets the state_reason property value. The reason for the current state +// returns a *NullableIssue_state_reason when successful +func (m *NullableIssue) GetStateReason()(*NullableIssue_state_reason) { + return m.state_reason +} +// GetTimelineUrl gets the timeline_url property value. The timeline_url property +// returns a *string when successful +func (m *NullableIssue) GetTimelineUrl()(*string) { + return m.timeline_url +} +// GetTitle gets the title property value. Title of the issue +// returns a *string when successful +func (m *NullableIssue) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *NullableIssue) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the issue +// returns a *string when successful +func (m *NullableIssue) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *NullableIssue) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *NullableIssue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("active_lock_reason", m.GetActiveLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignees())) + for i, v := range m.GetAssignees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("assignees", cast) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("closed_by", m.GetClosedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("locked", m.GetLocked()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + if m.GetStateReason() != nil { + cast := (*m.GetStateReason()).String() + err := writer.WriteStringValue("state_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveLockReason sets the active_lock_reason property value. The active_lock_reason property +func (m *NullableIssue) SetActiveLockReason(value *string)() { + m.active_lock_reason = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableIssue) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *NullableIssue) SetAssignee(value NullableSimpleUserable)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. The assignees property +func (m *NullableIssue) SetAssignees(value []SimpleUserable)() { + m.assignees = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *NullableIssue) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. Contents of the issue +func (m *NullableIssue) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *NullableIssue) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *NullableIssue) SetBodyText(value *string)() { + m.body_text = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *NullableIssue) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetClosedBy sets the closed_by property value. A GitHub user. +func (m *NullableIssue) SetClosedBy(value NullableSimpleUserable)() { + m.closed_by = value +} +// SetComments sets the comments property value. The comments property +func (m *NullableIssue) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *NullableIssue) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *NullableIssue) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDraft sets the draft property value. The draft property +func (m *NullableIssue) SetDraft(value *bool)() { + m.draft = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *NullableIssue) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableIssue) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *NullableIssue) SetId(value *int64)() { + m.id = value +} +// SetLabels sets the labels property value. Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository +func (m *NullableIssue) SetLabels(value []string)() { + m.labels = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *NullableIssue) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLocked sets the locked property value. The locked property +func (m *NullableIssue) SetLocked(value *bool)() { + m.locked = value +} +// SetMilestone sets the milestone property value. A collection of related issues and pull requests. +func (m *NullableIssue) SetMilestone(value NullableMilestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableIssue) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. Number uniquely identifying the issue within its repository +func (m *NullableIssue) SetNumber(value *int32)() { + m.number = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *NullableIssue) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetPullRequest sets the pull_request property value. The pull_request property +func (m *NullableIssue) SetPullRequest(value NullableIssue_pull_requestable)() { + m.pull_request = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *NullableIssue) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetRepository sets the repository property value. A repository on GitHub. +func (m *NullableIssue) SetRepository(value Repositoryable)() { + m.repository = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *NullableIssue) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetState sets the state property value. State of the issue; either 'open' or 'closed' +func (m *NullableIssue) SetState(value *string)() { + m.state = value +} +// SetStateReason sets the state_reason property value. The reason for the current state +func (m *NullableIssue) SetStateReason(value *NullableIssue_state_reason)() { + m.state_reason = value +} +// SetTimelineUrl sets the timeline_url property value. The timeline_url property +func (m *NullableIssue) SetTimelineUrl(value *string)() { + m.timeline_url = value +} +// SetTitle sets the title property value. Title of the issue +func (m *NullableIssue) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *NullableIssue) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the issue +func (m *NullableIssue) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *NullableIssue) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type NullableIssueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveLockReason()(*string) + GetAssignee()(NullableSimpleUserable) + GetAssignees()([]SimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetClosedBy()(NullableSimpleUserable) + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDraft()(*bool) + GetEventsUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLabels()([]string) + GetLabelsUrl()(*string) + GetLocked()(*bool) + GetMilestone()(NullableMilestoneable) + GetNodeId()(*string) + GetNumber()(*int32) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetPullRequest()(NullableIssue_pull_requestable) + GetReactions()(ReactionRollupable) + GetRepository()(Repositoryable) + GetRepositoryUrl()(*string) + GetState()(*string) + GetStateReason()(*NullableIssue_state_reason) + GetTimelineUrl()(*string) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetActiveLockReason(value *string)() + SetAssignee(value NullableSimpleUserable)() + SetAssignees(value []SimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetClosedBy(value NullableSimpleUserable)() + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDraft(value *bool)() + SetEventsUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLabels(value []string)() + SetLabelsUrl(value *string)() + SetLocked(value *bool)() + SetMilestone(value NullableMilestoneable)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetPullRequest(value NullableIssue_pull_requestable)() + SetReactions(value ReactionRollupable)() + SetRepository(value Repositoryable)() + SetRepositoryUrl(value *string)() + SetState(value *string)() + SetStateReason(value *NullableIssue_state_reason)() + SetTimelineUrl(value *string)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/nullable_issue_pull_request.go b/pkg/github/models/nullable_issue_pull_request.go new file mode 100644 index 0000000..6929bb2 --- /dev/null +++ b/pkg/github/models/nullable_issue_pull_request.go @@ -0,0 +1,197 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableIssue_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The diff_url property + diff_url *string + // The html_url property + html_url *string + // The merged_at property + merged_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The patch_url property + patch_url *string + // The url property + url *string +} +// NewNullableIssue_pull_request instantiates a new NullableIssue_pull_request and sets the default values. +func NewNullableIssue_pull_request()(*NullableIssue_pull_request) { + m := &NullableIssue_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableIssue_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableIssue_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableIssue_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableIssue_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiffUrl gets the diff_url property value. The diff_url property +// returns a *string when successful +func (m *NullableIssue_pull_request) GetDiffUrl()(*string) { + return m.diff_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableIssue_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["diff_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["merged_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMergedAt(val) + } + return nil + } + res["patch_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableIssue_pull_request) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMergedAt gets the merged_at property value. The merged_at property +// returns a *Time when successful +func (m *NullableIssue_pull_request) GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.merged_at +} +// GetPatchUrl gets the patch_url property value. The patch_url property +// returns a *string when successful +func (m *NullableIssue_pull_request) GetPatchUrl()(*string) { + return m.patch_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableIssue_pull_request) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableIssue_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("diff_url", m.GetDiffUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("merged_at", m.GetMergedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch_url", m.GetPatchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableIssue_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiffUrl sets the diff_url property value. The diff_url property +func (m *NullableIssue_pull_request) SetDiffUrl(value *string)() { + m.diff_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableIssue_pull_request) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMergedAt sets the merged_at property value. The merged_at property +func (m *NullableIssue_pull_request) SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.merged_at = value +} +// SetPatchUrl sets the patch_url property value. The patch_url property +func (m *NullableIssue_pull_request) SetPatchUrl(value *string)() { + m.patch_url = value +} +// SetUrl sets the url property value. The url property +func (m *NullableIssue_pull_request) SetUrl(value *string)() { + m.url = value +} +type NullableIssue_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiffUrl()(*string) + GetHtmlUrl()(*string) + GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPatchUrl()(*string) + GetUrl()(*string) + SetDiffUrl(value *string)() + SetHtmlUrl(value *string)() + SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPatchUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_issue_state_reason.go b/pkg/github/models/nullable_issue_state_reason.go new file mode 100644 index 0000000..74b1a96 --- /dev/null +++ b/pkg/github/models/nullable_issue_state_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The reason for the current state +type NullableIssue_state_reason int + +const ( + COMPLETED_NULLABLEISSUE_STATE_REASON NullableIssue_state_reason = iota + REOPENED_NULLABLEISSUE_STATE_REASON + NOT_PLANNED_NULLABLEISSUE_STATE_REASON +) + +func (i NullableIssue_state_reason) String() string { + return []string{"completed", "reopened", "not_planned"}[i] +} +func ParseNullableIssue_state_reason(v string) (any, error) { + result := COMPLETED_NULLABLEISSUE_STATE_REASON + switch v { + case "completed": + result = COMPLETED_NULLABLEISSUE_STATE_REASON + case "reopened": + result = REOPENED_NULLABLEISSUE_STATE_REASON + case "not_planned": + result = NOT_PLANNED_NULLABLEISSUE_STATE_REASON + default: + return 0, errors.New("Unknown NullableIssue_state_reason value: " + v) + } + return &result, nil +} +func SerializeNullableIssue_state_reason(values []NullableIssue_state_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableIssue_state_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_license_simple.go b/pkg/github/models/nullable_license_simple.go new file mode 100644 index 0000000..38f6ea7 --- /dev/null +++ b/pkg/github/models/nullable_license_simple.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableLicenseSimple license Simple +type NullableLicenseSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The key property + key *string + // The name property + name *string + // The node_id property + node_id *string + // The spdx_id property + spdx_id *string + // The url property + url *string +} +// NewNullableLicenseSimple instantiates a new NullableLicenseSimple and sets the default values. +func NewNullableLicenseSimple()(*NullableLicenseSimple) { + m := &NullableLicenseSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableLicenseSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableLicenseSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableLicenseSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableLicenseSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableLicenseSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableLicenseSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *NullableLicenseSimple) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableLicenseSimple) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableLicenseSimple) GetNodeId()(*string) { + return m.node_id +} +// GetSpdxId gets the spdx_id property value. The spdx_id property +// returns a *string when successful +func (m *NullableLicenseSimple) GetSpdxId()(*string) { + return m.spdx_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableLicenseSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableLicenseSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdx_id", m.GetSpdxId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableLicenseSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableLicenseSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetKey sets the key property value. The key property +func (m *NullableLicenseSimple) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *NullableLicenseSimple) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableLicenseSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetSpdxId sets the spdx_id property value. The spdx_id property +func (m *NullableLicenseSimple) SetSpdxId(value *string)() { + m.spdx_id = value +} +// SetUrl sets the url property value. The url property +func (m *NullableLicenseSimple) SetUrl(value *string)() { + m.url = value +} +type NullableLicenseSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetKey()(*string) + GetName()(*string) + GetNodeId()(*string) + GetSpdxId()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetKey(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetSpdxId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_milestone.go b/pkg/github/models/nullable_milestone.go new file mode 100644 index 0000000..d997e35 --- /dev/null +++ b/pkg/github/models/nullable_milestone.go @@ -0,0 +1,520 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableMilestone a collection of related issues and pull requests. +type NullableMilestone struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The closed_issues property + closed_issues *int32 + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + creator NullableSimpleUserable + // The description property + description *string + // The due_on property + due_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // The id property + id *int32 + // The labels_url property + labels_url *string + // The node_id property + node_id *string + // The number of the milestone. + number *int32 + // The open_issues property + open_issues *int32 + // The state of the milestone. + state *NullableMilestone_state + // The title of the milestone. + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewNullableMilestone instantiates a new NullableMilestone and sets the default values. +func NewNullableMilestone()(*NullableMilestone) { + m := &NullableMilestone{ + } + m.SetAdditionalData(make(map[string]any)) + stateValue := OPEN_NULLABLEMILESTONE_STATE + m.SetState(&stateValue) + return m +} +// CreateNullableMilestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableMilestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableMilestone(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableMilestone) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *NullableMilestone) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetClosedIssues gets the closed_issues property value. The closed_issues property +// returns a *int32 when successful +func (m *NullableMilestone) GetClosedIssues()(*int32) { + return m.closed_issues +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *NullableMilestone) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *NullableMilestone) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *NullableMilestone) GetDescription()(*string) { + return m.description +} +// GetDueOn gets the due_on property value. The due_on property +// returns a *Time when successful +func (m *NullableMilestone) GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.due_on +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableMilestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["closed_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetClosedIssues(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + 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["due_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueOn(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableMilestone_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*NullableMilestone_state)) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableMilestone) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *NullableMilestone) GetId()(*int32) { + return m.id +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *NullableMilestone) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableMilestone) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The number of the milestone. +// returns a *int32 when successful +func (m *NullableMilestone) GetNumber()(*int32) { + return m.number +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *NullableMilestone) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetState gets the state property value. The state of the milestone. +// returns a *NullableMilestone_state when successful +func (m *NullableMilestone) GetState()(*NullableMilestone_state) { + return m.state +} +// GetTitle gets the title property value. The title of the milestone. +// returns a *string when successful +func (m *NullableMilestone) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *NullableMilestone) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableMilestone) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableMilestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("closed_issues", m.GetClosedIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("due_on", m.GetDueOn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableMilestone) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *NullableMilestone) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetClosedIssues sets the closed_issues property value. The closed_issues property +func (m *NullableMilestone) SetClosedIssues(value *int32)() { + m.closed_issues = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *NullableMilestone) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *NullableMilestone) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetDescription sets the description property value. The description property +func (m *NullableMilestone) SetDescription(value *string)() { + m.description = value +} +// SetDueOn sets the due_on property value. The due_on property +func (m *NullableMilestone) SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.due_on = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableMilestone) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *NullableMilestone) SetId(value *int32)() { + m.id = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *NullableMilestone) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableMilestone) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The number of the milestone. +func (m *NullableMilestone) SetNumber(value *int32)() { + m.number = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *NullableMilestone) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetState sets the state property value. The state of the milestone. +func (m *NullableMilestone) SetState(value *NullableMilestone_state)() { + m.state = value +} +// SetTitle sets the title property value. The title of the milestone. +func (m *NullableMilestone) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *NullableMilestone) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *NullableMilestone) SetUrl(value *string)() { + m.url = value +} +type NullableMilestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetClosedIssues()(*int32) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(NullableSimpleUserable) + GetDescription()(*string) + GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLabelsUrl()(*string) + GetNodeId()(*string) + GetNumber()(*int32) + GetOpenIssues()(*int32) + GetState()(*NullableMilestone_state) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetClosedIssues(value *int32)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value NullableSimpleUserable)() + SetDescription(value *string)() + SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLabelsUrl(value *string)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetOpenIssues(value *int32)() + SetState(value *NullableMilestone_state)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_milestone_state.go b/pkg/github/models/nullable_milestone_state.go new file mode 100644 index 0000000..02a8c64 --- /dev/null +++ b/pkg/github/models/nullable_milestone_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The state of the milestone. +type NullableMilestone_state int + +const ( + OPEN_NULLABLEMILESTONE_STATE NullableMilestone_state = iota + CLOSED_NULLABLEMILESTONE_STATE +) + +func (i NullableMilestone_state) String() string { + return []string{"open", "closed"}[i] +} +func ParseNullableMilestone_state(v string) (any, error) { + result := OPEN_NULLABLEMILESTONE_STATE + switch v { + case "open": + result = OPEN_NULLABLEMILESTONE_STATE + case "closed": + result = CLOSED_NULLABLEMILESTONE_STATE + default: + return 0, errors.New("Unknown NullableMilestone_state value: " + v) + } + return &result, nil +} +func SerializeNullableMilestone_state(values []NullableMilestone_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableMilestone_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_minimal_repository.go b/pkg/github/models/nullable_minimal_repository.go new file mode 100644 index 0000000..56399ad --- /dev/null +++ b/pkg/github/models/nullable_minimal_repository.go @@ -0,0 +1,2582 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableMinimalRepository minimal Repository +type NullableMinimalRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_forking property + allow_forking *bool + // The archive_url property + archive_url *string + // The archived property + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // Code Of Conduct + code_of_conduct CodeOfConductable + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_branch property + default_branch *string + // The delete_branch_on_merge property + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // The disabled property + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // The has_discussions property + has_discussions *bool + // The has_downloads property + has_downloads *bool + // The has_issues property + has_issues *bool + // The has_pages property + has_pages *bool + // The has_projects property + has_projects *bool + // The has_wiki property + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int64 + // The is_template property + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // The license property + license NullableMinimalRepository_licenseable + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name property + name *string + // The network_count property + network_count *int32 + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + owner SimpleUserable + // The permissions property + permissions NullableMinimalRepository_permissionsable + // The private property + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The role_name property + role_name *string + // The security_and_analysis property + security_and_analysis SecurityAndAnalysisable + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + size *int32 + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_count property + subscribers_count *int32 + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The visibility property + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewNullableMinimalRepository instantiates a new NullableMinimalRepository and sets the default values. +func NewNullableMinimalRepository()(*NullableMinimalRepository) { + m := &NullableMinimalRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableMinimalRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableMinimalRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableMinimalRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableMinimalRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowForking gets the allow_forking property value. The allow_forking property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetArchived gets the archived property value. The archived property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCodeOfConduct gets the code_of_conduct property value. Code Of Conduct +// returns a CodeOfConductable when successful +func (m *NullableMinimalRepository) GetCodeOfConduct()(CodeOfConductable) { + return m.code_of_conduct +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *NullableMinimalRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default_branch property +// returns a *string when successful +func (m *NullableMinimalRepository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. The delete_branch_on_merge property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *NullableMinimalRepository) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. The disabled property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableMinimalRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForking(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["code_of_conduct"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeOfConductFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeOfConduct(val.(CodeOfConductable)) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMinimalRepository_licenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableMinimalRepository_licenseable)) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNetworkCount(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMinimalRepository_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(NullableMinimalRepository_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["role_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["security_and_analysis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysisFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAndAnalysis(val.(SecurityAndAnalysisable)) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersCount(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *NullableMinimalRepository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. The has_discussions property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. The has_downloads property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. The has_issues property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. The has_projects property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. The has_wiki property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *NullableMinimalRepository) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *NullableMinimalRepository) GetId()(*int64) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. The is_template property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *NullableMinimalRepository) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. The license property +// returns a NullableMinimalRepository_licenseable when successful +func (m *NullableMinimalRepository) GetLicense()(NullableMinimalRepository_licenseable) { + return m.license +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableMinimalRepository) GetName()(*string) { + return m.name +} +// GetNetworkCount gets the network_count property value. The network_count property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetNetworkCount()(*int32) { + return m.network_count +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableMinimalRepository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *NullableMinimalRepository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a NullableMinimalRepository_permissionsable when successful +func (m *NullableMinimalRepository) GetPermissions()(NullableMinimalRepository_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. The private property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *NullableMinimalRepository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetRoleName gets the role_name property value. The role_name property +// returns a *string when successful +func (m *NullableMinimalRepository) GetRoleName()(*string) { + return m.role_name +} +// GetSecurityAndAnalysis gets the security_and_analysis property value. The security_and_analysis property +// returns a SecurityAndAnalysisable when successful +func (m *NullableMinimalRepository) GetSecurityAndAnalysis()(SecurityAndAnalysisable) { + return m.security_and_analysis +} +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetSize()(*int32) { + return m.size +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersCount gets the subscribers_count property value. The subscribers_count property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetSubscribersCount()(*int32) { + return m.subscribers_count +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *NullableMinimalRepository) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *NullableMinimalRepository) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *NullableMinimalRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableMinimalRepository) GetUrl()(*string) { + return m.url +} +// GetVisibility gets the visibility property value. The visibility property +// returns a *string when successful +func (m *NullableMinimalRepository) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *NullableMinimalRepository) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *NullableMinimalRepository) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *NullableMinimalRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("code_of_conduct", m.GetCodeOfConduct()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("network_count", m.GetNetworkCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role_name", m.GetRoleName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("security_and_analysis", m.GetSecurityAndAnalysis()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("subscribers_count", m.GetSubscribersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableMinimalRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowForking sets the allow_forking property value. The allow_forking property +func (m *NullableMinimalRepository) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetArchived sets the archived property value. The archived property +func (m *NullableMinimalRepository) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *NullableMinimalRepository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *NullableMinimalRepository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *NullableMinimalRepository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *NullableMinimalRepository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *NullableMinimalRepository) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCodeOfConduct sets the code_of_conduct property value. Code Of Conduct +func (m *NullableMinimalRepository) SetCodeOfConduct(value CodeOfConductable)() { + m.code_of_conduct = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *NullableMinimalRepository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *NullableMinimalRepository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *NullableMinimalRepository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *NullableMinimalRepository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *NullableMinimalRepository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *NullableMinimalRepository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *NullableMinimalRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default_branch property +func (m *NullableMinimalRepository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. The delete_branch_on_merge property +func (m *NullableMinimalRepository) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *NullableMinimalRepository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *NullableMinimalRepository) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. The disabled property +func (m *NullableMinimalRepository) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *NullableMinimalRepository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *NullableMinimalRepository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *NullableMinimalRepository) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *NullableMinimalRepository) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *NullableMinimalRepository) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *NullableMinimalRepository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *NullableMinimalRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *NullableMinimalRepository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *NullableMinimalRepository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *NullableMinimalRepository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *NullableMinimalRepository) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. The has_discussions property +func (m *NullableMinimalRepository) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. The has_downloads property +func (m *NullableMinimalRepository) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. The has_issues property +func (m *NullableMinimalRepository) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *NullableMinimalRepository) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. The has_projects property +func (m *NullableMinimalRepository) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. The has_wiki property +func (m *NullableMinimalRepository) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *NullableMinimalRepository) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *NullableMinimalRepository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableMinimalRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *NullableMinimalRepository) SetId(value *int64)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *NullableMinimalRepository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *NullableMinimalRepository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *NullableMinimalRepository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. The is_template property +func (m *NullableMinimalRepository) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *NullableMinimalRepository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *NullableMinimalRepository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *NullableMinimalRepository) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *NullableMinimalRepository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. The license property +func (m *NullableMinimalRepository) SetLicense(value NullableMinimalRepository_licenseable)() { + m.license = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *NullableMinimalRepository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *NullableMinimalRepository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *NullableMinimalRepository) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name property +func (m *NullableMinimalRepository) SetName(value *string)() { + m.name = value +} +// SetNetworkCount sets the network_count property value. The network_count property +func (m *NullableMinimalRepository) SetNetworkCount(value *int32)() { + m.network_count = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableMinimalRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *NullableMinimalRepository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *NullableMinimalRepository) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *NullableMinimalRepository) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *NullableMinimalRepository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *NullableMinimalRepository) SetPermissions(value NullableMinimalRepository_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. The private property +func (m *NullableMinimalRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *NullableMinimalRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *NullableMinimalRepository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *NullableMinimalRepository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetRoleName sets the role_name property value. The role_name property +func (m *NullableMinimalRepository) SetRoleName(value *string)() { + m.role_name = value +} +// SetSecurityAndAnalysis sets the security_and_analysis property value. The security_and_analysis property +func (m *NullableMinimalRepository) SetSecurityAndAnalysis(value SecurityAndAnalysisable)() { + m.security_and_analysis = value +} +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +func (m *NullableMinimalRepository) SetSize(value *int32)() { + m.size = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *NullableMinimalRepository) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *NullableMinimalRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *NullableMinimalRepository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *NullableMinimalRepository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersCount sets the subscribers_count property value. The subscribers_count property +func (m *NullableMinimalRepository) SetSubscribersCount(value *int32)() { + m.subscribers_count = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *NullableMinimalRepository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *NullableMinimalRepository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *NullableMinimalRepository) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *NullableMinimalRepository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *NullableMinimalRepository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *NullableMinimalRepository) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *NullableMinimalRepository) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *NullableMinimalRepository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *NullableMinimalRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *NullableMinimalRepository) SetUrl(value *string)() { + m.url = value +} +// SetVisibility sets the visibility property value. The visibility property +func (m *NullableMinimalRepository) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *NullableMinimalRepository) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *NullableMinimalRepository) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *NullableMinimalRepository) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type NullableMinimalRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowForking()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCodeOfConduct()(CodeOfConductable) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableMinimalRepository_licenseable) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNetworkCount()(*int32) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(SimpleUserable) + GetPermissions()(NullableMinimalRepository_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetRoleName()(*string) + GetSecurityAndAnalysis()(SecurityAndAnalysisable) + GetSize()(*int32) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersCount()(*int32) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowForking(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCodeOfConduct(value CodeOfConductable)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableMinimalRepository_licenseable)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNetworkCount(value *int32)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value SimpleUserable)() + SetPermissions(value NullableMinimalRepository_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetRoleName(value *string)() + SetSecurityAndAnalysis(value SecurityAndAnalysisable)() + SetSize(value *int32)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersCount(value *int32)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/nullable_minimal_repository_license.go b/pkg/github/models/nullable_minimal_repository_license.go new file mode 100644 index 0000000..fc5616a --- /dev/null +++ b/pkg/github/models/nullable_minimal_repository_license.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableMinimalRepository_license struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The key property + key *string + // The name property + name *string + // The node_id property + node_id *string + // The spdx_id property + spdx_id *string + // The url property + url *string +} +// NewNullableMinimalRepository_license instantiates a new NullableMinimalRepository_license and sets the default values. +func NewNullableMinimalRepository_license()(*NullableMinimalRepository_license) { + m := &NullableMinimalRepository_license{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableMinimalRepository_licenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableMinimalRepository_licenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableMinimalRepository_license(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableMinimalRepository_license) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableMinimalRepository_license) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *NullableMinimalRepository_license) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableMinimalRepository_license) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableMinimalRepository_license) GetNodeId()(*string) { + return m.node_id +} +// GetSpdxId gets the spdx_id property value. The spdx_id property +// returns a *string when successful +func (m *NullableMinimalRepository_license) GetSpdxId()(*string) { + return m.spdx_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableMinimalRepository_license) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableMinimalRepository_license) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdx_id", m.GetSpdxId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableMinimalRepository_license) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The key property +func (m *NullableMinimalRepository_license) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *NullableMinimalRepository_license) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableMinimalRepository_license) SetNodeId(value *string)() { + m.node_id = value +} +// SetSpdxId sets the spdx_id property value. The spdx_id property +func (m *NullableMinimalRepository_license) SetSpdxId(value *string)() { + m.spdx_id = value +} +// SetUrl sets the url property value. The url property +func (m *NullableMinimalRepository_license) SetUrl(value *string)() { + m.url = value +} +type NullableMinimalRepository_licenseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetName()(*string) + GetNodeId()(*string) + GetSpdxId()(*string) + GetUrl()(*string) + SetKey(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetSpdxId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_minimal_repository_permissions.go b/pkg/github/models/nullable_minimal_repository_permissions.go new file mode 100644 index 0000000..4a043af --- /dev/null +++ b/pkg/github/models/nullable_minimal_repository_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableMinimalRepository_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewNullableMinimalRepository_permissions instantiates a new NullableMinimalRepository_permissions and sets the default values. +func NewNullableMinimalRepository_permissions()(*NullableMinimalRepository_permissions) { + m := &NullableMinimalRepository_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableMinimalRepository_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableMinimalRepository_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableMinimalRepository_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableMinimalRepository_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *NullableMinimalRepository_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableMinimalRepository_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *NullableMinimalRepository_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *NullableMinimalRepository_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *NullableMinimalRepository_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *NullableMinimalRepository_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *NullableMinimalRepository_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableMinimalRepository_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *NullableMinimalRepository_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *NullableMinimalRepository_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *NullableMinimalRepository_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *NullableMinimalRepository_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *NullableMinimalRepository_permissions) SetTriage(value *bool)() { + m.triage = value +} +type NullableMinimalRepository_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/nullable_repository.go b/pkg/github/models/nullable_repository.go new file mode 100644 index 0000000..c3080c6 --- /dev/null +++ b/pkg/github/models/nullable_repository.go @@ -0,0 +1,2826 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableRepository a repository on GitHub. +type NullableRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to allow Auto-merge to be used on pull requests. + allow_auto_merge *bool + // Whether to allow forking this repo + allow_forking *bool + // Whether to allow merge commits for pull requests. + allow_merge_commit *bool + // Whether to allow rebase merges for pull requests. + allow_rebase_merge *bool + // Whether to allow squash merges for pull requests. + allow_squash_merge *bool + // Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + allow_update_branch *bool + // Whether anonymous git access is enabled for this repository + anonymous_access_enabled *bool + // The archive_url property + archive_url *string + // Whether the repository is archived. + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default branch of the repository. + default_branch *string + // Whether to delete head branches when pull requests are merged + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // Returns whether or not this repository disabled. + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // Whether discussions are enabled. + has_discussions *bool + // Whether downloads are enabled. + // Deprecated: + has_downloads *bool + // Whether issues are enabled. + has_issues *bool + // The has_pages property + has_pages *bool + // Whether projects are enabled. + has_projects *bool + // Whether the wiki is enabled. + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // Unique identifier of the repository + id *int64 + // Whether this repository acts as a template that can be used to generate new repositories. + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // License Simple + license NullableLicenseSimpleable + // The master_branch property + master_branch *string + // The 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. + merge_commit_message *NullableRepository_merge_commit_message + // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_title *NullableRepository_merge_commit_title + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name of the repository. + name *string + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + owner SimpleUserable + // The permissions property + permissions NullableRepository_permissionsable + // Whether the repository is private or public. + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + size *int32 + // 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. + squash_merge_commit_message *NullableRepository_squash_merge_commit_message + // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_title *NullableRepository_squash_merge_commit_title + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The starred_at property + starred_at *string + // The statuses_url property + statuses_url *string + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + // Deprecated: + use_squash_pr_title_as_default *bool + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // Whether to require contributors to sign off on web-based commits + web_commit_signoff_required *bool +} +// NewNullableRepository instantiates a new NullableRepository and sets the default values. +func NewNullableRepository()(*NullableRepository) { + m := &NullableRepository{ + } + m.SetAdditionalData(make(map[string]any)) + visibilityValue := "public" + m.SetVisibility(&visibilityValue) + return m +} +// CreateNullableRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +// returns a *bool when successful +func (m *NullableRepository) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowForking gets the allow_forking property value. Whether to allow forking this repo +// returns a *bool when successful +func (m *NullableRepository) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +// returns a *bool when successful +func (m *NullableRepository) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +// returns a *bool when successful +func (m *NullableRepository) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +// returns a *bool when successful +func (m *NullableRepository) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetAllowUpdateBranch gets the allow_update_branch property value. Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. +// returns a *bool when successful +func (m *NullableRepository) GetAllowUpdateBranch()(*bool) { + return m.allow_update_branch +} +// GetAnonymousAccessEnabled gets the anonymous_access_enabled property value. Whether anonymous git access is enabled for this repository +// returns a *bool when successful +func (m *NullableRepository) GetAnonymousAccessEnabled()(*bool) { + return m.anonymous_access_enabled +} +// GetArchived gets the archived property value. Whether the repository is archived. +// returns a *bool when successful +func (m *NullableRepository) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *NullableRepository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *NullableRepository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *NullableRepository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *NullableRepository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *NullableRepository) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *NullableRepository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *NullableRepository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *NullableRepository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *NullableRepository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *NullableRepository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *NullableRepository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *NullableRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default branch of the repository. +// returns a *string when successful +func (m *NullableRepository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +// returns a *bool when successful +func (m *NullableRepository) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *NullableRepository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *NullableRepository) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. Returns whether or not this repository disabled. +// returns a *bool when successful +func (m *NullableRepository) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *NullableRepository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *NullableRepository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableRepository) 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["anonymous_access_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAnonymousAccessEnabled(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableRepository_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitMessage(val.(*NullableRepository_merge_commit_message)) + } + return nil + } + res["merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableRepository_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitTitle(val.(*NullableRepository_merge_commit_title)) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableRepository_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(NullableRepository_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["squash_merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableRepository_squash_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitMessage(val.(*NullableRepository_squash_merge_commit_message)) + } + return nil + } + res["squash_merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableRepository_squash_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitTitle(val.(*NullableRepository_squash_merge_commit_title)) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["starred_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredAt(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["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["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *NullableRepository) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *NullableRepository) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *NullableRepository) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *NullableRepository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *NullableRepository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *NullableRepository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *NullableRepository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *NullableRepository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *NullableRepository) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. Whether discussions are enabled. +// returns a *bool when successful +func (m *NullableRepository) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. Whether downloads are enabled. +// Deprecated: +// returns a *bool when successful +func (m *NullableRepository) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. Whether issues are enabled. +// returns a *bool when successful +func (m *NullableRepository) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *NullableRepository) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. Whether projects are enabled. +// returns a *bool when successful +func (m *NullableRepository) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. Whether the wiki is enabled. +// returns a *bool when successful +func (m *NullableRepository) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *NullableRepository) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *NullableRepository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the repository +// returns a *int64 when successful +func (m *NullableRepository) GetId()(*int64) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *NullableRepository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *NullableRepository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *NullableRepository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +// returns a *bool when successful +func (m *NullableRepository) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *NullableRepository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *NullableRepository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *NullableRepository) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *NullableRepository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *NullableRepository) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *NullableRepository) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergeCommitMessage gets the merge_commit_message property value. 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. +// returns a *NullableRepository_merge_commit_message when successful +func (m *NullableRepository) GetMergeCommitMessage()(*NullableRepository_merge_commit_message) { + return m.merge_commit_message +} +// GetMergeCommitTitle gets the merge_commit_title property value. 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). +// returns a *NullableRepository_merge_commit_title when successful +func (m *NullableRepository) GetMergeCommitTitle()(*NullableRepository_merge_commit_title) { + return m.merge_commit_title +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *NullableRepository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *NullableRepository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *NullableRepository) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *NullableRepository) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableRepository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *NullableRepository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *NullableRepository) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *NullableRepository) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *NullableRepository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a NullableRepository_permissionsable when successful +func (m *NullableRepository) GetPermissions()(NullableRepository_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. Whether the repository is private or public. +// returns a *bool when successful +func (m *NullableRepository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *NullableRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *NullableRepository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *NullableRepository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +// returns a *int32 when successful +func (m *NullableRepository) GetSize()(*int32) { + return m.size +} +// GetSquashMergeCommitMessage gets the squash_merge_commit_message property value. 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. +// returns a *NullableRepository_squash_merge_commit_message when successful +func (m *NullableRepository) GetSquashMergeCommitMessage()(*NullableRepository_squash_merge_commit_message) { + return m.squash_merge_commit_message +} +// GetSquashMergeCommitTitle gets the squash_merge_commit_title property value. 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). +// returns a *NullableRepository_squash_merge_commit_title when successful +func (m *NullableRepository) GetSquashMergeCommitTitle()(*NullableRepository_squash_merge_commit_title) { + return m.squash_merge_commit_title +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *NullableRepository) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *NullableRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *NullableRepository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStarredAt gets the starred_at property value. The starred_at property +// returns a *string when successful +func (m *NullableRepository) GetStarredAt()(*string) { + return m.starred_at +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *NullableRepository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *NullableRepository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *NullableRepository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *NullableRepository) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *NullableRepository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *NullableRepository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *NullableRepository) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *NullableRepository) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *NullableRepository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *NullableRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableRepository) GetUrl()(*string) { + return m.url +} +// GetUseSquashPrTitleAsDefault gets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. +// Deprecated: +// returns a *bool when successful +func (m *NullableRepository) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *NullableRepository) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *NullableRepository) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *NullableRepository) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. Whether to require contributors to sign off on web-based commits +// returns a *bool when successful +func (m *NullableRepository) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *NullableRepository) 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("anonymous_access_enabled", m.GetAnonymousAccessEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + if m.GetMergeCommitMessage() != nil { + cast := (*m.GetMergeCommitMessage()).String() + err := writer.WriteStringValue("merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetMergeCommitTitle() != nil { + cast := (*m.GetMergeCommitTitle()).String() + err := writer.WriteStringValue("merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitMessage() != nil { + cast := (*m.GetSquashMergeCommitMessage()).String() + err := writer.WriteStringValue("squash_merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitTitle() != nil { + cast := (*m.GetSquashMergeCommitTitle()).String() + err := writer.WriteStringValue("squash_merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_at", m.GetStarredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +func (m *NullableRepository) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowForking sets the allow_forking property value. Whether to allow forking this repo +func (m *NullableRepository) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +func (m *NullableRepository) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +func (m *NullableRepository) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +func (m *NullableRepository) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetAllowUpdateBranch sets the allow_update_branch property value. Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. +func (m *NullableRepository) SetAllowUpdateBranch(value *bool)() { + m.allow_update_branch = value +} +// SetAnonymousAccessEnabled sets the anonymous_access_enabled property value. Whether anonymous git access is enabled for this repository +func (m *NullableRepository) SetAnonymousAccessEnabled(value *bool)() { + m.anonymous_access_enabled = value +} +// SetArchived sets the archived property value. Whether the repository is archived. +func (m *NullableRepository) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *NullableRepository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *NullableRepository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *NullableRepository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *NullableRepository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *NullableRepository) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *NullableRepository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *NullableRepository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *NullableRepository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *NullableRepository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *NullableRepository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *NullableRepository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *NullableRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default branch of the repository. +func (m *NullableRepository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +func (m *NullableRepository) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *NullableRepository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *NullableRepository) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. Returns whether or not this repository disabled. +func (m *NullableRepository) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *NullableRepository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *NullableRepository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *NullableRepository) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *NullableRepository) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *NullableRepository) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *NullableRepository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *NullableRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *NullableRepository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *NullableRepository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *NullableRepository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *NullableRepository) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. Whether discussions are enabled. +func (m *NullableRepository) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. Whether downloads are enabled. +// Deprecated: +func (m *NullableRepository) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. Whether issues are enabled. +func (m *NullableRepository) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *NullableRepository) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. Whether projects are enabled. +func (m *NullableRepository) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. Whether the wiki is enabled. +func (m *NullableRepository) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *NullableRepository) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *NullableRepository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the repository +func (m *NullableRepository) SetId(value *int64)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *NullableRepository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *NullableRepository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *NullableRepository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +func (m *NullableRepository) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *NullableRepository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *NullableRepository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *NullableRepository) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *NullableRepository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. License Simple +func (m *NullableRepository) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *NullableRepository) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergeCommitMessage sets the merge_commit_message property value. 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. +func (m *NullableRepository) SetMergeCommitMessage(value *NullableRepository_merge_commit_message)() { + m.merge_commit_message = value +} +// SetMergeCommitTitle sets the merge_commit_title property value. 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). +func (m *NullableRepository) SetMergeCommitTitle(value *NullableRepository_merge_commit_title)() { + m.merge_commit_title = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *NullableRepository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *NullableRepository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *NullableRepository) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name of the repository. +func (m *NullableRepository) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *NullableRepository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *NullableRepository) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *NullableRepository) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *NullableRepository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *NullableRepository) SetPermissions(value NullableRepository_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. Whether the repository is private or public. +func (m *NullableRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *NullableRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *NullableRepository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *NullableRepository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +func (m *NullableRepository) SetSize(value *int32)() { + m.size = value +} +// SetSquashMergeCommitMessage sets the squash_merge_commit_message property value. 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. +func (m *NullableRepository) SetSquashMergeCommitMessage(value *NullableRepository_squash_merge_commit_message)() { + m.squash_merge_commit_message = value +} +// SetSquashMergeCommitTitle sets the squash_merge_commit_title property value. 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). +func (m *NullableRepository) SetSquashMergeCommitTitle(value *NullableRepository_squash_merge_commit_title)() { + m.squash_merge_commit_title = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *NullableRepository) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *NullableRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *NullableRepository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStarredAt sets the starred_at property value. The starred_at property +func (m *NullableRepository) SetStarredAt(value *string)() { + m.starred_at = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *NullableRepository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *NullableRepository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *NullableRepository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *NullableRepository) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *NullableRepository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *NullableRepository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *NullableRepository) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *NullableRepository) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *NullableRepository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *NullableRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *NullableRepository) SetUrl(value *string)() { + m.url = value +} +// SetUseSquashPrTitleAsDefault sets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. +// Deprecated: +func (m *NullableRepository) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *NullableRepository) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *NullableRepository) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *NullableRepository) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. Whether to require contributors to sign off on web-based commits +func (m *NullableRepository) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type NullableRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetAllowUpdateBranch()(*bool) + GetAnonymousAccessEnabled()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetMasterBranch()(*string) + GetMergeCommitMessage()(*NullableRepository_merge_commit_message) + GetMergeCommitTitle()(*NullableRepository_merge_commit_title) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(SimpleUserable) + GetPermissions()(NullableRepository_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetSize()(*int32) + GetSquashMergeCommitMessage()(*NullableRepository_squash_merge_commit_message) + GetSquashMergeCommitTitle()(*NullableRepository_squash_merge_commit_title) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStarredAt()(*string) + GetStatusesUrl()(*string) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUseSquashPrTitleAsDefault()(*bool) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetAllowUpdateBranch(value *bool)() + SetAnonymousAccessEnabled(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetMasterBranch(value *string)() + SetMergeCommitMessage(value *NullableRepository_merge_commit_message)() + SetMergeCommitTitle(value *NullableRepository_merge_commit_title)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value SimpleUserable)() + SetPermissions(value NullableRepository_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetSize(value *int32)() + SetSquashMergeCommitMessage(value *NullableRepository_squash_merge_commit_message)() + SetSquashMergeCommitTitle(value *NullableRepository_squash_merge_commit_title)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStarredAt(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUseSquashPrTitleAsDefault(value *bool)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/nullable_repository_merge_commit_message.go b/pkg/github/models/nullable_repository_merge_commit_message.go new file mode 100644 index 0000000..8799176 --- /dev/null +++ b/pkg/github/models/nullable_repository_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type NullableRepository_merge_commit_message int + +const ( + PR_BODY_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE NullableRepository_merge_commit_message = iota + PR_TITLE_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE + BLANK_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE +) + +func (i NullableRepository_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseNullableRepository_merge_commit_message(v string) (any, error) { + result := PR_BODY_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown NullableRepository_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeNullableRepository_merge_commit_message(values []NullableRepository_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableRepository_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_repository_merge_commit_title.go b/pkg/github/models/nullable_repository_merge_commit_title.go new file mode 100644 index 0000000..513530c --- /dev/null +++ b/pkg/github/models/nullable_repository_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +type NullableRepository_merge_commit_title int + +const ( + PR_TITLE_NULLABLEREPOSITORY_MERGE_COMMIT_TITLE NullableRepository_merge_commit_title = iota + MERGE_MESSAGE_NULLABLEREPOSITORY_MERGE_COMMIT_TITLE +) + +func (i NullableRepository_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseNullableRepository_merge_commit_title(v string) (any, error) { + result := PR_TITLE_NULLABLEREPOSITORY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_NULLABLEREPOSITORY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_NULLABLEREPOSITORY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown NullableRepository_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeNullableRepository_merge_commit_title(values []NullableRepository_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableRepository_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_repository_permissions.go b/pkg/github/models/nullable_repository_permissions.go new file mode 100644 index 0000000..81ce08e --- /dev/null +++ b/pkg/github/models/nullable_repository_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableRepository_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewNullableRepository_permissions instantiates a new NullableRepository_permissions and sets the default values. +func NewNullableRepository_permissions()(*NullableRepository_permissions) { + m := &NullableRepository_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableRepository_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableRepository_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableRepository_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableRepository_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *NullableRepository_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableRepository_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *NullableRepository_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *NullableRepository_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *NullableRepository_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *NullableRepository_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *NullableRepository_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableRepository_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *NullableRepository_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *NullableRepository_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *NullableRepository_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *NullableRepository_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *NullableRepository_permissions) SetTriage(value *bool)() { + m.triage = value +} +type NullableRepository_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/nullable_repository_squash_merge_commit_message.go b/pkg/github/models/nullable_repository_squash_merge_commit_message.go new file mode 100644 index 0000000..77bc0ee --- /dev/null +++ b/pkg/github/models/nullable_repository_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type NullableRepository_squash_merge_commit_message int + +const ( + PR_BODY_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE NullableRepository_squash_merge_commit_message = iota + COMMIT_MESSAGES_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i NullableRepository_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseNullableRepository_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown NullableRepository_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeNullableRepository_squash_merge_commit_message(values []NullableRepository_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableRepository_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_repository_squash_merge_commit_title.go b/pkg/github/models/nullable_repository_squash_merge_commit_title.go new file mode 100644 index 0000000..57aef86 --- /dev/null +++ b/pkg/github/models/nullable_repository_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type NullableRepository_squash_merge_commit_title int + +const ( + PR_TITLE_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_TITLE NullableRepository_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i NullableRepository_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseNullableRepository_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown NullableRepository_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeNullableRepository_squash_merge_commit_title(values []NullableRepository_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableRepository_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_scoped_installation.go b/pkg/github/models/nullable_scoped_installation.go new file mode 100644 index 0000000..774a11c --- /dev/null +++ b/pkg/github/models/nullable_scoped_installation.go @@ -0,0 +1,261 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NullableScopedInstallation struct { + // A GitHub user. + account SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The has_multiple_single_files property + has_multiple_single_files *bool + // The permissions granted to the user access token. + permissions AppPermissionsable + // The repositories_url property + repositories_url *string + // Describe whether all repositories have been selected or there's a selection involved + repository_selection *NullableScopedInstallation_repository_selection + // The single_file_name property + single_file_name *string + // The single_file_paths property + single_file_paths []string +} +// NewNullableScopedInstallation instantiates a new NullableScopedInstallation and sets the default values. +func NewNullableScopedInstallation()(*NullableScopedInstallation) { + m := &NullableScopedInstallation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableScopedInstallationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableScopedInstallationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableScopedInstallation(), nil +} +// GetAccount gets the account property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *NullableScopedInstallation) GetAccount()(SimpleUserable) { + return m.account +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableScopedInstallation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableScopedInstallation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(SimpleUserable)) + } + return nil + } + res["has_multiple_single_files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMultipleSingleFiles(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppPermissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(AppPermissionsable)) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableScopedInstallation_repository_selection) + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val.(*NullableScopedInstallation_repository_selection)) + } + return nil + } + res["single_file_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleFileName(val) + } + return nil + } + res["single_file_paths"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSingleFilePaths(res) + } + return nil + } + return res +} +// GetHasMultipleSingleFiles gets the has_multiple_single_files property value. The has_multiple_single_files property +// returns a *bool when successful +func (m *NullableScopedInstallation) GetHasMultipleSingleFiles()(*bool) { + return m.has_multiple_single_files +} +// GetPermissions gets the permissions property value. The permissions granted to the user access token. +// returns a AppPermissionsable when successful +func (m *NullableScopedInstallation) GetPermissions()(AppPermissionsable) { + return m.permissions +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *NullableScopedInstallation) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetRepositorySelection gets the repository_selection property value. Describe whether all repositories have been selected or there's a selection involved +// returns a *NullableScopedInstallation_repository_selection when successful +func (m *NullableScopedInstallation) GetRepositorySelection()(*NullableScopedInstallation_repository_selection) { + return m.repository_selection +} +// GetSingleFileName gets the single_file_name property value. The single_file_name property +// returns a *string when successful +func (m *NullableScopedInstallation) GetSingleFileName()(*string) { + return m.single_file_name +} +// GetSingleFilePaths gets the single_file_paths property value. The single_file_paths property +// returns a []string when successful +func (m *NullableScopedInstallation) GetSingleFilePaths()([]string) { + return m.single_file_paths +} +// Serialize serializes information the current object +func (m *NullableScopedInstallation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_multiple_single_files", m.GetHasMultipleSingleFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + if m.GetRepositorySelection() != nil { + cast := (*m.GetRepositorySelection()).String() + err := writer.WriteStringValue("repository_selection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("single_file_name", m.GetSingleFileName()) + if err != nil { + return err + } + } + if m.GetSingleFilePaths() != nil { + err := writer.WriteCollectionOfStringValues("single_file_paths", m.GetSingleFilePaths()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. A GitHub user. +func (m *NullableScopedInstallation) SetAccount(value SimpleUserable)() { + m.account = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableScopedInstallation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHasMultipleSingleFiles sets the has_multiple_single_files property value. The has_multiple_single_files property +func (m *NullableScopedInstallation) SetHasMultipleSingleFiles(value *bool)() { + m.has_multiple_single_files = value +} +// SetPermissions sets the permissions property value. The permissions granted to the user access token. +func (m *NullableScopedInstallation) SetPermissions(value AppPermissionsable)() { + m.permissions = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *NullableScopedInstallation) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetRepositorySelection sets the repository_selection property value. Describe whether all repositories have been selected or there's a selection involved +func (m *NullableScopedInstallation) SetRepositorySelection(value *NullableScopedInstallation_repository_selection)() { + m.repository_selection = value +} +// SetSingleFileName sets the single_file_name property value. The single_file_name property +func (m *NullableScopedInstallation) SetSingleFileName(value *string)() { + m.single_file_name = value +} +// SetSingleFilePaths sets the single_file_paths property value. The single_file_paths property +func (m *NullableScopedInstallation) SetSingleFilePaths(value []string)() { + m.single_file_paths = value +} +type NullableScopedInstallationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(SimpleUserable) + GetHasMultipleSingleFiles()(*bool) + GetPermissions()(AppPermissionsable) + GetRepositoriesUrl()(*string) + GetRepositorySelection()(*NullableScopedInstallation_repository_selection) + GetSingleFileName()(*string) + GetSingleFilePaths()([]string) + SetAccount(value SimpleUserable)() + SetHasMultipleSingleFiles(value *bool)() + SetPermissions(value AppPermissionsable)() + SetRepositoriesUrl(value *string)() + SetRepositorySelection(value *NullableScopedInstallation_repository_selection)() + SetSingleFileName(value *string)() + SetSingleFilePaths(value []string)() +} diff --git a/pkg/github/models/nullable_scoped_installation_repository_selection.go b/pkg/github/models/nullable_scoped_installation_repository_selection.go new file mode 100644 index 0000000..393459a --- /dev/null +++ b/pkg/github/models/nullable_scoped_installation_repository_selection.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Describe whether all repositories have been selected or there's a selection involved +type NullableScopedInstallation_repository_selection int + +const ( + ALL_NULLABLESCOPEDINSTALLATION_REPOSITORY_SELECTION NullableScopedInstallation_repository_selection = iota + SELECTED_NULLABLESCOPEDINSTALLATION_REPOSITORY_SELECTION +) + +func (i NullableScopedInstallation_repository_selection) String() string { + return []string{"all", "selected"}[i] +} +func ParseNullableScopedInstallation_repository_selection(v string) (any, error) { + result := ALL_NULLABLESCOPEDINSTALLATION_REPOSITORY_SELECTION + switch v { + case "all": + result = ALL_NULLABLESCOPEDINSTALLATION_REPOSITORY_SELECTION + case "selected": + result = SELECTED_NULLABLESCOPEDINSTALLATION_REPOSITORY_SELECTION + default: + return 0, errors.New("Unknown NullableScopedInstallation_repository_selection value: " + v) + } + return &result, nil +} +func SerializeNullableScopedInstallation_repository_selection(values []NullableScopedInstallation_repository_selection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableScopedInstallation_repository_selection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_simple_commit.go b/pkg/github/models/nullable_simple_commit.go new file mode 100644 index 0000000..0071232 --- /dev/null +++ b/pkg/github/models/nullable_simple_commit.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableSimpleCommit a commit. +type NullableSimpleCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Information about the Git author + author NullableSimpleCommit_authorable + // Information about the Git committer + committer NullableSimpleCommit_committerable + // SHA for the commit + id *string + // Message describing the purpose of the commit + message *string + // Timestamp of the commit + timestamp *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // SHA for the commit's tree + tree_id *string +} +// NewNullableSimpleCommit instantiates a new NullableSimpleCommit and sets the default values. +func NewNullableSimpleCommit()(*NullableSimpleCommit) { + m := &NullableSimpleCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableSimpleCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableSimpleCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableSimpleCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableSimpleCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. Information about the Git author +// returns a NullableSimpleCommit_authorable when successful +func (m *NullableSimpleCommit) GetAuthor()(NullableSimpleCommit_authorable) { + return m.author +} +// GetCommitter gets the committer property value. Information about the Git committer +// returns a NullableSimpleCommit_committerable when successful +func (m *NullableSimpleCommit) GetCommitter()(NullableSimpleCommit_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableSimpleCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleCommit_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(NullableSimpleCommit_authorable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleCommit_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(NullableSimpleCommit_committerable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + res["timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestamp(val) + } + return nil + } + res["tree_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreeId(val) + } + return nil + } + return res +} +// GetId gets the id property value. SHA for the commit +// returns a *string when successful +func (m *NullableSimpleCommit) GetId()(*string) { + return m.id +} +// GetMessage gets the message property value. Message describing the purpose of the commit +// returns a *string when successful +func (m *NullableSimpleCommit) GetMessage()(*string) { + return m.message +} +// GetTimestamp gets the timestamp property value. Timestamp of the commit +// returns a *Time when successful +func (m *NullableSimpleCommit) GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.timestamp +} +// GetTreeId gets the tree_id property value. SHA for the commit's tree +// returns a *string when successful +func (m *NullableSimpleCommit) GetTreeId()(*string) { + return m.tree_id +} +// Serialize serializes information the current object +func (m *NullableSimpleCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("timestamp", m.GetTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tree_id", m.GetTreeId()) + 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 *NullableSimpleCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. Information about the Git author +func (m *NullableSimpleCommit) SetAuthor(value NullableSimpleCommit_authorable)() { + m.author = value +} +// SetCommitter sets the committer property value. Information about the Git committer +func (m *NullableSimpleCommit) SetCommitter(value NullableSimpleCommit_committerable)() { + m.committer = value +} +// SetId sets the id property value. SHA for the commit +func (m *NullableSimpleCommit) SetId(value *string)() { + m.id = value +} +// SetMessage sets the message property value. Message describing the purpose of the commit +func (m *NullableSimpleCommit) SetMessage(value *string)() { + m.message = value +} +// SetTimestamp sets the timestamp property value. Timestamp of the commit +func (m *NullableSimpleCommit) SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.timestamp = value +} +// SetTreeId sets the tree_id property value. SHA for the commit's tree +func (m *NullableSimpleCommit) SetTreeId(value *string)() { + m.tree_id = value +} +type NullableSimpleCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(NullableSimpleCommit_authorable) + GetCommitter()(NullableSimpleCommit_committerable) + GetId()(*string) + GetMessage()(*string) + GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTreeId()(*string) + SetAuthor(value NullableSimpleCommit_authorable)() + SetCommitter(value NullableSimpleCommit_committerable)() + SetId(value *string)() + SetMessage(value *string)() + SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTreeId(value *string)() +} diff --git a/pkg/github/models/nullable_simple_commit_author.go b/pkg/github/models/nullable_simple_commit_author.go new file mode 100644 index 0000000..2fc6105 --- /dev/null +++ b/pkg/github/models/nullable_simple_commit_author.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableSimpleCommit_author information about the Git author +type NullableSimpleCommit_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Git email address of the commit's author + email *string + // Name of the commit's author + name *string +} +// NewNullableSimpleCommit_author instantiates a new NullableSimpleCommit_author and sets the default values. +func NewNullableSimpleCommit_author()(*NullableSimpleCommit_author) { + m := &NullableSimpleCommit_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableSimpleCommit_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableSimpleCommit_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableSimpleCommit_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableSimpleCommit_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. Git email address of the commit's author +// returns a *string when successful +func (m *NullableSimpleCommit_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableSimpleCommit_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the commit's author +// returns a *string when successful +func (m *NullableSimpleCommit_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *NullableSimpleCommit_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *NullableSimpleCommit_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. Git email address of the commit's author +func (m *NullableSimpleCommit_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the commit's author +func (m *NullableSimpleCommit_author) SetName(value *string)() { + m.name = value +} +type NullableSimpleCommit_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/nullable_simple_commit_committer.go b/pkg/github/models/nullable_simple_commit_committer.go new file mode 100644 index 0000000..45c96b8 --- /dev/null +++ b/pkg/github/models/nullable_simple_commit_committer.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableSimpleCommit_committer information about the Git committer +type NullableSimpleCommit_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Git email address of the commit's committer + email *string + // Name of the commit's committer + name *string +} +// NewNullableSimpleCommit_committer instantiates a new NullableSimpleCommit_committer and sets the default values. +func NewNullableSimpleCommit_committer()(*NullableSimpleCommit_committer) { + m := &NullableSimpleCommit_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableSimpleCommit_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableSimpleCommit_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableSimpleCommit_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableSimpleCommit_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. Git email address of the commit's committer +// returns a *string when successful +func (m *NullableSimpleCommit_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableSimpleCommit_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the commit's committer +// returns a *string when successful +func (m *NullableSimpleCommit_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *NullableSimpleCommit_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *NullableSimpleCommit_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. Git email address of the commit's committer +func (m *NullableSimpleCommit_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the commit's committer +func (m *NullableSimpleCommit_committer) SetName(value *string)() { + m.name = value +} +type NullableSimpleCommit_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/nullable_simple_user.go b/pkg/github/models/nullable_simple_user.go new file mode 100644 index 0000000..2ccb4d3 --- /dev/null +++ b/pkg/github/models/nullable_simple_user.go @@ -0,0 +1,661 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableSimpleUser a GitHub user. +type NullableSimpleUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The email property + email *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_at property + starred_at *string + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewNullableSimpleUser instantiates a new NullableSimpleUser and sets the default values. +func NewNullableSimpleUser()(*NullableSimpleUser) { + m := &NullableSimpleUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableSimpleUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableSimpleUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableSimpleUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableSimpleUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *NullableSimpleUser) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableSimpleUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredAt(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *NullableSimpleUser) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *NullableSimpleUser) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *NullableSimpleUser) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *NullableSimpleUser) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableSimpleUser) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *NullableSimpleUser) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredAt gets the starred_at property value. The starred_at property +// returns a *string when successful +func (m *NullableSimpleUser) GetStarredAt()(*string) { + return m.starred_at +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *NullableSimpleUser) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *NullableSimpleUser) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableSimpleUser) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableSimpleUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_at", m.GetStarredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *NullableSimpleUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *NullableSimpleUser) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEmail sets the email property value. The email property +func (m *NullableSimpleUser) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *NullableSimpleUser) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *NullableSimpleUser) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *NullableSimpleUser) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *NullableSimpleUser) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *NullableSimpleUser) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableSimpleUser) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *NullableSimpleUser) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *NullableSimpleUser) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *NullableSimpleUser) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableSimpleUser) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *NullableSimpleUser) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *NullableSimpleUser) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *NullableSimpleUser) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *NullableSimpleUser) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredAt sets the starred_at property value. The starred_at property +func (m *NullableSimpleUser) SetStarredAt(value *string)() { + m.starred_at = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *NullableSimpleUser) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *NullableSimpleUser) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *NullableSimpleUser) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *NullableSimpleUser) SetUrl(value *string)() { + m.url = value +} +type NullableSimpleUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredAt()(*string) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredAt(value *string)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/nullable_team_simple.go b/pkg/github/models/nullable_team_simple.go new file mode 100644 index 0000000..7a4e86f --- /dev/null +++ b/pkg/github/models/nullable_team_simple.go @@ -0,0 +1,429 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableTeamSimple groups of organization members that gives permissions on specified repositories. +type NullableTeamSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Description of the team + description *string + // The html_url property + html_url *string + // Unique identifier of the team + id *int32 + // Distinguished Name (DN) that team maps to within LDAP environment + ldap_dn *string + // The members_url property + members_url *string + // Name of the team + name *string + // The node_id property + node_id *string + // The notification setting the team has set + notification_setting *string + // Permission that the team will have for its repositories + permission *string + // The level of privacy this team should have + privacy *string + // The repositories_url property + repositories_url *string + // The slug property + slug *string + // URL for the team + url *string +} +// NewNullableTeamSimple instantiates a new NullableTeamSimple and sets the default values. +func NewNullableTeamSimple()(*NullableTeamSimple) { + m := &NullableTeamSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableTeamSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableTeamSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableTeamSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NullableTeamSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. Description of the team +// returns a *string when successful +func (m *NullableTeamSimple) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableTeamSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["ldap_dn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLdapDn(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationSetting(val) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *NullableTeamSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the team +// returns a *int32 when successful +func (m *NullableTeamSimple) GetId()(*int32) { + return m.id +} +// GetLdapDn gets the ldap_dn property value. Distinguished Name (DN) that team maps to within LDAP environment +// returns a *string when successful +func (m *NullableTeamSimple) GetLdapDn()(*string) { + return m.ldap_dn +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *NullableTeamSimple) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. Name of the team +// returns a *string when successful +func (m *NullableTeamSimple) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableTeamSimple) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationSetting gets the notification_setting property value. The notification setting the team has set +// returns a *string when successful +func (m *NullableTeamSimple) GetNotificationSetting()(*string) { + return m.notification_setting +} +// GetPermission gets the permission property value. Permission that the team will have for its repositories +// returns a *string when successful +func (m *NullableTeamSimple) GetPermission()(*string) { + return m.permission +} +// GetPrivacy gets the privacy property value. The level of privacy this team should have +// returns a *string when successful +func (m *NullableTeamSimple) GetPrivacy()(*string) { + return m.privacy +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *NullableTeamSimple) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *NullableTeamSimple) GetSlug()(*string) { + return m.slug +} +// GetUrl gets the url property value. URL for the team +// returns a *string when successful +func (m *NullableTeamSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableTeamSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ldap_dn", m.GetLdapDn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_setting", m.GetNotificationSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacy", m.GetPrivacy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *NullableTeamSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. Description of the team +func (m *NullableTeamSimple) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *NullableTeamSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the team +func (m *NullableTeamSimple) SetId(value *int32)() { + m.id = value +} +// SetLdapDn sets the ldap_dn property value. Distinguished Name (DN) that team maps to within LDAP environment +func (m *NullableTeamSimple) SetLdapDn(value *string)() { + m.ldap_dn = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *NullableTeamSimple) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. Name of the team +func (m *NullableTeamSimple) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableTeamSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationSetting sets the notification_setting property value. The notification setting the team has set +func (m *NullableTeamSimple) SetNotificationSetting(value *string)() { + m.notification_setting = value +} +// SetPermission sets the permission property value. Permission that the team will have for its repositories +func (m *NullableTeamSimple) SetPermission(value *string)() { + m.permission = value +} +// SetPrivacy sets the privacy property value. The level of privacy this team should have +func (m *NullableTeamSimple) SetPrivacy(value *string)() { + m.privacy = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *NullableTeamSimple) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetSlug sets the slug property value. The slug property +func (m *NullableTeamSimple) SetSlug(value *string)() { + m.slug = value +} +// SetUrl sets the url property value. URL for the team +func (m *NullableTeamSimple) SetUrl(value *string)() { + m.url = value +} +type NullableTeamSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLdapDn()(*string) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationSetting()(*string) + GetPermission()(*string) + GetPrivacy()(*string) + GetRepositoriesUrl()(*string) + GetSlug()(*string) + GetUrl()(*string) + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLdapDn(value *string)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationSetting(value *string)() + SetPermission(value *string)() + SetPrivacy(value *string)() + SetRepositoriesUrl(value *string)() + SetSlug(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/oidc_custom_sub.go b/pkg/github/models/oidc_custom_sub.go new file mode 100644 index 0000000..961b845 --- /dev/null +++ b/pkg/github/models/oidc_custom_sub.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OidcCustomSub actions OIDC Subject customization +type OidcCustomSub struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. + include_claim_keys []string +} +// NewOidcCustomSub instantiates a new OidcCustomSub and sets the default values. +func NewOidcCustomSub()(*OidcCustomSub) { + m := &OidcCustomSub{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOidcCustomSubFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOidcCustomSubFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOidcCustomSub(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OidcCustomSub) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OidcCustomSub) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["include_claim_keys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetIncludeClaimKeys(res) + } + return nil + } + return res +} +// GetIncludeClaimKeys gets the include_claim_keys property value. Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +// returns a []string when successful +func (m *OidcCustomSub) GetIncludeClaimKeys()([]string) { + return m.include_claim_keys +} +// Serialize serializes information the current object +func (m *OidcCustomSub) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIncludeClaimKeys() != nil { + err := writer.WriteCollectionOfStringValues("include_claim_keys", m.GetIncludeClaimKeys()) + 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 *OidcCustomSub) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncludeClaimKeys sets the include_claim_keys property value. Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +func (m *OidcCustomSub) SetIncludeClaimKeys(value []string)() { + m.include_claim_keys = value +} +type OidcCustomSubable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeClaimKeys()([]string) + SetIncludeClaimKeys(value []string)() +} diff --git a/pkg/github/models/oidc_custom_sub_repo.go b/pkg/github/models/oidc_custom_sub_repo.go new file mode 100644 index 0000000..69a46fe --- /dev/null +++ b/pkg/github/models/oidc_custom_sub_repo.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OidcCustomSubRepo actions OIDC subject customization for a repository +type OidcCustomSubRepo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. + include_claim_keys []string + // Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. + use_default *bool +} +// NewOidcCustomSubRepo instantiates a new OidcCustomSubRepo and sets the default values. +func NewOidcCustomSubRepo()(*OidcCustomSubRepo) { + m := &OidcCustomSubRepo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOidcCustomSubRepoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOidcCustomSubRepoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOidcCustomSubRepo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OidcCustomSubRepo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OidcCustomSubRepo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["include_claim_keys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetIncludeClaimKeys(res) + } + return nil + } + res["use_default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseDefault(val) + } + return nil + } + return res +} +// GetIncludeClaimKeys gets the include_claim_keys property value. Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +// returns a []string when successful +func (m *OidcCustomSubRepo) GetIncludeClaimKeys()([]string) { + return m.include_claim_keys +} +// GetUseDefault gets the use_default property value. Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. +// returns a *bool when successful +func (m *OidcCustomSubRepo) GetUseDefault()(*bool) { + return m.use_default +} +// Serialize serializes information the current object +func (m *OidcCustomSubRepo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIncludeClaimKeys() != nil { + err := writer.WriteCollectionOfStringValues("include_claim_keys", m.GetIncludeClaimKeys()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_default", m.GetUseDefault()) + 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 *OidcCustomSubRepo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncludeClaimKeys sets the include_claim_keys property value. Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +func (m *OidcCustomSubRepo) SetIncludeClaimKeys(value []string)() { + m.include_claim_keys = value +} +// SetUseDefault sets the use_default property value. Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. +func (m *OidcCustomSubRepo) SetUseDefault(value *bool)() { + m.use_default = value +} +type OidcCustomSubRepoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeClaimKeys()([]string) + GetUseDefault()(*bool) + SetIncludeClaimKeys(value []string)() + SetUseDefault(value *bool)() +} diff --git a/pkg/github/models/org_custom_property.go b/pkg/github/models/org_custom_property.go new file mode 100644 index 0000000..24d49e4 --- /dev/null +++ b/pkg/github/models/org_custom_property.go @@ -0,0 +1,334 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgCustomProperty custom property defined on an organization +type OrgCustomProperty struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An ordered list of the allowed values of the property.The property can have up to 200 allowed values. + allowed_values []string + // Default value of the property + default_value OrgCustomProperty_OrgCustomProperty_default_valueable + // Short description of the property + description *string + // The name of the property + property_name *string + // Whether the property is required. + required *bool + // The type of the value for the property + value_type *OrgCustomProperty_value_type + // Who can edit the values of the property + values_editable_by *OrgCustomProperty_values_editable_by +} +// OrgCustomProperty_OrgCustomProperty_default_value composed type wrapper for classes string +type OrgCustomProperty_OrgCustomProperty_default_value struct { + // Composed type representation for type string + string *string +} +// NewOrgCustomProperty_OrgCustomProperty_default_value instantiates a new OrgCustomProperty_OrgCustomProperty_default_value and sets the default values. +func NewOrgCustomProperty_OrgCustomProperty_default_value()(*OrgCustomProperty_OrgCustomProperty_default_value) { + m := &OrgCustomProperty_OrgCustomProperty_default_value{ + } + return m +} +// CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewOrgCustomProperty_OrgCustomProperty_default_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgCustomProperty_OrgCustomProperty_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *OrgCustomProperty_OrgCustomProperty_default_value) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *OrgCustomProperty_OrgCustomProperty_default_value) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *OrgCustomProperty_OrgCustomProperty_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetString sets the string property value. Composed type representation for type string +func (m *OrgCustomProperty_OrgCustomProperty_default_value) SetString(value *string)() { + m.string = value +} +type OrgCustomProperty_OrgCustomProperty_default_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetString()(*string) + SetString(value *string)() +} +// NewOrgCustomProperty instantiates a new OrgCustomProperty and sets the default values. +func NewOrgCustomProperty()(*OrgCustomProperty) { + m := &OrgCustomProperty{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgCustomPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgCustomPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgCustomProperty(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgCustomProperty) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedValues gets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +// returns a []string when successful +func (m *OrgCustomProperty) GetAllowedValues()([]string) { + return m.allowed_values +} +// GetDefaultValue gets the default_value property value. Default value of the property +// returns a OrgCustomProperty_OrgCustomProperty_default_valueable when successful +func (m *OrgCustomProperty) GetDefaultValue()(OrgCustomProperty_OrgCustomProperty_default_valueable) { + return m.default_value +} +// GetDescription gets the description property value. Short description of the property +// returns a *string when successful +func (m *OrgCustomProperty) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgCustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAllowedValues(res) + } + return nil + } + res["default_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(OrgCustomProperty_OrgCustomProperty_default_valueable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["property_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPropertyName(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["value_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrgCustomProperty_value_type) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*OrgCustomProperty_value_type)) + } + return nil + } + res["values_editable_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrgCustomProperty_values_editable_by) + if err != nil { + return err + } + if val != nil { + m.SetValuesEditableBy(val.(*OrgCustomProperty_values_editable_by)) + } + return nil + } + return res +} +// GetPropertyName gets the property_name property value. The name of the property +// returns a *string when successful +func (m *OrgCustomProperty) GetPropertyName()(*string) { + return m.property_name +} +// GetRequired gets the required property value. Whether the property is required. +// returns a *bool when successful +func (m *OrgCustomProperty) GetRequired()(*bool) { + return m.required +} +// GetValuesEditableBy gets the values_editable_by property value. Who can edit the values of the property +// returns a *OrgCustomProperty_values_editable_by when successful +func (m *OrgCustomProperty) GetValuesEditableBy()(*OrgCustomProperty_values_editable_by) { + return m.values_editable_by +} +// GetValueType gets the value_type property value. The type of the value for the property +// returns a *OrgCustomProperty_value_type when successful +func (m *OrgCustomProperty) GetValueType()(*OrgCustomProperty_value_type) { + return m.value_type +} +// Serialize serializes information the current object +func (m *OrgCustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedValues() != nil { + err := writer.WriteCollectionOfStringValues("allowed_values", m.GetAllowedValues()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("default_value", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property_name", m.GetPropertyName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + if m.GetValuesEditableBy() != nil { + cast := (*m.GetValuesEditableBy()).String() + err := writer.WriteStringValue("values_editable_by", &cast) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err := writer.WriteStringValue("value_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrgCustomProperty) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedValues sets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +func (m *OrgCustomProperty) SetAllowedValues(value []string)() { + m.allowed_values = value +} +// SetDefaultValue sets the default_value property value. Default value of the property +func (m *OrgCustomProperty) SetDefaultValue(value OrgCustomProperty_OrgCustomProperty_default_valueable)() { + m.default_value = value +} +// SetDescription sets the description property value. Short description of the property +func (m *OrgCustomProperty) SetDescription(value *string)() { + m.description = value +} +// SetPropertyName sets the property_name property value. The name of the property +func (m *OrgCustomProperty) SetPropertyName(value *string)() { + m.property_name = value +} +// SetRequired sets the required property value. Whether the property is required. +func (m *OrgCustomProperty) SetRequired(value *bool)() { + m.required = value +} +// SetValuesEditableBy sets the values_editable_by property value. Who can edit the values of the property +func (m *OrgCustomProperty) SetValuesEditableBy(value *OrgCustomProperty_values_editable_by)() { + m.values_editable_by = value +} +// SetValueType sets the value_type property value. The type of the value for the property +func (m *OrgCustomProperty) SetValueType(value *OrgCustomProperty_value_type)() { + m.value_type = value +} +type OrgCustomPropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedValues()([]string) + GetDefaultValue()(OrgCustomProperty_OrgCustomProperty_default_valueable) + GetDescription()(*string) + GetPropertyName()(*string) + GetRequired()(*bool) + GetValuesEditableBy()(*OrgCustomProperty_values_editable_by) + GetValueType()(*OrgCustomProperty_value_type) + SetAllowedValues(value []string)() + SetDefaultValue(value OrgCustomProperty_OrgCustomProperty_default_valueable)() + SetDescription(value *string)() + SetPropertyName(value *string)() + SetRequired(value *bool)() + SetValuesEditableBy(value *OrgCustomProperty_values_editable_by)() + SetValueType(value *OrgCustomProperty_value_type)() +} diff --git a/pkg/github/models/org_custom_property_value_type.go b/pkg/github/models/org_custom_property_value_type.go new file mode 100644 index 0000000..7ad5c0c --- /dev/null +++ b/pkg/github/models/org_custom_property_value_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The type of the value for the property +type OrgCustomProperty_value_type int + +const ( + STRING_ORGCUSTOMPROPERTY_VALUE_TYPE OrgCustomProperty_value_type = iota + SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + MULTI_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + TRUE_FALSE_ORGCUSTOMPROPERTY_VALUE_TYPE +) + +func (i OrgCustomProperty_value_type) String() string { + return []string{"string", "single_select", "multi_select", "true_false"}[i] +} +func ParseOrgCustomProperty_value_type(v string) (any, error) { + result := STRING_ORGCUSTOMPROPERTY_VALUE_TYPE + switch v { + case "string": + result = STRING_ORGCUSTOMPROPERTY_VALUE_TYPE + case "single_select": + result = SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + case "multi_select": + result = MULTI_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + case "true_false": + result = TRUE_FALSE_ORGCUSTOMPROPERTY_VALUE_TYPE + default: + return 0, errors.New("Unknown OrgCustomProperty_value_type value: " + v) + } + return &result, nil +} +func SerializeOrgCustomProperty_value_type(values []OrgCustomProperty_value_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrgCustomProperty_value_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/org_custom_property_values_editable_by.go b/pkg/github/models/org_custom_property_values_editable_by.go new file mode 100644 index 0000000..a21cfec --- /dev/null +++ b/pkg/github/models/org_custom_property_values_editable_by.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Who can edit the values of the property +type OrgCustomProperty_values_editable_by int + +const ( + ORG_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY OrgCustomProperty_values_editable_by = iota + ORG_AND_REPO_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY +) + +func (i OrgCustomProperty_values_editable_by) String() string { + return []string{"org_actors", "org_and_repo_actors"}[i] +} +func ParseOrgCustomProperty_values_editable_by(v string) (any, error) { + result := ORG_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY + switch v { + case "org_actors": + result = ORG_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY + case "org_and_repo_actors": + result = ORG_AND_REPO_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY + default: + return 0, errors.New("Unknown OrgCustomProperty_values_editable_by value: " + v) + } + return &result, nil +} +func SerializeOrgCustomProperty_values_editable_by(values []OrgCustomProperty_values_editable_by) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrgCustomProperty_values_editable_by) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/org_hook.go b/pkg/github/models/org_hook.go new file mode 100644 index 0000000..3170ad5 --- /dev/null +++ b/pkg/github/models/org_hook.go @@ -0,0 +1,378 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgHook org Hook +type OrgHook struct { + // The active property + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The config property + config OrgHook_configable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deliveries_url property + deliveries_url *string + // The events property + events []string + // The id property + id *int32 + // The name property + name *string + // The ping_url property + ping_url *string + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewOrgHook instantiates a new OrgHook and sets the default values. +func NewOrgHook()(*OrgHook) { + m := &OrgHook{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgHookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgHookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgHook(), nil +} +// GetActive gets the active property value. The active property +// returns a *bool when successful +func (m *OrgHook) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgHook) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfig gets the config property value. The config property +// returns a OrgHook_configable when successful +func (m *OrgHook) GetConfig()(OrgHook_configable) { + return m.config +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *OrgHook) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeliveriesUrl gets the deliveries_url property value. The deliveries_url property +// returns a *string when successful +func (m *OrgHook) GetDeliveriesUrl()(*string) { + return m.deliveries_url +} +// GetEvents gets the events property value. The events property +// returns a []string when successful +func (m *OrgHook) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgHook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrgHook_configFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfig(val.(OrgHook_configable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deliveries_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveriesUrl(val) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["ping_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPingUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *OrgHook) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *OrgHook) GetName()(*string) { + return m.name +} +// GetPingUrl gets the ping_url property value. The ping_url property +// returns a *string when successful +func (m *OrgHook) GetPingUrl()(*string) { + return m.ping_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *OrgHook) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *OrgHook) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *OrgHook) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *OrgHook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("config", m.GetConfig()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deliveries_url", m.GetDeliveriesUrl()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ping_url", m.GetPingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The active property +func (m *OrgHook) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrgHook) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfig sets the config property value. The config property +func (m *OrgHook) SetConfig(value OrgHook_configable)() { + m.config = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *OrgHook) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeliveriesUrl sets the deliveries_url property value. The deliveries_url property +func (m *OrgHook) SetDeliveriesUrl(value *string)() { + m.deliveries_url = value +} +// SetEvents sets the events property value. The events property +func (m *OrgHook) SetEvents(value []string)() { + m.events = value +} +// SetId sets the id property value. The id property +func (m *OrgHook) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *OrgHook) SetName(value *string)() { + m.name = value +} +// SetPingUrl sets the ping_url property value. The ping_url property +func (m *OrgHook) SetPingUrl(value *string)() { + m.ping_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OrgHook) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *OrgHook) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *OrgHook) SetUrl(value *string)() { + m.url = value +} +type OrgHookable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetConfig()(OrgHook_configable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeliveriesUrl()(*string) + GetEvents()([]string) + GetId()(*int32) + GetName()(*string) + GetPingUrl()(*string) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetActive(value *bool)() + SetConfig(value OrgHook_configable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeliveriesUrl(value *string)() + SetEvents(value []string)() + SetId(value *int32)() + SetName(value *string)() + SetPingUrl(value *string)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/org_hook_config.go b/pkg/github/models/org_hook_config.go new file mode 100644 index 0000000..25c1768 --- /dev/null +++ b/pkg/github/models/org_hook_config.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrgHook_config struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The content_type property + content_type *string + // The insecure_ssl property + insecure_ssl *string + // The secret property + secret *string + // The url property + url *string +} +// NewOrgHook_config instantiates a new OrgHook_config and sets the default values. +func NewOrgHook_config()(*OrgHook_config) { + m := &OrgHook_config{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgHook_configFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgHook_configFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgHook_config(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgHook_config) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The content_type property +// returns a *string when successful +func (m *OrgHook_config) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgHook_config) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a *string when successful +func (m *OrgHook_config) GetInsecureSsl()(*string) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. The secret property +// returns a *string when successful +func (m *OrgHook_config) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *OrgHook_config) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *OrgHook_config) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrgHook_config) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The content_type property +func (m *OrgHook_config) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *OrgHook_config) SetInsecureSsl(value *string)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. The secret property +func (m *OrgHook_config) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The url property +func (m *OrgHook_config) SetUrl(value *string)() { + m.url = value +} +type OrgHook_configable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(*string) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value *string)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/org_membership.go b/pkg/github/models/org_membership.go new file mode 100644 index 0000000..e968e92 --- /dev/null +++ b/pkg/github/models/org_membership.go @@ -0,0 +1,257 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgMembership org Membership +type OrgMembership struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub organization. + organization OrganizationSimpleable + // The organization_url property + organization_url *string + // The permissions property + permissions OrgMembership_permissionsable + // The user's membership type in the organization. + role *OrgMembership_role + // The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + state *OrgMembership_state + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewOrgMembership instantiates a new OrgMembership and sets the default values. +func NewOrgMembership()(*OrgMembership) { + m := &OrgMembership{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgMembershipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgMembershipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgMembership(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgMembership) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgMembership) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(OrganizationSimpleable)) + } + return nil + } + res["organization_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationUrl(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrgMembership_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(OrgMembership_permissionsable)) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrgMembership_role) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*OrgMembership_role)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrgMembership_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*OrgMembership_state)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetOrganization gets the organization property value. A GitHub organization. +// returns a OrganizationSimpleable when successful +func (m *OrgMembership) GetOrganization()(OrganizationSimpleable) { + return m.organization +} +// GetOrganizationUrl gets the organization_url property value. The organization_url property +// returns a *string when successful +func (m *OrgMembership) GetOrganizationUrl()(*string) { + return m.organization_url +} +// GetPermissions gets the permissions property value. The permissions property +// returns a OrgMembership_permissionsable when successful +func (m *OrgMembership) GetPermissions()(OrgMembership_permissionsable) { + return m.permissions +} +// GetRole gets the role property value. The user's membership type in the organization. +// returns a *OrgMembership_role when successful +func (m *OrgMembership) GetRole()(*OrgMembership_role) { + return m.role +} +// GetState gets the state property value. The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. +// returns a *OrgMembership_state when successful +func (m *OrgMembership) GetState()(*OrgMembership_state) { + return m.state +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *OrgMembership) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *OrgMembership) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *OrgMembership) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_url", m.GetOrganizationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err := writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *OrgMembership) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOrganization sets the organization property value. A GitHub organization. +func (m *OrgMembership) SetOrganization(value OrganizationSimpleable)() { + m.organization = value +} +// SetOrganizationUrl sets the organization_url property value. The organization_url property +func (m *OrgMembership) SetOrganizationUrl(value *string)() { + m.organization_url = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *OrgMembership) SetPermissions(value OrgMembership_permissionsable)() { + m.permissions = value +} +// SetRole sets the role property value. The user's membership type in the organization. +func (m *OrgMembership) SetRole(value *OrgMembership_role)() { + m.role = value +} +// SetState sets the state property value. The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. +func (m *OrgMembership) SetState(value *OrgMembership_state)() { + m.state = value +} +// SetUrl sets the url property value. The url property +func (m *OrgMembership) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *OrgMembership) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type OrgMembershipable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganization()(OrganizationSimpleable) + GetOrganizationUrl()(*string) + GetPermissions()(OrgMembership_permissionsable) + GetRole()(*OrgMembership_role) + GetState()(*OrgMembership_state) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetOrganization(value OrganizationSimpleable)() + SetOrganizationUrl(value *string)() + SetPermissions(value OrgMembership_permissionsable)() + SetRole(value *OrgMembership_role)() + SetState(value *OrgMembership_state)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/org_membership_permissions.go b/pkg/github/models/org_membership_permissions.go new file mode 100644 index 0000000..06dd0bd --- /dev/null +++ b/pkg/github/models/org_membership_permissions.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrgMembership_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The can_create_repository property + can_create_repository *bool +} +// NewOrgMembership_permissions instantiates a new OrgMembership_permissions and sets the default values. +func NewOrgMembership_permissions()(*OrgMembership_permissions) { + m := &OrgMembership_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgMembership_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgMembership_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgMembership_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgMembership_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanCreateRepository gets the can_create_repository property value. The can_create_repository property +// returns a *bool when successful +func (m *OrgMembership_permissions) GetCanCreateRepository()(*bool) { + return m.can_create_repository +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgMembership_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["can_create_repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanCreateRepository(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OrgMembership_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("can_create_repository", m.GetCanCreateRepository()) + 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 *OrgMembership_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanCreateRepository sets the can_create_repository property value. The can_create_repository property +func (m *OrgMembership_permissions) SetCanCreateRepository(value *bool)() { + m.can_create_repository = value +} +type OrgMembership_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanCreateRepository()(*bool) + SetCanCreateRepository(value *bool)() +} diff --git a/pkg/github/models/org_membership_role.go b/pkg/github/models/org_membership_role.go new file mode 100644 index 0000000..2626a41 --- /dev/null +++ b/pkg/github/models/org_membership_role.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The user's membership type in the organization. +type OrgMembership_role int + +const ( + ADMIN_ORGMEMBERSHIP_ROLE OrgMembership_role = iota + MEMBER_ORGMEMBERSHIP_ROLE + BILLING_MANAGER_ORGMEMBERSHIP_ROLE +) + +func (i OrgMembership_role) String() string { + return []string{"admin", "member", "billing_manager"}[i] +} +func ParseOrgMembership_role(v string) (any, error) { + result := ADMIN_ORGMEMBERSHIP_ROLE + switch v { + case "admin": + result = ADMIN_ORGMEMBERSHIP_ROLE + case "member": + result = MEMBER_ORGMEMBERSHIP_ROLE + case "billing_manager": + result = BILLING_MANAGER_ORGMEMBERSHIP_ROLE + default: + return 0, errors.New("Unknown OrgMembership_role value: " + v) + } + return &result, nil +} +func SerializeOrgMembership_role(values []OrgMembership_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrgMembership_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/org_membership_state.go b/pkg/github/models/org_membership_state.go new file mode 100644 index 0000000..d0f4d50 --- /dev/null +++ b/pkg/github/models/org_membership_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. +type OrgMembership_state int + +const ( + ACTIVE_ORGMEMBERSHIP_STATE OrgMembership_state = iota + PENDING_ORGMEMBERSHIP_STATE +) + +func (i OrgMembership_state) String() string { + return []string{"active", "pending"}[i] +} +func ParseOrgMembership_state(v string) (any, error) { + result := ACTIVE_ORGMEMBERSHIP_STATE + switch v { + case "active": + result = ACTIVE_ORGMEMBERSHIP_STATE + case "pending": + result = PENDING_ORGMEMBERSHIP_STATE + default: + return 0, errors.New("Unknown OrgMembership_state value: " + v) + } + return &result, nil +} +func SerializeOrgMembership_state(values []OrgMembership_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrgMembership_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/org_repo_custom_property_values.go b/pkg/github/models/org_repo_custom_property_values.go new file mode 100644 index 0000000..baef383 --- /dev/null +++ b/pkg/github/models/org_repo_custom_property_values.go @@ -0,0 +1,180 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgRepoCustomPropertyValues list of custom property values for a repository +type OrgRepoCustomPropertyValues struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of custom property names and associated values + properties []CustomPropertyValueable + // The repository_full_name property + repository_full_name *string + // The repository_id property + repository_id *int32 + // The repository_name property + repository_name *string +} +// NewOrgRepoCustomPropertyValues instantiates a new OrgRepoCustomPropertyValues and sets the default values. +func NewOrgRepoCustomPropertyValues()(*OrgRepoCustomPropertyValues) { + m := &OrgRepoCustomPropertyValues{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgRepoCustomPropertyValuesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgRepoCustomPropertyValuesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgRepoCustomPropertyValues(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgRepoCustomPropertyValues) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgRepoCustomPropertyValues) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomPropertyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomPropertyValueable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CustomPropertyValueable) + } + } + m.SetProperties(res) + } + return nil + } + res["repository_full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryFullName(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["repository_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryName(val) + } + return nil + } + return res +} +// GetProperties gets the properties property value. List of custom property names and associated values +// returns a []CustomPropertyValueable when successful +func (m *OrgRepoCustomPropertyValues) GetProperties()([]CustomPropertyValueable) { + return m.properties +} +// GetRepositoryFullName gets the repository_full_name property value. The repository_full_name property +// returns a *string when successful +func (m *OrgRepoCustomPropertyValues) GetRepositoryFullName()(*string) { + return m.repository_full_name +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *OrgRepoCustomPropertyValues) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetRepositoryName gets the repository_name property value. The repository_name property +// returns a *string when successful +func (m *OrgRepoCustomPropertyValues) GetRepositoryName()(*string) { + return m.repository_name +} +// Serialize serializes information the current object +func (m *OrgRepoCustomPropertyValues) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_full_name", m.GetRepositoryFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_name", m.GetRepositoryName()) + 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 *OrgRepoCustomPropertyValues) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetProperties sets the properties property value. List of custom property names and associated values +func (m *OrgRepoCustomPropertyValues) SetProperties(value []CustomPropertyValueable)() { + m.properties = value +} +// SetRepositoryFullName sets the repository_full_name property value. The repository_full_name property +func (m *OrgRepoCustomPropertyValues) SetRepositoryFullName(value *string)() { + m.repository_full_name = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *OrgRepoCustomPropertyValues) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetRepositoryName sets the repository_name property value. The repository_name property +func (m *OrgRepoCustomPropertyValues) SetRepositoryName(value *string)() { + m.repository_name = value +} +type OrgRepoCustomPropertyValuesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProperties()([]CustomPropertyValueable) + GetRepositoryFullName()(*string) + GetRepositoryId()(*int32) + GetRepositoryName()(*string) + SetProperties(value []CustomPropertyValueable)() + SetRepositoryFullName(value *string)() + SetRepositoryId(value *int32)() + SetRepositoryName(value *string)() +} diff --git a/pkg/github/models/org_ruleset_conditions.go b/pkg/github/models/org_ruleset_conditions.go new file mode 100644 index 0000000..c51912a --- /dev/null +++ b/pkg/github/models/org_ruleset_conditions.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgRulesetConditions conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. +type OrgRulesetConditions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrgRulesetConditions instantiates a new OrgRulesetConditions and sets the default values. +func NewOrgRulesetConditions()(*OrgRulesetConditions) { + m := &OrgRulesetConditions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrgRulesetConditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrgRulesetConditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgRulesetConditions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrgRulesetConditions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrgRulesetConditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrgRulesetConditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrgRulesetConditions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrgRulesetConditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization.go b/pkg/github/models/organization.go new file mode 100644 index 0000000..9f2d690 --- /dev/null +++ b/pkg/github/models/organization.go @@ -0,0 +1,894 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Organization gitHub account for managing multiple users, teams, and repositories +type Organization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // Display blog url for the organization + blog *string + // Display company name for the organization + company *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // Display email for the organization + email *string + // The events_url property + events_url *string + // The followers property + followers *int32 + // The following property + following *int32 + // Specifies if organization projects are enabled for this org + has_organization_projects *bool + // Specifies if repository projects are enabled for repositories that belong to this org + has_repository_projects *bool + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The is_verified property + is_verified *bool + // The issues_url property + issues_url *string + // Display location for the organization + location *string + // Unique login name of the organization + login *string + // The members_url property + members_url *string + // Display name for the organization + name *string + // The node_id property + node_id *string + // The plan property + plan Organization_planable + // The public_gists property + public_gists *int32 + // The public_members_url property + public_members_url *string + // The public_repos property + public_repos *int32 + // The repos_url property + repos_url *string + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the organization + url *string +} +// NewOrganization instantiates a new Organization and sets the default values. +func NewOrganization()(*Organization) { + m := &Organization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Organization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *Organization) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetBlog gets the blog property value. Display blog url for the organization +// returns a *string when successful +func (m *Organization) GetBlog()(*string) { + return m.blog +} +// GetCompany gets the company property value. Display company name for the organization +// returns a *string when successful +func (m *Organization) GetCompany()(*string) { + return m.company +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Organization) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Organization) GetDescription()(*string) { + return m.description +} +// GetEmail gets the email property value. Display email for the organization +// returns a *string when successful +func (m *Organization) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *Organization) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowing(val) + } + return nil + } + res["has_organization_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasOrganizationProjects(val) + } + return nil + } + res["has_repository_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasRepositoryProjects(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVerified(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganization_planFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(Organization_planable)) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicMembersUrl(val) + } + return nil + } + res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepos(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowers gets the followers property value. The followers property +// returns a *int32 when successful +func (m *Organization) GetFollowers()(*int32) { + return m.followers +} +// GetFollowing gets the following property value. The following property +// returns a *int32 when successful +func (m *Organization) GetFollowing()(*int32) { + return m.following +} +// GetHasOrganizationProjects gets the has_organization_projects property value. Specifies if organization projects are enabled for this org +// returns a *bool when successful +func (m *Organization) GetHasOrganizationProjects()(*bool) { + return m.has_organization_projects +} +// GetHasRepositoryProjects gets the has_repository_projects property value. Specifies if repository projects are enabled for repositories that belong to this org +// returns a *bool when successful +func (m *Organization) GetHasRepositoryProjects()(*bool) { + return m.has_repository_projects +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *Organization) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Organization) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Organization) GetId()(*int32) { + return m.id +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *Organization) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsVerified gets the is_verified property value. The is_verified property +// returns a *bool when successful +func (m *Organization) GetIsVerified()(*bool) { + return m.is_verified +} +// GetLocation gets the location property value. Display location for the organization +// returns a *string when successful +func (m *Organization) GetLocation()(*string) { + return m.location +} +// GetLogin gets the login property value. Unique login name of the organization +// returns a *string when successful +func (m *Organization) GetLogin()(*string) { + return m.login +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *Organization) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. Display name for the organization +// returns a *string when successful +func (m *Organization) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Organization) GetNodeId()(*string) { + return m.node_id +} +// GetPlan gets the plan property value. The plan property +// returns a Organization_planable when successful +func (m *Organization) GetPlan()(Organization_planable) { + return m.plan +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *Organization) GetPublicGists()(*int32) { + return m.public_gists +} +// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property +// returns a *string when successful +func (m *Organization) GetPublicMembersUrl()(*string) { + return m.public_members_url +} +// GetPublicRepos gets the public_repos property value. The public_repos property +// returns a *int32 when successful +func (m *Organization) GetPublicRepos()(*int32) { + return m.public_repos +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *Organization) GetReposUrl()(*string) { + return m.repos_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Organization) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Organization) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the organization +// returns a *string when successful +func (m *Organization) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("followers", m.GetFollowers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("following", m.GetFollowing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_organization_projects", m.GetHasOrganizationProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_repository_projects", m.GetHasRepositoryProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_verified", m.GetIsVerified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Organization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *Organization) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetBlog sets the blog property value. Display blog url for the organization +func (m *Organization) SetBlog(value *string)() { + m.blog = value +} +// SetCompany sets the company property value. Display company name for the organization +func (m *Organization) SetCompany(value *string)() { + m.company = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Organization) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *Organization) SetDescription(value *string)() { + m.description = value +} +// SetEmail sets the email property value. Display email for the organization +func (m *Organization) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *Organization) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowers sets the followers property value. The followers property +func (m *Organization) SetFollowers(value *int32)() { + m.followers = value +} +// SetFollowing sets the following property value. The following property +func (m *Organization) SetFollowing(value *int32)() { + m.following = value +} +// SetHasOrganizationProjects sets the has_organization_projects property value. Specifies if organization projects are enabled for this org +func (m *Organization) SetHasOrganizationProjects(value *bool)() { + m.has_organization_projects = value +} +// SetHasRepositoryProjects sets the has_repository_projects property value. Specifies if repository projects are enabled for repositories that belong to this org +func (m *Organization) SetHasRepositoryProjects(value *bool)() { + m.has_repository_projects = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *Organization) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Organization) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Organization) SetId(value *int32)() { + m.id = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *Organization) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsVerified sets the is_verified property value. The is_verified property +func (m *Organization) SetIsVerified(value *bool)() { + m.is_verified = value +} +// SetLocation sets the location property value. Display location for the organization +func (m *Organization) SetLocation(value *string)() { + m.location = value +} +// SetLogin sets the login property value. Unique login name of the organization +func (m *Organization) SetLogin(value *string)() { + m.login = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *Organization) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. Display name for the organization +func (m *Organization) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Organization) SetNodeId(value *string)() { + m.node_id = value +} +// SetPlan sets the plan property value. The plan property +func (m *Organization) SetPlan(value Organization_planable)() { + m.plan = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *Organization) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property +func (m *Organization) SetPublicMembersUrl(value *string)() { + m.public_members_url = value +} +// SetPublicRepos sets the public_repos property value. The public_repos property +func (m *Organization) SetPublicRepos(value *int32)() { + m.public_repos = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *Organization) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Organization) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Organization) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the organization +func (m *Organization) SetUrl(value *string)() { + m.url = value +} +type Organizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetBlog()(*string) + GetCompany()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowers()(*int32) + GetFollowing()(*int32) + GetHasOrganizationProjects()(*bool) + GetHasRepositoryProjects()(*bool) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssuesUrl()(*string) + GetIsVerified()(*bool) + GetLocation()(*string) + GetLogin()(*string) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetPlan()(Organization_planable) + GetPublicGists()(*int32) + GetPublicMembersUrl()(*string) + GetPublicRepos()(*int32) + GetReposUrl()(*string) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetBlog(value *string)() + SetCompany(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowers(value *int32)() + SetFollowing(value *int32)() + SetHasOrganizationProjects(value *bool)() + SetHasRepositoryProjects(value *bool)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssuesUrl(value *string)() + SetIsVerified(value *bool)() + SetLocation(value *string)() + SetLogin(value *string)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetPlan(value Organization_planable)() + SetPublicGists(value *int32)() + SetPublicMembersUrl(value *string)() + SetPublicRepos(value *int32)() + SetReposUrl(value *string)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/organization_actions_secret.go b/pkg/github/models/organization_actions_secret.go new file mode 100644 index 0000000..2d290a1 --- /dev/null +++ b/pkg/github/models/organization_actions_secret.go @@ -0,0 +1,199 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationActionsSecret secrets for GitHub Actions for an organization. +type OrganizationActionsSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret. + name *string + // The selected_repositories_url property + selected_repositories_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Visibility of a secret + visibility *OrganizationActionsSecret_visibility +} +// NewOrganizationActionsSecret instantiates a new OrganizationActionsSecret and sets the default values. +func NewOrganizationActionsSecret()(*OrganizationActionsSecret) { + m := &OrganizationActionsSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationActionsSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationActionsSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationActionsSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationActionsSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *OrganizationActionsSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationActionsSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationActionsSecret_visibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*OrganizationActionsSecret_visibility)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret. +// returns a *string when successful +func (m *OrganizationActionsSecret) GetName()(*string) { + return m.name +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. The selected_repositories_url property +// returns a *string when successful +func (m *OrganizationActionsSecret) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *OrganizationActionsSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetVisibility gets the visibility property value. Visibility of a secret +// returns a *OrganizationActionsSecret_visibility when successful +func (m *OrganizationActionsSecret) GetVisibility()(*OrganizationActionsSecret_visibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *OrganizationActionsSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err := writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationActionsSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *OrganizationActionsSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret. +func (m *OrganizationActionsSecret) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. The selected_repositories_url property +func (m *OrganizationActionsSecret) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *OrganizationActionsSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetVisibility sets the visibility property value. Visibility of a secret +func (m *OrganizationActionsSecret) SetVisibility(value *OrganizationActionsSecret_visibility)() { + m.visibility = value +} +type OrganizationActionsSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSelectedRepositoriesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVisibility()(*OrganizationActionsSecret_visibility) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSelectedRepositoriesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVisibility(value *OrganizationActionsSecret_visibility)() +} diff --git a/pkg/github/models/organization_actions_secret_visibility.go b/pkg/github/models/organization_actions_secret_visibility.go new file mode 100644 index 0000000..f4cc988 --- /dev/null +++ b/pkg/github/models/organization_actions_secret_visibility.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Visibility of a secret +type OrganizationActionsSecret_visibility int + +const ( + ALL_ORGANIZATIONACTIONSSECRET_VISIBILITY OrganizationActionsSecret_visibility = iota + PRIVATE_ORGANIZATIONACTIONSSECRET_VISIBILITY + SELECTED_ORGANIZATIONACTIONSSECRET_VISIBILITY +) + +func (i OrganizationActionsSecret_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseOrganizationActionsSecret_visibility(v string) (any, error) { + result := ALL_ORGANIZATIONACTIONSSECRET_VISIBILITY + switch v { + case "all": + result = ALL_ORGANIZATIONACTIONSSECRET_VISIBILITY + case "private": + result = PRIVATE_ORGANIZATIONACTIONSSECRET_VISIBILITY + case "selected": + result = SELECTED_ORGANIZATIONACTIONSSECRET_VISIBILITY + default: + return 0, errors.New("Unknown OrganizationActionsSecret_visibility value: " + v) + } + return &result, nil +} +func SerializeOrganizationActionsSecret_visibility(values []OrganizationActionsSecret_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationActionsSecret_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_actions_variable.go b/pkg/github/models/organization_actions_variable.go new file mode 100644 index 0000000..e38deef --- /dev/null +++ b/pkg/github/models/organization_actions_variable.go @@ -0,0 +1,228 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationActionsVariable organization variable for GitHub Actions. +type OrganizationActionsVariable struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the variable. + name *string + // The selected_repositories_url property + selected_repositories_url *string + // The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The value of the variable. + value *string + // Visibility of a variable + visibility *OrganizationActionsVariable_visibility +} +// NewOrganizationActionsVariable instantiates a new OrganizationActionsVariable and sets the default values. +func NewOrganizationActionsVariable()(*OrganizationActionsVariable) { + m := &OrganizationActionsVariable{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationActionsVariableFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationActionsVariableFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationActionsVariable(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationActionsVariable) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *OrganizationActionsVariable) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationActionsVariable) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationActionsVariable_visibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*OrganizationActionsVariable_visibility)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *OrganizationActionsVariable) GetName()(*string) { + return m.name +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. The selected_repositories_url property +// returns a *string when successful +func (m *OrganizationActionsVariable) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *OrganizationActionsVariable) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *OrganizationActionsVariable) GetValue()(*string) { + return m.value +} +// GetVisibility gets the visibility property value. Visibility of a variable +// returns a *OrganizationActionsVariable_visibility when successful +func (m *OrganizationActionsVariable) GetVisibility()(*OrganizationActionsVariable_visibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *OrganizationActionsVariable) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err := writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationActionsVariable) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *OrganizationActionsVariable) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the variable. +func (m *OrganizationActionsVariable) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. The selected_repositories_url property +func (m *OrganizationActionsVariable) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *OrganizationActionsVariable) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetValue sets the value property value. The value of the variable. +func (m *OrganizationActionsVariable) SetValue(value *string)() { + m.value = value +} +// SetVisibility sets the visibility property value. Visibility of a variable +func (m *OrganizationActionsVariable) SetVisibility(value *OrganizationActionsVariable_visibility)() { + m.visibility = value +} +type OrganizationActionsVariableable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSelectedRepositoriesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetValue()(*string) + GetVisibility()(*OrganizationActionsVariable_visibility) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSelectedRepositoriesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetValue(value *string)() + SetVisibility(value *OrganizationActionsVariable_visibility)() +} diff --git a/pkg/github/models/organization_actions_variable_visibility.go b/pkg/github/models/organization_actions_variable_visibility.go new file mode 100644 index 0000000..ef61952 --- /dev/null +++ b/pkg/github/models/organization_actions_variable_visibility.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Visibility of a variable +type OrganizationActionsVariable_visibility int + +const ( + ALL_ORGANIZATIONACTIONSVARIABLE_VISIBILITY OrganizationActionsVariable_visibility = iota + PRIVATE_ORGANIZATIONACTIONSVARIABLE_VISIBILITY + SELECTED_ORGANIZATIONACTIONSVARIABLE_VISIBILITY +) + +func (i OrganizationActionsVariable_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseOrganizationActionsVariable_visibility(v string) (any, error) { + result := ALL_ORGANIZATIONACTIONSVARIABLE_VISIBILITY + switch v { + case "all": + result = ALL_ORGANIZATIONACTIONSVARIABLE_VISIBILITY + case "private": + result = PRIVATE_ORGANIZATIONACTIONSVARIABLE_VISIBILITY + case "selected": + result = SELECTED_ORGANIZATIONACTIONSVARIABLE_VISIBILITY + default: + return 0, errors.New("Unknown OrganizationActionsVariable_visibility value: " + v) + } + return &result, nil +} +func SerializeOrganizationActionsVariable_visibility(values []OrganizationActionsVariable_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationActionsVariable_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_custom_repository_role.go b/pkg/github/models/organization_custom_repository_role.go new file mode 100644 index 0000000..eeceacb --- /dev/null +++ b/pkg/github/models/organization_custom_repository_role.go @@ -0,0 +1,292 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationCustomRepositoryRole custom repository roles created by organization owners +type OrganizationCustomRepositoryRole struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The system role from which this role inherits permissions. + base_role *OrganizationCustomRepositoryRole_base_role + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A short description about who this role is for or what permissions it grants. + description *string + // The unique identifier of the custom role. + id *int32 + // The name of the custom role. + name *string + // A GitHub user. + organization SimpleUserable + // A list of additional permissions included in this role. + permissions []string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOrganizationCustomRepositoryRole instantiates a new OrganizationCustomRepositoryRole and sets the default values. +func NewOrganizationCustomRepositoryRole()(*OrganizationCustomRepositoryRole) { + m := &OrganizationCustomRepositoryRole{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationCustomRepositoryRole(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationCustomRepositoryRole) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBaseRole gets the base_role property value. The system role from which this role inherits permissions. +// returns a *OrganizationCustomRepositoryRole_base_role when successful +func (m *OrganizationCustomRepositoryRole) GetBaseRole()(*OrganizationCustomRepositoryRole_base_role) { + return m.base_role +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *OrganizationCustomRepositoryRole) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. A short description about who this role is for or what permissions it grants. +// returns a *string when successful +func (m *OrganizationCustomRepositoryRole) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationCustomRepositoryRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationCustomRepositoryRole_base_role) + if err != nil { + return err + } + if val != nil { + m.SetBaseRole(val.(*OrganizationCustomRepositoryRole_base_role)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the custom role. +// returns a *int32 when successful +func (m *OrganizationCustomRepositoryRole) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the custom role. +// returns a *string when successful +func (m *OrganizationCustomRepositoryRole) GetName()(*string) { + return m.name +} +// GetOrganization gets the organization property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *OrganizationCustomRepositoryRole) GetOrganization()(SimpleUserable) { + return m.organization +} +// GetPermissions gets the permissions property value. A list of additional permissions included in this role. +// returns a []string when successful +func (m *OrganizationCustomRepositoryRole) GetPermissions()([]string) { + return m.permissions +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *OrganizationCustomRepositoryRole) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *OrganizationCustomRepositoryRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBaseRole() != nil { + cast := (*m.GetBaseRole()).String() + err := writer.WriteStringValue("base_role", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationCustomRepositoryRole) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBaseRole sets the base_role property value. The system role from which this role inherits permissions. +func (m *OrganizationCustomRepositoryRole) SetBaseRole(value *OrganizationCustomRepositoryRole_base_role)() { + m.base_role = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *OrganizationCustomRepositoryRole) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. A short description about who this role is for or what permissions it grants. +func (m *OrganizationCustomRepositoryRole) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The unique identifier of the custom role. +func (m *OrganizationCustomRepositoryRole) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the custom role. +func (m *OrganizationCustomRepositoryRole) SetName(value *string)() { + m.name = value +} +// SetOrganization sets the organization property value. A GitHub user. +func (m *OrganizationCustomRepositoryRole) SetOrganization(value SimpleUserable)() { + m.organization = value +} +// SetPermissions sets the permissions property value. A list of additional permissions included in this role. +func (m *OrganizationCustomRepositoryRole) SetPermissions(value []string)() { + m.permissions = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *OrganizationCustomRepositoryRole) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type OrganizationCustomRepositoryRoleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseRole()(*OrganizationCustomRepositoryRole_base_role) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetId()(*int32) + GetName()(*string) + GetOrganization()(SimpleUserable) + GetPermissions()([]string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetBaseRole(value *OrganizationCustomRepositoryRole_base_role)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetOrganization(value SimpleUserable)() + SetPermissions(value []string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/organization_custom_repository_role_base_role.go b/pkg/github/models/organization_custom_repository_role_base_role.go new file mode 100644 index 0000000..5f97625 --- /dev/null +++ b/pkg/github/models/organization_custom_repository_role_base_role.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The system role from which this role inherits permissions. +type OrganizationCustomRepositoryRole_base_role int + +const ( + READ_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE OrganizationCustomRepositoryRole_base_role = iota + TRIAGE_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + WRITE_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + MAINTAIN_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE +) + +func (i OrganizationCustomRepositoryRole_base_role) String() string { + return []string{"read", "triage", "write", "maintain"}[i] +} +func ParseOrganizationCustomRepositoryRole_base_role(v string) (any, error) { + result := READ_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + switch v { + case "read": + result = READ_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + case "triage": + result = TRIAGE_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + case "write": + result = WRITE_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + case "maintain": + result = MAINTAIN_ORGANIZATIONCUSTOMREPOSITORYROLE_BASE_ROLE + default: + return 0, errors.New("Unknown OrganizationCustomRepositoryRole_base_role value: " + v) + } + return &result, nil +} +func SerializeOrganizationCustomRepositoryRole_base_role(values []OrganizationCustomRepositoryRole_base_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationCustomRepositoryRole_base_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_custom_repository_role_create_schema.go b/pkg/github/models/organization_custom_repository_role_create_schema.go new file mode 100644 index 0000000..eb04d6b --- /dev/null +++ b/pkg/github/models/organization_custom_repository_role_create_schema.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationCustomRepositoryRoleCreateSchema struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The system role from which this role inherits permissions. + base_role *OrganizationCustomRepositoryRoleCreateSchema_base_role + // A short description about who this role is for or what permissions it grants. + description *string + // The name of the custom role. + name *string + // A list of additional permissions included in this role. + permissions []string +} +// NewOrganizationCustomRepositoryRoleCreateSchema instantiates a new OrganizationCustomRepositoryRoleCreateSchema and sets the default values. +func NewOrganizationCustomRepositoryRoleCreateSchema()(*OrganizationCustomRepositoryRoleCreateSchema) { + m := &OrganizationCustomRepositoryRoleCreateSchema{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationCustomRepositoryRoleCreateSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationCustomRepositoryRoleCreateSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationCustomRepositoryRoleCreateSchema(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationCustomRepositoryRoleCreateSchema) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBaseRole gets the base_role property value. The system role from which this role inherits permissions. +// returns a *OrganizationCustomRepositoryRoleCreateSchema_base_role when successful +func (m *OrganizationCustomRepositoryRoleCreateSchema) GetBaseRole()(*OrganizationCustomRepositoryRoleCreateSchema_base_role) { + return m.base_role +} +// GetDescription gets the description property value. A short description about who this role is for or what permissions it grants. +// returns a *string when successful +func (m *OrganizationCustomRepositoryRoleCreateSchema) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationCustomRepositoryRoleCreateSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationCustomRepositoryRoleCreateSchema_base_role) + if err != nil { + return err + } + if val != nil { + m.SetBaseRole(val.(*OrganizationCustomRepositoryRoleCreateSchema_base_role)) + } + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the custom role. +// returns a *string when successful +func (m *OrganizationCustomRepositoryRoleCreateSchema) GetName()(*string) { + return m.name +} +// GetPermissions gets the permissions property value. A list of additional permissions included in this role. +// returns a []string when successful +func (m *OrganizationCustomRepositoryRoleCreateSchema) GetPermissions()([]string) { + return m.permissions +} +// Serialize serializes information the current object +func (m *OrganizationCustomRepositoryRoleCreateSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBaseRole() != nil { + cast := (*m.GetBaseRole()).String() + err := writer.WriteStringValue("base_role", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + 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 *OrganizationCustomRepositoryRoleCreateSchema) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBaseRole sets the base_role property value. The system role from which this role inherits permissions. +func (m *OrganizationCustomRepositoryRoleCreateSchema) SetBaseRole(value *OrganizationCustomRepositoryRoleCreateSchema_base_role)() { + m.base_role = value +} +// SetDescription sets the description property value. A short description about who this role is for or what permissions it grants. +func (m *OrganizationCustomRepositoryRoleCreateSchema) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the custom role. +func (m *OrganizationCustomRepositoryRoleCreateSchema) SetName(value *string)() { + m.name = value +} +// SetPermissions sets the permissions property value. A list of additional permissions included in this role. +func (m *OrganizationCustomRepositoryRoleCreateSchema) SetPermissions(value []string)() { + m.permissions = value +} +type OrganizationCustomRepositoryRoleCreateSchemaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseRole()(*OrganizationCustomRepositoryRoleCreateSchema_base_role) + GetDescription()(*string) + GetName()(*string) + GetPermissions()([]string) + SetBaseRole(value *OrganizationCustomRepositoryRoleCreateSchema_base_role)() + SetDescription(value *string)() + SetName(value *string)() + SetPermissions(value []string)() +} diff --git a/pkg/github/models/organization_custom_repository_role_create_schema_base_role.go b/pkg/github/models/organization_custom_repository_role_create_schema_base_role.go new file mode 100644 index 0000000..736599e --- /dev/null +++ b/pkg/github/models/organization_custom_repository_role_create_schema_base_role.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The system role from which this role inherits permissions. +type OrganizationCustomRepositoryRoleCreateSchema_base_role int + +const ( + READ_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE OrganizationCustomRepositoryRoleCreateSchema_base_role = iota + TRIAGE_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + WRITE_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + MAINTAIN_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE +) + +func (i OrganizationCustomRepositoryRoleCreateSchema_base_role) String() string { + return []string{"read", "triage", "write", "maintain"}[i] +} +func ParseOrganizationCustomRepositoryRoleCreateSchema_base_role(v string) (any, error) { + result := READ_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + switch v { + case "read": + result = READ_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + case "triage": + result = TRIAGE_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + case "write": + result = WRITE_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + case "maintain": + result = MAINTAIN_ORGANIZATIONCUSTOMREPOSITORYROLECREATESCHEMA_BASE_ROLE + default: + return 0, errors.New("Unknown OrganizationCustomRepositoryRoleCreateSchema_base_role value: " + v) + } + return &result, nil +} +func SerializeOrganizationCustomRepositoryRoleCreateSchema_base_role(values []OrganizationCustomRepositoryRoleCreateSchema_base_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationCustomRepositoryRoleCreateSchema_base_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_custom_repository_role_update_schema.go b/pkg/github/models/organization_custom_repository_role_update_schema.go new file mode 100644 index 0000000..532c9cb --- /dev/null +++ b/pkg/github/models/organization_custom_repository_role_update_schema.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationCustomRepositoryRoleUpdateSchema struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The system role from which this role inherits permissions. + base_role *OrganizationCustomRepositoryRoleUpdateSchema_base_role + // A short description about who this role is for or what permissions it grants. + description *string + // The name of the custom role. + name *string + // A list of additional permissions included in this role. + permissions []string +} +// NewOrganizationCustomRepositoryRoleUpdateSchema instantiates a new OrganizationCustomRepositoryRoleUpdateSchema and sets the default values. +func NewOrganizationCustomRepositoryRoleUpdateSchema()(*OrganizationCustomRepositoryRoleUpdateSchema) { + m := &OrganizationCustomRepositoryRoleUpdateSchema{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationCustomRepositoryRoleUpdateSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationCustomRepositoryRoleUpdateSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationCustomRepositoryRoleUpdateSchema(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationCustomRepositoryRoleUpdateSchema) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBaseRole gets the base_role property value. The system role from which this role inherits permissions. +// returns a *OrganizationCustomRepositoryRoleUpdateSchema_base_role when successful +func (m *OrganizationCustomRepositoryRoleUpdateSchema) GetBaseRole()(*OrganizationCustomRepositoryRoleUpdateSchema_base_role) { + return m.base_role +} +// GetDescription gets the description property value. A short description about who this role is for or what permissions it grants. +// returns a *string when successful +func (m *OrganizationCustomRepositoryRoleUpdateSchema) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationCustomRepositoryRoleUpdateSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationCustomRepositoryRoleUpdateSchema_base_role) + if err != nil { + return err + } + if val != nil { + m.SetBaseRole(val.(*OrganizationCustomRepositoryRoleUpdateSchema_base_role)) + } + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the custom role. +// returns a *string when successful +func (m *OrganizationCustomRepositoryRoleUpdateSchema) GetName()(*string) { + return m.name +} +// GetPermissions gets the permissions property value. A list of additional permissions included in this role. +// returns a []string when successful +func (m *OrganizationCustomRepositoryRoleUpdateSchema) GetPermissions()([]string) { + return m.permissions +} +// Serialize serializes information the current object +func (m *OrganizationCustomRepositoryRoleUpdateSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBaseRole() != nil { + cast := (*m.GetBaseRole()).String() + err := writer.WriteStringValue("base_role", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + 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 *OrganizationCustomRepositoryRoleUpdateSchema) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBaseRole sets the base_role property value. The system role from which this role inherits permissions. +func (m *OrganizationCustomRepositoryRoleUpdateSchema) SetBaseRole(value *OrganizationCustomRepositoryRoleUpdateSchema_base_role)() { + m.base_role = value +} +// SetDescription sets the description property value. A short description about who this role is for or what permissions it grants. +func (m *OrganizationCustomRepositoryRoleUpdateSchema) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the custom role. +func (m *OrganizationCustomRepositoryRoleUpdateSchema) SetName(value *string)() { + m.name = value +} +// SetPermissions sets the permissions property value. A list of additional permissions included in this role. +func (m *OrganizationCustomRepositoryRoleUpdateSchema) SetPermissions(value []string)() { + m.permissions = value +} +type OrganizationCustomRepositoryRoleUpdateSchemaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseRole()(*OrganizationCustomRepositoryRoleUpdateSchema_base_role) + GetDescription()(*string) + GetName()(*string) + GetPermissions()([]string) + SetBaseRole(value *OrganizationCustomRepositoryRoleUpdateSchema_base_role)() + SetDescription(value *string)() + SetName(value *string)() + SetPermissions(value []string)() +} diff --git a/pkg/github/models/organization_custom_repository_role_update_schema_base_role.go b/pkg/github/models/organization_custom_repository_role_update_schema_base_role.go new file mode 100644 index 0000000..f4b194f --- /dev/null +++ b/pkg/github/models/organization_custom_repository_role_update_schema_base_role.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The system role from which this role inherits permissions. +type OrganizationCustomRepositoryRoleUpdateSchema_base_role int + +const ( + READ_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE OrganizationCustomRepositoryRoleUpdateSchema_base_role = iota + TRIAGE_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + WRITE_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + MAINTAIN_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE +) + +func (i OrganizationCustomRepositoryRoleUpdateSchema_base_role) String() string { + return []string{"read", "triage", "write", "maintain"}[i] +} +func ParseOrganizationCustomRepositoryRoleUpdateSchema_base_role(v string) (any, error) { + result := READ_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + switch v { + case "read": + result = READ_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + case "triage": + result = TRIAGE_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + case "write": + result = WRITE_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + case "maintain": + result = MAINTAIN_ORGANIZATIONCUSTOMREPOSITORYROLEUPDATESCHEMA_BASE_ROLE + default: + return 0, errors.New("Unknown OrganizationCustomRepositoryRoleUpdateSchema_base_role value: " + v) + } + return &result, nil +} +func SerializeOrganizationCustomRepositoryRoleUpdateSchema_base_role(values []OrganizationCustomRepositoryRoleUpdateSchema_base_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationCustomRepositoryRoleUpdateSchema_base_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_dependabot_secret.go b/pkg/github/models/organization_dependabot_secret.go new file mode 100644 index 0000000..4cb480a --- /dev/null +++ b/pkg/github/models/organization_dependabot_secret.go @@ -0,0 +1,199 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationDependabotSecret secrets for GitHub Dependabot for an organization. +type OrganizationDependabotSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret. + name *string + // The selected_repositories_url property + selected_repositories_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Visibility of a secret + visibility *OrganizationDependabotSecret_visibility +} +// NewOrganizationDependabotSecret instantiates a new OrganizationDependabotSecret and sets the default values. +func NewOrganizationDependabotSecret()(*OrganizationDependabotSecret) { + m := &OrganizationDependabotSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationDependabotSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationDependabotSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationDependabotSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationDependabotSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *OrganizationDependabotSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationDependabotSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationDependabotSecret_visibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*OrganizationDependabotSecret_visibility)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret. +// returns a *string when successful +func (m *OrganizationDependabotSecret) GetName()(*string) { + return m.name +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. The selected_repositories_url property +// returns a *string when successful +func (m *OrganizationDependabotSecret) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *OrganizationDependabotSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetVisibility gets the visibility property value. Visibility of a secret +// returns a *OrganizationDependabotSecret_visibility when successful +func (m *OrganizationDependabotSecret) GetVisibility()(*OrganizationDependabotSecret_visibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *OrganizationDependabotSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err := writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationDependabotSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *OrganizationDependabotSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret. +func (m *OrganizationDependabotSecret) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. The selected_repositories_url property +func (m *OrganizationDependabotSecret) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *OrganizationDependabotSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetVisibility sets the visibility property value. Visibility of a secret +func (m *OrganizationDependabotSecret) SetVisibility(value *OrganizationDependabotSecret_visibility)() { + m.visibility = value +} +type OrganizationDependabotSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSelectedRepositoriesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVisibility()(*OrganizationDependabotSecret_visibility) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSelectedRepositoriesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVisibility(value *OrganizationDependabotSecret_visibility)() +} diff --git a/pkg/github/models/organization_dependabot_secret_visibility.go b/pkg/github/models/organization_dependabot_secret_visibility.go new file mode 100644 index 0000000..8609e72 --- /dev/null +++ b/pkg/github/models/organization_dependabot_secret_visibility.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Visibility of a secret +type OrganizationDependabotSecret_visibility int + +const ( + ALL_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY OrganizationDependabotSecret_visibility = iota + PRIVATE_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY + SELECTED_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY +) + +func (i OrganizationDependabotSecret_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseOrganizationDependabotSecret_visibility(v string) (any, error) { + result := ALL_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY + switch v { + case "all": + result = ALL_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY + case "private": + result = PRIVATE_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY + case "selected": + result = SELECTED_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY + default: + return 0, errors.New("Unknown OrganizationDependabotSecret_visibility value: " + v) + } + return &result, nil +} +func SerializeOrganizationDependabotSecret_visibility(values []OrganizationDependabotSecret_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationDependabotSecret_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_fine_grained_permission.go b/pkg/github/models/organization_fine_grained_permission.go new file mode 100644 index 0000000..e7f1885 --- /dev/null +++ b/pkg/github/models/organization_fine_grained_permission.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationFineGrainedPermission a fine-grained permission that protects organization resources. +type OrganizationFineGrainedPermission struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // The name property + name *string +} +// NewOrganizationFineGrainedPermission instantiates a new OrganizationFineGrainedPermission and sets the default values. +func NewOrganizationFineGrainedPermission()(*OrganizationFineGrainedPermission) { + m := &OrganizationFineGrainedPermission{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationFineGrainedPermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationFineGrainedPermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationFineGrainedPermission(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationFineGrainedPermission) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *OrganizationFineGrainedPermission) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationFineGrainedPermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *OrganizationFineGrainedPermission) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *OrganizationFineGrainedPermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *OrganizationFineGrainedPermission) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *OrganizationFineGrainedPermission) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name property +func (m *OrganizationFineGrainedPermission) SetName(value *string)() { + m.name = value +} +type OrganizationFineGrainedPermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + SetDescription(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/organization_full.go b/pkg/github/models/organization_full.go new file mode 100644 index 0000000..06e4d20 --- /dev/null +++ b/pkg/github/models/organization_full.go @@ -0,0 +1,1735 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationFull organization Full +type OrganizationFull struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + advanced_security_enabled_for_new_repositories *bool + // The archived_at property + archived_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The avatar_url property + avatar_url *string + // The billing_email property + billing_email *string + // The blog property + blog *string + // The collaborators property + collaborators *int32 + // The company property + company *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_repository_permission property + default_repository_permission *string + // Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred tothis organization.This field is only visible to organization owners or members of a team with the security manager role. + dependabot_alerts_enabled_for_new_repositories *bool + // Whether dependabot security updates are automatically enabled for new repositories and repositories transferredto this organization.This field is only visible to organization owners or members of a team with the security manager role. + dependabot_security_updates_enabled_for_new_repositories *bool + // Whether dependency graph is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. + dependency_graph_enabled_for_new_repositories *bool + // The description property + description *string + // The disk_usage property + disk_usage *int32 + // The email property + email *string + // The events_url property + events_url *string + // The followers property + followers *int32 + // The following property + following *int32 + // The has_organization_projects property + has_organization_projects *bool + // The has_repository_projects property + has_repository_projects *bool + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The is_verified property + is_verified *bool + // The issues_url property + issues_url *string + // The location property + location *string + // The login property + login *string + // The members_allowed_repository_creation_type property + members_allowed_repository_creation_type *string + // The members_can_create_internal_repositories property + members_can_create_internal_repositories *bool + // The members_can_create_pages property + members_can_create_pages *bool + // The members_can_create_private_pages property + members_can_create_private_pages *bool + // The members_can_create_private_repositories property + members_can_create_private_repositories *bool + // The members_can_create_public_pages property + members_can_create_public_pages *bool + // The members_can_create_public_repositories property + members_can_create_public_repositories *bool + // The members_can_create_repositories property + members_can_create_repositories *bool + // The members_can_fork_private_repositories property + members_can_fork_private_repositories *bool + // The members_url property + members_url *string + // The name property + name *string + // The node_id property + node_id *string + // The owned_private_repos property + owned_private_repos *int32 + // The plan property + plan OrganizationFull_planable + // The private_gists property + private_gists *int32 + // The public_gists property + public_gists *int32 + // The public_members_url property + public_members_url *string + // The public_repos property + public_repos *int32 + // The repos_url property + repos_url *string + // Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. + secret_scanning_enabled_for_new_repositories *bool + // An optional URL string to display to contributors who are blocked from pushing a secret. + secret_scanning_push_protection_custom_link *string + // Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + secret_scanning_push_protection_custom_link_enabled *bool + // Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + secret_scanning_push_protection_enabled_for_new_repositories *bool + // Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization. + secret_scanning_validity_checks_enabled *bool + // The total_private_repos property + total_private_repos *int32 + // The twitter_username property + twitter_username *string + // The two_factor_requirement_enabled property + two_factor_requirement_enabled *bool + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewOrganizationFull instantiates a new OrganizationFull and sets the default values. +func NewOrganizationFull()(*OrganizationFull) { + m := &OrganizationFull{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationFullFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationFullFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationFull(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationFull) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// returns a *bool when successful +func (m *OrganizationFull) GetAdvancedSecurityEnabledForNewRepositories()(*bool) { + return m.advanced_security_enabled_for_new_repositories +} +// GetArchivedAt gets the archived_at property value. The archived_at property +// returns a *Time when successful +func (m *OrganizationFull) GetArchivedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.archived_at +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *OrganizationFull) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetBillingEmail gets the billing_email property value. The billing_email property +// returns a *string when successful +func (m *OrganizationFull) GetBillingEmail()(*string) { + return m.billing_email +} +// GetBlog gets the blog property value. The blog property +// returns a *string when successful +func (m *OrganizationFull) GetBlog()(*string) { + return m.blog +} +// GetCollaborators gets the collaborators property value. The collaborators property +// returns a *int32 when successful +func (m *OrganizationFull) GetCollaborators()(*int32) { + return m.collaborators +} +// GetCompany gets the company property value. The company property +// returns a *string when successful +func (m *OrganizationFull) GetCompany()(*string) { + return m.company +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *OrganizationFull) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultRepositoryPermission gets the default_repository_permission property value. The default_repository_permission property +// returns a *string when successful +func (m *OrganizationFull) GetDefaultRepositoryPermission()(*string) { + return m.default_repository_permission +} +// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred tothis organization.This field is only visible to organization owners or members of a team with the security manager role. +// returns a *bool when successful +func (m *OrganizationFull) GetDependabotAlertsEnabledForNewRepositories()(*bool) { + return m.dependabot_alerts_enabled_for_new_repositories +} +// GetDependabotSecurityUpdatesEnabledForNewRepositories gets the dependabot_security_updates_enabled_for_new_repositories property value. Whether dependabot security updates are automatically enabled for new repositories and repositories transferredto this organization.This field is only visible to organization owners or members of a team with the security manager role. +// returns a *bool when successful +func (m *OrganizationFull) GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) { + return m.dependabot_security_updates_enabled_for_new_repositories +} +// GetDependencyGraphEnabledForNewRepositories gets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +// returns a *bool when successful +func (m *OrganizationFull) GetDependencyGraphEnabledForNewRepositories()(*bool) { + return m.dependency_graph_enabled_for_new_repositories +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *OrganizationFull) GetDescription()(*string) { + return m.description +} +// GetDiskUsage gets the disk_usage property value. The disk_usage property +// returns a *int32 when successful +func (m *OrganizationFull) GetDiskUsage()(*int32) { + return m.disk_usage +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *OrganizationFull) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *OrganizationFull) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationFull) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advanced_security_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityEnabledForNewRepositories(val) + } + return nil + } + res["archived_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetArchivedAt(val) + } + return nil + } + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["billing_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillingEmail(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCollaborators(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_repository_permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultRepositoryPermission(val) + } + return nil + } + res["dependabot_alerts_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependabotAlertsEnabledForNewRepositories(val) + } + return nil + } + res["dependabot_security_updates_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependabotSecurityUpdatesEnabledForNewRepositories(val) + } + return nil + } + res["dependency_graph_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraphEnabledForNewRepositories(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["disk_usage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDiskUsage(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowing(val) + } + return nil + } + res["has_organization_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasOrganizationProjects(val) + } + return nil + } + res["has_repository_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasRepositoryProjects(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVerified(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["members_allowed_repository_creation_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersAllowedRepositoryCreationType(val) + } + return nil + } + res["members_can_create_internal_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreateInternalRepositories(val) + } + return nil + } + res["members_can_create_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePages(val) + } + return nil + } + res["members_can_create_private_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePrivatePages(val) + } + return nil + } + res["members_can_create_private_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePrivateRepositories(val) + } + return nil + } + res["members_can_create_public_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePublicPages(val) + } + return nil + } + res["members_can_create_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePublicRepositories(val) + } + return nil + } + res["members_can_create_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreateRepositories(val) + } + return nil + } + res["members_can_fork_private_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanForkPrivateRepositories(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owned_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOwnedPrivateRepos(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationFull_planFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(OrganizationFull_planable)) + } + return nil + } + res["private_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateGists(val) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicMembersUrl(val) + } + return nil + } + res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepos(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["secret_scanning_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_push_protection_custom_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionCustomLink(val) + } + return nil + } + res["secret_scanning_push_protection_custom_link_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionCustomLinkEnabled(val) + } + return nil + } + res["secret_scanning_push_protection_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_validity_checks_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningValidityChecksEnabled(val) + } + return nil + } + res["total_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPrivateRepos(val) + } + return nil + } + res["twitter_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTwitterUsername(val) + } + return nil + } + res["two_factor_requirement_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTwoFactorRequirementEnabled(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + 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 +} +// GetFollowers gets the followers property value. The followers property +// returns a *int32 when successful +func (m *OrganizationFull) GetFollowers()(*int32) { + return m.followers +} +// GetFollowing gets the following property value. The following property +// returns a *int32 when successful +func (m *OrganizationFull) GetFollowing()(*int32) { + return m.following +} +// GetHasOrganizationProjects gets the has_organization_projects property value. The has_organization_projects property +// returns a *bool when successful +func (m *OrganizationFull) GetHasOrganizationProjects()(*bool) { + return m.has_organization_projects +} +// GetHasRepositoryProjects gets the has_repository_projects property value. The has_repository_projects property +// returns a *bool when successful +func (m *OrganizationFull) GetHasRepositoryProjects()(*bool) { + return m.has_repository_projects +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *OrganizationFull) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *OrganizationFull) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *OrganizationFull) GetId()(*int32) { + return m.id +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *OrganizationFull) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsVerified gets the is_verified property value. The is_verified property +// returns a *bool when successful +func (m *OrganizationFull) GetIsVerified()(*bool) { + return m.is_verified +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *OrganizationFull) GetLocation()(*string) { + return m.location +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *OrganizationFull) GetLogin()(*string) { + return m.login +} +// GetMembersAllowedRepositoryCreationType gets the members_allowed_repository_creation_type property value. The members_allowed_repository_creation_type property +// returns a *string when successful +func (m *OrganizationFull) GetMembersAllowedRepositoryCreationType()(*string) { + return m.members_allowed_repository_creation_type +} +// GetMembersCanCreateInternalRepositories gets the members_can_create_internal_repositories property value. The members_can_create_internal_repositories property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreateInternalRepositories()(*bool) { + return m.members_can_create_internal_repositories +} +// GetMembersCanCreatePages gets the members_can_create_pages property value. The members_can_create_pages property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreatePages()(*bool) { + return m.members_can_create_pages +} +// GetMembersCanCreatePrivatePages gets the members_can_create_private_pages property value. The members_can_create_private_pages property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreatePrivatePages()(*bool) { + return m.members_can_create_private_pages +} +// GetMembersCanCreatePrivateRepositories gets the members_can_create_private_repositories property value. The members_can_create_private_repositories property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreatePrivateRepositories()(*bool) { + return m.members_can_create_private_repositories +} +// GetMembersCanCreatePublicPages gets the members_can_create_public_pages property value. The members_can_create_public_pages property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreatePublicPages()(*bool) { + return m.members_can_create_public_pages +} +// GetMembersCanCreatePublicRepositories gets the members_can_create_public_repositories property value. The members_can_create_public_repositories property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreatePublicRepositories()(*bool) { + return m.members_can_create_public_repositories +} +// GetMembersCanCreateRepositories gets the members_can_create_repositories property value. The members_can_create_repositories property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanCreateRepositories()(*bool) { + return m.members_can_create_repositories +} +// GetMembersCanForkPrivateRepositories gets the members_can_fork_private_repositories property value. The members_can_fork_private_repositories property +// returns a *bool when successful +func (m *OrganizationFull) GetMembersCanForkPrivateRepositories()(*bool) { + return m.members_can_fork_private_repositories +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *OrganizationFull) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *OrganizationFull) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *OrganizationFull) GetNodeId()(*string) { + return m.node_id +} +// GetOwnedPrivateRepos gets the owned_private_repos property value. The owned_private_repos property +// returns a *int32 when successful +func (m *OrganizationFull) GetOwnedPrivateRepos()(*int32) { + return m.owned_private_repos +} +// GetPlan gets the plan property value. The plan property +// returns a OrganizationFull_planable when successful +func (m *OrganizationFull) GetPlan()(OrganizationFull_planable) { + return m.plan +} +// GetPrivateGists gets the private_gists property value. The private_gists property +// returns a *int32 when successful +func (m *OrganizationFull) GetPrivateGists()(*int32) { + return m.private_gists +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *OrganizationFull) GetPublicGists()(*int32) { + return m.public_gists +} +// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property +// returns a *string when successful +func (m *OrganizationFull) GetPublicMembersUrl()(*string) { + return m.public_members_url +} +// GetPublicRepos gets the public_repos property value. The public_repos property +// returns a *int32 when successful +func (m *OrganizationFull) GetPublicRepos()(*int32) { + return m.public_repos +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *OrganizationFull) GetReposUrl()(*string) { + return m.repos_url +} +// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +// returns a *bool when successful +func (m *OrganizationFull) GetSecretScanningEnabledForNewRepositories()(*bool) { + return m.secret_scanning_enabled_for_new_repositories +} +// GetSecretScanningPushProtectionCustomLink gets the secret_scanning_push_protection_custom_link property value. An optional URL string to display to contributors who are blocked from pushing a secret. +// returns a *string when successful +func (m *OrganizationFull) GetSecretScanningPushProtectionCustomLink()(*string) { + return m.secret_scanning_push_protection_custom_link +} +// GetSecretScanningPushProtectionCustomLinkEnabled gets the secret_scanning_push_protection_custom_link_enabled property value. Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. +// returns a *bool when successful +func (m *OrganizationFull) GetSecretScanningPushProtectionCustomLinkEnabled()(*bool) { + return m.secret_scanning_push_protection_custom_link_enabled +} +// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// returns a *bool when successful +func (m *OrganizationFull) GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) { + return m.secret_scanning_push_protection_enabled_for_new_repositories +} +// GetSecretScanningValidityChecksEnabled gets the secret_scanning_validity_checks_enabled property value. Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization. +// returns a *bool when successful +func (m *OrganizationFull) GetSecretScanningValidityChecksEnabled()(*bool) { + return m.secret_scanning_validity_checks_enabled +} +// GetTotalPrivateRepos gets the total_private_repos property value. The total_private_repos property +// returns a *int32 when successful +func (m *OrganizationFull) GetTotalPrivateRepos()(*int32) { + return m.total_private_repos +} +// GetTwitterUsername gets the twitter_username property value. The twitter_username property +// returns a *string when successful +func (m *OrganizationFull) GetTwitterUsername()(*string) { + return m.twitter_username +} +// GetTwoFactorRequirementEnabled gets the two_factor_requirement_enabled property value. The two_factor_requirement_enabled property +// returns a *bool when successful +func (m *OrganizationFull) GetTwoFactorRequirementEnabled()(*bool) { + return m.two_factor_requirement_enabled +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *OrganizationFull) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *OrganizationFull) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *OrganizationFull) GetUrl()(*string) { + return m.url +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *OrganizationFull) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *OrganizationFull) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("advanced_security_enabled_for_new_repositories", m.GetAdvancedSecurityEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("archived_at", m.GetArchivedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("billing_email", m.GetBillingEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("collaborators", m.GetCollaborators()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_repository_permission", m.GetDefaultRepositoryPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", m.GetDependabotAlertsEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependabot_security_updates_enabled_for_new_repositories", m.GetDependabotSecurityUpdatesEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependency_graph_enabled_for_new_repositories", m.GetDependencyGraphEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("disk_usage", m.GetDiskUsage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("followers", m.GetFollowers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("following", m.GetFollowing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_organization_projects", m.GetHasOrganizationProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_repository_projects", m.GetHasRepositoryProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_verified", m.GetIsVerified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_allowed_repository_creation_type", m.GetMembersAllowedRepositoryCreationType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_internal_repositories", m.GetMembersCanCreateInternalRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_pages", m.GetMembersCanCreatePages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_private_pages", m.GetMembersCanCreatePrivatePages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_private_repositories", m.GetMembersCanCreatePrivateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_public_pages", m.GetMembersCanCreatePublicPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_public_repositories", m.GetMembersCanCreatePublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_repositories", m.GetMembersCanCreateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_fork_private_repositories", m.GetMembersCanForkPrivateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("owned_private_repos", m.GetOwnedPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_gists", m.GetPrivateGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_enabled_for_new_repositories", m.GetSecretScanningEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_scanning_push_protection_custom_link", m.GetSecretScanningPushProtectionCustomLink()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_push_protection_custom_link_enabled", m.GetSecretScanningPushProtectionCustomLinkEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_push_protection_enabled_for_new_repositories", m.GetSecretScanningPushProtectionEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_validity_checks_enabled", m.GetSecretScanningValidityChecksEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_private_repos", m.GetTotalPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("twitter_username", m.GetTwitterUsername()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("two_factor_requirement_enabled", m.GetTwoFactorRequirementEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *OrganizationFull) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +func (m *OrganizationFull) SetAdvancedSecurityEnabledForNewRepositories(value *bool)() { + m.advanced_security_enabled_for_new_repositories = value +} +// SetArchivedAt sets the archived_at property value. The archived_at property +func (m *OrganizationFull) SetArchivedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.archived_at = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *OrganizationFull) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetBillingEmail sets the billing_email property value. The billing_email property +func (m *OrganizationFull) SetBillingEmail(value *string)() { + m.billing_email = value +} +// SetBlog sets the blog property value. The blog property +func (m *OrganizationFull) SetBlog(value *string)() { + m.blog = value +} +// SetCollaborators sets the collaborators property value. The collaborators property +func (m *OrganizationFull) SetCollaborators(value *int32)() { + m.collaborators = value +} +// SetCompany sets the company property value. The company property +func (m *OrganizationFull) SetCompany(value *string)() { + m.company = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *OrganizationFull) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultRepositoryPermission sets the default_repository_permission property value. The default_repository_permission property +func (m *OrganizationFull) SetDefaultRepositoryPermission(value *string)() { + m.default_repository_permission = value +} +// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred tothis organization.This field is only visible to organization owners or members of a team with the security manager role. +func (m *OrganizationFull) SetDependabotAlertsEnabledForNewRepositories(value *bool)() { + m.dependabot_alerts_enabled_for_new_repositories = value +} +// SetDependabotSecurityUpdatesEnabledForNewRepositories sets the dependabot_security_updates_enabled_for_new_repositories property value. Whether dependabot security updates are automatically enabled for new repositories and repositories transferredto this organization.This field is only visible to organization owners or members of a team with the security manager role. +func (m *OrganizationFull) SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() { + m.dependabot_security_updates_enabled_for_new_repositories = value +} +// SetDependencyGraphEnabledForNewRepositories sets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +func (m *OrganizationFull) SetDependencyGraphEnabledForNewRepositories(value *bool)() { + m.dependency_graph_enabled_for_new_repositories = value +} +// SetDescription sets the description property value. The description property +func (m *OrganizationFull) SetDescription(value *string)() { + m.description = value +} +// SetDiskUsage sets the disk_usage property value. The disk_usage property +func (m *OrganizationFull) SetDiskUsage(value *int32)() { + m.disk_usage = value +} +// SetEmail sets the email property value. The email property +func (m *OrganizationFull) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *OrganizationFull) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowers sets the followers property value. The followers property +func (m *OrganizationFull) SetFollowers(value *int32)() { + m.followers = value +} +// SetFollowing sets the following property value. The following property +func (m *OrganizationFull) SetFollowing(value *int32)() { + m.following = value +} +// SetHasOrganizationProjects sets the has_organization_projects property value. The has_organization_projects property +func (m *OrganizationFull) SetHasOrganizationProjects(value *bool)() { + m.has_organization_projects = value +} +// SetHasRepositoryProjects sets the has_repository_projects property value. The has_repository_projects property +func (m *OrganizationFull) SetHasRepositoryProjects(value *bool)() { + m.has_repository_projects = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *OrganizationFull) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *OrganizationFull) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *OrganizationFull) SetId(value *int32)() { + m.id = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *OrganizationFull) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsVerified sets the is_verified property value. The is_verified property +func (m *OrganizationFull) SetIsVerified(value *bool)() { + m.is_verified = value +} +// SetLocation sets the location property value. The location property +func (m *OrganizationFull) SetLocation(value *string)() { + m.location = value +} +// SetLogin sets the login property value. The login property +func (m *OrganizationFull) SetLogin(value *string)() { + m.login = value +} +// SetMembersAllowedRepositoryCreationType sets the members_allowed_repository_creation_type property value. The members_allowed_repository_creation_type property +func (m *OrganizationFull) SetMembersAllowedRepositoryCreationType(value *string)() { + m.members_allowed_repository_creation_type = value +} +// SetMembersCanCreateInternalRepositories sets the members_can_create_internal_repositories property value. The members_can_create_internal_repositories property +func (m *OrganizationFull) SetMembersCanCreateInternalRepositories(value *bool)() { + m.members_can_create_internal_repositories = value +} +// SetMembersCanCreatePages sets the members_can_create_pages property value. The members_can_create_pages property +func (m *OrganizationFull) SetMembersCanCreatePages(value *bool)() { + m.members_can_create_pages = value +} +// SetMembersCanCreatePrivatePages sets the members_can_create_private_pages property value. The members_can_create_private_pages property +func (m *OrganizationFull) SetMembersCanCreatePrivatePages(value *bool)() { + m.members_can_create_private_pages = value +} +// SetMembersCanCreatePrivateRepositories sets the members_can_create_private_repositories property value. The members_can_create_private_repositories property +func (m *OrganizationFull) SetMembersCanCreatePrivateRepositories(value *bool)() { + m.members_can_create_private_repositories = value +} +// SetMembersCanCreatePublicPages sets the members_can_create_public_pages property value. The members_can_create_public_pages property +func (m *OrganizationFull) SetMembersCanCreatePublicPages(value *bool)() { + m.members_can_create_public_pages = value +} +// SetMembersCanCreatePublicRepositories sets the members_can_create_public_repositories property value. The members_can_create_public_repositories property +func (m *OrganizationFull) SetMembersCanCreatePublicRepositories(value *bool)() { + m.members_can_create_public_repositories = value +} +// SetMembersCanCreateRepositories sets the members_can_create_repositories property value. The members_can_create_repositories property +func (m *OrganizationFull) SetMembersCanCreateRepositories(value *bool)() { + m.members_can_create_repositories = value +} +// SetMembersCanForkPrivateRepositories sets the members_can_fork_private_repositories property value. The members_can_fork_private_repositories property +func (m *OrganizationFull) SetMembersCanForkPrivateRepositories(value *bool)() { + m.members_can_fork_private_repositories = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *OrganizationFull) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *OrganizationFull) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *OrganizationFull) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwnedPrivateRepos sets the owned_private_repos property value. The owned_private_repos property +func (m *OrganizationFull) SetOwnedPrivateRepos(value *int32)() { + m.owned_private_repos = value +} +// SetPlan sets the plan property value. The plan property +func (m *OrganizationFull) SetPlan(value OrganizationFull_planable)() { + m.plan = value +} +// SetPrivateGists sets the private_gists property value. The private_gists property +func (m *OrganizationFull) SetPrivateGists(value *int32)() { + m.private_gists = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *OrganizationFull) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property +func (m *OrganizationFull) SetPublicMembersUrl(value *string)() { + m.public_members_url = value +} +// SetPublicRepos sets the public_repos property value. The public_repos property +func (m *OrganizationFull) SetPublicRepos(value *int32)() { + m.public_repos = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *OrganizationFull) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +func (m *OrganizationFull) SetSecretScanningEnabledForNewRepositories(value *bool)() { + m.secret_scanning_enabled_for_new_repositories = value +} +// SetSecretScanningPushProtectionCustomLink sets the secret_scanning_push_protection_custom_link property value. An optional URL string to display to contributors who are blocked from pushing a secret. +func (m *OrganizationFull) SetSecretScanningPushProtectionCustomLink(value *string)() { + m.secret_scanning_push_protection_custom_link = value +} +// SetSecretScanningPushProtectionCustomLinkEnabled sets the secret_scanning_push_protection_custom_link_enabled property value. Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. +func (m *OrganizationFull) SetSecretScanningPushProtectionCustomLinkEnabled(value *bool)() { + m.secret_scanning_push_protection_custom_link_enabled = value +} +// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +func (m *OrganizationFull) SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() { + m.secret_scanning_push_protection_enabled_for_new_repositories = value +} +// SetSecretScanningValidityChecksEnabled sets the secret_scanning_validity_checks_enabled property value. Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization. +func (m *OrganizationFull) SetSecretScanningValidityChecksEnabled(value *bool)() { + m.secret_scanning_validity_checks_enabled = value +} +// SetTotalPrivateRepos sets the total_private_repos property value. The total_private_repos property +func (m *OrganizationFull) SetTotalPrivateRepos(value *int32)() { + m.total_private_repos = value +} +// SetTwitterUsername sets the twitter_username property value. The twitter_username property +func (m *OrganizationFull) SetTwitterUsername(value *string)() { + m.twitter_username = value +} +// SetTwoFactorRequirementEnabled sets the two_factor_requirement_enabled property value. The two_factor_requirement_enabled property +func (m *OrganizationFull) SetTwoFactorRequirementEnabled(value *bool)() { + m.two_factor_requirement_enabled = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *OrganizationFull) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *OrganizationFull) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *OrganizationFull) SetUrl(value *string)() { + m.url = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *OrganizationFull) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type OrganizationFullable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurityEnabledForNewRepositories()(*bool) + GetArchivedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAvatarUrl()(*string) + GetBillingEmail()(*string) + GetBlog()(*string) + GetCollaborators()(*int32) + GetCompany()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultRepositoryPermission()(*string) + GetDependabotAlertsEnabledForNewRepositories()(*bool) + GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) + GetDependencyGraphEnabledForNewRepositories()(*bool) + GetDescription()(*string) + GetDiskUsage()(*int32) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowers()(*int32) + GetFollowing()(*int32) + GetHasOrganizationProjects()(*bool) + GetHasRepositoryProjects()(*bool) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssuesUrl()(*string) + GetIsVerified()(*bool) + GetLocation()(*string) + GetLogin()(*string) + GetMembersAllowedRepositoryCreationType()(*string) + GetMembersCanCreateInternalRepositories()(*bool) + GetMembersCanCreatePages()(*bool) + GetMembersCanCreatePrivatePages()(*bool) + GetMembersCanCreatePrivateRepositories()(*bool) + GetMembersCanCreatePublicPages()(*bool) + GetMembersCanCreatePublicRepositories()(*bool) + GetMembersCanCreateRepositories()(*bool) + GetMembersCanForkPrivateRepositories()(*bool) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOwnedPrivateRepos()(*int32) + GetPlan()(OrganizationFull_planable) + GetPrivateGists()(*int32) + GetPublicGists()(*int32) + GetPublicMembersUrl()(*string) + GetPublicRepos()(*int32) + GetReposUrl()(*string) + GetSecretScanningEnabledForNewRepositories()(*bool) + GetSecretScanningPushProtectionCustomLink()(*string) + GetSecretScanningPushProtectionCustomLinkEnabled()(*bool) + GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) + GetSecretScanningValidityChecksEnabled()(*bool) + GetTotalPrivateRepos()(*int32) + GetTwitterUsername()(*string) + GetTwoFactorRequirementEnabled()(*bool) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetWebCommitSignoffRequired()(*bool) + SetAdvancedSecurityEnabledForNewRepositories(value *bool)() + SetArchivedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAvatarUrl(value *string)() + SetBillingEmail(value *string)() + SetBlog(value *string)() + SetCollaborators(value *int32)() + SetCompany(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultRepositoryPermission(value *string)() + SetDependabotAlertsEnabledForNewRepositories(value *bool)() + SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() + SetDependencyGraphEnabledForNewRepositories(value *bool)() + SetDescription(value *string)() + SetDiskUsage(value *int32)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowers(value *int32)() + SetFollowing(value *int32)() + SetHasOrganizationProjects(value *bool)() + SetHasRepositoryProjects(value *bool)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssuesUrl(value *string)() + SetIsVerified(value *bool)() + SetLocation(value *string)() + SetLogin(value *string)() + SetMembersAllowedRepositoryCreationType(value *string)() + SetMembersCanCreateInternalRepositories(value *bool)() + SetMembersCanCreatePages(value *bool)() + SetMembersCanCreatePrivatePages(value *bool)() + SetMembersCanCreatePrivateRepositories(value *bool)() + SetMembersCanCreatePublicPages(value *bool)() + SetMembersCanCreatePublicRepositories(value *bool)() + SetMembersCanCreateRepositories(value *bool)() + SetMembersCanForkPrivateRepositories(value *bool)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOwnedPrivateRepos(value *int32)() + SetPlan(value OrganizationFull_planable)() + SetPrivateGists(value *int32)() + SetPublicGists(value *int32)() + SetPublicMembersUrl(value *string)() + SetPublicRepos(value *int32)() + SetReposUrl(value *string)() + SetSecretScanningEnabledForNewRepositories(value *bool)() + SetSecretScanningPushProtectionCustomLink(value *string)() + SetSecretScanningPushProtectionCustomLinkEnabled(value *bool)() + SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() + SetSecretScanningValidityChecksEnabled(value *bool)() + SetTotalPrivateRepos(value *int32)() + SetTwitterUsername(value *string)() + SetTwoFactorRequirementEnabled(value *bool)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/organization_full_plan.go b/pkg/github/models/organization_full_plan.go new file mode 100644 index 0000000..9c81e2a --- /dev/null +++ b/pkg/github/models/organization_full_plan.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationFull_plan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The filled_seats property + filled_seats *int32 + // The name property + name *string + // The private_repos property + private_repos *int32 + // The seats property + seats *int32 + // The space property + space *int32 +} +// NewOrganizationFull_plan instantiates a new OrganizationFull_plan and sets the default values. +func NewOrganizationFull_plan()(*OrganizationFull_plan) { + m := &OrganizationFull_plan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationFull_planFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationFull_planFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationFull_plan(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationFull_plan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationFull_plan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["filled_seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFilledSeats(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateRepos(val) + } + return nil + } + res["seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeats(val) + } + return nil + } + res["space"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSpace(val) + } + return nil + } + return res +} +// GetFilledSeats gets the filled_seats property value. The filled_seats property +// returns a *int32 when successful +func (m *OrganizationFull_plan) GetFilledSeats()(*int32) { + return m.filled_seats +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *OrganizationFull_plan) GetName()(*string) { + return m.name +} +// GetPrivateRepos gets the private_repos property value. The private_repos property +// returns a *int32 when successful +func (m *OrganizationFull_plan) GetPrivateRepos()(*int32) { + return m.private_repos +} +// GetSeats gets the seats property value. The seats property +// returns a *int32 when successful +func (m *OrganizationFull_plan) GetSeats()(*int32) { + return m.seats +} +// GetSpace gets the space property value. The space property +// returns a *int32 when successful +func (m *OrganizationFull_plan) GetSpace()(*int32) { + return m.space +} +// Serialize serializes information the current object +func (m *OrganizationFull_plan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("filled_seats", m.GetFilledSeats()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_repos", m.GetPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("seats", m.GetSeats()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("space", m.GetSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationFull_plan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFilledSeats sets the filled_seats property value. The filled_seats property +func (m *OrganizationFull_plan) SetFilledSeats(value *int32)() { + m.filled_seats = value +} +// SetName sets the name property value. The name property +func (m *OrganizationFull_plan) SetName(value *string)() { + m.name = value +} +// SetPrivateRepos sets the private_repos property value. The private_repos property +func (m *OrganizationFull_plan) SetPrivateRepos(value *int32)() { + m.private_repos = value +} +// SetSeats sets the seats property value. The seats property +func (m *OrganizationFull_plan) SetSeats(value *int32)() { + m.seats = value +} +// SetSpace sets the space property value. The space property +func (m *OrganizationFull_plan) SetSpace(value *int32)() { + m.space = value +} +type OrganizationFull_planable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFilledSeats()(*int32) + GetName()(*string) + GetPrivateRepos()(*int32) + GetSeats()(*int32) + GetSpace()(*int32) + SetFilledSeats(value *int32)() + SetName(value *string)() + SetPrivateRepos(value *int32)() + SetSeats(value *int32)() + SetSpace(value *int32)() +} diff --git a/pkg/github/models/organization_invitation.go b/pkg/github/models/organization_invitation.go new file mode 100644 index 0000000..ba26216 --- /dev/null +++ b/pkg/github/models/organization_invitation.go @@ -0,0 +1,400 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationInvitation organization Invitation +type OrganizationInvitation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The email property + email *string + // The failed_at property + failed_at *string + // The failed_reason property + failed_reason *string + // The id property + id *int64 + // The invitation_source property + invitation_source *string + // The invitation_teams_url property + invitation_teams_url *string + // A GitHub user. + inviter SimpleUserable + // The login property + login *string + // The node_id property + node_id *string + // The role property + role *string + // The team_count property + team_count *int32 +} +// NewOrganizationInvitation instantiates a new OrganizationInvitation and sets the default values. +func NewOrganizationInvitation()(*OrganizationInvitation) { + m := &OrganizationInvitation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationInvitationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationInvitationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationInvitation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationInvitation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *OrganizationInvitation) GetCreatedAt()(*string) { + return m.created_at +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *OrganizationInvitation) GetEmail()(*string) { + return m.email +} +// GetFailedAt gets the failed_at property value. The failed_at property +// returns a *string when successful +func (m *OrganizationInvitation) GetFailedAt()(*string) { + return m.failed_at +} +// GetFailedReason gets the failed_reason property value. The failed_reason property +// returns a *string when successful +func (m *OrganizationInvitation) GetFailedReason()(*string) { + return m.failed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationInvitation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["failed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailedAt(val) + } + return nil + } + res["failed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailedReason(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["invitation_source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitationSource(val) + } + return nil + } + res["invitation_teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitationTeamsUrl(val) + } + return nil + } + res["inviter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInviter(val.(SimpleUserable)) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["team_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamCount(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *OrganizationInvitation) GetId()(*int64) { + return m.id +} +// GetInvitationSource gets the invitation_source property value. The invitation_source property +// returns a *string when successful +func (m *OrganizationInvitation) GetInvitationSource()(*string) { + return m.invitation_source +} +// GetInvitationTeamsUrl gets the invitation_teams_url property value. The invitation_teams_url property +// returns a *string when successful +func (m *OrganizationInvitation) GetInvitationTeamsUrl()(*string) { + return m.invitation_teams_url +} +// GetInviter gets the inviter property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *OrganizationInvitation) GetInviter()(SimpleUserable) { + return m.inviter +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *OrganizationInvitation) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *OrganizationInvitation) GetNodeId()(*string) { + return m.node_id +} +// GetRole gets the role property value. The role property +// returns a *string when successful +func (m *OrganizationInvitation) GetRole()(*string) { + return m.role +} +// GetTeamCount gets the team_count property value. The team_count property +// returns a *int32 when successful +func (m *OrganizationInvitation) GetTeamCount()(*int32) { + return m.team_count +} +// Serialize serializes information the current object +func (m *OrganizationInvitation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failed_at", m.GetFailedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failed_reason", m.GetFailedReason()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("invitation_source", m.GetInvitationSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("invitation_teams_url", m.GetInvitationTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("inviter", m.GetInviter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("team_count", m.GetTeamCount()) + 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 *OrganizationInvitation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *OrganizationInvitation) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEmail sets the email property value. The email property +func (m *OrganizationInvitation) SetEmail(value *string)() { + m.email = value +} +// SetFailedAt sets the failed_at property value. The failed_at property +func (m *OrganizationInvitation) SetFailedAt(value *string)() { + m.failed_at = value +} +// SetFailedReason sets the failed_reason property value. The failed_reason property +func (m *OrganizationInvitation) SetFailedReason(value *string)() { + m.failed_reason = value +} +// SetId sets the id property value. The id property +func (m *OrganizationInvitation) SetId(value *int64)() { + m.id = value +} +// SetInvitationSource sets the invitation_source property value. The invitation_source property +func (m *OrganizationInvitation) SetInvitationSource(value *string)() { + m.invitation_source = value +} +// SetInvitationTeamsUrl sets the invitation_teams_url property value. The invitation_teams_url property +func (m *OrganizationInvitation) SetInvitationTeamsUrl(value *string)() { + m.invitation_teams_url = value +} +// SetInviter sets the inviter property value. A GitHub user. +func (m *OrganizationInvitation) SetInviter(value SimpleUserable)() { + m.inviter = value +} +// SetLogin sets the login property value. The login property +func (m *OrganizationInvitation) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *OrganizationInvitation) SetNodeId(value *string)() { + m.node_id = value +} +// SetRole sets the role property value. The role property +func (m *OrganizationInvitation) SetRole(value *string)() { + m.role = value +} +// SetTeamCount sets the team_count property value. The team_count property +func (m *OrganizationInvitation) SetTeamCount(value *int32)() { + m.team_count = value +} +type OrganizationInvitationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetEmail()(*string) + GetFailedAt()(*string) + GetFailedReason()(*string) + GetId()(*int64) + GetInvitationSource()(*string) + GetInvitationTeamsUrl()(*string) + GetInviter()(SimpleUserable) + GetLogin()(*string) + GetNodeId()(*string) + GetRole()(*string) + GetTeamCount()(*int32) + SetCreatedAt(value *string)() + SetEmail(value *string)() + SetFailedAt(value *string)() + SetFailedReason(value *string)() + SetId(value *int64)() + SetInvitationSource(value *string)() + SetInvitationTeamsUrl(value *string)() + SetInviter(value SimpleUserable)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetRole(value *string)() + SetTeamCount(value *int32)() +} diff --git a/pkg/github/models/organization_plan.go b/pkg/github/models/organization_plan.go new file mode 100644 index 0000000..3e37d4b --- /dev/null +++ b/pkg/github/models/organization_plan.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Organization_plan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The filled_seats property + filled_seats *int32 + // The name property + name *string + // The private_repos property + private_repos *int32 + // The seats property + seats *int32 + // The space property + space *int32 +} +// NewOrganization_plan instantiates a new Organization_plan and sets the default values. +func NewOrganization_plan()(*Organization_plan) { + m := &Organization_plan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganization_planFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganization_planFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganization_plan(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Organization_plan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Organization_plan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["filled_seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFilledSeats(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateRepos(val) + } + return nil + } + res["seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeats(val) + } + return nil + } + res["space"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSpace(val) + } + return nil + } + return res +} +// GetFilledSeats gets the filled_seats property value. The filled_seats property +// returns a *int32 when successful +func (m *Organization_plan) GetFilledSeats()(*int32) { + return m.filled_seats +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Organization_plan) GetName()(*string) { + return m.name +} +// GetPrivateRepos gets the private_repos property value. The private_repos property +// returns a *int32 when successful +func (m *Organization_plan) GetPrivateRepos()(*int32) { + return m.private_repos +} +// GetSeats gets the seats property value. The seats property +// returns a *int32 when successful +func (m *Organization_plan) GetSeats()(*int32) { + return m.seats +} +// GetSpace gets the space property value. The space property +// returns a *int32 when successful +func (m *Organization_plan) GetSpace()(*int32) { + return m.space +} +// Serialize serializes information the current object +func (m *Organization_plan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("filled_seats", m.GetFilledSeats()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_repos", m.GetPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("seats", m.GetSeats()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("space", m.GetSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Organization_plan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFilledSeats sets the filled_seats property value. The filled_seats property +func (m *Organization_plan) SetFilledSeats(value *int32)() { + m.filled_seats = value +} +// SetName sets the name property value. The name property +func (m *Organization_plan) SetName(value *string)() { + m.name = value +} +// SetPrivateRepos sets the private_repos property value. The private_repos property +func (m *Organization_plan) SetPrivateRepos(value *int32)() { + m.private_repos = value +} +// SetSeats sets the seats property value. The seats property +func (m *Organization_plan) SetSeats(value *int32)() { + m.seats = value +} +// SetSpace sets the space property value. The space property +func (m *Organization_plan) SetSpace(value *int32)() { + m.space = value +} +type Organization_planable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFilledSeats()(*int32) + GetName()(*string) + GetPrivateRepos()(*int32) + GetSeats()(*int32) + GetSpace()(*int32) + SetFilledSeats(value *int32)() + SetName(value *string)() + SetPrivateRepos(value *int32)() + SetSeats(value *int32)() + SetSpace(value *int32)() +} diff --git a/pkg/github/models/organization_programmatic_access_grant.go b/pkg/github/models/organization_programmatic_access_grant.go new file mode 100644 index 0000000..a2da9c6 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant.go @@ -0,0 +1,314 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationProgrammaticAccessGrant minimal representation of an organization programmatic access grant for enumerations +type OrganizationProgrammaticAccessGrant struct { + // Date and time when the fine-grained personal access token was approved to access the organization. + access_granted_at *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. + id *int32 + // A GitHub user. + owner SimpleUserable + // Permissions requested, categorized by type of permission. + permissions OrganizationProgrammaticAccessGrant_permissionsable + // URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`. + repositories_url *string + // Type of repository selection requested. + repository_selection *OrganizationProgrammaticAccessGrant_repository_selection + // Whether the associated fine-grained personal access token has expired. + token_expired *bool + // Date and time when the associated fine-grained personal access token expires. + token_expires_at *string + // Date and time when the associated fine-grained personal access token was last used for authentication. + token_last_used_at *string +} +// NewOrganizationProgrammaticAccessGrant instantiates a new OrganizationProgrammaticAccessGrant and sets the default values. +func NewOrganizationProgrammaticAccessGrant()(*OrganizationProgrammaticAccessGrant) { + m := &OrganizationProgrammaticAccessGrant{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrant(), nil +} +// GetAccessGrantedAt gets the access_granted_at property value. Date and time when the fine-grained personal access token was approved to access the organization. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrant) GetAccessGrantedAt()(*string) { + return m.access_granted_at +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrant) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_granted_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessGrantedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrant_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(OrganizationProgrammaticAccessGrant_permissionsable)) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationProgrammaticAccessGrant_repository_selection) + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val.(*OrganizationProgrammaticAccessGrant_repository_selection)) + } + return nil + } + res["token_expired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpired(val) + } + return nil + } + res["token_expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpiresAt(val) + } + return nil + } + res["token_last_used_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenLastUsedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. +// returns a *int32 when successful +func (m *OrganizationProgrammaticAccessGrant) GetId()(*int32) { + return m.id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *OrganizationProgrammaticAccessGrant) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. Permissions requested, categorized by type of permission. +// returns a OrganizationProgrammaticAccessGrant_permissionsable when successful +func (m *OrganizationProgrammaticAccessGrant) GetPermissions()(OrganizationProgrammaticAccessGrant_permissionsable) { + return m.permissions +} +// GetRepositoriesUrl gets the repositories_url property value. URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrant) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetRepositorySelection gets the repository_selection property value. Type of repository selection requested. +// returns a *OrganizationProgrammaticAccessGrant_repository_selection when successful +func (m *OrganizationProgrammaticAccessGrant) GetRepositorySelection()(*OrganizationProgrammaticAccessGrant_repository_selection) { + return m.repository_selection +} +// GetTokenExpired gets the token_expired property value. Whether the associated fine-grained personal access token has expired. +// returns a *bool when successful +func (m *OrganizationProgrammaticAccessGrant) GetTokenExpired()(*bool) { + return m.token_expired +} +// GetTokenExpiresAt gets the token_expires_at property value. Date and time when the associated fine-grained personal access token expires. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrant) GetTokenExpiresAt()(*string) { + return m.token_expires_at +} +// GetTokenLastUsedAt gets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrant) GetTokenLastUsedAt()(*string) { + return m.token_last_used_at +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("access_granted_at", m.GetAccessGrantedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + if m.GetRepositorySelection() != nil { + cast := (*m.GetRepositorySelection()).String() + err := writer.WriteStringValue("repository_selection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("token_expired", m.GetTokenExpired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_expires_at", m.GetTokenExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_last_used_at", m.GetTokenLastUsedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessGrantedAt sets the access_granted_at property value. Date and time when the fine-grained personal access token was approved to access the organization. +func (m *OrganizationProgrammaticAccessGrant) SetAccessGrantedAt(value *string)() { + m.access_granted_at = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrant) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. +func (m *OrganizationProgrammaticAccessGrant) SetId(value *int32)() { + m.id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *OrganizationProgrammaticAccessGrant) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. Permissions requested, categorized by type of permission. +func (m *OrganizationProgrammaticAccessGrant) SetPermissions(value OrganizationProgrammaticAccessGrant_permissionsable)() { + m.permissions = value +} +// SetRepositoriesUrl sets the repositories_url property value. URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`. +func (m *OrganizationProgrammaticAccessGrant) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetRepositorySelection sets the repository_selection property value. Type of repository selection requested. +func (m *OrganizationProgrammaticAccessGrant) SetRepositorySelection(value *OrganizationProgrammaticAccessGrant_repository_selection)() { + m.repository_selection = value +} +// SetTokenExpired sets the token_expired property value. Whether the associated fine-grained personal access token has expired. +func (m *OrganizationProgrammaticAccessGrant) SetTokenExpired(value *bool)() { + m.token_expired = value +} +// SetTokenExpiresAt sets the token_expires_at property value. Date and time when the associated fine-grained personal access token expires. +func (m *OrganizationProgrammaticAccessGrant) SetTokenExpiresAt(value *string)() { + m.token_expires_at = value +} +// SetTokenLastUsedAt sets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. +func (m *OrganizationProgrammaticAccessGrant) SetTokenLastUsedAt(value *string)() { + m.token_last_used_at = value +} +type OrganizationProgrammaticAccessGrantable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessGrantedAt()(*string) + GetId()(*int32) + GetOwner()(SimpleUserable) + GetPermissions()(OrganizationProgrammaticAccessGrant_permissionsable) + GetRepositoriesUrl()(*string) + GetRepositorySelection()(*OrganizationProgrammaticAccessGrant_repository_selection) + GetTokenExpired()(*bool) + GetTokenExpiresAt()(*string) + GetTokenLastUsedAt()(*string) + SetAccessGrantedAt(value *string)() + SetId(value *int32)() + SetOwner(value SimpleUserable)() + SetPermissions(value OrganizationProgrammaticAccessGrant_permissionsable)() + SetRepositoriesUrl(value *string)() + SetRepositorySelection(value *OrganizationProgrammaticAccessGrant_repository_selection)() + SetTokenExpired(value *bool)() + SetTokenExpiresAt(value *string)() + SetTokenLastUsedAt(value *string)() +} diff --git a/pkg/github/models/organization_programmatic_access_grant_permissions.go b/pkg/github/models/organization_programmatic_access_grant_permissions.go new file mode 100644 index 0000000..14b93bf --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_permissions.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationProgrammaticAccessGrant_permissions permissions requested, categorized by type of permission. +type OrganizationProgrammaticAccessGrant_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The organization property + organization OrganizationProgrammaticAccessGrant_permissions_organizationable + // The other property + other OrganizationProgrammaticAccessGrant_permissions_otherable + // The repository property + repository OrganizationProgrammaticAccessGrant_permissions_repositoryable +} +// NewOrganizationProgrammaticAccessGrant_permissions instantiates a new OrganizationProgrammaticAccessGrant_permissions and sets the default values. +func NewOrganizationProgrammaticAccessGrant_permissions()(*OrganizationProgrammaticAccessGrant_permissions) { + m := &OrganizationProgrammaticAccessGrant_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrant_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrant_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrant_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrant_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrant_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrant_permissions_organizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(OrganizationProgrammaticAccessGrant_permissions_organizationable)) + } + return nil + } + res["other"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrant_permissions_otherFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOther(val.(OrganizationProgrammaticAccessGrant_permissions_otherable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrant_permissions_repositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(OrganizationProgrammaticAccessGrant_permissions_repositoryable)) + } + return nil + } + return res +} +// GetOrganization gets the organization property value. The organization property +// returns a OrganizationProgrammaticAccessGrant_permissions_organizationable when successful +func (m *OrganizationProgrammaticAccessGrant_permissions) GetOrganization()(OrganizationProgrammaticAccessGrant_permissions_organizationable) { + return m.organization +} +// GetOther gets the other property value. The other property +// returns a OrganizationProgrammaticAccessGrant_permissions_otherable when successful +func (m *OrganizationProgrammaticAccessGrant_permissions) GetOther()(OrganizationProgrammaticAccessGrant_permissions_otherable) { + return m.other +} +// GetRepository gets the repository property value. The repository property +// returns a OrganizationProgrammaticAccessGrant_permissions_repositoryable when successful +func (m *OrganizationProgrammaticAccessGrant_permissions) GetRepository()(OrganizationProgrammaticAccessGrant_permissions_repositoryable) { + return m.repository +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrant_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("other", m.GetOther()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + 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 *OrganizationProgrammaticAccessGrant_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOrganization sets the organization property value. The organization property +func (m *OrganizationProgrammaticAccessGrant_permissions) SetOrganization(value OrganizationProgrammaticAccessGrant_permissions_organizationable)() { + m.organization = value +} +// SetOther sets the other property value. The other property +func (m *OrganizationProgrammaticAccessGrant_permissions) SetOther(value OrganizationProgrammaticAccessGrant_permissions_otherable)() { + m.other = value +} +// SetRepository sets the repository property value. The repository property +func (m *OrganizationProgrammaticAccessGrant_permissions) SetRepository(value OrganizationProgrammaticAccessGrant_permissions_repositoryable)() { + m.repository = value +} +type OrganizationProgrammaticAccessGrant_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganization()(OrganizationProgrammaticAccessGrant_permissions_organizationable) + GetOther()(OrganizationProgrammaticAccessGrant_permissions_otherable) + GetRepository()(OrganizationProgrammaticAccessGrant_permissions_repositoryable) + SetOrganization(value OrganizationProgrammaticAccessGrant_permissions_organizationable)() + SetOther(value OrganizationProgrammaticAccessGrant_permissions_otherable)() + SetRepository(value OrganizationProgrammaticAccessGrant_permissions_repositoryable)() +} diff --git a/pkg/github/models/organization_programmatic_access_grant_permissions_organization.go b/pkg/github/models/organization_programmatic_access_grant_permissions_organization.go new file mode 100644 index 0000000..10594a3 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_permissions_organization.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationProgrammaticAccessGrant_permissions_organization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrganizationProgrammaticAccessGrant_permissions_organization instantiates a new OrganizationProgrammaticAccessGrant_permissions_organization and sets the default values. +func NewOrganizationProgrammaticAccessGrant_permissions_organization()(*OrganizationProgrammaticAccessGrant_permissions_organization) { + m := &OrganizationProgrammaticAccessGrant_permissions_organization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrant_permissions_organizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrant_permissions_organizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrant_permissions_organization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrant_permissions_organization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrant_permissions_organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrant_permissions_organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrant_permissions_organization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrganizationProgrammaticAccessGrant_permissions_organizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization_programmatic_access_grant_permissions_other.go b/pkg/github/models/organization_programmatic_access_grant_permissions_other.go new file mode 100644 index 0000000..1fad3c8 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_permissions_other.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationProgrammaticAccessGrant_permissions_other struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrganizationProgrammaticAccessGrant_permissions_other instantiates a new OrganizationProgrammaticAccessGrant_permissions_other and sets the default values. +func NewOrganizationProgrammaticAccessGrant_permissions_other()(*OrganizationProgrammaticAccessGrant_permissions_other) { + m := &OrganizationProgrammaticAccessGrant_permissions_other{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrant_permissions_otherFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrant_permissions_otherFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrant_permissions_other(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrant_permissions_other) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrant_permissions_other) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrant_permissions_other) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrant_permissions_other) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrganizationProgrammaticAccessGrant_permissions_otherable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization_programmatic_access_grant_permissions_repository.go b/pkg/github/models/organization_programmatic_access_grant_permissions_repository.go new file mode 100644 index 0000000..5154674 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_permissions_repository.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationProgrammaticAccessGrant_permissions_repository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrganizationProgrammaticAccessGrant_permissions_repository instantiates a new OrganizationProgrammaticAccessGrant_permissions_repository and sets the default values. +func NewOrganizationProgrammaticAccessGrant_permissions_repository()(*OrganizationProgrammaticAccessGrant_permissions_repository) { + m := &OrganizationProgrammaticAccessGrant_permissions_repository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrant_permissions_repositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrant_permissions_repositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrant_permissions_repository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrant_permissions_repository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrant_permissions_repository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrant_permissions_repository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrant_permissions_repository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrganizationProgrammaticAccessGrant_permissions_repositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization_programmatic_access_grant_repository_selection.go b/pkg/github/models/organization_programmatic_access_grant_repository_selection.go new file mode 100644 index 0000000..f77c53f --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_repository_selection.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Type of repository selection requested. +type OrganizationProgrammaticAccessGrant_repository_selection int + +const ( + NONE_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION OrganizationProgrammaticAccessGrant_repository_selection = iota + ALL_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION + SUBSET_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION +) + +func (i OrganizationProgrammaticAccessGrant_repository_selection) String() string { + return []string{"none", "all", "subset"}[i] +} +func ParseOrganizationProgrammaticAccessGrant_repository_selection(v string) (any, error) { + result := NONE_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION + switch v { + case "none": + result = NONE_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION + case "all": + result = ALL_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION + case "subset": + result = SUBSET_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION + default: + return 0, errors.New("Unknown OrganizationProgrammaticAccessGrant_repository_selection value: " + v) + } + return &result, nil +} +func SerializeOrganizationProgrammaticAccessGrant_repository_selection(values []OrganizationProgrammaticAccessGrant_repository_selection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationProgrammaticAccessGrant_repository_selection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_programmatic_access_grant_request.go b/pkg/github/models/organization_programmatic_access_grant_request.go new file mode 100644 index 0000000..c3b0e28 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_request.go @@ -0,0 +1,343 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationProgrammaticAccessGrantRequest minimal representation of an organization programmatic access grant request for enumerations +type OrganizationProgrammaticAccessGrantRequest struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Date and time when the request for access was created. + created_at *string + // Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. + id *int32 + // A GitHub user. + owner SimpleUserable + // Permissions requested, categorized by type of permission. + permissions OrganizationProgrammaticAccessGrantRequest_permissionsable + // Reason for requesting access. + reason *string + // URL to the list of repositories requested to be accessed via fine-grained personal access token. Should only be followed when `repository_selection` is `subset`. + repositories_url *string + // Type of repository selection requested. + repository_selection *OrganizationProgrammaticAccessGrantRequest_repository_selection + // Whether the associated fine-grained personal access token has expired. + token_expired *bool + // Date and time when the associated fine-grained personal access token expires. + token_expires_at *string + // Date and time when the associated fine-grained personal access token was last used for authentication. + token_last_used_at *string +} +// NewOrganizationProgrammaticAccessGrantRequest instantiates a new OrganizationProgrammaticAccessGrantRequest and sets the default values. +func NewOrganizationProgrammaticAccessGrantRequest()(*OrganizationProgrammaticAccessGrantRequest) { + m := &OrganizationProgrammaticAccessGrantRequest{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrantRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrantRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrantRequest(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. Date and time when the request for access was created. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrantRequest_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(OrganizationProgrammaticAccessGrantRequest_permissionsable)) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationProgrammaticAccessGrantRequest_repository_selection) + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val.(*OrganizationProgrammaticAccessGrantRequest_repository_selection)) + } + return nil + } + res["token_expired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpired(val) + } + return nil + } + res["token_expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpiresAt(val) + } + return nil + } + res["token_last_used_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenLastUsedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. +// returns a *int32 when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetId()(*int32) { + return m.id +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. Permissions requested, categorized by type of permission. +// returns a OrganizationProgrammaticAccessGrantRequest_permissionsable when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetPermissions()(OrganizationProgrammaticAccessGrantRequest_permissionsable) { + return m.permissions +} +// GetReason gets the reason property value. Reason for requesting access. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetReason()(*string) { + return m.reason +} +// GetRepositoriesUrl gets the repositories_url property value. URL to the list of repositories requested to be accessed via fine-grained personal access token. Should only be followed when `repository_selection` is `subset`. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetRepositorySelection gets the repository_selection property value. Type of repository selection requested. +// returns a *OrganizationProgrammaticAccessGrantRequest_repository_selection when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetRepositorySelection()(*OrganizationProgrammaticAccessGrantRequest_repository_selection) { + return m.repository_selection +} +// GetTokenExpired gets the token_expired property value. Whether the associated fine-grained personal access token has expired. +// returns a *bool when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenExpired()(*bool) { + return m.token_expired +} +// GetTokenExpiresAt gets the token_expires_at property value. Date and time when the associated fine-grained personal access token expires. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenExpiresAt()(*string) { + return m.token_expires_at +} +// GetTokenLastUsedAt gets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenLastUsedAt()(*string) { + return m.token_last_used_at +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + if m.GetRepositorySelection() != nil { + cast := (*m.GetRepositorySelection()).String() + err := writer.WriteStringValue("repository_selection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("token_expired", m.GetTokenExpired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_expires_at", m.GetTokenExpiresAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_last_used_at", m.GetTokenLastUsedAt()) + 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 *OrganizationProgrammaticAccessGrantRequest) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. Date and time when the request for access was created. +func (m *OrganizationProgrammaticAccessGrantRequest) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetId sets the id property value. Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. +func (m *OrganizationProgrammaticAccessGrantRequest) SetId(value *int32)() { + m.id = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *OrganizationProgrammaticAccessGrantRequest) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. Permissions requested, categorized by type of permission. +func (m *OrganizationProgrammaticAccessGrantRequest) SetPermissions(value OrganizationProgrammaticAccessGrantRequest_permissionsable)() { + m.permissions = value +} +// SetReason sets the reason property value. Reason for requesting access. +func (m *OrganizationProgrammaticAccessGrantRequest) SetReason(value *string)() { + m.reason = value +} +// SetRepositoriesUrl sets the repositories_url property value. URL to the list of repositories requested to be accessed via fine-grained personal access token. Should only be followed when `repository_selection` is `subset`. +func (m *OrganizationProgrammaticAccessGrantRequest) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetRepositorySelection sets the repository_selection property value. Type of repository selection requested. +func (m *OrganizationProgrammaticAccessGrantRequest) SetRepositorySelection(value *OrganizationProgrammaticAccessGrantRequest_repository_selection)() { + m.repository_selection = value +} +// SetTokenExpired sets the token_expired property value. Whether the associated fine-grained personal access token has expired. +func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenExpired(value *bool)() { + m.token_expired = value +} +// SetTokenExpiresAt sets the token_expires_at property value. Date and time when the associated fine-grained personal access token expires. +func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenExpiresAt(value *string)() { + m.token_expires_at = value +} +// SetTokenLastUsedAt sets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. +func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenLastUsedAt(value *string)() { + m.token_last_used_at = value +} +type OrganizationProgrammaticAccessGrantRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetId()(*int32) + GetOwner()(SimpleUserable) + GetPermissions()(OrganizationProgrammaticAccessGrantRequest_permissionsable) + GetReason()(*string) + GetRepositoriesUrl()(*string) + GetRepositorySelection()(*OrganizationProgrammaticAccessGrantRequest_repository_selection) + GetTokenExpired()(*bool) + GetTokenExpiresAt()(*string) + GetTokenLastUsedAt()(*string) + SetCreatedAt(value *string)() + SetId(value *int32)() + SetOwner(value SimpleUserable)() + SetPermissions(value OrganizationProgrammaticAccessGrantRequest_permissionsable)() + SetReason(value *string)() + SetRepositoriesUrl(value *string)() + SetRepositorySelection(value *OrganizationProgrammaticAccessGrantRequest_repository_selection)() + SetTokenExpired(value *bool)() + SetTokenExpiresAt(value *string)() + SetTokenLastUsedAt(value *string)() +} diff --git a/pkg/github/models/organization_programmatic_access_grant_request_permissions.go b/pkg/github/models/organization_programmatic_access_grant_request_permissions.go new file mode 100644 index 0000000..25ae983 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_request_permissions.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationProgrammaticAccessGrantRequest_permissions permissions requested, categorized by type of permission. +type OrganizationProgrammaticAccessGrantRequest_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The organization property + organization OrganizationProgrammaticAccessGrantRequest_permissions_organizationable + // The other property + other OrganizationProgrammaticAccessGrantRequest_permissions_otherable + // The repository property + repository OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable +} +// NewOrganizationProgrammaticAccessGrantRequest_permissions instantiates a new OrganizationProgrammaticAccessGrantRequest_permissions and sets the default values. +func NewOrganizationProgrammaticAccessGrantRequest_permissions()(*OrganizationProgrammaticAccessGrantRequest_permissions) { + m := &OrganizationProgrammaticAccessGrantRequest_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrantRequest_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrantRequest_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrantRequest_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrantRequest_permissions_organizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(OrganizationProgrammaticAccessGrantRequest_permissions_organizationable)) + } + return nil + } + res["other"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrantRequest_permissions_otherFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOther(val.(OrganizationProgrammaticAccessGrantRequest_permissions_otherable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationProgrammaticAccessGrantRequest_permissions_repositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable)) + } + return nil + } + return res +} +// GetOrganization gets the organization property value. The organization property +// returns a OrganizationProgrammaticAccessGrantRequest_permissions_organizationable when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) GetOrganization()(OrganizationProgrammaticAccessGrantRequest_permissions_organizationable) { + return m.organization +} +// GetOther gets the other property value. The other property +// returns a OrganizationProgrammaticAccessGrantRequest_permissions_otherable when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) GetOther()(OrganizationProgrammaticAccessGrantRequest_permissions_otherable) { + return m.other +} +// GetRepository gets the repository property value. The repository property +// returns a OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) GetRepository()(OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable) { + return m.repository +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("other", m.GetOther()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + 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 *OrganizationProgrammaticAccessGrantRequest_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOrganization sets the organization property value. The organization property +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) SetOrganization(value OrganizationProgrammaticAccessGrantRequest_permissions_organizationable)() { + m.organization = value +} +// SetOther sets the other property value. The other property +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) SetOther(value OrganizationProgrammaticAccessGrantRequest_permissions_otherable)() { + m.other = value +} +// SetRepository sets the repository property value. The repository property +func (m *OrganizationProgrammaticAccessGrantRequest_permissions) SetRepository(value OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable)() { + m.repository = value +} +type OrganizationProgrammaticAccessGrantRequest_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganization()(OrganizationProgrammaticAccessGrantRequest_permissions_organizationable) + GetOther()(OrganizationProgrammaticAccessGrantRequest_permissions_otherable) + GetRepository()(OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable) + SetOrganization(value OrganizationProgrammaticAccessGrantRequest_permissions_organizationable)() + SetOther(value OrganizationProgrammaticAccessGrantRequest_permissions_otherable)() + SetRepository(value OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable)() +} diff --git a/pkg/github/models/organization_programmatic_access_grant_request_permissions_organization.go b/pkg/github/models/organization_programmatic_access_grant_request_permissions_organization.go new file mode 100644 index 0000000..7cfcc16 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_request_permissions_organization.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationProgrammaticAccessGrantRequest_permissions_organization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrganizationProgrammaticAccessGrantRequest_permissions_organization instantiates a new OrganizationProgrammaticAccessGrantRequest_permissions_organization and sets the default values. +func NewOrganizationProgrammaticAccessGrantRequest_permissions_organization()(*OrganizationProgrammaticAccessGrantRequest_permissions_organization) { + m := &OrganizationProgrammaticAccessGrantRequest_permissions_organization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrantRequest_permissions_organizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrantRequest_permissions_organizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrantRequest_permissions_organization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_organization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_organization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrganizationProgrammaticAccessGrantRequest_permissions_organizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization_programmatic_access_grant_request_permissions_other.go b/pkg/github/models/organization_programmatic_access_grant_request_permissions_other.go new file mode 100644 index 0000000..69c85d9 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_request_permissions_other.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationProgrammaticAccessGrantRequest_permissions_other struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrganizationProgrammaticAccessGrantRequest_permissions_other instantiates a new OrganizationProgrammaticAccessGrantRequest_permissions_other and sets the default values. +func NewOrganizationProgrammaticAccessGrantRequest_permissions_other()(*OrganizationProgrammaticAccessGrantRequest_permissions_other) { + m := &OrganizationProgrammaticAccessGrantRequest_permissions_other{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrantRequest_permissions_otherFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrantRequest_permissions_otherFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrantRequest_permissions_other(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_other) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_other) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_other) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_other) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrganizationProgrammaticAccessGrantRequest_permissions_otherable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization_programmatic_access_grant_request_permissions_repository.go b/pkg/github/models/organization_programmatic_access_grant_request_permissions_repository.go new file mode 100644 index 0000000..46d78df --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_request_permissions_repository.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationProgrammaticAccessGrantRequest_permissions_repository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewOrganizationProgrammaticAccessGrantRequest_permissions_repository instantiates a new OrganizationProgrammaticAccessGrantRequest_permissions_repository and sets the default values. +func NewOrganizationProgrammaticAccessGrantRequest_permissions_repository()(*OrganizationProgrammaticAccessGrantRequest_permissions_repository) { + m := &OrganizationProgrammaticAccessGrantRequest_permissions_repository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationProgrammaticAccessGrantRequest_permissions_repositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationProgrammaticAccessGrantRequest_permissions_repositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationProgrammaticAccessGrantRequest_permissions_repository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_repository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_repository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_repository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationProgrammaticAccessGrantRequest_permissions_repository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type OrganizationProgrammaticAccessGrantRequest_permissions_repositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go b/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go new file mode 100644 index 0000000..50a6b21 --- /dev/null +++ b/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Type of repository selection requested. +type OrganizationProgrammaticAccessGrantRequest_repository_selection int + +const ( + NONE_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION OrganizationProgrammaticAccessGrantRequest_repository_selection = iota + ALL_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION + SUBSET_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION +) + +func (i OrganizationProgrammaticAccessGrantRequest_repository_selection) String() string { + return []string{"none", "all", "subset"}[i] +} +func ParseOrganizationProgrammaticAccessGrantRequest_repository_selection(v string) (any, error) { + result := NONE_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION + switch v { + case "none": + result = NONE_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION + case "all": + result = ALL_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION + case "subset": + result = SUBSET_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION + default: + return 0, errors.New("Unknown OrganizationProgrammaticAccessGrantRequest_repository_selection value: " + v) + } + return &result, nil +} +func SerializeOrganizationProgrammaticAccessGrantRequest_repository_selection(values []OrganizationProgrammaticAccessGrantRequest_repository_selection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationProgrammaticAccessGrantRequest_repository_selection) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_role.go b/pkg/github/models/organization_role.go new file mode 100644 index 0000000..db45a28 --- /dev/null +++ b/pkg/github/models/organization_role.go @@ -0,0 +1,262 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationRole organization roles +type OrganizationRole struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time the role was created. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A short description about who this role is for or what permissions it grants. + description *string + // The unique identifier of the role. + id *int64 + // The name of the role. + name *string + // A GitHub user. + organization NullableSimpleUserable + // A list of permissions included in this role. + permissions []string + // The date and time the role was last updated. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOrganizationRole instantiates a new OrganizationRole and sets the default values. +func NewOrganizationRole()(*OrganizationRole) { + m := &OrganizationRole{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationRole(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationRole) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The date and time the role was created. +// returns a *Time when successful +func (m *OrganizationRole) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. A short description about who this role is for or what permissions it grants. +// returns a *string when successful +func (m *OrganizationRole) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(NullableSimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the role. +// returns a *int64 when successful +func (m *OrganizationRole) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name of the role. +// returns a *string when successful +func (m *OrganizationRole) GetName()(*string) { + return m.name +} +// GetOrganization gets the organization property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *OrganizationRole) GetOrganization()(NullableSimpleUserable) { + return m.organization +} +// GetPermissions gets the permissions property value. A list of permissions included in this role. +// returns a []string when successful +func (m *OrganizationRole) GetPermissions()([]string) { + return m.permissions +} +// GetUpdatedAt gets the updated_at property value. The date and time the role was last updated. +// returns a *Time when successful +func (m *OrganizationRole) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationRole) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The date and time the role was created. +func (m *OrganizationRole) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. A short description about who this role is for or what permissions it grants. +func (m *OrganizationRole) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The unique identifier of the role. +func (m *OrganizationRole) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name of the role. +func (m *OrganizationRole) SetName(value *string)() { + m.name = value +} +// SetOrganization sets the organization property value. A GitHub user. +func (m *OrganizationRole) SetOrganization(value NullableSimpleUserable)() { + m.organization = value +} +// SetPermissions sets the permissions property value. A list of permissions included in this role. +func (m *OrganizationRole) SetPermissions(value []string)() { + m.permissions = value +} +// SetUpdatedAt sets the updated_at property value. The date and time the role was last updated. +func (m *OrganizationRole) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type OrganizationRoleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetId()(*int64) + GetName()(*string) + GetOrganization()(NullableSimpleUserable) + GetPermissions()([]string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetId(value *int64)() + SetName(value *string)() + SetOrganization(value NullableSimpleUserable)() + SetPermissions(value []string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/organization_secret_scanning_alert.go b/pkg/github/models/organization_secret_scanning_alert.go new file mode 100644 index 0000000..975a40c --- /dev/null +++ b/pkg/github/models/organization_secret_scanning_alert.go @@ -0,0 +1,576 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OrganizationSecretScanningAlert struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The REST API URL of the code locations for this alert. + locations_url *string + // The security alert number. + number *int32 + // Whether push protection was bypassed for the detected secret. + push_protection_bypassed *bool + // The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + push_protection_bypassed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + push_protection_bypassed_by NullableSimpleUserable + // A GitHub repository. + repository SimpleRepositoryable + // **Required when the `state` is `resolved`.** The reason for resolving the alert. + resolution *SecretScanningAlertResolution + // The comment that was optionally added when this alert was closed + resolution_comment *string + // The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + resolved_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + resolved_by NullableSimpleUserable + // The secret that was detected. + secret *string + // The type of secret that secret scanning detected. + secret_type *string + // User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + secret_type_display_name *string + // Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + state *SecretScanningAlertState + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string + // The token status as of the latest validity check. + validity *OrganizationSecretScanningAlert_validity +} +// NewOrganizationSecretScanningAlert instantiates a new OrganizationSecretScanningAlert and sets the default values. +func NewOrganizationSecretScanningAlert()(*OrganizationSecretScanningAlert) { + m := &OrganizationSecretScanningAlert{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationSecretScanningAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationSecretScanningAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationSecretScanningAlert(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationSecretScanningAlert) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *OrganizationSecretScanningAlert) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationSecretScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["locations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationsUrl(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["push_protection_bypassed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassed(val) + } + return nil + } + res["push_protection_bypassed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassedAt(val) + } + return nil + } + res["push_protection_bypassed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleRepositoryable)) + } + return nil + } + res["resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningAlertResolution) + if err != nil { + return err + } + if val != nil { + m.SetResolution(val.(*SecretScanningAlertResolution)) + } + return nil + } + res["resolution_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResolutionComment(val) + } + return nil + } + res["resolved_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetResolvedAt(val) + } + return nil + } + res["resolved_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResolvedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["secret_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretType(val) + } + return nil + } + res["secret_type_display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretTypeDisplayName(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*SecretScanningAlertState)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["validity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationSecretScanningAlert_validity) + if err != nil { + return err + } + if val != nil { + m.SetValidity(val.(*OrganizationSecretScanningAlert_validity)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLocationsUrl gets the locations_url property value. The REST API URL of the code locations for this alert. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetLocationsUrl()(*string) { + return m.locations_url +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *OrganizationSecretScanningAlert) GetNumber()(*int32) { + return m.number +} +// GetPushProtectionBypassed gets the push_protection_bypassed property value. Whether push protection was bypassed for the detected secret. +// returns a *bool when successful +func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassed()(*bool) { + return m.push_protection_bypassed +} +// GetPushProtectionBypassedAt gets the push_protection_bypassed_at property value. The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.push_protection_bypassed_at +} +// GetPushProtectionBypassedBy gets the push_protection_bypassed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassedBy()(NullableSimpleUserable) { + return m.push_protection_bypassed_by +} +// GetRepository gets the repository property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *OrganizationSecretScanningAlert) GetRepository()(SimpleRepositoryable) { + return m.repository +} +// GetResolution gets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. +// returns a *SecretScanningAlertResolution when successful +func (m *OrganizationSecretScanningAlert) GetResolution()(*SecretScanningAlertResolution) { + return m.resolution +} +// GetResolutionComment gets the resolution_comment property value. The comment that was optionally added when this alert was closed +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetResolutionComment()(*string) { + return m.resolution_comment +} +// GetResolvedAt gets the resolved_at property value. The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *OrganizationSecretScanningAlert) GetResolvedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.resolved_at +} +// GetResolvedBy gets the resolved_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *OrganizationSecretScanningAlert) GetResolvedBy()(NullableSimpleUserable) { + return m.resolved_by +} +// GetSecret gets the secret property value. The secret that was detected. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetSecret()(*string) { + return m.secret +} +// GetSecretType gets the secret_type property value. The type of secret that secret scanning detected. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetSecretType()(*string) { + return m.secret_type +} +// GetSecretTypeDisplayName gets the secret_type_display_name property value. User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetSecretTypeDisplayName()(*string) { + return m.secret_type_display_name +} +// GetState gets the state property value. Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +// returns a *SecretScanningAlertState when successful +func (m *OrganizationSecretScanningAlert) GetState()(*SecretScanningAlertState) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *OrganizationSecretScanningAlert) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetUrl()(*string) { + return m.url +} +// GetValidity gets the validity property value. The token status as of the latest validity check. +// returns a *OrganizationSecretScanningAlert_validity when successful +func (m *OrganizationSecretScanningAlert) GetValidity()(*OrganizationSecretScanningAlert_validity) { + return m.validity +} +// Serialize serializes information the current object +func (m *OrganizationSecretScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("locations_url", m.GetLocationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push_protection_bypassed", m.GetPushProtectionBypassed()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("push_protection_bypassed_at", m.GetPushProtectionBypassedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("push_protection_bypassed_by", m.GetPushProtectionBypassedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + if m.GetResolution() != nil { + cast := (*m.GetResolution()).String() + err := writer.WriteStringValue("resolution", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resolution_comment", m.GetResolutionComment()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("resolved_at", m.GetResolvedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("resolved_by", m.GetResolvedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_type", m.GetSecretType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_type_display_name", m.GetSecretTypeDisplayName()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetValidity() != nil { + cast := (*m.GetValidity()).String() + err := writer.WriteStringValue("validity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationSecretScanningAlert) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *OrganizationSecretScanningAlert) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *OrganizationSecretScanningAlert) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLocationsUrl sets the locations_url property value. The REST API URL of the code locations for this alert. +func (m *OrganizationSecretScanningAlert) SetLocationsUrl(value *string)() { + m.locations_url = value +} +// SetNumber sets the number property value. The security alert number. +func (m *OrganizationSecretScanningAlert) SetNumber(value *int32)() { + m.number = value +} +// SetPushProtectionBypassed sets the push_protection_bypassed property value. Whether push protection was bypassed for the detected secret. +func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassed(value *bool)() { + m.push_protection_bypassed = value +} +// SetPushProtectionBypassedAt sets the push_protection_bypassed_at property value. The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.push_protection_bypassed_at = value +} +// SetPushProtectionBypassedBy sets the push_protection_bypassed_by property value. A GitHub user. +func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassedBy(value NullableSimpleUserable)() { + m.push_protection_bypassed_by = value +} +// SetRepository sets the repository property value. A GitHub repository. +func (m *OrganizationSecretScanningAlert) SetRepository(value SimpleRepositoryable)() { + m.repository = value +} +// SetResolution sets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. +func (m *OrganizationSecretScanningAlert) SetResolution(value *SecretScanningAlertResolution)() { + m.resolution = value +} +// SetResolutionComment sets the resolution_comment property value. The comment that was optionally added when this alert was closed +func (m *OrganizationSecretScanningAlert) SetResolutionComment(value *string)() { + m.resolution_comment = value +} +// SetResolvedAt sets the resolved_at property value. The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *OrganizationSecretScanningAlert) SetResolvedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.resolved_at = value +} +// SetResolvedBy sets the resolved_by property value. A GitHub user. +func (m *OrganizationSecretScanningAlert) SetResolvedBy(value NullableSimpleUserable)() { + m.resolved_by = value +} +// SetSecret sets the secret property value. The secret that was detected. +func (m *OrganizationSecretScanningAlert) SetSecret(value *string)() { + m.secret = value +} +// SetSecretType sets the secret_type property value. The type of secret that secret scanning detected. +func (m *OrganizationSecretScanningAlert) SetSecretType(value *string)() { + m.secret_type = value +} +// SetSecretTypeDisplayName sets the secret_type_display_name property value. User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." +func (m *OrganizationSecretScanningAlert) SetSecretTypeDisplayName(value *string)() { + m.secret_type_display_name = value +} +// SetState sets the state property value. Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +func (m *OrganizationSecretScanningAlert) SetState(value *SecretScanningAlertState)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *OrganizationSecretScanningAlert) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *OrganizationSecretScanningAlert) SetUrl(value *string)() { + m.url = value +} +// SetValidity sets the validity property value. The token status as of the latest validity check. +func (m *OrganizationSecretScanningAlert) SetValidity(value *OrganizationSecretScanningAlert_validity)() { + m.validity = value +} +type OrganizationSecretScanningAlertable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetLocationsUrl()(*string) + GetNumber()(*int32) + GetPushProtectionBypassed()(*bool) + GetPushProtectionBypassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPushProtectionBypassedBy()(NullableSimpleUserable) + GetRepository()(SimpleRepositoryable) + GetResolution()(*SecretScanningAlertResolution) + GetResolutionComment()(*string) + GetResolvedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResolvedBy()(NullableSimpleUserable) + GetSecret()(*string) + GetSecretType()(*string) + GetSecretTypeDisplayName()(*string) + GetState()(*SecretScanningAlertState) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetValidity()(*OrganizationSecretScanningAlert_validity) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetLocationsUrl(value *string)() + SetNumber(value *int32)() + SetPushProtectionBypassed(value *bool)() + SetPushProtectionBypassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPushProtectionBypassedBy(value NullableSimpleUserable)() + SetRepository(value SimpleRepositoryable)() + SetResolution(value *SecretScanningAlertResolution)() + SetResolutionComment(value *string)() + SetResolvedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResolvedBy(value NullableSimpleUserable)() + SetSecret(value *string)() + SetSecretType(value *string)() + SetSecretTypeDisplayName(value *string)() + SetState(value *SecretScanningAlertState)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetValidity(value *OrganizationSecretScanningAlert_validity)() +} diff --git a/pkg/github/models/organization_secret_scanning_alert_validity.go b/pkg/github/models/organization_secret_scanning_alert_validity.go new file mode 100644 index 0000000..4fc12b7 --- /dev/null +++ b/pkg/github/models/organization_secret_scanning_alert_validity.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The token status as of the latest validity check. +type OrganizationSecretScanningAlert_validity int + +const ( + ACTIVE_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY OrganizationSecretScanningAlert_validity = iota + INACTIVE_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY + UNKNOWN_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY +) + +func (i OrganizationSecretScanningAlert_validity) String() string { + return []string{"active", "inactive", "unknown"}[i] +} +func ParseOrganizationSecretScanningAlert_validity(v string) (any, error) { + result := ACTIVE_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY + switch v { + case "active": + result = ACTIVE_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY + case "inactive": + result = INACTIVE_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY + case "unknown": + result = UNKNOWN_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY + default: + return 0, errors.New("Unknown OrganizationSecretScanningAlert_validity value: " + v) + } + return &result, nil +} +func SerializeOrganizationSecretScanningAlert_validity(values []OrganizationSecretScanningAlert_validity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationSecretScanningAlert_validity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_simple.go b/pkg/github/models/organization_simple.go new file mode 100644 index 0000000..e6568d2 --- /dev/null +++ b/pkg/github/models/organization_simple.go @@ -0,0 +1,400 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationSimple a GitHub organization. +type OrganizationSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The description property + description *string + // The events_url property + events_url *string + // The hooks_url property + hooks_url *string + // The id property + id *int32 + // The issues_url property + issues_url *string + // The login property + login *string + // The members_url property + members_url *string + // The node_id property + node_id *string + // The public_members_url property + public_members_url *string + // The repos_url property + repos_url *string + // The url property + url *string +} +// NewOrganizationSimple instantiates a new OrganizationSimple and sets the default values. +func NewOrganizationSimple()(*OrganizationSimple) { + m := &OrganizationSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOrganizationSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOrganizationSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *OrganizationSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *OrganizationSimple) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *OrganizationSimple) GetDescription()(*string) { + return m.description +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *OrganizationSimple) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OrganizationSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicMembersUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *OrganizationSimple) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *OrganizationSimple) GetId()(*int32) { + return m.id +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *OrganizationSimple) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *OrganizationSimple) GetLogin()(*string) { + return m.login +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *OrganizationSimple) GetMembersUrl()(*string) { + return m.members_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *OrganizationSimple) GetNodeId()(*string) { + return m.node_id +} +// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property +// returns a *string when successful +func (m *OrganizationSimple) GetPublicMembersUrl()(*string) { + return m.public_members_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *OrganizationSimple) GetReposUrl()(*string) { + return m.repos_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *OrganizationSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *OrganizationSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OrganizationSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *OrganizationSimple) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetDescription sets the description property value. The description property +func (m *OrganizationSimple) SetDescription(value *string)() { + m.description = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *OrganizationSimple) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *OrganizationSimple) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetId sets the id property value. The id property +func (m *OrganizationSimple) SetId(value *int32)() { + m.id = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *OrganizationSimple) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetLogin sets the login property value. The login property +func (m *OrganizationSimple) SetLogin(value *string)() { + m.login = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *OrganizationSimple) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *OrganizationSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property +func (m *OrganizationSimple) SetPublicMembersUrl(value *string)() { + m.public_members_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *OrganizationSimple) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetUrl sets the url property value. The url property +func (m *OrganizationSimple) SetUrl(value *string)() { + m.url = value +} +type OrganizationSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetDescription()(*string) + GetEventsUrl()(*string) + GetHooksUrl()(*string) + GetId()(*int32) + GetIssuesUrl()(*string) + GetLogin()(*string) + GetMembersUrl()(*string) + GetNodeId()(*string) + GetPublicMembersUrl()(*string) + GetReposUrl()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetDescription(value *string)() + SetEventsUrl(value *string)() + SetHooksUrl(value *string)() + SetId(value *int32)() + SetIssuesUrl(value *string)() + SetLogin(value *string)() + SetMembersUrl(value *string)() + SetNodeId(value *string)() + SetPublicMembersUrl(value *string)() + SetReposUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/package_escaped.go b/pkg/github/models/package_escaped.go new file mode 100644 index 0000000..d32fe6a --- /dev/null +++ b/pkg/github/models/package_escaped.go @@ -0,0 +1,374 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PackageEscaped a software package +type PackageEscaped struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // Unique identifier of the package. + id *int32 + // The name of the package. + name *string + // A GitHub user. + owner NullableSimpleUserable + // The package_type property + package_type *Package_package_type + // Minimal Repository + repository NullableMinimalRepositoryable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The number of versions of the package. + version_count *int32 + // The visibility property + visibility *Package_visibility +} +// NewPackageEscaped instantiates a new PackageEscaped and sets the default values. +func NewPackageEscaped()(*PackageEscaped) { + m := &PackageEscaped{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePackageEscapedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePackageEscapedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackageEscaped(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PackageEscaped) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PackageEscaped) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PackageEscaped) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["package_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePackage_package_type) + if err != nil { + return err + } + if val != nil { + m.SetPackageType(val.(*Package_package_type)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(NullableMinimalRepositoryable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["version_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersionCount(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePackage_visibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*Package_visibility)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PackageEscaped) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the package. +// returns a *int32 when successful +func (m *PackageEscaped) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the package. +// returns a *string when successful +func (m *PackageEscaped) GetName()(*string) { + return m.name +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PackageEscaped) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetPackageType gets the package_type property value. The package_type property +// returns a *Package_package_type when successful +func (m *PackageEscaped) GetPackageType()(*Package_package_type) { + return m.package_type +} +// GetRepository gets the repository property value. Minimal Repository +// returns a NullableMinimalRepositoryable when successful +func (m *PackageEscaped) GetRepository()(NullableMinimalRepositoryable) { + return m.repository +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PackageEscaped) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PackageEscaped) GetUrl()(*string) { + return m.url +} +// GetVersionCount gets the version_count property value. The number of versions of the package. +// returns a *int32 when successful +func (m *PackageEscaped) GetVersionCount()(*int32) { + return m.version_count +} +// GetVisibility gets the visibility property value. The visibility property +// returns a *Package_visibility when successful +func (m *PackageEscaped) GetVisibility()(*Package_visibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *PackageEscaped) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + if m.GetPackageType() != nil { + cast := (*m.GetPackageType()).String() + err := writer.WriteStringValue("package_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("version_count", m.GetVersionCount()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err := writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PackageEscaped) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PackageEscaped) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PackageEscaped) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the package. +func (m *PackageEscaped) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the package. +func (m *PackageEscaped) SetName(value *string)() { + m.name = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *PackageEscaped) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetPackageType sets the package_type property value. The package_type property +func (m *PackageEscaped) SetPackageType(value *Package_package_type)() { + m.package_type = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *PackageEscaped) SetRepository(value NullableMinimalRepositoryable)() { + m.repository = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PackageEscaped) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PackageEscaped) SetUrl(value *string)() { + m.url = value +} +// SetVersionCount sets the version_count property value. The number of versions of the package. +func (m *PackageEscaped) SetVersionCount(value *int32)() { + m.version_count = value +} +// SetVisibility sets the visibility property value. The visibility property +func (m *PackageEscaped) SetVisibility(value *Package_visibility)() { + m.visibility = value +} +type PackageEscapedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetOwner()(NullableSimpleUserable) + GetPackageType()(*Package_package_type) + GetRepository()(NullableMinimalRepositoryable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVersionCount()(*int32) + GetVisibility()(*Package_visibility) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetOwner(value NullableSimpleUserable)() + SetPackageType(value *Package_package_type)() + SetRepository(value NullableMinimalRepositoryable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVersionCount(value *int32)() + SetVisibility(value *Package_visibility)() +} diff --git a/pkg/github/models/package_package_type.go b/pkg/github/models/package_package_type.go new file mode 100644 index 0000000..cee3513 --- /dev/null +++ b/pkg/github/models/package_package_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +type Package_package_type int + +const ( + NPM_PACKAGE_PACKAGE_TYPE Package_package_type = iota + MAVEN_PACKAGE_PACKAGE_TYPE + RUBYGEMS_PACKAGE_PACKAGE_TYPE + DOCKER_PACKAGE_PACKAGE_TYPE + NUGET_PACKAGE_PACKAGE_TYPE + CONTAINER_PACKAGE_PACKAGE_TYPE +) + +func (i Package_package_type) String() string { + return []string{"npm", "maven", "rubygems", "docker", "nuget", "container"}[i] +} +func ParsePackage_package_type(v string) (any, error) { + result := NPM_PACKAGE_PACKAGE_TYPE + switch v { + case "npm": + result = NPM_PACKAGE_PACKAGE_TYPE + case "maven": + result = MAVEN_PACKAGE_PACKAGE_TYPE + case "rubygems": + result = RUBYGEMS_PACKAGE_PACKAGE_TYPE + case "docker": + result = DOCKER_PACKAGE_PACKAGE_TYPE + case "nuget": + result = NUGET_PACKAGE_PACKAGE_TYPE + case "container": + result = CONTAINER_PACKAGE_PACKAGE_TYPE + default: + return 0, errors.New("Unknown Package_package_type value: " + v) + } + return &result, nil +} +func SerializePackage_package_type(values []Package_package_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Package_package_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/package_version.go b/pkg/github/models/package_version.go new file mode 100644 index 0000000..3373e88 --- /dev/null +++ b/pkg/github/models/package_version.go @@ -0,0 +1,372 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PackageVersion a version of a software package +type PackageVersion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deleted_at property + deleted_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The html_url property + html_url *string + // Unique identifier of the package version. + id *int32 + // The license property + license *string + // The metadata property + metadata PackageVersion_metadataable + // The name of the package version. + name *string + // The package_html_url property + package_html_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewPackageVersion instantiates a new PackageVersion and sets the default values. +func NewPackageVersion()(*PackageVersion) { + m := &PackageVersion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePackageVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePackageVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackageVersion(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PackageVersion) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PackageVersion) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeletedAt gets the deleted_at property value. The deleted_at property +// returns a *Time when successful +func (m *PackageVersion) GetDeletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deleted_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *PackageVersion) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PackageVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deleted_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedAt(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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicense(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePackageVersion_metadataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val.(PackageVersion_metadataable)) + } + 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["package_html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageHtmlUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PackageVersion) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the package version. +// returns a *int32 when successful +func (m *PackageVersion) GetId()(*int32) { + return m.id +} +// GetLicense gets the license property value. The license property +// returns a *string when successful +func (m *PackageVersion) GetLicense()(*string) { + return m.license +} +// GetMetadata gets the metadata property value. The metadata property +// returns a PackageVersion_metadataable when successful +func (m *PackageVersion) GetMetadata()(PackageVersion_metadataable) { + return m.metadata +} +// GetName gets the name property value. The name of the package version. +// returns a *string when successful +func (m *PackageVersion) GetName()(*string) { + return m.name +} +// GetPackageHtmlUrl gets the package_html_url property value. The package_html_url property +// returns a *string when successful +func (m *PackageVersion) GetPackageHtmlUrl()(*string) { + return m.package_html_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PackageVersion) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PackageVersion) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PackageVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("deleted_at", m.GetDeletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("package_html_url", m.GetPackageHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PackageVersion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PackageVersion) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeletedAt sets the deleted_at property value. The deleted_at property +func (m *PackageVersion) SetDeletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deleted_at = value +} +// SetDescription sets the description property value. The description property +func (m *PackageVersion) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PackageVersion) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the package version. +func (m *PackageVersion) SetId(value *int32)() { + m.id = value +} +// SetLicense sets the license property value. The license property +func (m *PackageVersion) SetLicense(value *string)() { + m.license = value +} +// SetMetadata sets the metadata property value. The metadata property +func (m *PackageVersion) SetMetadata(value PackageVersion_metadataable)() { + m.metadata = value +} +// SetName sets the name property value. The name of the package version. +func (m *PackageVersion) SetName(value *string)() { + m.name = value +} +// SetPackageHtmlUrl sets the package_html_url property value. The package_html_url property +func (m *PackageVersion) SetPackageHtmlUrl(value *string)() { + m.package_html_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PackageVersion) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PackageVersion) SetUrl(value *string)() { + m.url = value +} +type PackageVersionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLicense()(*string) + GetMetadata()(PackageVersion_metadataable) + GetName()(*string) + GetPackageHtmlUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLicense(value *string)() + SetMetadata(value PackageVersion_metadataable)() + SetName(value *string)() + SetPackageHtmlUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/package_version_metadata.go b/pkg/github/models/package_version_metadata.go new file mode 100644 index 0000000..fe42fb0 --- /dev/null +++ b/pkg/github/models/package_version_metadata.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PackageVersion_metadata struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The container property + container PackageVersion_metadata_containerable + // The docker property + docker PackageVersion_metadata_dockerable + // The package_type property + package_type *PackageVersion_metadata_package_type +} +// NewPackageVersion_metadata instantiates a new PackageVersion_metadata and sets the default values. +func NewPackageVersion_metadata()(*PackageVersion_metadata) { + m := &PackageVersion_metadata{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePackageVersion_metadataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePackageVersion_metadataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackageVersion_metadata(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PackageVersion_metadata) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContainer gets the container property value. The container property +// returns a PackageVersion_metadata_containerable when successful +func (m *PackageVersion_metadata) GetContainer()(PackageVersion_metadata_containerable) { + return m.container +} +// GetDocker gets the docker property value. The docker property +// returns a PackageVersion_metadata_dockerable when successful +func (m *PackageVersion_metadata) GetDocker()(PackageVersion_metadata_dockerable) { + return m.docker +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PackageVersion_metadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["container"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePackageVersion_metadata_containerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContainer(val.(PackageVersion_metadata_containerable)) + } + return nil + } + res["docker"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePackageVersion_metadata_dockerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDocker(val.(PackageVersion_metadata_dockerable)) + } + return nil + } + res["package_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePackageVersion_metadata_package_type) + if err != nil { + return err + } + if val != nil { + m.SetPackageType(val.(*PackageVersion_metadata_package_type)) + } + return nil + } + return res +} +// GetPackageType gets the package_type property value. The package_type property +// returns a *PackageVersion_metadata_package_type when successful +func (m *PackageVersion_metadata) GetPackageType()(*PackageVersion_metadata_package_type) { + return m.package_type +} +// Serialize serializes information the current object +func (m *PackageVersion_metadata) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("container", m.GetContainer()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("docker", m.GetDocker()) + if err != nil { + return err + } + } + if m.GetPackageType() != nil { + cast := (*m.GetPackageType()).String() + err := writer.WriteStringValue("package_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PackageVersion_metadata) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContainer sets the container property value. The container property +func (m *PackageVersion_metadata) SetContainer(value PackageVersion_metadata_containerable)() { + m.container = value +} +// SetDocker sets the docker property value. The docker property +func (m *PackageVersion_metadata) SetDocker(value PackageVersion_metadata_dockerable)() { + m.docker = value +} +// SetPackageType sets the package_type property value. The package_type property +func (m *PackageVersion_metadata) SetPackageType(value *PackageVersion_metadata_package_type)() { + m.package_type = value +} +type PackageVersion_metadataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContainer()(PackageVersion_metadata_containerable) + GetDocker()(PackageVersion_metadata_dockerable) + GetPackageType()(*PackageVersion_metadata_package_type) + SetContainer(value PackageVersion_metadata_containerable)() + SetDocker(value PackageVersion_metadata_dockerable)() + SetPackageType(value *PackageVersion_metadata_package_type)() +} diff --git a/pkg/github/models/package_version_metadata_container.go b/pkg/github/models/package_version_metadata_container.go new file mode 100644 index 0000000..8271a07 --- /dev/null +++ b/pkg/github/models/package_version_metadata_container.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PackageVersion_metadata_container struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The tags property + tags []string +} +// NewPackageVersion_metadata_container instantiates a new PackageVersion_metadata_container and sets the default values. +func NewPackageVersion_metadata_container()(*PackageVersion_metadata_container) { + m := &PackageVersion_metadata_container{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePackageVersion_metadata_containerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePackageVersion_metadata_containerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackageVersion_metadata_container(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PackageVersion_metadata_container) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PackageVersion_metadata_container) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTags(res) + } + return nil + } + return res +} +// GetTags gets the tags property value. The tags property +// returns a []string when successful +func (m *PackageVersion_metadata_container) GetTags()([]string) { + return m.tags +} +// Serialize serializes information the current object +func (m *PackageVersion_metadata_container) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTags() != nil { + err := writer.WriteCollectionOfStringValues("tags", m.GetTags()) + 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 *PackageVersion_metadata_container) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTags sets the tags property value. The tags property +func (m *PackageVersion_metadata_container) SetTags(value []string)() { + m.tags = value +} +type PackageVersion_metadata_containerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTags()([]string) + SetTags(value []string)() +} diff --git a/pkg/github/models/package_version_metadata_docker.go b/pkg/github/models/package_version_metadata_docker.go new file mode 100644 index 0000000..e380dcd --- /dev/null +++ b/pkg/github/models/package_version_metadata_docker.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PackageVersion_metadata_docker struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The tag property + tag []string +} +// NewPackageVersion_metadata_docker instantiates a new PackageVersion_metadata_docker and sets the default values. +func NewPackageVersion_metadata_docker()(*PackageVersion_metadata_docker) { + m := &PackageVersion_metadata_docker{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePackageVersion_metadata_dockerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePackageVersion_metadata_dockerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackageVersion_metadata_docker(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PackageVersion_metadata_docker) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PackageVersion_metadata_docker) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["tag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTag(res) + } + return nil + } + return res +} +// GetTag gets the tag property value. The tag property +// returns a []string when successful +func (m *PackageVersion_metadata_docker) GetTag()([]string) { + return m.tag +} +// Serialize serializes information the current object +func (m *PackageVersion_metadata_docker) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTag() != nil { + err := writer.WriteCollectionOfStringValues("tag", m.GetTag()) + 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 *PackageVersion_metadata_docker) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTag sets the tag property value. The tag property +func (m *PackageVersion_metadata_docker) SetTag(value []string)() { + m.tag = value +} +type PackageVersion_metadata_dockerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTag()([]string) + SetTag(value []string)() +} diff --git a/pkg/github/models/package_version_metadata_package_type.go b/pkg/github/models/package_version_metadata_package_type.go new file mode 100644 index 0000000..56d93a5 --- /dev/null +++ b/pkg/github/models/package_version_metadata_package_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +type PackageVersion_metadata_package_type int + +const ( + NPM_PACKAGEVERSION_METADATA_PACKAGE_TYPE PackageVersion_metadata_package_type = iota + MAVEN_PACKAGEVERSION_METADATA_PACKAGE_TYPE + RUBYGEMS_PACKAGEVERSION_METADATA_PACKAGE_TYPE + DOCKER_PACKAGEVERSION_METADATA_PACKAGE_TYPE + NUGET_PACKAGEVERSION_METADATA_PACKAGE_TYPE + CONTAINER_PACKAGEVERSION_METADATA_PACKAGE_TYPE +) + +func (i PackageVersion_metadata_package_type) String() string { + return []string{"npm", "maven", "rubygems", "docker", "nuget", "container"}[i] +} +func ParsePackageVersion_metadata_package_type(v string) (any, error) { + result := NPM_PACKAGEVERSION_METADATA_PACKAGE_TYPE + switch v { + case "npm": + result = NPM_PACKAGEVERSION_METADATA_PACKAGE_TYPE + case "maven": + result = MAVEN_PACKAGEVERSION_METADATA_PACKAGE_TYPE + case "rubygems": + result = RUBYGEMS_PACKAGEVERSION_METADATA_PACKAGE_TYPE + case "docker": + result = DOCKER_PACKAGEVERSION_METADATA_PACKAGE_TYPE + case "nuget": + result = NUGET_PACKAGEVERSION_METADATA_PACKAGE_TYPE + case "container": + result = CONTAINER_PACKAGEVERSION_METADATA_PACKAGE_TYPE + default: + return 0, errors.New("Unknown PackageVersion_metadata_package_type value: " + v) + } + return &result, nil +} +func SerializePackageVersion_metadata_package_type(values []PackageVersion_metadata_package_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PackageVersion_metadata_package_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/package_visibility.go b/pkg/github/models/package_visibility.go new file mode 100644 index 0000000..fed8e15 --- /dev/null +++ b/pkg/github/models/package_visibility.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type Package_visibility int + +const ( + PRIVATE_PACKAGE_VISIBILITY Package_visibility = iota + PUBLIC_PACKAGE_VISIBILITY +) + +func (i Package_visibility) String() string { + return []string{"private", "public"}[i] +} +func ParsePackage_visibility(v string) (any, error) { + result := PRIVATE_PACKAGE_VISIBILITY + switch v { + case "private": + result = PRIVATE_PACKAGE_VISIBILITY + case "public": + result = PUBLIC_PACKAGE_VISIBILITY + default: + return 0, errors.New("Unknown Package_visibility value: " + v) + } + return &result, nil +} +func SerializePackage_visibility(values []Package_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Package_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/packages_billing_usage.go b/pkg/github/models/packages_billing_usage.go new file mode 100644 index 0000000..04d36e0 --- /dev/null +++ b/pkg/github/models/packages_billing_usage.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PackagesBillingUsage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Free storage space (GB) for GitHub Packages. + included_gigabytes_bandwidth *int32 + // Sum of the free and paid storage space (GB) for GitHuub Packages. + total_gigabytes_bandwidth_used *int32 + // Total paid storage space (GB) for GitHuub Packages. + total_paid_gigabytes_bandwidth_used *int32 +} +// NewPackagesBillingUsage instantiates a new PackagesBillingUsage and sets the default values. +func NewPackagesBillingUsage()(*PackagesBillingUsage) { + m := &PackagesBillingUsage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePackagesBillingUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePackagesBillingUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackagesBillingUsage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PackagesBillingUsage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PackagesBillingUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["included_gigabytes_bandwidth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIncludedGigabytesBandwidth(val) + } + return nil + } + res["total_gigabytes_bandwidth_used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalGigabytesBandwidthUsed(val) + } + return nil + } + res["total_paid_gigabytes_bandwidth_used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPaidGigabytesBandwidthUsed(val) + } + return nil + } + return res +} +// GetIncludedGigabytesBandwidth gets the included_gigabytes_bandwidth property value. Free storage space (GB) for GitHub Packages. +// returns a *int32 when successful +func (m *PackagesBillingUsage) GetIncludedGigabytesBandwidth()(*int32) { + return m.included_gigabytes_bandwidth +} +// GetTotalGigabytesBandwidthUsed gets the total_gigabytes_bandwidth_used property value. Sum of the free and paid storage space (GB) for GitHuub Packages. +// returns a *int32 when successful +func (m *PackagesBillingUsage) GetTotalGigabytesBandwidthUsed()(*int32) { + return m.total_gigabytes_bandwidth_used +} +// GetTotalPaidGigabytesBandwidthUsed gets the total_paid_gigabytes_bandwidth_used property value. Total paid storage space (GB) for GitHuub Packages. +// returns a *int32 when successful +func (m *PackagesBillingUsage) GetTotalPaidGigabytesBandwidthUsed()(*int32) { + return m.total_paid_gigabytes_bandwidth_used +} +// Serialize serializes information the current object +func (m *PackagesBillingUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("included_gigabytes_bandwidth", m.GetIncludedGigabytesBandwidth()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_gigabytes_bandwidth_used", m.GetTotalGigabytesBandwidthUsed()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_paid_gigabytes_bandwidth_used", m.GetTotalPaidGigabytesBandwidthUsed()) + 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 *PackagesBillingUsage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncludedGigabytesBandwidth sets the included_gigabytes_bandwidth property value. Free storage space (GB) for GitHub Packages. +func (m *PackagesBillingUsage) SetIncludedGigabytesBandwidth(value *int32)() { + m.included_gigabytes_bandwidth = value +} +// SetTotalGigabytesBandwidthUsed sets the total_gigabytes_bandwidth_used property value. Sum of the free and paid storage space (GB) for GitHuub Packages. +func (m *PackagesBillingUsage) SetTotalGigabytesBandwidthUsed(value *int32)() { + m.total_gigabytes_bandwidth_used = value +} +// SetTotalPaidGigabytesBandwidthUsed sets the total_paid_gigabytes_bandwidth_used property value. Total paid storage space (GB) for GitHuub Packages. +func (m *PackagesBillingUsage) SetTotalPaidGigabytesBandwidthUsed(value *int32)() { + m.total_paid_gigabytes_bandwidth_used = value +} +type PackagesBillingUsageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludedGigabytesBandwidth()(*int32) + GetTotalGigabytesBandwidthUsed()(*int32) + GetTotalPaidGigabytesBandwidthUsed()(*int32) + SetIncludedGigabytesBandwidth(value *int32)() + SetTotalGigabytesBandwidthUsed(value *int32)() + SetTotalPaidGigabytesBandwidthUsed(value *int32)() +} diff --git a/pkg/github/models/page.go b/pkg/github/models/page.go new file mode 100644 index 0000000..62c997a --- /dev/null +++ b/pkg/github/models/page.go @@ -0,0 +1,404 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Page the configuration for GitHub Pages for a repository. +type Page struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The process in which the Page will be built. + build_type *Page_build_type + // The Pages site's custom domain + cname *string + // Whether the Page has a custom 404 page. + custom_404 *bool + // The web address the Page can be accessed from. + html_url *string + // The https_certificate property + https_certificate PagesHttpsCertificateable + // Whether https is enabled on the domain + https_enforced *bool + // The timestamp when a pending domain becomes unverified. + pending_domain_unverified_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The state if the domain is verified + protected_domain_state *Page_protected_domain_state + // Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + public *bool + // The source property + source PagesSourceHashable + // The status of the most recent build of the Page. + status *Page_status + // The API address for accessing this Page resource. + url *string +} +// NewPage instantiates a new Page and sets the default values. +func NewPage()(*Page) { + m := &Page{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Page) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBuildType gets the build_type property value. The process in which the Page will be built. +// returns a *Page_build_type when successful +func (m *Page) GetBuildType()(*Page_build_type) { + return m.build_type +} +// GetCname gets the cname property value. The Pages site's custom domain +// returns a *string when successful +func (m *Page) GetCname()(*string) { + return m.cname +} +// GetCustom404 gets the custom_404 property value. Whether the Page has a custom 404 page. +// returns a *bool when successful +func (m *Page) GetCustom404()(*bool) { + return m.custom_404 +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Page) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["build_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePage_build_type) + if err != nil { + return err + } + if val != nil { + m.SetBuildType(val.(*Page_build_type)) + } + return nil + } + res["cname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCname(val) + } + return nil + } + res["custom_404"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCustom404(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["https_certificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePagesHttpsCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHttpsCertificate(val.(PagesHttpsCertificateable)) + } + return nil + } + res["https_enforced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHttpsEnforced(val) + } + return nil + } + res["pending_domain_unverified_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPendingDomainUnverifiedAt(val) + } + return nil + } + res["protected_domain_state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePage_protected_domain_state) + if err != nil { + return err + } + if val != nil { + m.SetProtectedDomainState(val.(*Page_protected_domain_state)) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublic(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePagesSourceHashFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(PagesSourceHashable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePage_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*Page_status)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The web address the Page can be accessed from. +// returns a *string when successful +func (m *Page) GetHtmlUrl()(*string) { + return m.html_url +} +// GetHttpsCertificate gets the https_certificate property value. The https_certificate property +// returns a PagesHttpsCertificateable when successful +func (m *Page) GetHttpsCertificate()(PagesHttpsCertificateable) { + return m.https_certificate +} +// GetHttpsEnforced gets the https_enforced property value. Whether https is enabled on the domain +// returns a *bool when successful +func (m *Page) GetHttpsEnforced()(*bool) { + return m.https_enforced +} +// GetPendingDomainUnverifiedAt gets the pending_domain_unverified_at property value. The timestamp when a pending domain becomes unverified. +// returns a *Time when successful +func (m *Page) GetPendingDomainUnverifiedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pending_domain_unverified_at +} +// GetProtectedDomainState gets the protected_domain_state property value. The state if the domain is verified +// returns a *Page_protected_domain_state when successful +func (m *Page) GetProtectedDomainState()(*Page_protected_domain_state) { + return m.protected_domain_state +} +// GetPublic gets the public property value. Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. +// returns a *bool when successful +func (m *Page) GetPublic()(*bool) { + return m.public +} +// GetSource gets the source property value. The source property +// returns a PagesSourceHashable when successful +func (m *Page) GetSource()(PagesSourceHashable) { + return m.source +} +// GetStatus gets the status property value. The status of the most recent build of the Page. +// returns a *Page_status when successful +func (m *Page) GetStatus()(*Page_status) { + return m.status +} +// GetUrl gets the url property value. The API address for accessing this Page resource. +// returns a *string when successful +func (m *Page) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Page) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBuildType() != nil { + cast := (*m.GetBuildType()).String() + err := writer.WriteStringValue("build_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cname", m.GetCname()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("custom_404", m.GetCustom404()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("https_certificate", m.GetHttpsCertificate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("https_enforced", m.GetHttpsEnforced()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pending_domain_unverified_at", m.GetPendingDomainUnverifiedAt()) + if err != nil { + return err + } + } + if m.GetProtectedDomainState() != nil { + cast := (*m.GetProtectedDomainState()).String() + err := writer.WriteStringValue("protected_domain_state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public", m.GetPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Page) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBuildType sets the build_type property value. The process in which the Page will be built. +func (m *Page) SetBuildType(value *Page_build_type)() { + m.build_type = value +} +// SetCname sets the cname property value. The Pages site's custom domain +func (m *Page) SetCname(value *string)() { + m.cname = value +} +// SetCustom404 sets the custom_404 property value. Whether the Page has a custom 404 page. +func (m *Page) SetCustom404(value *bool)() { + m.custom_404 = value +} +// SetHtmlUrl sets the html_url property value. The web address the Page can be accessed from. +func (m *Page) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetHttpsCertificate sets the https_certificate property value. The https_certificate property +func (m *Page) SetHttpsCertificate(value PagesHttpsCertificateable)() { + m.https_certificate = value +} +// SetHttpsEnforced sets the https_enforced property value. Whether https is enabled on the domain +func (m *Page) SetHttpsEnforced(value *bool)() { + m.https_enforced = value +} +// SetPendingDomainUnverifiedAt sets the pending_domain_unverified_at property value. The timestamp when a pending domain becomes unverified. +func (m *Page) SetPendingDomainUnverifiedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pending_domain_unverified_at = value +} +// SetProtectedDomainState sets the protected_domain_state property value. The state if the domain is verified +func (m *Page) SetProtectedDomainState(value *Page_protected_domain_state)() { + m.protected_domain_state = value +} +// SetPublic sets the public property value. Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. +func (m *Page) SetPublic(value *bool)() { + m.public = value +} +// SetSource sets the source property value. The source property +func (m *Page) SetSource(value PagesSourceHashable)() { + m.source = value +} +// SetStatus sets the status property value. The status of the most recent build of the Page. +func (m *Page) SetStatus(value *Page_status)() { + m.status = value +} +// SetUrl sets the url property value. The API address for accessing this Page resource. +func (m *Page) SetUrl(value *string)() { + m.url = value +} +type Pageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuildType()(*Page_build_type) + GetCname()(*string) + GetCustom404()(*bool) + GetHtmlUrl()(*string) + GetHttpsCertificate()(PagesHttpsCertificateable) + GetHttpsEnforced()(*bool) + GetPendingDomainUnverifiedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProtectedDomainState()(*Page_protected_domain_state) + GetPublic()(*bool) + GetSource()(PagesSourceHashable) + GetStatus()(*Page_status) + GetUrl()(*string) + SetBuildType(value *Page_build_type)() + SetCname(value *string)() + SetCustom404(value *bool)() + SetHtmlUrl(value *string)() + SetHttpsCertificate(value PagesHttpsCertificateable)() + SetHttpsEnforced(value *bool)() + SetPendingDomainUnverifiedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProtectedDomainState(value *Page_protected_domain_state)() + SetPublic(value *bool)() + SetSource(value PagesSourceHashable)() + SetStatus(value *Page_status)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/page_build.go b/pkg/github/models/page_build.go new file mode 100644 index 0000000..d56a596 --- /dev/null +++ b/pkg/github/models/page_build.go @@ -0,0 +1,285 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PageBuild page Build +type PageBuild struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit property + commit *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The duration property + duration *int32 + // The error property + error PageBuild_errorable + // A GitHub user. + pusher NullableSimpleUserable + // The status property + status *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewPageBuild instantiates a new PageBuild and sets the default values. +func NewPageBuild()(*PageBuild) { + m := &PageBuild{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePageBuildFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePageBuildFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPageBuild(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PageBuild) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommit gets the commit property value. The commit property +// returns a *string when successful +func (m *PageBuild) GetCommit()(*string) { + return m.commit +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PageBuild) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDuration gets the duration property value. The duration property +// returns a *int32 when successful +func (m *PageBuild) GetDuration()(*int32) { + return m.duration +} +// GetError gets the error property value. The error property +// returns a PageBuild_errorable when successful +func (m *PageBuild) GetError()(PageBuild_errorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PageBuild) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommit(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePageBuild_errorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(PageBuild_errorable)) + } + return nil + } + res["pusher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPusher(val.(NullableSimpleUserable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetPusher gets the pusher property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PageBuild) GetPusher()(NullableSimpleUserable) { + return m.pusher +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *PageBuild) GetStatus()(*string) { + return m.status +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PageBuild) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PageBuild) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PageBuild) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pusher", m.GetPusher()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PageBuild) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommit sets the commit property value. The commit property +func (m *PageBuild) SetCommit(value *string)() { + m.commit = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PageBuild) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDuration sets the duration property value. The duration property +func (m *PageBuild) SetDuration(value *int32)() { + m.duration = value +} +// SetError sets the error property value. The error property +func (m *PageBuild) SetError(value PageBuild_errorable)() { + m.error = value +} +// SetPusher sets the pusher property value. A GitHub user. +func (m *PageBuild) SetPusher(value NullableSimpleUserable)() { + m.pusher = value +} +// SetStatus sets the status property value. The status property +func (m *PageBuild) SetStatus(value *string)() { + m.status = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PageBuild) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PageBuild) SetUrl(value *string)() { + m.url = value +} +type PageBuildable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommit()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDuration()(*int32) + GetError()(PageBuild_errorable) + GetPusher()(NullableSimpleUserable) + GetStatus()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCommit(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDuration(value *int32)() + SetError(value PageBuild_errorable)() + SetPusher(value NullableSimpleUserable)() + SetStatus(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/page_build_error.go b/pkg/github/models/page_build_error.go new file mode 100644 index 0000000..243336d --- /dev/null +++ b/pkg/github/models/page_build_error.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PageBuild_error struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string +} +// NewPageBuild_error instantiates a new PageBuild_error and sets the default values. +func NewPageBuild_error()(*PageBuild_error) { + m := &PageBuild_error{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePageBuild_errorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePageBuild_errorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPageBuild_error(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PageBuild_error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PageBuild_error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *PageBuild_error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *PageBuild_error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *PageBuild_error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *PageBuild_error) SetMessage(value *string)() { + m.message = value +} +type PageBuild_errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + SetMessage(value *string)() +} diff --git a/pkg/github/models/page_build_status.go b/pkg/github/models/page_build_status.go new file mode 100644 index 0000000..103d32a --- /dev/null +++ b/pkg/github/models/page_build_status.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PageBuildStatus page Build Status +type PageBuildStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The status property + status *string + // The url property + url *string +} +// NewPageBuildStatus instantiates a new PageBuildStatus and sets the default values. +func NewPageBuildStatus()(*PageBuildStatus) { + m := &PageBuildStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePageBuildStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePageBuildStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPageBuildStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PageBuildStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PageBuildStatus) 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 + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *PageBuildStatus) GetStatus()(*string) { + return m.status +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PageBuildStatus) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PageBuildStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PageBuildStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The status property +func (m *PageBuildStatus) SetStatus(value *string)() { + m.status = value +} +// SetUrl sets the url property value. The url property +func (m *PageBuildStatus) SetUrl(value *string)() { + m.url = value +} +type PageBuildStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + GetUrl()(*string) + SetStatus(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/page_build_type.go b/pkg/github/models/page_build_type.go new file mode 100644 index 0000000..7c4faf2 --- /dev/null +++ b/pkg/github/models/page_build_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The process in which the Page will be built. +type Page_build_type int + +const ( + LEGACY_PAGE_BUILD_TYPE Page_build_type = iota + WORKFLOW_PAGE_BUILD_TYPE +) + +func (i Page_build_type) String() string { + return []string{"legacy", "workflow"}[i] +} +func ParsePage_build_type(v string) (any, error) { + result := LEGACY_PAGE_BUILD_TYPE + switch v { + case "legacy": + result = LEGACY_PAGE_BUILD_TYPE + case "workflow": + result = WORKFLOW_PAGE_BUILD_TYPE + default: + return 0, errors.New("Unknown Page_build_type value: " + v) + } + return &result, nil +} +func SerializePage_build_type(values []Page_build_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Page_build_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/page_deployment.go b/pkg/github/models/page_deployment.go new file mode 100644 index 0000000..6fc5d24 --- /dev/null +++ b/pkg/github/models/page_deployment.go @@ -0,0 +1,262 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PageDeployment the GitHub Pages deployment status. +type PageDeployment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the GitHub Pages deployment. This is the Git SHA of the deployed commit. + id PageDeployment_PageDeployment_idable + // The URI to the deployed GitHub Pages. + page_url *string + // The URI to the deployed GitHub Pages preview. + preview_url *string + // The URI to monitor GitHub Pages deployment status. + status_url *string +} +// PageDeployment_PageDeployment_id composed type wrapper for classes int32, string +type PageDeployment_PageDeployment_id struct { + // Composed type representation for type int32 + integer *int32 + // Composed type representation for type string + string *string +} +// NewPageDeployment_PageDeployment_id instantiates a new PageDeployment_PageDeployment_id and sets the default values. +func NewPageDeployment_PageDeployment_id()(*PageDeployment_PageDeployment_id) { + m := &PageDeployment_PageDeployment_id{ + } + return m +} +// CreatePageDeployment_PageDeployment_idFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePageDeployment_PageDeployment_idFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewPageDeployment_PageDeployment_id() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetInt32Value(); val != nil { + if err != nil { + return nil, err + } + result.SetInteger(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PageDeployment_PageDeployment_id) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetInteger gets the integer property value. Composed type representation for type int32 +// returns a *int32 when successful +func (m *PageDeployment_PageDeployment_id) GetInteger()(*int32) { + return m.integer +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *PageDeployment_PageDeployment_id) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *PageDeployment_PageDeployment_id) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *PageDeployment_PageDeployment_id) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInteger() != nil { + err := writer.WriteInt32Value("", m.GetInteger()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetInteger sets the integer property value. Composed type representation for type int32 +func (m *PageDeployment_PageDeployment_id) SetInteger(value *int32)() { + m.integer = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *PageDeployment_PageDeployment_id) SetString(value *string)() { + m.string = value +} +type PageDeployment_PageDeployment_idable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInteger()(*int32) + GetString()(*string) + SetInteger(value *int32)() + SetString(value *string)() +} +// NewPageDeployment instantiates a new PageDeployment and sets the default values. +func NewPageDeployment()(*PageDeployment) { + m := &PageDeployment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePageDeploymentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePageDeploymentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPageDeployment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PageDeployment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PageDeployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePageDeployment_PageDeployment_idFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetId(val.(PageDeployment_PageDeployment_idable)) + } + return nil + } + res["page_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPageUrl(val) + } + return nil + } + res["preview_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviewUrl(val) + } + return nil + } + res["status_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the GitHub Pages deployment. This is the Git SHA of the deployed commit. +// returns a PageDeployment_PageDeployment_idable when successful +func (m *PageDeployment) GetId()(PageDeployment_PageDeployment_idable) { + return m.id +} +// GetPageUrl gets the page_url property value. The URI to the deployed GitHub Pages. +// returns a *string when successful +func (m *PageDeployment) GetPageUrl()(*string) { + return m.page_url +} +// GetPreviewUrl gets the preview_url property value. The URI to the deployed GitHub Pages preview. +// returns a *string when successful +func (m *PageDeployment) GetPreviewUrl()(*string) { + return m.preview_url +} +// GetStatusUrl gets the status_url property value. The URI to monitor GitHub Pages deployment status. +// returns a *string when successful +func (m *PageDeployment) GetStatusUrl()(*string) { + return m.status_url +} +// Serialize serializes information the current object +func (m *PageDeployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("page_url", m.GetPageUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("preview_url", m.GetPreviewUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status_url", m.GetStatusUrl()) + 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 *PageDeployment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The ID of the GitHub Pages deployment. This is the Git SHA of the deployed commit. +func (m *PageDeployment) SetId(value PageDeployment_PageDeployment_idable)() { + m.id = value +} +// SetPageUrl sets the page_url property value. The URI to the deployed GitHub Pages. +func (m *PageDeployment) SetPageUrl(value *string)() { + m.page_url = value +} +// SetPreviewUrl sets the preview_url property value. The URI to the deployed GitHub Pages preview. +func (m *PageDeployment) SetPreviewUrl(value *string)() { + m.preview_url = value +} +// SetStatusUrl sets the status_url property value. The URI to monitor GitHub Pages deployment status. +func (m *PageDeployment) SetStatusUrl(value *string)() { + m.status_url = value +} +type PageDeploymentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(PageDeployment_PageDeployment_idable) + GetPageUrl()(*string) + GetPreviewUrl()(*string) + GetStatusUrl()(*string) + SetId(value PageDeployment_PageDeployment_idable)() + SetPageUrl(value *string)() + SetPreviewUrl(value *string)() + SetStatusUrl(value *string)() +} diff --git a/pkg/github/models/page_protected_domain_state.go b/pkg/github/models/page_protected_domain_state.go new file mode 100644 index 0000000..c00a763 --- /dev/null +++ b/pkg/github/models/page_protected_domain_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The state if the domain is verified +type Page_protected_domain_state int + +const ( + PENDING_PAGE_PROTECTED_DOMAIN_STATE Page_protected_domain_state = iota + VERIFIED_PAGE_PROTECTED_DOMAIN_STATE + UNVERIFIED_PAGE_PROTECTED_DOMAIN_STATE +) + +func (i Page_protected_domain_state) String() string { + return []string{"pending", "verified", "unverified"}[i] +} +func ParsePage_protected_domain_state(v string) (any, error) { + result := PENDING_PAGE_PROTECTED_DOMAIN_STATE + switch v { + case "pending": + result = PENDING_PAGE_PROTECTED_DOMAIN_STATE + case "verified": + result = VERIFIED_PAGE_PROTECTED_DOMAIN_STATE + case "unverified": + result = UNVERIFIED_PAGE_PROTECTED_DOMAIN_STATE + default: + return 0, errors.New("Unknown Page_protected_domain_state value: " + v) + } + return &result, nil +} +func SerializePage_protected_domain_state(values []Page_protected_domain_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Page_protected_domain_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/page_status.go b/pkg/github/models/page_status.go new file mode 100644 index 0000000..5228e69 --- /dev/null +++ b/pkg/github/models/page_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The status of the most recent build of the Page. +type Page_status int + +const ( + BUILT_PAGE_STATUS Page_status = iota + BUILDING_PAGE_STATUS + ERRORED_PAGE_STATUS +) + +func (i Page_status) String() string { + return []string{"built", "building", "errored"}[i] +} +func ParsePage_status(v string) (any, error) { + result := BUILT_PAGE_STATUS + switch v { + case "built": + result = BUILT_PAGE_STATUS + case "building": + result = BUILDING_PAGE_STATUS + case "errored": + result = ERRORED_PAGE_STATUS + default: + return 0, errors.New("Unknown Page_status value: " + v) + } + return &result, nil +} +func SerializePage_status(values []Page_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Page_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pages_deployment_status.go b/pkg/github/models/pages_deployment_status.go new file mode 100644 index 0000000..c039c5e --- /dev/null +++ b/pkg/github/models/pages_deployment_status.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PagesDeploymentStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The current status of the deployment. + status *PagesDeploymentStatus_status +} +// NewPagesDeploymentStatus instantiates a new PagesDeploymentStatus and sets the default values. +func NewPagesDeploymentStatus()(*PagesDeploymentStatus) { + m := &PagesDeploymentStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePagesDeploymentStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePagesDeploymentStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPagesDeploymentStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PagesDeploymentStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PagesDeploymentStatus) 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.GetEnumValue(ParsePagesDeploymentStatus_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*PagesDeploymentStatus_status)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The current status of the deployment. +// returns a *PagesDeploymentStatus_status when successful +func (m *PagesDeploymentStatus) GetStatus()(*PagesDeploymentStatus_status) { + return m.status +} +// Serialize serializes information the current object +func (m *PagesDeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PagesDeploymentStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The current status of the deployment. +func (m *PagesDeploymentStatus) SetStatus(value *PagesDeploymentStatus_status)() { + m.status = value +} +type PagesDeploymentStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*PagesDeploymentStatus_status) + SetStatus(value *PagesDeploymentStatus_status)() +} diff --git a/pkg/github/models/pages_deployment_status_status.go b/pkg/github/models/pages_deployment_status_status.go new file mode 100644 index 0000000..b284bc6 --- /dev/null +++ b/pkg/github/models/pages_deployment_status_status.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// The current status of the deployment. +type PagesDeploymentStatus_status int + +const ( + DEPLOYMENT_IN_PROGRESS_PAGESDEPLOYMENTSTATUS_STATUS PagesDeploymentStatus_status = iota + SYNCING_FILES_PAGESDEPLOYMENTSTATUS_STATUS + FINISHED_FILE_SYNC_PAGESDEPLOYMENTSTATUS_STATUS + UPDATING_PAGES_PAGESDEPLOYMENTSTATUS_STATUS + PURGING_CDN_PAGESDEPLOYMENTSTATUS_STATUS + DEPLOYMENT_CANCELLED_PAGESDEPLOYMENTSTATUS_STATUS + DEPLOYMENT_FAILED_PAGESDEPLOYMENTSTATUS_STATUS + DEPLOYMENT_CONTENT_FAILED_PAGESDEPLOYMENTSTATUS_STATUS + DEPLOYMENT_ATTEMPT_ERROR_PAGESDEPLOYMENTSTATUS_STATUS + DEPLOYMENT_LOST_PAGESDEPLOYMENTSTATUS_STATUS + SUCCEED_PAGESDEPLOYMENTSTATUS_STATUS +) + +func (i PagesDeploymentStatus_status) String() string { + return []string{"deployment_in_progress", "syncing_files", "finished_file_sync", "updating_pages", "purging_cdn", "deployment_cancelled", "deployment_failed", "deployment_content_failed", "deployment_attempt_error", "deployment_lost", "succeed"}[i] +} +func ParsePagesDeploymentStatus_status(v string) (any, error) { + result := DEPLOYMENT_IN_PROGRESS_PAGESDEPLOYMENTSTATUS_STATUS + switch v { + case "deployment_in_progress": + result = DEPLOYMENT_IN_PROGRESS_PAGESDEPLOYMENTSTATUS_STATUS + case "syncing_files": + result = SYNCING_FILES_PAGESDEPLOYMENTSTATUS_STATUS + case "finished_file_sync": + result = FINISHED_FILE_SYNC_PAGESDEPLOYMENTSTATUS_STATUS + case "updating_pages": + result = UPDATING_PAGES_PAGESDEPLOYMENTSTATUS_STATUS + case "purging_cdn": + result = PURGING_CDN_PAGESDEPLOYMENTSTATUS_STATUS + case "deployment_cancelled": + result = DEPLOYMENT_CANCELLED_PAGESDEPLOYMENTSTATUS_STATUS + case "deployment_failed": + result = DEPLOYMENT_FAILED_PAGESDEPLOYMENTSTATUS_STATUS + case "deployment_content_failed": + result = DEPLOYMENT_CONTENT_FAILED_PAGESDEPLOYMENTSTATUS_STATUS + case "deployment_attempt_error": + result = DEPLOYMENT_ATTEMPT_ERROR_PAGESDEPLOYMENTSTATUS_STATUS + case "deployment_lost": + result = DEPLOYMENT_LOST_PAGESDEPLOYMENTSTATUS_STATUS + case "succeed": + result = SUCCEED_PAGESDEPLOYMENTSTATUS_STATUS + default: + return 0, errors.New("Unknown PagesDeploymentStatus_status value: " + v) + } + return &result, nil +} +func SerializePagesDeploymentStatus_status(values []PagesDeploymentStatus_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PagesDeploymentStatus_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pages_health_check.go b/pkg/github/models/pages_health_check.go new file mode 100644 index 0000000..a5f5c9e --- /dev/null +++ b/pkg/github/models/pages_health_check.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PagesHealthCheck pages Health Check Status +type PagesHealthCheck struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The alt_domain property + alt_domain PagesHealthCheck_alt_domainable + // The domain property + domain PagesHealthCheck_domainable +} +// NewPagesHealthCheck instantiates a new PagesHealthCheck and sets the default values. +func NewPagesHealthCheck()(*PagesHealthCheck) { + m := &PagesHealthCheck{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePagesHealthCheckFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePagesHealthCheckFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPagesHealthCheck(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PagesHealthCheck) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAltDomain gets the alt_domain property value. The alt_domain property +// returns a PagesHealthCheck_alt_domainable when successful +func (m *PagesHealthCheck) GetAltDomain()(PagesHealthCheck_alt_domainable) { + return m.alt_domain +} +// GetDomain gets the domain property value. The domain property +// returns a PagesHealthCheck_domainable when successful +func (m *PagesHealthCheck) GetDomain()(PagesHealthCheck_domainable) { + return m.domain +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PagesHealthCheck) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alt_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePagesHealthCheck_alt_domainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAltDomain(val.(PagesHealthCheck_alt_domainable)) + } + return nil + } + res["domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePagesHealthCheck_domainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDomain(val.(PagesHealthCheck_domainable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PagesHealthCheck) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("alt_domain", m.GetAltDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("domain", m.GetDomain()) + 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 *PagesHealthCheck) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAltDomain sets the alt_domain property value. The alt_domain property +func (m *PagesHealthCheck) SetAltDomain(value PagesHealthCheck_alt_domainable)() { + m.alt_domain = value +} +// SetDomain sets the domain property value. The domain property +func (m *PagesHealthCheck) SetDomain(value PagesHealthCheck_domainable)() { + m.domain = value +} +type PagesHealthCheckable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAltDomain()(PagesHealthCheck_alt_domainable) + GetDomain()(PagesHealthCheck_domainable) + SetAltDomain(value PagesHealthCheck_alt_domainable)() + SetDomain(value PagesHealthCheck_domainable)() +} diff --git a/pkg/github/models/pages_health_check_alt_domain.go b/pkg/github/models/pages_health_check_alt_domain.go new file mode 100644 index 0000000..8972a42 --- /dev/null +++ b/pkg/github/models/pages_health_check_alt_domain.go @@ -0,0 +1,863 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PagesHealthCheck_alt_domain struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The caa_error property + caa_error *string + // The dns_resolves property + dns_resolves *bool + // The enforces_https property + enforces_https *bool + // The has_cname_record property + has_cname_record *bool + // The has_mx_records_present property + has_mx_records_present *bool + // The host property + host *string + // The https_error property + https_error *string + // The is_a_record property + is_a_record *bool + // The is_apex_domain property + is_apex_domain *bool + // The is_cloudflare_ip property + is_cloudflare_ip *bool + // The is_cname_to_fastly property + is_cname_to_fastly *bool + // The is_cname_to_github_user_domain property + is_cname_to_github_user_domain *bool + // The is_cname_to_pages_dot_github_dot_com property + is_cname_to_pages_dot_github_dot_com *bool + // The is_fastly_ip property + is_fastly_ip *bool + // The is_https_eligible property + is_https_eligible *bool + // The is_non_github_pages_ip_present property + is_non_github_pages_ip_present *bool + // The is_old_ip_address property + is_old_ip_address *bool + // The is_pages_domain property + is_pages_domain *bool + // The is_pointed_to_github_pages_ip property + is_pointed_to_github_pages_ip *bool + // The is_proxied property + is_proxied *bool + // The is_served_by_pages property + is_served_by_pages *bool + // The is_valid property + is_valid *bool + // The is_valid_domain property + is_valid_domain *bool + // The nameservers property + nameservers *string + // The reason property + reason *string + // The responds_to_https property + responds_to_https *bool + // The should_be_a_record property + should_be_a_record *bool + // The uri property + uri *string +} +// NewPagesHealthCheck_alt_domain instantiates a new PagesHealthCheck_alt_domain and sets the default values. +func NewPagesHealthCheck_alt_domain()(*PagesHealthCheck_alt_domain) { + m := &PagesHealthCheck_alt_domain{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePagesHealthCheck_alt_domainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePagesHealthCheck_alt_domainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPagesHealthCheck_alt_domain(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PagesHealthCheck_alt_domain) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCaaError gets the caa_error property value. The caa_error property +// returns a *string when successful +func (m *PagesHealthCheck_alt_domain) GetCaaError()(*string) { + return m.caa_error +} +// GetDnsResolves gets the dns_resolves property value. The dns_resolves property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetDnsResolves()(*bool) { + return m.dns_resolves +} +// GetEnforcesHttps gets the enforces_https property value. The enforces_https property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetEnforcesHttps()(*bool) { + return m.enforces_https +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PagesHealthCheck_alt_domain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["caa_error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCaaError(val) + } + return nil + } + res["dns_resolves"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDnsResolves(val) + } + return nil + } + res["enforces_https"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforcesHttps(val) + } + return nil + } + res["has_cname_record"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasCnameRecord(val) + } + return nil + } + res["has_mx_records_present"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMxRecordsPresent(val) + } + return nil + } + res["host"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHost(val) + } + return nil + } + res["https_error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHttpsError(val) + } + return nil + } + res["is_a_record"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsARecord(val) + } + return nil + } + res["is_apex_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApexDomain(val) + } + return nil + } + res["is_cloudflare_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCloudflareIp(val) + } + return nil + } + res["is_cname_to_fastly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCnameToFastly(val) + } + return nil + } + res["is_cname_to_github_user_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCnameToGithubUserDomain(val) + } + return nil + } + res["is_cname_to_pages_dot_github_dot_com"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCnameToPagesDotGithubDotCom(val) + } + return nil + } + res["is_fastly_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFastlyIp(val) + } + return nil + } + res["is_https_eligible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHttpsEligible(val) + } + return nil + } + res["is_non_github_pages_ip_present"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsNonGithubPagesIpPresent(val) + } + return nil + } + res["is_old_ip_address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOldIpAddress(val) + } + return nil + } + res["is_pages_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPagesDomain(val) + } + return nil + } + res["is_pointed_to_github_pages_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPointedToGithubPagesIp(val) + } + return nil + } + res["is_proxied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsProxied(val) + } + return nil + } + res["is_served_by_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsServedByPages(val) + } + return nil + } + res["is_valid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValid(val) + } + return nil + } + res["is_valid_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValidDomain(val) + } + return nil + } + res["nameservers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNameservers(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["responds_to_https"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRespondsToHttps(val) + } + return nil + } + res["should_be_a_record"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldBeARecord(val) + } + return nil + } + res["uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUri(val) + } + return nil + } + return res +} +// GetHasCnameRecord gets the has_cname_record property value. The has_cname_record property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetHasCnameRecord()(*bool) { + return m.has_cname_record +} +// GetHasMxRecordsPresent gets the has_mx_records_present property value. The has_mx_records_present property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetHasMxRecordsPresent()(*bool) { + return m.has_mx_records_present +} +// GetHost gets the host property value. The host property +// returns a *string when successful +func (m *PagesHealthCheck_alt_domain) GetHost()(*string) { + return m.host +} +// GetHttpsError gets the https_error property value. The https_error property +// returns a *string when successful +func (m *PagesHealthCheck_alt_domain) GetHttpsError()(*string) { + return m.https_error +} +// GetIsApexDomain gets the is_apex_domain property value. The is_apex_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsApexDomain()(*bool) { + return m.is_apex_domain +} +// GetIsARecord gets the is_a_record property value. The is_a_record property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsARecord()(*bool) { + return m.is_a_record +} +// GetIsCloudflareIp gets the is_cloudflare_ip property value. The is_cloudflare_ip property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsCloudflareIp()(*bool) { + return m.is_cloudflare_ip +} +// GetIsCnameToFastly gets the is_cname_to_fastly property value. The is_cname_to_fastly property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsCnameToFastly()(*bool) { + return m.is_cname_to_fastly +} +// GetIsCnameToGithubUserDomain gets the is_cname_to_github_user_domain property value. The is_cname_to_github_user_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsCnameToGithubUserDomain()(*bool) { + return m.is_cname_to_github_user_domain +} +// GetIsCnameToPagesDotGithubDotCom gets the is_cname_to_pages_dot_github_dot_com property value. The is_cname_to_pages_dot_github_dot_com property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsCnameToPagesDotGithubDotCom()(*bool) { + return m.is_cname_to_pages_dot_github_dot_com +} +// GetIsFastlyIp gets the is_fastly_ip property value. The is_fastly_ip property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsFastlyIp()(*bool) { + return m.is_fastly_ip +} +// GetIsHttpsEligible gets the is_https_eligible property value. The is_https_eligible property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsHttpsEligible()(*bool) { + return m.is_https_eligible +} +// GetIsNonGithubPagesIpPresent gets the is_non_github_pages_ip_present property value. The is_non_github_pages_ip_present property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsNonGithubPagesIpPresent()(*bool) { + return m.is_non_github_pages_ip_present +} +// GetIsOldIpAddress gets the is_old_ip_address property value. The is_old_ip_address property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsOldIpAddress()(*bool) { + return m.is_old_ip_address +} +// GetIsPagesDomain gets the is_pages_domain property value. The is_pages_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsPagesDomain()(*bool) { + return m.is_pages_domain +} +// GetIsPointedToGithubPagesIp gets the is_pointed_to_github_pages_ip property value. The is_pointed_to_github_pages_ip property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsPointedToGithubPagesIp()(*bool) { + return m.is_pointed_to_github_pages_ip +} +// GetIsProxied gets the is_proxied property value. The is_proxied property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsProxied()(*bool) { + return m.is_proxied +} +// GetIsServedByPages gets the is_served_by_pages property value. The is_served_by_pages property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsServedByPages()(*bool) { + return m.is_served_by_pages +} +// GetIsValid gets the is_valid property value. The is_valid property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsValid()(*bool) { + return m.is_valid +} +// GetIsValidDomain gets the is_valid_domain property value. The is_valid_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetIsValidDomain()(*bool) { + return m.is_valid_domain +} +// GetNameservers gets the nameservers property value. The nameservers property +// returns a *string when successful +func (m *PagesHealthCheck_alt_domain) GetNameservers()(*string) { + return m.nameservers +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *PagesHealthCheck_alt_domain) GetReason()(*string) { + return m.reason +} +// GetRespondsToHttps gets the responds_to_https property value. The responds_to_https property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetRespondsToHttps()(*bool) { + return m.responds_to_https +} +// GetShouldBeARecord gets the should_be_a_record property value. The should_be_a_record property +// returns a *bool when successful +func (m *PagesHealthCheck_alt_domain) GetShouldBeARecord()(*bool) { + return m.should_be_a_record +} +// GetUri gets the uri property value. The uri property +// returns a *string when successful +func (m *PagesHealthCheck_alt_domain) GetUri()(*string) { + return m.uri +} +// Serialize serializes information the current object +func (m *PagesHealthCheck_alt_domain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("caa_error", m.GetCaaError()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dns_resolves", m.GetDnsResolves()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enforces_https", m.GetEnforcesHttps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_cname_record", m.GetHasCnameRecord()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_mx_records_present", m.GetHasMxRecordsPresent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("host", m.GetHost()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("https_error", m.GetHttpsError()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_apex_domain", m.GetIsApexDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_a_record", m.GetIsARecord()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cloudflare_ip", m.GetIsCloudflareIp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cname_to_fastly", m.GetIsCnameToFastly()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cname_to_github_user_domain", m.GetIsCnameToGithubUserDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cname_to_pages_dot_github_dot_com", m.GetIsCnameToPagesDotGithubDotCom()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_fastly_ip", m.GetIsFastlyIp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_https_eligible", m.GetIsHttpsEligible()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_non_github_pages_ip_present", m.GetIsNonGithubPagesIpPresent()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_old_ip_address", m.GetIsOldIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_pages_domain", m.GetIsPagesDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_pointed_to_github_pages_ip", m.GetIsPointedToGithubPagesIp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_proxied", m.GetIsProxied()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_served_by_pages", m.GetIsServedByPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_valid", m.GetIsValid()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_valid_domain", m.GetIsValidDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("nameservers", m.GetNameservers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("responds_to_https", m.GetRespondsToHttps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("should_be_a_record", m.GetShouldBeARecord()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("uri", m.GetUri()) + 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 *PagesHealthCheck_alt_domain) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCaaError sets the caa_error property value. The caa_error property +func (m *PagesHealthCheck_alt_domain) SetCaaError(value *string)() { + m.caa_error = value +} +// SetDnsResolves sets the dns_resolves property value. The dns_resolves property +func (m *PagesHealthCheck_alt_domain) SetDnsResolves(value *bool)() { + m.dns_resolves = value +} +// SetEnforcesHttps sets the enforces_https property value. The enforces_https property +func (m *PagesHealthCheck_alt_domain) SetEnforcesHttps(value *bool)() { + m.enforces_https = value +} +// SetHasCnameRecord sets the has_cname_record property value. The has_cname_record property +func (m *PagesHealthCheck_alt_domain) SetHasCnameRecord(value *bool)() { + m.has_cname_record = value +} +// SetHasMxRecordsPresent sets the has_mx_records_present property value. The has_mx_records_present property +func (m *PagesHealthCheck_alt_domain) SetHasMxRecordsPresent(value *bool)() { + m.has_mx_records_present = value +} +// SetHost sets the host property value. The host property +func (m *PagesHealthCheck_alt_domain) SetHost(value *string)() { + m.host = value +} +// SetHttpsError sets the https_error property value. The https_error property +func (m *PagesHealthCheck_alt_domain) SetHttpsError(value *string)() { + m.https_error = value +} +// SetIsApexDomain sets the is_apex_domain property value. The is_apex_domain property +func (m *PagesHealthCheck_alt_domain) SetIsApexDomain(value *bool)() { + m.is_apex_domain = value +} +// SetIsARecord sets the is_a_record property value. The is_a_record property +func (m *PagesHealthCheck_alt_domain) SetIsARecord(value *bool)() { + m.is_a_record = value +} +// SetIsCloudflareIp sets the is_cloudflare_ip property value. The is_cloudflare_ip property +func (m *PagesHealthCheck_alt_domain) SetIsCloudflareIp(value *bool)() { + m.is_cloudflare_ip = value +} +// SetIsCnameToFastly sets the is_cname_to_fastly property value. The is_cname_to_fastly property +func (m *PagesHealthCheck_alt_domain) SetIsCnameToFastly(value *bool)() { + m.is_cname_to_fastly = value +} +// SetIsCnameToGithubUserDomain sets the is_cname_to_github_user_domain property value. The is_cname_to_github_user_domain property +func (m *PagesHealthCheck_alt_domain) SetIsCnameToGithubUserDomain(value *bool)() { + m.is_cname_to_github_user_domain = value +} +// SetIsCnameToPagesDotGithubDotCom sets the is_cname_to_pages_dot_github_dot_com property value. The is_cname_to_pages_dot_github_dot_com property +func (m *PagesHealthCheck_alt_domain) SetIsCnameToPagesDotGithubDotCom(value *bool)() { + m.is_cname_to_pages_dot_github_dot_com = value +} +// SetIsFastlyIp sets the is_fastly_ip property value. The is_fastly_ip property +func (m *PagesHealthCheck_alt_domain) SetIsFastlyIp(value *bool)() { + m.is_fastly_ip = value +} +// SetIsHttpsEligible sets the is_https_eligible property value. The is_https_eligible property +func (m *PagesHealthCheck_alt_domain) SetIsHttpsEligible(value *bool)() { + m.is_https_eligible = value +} +// SetIsNonGithubPagesIpPresent sets the is_non_github_pages_ip_present property value. The is_non_github_pages_ip_present property +func (m *PagesHealthCheck_alt_domain) SetIsNonGithubPagesIpPresent(value *bool)() { + m.is_non_github_pages_ip_present = value +} +// SetIsOldIpAddress sets the is_old_ip_address property value. The is_old_ip_address property +func (m *PagesHealthCheck_alt_domain) SetIsOldIpAddress(value *bool)() { + m.is_old_ip_address = value +} +// SetIsPagesDomain sets the is_pages_domain property value. The is_pages_domain property +func (m *PagesHealthCheck_alt_domain) SetIsPagesDomain(value *bool)() { + m.is_pages_domain = value +} +// SetIsPointedToGithubPagesIp sets the is_pointed_to_github_pages_ip property value. The is_pointed_to_github_pages_ip property +func (m *PagesHealthCheck_alt_domain) SetIsPointedToGithubPagesIp(value *bool)() { + m.is_pointed_to_github_pages_ip = value +} +// SetIsProxied sets the is_proxied property value. The is_proxied property +func (m *PagesHealthCheck_alt_domain) SetIsProxied(value *bool)() { + m.is_proxied = value +} +// SetIsServedByPages sets the is_served_by_pages property value. The is_served_by_pages property +func (m *PagesHealthCheck_alt_domain) SetIsServedByPages(value *bool)() { + m.is_served_by_pages = value +} +// SetIsValid sets the is_valid property value. The is_valid property +func (m *PagesHealthCheck_alt_domain) SetIsValid(value *bool)() { + m.is_valid = value +} +// SetIsValidDomain sets the is_valid_domain property value. The is_valid_domain property +func (m *PagesHealthCheck_alt_domain) SetIsValidDomain(value *bool)() { + m.is_valid_domain = value +} +// SetNameservers sets the nameservers property value. The nameservers property +func (m *PagesHealthCheck_alt_domain) SetNameservers(value *string)() { + m.nameservers = value +} +// SetReason sets the reason property value. The reason property +func (m *PagesHealthCheck_alt_domain) SetReason(value *string)() { + m.reason = value +} +// SetRespondsToHttps sets the responds_to_https property value. The responds_to_https property +func (m *PagesHealthCheck_alt_domain) SetRespondsToHttps(value *bool)() { + m.responds_to_https = value +} +// SetShouldBeARecord sets the should_be_a_record property value. The should_be_a_record property +func (m *PagesHealthCheck_alt_domain) SetShouldBeARecord(value *bool)() { + m.should_be_a_record = value +} +// SetUri sets the uri property value. The uri property +func (m *PagesHealthCheck_alt_domain) SetUri(value *string)() { + m.uri = value +} +type PagesHealthCheck_alt_domainable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCaaError()(*string) + GetDnsResolves()(*bool) + GetEnforcesHttps()(*bool) + GetHasCnameRecord()(*bool) + GetHasMxRecordsPresent()(*bool) + GetHost()(*string) + GetHttpsError()(*string) + GetIsApexDomain()(*bool) + GetIsARecord()(*bool) + GetIsCloudflareIp()(*bool) + GetIsCnameToFastly()(*bool) + GetIsCnameToGithubUserDomain()(*bool) + GetIsCnameToPagesDotGithubDotCom()(*bool) + GetIsFastlyIp()(*bool) + GetIsHttpsEligible()(*bool) + GetIsNonGithubPagesIpPresent()(*bool) + GetIsOldIpAddress()(*bool) + GetIsPagesDomain()(*bool) + GetIsPointedToGithubPagesIp()(*bool) + GetIsProxied()(*bool) + GetIsServedByPages()(*bool) + GetIsValid()(*bool) + GetIsValidDomain()(*bool) + GetNameservers()(*string) + GetReason()(*string) + GetRespondsToHttps()(*bool) + GetShouldBeARecord()(*bool) + GetUri()(*string) + SetCaaError(value *string)() + SetDnsResolves(value *bool)() + SetEnforcesHttps(value *bool)() + SetHasCnameRecord(value *bool)() + SetHasMxRecordsPresent(value *bool)() + SetHost(value *string)() + SetHttpsError(value *string)() + SetIsApexDomain(value *bool)() + SetIsARecord(value *bool)() + SetIsCloudflareIp(value *bool)() + SetIsCnameToFastly(value *bool)() + SetIsCnameToGithubUserDomain(value *bool)() + SetIsCnameToPagesDotGithubDotCom(value *bool)() + SetIsFastlyIp(value *bool)() + SetIsHttpsEligible(value *bool)() + SetIsNonGithubPagesIpPresent(value *bool)() + SetIsOldIpAddress(value *bool)() + SetIsPagesDomain(value *bool)() + SetIsPointedToGithubPagesIp(value *bool)() + SetIsProxied(value *bool)() + SetIsServedByPages(value *bool)() + SetIsValid(value *bool)() + SetIsValidDomain(value *bool)() + SetNameservers(value *string)() + SetReason(value *string)() + SetRespondsToHttps(value *bool)() + SetShouldBeARecord(value *bool)() + SetUri(value *string)() +} diff --git a/pkg/github/models/pages_health_check_domain.go b/pkg/github/models/pages_health_check_domain.go new file mode 100644 index 0000000..e0ebb04 --- /dev/null +++ b/pkg/github/models/pages_health_check_domain.go @@ -0,0 +1,863 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PagesHealthCheck_domain struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The caa_error property + caa_error *string + // The dns_resolves property + dns_resolves *bool + // The enforces_https property + enforces_https *bool + // The has_cname_record property + has_cname_record *bool + // The has_mx_records_present property + has_mx_records_present *bool + // The host property + host *string + // The https_error property + https_error *string + // The is_a_record property + is_a_record *bool + // The is_apex_domain property + is_apex_domain *bool + // The is_cloudflare_ip property + is_cloudflare_ip *bool + // The is_cname_to_fastly property + is_cname_to_fastly *bool + // The is_cname_to_github_user_domain property + is_cname_to_github_user_domain *bool + // The is_cname_to_pages_dot_github_dot_com property + is_cname_to_pages_dot_github_dot_com *bool + // The is_fastly_ip property + is_fastly_ip *bool + // The is_https_eligible property + is_https_eligible *bool + // The is_non_github_pages_ip_present property + is_non_github_pages_ip_present *bool + // The is_old_ip_address property + is_old_ip_address *bool + // The is_pages_domain property + is_pages_domain *bool + // The is_pointed_to_github_pages_ip property + is_pointed_to_github_pages_ip *bool + // The is_proxied property + is_proxied *bool + // The is_served_by_pages property + is_served_by_pages *bool + // The is_valid property + is_valid *bool + // The is_valid_domain property + is_valid_domain *bool + // The nameservers property + nameservers *string + // The reason property + reason *string + // The responds_to_https property + responds_to_https *bool + // The should_be_a_record property + should_be_a_record *bool + // The uri property + uri *string +} +// NewPagesHealthCheck_domain instantiates a new PagesHealthCheck_domain and sets the default values. +func NewPagesHealthCheck_domain()(*PagesHealthCheck_domain) { + m := &PagesHealthCheck_domain{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePagesHealthCheck_domainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePagesHealthCheck_domainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPagesHealthCheck_domain(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PagesHealthCheck_domain) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCaaError gets the caa_error property value. The caa_error property +// returns a *string when successful +func (m *PagesHealthCheck_domain) GetCaaError()(*string) { + return m.caa_error +} +// GetDnsResolves gets the dns_resolves property value. The dns_resolves property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetDnsResolves()(*bool) { + return m.dns_resolves +} +// GetEnforcesHttps gets the enforces_https property value. The enforces_https property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetEnforcesHttps()(*bool) { + return m.enforces_https +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PagesHealthCheck_domain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["caa_error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCaaError(val) + } + return nil + } + res["dns_resolves"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDnsResolves(val) + } + return nil + } + res["enforces_https"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforcesHttps(val) + } + return nil + } + res["has_cname_record"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasCnameRecord(val) + } + return nil + } + res["has_mx_records_present"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMxRecordsPresent(val) + } + return nil + } + res["host"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHost(val) + } + return nil + } + res["https_error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHttpsError(val) + } + return nil + } + res["is_a_record"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsARecord(val) + } + return nil + } + res["is_apex_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApexDomain(val) + } + return nil + } + res["is_cloudflare_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCloudflareIp(val) + } + return nil + } + res["is_cname_to_fastly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCnameToFastly(val) + } + return nil + } + res["is_cname_to_github_user_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCnameToGithubUserDomain(val) + } + return nil + } + res["is_cname_to_pages_dot_github_dot_com"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCnameToPagesDotGithubDotCom(val) + } + return nil + } + res["is_fastly_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFastlyIp(val) + } + return nil + } + res["is_https_eligible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHttpsEligible(val) + } + return nil + } + res["is_non_github_pages_ip_present"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsNonGithubPagesIpPresent(val) + } + return nil + } + res["is_old_ip_address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOldIpAddress(val) + } + return nil + } + res["is_pages_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPagesDomain(val) + } + return nil + } + res["is_pointed_to_github_pages_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPointedToGithubPagesIp(val) + } + return nil + } + res["is_proxied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsProxied(val) + } + return nil + } + res["is_served_by_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsServedByPages(val) + } + return nil + } + res["is_valid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValid(val) + } + return nil + } + res["is_valid_domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValidDomain(val) + } + return nil + } + res["nameservers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNameservers(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["responds_to_https"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRespondsToHttps(val) + } + return nil + } + res["should_be_a_record"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldBeARecord(val) + } + return nil + } + res["uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUri(val) + } + return nil + } + return res +} +// GetHasCnameRecord gets the has_cname_record property value. The has_cname_record property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetHasCnameRecord()(*bool) { + return m.has_cname_record +} +// GetHasMxRecordsPresent gets the has_mx_records_present property value. The has_mx_records_present property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetHasMxRecordsPresent()(*bool) { + return m.has_mx_records_present +} +// GetHost gets the host property value. The host property +// returns a *string when successful +func (m *PagesHealthCheck_domain) GetHost()(*string) { + return m.host +} +// GetHttpsError gets the https_error property value. The https_error property +// returns a *string when successful +func (m *PagesHealthCheck_domain) GetHttpsError()(*string) { + return m.https_error +} +// GetIsApexDomain gets the is_apex_domain property value. The is_apex_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsApexDomain()(*bool) { + return m.is_apex_domain +} +// GetIsARecord gets the is_a_record property value. The is_a_record property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsARecord()(*bool) { + return m.is_a_record +} +// GetIsCloudflareIp gets the is_cloudflare_ip property value. The is_cloudflare_ip property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsCloudflareIp()(*bool) { + return m.is_cloudflare_ip +} +// GetIsCnameToFastly gets the is_cname_to_fastly property value. The is_cname_to_fastly property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsCnameToFastly()(*bool) { + return m.is_cname_to_fastly +} +// GetIsCnameToGithubUserDomain gets the is_cname_to_github_user_domain property value. The is_cname_to_github_user_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsCnameToGithubUserDomain()(*bool) { + return m.is_cname_to_github_user_domain +} +// GetIsCnameToPagesDotGithubDotCom gets the is_cname_to_pages_dot_github_dot_com property value. The is_cname_to_pages_dot_github_dot_com property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsCnameToPagesDotGithubDotCom()(*bool) { + return m.is_cname_to_pages_dot_github_dot_com +} +// GetIsFastlyIp gets the is_fastly_ip property value. The is_fastly_ip property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsFastlyIp()(*bool) { + return m.is_fastly_ip +} +// GetIsHttpsEligible gets the is_https_eligible property value. The is_https_eligible property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsHttpsEligible()(*bool) { + return m.is_https_eligible +} +// GetIsNonGithubPagesIpPresent gets the is_non_github_pages_ip_present property value. The is_non_github_pages_ip_present property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsNonGithubPagesIpPresent()(*bool) { + return m.is_non_github_pages_ip_present +} +// GetIsOldIpAddress gets the is_old_ip_address property value. The is_old_ip_address property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsOldIpAddress()(*bool) { + return m.is_old_ip_address +} +// GetIsPagesDomain gets the is_pages_domain property value. The is_pages_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsPagesDomain()(*bool) { + return m.is_pages_domain +} +// GetIsPointedToGithubPagesIp gets the is_pointed_to_github_pages_ip property value. The is_pointed_to_github_pages_ip property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsPointedToGithubPagesIp()(*bool) { + return m.is_pointed_to_github_pages_ip +} +// GetIsProxied gets the is_proxied property value. The is_proxied property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsProxied()(*bool) { + return m.is_proxied +} +// GetIsServedByPages gets the is_served_by_pages property value. The is_served_by_pages property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsServedByPages()(*bool) { + return m.is_served_by_pages +} +// GetIsValid gets the is_valid property value. The is_valid property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsValid()(*bool) { + return m.is_valid +} +// GetIsValidDomain gets the is_valid_domain property value. The is_valid_domain property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetIsValidDomain()(*bool) { + return m.is_valid_domain +} +// GetNameservers gets the nameservers property value. The nameservers property +// returns a *string when successful +func (m *PagesHealthCheck_domain) GetNameservers()(*string) { + return m.nameservers +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *PagesHealthCheck_domain) GetReason()(*string) { + return m.reason +} +// GetRespondsToHttps gets the responds_to_https property value. The responds_to_https property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetRespondsToHttps()(*bool) { + return m.responds_to_https +} +// GetShouldBeARecord gets the should_be_a_record property value. The should_be_a_record property +// returns a *bool when successful +func (m *PagesHealthCheck_domain) GetShouldBeARecord()(*bool) { + return m.should_be_a_record +} +// GetUri gets the uri property value. The uri property +// returns a *string when successful +func (m *PagesHealthCheck_domain) GetUri()(*string) { + return m.uri +} +// Serialize serializes information the current object +func (m *PagesHealthCheck_domain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("caa_error", m.GetCaaError()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dns_resolves", m.GetDnsResolves()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enforces_https", m.GetEnforcesHttps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_cname_record", m.GetHasCnameRecord()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_mx_records_present", m.GetHasMxRecordsPresent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("host", m.GetHost()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("https_error", m.GetHttpsError()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_apex_domain", m.GetIsApexDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_a_record", m.GetIsARecord()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cloudflare_ip", m.GetIsCloudflareIp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cname_to_fastly", m.GetIsCnameToFastly()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cname_to_github_user_domain", m.GetIsCnameToGithubUserDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_cname_to_pages_dot_github_dot_com", m.GetIsCnameToPagesDotGithubDotCom()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_fastly_ip", m.GetIsFastlyIp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_https_eligible", m.GetIsHttpsEligible()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_non_github_pages_ip_present", m.GetIsNonGithubPagesIpPresent()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_old_ip_address", m.GetIsOldIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_pages_domain", m.GetIsPagesDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_pointed_to_github_pages_ip", m.GetIsPointedToGithubPagesIp()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_proxied", m.GetIsProxied()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_served_by_pages", m.GetIsServedByPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_valid", m.GetIsValid()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_valid_domain", m.GetIsValidDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("nameservers", m.GetNameservers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("responds_to_https", m.GetRespondsToHttps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("should_be_a_record", m.GetShouldBeARecord()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("uri", m.GetUri()) + 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 *PagesHealthCheck_domain) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCaaError sets the caa_error property value. The caa_error property +func (m *PagesHealthCheck_domain) SetCaaError(value *string)() { + m.caa_error = value +} +// SetDnsResolves sets the dns_resolves property value. The dns_resolves property +func (m *PagesHealthCheck_domain) SetDnsResolves(value *bool)() { + m.dns_resolves = value +} +// SetEnforcesHttps sets the enforces_https property value. The enforces_https property +func (m *PagesHealthCheck_domain) SetEnforcesHttps(value *bool)() { + m.enforces_https = value +} +// SetHasCnameRecord sets the has_cname_record property value. The has_cname_record property +func (m *PagesHealthCheck_domain) SetHasCnameRecord(value *bool)() { + m.has_cname_record = value +} +// SetHasMxRecordsPresent sets the has_mx_records_present property value. The has_mx_records_present property +func (m *PagesHealthCheck_domain) SetHasMxRecordsPresent(value *bool)() { + m.has_mx_records_present = value +} +// SetHost sets the host property value. The host property +func (m *PagesHealthCheck_domain) SetHost(value *string)() { + m.host = value +} +// SetHttpsError sets the https_error property value. The https_error property +func (m *PagesHealthCheck_domain) SetHttpsError(value *string)() { + m.https_error = value +} +// SetIsApexDomain sets the is_apex_domain property value. The is_apex_domain property +func (m *PagesHealthCheck_domain) SetIsApexDomain(value *bool)() { + m.is_apex_domain = value +} +// SetIsARecord sets the is_a_record property value. The is_a_record property +func (m *PagesHealthCheck_domain) SetIsARecord(value *bool)() { + m.is_a_record = value +} +// SetIsCloudflareIp sets the is_cloudflare_ip property value. The is_cloudflare_ip property +func (m *PagesHealthCheck_domain) SetIsCloudflareIp(value *bool)() { + m.is_cloudflare_ip = value +} +// SetIsCnameToFastly sets the is_cname_to_fastly property value. The is_cname_to_fastly property +func (m *PagesHealthCheck_domain) SetIsCnameToFastly(value *bool)() { + m.is_cname_to_fastly = value +} +// SetIsCnameToGithubUserDomain sets the is_cname_to_github_user_domain property value. The is_cname_to_github_user_domain property +func (m *PagesHealthCheck_domain) SetIsCnameToGithubUserDomain(value *bool)() { + m.is_cname_to_github_user_domain = value +} +// SetIsCnameToPagesDotGithubDotCom sets the is_cname_to_pages_dot_github_dot_com property value. The is_cname_to_pages_dot_github_dot_com property +func (m *PagesHealthCheck_domain) SetIsCnameToPagesDotGithubDotCom(value *bool)() { + m.is_cname_to_pages_dot_github_dot_com = value +} +// SetIsFastlyIp sets the is_fastly_ip property value. The is_fastly_ip property +func (m *PagesHealthCheck_domain) SetIsFastlyIp(value *bool)() { + m.is_fastly_ip = value +} +// SetIsHttpsEligible sets the is_https_eligible property value. The is_https_eligible property +func (m *PagesHealthCheck_domain) SetIsHttpsEligible(value *bool)() { + m.is_https_eligible = value +} +// SetIsNonGithubPagesIpPresent sets the is_non_github_pages_ip_present property value. The is_non_github_pages_ip_present property +func (m *PagesHealthCheck_domain) SetIsNonGithubPagesIpPresent(value *bool)() { + m.is_non_github_pages_ip_present = value +} +// SetIsOldIpAddress sets the is_old_ip_address property value. The is_old_ip_address property +func (m *PagesHealthCheck_domain) SetIsOldIpAddress(value *bool)() { + m.is_old_ip_address = value +} +// SetIsPagesDomain sets the is_pages_domain property value. The is_pages_domain property +func (m *PagesHealthCheck_domain) SetIsPagesDomain(value *bool)() { + m.is_pages_domain = value +} +// SetIsPointedToGithubPagesIp sets the is_pointed_to_github_pages_ip property value. The is_pointed_to_github_pages_ip property +func (m *PagesHealthCheck_domain) SetIsPointedToGithubPagesIp(value *bool)() { + m.is_pointed_to_github_pages_ip = value +} +// SetIsProxied sets the is_proxied property value. The is_proxied property +func (m *PagesHealthCheck_domain) SetIsProxied(value *bool)() { + m.is_proxied = value +} +// SetIsServedByPages sets the is_served_by_pages property value. The is_served_by_pages property +func (m *PagesHealthCheck_domain) SetIsServedByPages(value *bool)() { + m.is_served_by_pages = value +} +// SetIsValid sets the is_valid property value. The is_valid property +func (m *PagesHealthCheck_domain) SetIsValid(value *bool)() { + m.is_valid = value +} +// SetIsValidDomain sets the is_valid_domain property value. The is_valid_domain property +func (m *PagesHealthCheck_domain) SetIsValidDomain(value *bool)() { + m.is_valid_domain = value +} +// SetNameservers sets the nameservers property value. The nameservers property +func (m *PagesHealthCheck_domain) SetNameservers(value *string)() { + m.nameservers = value +} +// SetReason sets the reason property value. The reason property +func (m *PagesHealthCheck_domain) SetReason(value *string)() { + m.reason = value +} +// SetRespondsToHttps sets the responds_to_https property value. The responds_to_https property +func (m *PagesHealthCheck_domain) SetRespondsToHttps(value *bool)() { + m.responds_to_https = value +} +// SetShouldBeARecord sets the should_be_a_record property value. The should_be_a_record property +func (m *PagesHealthCheck_domain) SetShouldBeARecord(value *bool)() { + m.should_be_a_record = value +} +// SetUri sets the uri property value. The uri property +func (m *PagesHealthCheck_domain) SetUri(value *string)() { + m.uri = value +} +type PagesHealthCheck_domainable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCaaError()(*string) + GetDnsResolves()(*bool) + GetEnforcesHttps()(*bool) + GetHasCnameRecord()(*bool) + GetHasMxRecordsPresent()(*bool) + GetHost()(*string) + GetHttpsError()(*string) + GetIsApexDomain()(*bool) + GetIsARecord()(*bool) + GetIsCloudflareIp()(*bool) + GetIsCnameToFastly()(*bool) + GetIsCnameToGithubUserDomain()(*bool) + GetIsCnameToPagesDotGithubDotCom()(*bool) + GetIsFastlyIp()(*bool) + GetIsHttpsEligible()(*bool) + GetIsNonGithubPagesIpPresent()(*bool) + GetIsOldIpAddress()(*bool) + GetIsPagesDomain()(*bool) + GetIsPointedToGithubPagesIp()(*bool) + GetIsProxied()(*bool) + GetIsServedByPages()(*bool) + GetIsValid()(*bool) + GetIsValidDomain()(*bool) + GetNameservers()(*string) + GetReason()(*string) + GetRespondsToHttps()(*bool) + GetShouldBeARecord()(*bool) + GetUri()(*string) + SetCaaError(value *string)() + SetDnsResolves(value *bool)() + SetEnforcesHttps(value *bool)() + SetHasCnameRecord(value *bool)() + SetHasMxRecordsPresent(value *bool)() + SetHost(value *string)() + SetHttpsError(value *string)() + SetIsApexDomain(value *bool)() + SetIsARecord(value *bool)() + SetIsCloudflareIp(value *bool)() + SetIsCnameToFastly(value *bool)() + SetIsCnameToGithubUserDomain(value *bool)() + SetIsCnameToPagesDotGithubDotCom(value *bool)() + SetIsFastlyIp(value *bool)() + SetIsHttpsEligible(value *bool)() + SetIsNonGithubPagesIpPresent(value *bool)() + SetIsOldIpAddress(value *bool)() + SetIsPagesDomain(value *bool)() + SetIsPointedToGithubPagesIp(value *bool)() + SetIsProxied(value *bool)() + SetIsServedByPages(value *bool)() + SetIsValid(value *bool)() + SetIsValidDomain(value *bool)() + SetNameservers(value *string)() + SetReason(value *string)() + SetRespondsToHttps(value *bool)() + SetShouldBeARecord(value *bool)() + SetUri(value *string)() +} diff --git a/pkg/github/models/pages_https_certificate.go b/pkg/github/models/pages_https_certificate.go new file mode 100644 index 0000000..7847341 --- /dev/null +++ b/pkg/github/models/pages_https_certificate.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PagesHttpsCertificate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // Array of the domain set and its alternate name (if it is configured) + domains []string + // The expires_at property + expires_at *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The state property + state *PagesHttpsCertificate_state +} +// NewPagesHttpsCertificate instantiates a new PagesHttpsCertificate and sets the default values. +func NewPagesHttpsCertificate()(*PagesHttpsCertificate) { + m := &PagesHttpsCertificate{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePagesHttpsCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePagesHttpsCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPagesHttpsCertificate(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PagesHttpsCertificate) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *PagesHttpsCertificate) GetDescription()(*string) { + return m.description +} +// GetDomains gets the domains property value. Array of the domain set and its alternate name (if it is configured) +// returns a []string when successful +func (m *PagesHttpsCertificate) GetDomains()([]string) { + return m.domains +} +// GetExpiresAt gets the expires_at property value. The expires_at property +// returns a *DateOnly when successful +func (m *PagesHttpsCertificate) GetExpiresAt()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.expires_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PagesHttpsCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetDomains(res) + } + return nil + } + res["expires_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiresAt(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePagesHttpsCertificate_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*PagesHttpsCertificate_state)) + } + return nil + } + return res +} +// GetState gets the state property value. The state property +// returns a *PagesHttpsCertificate_state when successful +func (m *PagesHttpsCertificate) GetState()(*PagesHttpsCertificate_state) { + return m.state +} +// Serialize serializes information the current object +func (m *PagesHttpsCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err := writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("expires_at", m.GetExpiresAt()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PagesHttpsCertificate) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *PagesHttpsCertificate) SetDescription(value *string)() { + m.description = value +} +// SetDomains sets the domains property value. Array of the domain set and its alternate name (if it is configured) +func (m *PagesHttpsCertificate) SetDomains(value []string)() { + m.domains = value +} +// SetExpiresAt sets the expires_at property value. The expires_at property +func (m *PagesHttpsCertificate) SetExpiresAt(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.expires_at = value +} +// SetState sets the state property value. The state property +func (m *PagesHttpsCertificate) SetState(value *PagesHttpsCertificate_state)() { + m.state = value +} +type PagesHttpsCertificateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDomains()([]string) + GetExpiresAt()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetState()(*PagesHttpsCertificate_state) + SetDescription(value *string)() + SetDomains(value []string)() + SetExpiresAt(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetState(value *PagesHttpsCertificate_state)() +} diff --git a/pkg/github/models/pages_https_certificate_state.go b/pkg/github/models/pages_https_certificate_state.go new file mode 100644 index 0000000..8973a06 --- /dev/null +++ b/pkg/github/models/pages_https_certificate_state.go @@ -0,0 +1,66 @@ +package models +import ( + "errors" +) +type PagesHttpsCertificate_state int + +const ( + NEW_PAGESHTTPSCERTIFICATE_STATE PagesHttpsCertificate_state = iota + AUTHORIZATION_CREATED_PAGESHTTPSCERTIFICATE_STATE + AUTHORIZATION_PENDING_PAGESHTTPSCERTIFICATE_STATE + AUTHORIZED_PAGESHTTPSCERTIFICATE_STATE + AUTHORIZATION_REVOKED_PAGESHTTPSCERTIFICATE_STATE + ISSUED_PAGESHTTPSCERTIFICATE_STATE + UPLOADED_PAGESHTTPSCERTIFICATE_STATE + APPROVED_PAGESHTTPSCERTIFICATE_STATE + ERRORED_PAGESHTTPSCERTIFICATE_STATE + BAD_AUTHZ_PAGESHTTPSCERTIFICATE_STATE + DESTROY_PENDING_PAGESHTTPSCERTIFICATE_STATE + DNS_CHANGED_PAGESHTTPSCERTIFICATE_STATE +) + +func (i PagesHttpsCertificate_state) String() string { + return []string{"new", "authorization_created", "authorization_pending", "authorized", "authorization_revoked", "issued", "uploaded", "approved", "errored", "bad_authz", "destroy_pending", "dns_changed"}[i] +} +func ParsePagesHttpsCertificate_state(v string) (any, error) { + result := NEW_PAGESHTTPSCERTIFICATE_STATE + switch v { + case "new": + result = NEW_PAGESHTTPSCERTIFICATE_STATE + case "authorization_created": + result = AUTHORIZATION_CREATED_PAGESHTTPSCERTIFICATE_STATE + case "authorization_pending": + result = AUTHORIZATION_PENDING_PAGESHTTPSCERTIFICATE_STATE + case "authorized": + result = AUTHORIZED_PAGESHTTPSCERTIFICATE_STATE + case "authorization_revoked": + result = AUTHORIZATION_REVOKED_PAGESHTTPSCERTIFICATE_STATE + case "issued": + result = ISSUED_PAGESHTTPSCERTIFICATE_STATE + case "uploaded": + result = UPLOADED_PAGESHTTPSCERTIFICATE_STATE + case "approved": + result = APPROVED_PAGESHTTPSCERTIFICATE_STATE + case "errored": + result = ERRORED_PAGESHTTPSCERTIFICATE_STATE + case "bad_authz": + result = BAD_AUTHZ_PAGESHTTPSCERTIFICATE_STATE + case "destroy_pending": + result = DESTROY_PENDING_PAGESHTTPSCERTIFICATE_STATE + case "dns_changed": + result = DNS_CHANGED_PAGESHTTPSCERTIFICATE_STATE + default: + return 0, errors.New("Unknown PagesHttpsCertificate_state value: " + v) + } + return &result, nil +} +func SerializePagesHttpsCertificate_state(values []PagesHttpsCertificate_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PagesHttpsCertificate_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pages_source_hash.go b/pkg/github/models/pages_source_hash.go new file mode 100644 index 0000000..6cdc5ba --- /dev/null +++ b/pkg/github/models/pages_source_hash.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PagesSourceHash struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The branch property + branch *string + // The path property + path *string +} +// NewPagesSourceHash instantiates a new PagesSourceHash and sets the default values. +func NewPagesSourceHash()(*PagesSourceHash) { + m := &PagesSourceHash{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePagesSourceHashFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePagesSourceHashFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPagesSourceHash(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PagesSourceHash) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBranch gets the branch property value. The branch property +// returns a *string when successful +func (m *PagesSourceHash) GetBranch()(*string) { + return m.branch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PagesSourceHash) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *PagesSourceHash) GetPath()(*string) { + return m.path +} +// Serialize serializes information the current object +func (m *PagesSourceHash) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("branch", m.GetBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + 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 *PagesSourceHash) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBranch sets the branch property value. The branch property +func (m *PagesSourceHash) SetBranch(value *string)() { + m.branch = value +} +// SetPath sets the path property value. The path property +func (m *PagesSourceHash) SetPath(value *string)() { + m.path = value +} +type PagesSourceHashable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBranch()(*string) + GetPath()(*string) + SetBranch(value *string)() + SetPath(value *string)() +} diff --git a/pkg/github/models/participation_stats.go b/pkg/github/models/participation_stats.go new file mode 100644 index 0000000..1461c7b --- /dev/null +++ b/pkg/github/models/participation_stats.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ParticipationStats struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The all property + all []int32 + // The owner property + owner []int32 +} +// NewParticipationStats instantiates a new ParticipationStats and sets the default values. +func NewParticipationStats()(*ParticipationStats) { + m := &ParticipationStats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateParticipationStatsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateParticipationStatsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipationStats(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ParticipationStats) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAll gets the all property value. The all property +// returns a []int32 when successful +func (m *ParticipationStats) GetAll()([]int32) { + return m.all +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ParticipationStats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["all"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetAll(res) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetOwner(res) + } + return nil + } + return res +} +// GetOwner gets the owner property value. The owner property +// returns a []int32 when successful +func (m *ParticipationStats) GetOwner()([]int32) { + return m.owner +} +// Serialize serializes information the current object +func (m *ParticipationStats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAll() != nil { + err := writer.WriteCollectionOfInt32Values("all", m.GetAll()) + if err != nil { + return err + } + } + if m.GetOwner() != nil { + err := writer.WriteCollectionOfInt32Values("owner", m.GetOwner()) + 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 *ParticipationStats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAll sets the all property value. The all property +func (m *ParticipationStats) SetAll(value []int32)() { + m.all = value +} +// SetOwner sets the owner property value. The owner property +func (m *ParticipationStats) SetOwner(value []int32)() { + m.owner = value +} +type ParticipationStatsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAll()([]int32) + GetOwner()([]int32) + SetAll(value []int32)() + SetOwner(value []int32)() +} diff --git a/pkg/github/models/patch_schema.go b/pkg/github/models/patch_schema.go new file mode 100644 index 0000000..487c799 --- /dev/null +++ b/pkg/github/models/patch_schema.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PatchSchema struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // patch operations list + operations []PatchSchema_Operationsable + // The schemas property + schemas []PatchSchema_schemas +} +// NewPatchSchema instantiates a new PatchSchema and sets the default values. +func NewPatchSchema()(*PatchSchema) { + m := &PatchSchema{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePatchSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePatchSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPatchSchema(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PatchSchema) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PatchSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["Operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePatchSchema_OperationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PatchSchema_Operationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PatchSchema_Operationsable) + } + } + m.SetOperations(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePatchSchema_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]PatchSchema_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*PatchSchema_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + return res +} +// GetOperations gets the Operations property value. patch operations list +// returns a []PatchSchema_Operationsable when successful +func (m *PatchSchema) GetOperations()([]PatchSchema_Operationsable) { + return m.operations +} +// GetSchemas gets the schemas property value. The schemas property +// returns a []PatchSchema_schemas when successful +func (m *PatchSchema) GetSchemas()([]PatchSchema_schemas) { + return m.schemas +} +// Serialize serializes information the current object +func (m *PatchSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("Operations", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializePatchSchema_schemas(m.GetSchemas())) + 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 *PatchSchema) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOperations sets the Operations property value. patch operations list +func (m *PatchSchema) SetOperations(value []PatchSchema_Operationsable)() { + m.operations = value +} +// SetSchemas sets the schemas property value. The schemas property +func (m *PatchSchema) SetSchemas(value []PatchSchema_schemas)() { + m.schemas = value +} +type PatchSchemaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOperations()([]PatchSchema_Operationsable) + GetSchemas()([]PatchSchema_schemas) + SetOperations(value []PatchSchema_Operationsable)() + SetSchemas(value []PatchSchema_schemas)() +} diff --git a/pkg/github/models/patch_schema_operations.go b/pkg/github/models/patch_schema_operations.go new file mode 100644 index 0000000..f937dd1 --- /dev/null +++ b/pkg/github/models/patch_schema_operations.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PatchSchema_Operations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The op property + op *PatchSchema_Operations_op + // The path property + path *string + // Corresponding 'value' of that field specified by 'path' + value *string +} +// NewPatchSchema_Operations instantiates a new PatchSchema_Operations and sets the default values. +func NewPatchSchema_Operations()(*PatchSchema_Operations) { + m := &PatchSchema_Operations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePatchSchema_OperationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePatchSchema_OperationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPatchSchema_Operations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PatchSchema_Operations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PatchSchema_Operations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["op"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePatchSchema_Operations_op) + if err != nil { + return err + } + if val != nil { + m.SetOp(val.(*PatchSchema_Operations_op)) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetOp gets the op property value. The op property +// returns a *PatchSchema_Operations_op when successful +func (m *PatchSchema_Operations) GetOp()(*PatchSchema_Operations_op) { + return m.op +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *PatchSchema_Operations) GetPath()(*string) { + return m.path +} +// GetValue gets the value property value. Corresponding 'value' of that field specified by 'path' +// returns a *string when successful +func (m *PatchSchema_Operations) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *PatchSchema_Operations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOp() != nil { + cast := (*m.GetOp()).String() + err := writer.WriteStringValue("op", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *PatchSchema_Operations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOp sets the op property value. The op property +func (m *PatchSchema_Operations) SetOp(value *PatchSchema_Operations_op)() { + m.op = value +} +// SetPath sets the path property value. The path property +func (m *PatchSchema_Operations) SetPath(value *string)() { + m.path = value +} +// SetValue sets the value property value. Corresponding 'value' of that field specified by 'path' +func (m *PatchSchema_Operations) SetValue(value *string)() { + m.value = value +} +type PatchSchema_Operationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOp()(*PatchSchema_Operations_op) + GetPath()(*string) + GetValue()(*string) + SetOp(value *PatchSchema_Operations_op)() + SetPath(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/patch_schema_operations_op.go b/pkg/github/models/patch_schema_operations_op.go new file mode 100644 index 0000000..dca5682 --- /dev/null +++ b/pkg/github/models/patch_schema_operations_op.go @@ -0,0 +1,39 @@ +package models +import ( + "errors" +) +type PatchSchema_Operations_op int + +const ( + ADD_PATCHSCHEMA_OPERATIONS_OP PatchSchema_Operations_op = iota + REPLACE_PATCHSCHEMA_OPERATIONS_OP + REMOVE_PATCHSCHEMA_OPERATIONS_OP +) + +func (i PatchSchema_Operations_op) String() string { + return []string{"add", "replace", "remove"}[i] +} +func ParsePatchSchema_Operations_op(v string) (any, error) { + result := ADD_PATCHSCHEMA_OPERATIONS_OP + switch v { + case "add": + result = ADD_PATCHSCHEMA_OPERATIONS_OP + case "replace": + result = REPLACE_PATCHSCHEMA_OPERATIONS_OP + case "remove": + result = REMOVE_PATCHSCHEMA_OPERATIONS_OP + default: + return 0, errors.New("Unknown PatchSchema_Operations_op value: " + v) + } + return &result, nil +} +func SerializePatchSchema_Operations_op(values []PatchSchema_Operations_op) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PatchSchema_Operations_op) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/patch_schema_schemas.go b/pkg/github/models/patch_schema_schemas.go new file mode 100644 index 0000000..6879bab --- /dev/null +++ b/pkg/github/models/patch_schema_schemas.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type PatchSchema_schemas int + +const ( + URNIETFPARAMSSCIMAPIMESSAGES20PATCHOP_PATCHSCHEMA_SCHEMAS PatchSchema_schemas = iota +) + +func (i PatchSchema_schemas) String() string { + return []string{"urn:ietf:params:scim:api:messages:2.0:PatchOp"}[i] +} +func ParsePatchSchema_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMAPIMESSAGES20PATCHOP_PATCHSCHEMA_SCHEMAS + switch v { + case "urn:ietf:params:scim:api:messages:2.0:PatchOp": + result = URNIETFPARAMSSCIMAPIMESSAGES20PATCHOP_PATCHSCHEMA_SCHEMAS + default: + return 0, errors.New("Unknown PatchSchema_schemas value: " + v) + } + return &result, nil +} +func SerializePatchSchema_schemas(values []PatchSchema_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PatchSchema_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pending_deployment.go b/pkg/github/models/pending_deployment.go new file mode 100644 index 0000000..c63faab --- /dev/null +++ b/pkg/github/models/pending_deployment.go @@ -0,0 +1,210 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PendingDeployment details of a deployment that is waiting for protection rules to pass +type PendingDeployment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the currently authenticated user can approve the deployment + current_user_can_approve *bool + // The environment property + environment PendingDeployment_environmentable + // The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + reviewers []PendingDeployment_reviewersable + // The set duration of the wait timer + wait_timer *int32 + // The time that the wait timer began. + wait_timer_started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPendingDeployment instantiates a new PendingDeployment and sets the default values. +func NewPendingDeployment()(*PendingDeployment) { + m := &PendingDeployment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePendingDeploymentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePendingDeploymentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPendingDeployment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PendingDeployment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCurrentUserCanApprove gets the current_user_can_approve property value. Whether the currently authenticated user can approve the deployment +// returns a *bool when successful +func (m *PendingDeployment) GetCurrentUserCanApprove()(*bool) { + return m.current_user_can_approve +} +// GetEnvironment gets the environment property value. The environment property +// returns a PendingDeployment_environmentable when successful +func (m *PendingDeployment) GetEnvironment()(PendingDeployment_environmentable) { + return m.environment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PendingDeployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["current_user_can_approve"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserCanApprove(val) + } + return nil + } + res["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePendingDeployment_environmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val.(PendingDeployment_environmentable)) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePendingDeployment_reviewersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PendingDeployment_reviewersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PendingDeployment_reviewersable) + } + } + m.SetReviewers(res) + } + return nil + } + res["wait_timer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWaitTimer(val) + } + return nil + } + res["wait_timer_started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWaitTimerStartedAt(val) + } + return nil + } + return res +} +// GetReviewers gets the reviewers property value. The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +// returns a []PendingDeployment_reviewersable when successful +func (m *PendingDeployment) GetReviewers()([]PendingDeployment_reviewersable) { + return m.reviewers +} +// GetWaitTimer gets the wait_timer property value. The set duration of the wait timer +// returns a *int32 when successful +func (m *PendingDeployment) GetWaitTimer()(*int32) { + return m.wait_timer +} +// GetWaitTimerStartedAt gets the wait_timer_started_at property value. The time that the wait timer began. +// returns a *Time when successful +func (m *PendingDeployment) GetWaitTimerStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.wait_timer_started_at +} +// Serialize serializes information the current object +func (m *PendingDeployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("current_user_can_approve", m.GetCurrentUserCanApprove()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("wait_timer", m.GetWaitTimer()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("wait_timer_started_at", m.GetWaitTimerStartedAt()) + 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 *PendingDeployment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCurrentUserCanApprove sets the current_user_can_approve property value. Whether the currently authenticated user can approve the deployment +func (m *PendingDeployment) SetCurrentUserCanApprove(value *bool)() { + m.current_user_can_approve = value +} +// SetEnvironment sets the environment property value. The environment property +func (m *PendingDeployment) SetEnvironment(value PendingDeployment_environmentable)() { + m.environment = value +} +// SetReviewers sets the reviewers property value. The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +func (m *PendingDeployment) SetReviewers(value []PendingDeployment_reviewersable)() { + m.reviewers = value +} +// SetWaitTimer sets the wait_timer property value. The set duration of the wait timer +func (m *PendingDeployment) SetWaitTimer(value *int32)() { + m.wait_timer = value +} +// SetWaitTimerStartedAt sets the wait_timer_started_at property value. The time that the wait timer began. +func (m *PendingDeployment) SetWaitTimerStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.wait_timer_started_at = value +} +type PendingDeploymentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentUserCanApprove()(*bool) + GetEnvironment()(PendingDeployment_environmentable) + GetReviewers()([]PendingDeployment_reviewersable) + GetWaitTimer()(*int32) + GetWaitTimerStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCurrentUserCanApprove(value *bool)() + SetEnvironment(value PendingDeployment_environmentable)() + SetReviewers(value []PendingDeployment_reviewersable)() + SetWaitTimer(value *int32)() + SetWaitTimerStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/pending_deployment_environment.go b/pkg/github/models/pending_deployment_environment.go new file mode 100644 index 0000000..2c386d4 --- /dev/null +++ b/pkg/github/models/pending_deployment_environment.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PendingDeployment_environment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // The id of the environment. + id *int64 + // The name of the environment. + name *string + // The node_id property + node_id *string + // The url property + url *string +} +// NewPendingDeployment_environment instantiates a new PendingDeployment_environment and sets the default values. +func NewPendingDeployment_environment()(*PendingDeployment_environment) { + m := &PendingDeployment_environment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePendingDeployment_environmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePendingDeployment_environmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPendingDeployment_environment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PendingDeployment_environment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PendingDeployment_environment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PendingDeployment_environment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id of the environment. +// returns a *int64 when successful +func (m *PendingDeployment_environment) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name of the environment. +// returns a *string when successful +func (m *PendingDeployment_environment) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PendingDeployment_environment) GetNodeId()(*string) { + return m.node_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PendingDeployment_environment) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PendingDeployment_environment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PendingDeployment_environment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PendingDeployment_environment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id of the environment. +func (m *PendingDeployment_environment) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name of the environment. +func (m *PendingDeployment_environment) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PendingDeployment_environment) SetNodeId(value *string)() { + m.node_id = value +} +// SetUrl sets the url property value. The url property +func (m *PendingDeployment_environment) SetUrl(value *string)() { + m.url = value +} +type PendingDeployment_environmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetId()(*int64) + GetName()(*string) + GetNodeId()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetName(value *string)() + SetNodeId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pending_deployment_reviewers.go b/pkg/github/models/pending_deployment_reviewers.go new file mode 100644 index 0000000..0905181 --- /dev/null +++ b/pkg/github/models/pending_deployment_reviewers.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PendingDeployment_reviewers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The reviewer property + reviewer PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable + // The type of reviewer. + typeEscaped *DeploymentReviewerType +} +// PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer composed type wrapper for classes SimpleUserable, Teamable +type PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer struct { + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable + // Composed type representation for type Teamable + team Teamable +} +// NewPendingDeployment_reviewers_PendingDeployment_reviewers_reviewer instantiates a new PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer and sets the default values. +func NewPendingDeployment_reviewers_PendingDeployment_reviewers_reviewer()(*PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) { + m := &PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer{ + } + return m +} +// CreatePendingDeployment_reviewers_PendingDeployment_reviewers_reviewerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePendingDeployment_reviewers_PendingDeployment_reviewers_reviewerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewPendingDeployment_reviewers_PendingDeployment_reviewers_reviewer() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateSimpleUserFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(SimpleUserable); ok { + result.SetSimpleUser(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTeamFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(Teamable); ok { + result.SetTeam(cast) + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// GetTeam gets the team property value. Composed type representation for type Teamable +// returns a Teamable when successful +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) GetTeam()(Teamable) { + return m.team +} +// Serialize serializes information the current object +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } else if m.GetTeam() != nil { + err := writer.WriteObjectValue("", m.GetTeam()) + if err != nil { + return err + } + } + return nil +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +// SetTeam sets the team property value. Composed type representation for type Teamable +func (m *PendingDeployment_reviewers_PendingDeployment_reviewers_reviewer) SetTeam(value Teamable)() { + m.team = value +} +type PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSimpleUser()(SimpleUserable) + GetTeam()(Teamable) + SetSimpleUser(value SimpleUserable)() + SetTeam(value Teamable)() +} +// NewPendingDeployment_reviewers instantiates a new PendingDeployment_reviewers and sets the default values. +func NewPendingDeployment_reviewers()(*PendingDeployment_reviewers) { + m := &PendingDeployment_reviewers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePendingDeployment_reviewersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePendingDeployment_reviewersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPendingDeployment_reviewers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PendingDeployment_reviewers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PendingDeployment_reviewers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePendingDeployment_reviewers_PendingDeployment_reviewers_reviewerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewer(val.(PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentReviewerType) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*DeploymentReviewerType)) + } + return nil + } + return res +} +// GetReviewer gets the reviewer property value. The reviewer property +// returns a PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable when successful +func (m *PendingDeployment_reviewers) GetReviewer()(PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable) { + return m.reviewer +} +// GetTypeEscaped gets the type property value. The type of reviewer. +// returns a *DeploymentReviewerType when successful +func (m *PendingDeployment_reviewers) GetTypeEscaped()(*DeploymentReviewerType) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *PendingDeployment_reviewers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("reviewer", m.GetReviewer()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PendingDeployment_reviewers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReviewer sets the reviewer property value. The reviewer property +func (m *PendingDeployment_reviewers) SetReviewer(value PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable)() { + m.reviewer = value +} +// SetTypeEscaped sets the type property value. The type of reviewer. +func (m *PendingDeployment_reviewers) SetTypeEscaped(value *DeploymentReviewerType)() { + m.typeEscaped = value +} +type PendingDeployment_reviewersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReviewer()(PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable) + GetTypeEscaped()(*DeploymentReviewerType) + SetReviewer(value PendingDeployment_reviewers_PendingDeployment_reviewers_reviewerable)() + SetTypeEscaped(value *DeploymentReviewerType)() +} diff --git a/pkg/github/models/porter_author.go b/pkg/github/models/porter_author.go new file mode 100644 index 0000000..193f0bb --- /dev/null +++ b/pkg/github/models/porter_author.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PorterAuthor porter Author +type PorterAuthor struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email property + email *string + // The id property + id *int32 + // The import_url property + import_url *string + // The name property + name *string + // The remote_id property + remote_id *string + // The remote_name property + remote_name *string + // The url property + url *string +} +// NewPorterAuthor instantiates a new PorterAuthor and sets the default values. +func NewPorterAuthor()(*PorterAuthor) { + m := &PorterAuthor{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePorterAuthorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePorterAuthorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPorterAuthor(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PorterAuthor) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *PorterAuthor) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PorterAuthor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["import_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImportUrl(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["remote_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteId(val) + } + return nil + } + res["remote_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *PorterAuthor) GetId()(*int32) { + return m.id +} +// GetImportUrl gets the import_url property value. The import_url property +// returns a *string when successful +func (m *PorterAuthor) GetImportUrl()(*string) { + return m.import_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PorterAuthor) GetName()(*string) { + return m.name +} +// GetRemoteId gets the remote_id property value. The remote_id property +// returns a *string when successful +func (m *PorterAuthor) GetRemoteId()(*string) { + return m.remote_id +} +// GetRemoteName gets the remote_name property value. The remote_name property +// returns a *string when successful +func (m *PorterAuthor) GetRemoteName()(*string) { + return m.remote_name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PorterAuthor) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PorterAuthor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("import_url", m.GetImportUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remote_id", m.GetRemoteId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remote_name", m.GetRemoteName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PorterAuthor) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email property +func (m *PorterAuthor) SetEmail(value *string)() { + m.email = value +} +// SetId sets the id property value. The id property +func (m *PorterAuthor) SetId(value *int32)() { + m.id = value +} +// SetImportUrl sets the import_url property value. The import_url property +func (m *PorterAuthor) SetImportUrl(value *string)() { + m.import_url = value +} +// SetName sets the name property value. The name property +func (m *PorterAuthor) SetName(value *string)() { + m.name = value +} +// SetRemoteId sets the remote_id property value. The remote_id property +func (m *PorterAuthor) SetRemoteId(value *string)() { + m.remote_id = value +} +// SetRemoteName sets the remote_name property value. The remote_name property +func (m *PorterAuthor) SetRemoteName(value *string)() { + m.remote_name = value +} +// SetUrl sets the url property value. The url property +func (m *PorterAuthor) SetUrl(value *string)() { + m.url = value +} +type PorterAuthorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetId()(*int32) + GetImportUrl()(*string) + GetName()(*string) + GetRemoteId()(*string) + GetRemoteName()(*string) + GetUrl()(*string) + SetEmail(value *string)() + SetId(value *int32)() + SetImportUrl(value *string)() + SetName(value *string)() + SetRemoteId(value *string)() + SetRemoteName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/porter_large_file.go b/pkg/github/models/porter_large_file.go new file mode 100644 index 0000000..2a0c7b1 --- /dev/null +++ b/pkg/github/models/porter_large_file.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PorterLargeFile porter Large File +type PorterLargeFile struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The oid property + oid *string + // The path property + path *string + // The ref_name property + ref_name *string + // The size property + size *int32 +} +// NewPorterLargeFile instantiates a new PorterLargeFile and sets the default values. +func NewPorterLargeFile()(*PorterLargeFile) { + m := &PorterLargeFile{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePorterLargeFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePorterLargeFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPorterLargeFile(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PorterLargeFile) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PorterLargeFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["oid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOid(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["ref_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRefName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetOid gets the oid property value. The oid property +// returns a *string when successful +func (m *PorterLargeFile) GetOid()(*string) { + return m.oid +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *PorterLargeFile) GetPath()(*string) { + return m.path +} +// GetRefName gets the ref_name property value. The ref_name property +// returns a *string when successful +func (m *PorterLargeFile) GetRefName()(*string) { + return m.ref_name +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *PorterLargeFile) GetSize()(*int32) { + return m.size +} +// Serialize serializes information the current object +func (m *PorterLargeFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("oid", m.GetOid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref_name", m.GetRefName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + 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 *PorterLargeFile) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOid sets the oid property value. The oid property +func (m *PorterLargeFile) SetOid(value *string)() { + m.oid = value +} +// SetPath sets the path property value. The path property +func (m *PorterLargeFile) SetPath(value *string)() { + m.path = value +} +// SetRefName sets the ref_name property value. The ref_name property +func (m *PorterLargeFile) SetRefName(value *string)() { + m.ref_name = value +} +// SetSize sets the size property value. The size property +func (m *PorterLargeFile) SetSize(value *int32)() { + m.size = value +} +type PorterLargeFileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOid()(*string) + GetPath()(*string) + GetRefName()(*string) + GetSize()(*int32) + SetOid(value *string)() + SetPath(value *string)() + SetRefName(value *string)() + SetSize(value *int32)() +} diff --git a/pkg/github/models/private_user.go b/pkg/github/models/private_user.go new file mode 100644 index 0000000..8094664 --- /dev/null +++ b/pkg/github/models/private_user.go @@ -0,0 +1,1300 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivateUser private User +type PrivateUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The bio property + bio *string + // The blog property + blog *string + // The business_plus property + business_plus *bool + // The collaborators property + collaborators *int32 + // The company property + company *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The disk_usage property + disk_usage *int32 + // The email property + email *string + // The events_url property + events_url *string + // The followers property + followers *int32 + // The followers_url property + followers_url *string + // The following property + following *int32 + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The hireable property + hireable *bool + // The html_url property + html_url *string + // The id property + id *int64 + // The ldap_dn property + ldap_dn *string + // The location property + location *string + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The notification_email property + notification_email *string + // The organizations_url property + organizations_url *string + // The owned_private_repos property + owned_private_repos *int32 + // The plan property + plan PrivateUser_planable + // The private_gists property + private_gists *int32 + // The public_gists property + public_gists *int32 + // The public_repos property + public_repos *int32 + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The suspended_at property + suspended_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The total_private_repos property + total_private_repos *int32 + // The twitter_username property + twitter_username *string + // The two_factor_authentication property + two_factor_authentication *bool + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewPrivateUser instantiates a new PrivateUser and sets the default values. +func NewPrivateUser()(*PrivateUser) { + m := &PrivateUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePrivateUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePrivateUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivateUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PrivateUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *PrivateUser) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetBio gets the bio property value. The bio property +// returns a *string when successful +func (m *PrivateUser) GetBio()(*string) { + return m.bio +} +// GetBlog gets the blog property value. The blog property +// returns a *string when successful +func (m *PrivateUser) GetBlog()(*string) { + return m.blog +} +// GetBusinessPlus gets the business_plus property value. The business_plus property +// returns a *bool when successful +func (m *PrivateUser) GetBusinessPlus()(*bool) { + return m.business_plus +} +// GetCollaborators gets the collaborators property value. The collaborators property +// returns a *int32 when successful +func (m *PrivateUser) GetCollaborators()(*int32) { + return m.collaborators +} +// GetCompany gets the company property value. The company property +// returns a *string when successful +func (m *PrivateUser) GetCompany()(*string) { + return m.company +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PrivateUser) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiskUsage gets the disk_usage property value. The disk_usage property +// returns a *int32 when successful +func (m *PrivateUser) GetDiskUsage()(*int32) { + return m.disk_usage +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *PrivateUser) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PrivateUser) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PrivateUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["bio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBio(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["business_plus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBusinessPlus(val) + } + return nil + } + res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCollaborators(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["disk_usage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDiskUsage(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowing(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["hireable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHireable(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["ldap_dn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLdapDn(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationEmail(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["owned_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOwnedPrivateRepos(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivateUser_planFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(PrivateUser_planable)) + } + return nil + } + res["private_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateGists(val) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepos(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["suspended_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSuspendedAt(val) + } + return nil + } + res["total_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPrivateRepos(val) + } + return nil + } + res["twitter_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTwitterUsername(val) + } + return nil + } + res["two_factor_authentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTwoFactorAuthentication(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowers gets the followers property value. The followers property +// returns a *int32 when successful +func (m *PrivateUser) GetFollowers()(*int32) { + return m.followers +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *PrivateUser) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowing gets the following property value. The following property +// returns a *int32 when successful +func (m *PrivateUser) GetFollowing()(*int32) { + return m.following +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *PrivateUser) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *PrivateUser) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *PrivateUser) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHireable gets the hireable property value. The hireable property +// returns a *bool when successful +func (m *PrivateUser) GetHireable()(*bool) { + return m.hireable +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PrivateUser) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PrivateUser) GetId()(*int64) { + return m.id +} +// GetLdapDn gets the ldap_dn property value. The ldap_dn property +// returns a *string when successful +func (m *PrivateUser) GetLdapDn()(*string) { + return m.ldap_dn +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *PrivateUser) GetLocation()(*string) { + return m.location +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *PrivateUser) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PrivateUser) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PrivateUser) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationEmail gets the notification_email property value. The notification_email property +// returns a *string when successful +func (m *PrivateUser) GetNotificationEmail()(*string) { + return m.notification_email +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *PrivateUser) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetOwnedPrivateRepos gets the owned_private_repos property value. The owned_private_repos property +// returns a *int32 when successful +func (m *PrivateUser) GetOwnedPrivateRepos()(*int32) { + return m.owned_private_repos +} +// GetPlan gets the plan property value. The plan property +// returns a PrivateUser_planable when successful +func (m *PrivateUser) GetPlan()(PrivateUser_planable) { + return m.plan +} +// GetPrivateGists gets the private_gists property value. The private_gists property +// returns a *int32 when successful +func (m *PrivateUser) GetPrivateGists()(*int32) { + return m.private_gists +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *PrivateUser) GetPublicGists()(*int32) { + return m.public_gists +} +// GetPublicRepos gets the public_repos property value. The public_repos property +// returns a *int32 when successful +func (m *PrivateUser) GetPublicRepos()(*int32) { + return m.public_repos +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *PrivateUser) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *PrivateUser) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *PrivateUser) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *PrivateUser) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *PrivateUser) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetSuspendedAt gets the suspended_at property value. The suspended_at property +// returns a *Time when successful +func (m *PrivateUser) GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.suspended_at +} +// GetTotalPrivateRepos gets the total_private_repos property value. The total_private_repos property +// returns a *int32 when successful +func (m *PrivateUser) GetTotalPrivateRepos()(*int32) { + return m.total_private_repos +} +// GetTwitterUsername gets the twitter_username property value. The twitter_username property +// returns a *string when successful +func (m *PrivateUser) GetTwitterUsername()(*string) { + return m.twitter_username +} +// GetTwoFactorAuthentication gets the two_factor_authentication property value. The two_factor_authentication property +// returns a *bool when successful +func (m *PrivateUser) GetTwoFactorAuthentication()(*bool) { + return m.two_factor_authentication +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *PrivateUser) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PrivateUser) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PrivateUser) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PrivateUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bio", m.GetBio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("business_plus", m.GetBusinessPlus()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("collaborators", m.GetCollaborators()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("disk_usage", m.GetDiskUsage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("followers", m.GetFollowers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("following", m.GetFollowing()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hireable", m.GetHireable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ldap_dn", m.GetLdapDn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_email", m.GetNotificationEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("owned_private_repos", m.GetOwnedPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_gists", m.GetPrivateGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("suspended_at", m.GetSuspendedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_private_repos", m.GetTotalPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("twitter_username", m.GetTwitterUsername()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("two_factor_authentication", m.GetTwoFactorAuthentication()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PrivateUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *PrivateUser) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetBio sets the bio property value. The bio property +func (m *PrivateUser) SetBio(value *string)() { + m.bio = value +} +// SetBlog sets the blog property value. The blog property +func (m *PrivateUser) SetBlog(value *string)() { + m.blog = value +} +// SetBusinessPlus sets the business_plus property value. The business_plus property +func (m *PrivateUser) SetBusinessPlus(value *bool)() { + m.business_plus = value +} +// SetCollaborators sets the collaborators property value. The collaborators property +func (m *PrivateUser) SetCollaborators(value *int32)() { + m.collaborators = value +} +// SetCompany sets the company property value. The company property +func (m *PrivateUser) SetCompany(value *string)() { + m.company = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PrivateUser) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiskUsage sets the disk_usage property value. The disk_usage property +func (m *PrivateUser) SetDiskUsage(value *int32)() { + m.disk_usage = value +} +// SetEmail sets the email property value. The email property +func (m *PrivateUser) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PrivateUser) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowers sets the followers property value. The followers property +func (m *PrivateUser) SetFollowers(value *int32)() { + m.followers = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *PrivateUser) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowing sets the following property value. The following property +func (m *PrivateUser) SetFollowing(value *int32)() { + m.following = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *PrivateUser) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *PrivateUser) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *PrivateUser) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHireable sets the hireable property value. The hireable property +func (m *PrivateUser) SetHireable(value *bool)() { + m.hireable = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PrivateUser) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PrivateUser) SetId(value *int64)() { + m.id = value +} +// SetLdapDn sets the ldap_dn property value. The ldap_dn property +func (m *PrivateUser) SetLdapDn(value *string)() { + m.ldap_dn = value +} +// SetLocation sets the location property value. The location property +func (m *PrivateUser) SetLocation(value *string)() { + m.location = value +} +// SetLogin sets the login property value. The login property +func (m *PrivateUser) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *PrivateUser) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PrivateUser) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationEmail sets the notification_email property value. The notification_email property +func (m *PrivateUser) SetNotificationEmail(value *string)() { + m.notification_email = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *PrivateUser) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetOwnedPrivateRepos sets the owned_private_repos property value. The owned_private_repos property +func (m *PrivateUser) SetOwnedPrivateRepos(value *int32)() { + m.owned_private_repos = value +} +// SetPlan sets the plan property value. The plan property +func (m *PrivateUser) SetPlan(value PrivateUser_planable)() { + m.plan = value +} +// SetPrivateGists sets the private_gists property value. The private_gists property +func (m *PrivateUser) SetPrivateGists(value *int32)() { + m.private_gists = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *PrivateUser) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetPublicRepos sets the public_repos property value. The public_repos property +func (m *PrivateUser) SetPublicRepos(value *int32)() { + m.public_repos = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *PrivateUser) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *PrivateUser) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *PrivateUser) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *PrivateUser) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *PrivateUser) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetSuspendedAt sets the suspended_at property value. The suspended_at property +func (m *PrivateUser) SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.suspended_at = value +} +// SetTotalPrivateRepos sets the total_private_repos property value. The total_private_repos property +func (m *PrivateUser) SetTotalPrivateRepos(value *int32)() { + m.total_private_repos = value +} +// SetTwitterUsername sets the twitter_username property value. The twitter_username property +func (m *PrivateUser) SetTwitterUsername(value *string)() { + m.twitter_username = value +} +// SetTwoFactorAuthentication sets the two_factor_authentication property value. The two_factor_authentication property +func (m *PrivateUser) SetTwoFactorAuthentication(value *bool)() { + m.two_factor_authentication = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *PrivateUser) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PrivateUser) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PrivateUser) SetUrl(value *string)() { + m.url = value +} +type PrivateUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetBio()(*string) + GetBlog()(*string) + GetBusinessPlus()(*bool) + GetCollaborators()(*int32) + GetCompany()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiskUsage()(*int32) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowers()(*int32) + GetFollowersUrl()(*string) + GetFollowing()(*int32) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHireable()(*bool) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLdapDn()(*string) + GetLocation()(*string) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationEmail()(*string) + GetOrganizationsUrl()(*string) + GetOwnedPrivateRepos()(*int32) + GetPlan()(PrivateUser_planable) + GetPrivateGists()(*int32) + GetPublicGists()(*int32) + GetPublicRepos()(*int32) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTotalPrivateRepos()(*int32) + GetTwitterUsername()(*string) + GetTwoFactorAuthentication()(*bool) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetBio(value *string)() + SetBlog(value *string)() + SetBusinessPlus(value *bool)() + SetCollaborators(value *int32)() + SetCompany(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiskUsage(value *int32)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowers(value *int32)() + SetFollowersUrl(value *string)() + SetFollowing(value *int32)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHireable(value *bool)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLdapDn(value *string)() + SetLocation(value *string)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationEmail(value *string)() + SetOrganizationsUrl(value *string)() + SetOwnedPrivateRepos(value *int32)() + SetPlan(value PrivateUser_planable)() + SetPrivateGists(value *int32)() + SetPublicGists(value *int32)() + SetPublicRepos(value *int32)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTotalPrivateRepos(value *int32)() + SetTwitterUsername(value *string)() + SetTwoFactorAuthentication(value *bool)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/private_user_plan.go b/pkg/github/models/private_user_plan.go new file mode 100644 index 0000000..0ab80ac --- /dev/null +++ b/pkg/github/models/private_user_plan.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PrivateUser_plan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The collaborators property + collaborators *int32 + // The name property + name *string + // The private_repos property + private_repos *int32 + // The space property + space *int32 +} +// NewPrivateUser_plan instantiates a new PrivateUser_plan and sets the default values. +func NewPrivateUser_plan()(*PrivateUser_plan) { + m := &PrivateUser_plan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePrivateUser_planFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePrivateUser_planFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivateUser_plan(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PrivateUser_plan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCollaborators gets the collaborators property value. The collaborators property +// returns a *int32 when successful +func (m *PrivateUser_plan) GetCollaborators()(*int32) { + return m.collaborators +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PrivateUser_plan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCollaborators(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateRepos(val) + } + return nil + } + res["space"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSpace(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PrivateUser_plan) GetName()(*string) { + return m.name +} +// GetPrivateRepos gets the private_repos property value. The private_repos property +// returns a *int32 when successful +func (m *PrivateUser_plan) GetPrivateRepos()(*int32) { + return m.private_repos +} +// GetSpace gets the space property value. The space property +// returns a *int32 when successful +func (m *PrivateUser_plan) GetSpace()(*int32) { + return m.space +} +// Serialize serializes information the current object +func (m *PrivateUser_plan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("collaborators", m.GetCollaborators()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_repos", m.GetPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("space", m.GetSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PrivateUser_plan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCollaborators sets the collaborators property value. The collaborators property +func (m *PrivateUser_plan) SetCollaborators(value *int32)() { + m.collaborators = value +} +// SetName sets the name property value. The name property +func (m *PrivateUser_plan) SetName(value *string)() { + m.name = value +} +// SetPrivateRepos sets the private_repos property value. The private_repos property +func (m *PrivateUser_plan) SetPrivateRepos(value *int32)() { + m.private_repos = value +} +// SetSpace sets the space property value. The space property +func (m *PrivateUser_plan) SetSpace(value *int32)() { + m.space = value +} +type PrivateUser_planable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollaborators()(*int32) + GetName()(*string) + GetPrivateRepos()(*int32) + GetSpace()(*int32) + SetCollaborators(value *int32)() + SetName(value *string)() + SetPrivateRepos(value *int32)() + SetSpace(value *int32)() +} diff --git a/pkg/github/models/private_vulnerability_report_create.go b/pkg/github/models/private_vulnerability_report_create.go new file mode 100644 index 0000000..81d7d51 --- /dev/null +++ b/pkg/github/models/private_vulnerability_report_create.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PrivateVulnerabilityReportCreate struct { + // The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. + cvss_vector_string *string + // A list of Common Weakness Enumeration (CWE) IDs. + cwe_ids []string + // A detailed description of what the advisory impacts. + description *string + // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + severity *PrivateVulnerabilityReportCreate_severity + // Whether to create a temporary private fork of the repository to collaborate on a fix. + start_private_fork *bool + // A short summary of the advisory. + summary *string + // An array of products affected by the vulnerability detailed in a repository security advisory. + vulnerabilities []PrivateVulnerabilityReportCreate_vulnerabilitiesable +} +// NewPrivateVulnerabilityReportCreate instantiates a new PrivateVulnerabilityReportCreate and sets the default values. +func NewPrivateVulnerabilityReportCreate()(*PrivateVulnerabilityReportCreate) { + m := &PrivateVulnerabilityReportCreate{ + } + return m +} +// CreatePrivateVulnerabilityReportCreateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePrivateVulnerabilityReportCreateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivateVulnerabilityReportCreate(), nil +} +// GetCvssVectorString gets the cvss_vector_string property value. The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +// returns a *string when successful +func (m *PrivateVulnerabilityReportCreate) GetCvssVectorString()(*string) { + return m.cvss_vector_string +} +// GetCweIds gets the cwe_ids property value. A list of Common Weakness Enumeration (CWE) IDs. +// returns a []string when successful +func (m *PrivateVulnerabilityReportCreate) GetCweIds()([]string) { + return m.cwe_ids +} +// GetDescription gets the description property value. A detailed description of what the advisory impacts. +// returns a *string when successful +func (m *PrivateVulnerabilityReportCreate) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PrivateVulnerabilityReportCreate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cvss_vector_string"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCvssVectorString(val) + } + return nil + } + res["cwe_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCweIds(res) + } + 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["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivateVulnerabilityReportCreate_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*PrivateVulnerabilityReportCreate_severity)) + } + return nil + } + res["start_private_fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStartPrivateFork(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivateVulnerabilityReportCreate_vulnerabilitiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivateVulnerabilityReportCreate_vulnerabilitiesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PrivateVulnerabilityReportCreate_vulnerabilitiesable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + return res +} +// GetSeverity gets the severity property value. The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +// returns a *PrivateVulnerabilityReportCreate_severity when successful +func (m *PrivateVulnerabilityReportCreate) GetSeverity()(*PrivateVulnerabilityReportCreate_severity) { + return m.severity +} +// GetStartPrivateFork gets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +// returns a *bool when successful +func (m *PrivateVulnerabilityReportCreate) GetStartPrivateFork()(*bool) { + return m.start_private_fork +} +// GetSummary gets the summary property value. A short summary of the advisory. +// returns a *string when successful +func (m *PrivateVulnerabilityReportCreate) GetSummary()(*string) { + return m.summary +} +// GetVulnerabilities gets the vulnerabilities property value. An array of products affected by the vulnerability detailed in a repository security advisory. +// returns a []PrivateVulnerabilityReportCreate_vulnerabilitiesable when successful +func (m *PrivateVulnerabilityReportCreate) GetVulnerabilities()([]PrivateVulnerabilityReportCreate_vulnerabilitiesable) { + return m.vulnerabilities +} +// Serialize serializes information the current object +func (m *PrivateVulnerabilityReportCreate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cvss_vector_string", m.GetCvssVectorString()) + if err != nil { + return err + } + } + if m.GetCweIds() != nil { + err := writer.WriteCollectionOfStringValues("cwe_ids", m.GetCweIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("start_private_fork", m.GetStartPrivateFork()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetVulnerabilities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilities())) + for i, v := range m.GetVulnerabilities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("vulnerabilities", cast) + if err != nil { + return err + } + } + return nil +} +// SetCvssVectorString sets the cvss_vector_string property value. The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +func (m *PrivateVulnerabilityReportCreate) SetCvssVectorString(value *string)() { + m.cvss_vector_string = value +} +// SetCweIds sets the cwe_ids property value. A list of Common Weakness Enumeration (CWE) IDs. +func (m *PrivateVulnerabilityReportCreate) SetCweIds(value []string)() { + m.cwe_ids = value +} +// SetDescription sets the description property value. A detailed description of what the advisory impacts. +func (m *PrivateVulnerabilityReportCreate) SetDescription(value *string)() { + m.description = value +} +// SetSeverity sets the severity property value. The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +func (m *PrivateVulnerabilityReportCreate) SetSeverity(value *PrivateVulnerabilityReportCreate_severity)() { + m.severity = value +} +// SetStartPrivateFork sets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +func (m *PrivateVulnerabilityReportCreate) SetStartPrivateFork(value *bool)() { + m.start_private_fork = value +} +// SetSummary sets the summary property value. A short summary of the advisory. +func (m *PrivateVulnerabilityReportCreate) SetSummary(value *string)() { + m.summary = value +} +// SetVulnerabilities sets the vulnerabilities property value. An array of products affected by the vulnerability detailed in a repository security advisory. +func (m *PrivateVulnerabilityReportCreate) SetVulnerabilities(value []PrivateVulnerabilityReportCreate_vulnerabilitiesable)() { + m.vulnerabilities = value +} +type PrivateVulnerabilityReportCreateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCvssVectorString()(*string) + GetCweIds()([]string) + GetDescription()(*string) + GetSeverity()(*PrivateVulnerabilityReportCreate_severity) + GetStartPrivateFork()(*bool) + GetSummary()(*string) + GetVulnerabilities()([]PrivateVulnerabilityReportCreate_vulnerabilitiesable) + SetCvssVectorString(value *string)() + SetCweIds(value []string)() + SetDescription(value *string)() + SetSeverity(value *PrivateVulnerabilityReportCreate_severity)() + SetStartPrivateFork(value *bool)() + SetSummary(value *string)() + SetVulnerabilities(value []PrivateVulnerabilityReportCreate_vulnerabilitiesable)() +} diff --git a/pkg/github/models/private_vulnerability_report_create_severity.go b/pkg/github/models/private_vulnerability_report_create_severity.go new file mode 100644 index 0000000..1d02cc5 --- /dev/null +++ b/pkg/github/models/private_vulnerability_report_create_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +type PrivateVulnerabilityReportCreate_severity int + +const ( + CRITICAL_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY PrivateVulnerabilityReportCreate_severity = iota + HIGH_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + MEDIUM_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + LOW_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY +) + +func (i PrivateVulnerabilityReportCreate_severity) String() string { + return []string{"critical", "high", "medium", "low"}[i] +} +func ParsePrivateVulnerabilityReportCreate_severity(v string) (any, error) { + result := CRITICAL_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + switch v { + case "critical": + result = CRITICAL_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + case "high": + result = HIGH_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + case "medium": + result = MEDIUM_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + case "low": + result = LOW_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY + default: + return 0, errors.New("Unknown PrivateVulnerabilityReportCreate_severity value: " + v) + } + return &result, nil +} +func SerializePrivateVulnerabilityReportCreate_severity(values []PrivateVulnerabilityReportCreate_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PrivateVulnerabilityReportCreate_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/private_vulnerability_report_create_vulnerabilities.go b/pkg/github/models/private_vulnerability_report_create_vulnerabilities.go new file mode 100644 index 0000000..cb889ee --- /dev/null +++ b/pkg/github/models/private_vulnerability_report_create_vulnerabilities.go @@ -0,0 +1,154 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PrivateVulnerabilityReportCreate_vulnerabilities struct { + // The name of the package affected by the vulnerability. + packageEscaped PrivateVulnerabilityReportCreate_vulnerabilities_packageable + // The package version(s) that resolve the vulnerability. + patched_versions *string + // The functions in the package that are affected. + vulnerable_functions []string + // The range of the package versions affected by the vulnerability. + vulnerable_version_range *string +} +// NewPrivateVulnerabilityReportCreate_vulnerabilities instantiates a new PrivateVulnerabilityReportCreate_vulnerabilities and sets the default values. +func NewPrivateVulnerabilityReportCreate_vulnerabilities()(*PrivateVulnerabilityReportCreate_vulnerabilities) { + m := &PrivateVulnerabilityReportCreate_vulnerabilities{ + } + return m +} +// CreatePrivateVulnerabilityReportCreate_vulnerabilitiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePrivateVulnerabilityReportCreate_vulnerabilitiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivateVulnerabilityReportCreate_vulnerabilities(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivateVulnerabilityReportCreate_vulnerabilities_packageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(PrivateVulnerabilityReportCreate_vulnerabilities_packageable)) + } + return nil + } + res["patched_versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchedVersions(val) + } + return nil + } + res["vulnerable_functions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetVulnerableFunctions(res) + } + return nil + } + res["vulnerable_version_range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVulnerableVersionRange(val) + } + return nil + } + return res +} +// GetPackageEscaped gets the package property value. The name of the package affected by the vulnerability. +// returns a PrivateVulnerabilityReportCreate_vulnerabilities_packageable when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) GetPackageEscaped()(PrivateVulnerabilityReportCreate_vulnerabilities_packageable) { + return m.packageEscaped +} +// GetPatchedVersions gets the patched_versions property value. The package version(s) that resolve the vulnerability. +// returns a *string when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) GetPatchedVersions()(*string) { + return m.patched_versions +} +// GetVulnerableFunctions gets the vulnerable_functions property value. The functions in the package that are affected. +// returns a []string when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) GetVulnerableFunctions()([]string) { + return m.vulnerable_functions +} +// GetVulnerableVersionRange gets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +// returns a *string when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) GetVulnerableVersionRange()(*string) { + return m.vulnerable_version_range +} +// Serialize serializes information the current object +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("package", m.GetPackageEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patched_versions", m.GetPatchedVersions()) + if err != nil { + return err + } + } + if m.GetVulnerableFunctions() != nil { + err := writer.WriteCollectionOfStringValues("vulnerable_functions", m.GetVulnerableFunctions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vulnerable_version_range", m.GetVulnerableVersionRange()) + if err != nil { + return err + } + } + return nil +} +// SetPackageEscaped sets the package property value. The name of the package affected by the vulnerability. +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) SetPackageEscaped(value PrivateVulnerabilityReportCreate_vulnerabilities_packageable)() { + m.packageEscaped = value +} +// SetPatchedVersions sets the patched_versions property value. The package version(s) that resolve the vulnerability. +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) SetPatchedVersions(value *string)() { + m.patched_versions = value +} +// SetVulnerableFunctions sets the vulnerable_functions property value. The functions in the package that are affected. +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) SetVulnerableFunctions(value []string)() { + m.vulnerable_functions = value +} +// SetVulnerableVersionRange sets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +func (m *PrivateVulnerabilityReportCreate_vulnerabilities) SetVulnerableVersionRange(value *string)() { + m.vulnerable_version_range = value +} +type PrivateVulnerabilityReportCreate_vulnerabilitiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPackageEscaped()(PrivateVulnerabilityReportCreate_vulnerabilities_packageable) + GetPatchedVersions()(*string) + GetVulnerableFunctions()([]string) + GetVulnerableVersionRange()(*string) + SetPackageEscaped(value PrivateVulnerabilityReportCreate_vulnerabilities_packageable)() + SetPatchedVersions(value *string)() + SetVulnerableFunctions(value []string)() + SetVulnerableVersionRange(value *string)() +} diff --git a/pkg/github/models/private_vulnerability_report_create_vulnerabilities_package.go b/pkg/github/models/private_vulnerability_report_create_vulnerabilities_package.go new file mode 100644 index 0000000..572b648 --- /dev/null +++ b/pkg/github/models/private_vulnerability_report_create_vulnerabilities_package.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivateVulnerabilityReportCreate_vulnerabilities_package the name of the package affected by the vulnerability. +type PrivateVulnerabilityReportCreate_vulnerabilities_package struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The package's language or package management ecosystem. + ecosystem *SecurityAdvisoryEcosystems + // The unique package name within its ecosystem. + name *string +} +// NewPrivateVulnerabilityReportCreate_vulnerabilities_package instantiates a new PrivateVulnerabilityReportCreate_vulnerabilities_package and sets the default values. +func NewPrivateVulnerabilityReportCreate_vulnerabilities_package()(*PrivateVulnerabilityReportCreate_vulnerabilities_package) { + m := &PrivateVulnerabilityReportCreate_vulnerabilities_package{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePrivateVulnerabilityReportCreate_vulnerabilities_packageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePrivateVulnerabilityReportCreate_vulnerabilities_packageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivateVulnerabilityReportCreate_vulnerabilities_package(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEcosystem gets the ecosystem property value. The package's language or package management ecosystem. +// returns a *SecurityAdvisoryEcosystems when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) GetEcosystem()(*SecurityAdvisoryEcosystems) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryEcosystems) + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(val.(*SecurityAdvisoryEcosystems)) + } + 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 + } + return res +} +// GetName gets the name property value. The unique package name within its ecosystem. +// returns a *string when successful +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEcosystem() != nil { + cast := (*m.GetEcosystem()).String() + err := writer.WriteStringValue("ecosystem", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *PrivateVulnerabilityReportCreate_vulnerabilities_package) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEcosystem sets the ecosystem property value. The package's language or package management ecosystem. +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) SetEcosystem(value *SecurityAdvisoryEcosystems)() { + m.ecosystem = value +} +// SetName sets the name property value. The unique package name within its ecosystem. +func (m *PrivateVulnerabilityReportCreate_vulnerabilities_package) SetName(value *string)() { + m.name = value +} +type PrivateVulnerabilityReportCreate_vulnerabilities_packageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystem()(*SecurityAdvisoryEcosystems) + GetName()(*string) + SetEcosystem(value *SecurityAdvisoryEcosystems)() + SetName(value *string)() +} diff --git a/pkg/github/models/project.go b/pkg/github/models/project.go new file mode 100644 index 0000000..431310d --- /dev/null +++ b/pkg/github/models/project.go @@ -0,0 +1,489 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Project projects are a way to organize columns and cards of work. +type Project struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Body of the project + body *string + // The columns_url property + columns_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + creator NullableSimpleUserable + // The html_url property + html_url *string + // The id property + id *int32 + // Name of the project + name *string + // The node_id property + node_id *string + // The number property + number *int32 + // The baseline permission that all organization members have on this project. Only present if owner is an organization. + organization_permission *Project_organization_permission + // The owner_url property + owner_url *string + // Whether or not this project can be seen by everyone. Only present if owner is an organization. + private *bool + // State of the project; either 'open' or 'closed' + state *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewProject instantiates a new Project and sets the default values. +func NewProject()(*Project) { + m := &Project{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProject(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Project) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. Body of the project +// returns a *string when successful +func (m *Project) GetBody()(*string) { + return m.body +} +// GetColumnsUrl gets the columns_url property value. The columns_url property +// returns a *string when successful +func (m *Project) GetColumnsUrl()(*string) { + return m.columns_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Project) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Project) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Project) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["columns_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["organization_permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProject_organization_permission) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPermission(val.(*Project_organization_permission)) + } + return nil + } + res["owner_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerUrl(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Project) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Project) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. Name of the project +// returns a *string when successful +func (m *Project) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Project) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *Project) GetNumber()(*int32) { + return m.number +} +// GetOrganizationPermission gets the organization_permission property value. The baseline permission that all organization members have on this project. Only present if owner is an organization. +// returns a *Project_organization_permission when successful +func (m *Project) GetOrganizationPermission()(*Project_organization_permission) { + return m.organization_permission +} +// GetOwnerUrl gets the owner_url property value. The owner_url property +// returns a *string when successful +func (m *Project) GetOwnerUrl()(*string) { + return m.owner_url +} +// GetPrivate gets the private property value. Whether or not this project can be seen by everyone. Only present if owner is an organization. +// returns a *bool when successful +func (m *Project) GetPrivate()(*bool) { + return m.private +} +// GetState gets the state property value. State of the project; either 'open' or 'closed' +// returns a *string when successful +func (m *Project) GetState()(*string) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Project) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Project) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Project) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("columns_url", m.GetColumnsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + if m.GetOrganizationPermission() != nil { + cast := (*m.GetOrganizationPermission()).String() + err := writer.WriteStringValue("organization_permission", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("owner_url", m.GetOwnerUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Project) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. Body of the project +func (m *Project) SetBody(value *string)() { + m.body = value +} +// SetColumnsUrl sets the columns_url property value. The columns_url property +func (m *Project) SetColumnsUrl(value *string)() { + m.columns_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Project) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *Project) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Project) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Project) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. Name of the project +func (m *Project) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Project) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The number property +func (m *Project) SetNumber(value *int32)() { + m.number = value +} +// SetOrganizationPermission sets the organization_permission property value. The baseline permission that all organization members have on this project. Only present if owner is an organization. +func (m *Project) SetOrganizationPermission(value *Project_organization_permission)() { + m.organization_permission = value +} +// SetOwnerUrl sets the owner_url property value. The owner_url property +func (m *Project) SetOwnerUrl(value *string)() { + m.owner_url = value +} +// SetPrivate sets the private property value. Whether or not this project can be seen by everyone. Only present if owner is an organization. +func (m *Project) SetPrivate(value *bool)() { + m.private = value +} +// SetState sets the state property value. State of the project; either 'open' or 'closed' +func (m *Project) SetState(value *string)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Project) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Project) SetUrl(value *string)() { + m.url = value +} +type Projectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetColumnsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(NullableSimpleUserable) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetNumber()(*int32) + GetOrganizationPermission()(*Project_organization_permission) + GetOwnerUrl()(*string) + GetPrivate()(*bool) + GetState()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetBody(value *string)() + SetColumnsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value NullableSimpleUserable)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetOrganizationPermission(value *Project_organization_permission)() + SetOwnerUrl(value *string)() + SetPrivate(value *bool)() + SetState(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/project_card.go b/pkg/github/models/project_card.go new file mode 100644 index 0000000..16288b5 --- /dev/null +++ b/pkg/github/models/project_card.go @@ -0,0 +1,430 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectCard project cards represent a scope of work. +type ProjectCard struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether or not the card is archived + archived *bool + // The column_name property + column_name *string + // The column_url property + column_url *string + // The content_url property + content_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + creator NullableSimpleUserable + // The project card's ID + id *int64 + // The node_id property + node_id *string + // The note property + note *string + // The project_id property + project_id *string + // The project_url property + project_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewProjectCard instantiates a new ProjectCard and sets the default values. +func NewProjectCard()(*ProjectCard) { + m := &ProjectCard{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProjectCardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProjectCardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProjectCard(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProjectCard) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchived gets the archived property value. Whether or not the card is archived +// returns a *bool when successful +func (m *ProjectCard) GetArchived()(*bool) { + return m.archived +} +// GetColumnName gets the column_name property value. The column_name property +// returns a *string when successful +func (m *ProjectCard) GetColumnName()(*string) { + return m.column_name +} +// GetColumnUrl gets the column_url property value. The column_url property +// returns a *string when successful +func (m *ProjectCard) GetColumnUrl()(*string) { + return m.column_url +} +// GetContentUrl gets the content_url property value. The content_url property +// returns a *string when successful +func (m *ProjectCard) GetContentUrl()(*string) { + return m.content_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ProjectCard) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *ProjectCard) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProjectCard) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["column_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnUrl(val) + } + return nil + } + res["content_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNote(val) + } + return nil + } + res["project_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The project card's ID +// returns a *int64 when successful +func (m *ProjectCard) GetId()(*int64) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ProjectCard) GetNodeId()(*string) { + return m.node_id +} +// GetNote gets the note property value. The note property +// returns a *string when successful +func (m *ProjectCard) GetNote()(*string) { + return m.note +} +// GetProjectId gets the project_id property value. The project_id property +// returns a *string when successful +func (m *ProjectCard) GetProjectId()(*string) { + return m.project_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *ProjectCard) GetProjectUrl()(*string) { + return m.project_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *ProjectCard) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProjectCard) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProjectCard) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("column_name", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("column_url", m.GetColumnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content_url", m.GetContentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("note", m.GetNote()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_id", m.GetProjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProjectCard) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchived sets the archived property value. Whether or not the card is archived +func (m *ProjectCard) SetArchived(value *bool)() { + m.archived = value +} +// SetColumnName sets the column_name property value. The column_name property +func (m *ProjectCard) SetColumnName(value *string)() { + m.column_name = value +} +// SetColumnUrl sets the column_url property value. The column_url property +func (m *ProjectCard) SetColumnUrl(value *string)() { + m.column_url = value +} +// SetContentUrl sets the content_url property value. The content_url property +func (m *ProjectCard) SetContentUrl(value *string)() { + m.content_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ProjectCard) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *ProjectCard) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetId sets the id property value. The project card's ID +func (m *ProjectCard) SetId(value *int64)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ProjectCard) SetNodeId(value *string)() { + m.node_id = value +} +// SetNote sets the note property value. The note property +func (m *ProjectCard) SetNote(value *string)() { + m.note = value +} +// SetProjectId sets the project_id property value. The project_id property +func (m *ProjectCard) SetProjectId(value *string)() { + m.project_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *ProjectCard) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *ProjectCard) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *ProjectCard) SetUrl(value *string)() { + m.url = value +} +type ProjectCardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchived()(*bool) + GetColumnName()(*string) + GetColumnUrl()(*string) + GetContentUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(NullableSimpleUserable) + GetId()(*int64) + GetNodeId()(*string) + GetNote()(*string) + GetProjectId()(*string) + GetProjectUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetArchived(value *bool)() + SetColumnName(value *string)() + SetColumnUrl(value *string)() + SetContentUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value NullableSimpleUserable)() + SetId(value *int64)() + SetNodeId(value *string)() + SetNote(value *string)() + SetProjectId(value *string)() + SetProjectUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/project_collaborator_permission.go b/pkg/github/models/project_collaborator_permission.go new file mode 100644 index 0000000..d78be0f --- /dev/null +++ b/pkg/github/models/project_collaborator_permission.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectCollaboratorPermission project Collaborator Permission +type ProjectCollaboratorPermission struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permission property + permission *string + // A GitHub user. + user NullableSimpleUserable +} +// NewProjectCollaboratorPermission instantiates a new ProjectCollaboratorPermission and sets the default values. +func NewProjectCollaboratorPermission()(*ProjectCollaboratorPermission) { + m := &ProjectCollaboratorPermission{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProjectCollaboratorPermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProjectCollaboratorPermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProjectCollaboratorPermission(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProjectCollaboratorPermission) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProjectCollaboratorPermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetPermission gets the permission property value. The permission property +// returns a *string when successful +func (m *ProjectCollaboratorPermission) GetPermission()(*string) { + return m.permission +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *ProjectCollaboratorPermission) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *ProjectCollaboratorPermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *ProjectCollaboratorPermission) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPermission sets the permission property value. The permission property +func (m *ProjectCollaboratorPermission) SetPermission(value *string)() { + m.permission = value +} +// SetUser sets the user property value. A GitHub user. +func (m *ProjectCollaboratorPermission) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type ProjectCollaboratorPermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPermission()(*string) + GetUser()(NullableSimpleUserable) + SetPermission(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/project_column.go b/pkg/github/models/project_column.go new file mode 100644 index 0000000..2705919 --- /dev/null +++ b/pkg/github/models/project_column.go @@ -0,0 +1,285 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectColumn project columns contain cards of work. +type ProjectColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The cards_url property + cards_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The unique identifier of the project column + id *int32 + // Name of the project column + name *string + // The node_id property + node_id *string + // The project_url property + project_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewProjectColumn instantiates a new ProjectColumn and sets the default values. +func NewProjectColumn()(*ProjectColumn) { + m := &ProjectColumn{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProjectColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProjectColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProjectColumn(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProjectColumn) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCardsUrl gets the cards_url property value. The cards_url property +// returns a *string when successful +func (m *ProjectColumn) GetCardsUrl()(*string) { + return m.cards_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ProjectColumn) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProjectColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cards_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCardsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the project column +// returns a *int32 when successful +func (m *ProjectColumn) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. Name of the project column +// returns a *string when successful +func (m *ProjectColumn) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ProjectColumn) GetNodeId()(*string) { + return m.node_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *ProjectColumn) GetProjectUrl()(*string) { + return m.project_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *ProjectColumn) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProjectColumn) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProjectColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cards_url", m.GetCardsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProjectColumn) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCardsUrl sets the cards_url property value. The cards_url property +func (m *ProjectColumn) SetCardsUrl(value *string)() { + m.cards_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ProjectColumn) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The unique identifier of the project column +func (m *ProjectColumn) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. Name of the project column +func (m *ProjectColumn) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ProjectColumn) SetNodeId(value *string)() { + m.node_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *ProjectColumn) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *ProjectColumn) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *ProjectColumn) SetUrl(value *string)() { + m.url = value +} +type ProjectColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCardsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetProjectUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCardsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetProjectUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/project_organization_permission.go b/pkg/github/models/project_organization_permission.go new file mode 100644 index 0000000..20b829c --- /dev/null +++ b/pkg/github/models/project_organization_permission.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The baseline permission that all organization members have on this project. Only present if owner is an organization. +type Project_organization_permission int + +const ( + READ_PROJECT_ORGANIZATION_PERMISSION Project_organization_permission = iota + WRITE_PROJECT_ORGANIZATION_PERMISSION + ADMIN_PROJECT_ORGANIZATION_PERMISSION + NONE_PROJECT_ORGANIZATION_PERMISSION +) + +func (i Project_organization_permission) String() string { + return []string{"read", "write", "admin", "none"}[i] +} +func ParseProject_organization_permission(v string) (any, error) { + result := READ_PROJECT_ORGANIZATION_PERMISSION + switch v { + case "read": + result = READ_PROJECT_ORGANIZATION_PERMISSION + case "write": + result = WRITE_PROJECT_ORGANIZATION_PERMISSION + case "admin": + result = ADMIN_PROJECT_ORGANIZATION_PERMISSION + case "none": + result = NONE_PROJECT_ORGANIZATION_PERMISSION + default: + return 0, errors.New("Unknown Project_organization_permission value: " + v) + } + return &result, nil +} +func SerializeProject_organization_permission(values []Project_organization_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Project_organization_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/protected_branch.go b/pkg/github/models/protected_branch.go new file mode 100644 index 0000000..370d5b6 --- /dev/null +++ b/pkg/github/models/protected_branch.go @@ -0,0 +1,429 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranch branch protections protect branches +type ProtectedBranch struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_deletions property + allow_deletions ProtectedBranch_allow_deletionsable + // The allow_force_pushes property + allow_force_pushes ProtectedBranch_allow_force_pushesable + // Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. + allow_fork_syncing ProtectedBranch_allow_fork_syncingable + // The block_creations property + block_creations ProtectedBranch_block_creationsable + // The enforce_admins property + enforce_admins ProtectedBranch_enforce_adminsable + // Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. + lock_branch ProtectedBranch_lock_branchable + // The required_conversation_resolution property + required_conversation_resolution ProtectedBranch_required_conversation_resolutionable + // The required_linear_history property + required_linear_history ProtectedBranch_required_linear_historyable + // The required_pull_request_reviews property + required_pull_request_reviews ProtectedBranch_required_pull_request_reviewsable + // The required_signatures property + required_signatures ProtectedBranch_required_signaturesable + // Status Check Policy + required_status_checks StatusCheckPolicyable + // Branch Restriction Policy + restrictions BranchRestrictionPolicyable + // The url property + url *string +} +// NewProtectedBranch instantiates a new ProtectedBranch and sets the default values. +func NewProtectedBranch()(*ProtectedBranch) { + m := &ProtectedBranch{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranch) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowDeletions gets the allow_deletions property value. The allow_deletions property +// returns a ProtectedBranch_allow_deletionsable when successful +func (m *ProtectedBranch) GetAllowDeletions()(ProtectedBranch_allow_deletionsable) { + return m.allow_deletions +} +// GetAllowForcePushes gets the allow_force_pushes property value. The allow_force_pushes property +// returns a ProtectedBranch_allow_force_pushesable when successful +func (m *ProtectedBranch) GetAllowForcePushes()(ProtectedBranch_allow_force_pushesable) { + return m.allow_force_pushes +} +// GetAllowForkSyncing gets the allow_fork_syncing property value. Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. +// returns a ProtectedBranch_allow_fork_syncingable when successful +func (m *ProtectedBranch) GetAllowForkSyncing()(ProtectedBranch_allow_fork_syncingable) { + return m.allow_fork_syncing +} +// GetBlockCreations gets the block_creations property value. The block_creations property +// returns a ProtectedBranch_block_creationsable when successful +func (m *ProtectedBranch) GetBlockCreations()(ProtectedBranch_block_creationsable) { + return m.block_creations +} +// GetEnforceAdmins gets the enforce_admins property value. The enforce_admins property +// returns a ProtectedBranch_enforce_adminsable when successful +func (m *ProtectedBranch) GetEnforceAdmins()(ProtectedBranch_enforce_adminsable) { + return m.enforce_admins +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_allow_deletionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowDeletions(val.(ProtectedBranch_allow_deletionsable)) + } + return nil + } + res["allow_force_pushes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_allow_force_pushesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowForcePushes(val.(ProtectedBranch_allow_force_pushesable)) + } + return nil + } + res["allow_fork_syncing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_allow_fork_syncingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowForkSyncing(val.(ProtectedBranch_allow_fork_syncingable)) + } + return nil + } + res["block_creations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_block_creationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBlockCreations(val.(ProtectedBranch_block_creationsable)) + } + return nil + } + res["enforce_admins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_enforce_adminsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnforceAdmins(val.(ProtectedBranch_enforce_adminsable)) + } + return nil + } + res["lock_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_lock_branchFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLockBranch(val.(ProtectedBranch_lock_branchable)) + } + return nil + } + res["required_conversation_resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_required_conversation_resolutionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredConversationResolution(val.(ProtectedBranch_required_conversation_resolutionable)) + } + return nil + } + res["required_linear_history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_required_linear_historyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredLinearHistory(val.(ProtectedBranch_required_linear_historyable)) + } + return nil + } + res["required_pull_request_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_required_pull_request_reviewsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPullRequestReviews(val.(ProtectedBranch_required_pull_request_reviewsable)) + } + return nil + } + res["required_signatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_required_signaturesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredSignatures(val.(ProtectedBranch_required_signaturesable)) + } + return nil + } + res["required_status_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStatusCheckPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredStatusChecks(val.(StatusCheckPolicyable)) + } + return nil + } + res["restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchRestrictionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestrictions(val.(BranchRestrictionPolicyable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetLockBranch gets the lock_branch property value. Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +// returns a ProtectedBranch_lock_branchable when successful +func (m *ProtectedBranch) GetLockBranch()(ProtectedBranch_lock_branchable) { + return m.lock_branch +} +// GetRequiredConversationResolution gets the required_conversation_resolution property value. The required_conversation_resolution property +// returns a ProtectedBranch_required_conversation_resolutionable when successful +func (m *ProtectedBranch) GetRequiredConversationResolution()(ProtectedBranch_required_conversation_resolutionable) { + return m.required_conversation_resolution +} +// GetRequiredLinearHistory gets the required_linear_history property value. The required_linear_history property +// returns a ProtectedBranch_required_linear_historyable when successful +func (m *ProtectedBranch) GetRequiredLinearHistory()(ProtectedBranch_required_linear_historyable) { + return m.required_linear_history +} +// GetRequiredPullRequestReviews gets the required_pull_request_reviews property value. The required_pull_request_reviews property +// returns a ProtectedBranch_required_pull_request_reviewsable when successful +func (m *ProtectedBranch) GetRequiredPullRequestReviews()(ProtectedBranch_required_pull_request_reviewsable) { + return m.required_pull_request_reviews +} +// GetRequiredSignatures gets the required_signatures property value. The required_signatures property +// returns a ProtectedBranch_required_signaturesable when successful +func (m *ProtectedBranch) GetRequiredSignatures()(ProtectedBranch_required_signaturesable) { + return m.required_signatures +} +// GetRequiredStatusChecks gets the required_status_checks property value. Status Check Policy +// returns a StatusCheckPolicyable when successful +func (m *ProtectedBranch) GetRequiredStatusChecks()(StatusCheckPolicyable) { + return m.required_status_checks +} +// GetRestrictions gets the restrictions property value. Branch Restriction Policy +// returns a BranchRestrictionPolicyable when successful +func (m *ProtectedBranch) GetRestrictions()(BranchRestrictionPolicyable) { + return m.restrictions +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranch) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranch) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("allow_deletions", m.GetAllowDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("allow_force_pushes", m.GetAllowForcePushes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("allow_fork_syncing", m.GetAllowForkSyncing()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("block_creations", m.GetBlockCreations()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("enforce_admins", m.GetEnforceAdmins()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lock_branch", m.GetLockBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_conversation_resolution", m.GetRequiredConversationResolution()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_linear_history", m.GetRequiredLinearHistory()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_pull_request_reviews", m.GetRequiredPullRequestReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_signatures", m.GetRequiredSignatures()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_status_checks", m.GetRequiredStatusChecks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("restrictions", m.GetRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranch) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowDeletions sets the allow_deletions property value. The allow_deletions property +func (m *ProtectedBranch) SetAllowDeletions(value ProtectedBranch_allow_deletionsable)() { + m.allow_deletions = value +} +// SetAllowForcePushes sets the allow_force_pushes property value. The allow_force_pushes property +func (m *ProtectedBranch) SetAllowForcePushes(value ProtectedBranch_allow_force_pushesable)() { + m.allow_force_pushes = value +} +// SetAllowForkSyncing sets the allow_fork_syncing property value. Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. +func (m *ProtectedBranch) SetAllowForkSyncing(value ProtectedBranch_allow_fork_syncingable)() { + m.allow_fork_syncing = value +} +// SetBlockCreations sets the block_creations property value. The block_creations property +func (m *ProtectedBranch) SetBlockCreations(value ProtectedBranch_block_creationsable)() { + m.block_creations = value +} +// SetEnforceAdmins sets the enforce_admins property value. The enforce_admins property +func (m *ProtectedBranch) SetEnforceAdmins(value ProtectedBranch_enforce_adminsable)() { + m.enforce_admins = value +} +// SetLockBranch sets the lock_branch property value. Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +func (m *ProtectedBranch) SetLockBranch(value ProtectedBranch_lock_branchable)() { + m.lock_branch = value +} +// SetRequiredConversationResolution sets the required_conversation_resolution property value. The required_conversation_resolution property +func (m *ProtectedBranch) SetRequiredConversationResolution(value ProtectedBranch_required_conversation_resolutionable)() { + m.required_conversation_resolution = value +} +// SetRequiredLinearHistory sets the required_linear_history property value. The required_linear_history property +func (m *ProtectedBranch) SetRequiredLinearHistory(value ProtectedBranch_required_linear_historyable)() { + m.required_linear_history = value +} +// SetRequiredPullRequestReviews sets the required_pull_request_reviews property value. The required_pull_request_reviews property +func (m *ProtectedBranch) SetRequiredPullRequestReviews(value ProtectedBranch_required_pull_request_reviewsable)() { + m.required_pull_request_reviews = value +} +// SetRequiredSignatures sets the required_signatures property value. The required_signatures property +func (m *ProtectedBranch) SetRequiredSignatures(value ProtectedBranch_required_signaturesable)() { + m.required_signatures = value +} +// SetRequiredStatusChecks sets the required_status_checks property value. Status Check Policy +func (m *ProtectedBranch) SetRequiredStatusChecks(value StatusCheckPolicyable)() { + m.required_status_checks = value +} +// SetRestrictions sets the restrictions property value. Branch Restriction Policy +func (m *ProtectedBranch) SetRestrictions(value BranchRestrictionPolicyable)() { + m.restrictions = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranch) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranchable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowDeletions()(ProtectedBranch_allow_deletionsable) + GetAllowForcePushes()(ProtectedBranch_allow_force_pushesable) + GetAllowForkSyncing()(ProtectedBranch_allow_fork_syncingable) + GetBlockCreations()(ProtectedBranch_block_creationsable) + GetEnforceAdmins()(ProtectedBranch_enforce_adminsable) + GetLockBranch()(ProtectedBranch_lock_branchable) + GetRequiredConversationResolution()(ProtectedBranch_required_conversation_resolutionable) + GetRequiredLinearHistory()(ProtectedBranch_required_linear_historyable) + GetRequiredPullRequestReviews()(ProtectedBranch_required_pull_request_reviewsable) + GetRequiredSignatures()(ProtectedBranch_required_signaturesable) + GetRequiredStatusChecks()(StatusCheckPolicyable) + GetRestrictions()(BranchRestrictionPolicyable) + GetUrl()(*string) + SetAllowDeletions(value ProtectedBranch_allow_deletionsable)() + SetAllowForcePushes(value ProtectedBranch_allow_force_pushesable)() + SetAllowForkSyncing(value ProtectedBranch_allow_fork_syncingable)() + SetBlockCreations(value ProtectedBranch_block_creationsable)() + SetEnforceAdmins(value ProtectedBranch_enforce_adminsable)() + SetLockBranch(value ProtectedBranch_lock_branchable)() + SetRequiredConversationResolution(value ProtectedBranch_required_conversation_resolutionable)() + SetRequiredLinearHistory(value ProtectedBranch_required_linear_historyable)() + SetRequiredPullRequestReviews(value ProtectedBranch_required_pull_request_reviewsable)() + SetRequiredSignatures(value ProtectedBranch_required_signaturesable)() + SetRequiredStatusChecks(value StatusCheckPolicyable)() + SetRestrictions(value BranchRestrictionPolicyable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_admin_enforced.go b/pkg/github/models/protected_branch_admin_enforced.go new file mode 100644 index 0000000..589a4a8 --- /dev/null +++ b/pkg/github/models/protected_branch_admin_enforced.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranchAdminEnforced protected Branch Admin Enforced +type ProtectedBranchAdminEnforced struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool + // The url property + url *string +} +// NewProtectedBranchAdminEnforced instantiates a new ProtectedBranchAdminEnforced and sets the default values. +func NewProtectedBranchAdminEnforced()(*ProtectedBranchAdminEnforced) { + m := &ProtectedBranchAdminEnforced{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchAdminEnforcedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchAdminEnforcedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranchAdminEnforced(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranchAdminEnforced) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranchAdminEnforced) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranchAdminEnforced) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranchAdminEnforced) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranchAdminEnforced) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranchAdminEnforced) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranchAdminEnforced) SetEnabled(value *bool)() { + m.enabled = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranchAdminEnforced) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranchAdminEnforcedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetUrl()(*string) + SetEnabled(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_allow_deletions.go b/pkg/github/models/protected_branch_allow_deletions.go new file mode 100644 index 0000000..4846974 --- /dev/null +++ b/pkg/github/models/protected_branch_allow_deletions.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_allow_deletions struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_allow_deletions instantiates a new ProtectedBranch_allow_deletions and sets the default values. +func NewProtectedBranch_allow_deletions()(*ProtectedBranch_allow_deletions) { + m := &ProtectedBranch_allow_deletions{ + } + return m +} +// CreateProtectedBranch_allow_deletionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_allow_deletionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_allow_deletions(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_allow_deletions) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_allow_deletions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_allow_deletions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_allow_deletions) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_allow_deletionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_allow_force_pushes.go b/pkg/github/models/protected_branch_allow_force_pushes.go new file mode 100644 index 0000000..b047ac9 --- /dev/null +++ b/pkg/github/models/protected_branch_allow_force_pushes.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_allow_force_pushes struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_allow_force_pushes instantiates a new ProtectedBranch_allow_force_pushes and sets the default values. +func NewProtectedBranch_allow_force_pushes()(*ProtectedBranch_allow_force_pushes) { + m := &ProtectedBranch_allow_force_pushes{ + } + return m +} +// CreateProtectedBranch_allow_force_pushesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_allow_force_pushesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_allow_force_pushes(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_allow_force_pushes) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_allow_force_pushes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_allow_force_pushes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_allow_force_pushes) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_allow_force_pushesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_allow_fork_syncing.go b/pkg/github/models/protected_branch_allow_fork_syncing.go new file mode 100644 index 0000000..9cb7762 --- /dev/null +++ b/pkg/github/models/protected_branch_allow_fork_syncing.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranch_allow_fork_syncing whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. +type ProtectedBranch_allow_fork_syncing struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_allow_fork_syncing instantiates a new ProtectedBranch_allow_fork_syncing and sets the default values. +func NewProtectedBranch_allow_fork_syncing()(*ProtectedBranch_allow_fork_syncing) { + m := &ProtectedBranch_allow_fork_syncing{ + } + return m +} +// CreateProtectedBranch_allow_fork_syncingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_allow_fork_syncingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_allow_fork_syncing(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_allow_fork_syncing) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_allow_fork_syncing) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_allow_fork_syncing) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_allow_fork_syncing) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_allow_fork_syncingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_block_creations.go b/pkg/github/models/protected_branch_block_creations.go new file mode 100644 index 0000000..584d8f0 --- /dev/null +++ b/pkg/github/models/protected_branch_block_creations.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_block_creations struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_block_creations instantiates a new ProtectedBranch_block_creations and sets the default values. +func NewProtectedBranch_block_creations()(*ProtectedBranch_block_creations) { + m := &ProtectedBranch_block_creations{ + } + return m +} +// CreateProtectedBranch_block_creationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_block_creationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_block_creations(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_block_creations) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_block_creations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_block_creations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_block_creations) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_block_creationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_enforce_admins.go b/pkg/github/models/protected_branch_enforce_admins.go new file mode 100644 index 0000000..82f42d3 --- /dev/null +++ b/pkg/github/models/protected_branch_enforce_admins.go @@ -0,0 +1,90 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_enforce_admins struct { + // The enabled property + enabled *bool + // The url property + url *string +} +// NewProtectedBranch_enforce_admins instantiates a new ProtectedBranch_enforce_admins and sets the default values. +func NewProtectedBranch_enforce_admins()(*ProtectedBranch_enforce_admins) { + m := &ProtectedBranch_enforce_admins{ + } + return m +} +// CreateProtectedBranch_enforce_adminsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_enforce_adminsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_enforce_admins(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_enforce_admins) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_enforce_admins) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranch_enforce_admins) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranch_enforce_admins) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_enforce_admins) SetEnabled(value *bool)() { + m.enabled = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranch_enforce_admins) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranch_enforce_adminsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetUrl()(*string) + SetEnabled(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_lock_branch.go b/pkg/github/models/protected_branch_lock_branch.go new file mode 100644 index 0000000..4dc414f --- /dev/null +++ b/pkg/github/models/protected_branch_lock_branch.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranch_lock_branch whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +type ProtectedBranch_lock_branch struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_lock_branch instantiates a new ProtectedBranch_lock_branch and sets the default values. +func NewProtectedBranch_lock_branch()(*ProtectedBranch_lock_branch) { + m := &ProtectedBranch_lock_branch{ + } + return m +} +// CreateProtectedBranch_lock_branchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_lock_branchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_lock_branch(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_lock_branch) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_lock_branch) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_lock_branch) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_lock_branch) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_lock_branchable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_pull_request_review.go b/pkg/github/models/protected_branch_pull_request_review.go new file mode 100644 index 0000000..0fd40a6 --- /dev/null +++ b/pkg/github/models/protected_branch_pull_request_review.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranchPullRequestReview protected Branch Pull Request Review +type ProtectedBranchPullRequestReview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Allow specific users, teams, or apps to bypass pull request requirements. + bypass_pull_request_allowances ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable + // The dismiss_stale_reviews property + dismiss_stale_reviews *bool + // The dismissal_restrictions property + dismissal_restrictions ProtectedBranchPullRequestReview_dismissal_restrictionsable + // The require_code_owner_reviews property + require_code_owner_reviews *bool + // Whether the most recent push must be approved by someone other than the person who pushed it. + require_last_push_approval *bool + // The required_approving_review_count property + required_approving_review_count *int32 + // The url property + url *string +} +// NewProtectedBranchPullRequestReview instantiates a new ProtectedBranchPullRequestReview and sets the default values. +func NewProtectedBranchPullRequestReview()(*ProtectedBranchPullRequestReview) { + m := &ProtectedBranchPullRequestReview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchPullRequestReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchPullRequestReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranchPullRequestReview(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranchPullRequestReview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassPullRequestAllowances gets the bypass_pull_request_allowances property value. Allow specific users, teams, or apps to bypass pull request requirements. +// returns a ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable when successful +func (m *ProtectedBranchPullRequestReview) GetBypassPullRequestAllowances()(ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable) { + return m.bypass_pull_request_allowances +} +// GetDismissalRestrictions gets the dismissal_restrictions property value. The dismissal_restrictions property +// returns a ProtectedBranchPullRequestReview_dismissal_restrictionsable when successful +func (m *ProtectedBranchPullRequestReview) GetDismissalRestrictions()(ProtectedBranchPullRequestReview_dismissal_restrictionsable) { + return m.dismissal_restrictions +} +// GetDismissStaleReviews gets the dismiss_stale_reviews property value. The dismiss_stale_reviews property +// returns a *bool when successful +func (m *ProtectedBranchPullRequestReview) GetDismissStaleReviews()(*bool) { + return m.dismiss_stale_reviews +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranchPullRequestReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_pull_request_allowances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranchPullRequestReview_bypass_pull_request_allowancesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBypassPullRequestAllowances(val.(ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable)) + } + return nil + } + res["dismiss_stale_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissStaleReviews(val) + } + return nil + } + res["dismissal_restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranchPullRequestReview_dismissal_restrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalRestrictions(val.(ProtectedBranchPullRequestReview_dismissal_restrictionsable)) + } + return nil + } + res["require_code_owner_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireCodeOwnerReviews(val) + } + return nil + } + res["require_last_push_approval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireLastPushApproval(val) + } + return nil + } + res["required_approving_review_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequiredApprovingReviewCount(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetRequireCodeOwnerReviews gets the require_code_owner_reviews property value. The require_code_owner_reviews property +// returns a *bool when successful +func (m *ProtectedBranchPullRequestReview) GetRequireCodeOwnerReviews()(*bool) { + return m.require_code_owner_reviews +} +// GetRequiredApprovingReviewCount gets the required_approving_review_count property value. The required_approving_review_count property +// returns a *int32 when successful +func (m *ProtectedBranchPullRequestReview) GetRequiredApprovingReviewCount()(*int32) { + return m.required_approving_review_count +} +// GetRequireLastPushApproval gets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. +// returns a *bool when successful +func (m *ProtectedBranchPullRequestReview) GetRequireLastPushApproval()(*bool) { + return m.require_last_push_approval +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranchPullRequestReview) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranchPullRequestReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bypass_pull_request_allowances", m.GetBypassPullRequestAllowances()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dismissal_restrictions", m.GetDismissalRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dismiss_stale_reviews", m.GetDismissStaleReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("required_approving_review_count", m.GetRequiredApprovingReviewCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_code_owner_reviews", m.GetRequireCodeOwnerReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_last_push_approval", m.GetRequireLastPushApproval()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranchPullRequestReview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassPullRequestAllowances sets the bypass_pull_request_allowances property value. Allow specific users, teams, or apps to bypass pull request requirements. +func (m *ProtectedBranchPullRequestReview) SetBypassPullRequestAllowances(value ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable)() { + m.bypass_pull_request_allowances = value +} +// SetDismissalRestrictions sets the dismissal_restrictions property value. The dismissal_restrictions property +func (m *ProtectedBranchPullRequestReview) SetDismissalRestrictions(value ProtectedBranchPullRequestReview_dismissal_restrictionsable)() { + m.dismissal_restrictions = value +} +// SetDismissStaleReviews sets the dismiss_stale_reviews property value. The dismiss_stale_reviews property +func (m *ProtectedBranchPullRequestReview) SetDismissStaleReviews(value *bool)() { + m.dismiss_stale_reviews = value +} +// SetRequireCodeOwnerReviews sets the require_code_owner_reviews property value. The require_code_owner_reviews property +func (m *ProtectedBranchPullRequestReview) SetRequireCodeOwnerReviews(value *bool)() { + m.require_code_owner_reviews = value +} +// SetRequiredApprovingReviewCount sets the required_approving_review_count property value. The required_approving_review_count property +func (m *ProtectedBranchPullRequestReview) SetRequiredApprovingReviewCount(value *int32)() { + m.required_approving_review_count = value +} +// SetRequireLastPushApproval sets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. +func (m *ProtectedBranchPullRequestReview) SetRequireLastPushApproval(value *bool)() { + m.require_last_push_approval = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranchPullRequestReview) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranchPullRequestReviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassPullRequestAllowances()(ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable) + GetDismissalRestrictions()(ProtectedBranchPullRequestReview_dismissal_restrictionsable) + GetDismissStaleReviews()(*bool) + GetRequireCodeOwnerReviews()(*bool) + GetRequiredApprovingReviewCount()(*int32) + GetRequireLastPushApproval()(*bool) + GetUrl()(*string) + SetBypassPullRequestAllowances(value ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable)() + SetDismissalRestrictions(value ProtectedBranchPullRequestReview_dismissal_restrictionsable)() + SetDismissStaleReviews(value *bool)() + SetRequireCodeOwnerReviews(value *bool)() + SetRequiredApprovingReviewCount(value *int32)() + SetRequireLastPushApproval(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_pull_request_review_bypass_pull_request_allowances.go b/pkg/github/models/protected_branch_pull_request_review_bypass_pull_request_allowances.go new file mode 100644 index 0000000..9d82acd --- /dev/null +++ b/pkg/github/models/protected_branch_pull_request_review_bypass_pull_request_allowances.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranchPullRequestReview_bypass_pull_request_allowances allow specific users, teams, or apps to bypass pull request requirements. +type ProtectedBranchPullRequestReview_bypass_pull_request_allowances struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of apps allowed to bypass pull request requirements. + apps []Integrationable + // The list of teams allowed to bypass pull request requirements. + teams []Teamable + // The list of users allowed to bypass pull request requirements. + users []SimpleUserable +} +// NewProtectedBranchPullRequestReview_bypass_pull_request_allowances instantiates a new ProtectedBranchPullRequestReview_bypass_pull_request_allowances and sets the default values. +func NewProtectedBranchPullRequestReview_bypass_pull_request_allowances()(*ProtectedBranchPullRequestReview_bypass_pull_request_allowances) { + m := &ProtectedBranchPullRequestReview_bypass_pull_request_allowances{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchPullRequestReview_bypass_pull_request_allowancesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchPullRequestReview_bypass_pull_request_allowancesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranchPullRequestReview_bypass_pull_request_allowances(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of apps allowed to bypass pull request requirements. +// returns a []Integrationable when successful +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) GetApps()([]Integrationable) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Integrationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Integrationable) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of teams allowed to bypass pull request requirements. +// returns a []Teamable when successful +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) GetTeams()([]Teamable) { + return m.teams +} +// GetUsers gets the users property value. The list of users allowed to bypass pull request requirements. +// returns a []SimpleUserable when successful +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) GetUsers()([]SimpleUserable) { + return m.users +} +// Serialize serializes information the current object +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of apps allowed to bypass pull request requirements. +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) SetApps(value []Integrationable)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of teams allowed to bypass pull request requirements. +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) SetTeams(value []Teamable)() { + m.teams = value +} +// SetUsers sets the users property value. The list of users allowed to bypass pull request requirements. +func (m *ProtectedBranchPullRequestReview_bypass_pull_request_allowances) SetUsers(value []SimpleUserable)() { + m.users = value +} +type ProtectedBranchPullRequestReview_bypass_pull_request_allowancesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]Integrationable) + GetTeams()([]Teamable) + GetUsers()([]SimpleUserable) + SetApps(value []Integrationable)() + SetTeams(value []Teamable)() + SetUsers(value []SimpleUserable)() +} diff --git a/pkg/github/models/protected_branch_pull_request_review_dismissal_restrictions.go b/pkg/github/models/protected_branch_pull_request_review_dismissal_restrictions.go new file mode 100644 index 0000000..349f9a0 --- /dev/null +++ b/pkg/github/models/protected_branch_pull_request_review_dismissal_restrictions.go @@ -0,0 +1,261 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranchPullRequestReview_dismissal_restrictions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of apps with review dismissal access. + apps []Integrationable + // The list of teams with review dismissal access. + teams []Teamable + // The teams_url property + teams_url *string + // The url property + url *string + // The list of users with review dismissal access. + users []SimpleUserable + // The users_url property + users_url *string +} +// NewProtectedBranchPullRequestReview_dismissal_restrictions instantiates a new ProtectedBranchPullRequestReview_dismissal_restrictions and sets the default values. +func NewProtectedBranchPullRequestReview_dismissal_restrictions()(*ProtectedBranchPullRequestReview_dismissal_restrictions) { + m := &ProtectedBranchPullRequestReview_dismissal_restrictions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchPullRequestReview_dismissal_restrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchPullRequestReview_dismissal_restrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranchPullRequestReview_dismissal_restrictions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of apps with review dismissal access. +// returns a []Integrationable when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetApps()([]Integrationable) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Integrationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Integrationable) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetTeams(res) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetUsers(res) + } + return nil + } + res["users_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsersUrl(val) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of teams with review dismissal access. +// returns a []Teamable when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetTeams()([]Teamable) { + return m.teams +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetUrl()(*string) { + return m.url +} +// GetUsers gets the users property value. The list of users with review dismissal access. +// returns a []SimpleUserable when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetUsers()([]SimpleUserable) { + return m.users +} +// GetUsersUrl gets the users_url property value. The users_url property +// returns a *string when successful +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) GetUsersUrl()(*string) { + return m.users_url +} +// Serialize serializes information the current object +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("users_url", m.GetUsersUrl()) + 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 *ProtectedBranchPullRequestReview_dismissal_restrictions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of apps with review dismissal access. +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) SetApps(value []Integrationable)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of teams with review dismissal access. +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) SetTeams(value []Teamable)() { + m.teams = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) SetUrl(value *string)() { + m.url = value +} +// SetUsers sets the users property value. The list of users with review dismissal access. +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) SetUsers(value []SimpleUserable)() { + m.users = value +} +// SetUsersUrl sets the users_url property value. The users_url property +func (m *ProtectedBranchPullRequestReview_dismissal_restrictions) SetUsersUrl(value *string)() { + m.users_url = value +} +type ProtectedBranchPullRequestReview_dismissal_restrictionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]Integrationable) + GetTeams()([]Teamable) + GetTeamsUrl()(*string) + GetUrl()(*string) + GetUsers()([]SimpleUserable) + GetUsersUrl()(*string) + SetApps(value []Integrationable)() + SetTeams(value []Teamable)() + SetTeamsUrl(value *string)() + SetUrl(value *string)() + SetUsers(value []SimpleUserable)() + SetUsersUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_required_conversation_resolution.go b/pkg/github/models/protected_branch_required_conversation_resolution.go new file mode 100644 index 0000000..9501e4c --- /dev/null +++ b/pkg/github/models/protected_branch_required_conversation_resolution.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_required_conversation_resolution struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_required_conversation_resolution instantiates a new ProtectedBranch_required_conversation_resolution and sets the default values. +func NewProtectedBranch_required_conversation_resolution()(*ProtectedBranch_required_conversation_resolution) { + m := &ProtectedBranch_required_conversation_resolution{ + } + return m +} +// CreateProtectedBranch_required_conversation_resolutionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_required_conversation_resolutionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_required_conversation_resolution(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_required_conversation_resolution) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_required_conversation_resolution) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_required_conversation_resolution) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_required_conversation_resolution) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_required_conversation_resolutionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_required_linear_history.go b/pkg/github/models/protected_branch_required_linear_history.go new file mode 100644 index 0000000..eebaf84 --- /dev/null +++ b/pkg/github/models/protected_branch_required_linear_history.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_required_linear_history struct { + // The enabled property + enabled *bool +} +// NewProtectedBranch_required_linear_history instantiates a new ProtectedBranch_required_linear_history and sets the default values. +func NewProtectedBranch_required_linear_history()(*ProtectedBranch_required_linear_history) { + m := &ProtectedBranch_required_linear_history{ + } + return m +} +// CreateProtectedBranch_required_linear_historyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_required_linear_historyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_required_linear_history(), nil +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_required_linear_history) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_required_linear_history) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranch_required_linear_history) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_required_linear_history) SetEnabled(value *bool)() { + m.enabled = value +} +type ProtectedBranch_required_linear_historyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/models/protected_branch_required_pull_request_reviews.go b/pkg/github/models/protected_branch_required_pull_request_reviews.go new file mode 100644 index 0000000..acc2ee2 --- /dev/null +++ b/pkg/github/models/protected_branch_required_pull_request_reviews.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_required_pull_request_reviews struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The bypass_pull_request_allowances property + bypass_pull_request_allowances ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable + // The dismiss_stale_reviews property + dismiss_stale_reviews *bool + // The dismissal_restrictions property + dismissal_restrictions ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable + // The require_code_owner_reviews property + require_code_owner_reviews *bool + // Whether the most recent push must be approved by someone other than the person who pushed it. + require_last_push_approval *bool + // The required_approving_review_count property + required_approving_review_count *int32 + // The url property + url *string +} +// NewProtectedBranch_required_pull_request_reviews instantiates a new ProtectedBranch_required_pull_request_reviews and sets the default values. +func NewProtectedBranch_required_pull_request_reviews()(*ProtectedBranch_required_pull_request_reviews) { + m := &ProtectedBranch_required_pull_request_reviews{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranch_required_pull_request_reviewsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_required_pull_request_reviewsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_required_pull_request_reviews(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassPullRequestAllowances gets the bypass_pull_request_allowances property value. The bypass_pull_request_allowances property +// returns a ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetBypassPullRequestAllowances()(ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable) { + return m.bypass_pull_request_allowances +} +// GetDismissalRestrictions gets the dismissal_restrictions property value. The dismissal_restrictions property +// returns a ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetDismissalRestrictions()(ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable) { + return m.dismissal_restrictions +} +// GetDismissStaleReviews gets the dismiss_stale_reviews property value. The dismiss_stale_reviews property +// returns a *bool when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetDismissStaleReviews()(*bool) { + return m.dismiss_stale_reviews +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_pull_request_allowances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBypassPullRequestAllowances(val.(ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable)) + } + return nil + } + res["dismiss_stale_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissStaleReviews(val) + } + return nil + } + res["dismissal_restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProtectedBranch_required_pull_request_reviews_dismissal_restrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalRestrictions(val.(ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable)) + } + return nil + } + res["require_code_owner_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireCodeOwnerReviews(val) + } + return nil + } + res["require_last_push_approval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireLastPushApproval(val) + } + return nil + } + res["required_approving_review_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequiredApprovingReviewCount(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetRequireCodeOwnerReviews gets the require_code_owner_reviews property value. The require_code_owner_reviews property +// returns a *bool when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetRequireCodeOwnerReviews()(*bool) { + return m.require_code_owner_reviews +} +// GetRequiredApprovingReviewCount gets the required_approving_review_count property value. The required_approving_review_count property +// returns a *int32 when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetRequiredApprovingReviewCount()(*int32) { + return m.required_approving_review_count +} +// GetRequireLastPushApproval gets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. +// returns a *bool when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetRequireLastPushApproval()(*bool) { + return m.require_last_push_approval +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranch_required_pull_request_reviews) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranch_required_pull_request_reviews) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bypass_pull_request_allowances", m.GetBypassPullRequestAllowances()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dismissal_restrictions", m.GetDismissalRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dismiss_stale_reviews", m.GetDismissStaleReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("required_approving_review_count", m.GetRequiredApprovingReviewCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_code_owner_reviews", m.GetRequireCodeOwnerReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_last_push_approval", m.GetRequireLastPushApproval()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranch_required_pull_request_reviews) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassPullRequestAllowances sets the bypass_pull_request_allowances property value. The bypass_pull_request_allowances property +func (m *ProtectedBranch_required_pull_request_reviews) SetBypassPullRequestAllowances(value ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable)() { + m.bypass_pull_request_allowances = value +} +// SetDismissalRestrictions sets the dismissal_restrictions property value. The dismissal_restrictions property +func (m *ProtectedBranch_required_pull_request_reviews) SetDismissalRestrictions(value ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable)() { + m.dismissal_restrictions = value +} +// SetDismissStaleReviews sets the dismiss_stale_reviews property value. The dismiss_stale_reviews property +func (m *ProtectedBranch_required_pull_request_reviews) SetDismissStaleReviews(value *bool)() { + m.dismiss_stale_reviews = value +} +// SetRequireCodeOwnerReviews sets the require_code_owner_reviews property value. The require_code_owner_reviews property +func (m *ProtectedBranch_required_pull_request_reviews) SetRequireCodeOwnerReviews(value *bool)() { + m.require_code_owner_reviews = value +} +// SetRequiredApprovingReviewCount sets the required_approving_review_count property value. The required_approving_review_count property +func (m *ProtectedBranch_required_pull_request_reviews) SetRequiredApprovingReviewCount(value *int32)() { + m.required_approving_review_count = value +} +// SetRequireLastPushApproval sets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. +func (m *ProtectedBranch_required_pull_request_reviews) SetRequireLastPushApproval(value *bool)() { + m.require_last_push_approval = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranch_required_pull_request_reviews) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranch_required_pull_request_reviewsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassPullRequestAllowances()(ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable) + GetDismissalRestrictions()(ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable) + GetDismissStaleReviews()(*bool) + GetRequireCodeOwnerReviews()(*bool) + GetRequiredApprovingReviewCount()(*int32) + GetRequireLastPushApproval()(*bool) + GetUrl()(*string) + SetBypassPullRequestAllowances(value ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable)() + SetDismissalRestrictions(value ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable)() + SetDismissStaleReviews(value *bool)() + SetRequireCodeOwnerReviews(value *bool)() + SetRequiredApprovingReviewCount(value *int32)() + SetRequireLastPushApproval(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_required_pull_request_reviews_bypass_pull_request_allowances.go b/pkg/github/models/protected_branch_required_pull_request_reviews_bypass_pull_request_allowances.go new file mode 100644 index 0000000..6155885 --- /dev/null +++ b/pkg/github/models/protected_branch_required_pull_request_reviews_bypass_pull_request_allowances.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The apps property + apps []Integrationable + // The teams property + teams []Teamable + // The users property + users []SimpleUserable +} +// NewProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances instantiates a new ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances and sets the default values. +func NewProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances()(*ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) { + m := &ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The apps property +// returns a []Integrationable when successful +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) GetApps()([]Integrationable) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Integrationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Integrationable) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The teams property +// returns a []Teamable when successful +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) GetTeams()([]Teamable) { + return m.teams +} +// GetUsers gets the users property value. The users property +// returns a []SimpleUserable when successful +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) GetUsers()([]SimpleUserable) { + return m.users +} +// Serialize serializes information the current object +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The apps property +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) SetApps(value []Integrationable)() { + m.apps = value +} +// SetTeams sets the teams property value. The teams property +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) SetTeams(value []Teamable)() { + m.teams = value +} +// SetUsers sets the users property value. The users property +func (m *ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances) SetUsers(value []SimpleUserable)() { + m.users = value +} +type ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowancesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]Integrationable) + GetTeams()([]Teamable) + GetUsers()([]SimpleUserable) + SetApps(value []Integrationable)() + SetTeams(value []Teamable)() + SetUsers(value []SimpleUserable)() +} diff --git a/pkg/github/models/protected_branch_required_pull_request_reviews_dismissal_restrictions.go b/pkg/github/models/protected_branch_required_pull_request_reviews_dismissal_restrictions.go new file mode 100644 index 0000000..9bb1263 --- /dev/null +++ b/pkg/github/models/protected_branch_required_pull_request_reviews_dismissal_restrictions.go @@ -0,0 +1,261 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_required_pull_request_reviews_dismissal_restrictions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The apps property + apps []Integrationable + // The teams property + teams []Teamable + // The teams_url property + teams_url *string + // The url property + url *string + // The users property + users []SimpleUserable + // The users_url property + users_url *string +} +// NewProtectedBranch_required_pull_request_reviews_dismissal_restrictions instantiates a new ProtectedBranch_required_pull_request_reviews_dismissal_restrictions and sets the default values. +func NewProtectedBranch_required_pull_request_reviews_dismissal_restrictions()(*ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) { + m := &ProtectedBranch_required_pull_request_reviews_dismissal_restrictions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranch_required_pull_request_reviews_dismissal_restrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_required_pull_request_reviews_dismissal_restrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_required_pull_request_reviews_dismissal_restrictions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The apps property +// returns a []Integrationable when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetApps()([]Integrationable) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Integrationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Integrationable) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetTeams(res) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetUsers(res) + } + return nil + } + res["users_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsersUrl(val) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The teams property +// returns a []Teamable when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetTeams()([]Teamable) { + return m.teams +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetUrl()(*string) { + return m.url +} +// GetUsers gets the users property value. The users property +// returns a []SimpleUserable when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetUsers()([]SimpleUserable) { + return m.users +} +// GetUsersUrl gets the users_url property value. The users_url property +// returns a *string when successful +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) GetUsersUrl()(*string) { + return m.users_url +} +// Serialize serializes information the current object +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("users_url", m.GetUsersUrl()) + 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 *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The apps property +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetApps(value []Integrationable)() { + m.apps = value +} +// SetTeams sets the teams property value. The teams property +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetTeams(value []Teamable)() { + m.teams = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetUrl(value *string)() { + m.url = value +} +// SetUsers sets the users property value. The users property +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetUsers(value []SimpleUserable)() { + m.users = value +} +// SetUsersUrl sets the users_url property value. The users_url property +func (m *ProtectedBranch_required_pull_request_reviews_dismissal_restrictions) SetUsersUrl(value *string)() { + m.users_url = value +} +type ProtectedBranch_required_pull_request_reviews_dismissal_restrictionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]Integrationable) + GetTeams()([]Teamable) + GetTeamsUrl()(*string) + GetUrl()(*string) + GetUsers()([]SimpleUserable) + GetUsersUrl()(*string) + SetApps(value []Integrationable)() + SetTeams(value []Teamable)() + SetTeamsUrl(value *string)() + SetUrl(value *string)() + SetUsers(value []SimpleUserable)() + SetUsersUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_required_signatures.go b/pkg/github/models/protected_branch_required_signatures.go new file mode 100644 index 0000000..67d7575 --- /dev/null +++ b/pkg/github/models/protected_branch_required_signatures.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranch_required_signatures struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enabled property + enabled *bool + // The url property + url *string +} +// NewProtectedBranch_required_signatures instantiates a new ProtectedBranch_required_signatures and sets the default values. +func NewProtectedBranch_required_signatures()(*ProtectedBranch_required_signatures) { + m := &ProtectedBranch_required_signatures{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranch_required_signaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranch_required_signaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranch_required_signatures(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranch_required_signatures) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *ProtectedBranch_required_signatures) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranch_required_signatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranch_required_signatures) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranch_required_signatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranch_required_signatures) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProtectedBranch_required_signatures) SetEnabled(value *bool)() { + m.enabled = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranch_required_signatures) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranch_required_signaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetUrl()(*string) + SetEnabled(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_required_status_check.go b/pkg/github/models/protected_branch_required_status_check.go new file mode 100644 index 0000000..c76b750 --- /dev/null +++ b/pkg/github/models/protected_branch_required_status_check.go @@ -0,0 +1,244 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectedBranchRequiredStatusCheck protected Branch Required Status Check +type ProtectedBranchRequiredStatusCheck struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The checks property + checks []ProtectedBranchRequiredStatusCheck_checksable + // The contexts property + contexts []string + // The contexts_url property + contexts_url *string + // The enforcement_level property + enforcement_level *string + // The strict property + strict *bool + // The url property + url *string +} +// NewProtectedBranchRequiredStatusCheck instantiates a new ProtectedBranchRequiredStatusCheck and sets the default values. +func NewProtectedBranchRequiredStatusCheck()(*ProtectedBranchRequiredStatusCheck) { + m := &ProtectedBranchRequiredStatusCheck{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchRequiredStatusCheckFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchRequiredStatusCheckFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranchRequiredStatusCheck(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranchRequiredStatusCheck) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChecks gets the checks property value. The checks property +// returns a []ProtectedBranchRequiredStatusCheck_checksable when successful +func (m *ProtectedBranchRequiredStatusCheck) GetChecks()([]ProtectedBranchRequiredStatusCheck_checksable) { + return m.checks +} +// GetContexts gets the contexts property value. The contexts property +// returns a []string when successful +func (m *ProtectedBranchRequiredStatusCheck) GetContexts()([]string) { + return m.contexts +} +// GetContextsUrl gets the contexts_url property value. The contexts_url property +// returns a *string when successful +func (m *ProtectedBranchRequiredStatusCheck) GetContextsUrl()(*string) { + return m.contexts_url +} +// GetEnforcementLevel gets the enforcement_level property value. The enforcement_level property +// returns a *string when successful +func (m *ProtectedBranchRequiredStatusCheck) GetEnforcementLevel()(*string) { + return m.enforcement_level +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranchRequiredStatusCheck) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProtectedBranchRequiredStatusCheck_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProtectedBranchRequiredStatusCheck_checksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ProtectedBranchRequiredStatusCheck_checksable) + } + } + m.SetChecks(res) + } + return nil + } + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + res["contexts_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContextsUrl(val) + } + return nil + } + res["enforcement_level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforcementLevel(val) + } + return nil + } + res["strict"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStrict(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetStrict gets the strict property value. The strict property +// returns a *bool when successful +func (m *ProtectedBranchRequiredStatusCheck) GetStrict()(*bool) { + return m.strict +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ProtectedBranchRequiredStatusCheck) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ProtectedBranchRequiredStatusCheck) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChecks())) + for i, v := range m.GetChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("checks", cast) + if err != nil { + return err + } + } + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contexts_url", m.GetContextsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("enforcement_level", m.GetEnforcementLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("strict", m.GetStrict()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ProtectedBranchRequiredStatusCheck) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChecks sets the checks property value. The checks property +func (m *ProtectedBranchRequiredStatusCheck) SetChecks(value []ProtectedBranchRequiredStatusCheck_checksable)() { + m.checks = value +} +// SetContexts sets the contexts property value. The contexts property +func (m *ProtectedBranchRequiredStatusCheck) SetContexts(value []string)() { + m.contexts = value +} +// SetContextsUrl sets the contexts_url property value. The contexts_url property +func (m *ProtectedBranchRequiredStatusCheck) SetContextsUrl(value *string)() { + m.contexts_url = value +} +// SetEnforcementLevel sets the enforcement_level property value. The enforcement_level property +func (m *ProtectedBranchRequiredStatusCheck) SetEnforcementLevel(value *string)() { + m.enforcement_level = value +} +// SetStrict sets the strict property value. The strict property +func (m *ProtectedBranchRequiredStatusCheck) SetStrict(value *bool)() { + m.strict = value +} +// SetUrl sets the url property value. The url property +func (m *ProtectedBranchRequiredStatusCheck) SetUrl(value *string)() { + m.url = value +} +type ProtectedBranchRequiredStatusCheckable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecks()([]ProtectedBranchRequiredStatusCheck_checksable) + GetContexts()([]string) + GetContextsUrl()(*string) + GetEnforcementLevel()(*string) + GetStrict()(*bool) + GetUrl()(*string) + SetChecks(value []ProtectedBranchRequiredStatusCheck_checksable)() + SetContexts(value []string)() + SetContextsUrl(value *string)() + SetEnforcementLevel(value *string)() + SetStrict(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/protected_branch_required_status_check_checks.go b/pkg/github/models/protected_branch_required_status_check_checks.go new file mode 100644 index 0000000..3903ef2 --- /dev/null +++ b/pkg/github/models/protected_branch_required_status_check_checks.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProtectedBranchRequiredStatusCheck_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The app_id property + app_id *int32 + // The context property + context *string +} +// NewProtectedBranchRequiredStatusCheck_checks instantiates a new ProtectedBranchRequiredStatusCheck_checks and sets the default values. +func NewProtectedBranchRequiredStatusCheck_checks()(*ProtectedBranchRequiredStatusCheck_checks) { + m := &ProtectedBranchRequiredStatusCheck_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProtectedBranchRequiredStatusCheck_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProtectedBranchRequiredStatusCheck_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectedBranchRequiredStatusCheck_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProtectedBranchRequiredStatusCheck_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The app_id property +// returns a *int32 when successful +func (m *ProtectedBranchRequiredStatusCheck_checks) GetAppId()(*int32) { + return m.app_id +} +// GetContext gets the context property value. The context property +// returns a *string when successful +func (m *ProtectedBranchRequiredStatusCheck_checks) GetContext()(*string) { + return m.context +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProtectedBranchRequiredStatusCheck_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectedBranchRequiredStatusCheck_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + 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 *ProtectedBranchRequiredStatusCheck_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The app_id property +func (m *ProtectedBranchRequiredStatusCheck_checks) SetAppId(value *int32)() { + m.app_id = value +} +// SetContext sets the context property value. The context property +func (m *ProtectedBranchRequiredStatusCheck_checks) SetContext(value *string)() { + m.context = value +} +type ProtectedBranchRequiredStatusCheck_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int32) + GetContext()(*string) + SetAppId(value *int32)() + SetContext(value *string)() +} diff --git a/pkg/github/models/public_user.go b/pkg/github/models/public_user.go new file mode 100644 index 0000000..34064bf --- /dev/null +++ b/pkg/github/models/public_user.go @@ -0,0 +1,1194 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicUser public User +type PublicUser struct { + // The avatar_url property + avatar_url *string + // The bio property + bio *string + // The blog property + blog *string + // The collaborators property + collaborators *int32 + // The company property + company *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The disk_usage property + disk_usage *int32 + // The email property + email *string + // The events_url property + events_url *string + // The followers property + followers *int32 + // The followers_url property + followers_url *string + // The following property + following *int32 + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The hireable property + hireable *bool + // The html_url property + html_url *string + // The id property + id *int64 + // The location property + location *string + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The notification_email property + notification_email *string + // The organizations_url property + organizations_url *string + // The owned_private_repos property + owned_private_repos *int32 + // The plan property + plan PublicUser_planable + // The private_gists property + private_gists *int32 + // The public_gists property + public_gists *int32 + // The public_repos property + public_repos *int32 + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The suspended_at property + suspended_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The total_private_repos property + total_private_repos *int32 + // The twitter_username property + twitter_username *string + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewPublicUser instantiates a new PublicUser and sets the default values. +func NewPublicUser()(*PublicUser) { + m := &PublicUser{ + } + return m +} +// CreatePublicUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePublicUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicUser(), nil +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *PublicUser) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetBio gets the bio property value. The bio property +// returns a *string when successful +func (m *PublicUser) GetBio()(*string) { + return m.bio +} +// GetBlog gets the blog property value. The blog property +// returns a *string when successful +func (m *PublicUser) GetBlog()(*string) { + return m.blog +} +// GetCollaborators gets the collaborators property value. The collaborators property +// returns a *int32 when successful +func (m *PublicUser) GetCollaborators()(*int32) { + return m.collaborators +} +// GetCompany gets the company property value. The company property +// returns a *string when successful +func (m *PublicUser) GetCompany()(*string) { + return m.company +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PublicUser) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiskUsage gets the disk_usage property value. The disk_usage property +// returns a *int32 when successful +func (m *PublicUser) GetDiskUsage()(*int32) { + return m.disk_usage +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *PublicUser) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PublicUser) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PublicUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["bio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBio(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCollaborators(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["disk_usage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDiskUsage(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowing(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["hireable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHireable(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationEmail(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["owned_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOwnedPrivateRepos(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicUser_planFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(PublicUser_planable)) + } + return nil + } + res["private_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateGists(val) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepos(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["suspended_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSuspendedAt(val) + } + return nil + } + res["total_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPrivateRepos(val) + } + return nil + } + res["twitter_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTwitterUsername(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowers gets the followers property value. The followers property +// returns a *int32 when successful +func (m *PublicUser) GetFollowers()(*int32) { + return m.followers +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *PublicUser) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowing gets the following property value. The following property +// returns a *int32 when successful +func (m *PublicUser) GetFollowing()(*int32) { + return m.following +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *PublicUser) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *PublicUser) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *PublicUser) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHireable gets the hireable property value. The hireable property +// returns a *bool when successful +func (m *PublicUser) GetHireable()(*bool) { + return m.hireable +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PublicUser) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PublicUser) GetId()(*int64) { + return m.id +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *PublicUser) GetLocation()(*string) { + return m.location +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *PublicUser) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PublicUser) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PublicUser) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationEmail gets the notification_email property value. The notification_email property +// returns a *string when successful +func (m *PublicUser) GetNotificationEmail()(*string) { + return m.notification_email +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *PublicUser) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetOwnedPrivateRepos gets the owned_private_repos property value. The owned_private_repos property +// returns a *int32 when successful +func (m *PublicUser) GetOwnedPrivateRepos()(*int32) { + return m.owned_private_repos +} +// GetPlan gets the plan property value. The plan property +// returns a PublicUser_planable when successful +func (m *PublicUser) GetPlan()(PublicUser_planable) { + return m.plan +} +// GetPrivateGists gets the private_gists property value. The private_gists property +// returns a *int32 when successful +func (m *PublicUser) GetPrivateGists()(*int32) { + return m.private_gists +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *PublicUser) GetPublicGists()(*int32) { + return m.public_gists +} +// GetPublicRepos gets the public_repos property value. The public_repos property +// returns a *int32 when successful +func (m *PublicUser) GetPublicRepos()(*int32) { + return m.public_repos +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *PublicUser) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *PublicUser) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *PublicUser) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *PublicUser) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *PublicUser) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetSuspendedAt gets the suspended_at property value. The suspended_at property +// returns a *Time when successful +func (m *PublicUser) GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.suspended_at +} +// GetTotalPrivateRepos gets the total_private_repos property value. The total_private_repos property +// returns a *int32 when successful +func (m *PublicUser) GetTotalPrivateRepos()(*int32) { + return m.total_private_repos +} +// GetTwitterUsername gets the twitter_username property value. The twitter_username property +// returns a *string when successful +func (m *PublicUser) GetTwitterUsername()(*string) { + return m.twitter_username +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *PublicUser) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PublicUser) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PublicUser) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PublicUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bio", m.GetBio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("collaborators", m.GetCollaborators()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("disk_usage", m.GetDiskUsage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("followers", m.GetFollowers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("following", m.GetFollowing()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hireable", m.GetHireable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_email", m.GetNotificationEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("owned_private_repos", m.GetOwnedPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_gists", m.GetPrivateGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("suspended_at", m.GetSuspendedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_private_repos", m.GetTotalPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("twitter_username", m.GetTwitterUsername()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *PublicUser) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetBio sets the bio property value. The bio property +func (m *PublicUser) SetBio(value *string)() { + m.bio = value +} +// SetBlog sets the blog property value. The blog property +func (m *PublicUser) SetBlog(value *string)() { + m.blog = value +} +// SetCollaborators sets the collaborators property value. The collaborators property +func (m *PublicUser) SetCollaborators(value *int32)() { + m.collaborators = value +} +// SetCompany sets the company property value. The company property +func (m *PublicUser) SetCompany(value *string)() { + m.company = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PublicUser) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiskUsage sets the disk_usage property value. The disk_usage property +func (m *PublicUser) SetDiskUsage(value *int32)() { + m.disk_usage = value +} +// SetEmail sets the email property value. The email property +func (m *PublicUser) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PublicUser) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowers sets the followers property value. The followers property +func (m *PublicUser) SetFollowers(value *int32)() { + m.followers = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *PublicUser) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowing sets the following property value. The following property +func (m *PublicUser) SetFollowing(value *int32)() { + m.following = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *PublicUser) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *PublicUser) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *PublicUser) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHireable sets the hireable property value. The hireable property +func (m *PublicUser) SetHireable(value *bool)() { + m.hireable = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PublicUser) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PublicUser) SetId(value *int64)() { + m.id = value +} +// SetLocation sets the location property value. The location property +func (m *PublicUser) SetLocation(value *string)() { + m.location = value +} +// SetLogin sets the login property value. The login property +func (m *PublicUser) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *PublicUser) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PublicUser) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationEmail sets the notification_email property value. The notification_email property +func (m *PublicUser) SetNotificationEmail(value *string)() { + m.notification_email = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *PublicUser) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetOwnedPrivateRepos sets the owned_private_repos property value. The owned_private_repos property +func (m *PublicUser) SetOwnedPrivateRepos(value *int32)() { + m.owned_private_repos = value +} +// SetPlan sets the plan property value. The plan property +func (m *PublicUser) SetPlan(value PublicUser_planable)() { + m.plan = value +} +// SetPrivateGists sets the private_gists property value. The private_gists property +func (m *PublicUser) SetPrivateGists(value *int32)() { + m.private_gists = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *PublicUser) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetPublicRepos sets the public_repos property value. The public_repos property +func (m *PublicUser) SetPublicRepos(value *int32)() { + m.public_repos = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *PublicUser) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *PublicUser) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *PublicUser) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *PublicUser) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *PublicUser) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetSuspendedAt sets the suspended_at property value. The suspended_at property +func (m *PublicUser) SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.suspended_at = value +} +// SetTotalPrivateRepos sets the total_private_repos property value. The total_private_repos property +func (m *PublicUser) SetTotalPrivateRepos(value *int32)() { + m.total_private_repos = value +} +// SetTwitterUsername sets the twitter_username property value. The twitter_username property +func (m *PublicUser) SetTwitterUsername(value *string)() { + m.twitter_username = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *PublicUser) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PublicUser) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PublicUser) SetUrl(value *string)() { + m.url = value +} +type PublicUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetBio()(*string) + GetBlog()(*string) + GetCollaborators()(*int32) + GetCompany()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiskUsage()(*int32) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowers()(*int32) + GetFollowersUrl()(*string) + GetFollowing()(*int32) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHireable()(*bool) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLocation()(*string) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationEmail()(*string) + GetOrganizationsUrl()(*string) + GetOwnedPrivateRepos()(*int32) + GetPlan()(PublicUser_planable) + GetPrivateGists()(*int32) + GetPublicGists()(*int32) + GetPublicRepos()(*int32) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTotalPrivateRepos()(*int32) + GetTwitterUsername()(*string) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetBio(value *string)() + SetBlog(value *string)() + SetCollaborators(value *int32)() + SetCompany(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiskUsage(value *int32)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowers(value *int32)() + SetFollowersUrl(value *string)() + SetFollowing(value *int32)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHireable(value *bool)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLocation(value *string)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationEmail(value *string)() + SetOrganizationsUrl(value *string)() + SetOwnedPrivateRepos(value *int32)() + SetPlan(value PublicUser_planable)() + SetPrivateGists(value *int32)() + SetPublicGists(value *int32)() + SetPublicRepos(value *int32)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTotalPrivateRepos(value *int32)() + SetTwitterUsername(value *string)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/public_user_plan.go b/pkg/github/models/public_user_plan.go new file mode 100644 index 0000000..4bec18a --- /dev/null +++ b/pkg/github/models/public_user_plan.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PublicUser_plan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The collaborators property + collaborators *int32 + // The name property + name *string + // The private_repos property + private_repos *int32 + // The space property + space *int32 +} +// NewPublicUser_plan instantiates a new PublicUser_plan and sets the default values. +func NewPublicUser_plan()(*PublicUser_plan) { + m := &PublicUser_plan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePublicUser_planFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePublicUser_planFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicUser_plan(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PublicUser_plan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCollaborators gets the collaborators property value. The collaborators property +// returns a *int32 when successful +func (m *PublicUser_plan) GetCollaborators()(*int32) { + return m.collaborators +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PublicUser_plan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCollaborators(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateRepos(val) + } + return nil + } + res["space"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSpace(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PublicUser_plan) GetName()(*string) { + return m.name +} +// GetPrivateRepos gets the private_repos property value. The private_repos property +// returns a *int32 when successful +func (m *PublicUser_plan) GetPrivateRepos()(*int32) { + return m.private_repos +} +// GetSpace gets the space property value. The space property +// returns a *int32 when successful +func (m *PublicUser_plan) GetSpace()(*int32) { + return m.space +} +// Serialize serializes information the current object +func (m *PublicUser_plan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("collaborators", m.GetCollaborators()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_repos", m.GetPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("space", m.GetSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PublicUser_plan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCollaborators sets the collaborators property value. The collaborators property +func (m *PublicUser_plan) SetCollaborators(value *int32)() { + m.collaborators = value +} +// SetName sets the name property value. The name property +func (m *PublicUser_plan) SetName(value *string)() { + m.name = value +} +// SetPrivateRepos sets the private_repos property value. The private_repos property +func (m *PublicUser_plan) SetPrivateRepos(value *int32)() { + m.private_repos = value +} +// SetSpace sets the space property value. The space property +func (m *PublicUser_plan) SetSpace(value *int32)() { + m.space = value +} +type PublicUser_planable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollaborators()(*int32) + GetName()(*string) + GetPrivateRepos()(*int32) + GetSpace()(*int32) + SetCollaborators(value *int32)() + SetName(value *string)() + SetPrivateRepos(value *int32)() + SetSpace(value *int32)() +} diff --git a/pkg/github/models/pull_request.go b/pkg/github/models/pull_request.go new file mode 100644 index 0000000..f1d5c80 --- /dev/null +++ b/pkg/github/models/pull_request.go @@ -0,0 +1,1495 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PullRequest pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. +type PullRequest struct { + // The _links property + _links PullRequest__linksable + // The active_lock_reason property + active_lock_reason *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The additions property + additions *int32 + // A GitHub user. + assignee NullableSimpleUserable + // The assignees property + assignees []SimpleUserable + // How the author is associated with the repository. + author_association *AuthorAssociation + // The status of auto merging a pull request. + auto_merge AutoMergeable + // The base property + base PullRequest_baseable + // The body property + body *string + // The changed_files property + changed_files *int32 + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The comments property + comments *int32 + // The comments_url property + comments_url *string + // The commits property + commits *int32 + // The commits_url property + commits_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deletions property + deletions *int32 + // The diff_url property + diff_url *string + // Indicates whether or not the pull request is a draft. + draft *bool + // The head property + head PullRequest_headable + // The html_url property + html_url *string + // The id property + id *int64 + // The issue_url property + issue_url *string + // The labels property + labels []PullRequest_labelsable + // The locked property + locked *bool + // Indicates whether maintainers can modify the pull request. + maintainer_can_modify *bool + // The merge_commit_sha property + merge_commit_sha *string + // The mergeable property + mergeable *bool + // The mergeable_state property + mergeable_state *string + // The merged property + merged *bool + // The merged_at property + merged_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + merged_by NullableSimpleUserable + // A collection of related issues and pull requests. + milestone NullableMilestoneable + // The node_id property + node_id *string + // Number uniquely identifying the pull request within its repository. + number *int32 + // The patch_url property + patch_url *string + // The rebaseable property + rebaseable *bool + // The requested_reviewers property + requested_reviewers []SimpleUserable + // The requested_teams property + requested_teams []TeamSimpleable + // The review_comment_url property + review_comment_url *string + // The review_comments property + review_comments *int32 + // The review_comments_url property + review_comments_url *string + // State of this Pull Request. Either `open` or `closed`. + state *PullRequest_state + // The statuses_url property + statuses_url *string + // The title of the pull request. + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user SimpleUserable +} +// NewPullRequest instantiates a new PullRequest and sets the default values. +func NewPullRequest()(*PullRequest) { + m := &PullRequest{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest(), nil +} +// GetActiveLockReason gets the active_lock_reason property value. The active_lock_reason property +// returns a *string when successful +func (m *PullRequest) GetActiveLockReason()(*string) { + return m.active_lock_reason +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdditions gets the additions property value. The additions property +// returns a *int32 when successful +func (m *PullRequest) GetAdditions()(*int32) { + return m.additions +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequest) GetAssignee()(NullableSimpleUserable) { + return m.assignee +} +// GetAssignees gets the assignees property value. The assignees property +// returns a []SimpleUserable when successful +func (m *PullRequest) GetAssignees()([]SimpleUserable) { + return m.assignees +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *PullRequest) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetAutoMerge gets the auto_merge property value. The status of auto merging a pull request. +// returns a AutoMergeable when successful +func (m *PullRequest) GetAutoMerge()(AutoMergeable) { + return m.auto_merge +} +// GetBase gets the base property value. The base property +// returns a PullRequest_baseable when successful +func (m *PullRequest) GetBase()(PullRequest_baseable) { + return m.base +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *PullRequest) GetBody()(*string) { + return m.body +} +// GetChangedFiles gets the changed_files property value. The changed_files property +// returns a *int32 when successful +func (m *PullRequest) GetChangedFiles()(*int32) { + return m.changed_files +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *PullRequest) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetComments gets the comments property value. The comments property +// returns a *int32 when successful +func (m *PullRequest) GetComments()(*int32) { + return m.comments +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *PullRequest) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommits gets the commits property value. The commits property +// returns a *int32 when successful +func (m *PullRequest) GetCommits()(*int32) { + return m.commits +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *PullRequest) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PullRequest) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeletions gets the deletions property value. The deletions property +// returns a *int32 when successful +func (m *PullRequest) GetDeletions()(*int32) { + return m.deletions +} +// GetDiffUrl gets the diff_url property value. The diff_url property +// returns a *string when successful +func (m *PullRequest) GetDiffUrl()(*string) { + return m.diff_url +} +// GetDraft gets the draft property value. Indicates whether or not the pull request is a draft. +// returns a *bool when successful +func (m *PullRequest) GetDraft()(*bool) { + return m.draft +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(PullRequest__linksable)) + } + return nil + } + res["active_lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveLockReason(val) + } + return nil + } + res["additions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdditions(val) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(NullableSimpleUserable)) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetAssignees(res) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["auto_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAutoMergeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutoMerge(val.(AutoMergeable)) + } + return nil + } + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_baseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBase(val.(PullRequest_baseable)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["changed_files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChangedFiles(val) + } + return nil + } + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetComments(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommits(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeletions(val) + } + return nil + } + res["diff_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffUrl(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["head"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_headFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHead(val.(PullRequest_headable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issue_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueUrl(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePullRequest_labelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PullRequest_labelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PullRequest_labelsable) + } + } + m.SetLabels(res) + } + return nil + } + res["locked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocked(val) + } + return nil + } + res["maintainer_can_modify"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintainerCanModify(val) + } + return nil + } + res["merge_commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitSha(val) + } + return nil + } + res["mergeable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMergeable(val) + } + return nil + } + res["mergeable_state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergeableState(val) + } + return nil + } + res["merged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMerged(val) + } + return nil + } + res["merged_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMergedAt(val) + } + return nil + } + res["merged_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMergedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMilestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(NullableMilestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["patch_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchUrl(val) + } + return nil + } + res["rebaseable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRebaseable(val) + } + return nil + } + res["requested_reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetRequestedReviewers(res) + } + return nil + } + res["requested_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamSimpleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TeamSimpleable) + } + } + m.SetRequestedTeams(res) + } + return nil + } + res["review_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewCommentUrl(val) + } + return nil + } + res["review_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReviewComments(val) + } + return nil + } + res["review_comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewCommentsUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequest_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*PullRequest_state)) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetHead gets the head property value. The head property +// returns a PullRequest_headable when successful +func (m *PullRequest) GetHead()(PullRequest_headable) { + return m.head +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequest) GetId()(*int64) { + return m.id +} +// GetIssueUrl gets the issue_url property value. The issue_url property +// returns a *string when successful +func (m *PullRequest) GetIssueUrl()(*string) { + return m.issue_url +} +// GetLabels gets the labels property value. The labels property +// returns a []PullRequest_labelsable when successful +func (m *PullRequest) GetLabels()([]PullRequest_labelsable) { + return m.labels +} +// GetLinks gets the _links property value. The _links property +// returns a PullRequest__linksable when successful +func (m *PullRequest) GetLinks()(PullRequest__linksable) { + return m._links +} +// GetLocked gets the locked property value. The locked property +// returns a *bool when successful +func (m *PullRequest) GetLocked()(*bool) { + return m.locked +} +// GetMaintainerCanModify gets the maintainer_can_modify property value. Indicates whether maintainers can modify the pull request. +// returns a *bool when successful +func (m *PullRequest) GetMaintainerCanModify()(*bool) { + return m.maintainer_can_modify +} +// GetMergeable gets the mergeable property value. The mergeable property +// returns a *bool when successful +func (m *PullRequest) GetMergeable()(*bool) { + return m.mergeable +} +// GetMergeableState gets the mergeable_state property value. The mergeable_state property +// returns a *string when successful +func (m *PullRequest) GetMergeableState()(*string) { + return m.mergeable_state +} +// GetMergeCommitSha gets the merge_commit_sha property value. The merge_commit_sha property +// returns a *string when successful +func (m *PullRequest) GetMergeCommitSha()(*string) { + return m.merge_commit_sha +} +// GetMerged gets the merged property value. The merged property +// returns a *bool when successful +func (m *PullRequest) GetMerged()(*bool) { + return m.merged +} +// GetMergedAt gets the merged_at property value. The merged_at property +// returns a *Time when successful +func (m *PullRequest) GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.merged_at +} +// GetMergedBy gets the merged_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequest) GetMergedBy()(NullableSimpleUserable) { + return m.merged_by +} +// GetMilestone gets the milestone property value. A collection of related issues and pull requests. +// returns a NullableMilestoneable when successful +func (m *PullRequest) GetMilestone()(NullableMilestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. Number uniquely identifying the pull request within its repository. +// returns a *int32 when successful +func (m *PullRequest) GetNumber()(*int32) { + return m.number +} +// GetPatchUrl gets the patch_url property value. The patch_url property +// returns a *string when successful +func (m *PullRequest) GetPatchUrl()(*string) { + return m.patch_url +} +// GetRebaseable gets the rebaseable property value. The rebaseable property +// returns a *bool when successful +func (m *PullRequest) GetRebaseable()(*bool) { + return m.rebaseable +} +// GetRequestedReviewers gets the requested_reviewers property value. The requested_reviewers property +// returns a []SimpleUserable when successful +func (m *PullRequest) GetRequestedReviewers()([]SimpleUserable) { + return m.requested_reviewers +} +// GetRequestedTeams gets the requested_teams property value. The requested_teams property +// returns a []TeamSimpleable when successful +func (m *PullRequest) GetRequestedTeams()([]TeamSimpleable) { + return m.requested_teams +} +// GetReviewComments gets the review_comments property value. The review_comments property +// returns a *int32 when successful +func (m *PullRequest) GetReviewComments()(*int32) { + return m.review_comments +} +// GetReviewCommentsUrl gets the review_comments_url property value. The review_comments_url property +// returns a *string when successful +func (m *PullRequest) GetReviewCommentsUrl()(*string) { + return m.review_comments_url +} +// GetReviewCommentUrl gets the review_comment_url property value. The review_comment_url property +// returns a *string when successful +func (m *PullRequest) GetReviewCommentUrl()(*string) { + return m.review_comment_url +} +// GetState gets the state property value. State of this Pull Request. Either `open` or `closed`. +// returns a *PullRequest_state when successful +func (m *PullRequest) GetState()(*PullRequest_state) { + return m.state +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *PullRequest) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetTitle gets the title property value. The title of the pull request. +// returns a *string when successful +func (m *PullRequest) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PullRequest) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *PullRequest) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("active_lock_reason", m.GetActiveLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("additions", m.GetAdditions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignees())) + for i, v := range m.GetAssignees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("assignees", cast) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("auto_merge", m.GetAutoMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("base", m.GetBase()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("changed_files", m.GetChangedFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("commits", m.GetCommits()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deletions", m.GetDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("diff_url", m.GetDiffUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("head", m.GetHead()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_url", m.GetIssueUrl()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("locked", m.GetLocked()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintainer_can_modify", m.GetMaintainerCanModify()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("mergeable", m.GetMergeable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mergeable_state", m.GetMergeableState()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("merged", m.GetMerged()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("merged_at", m.GetMergedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("merged_by", m.GetMergedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merge_commit_sha", m.GetMergeCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch_url", m.GetPatchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("rebaseable", m.GetRebaseable()) + if err != nil { + return err + } + } + if m.GetRequestedReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequestedReviewers())) + for i, v := range m.GetRequestedReviewers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("requested_reviewers", cast) + if err != nil { + return err + } + } + if m.GetRequestedTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequestedTeams())) + for i, v := range m.GetRequestedTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("requested_teams", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("review_comments", m.GetReviewComments()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("review_comments_url", m.GetReviewCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("review_comment_url", m.GetReviewCommentUrl()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveLockReason sets the active_lock_reason property value. The active_lock_reason property +func (m *PullRequest) SetActiveLockReason(value *string)() { + m.active_lock_reason = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdditions sets the additions property value. The additions property +func (m *PullRequest) SetAdditions(value *int32)() { + m.additions = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *PullRequest) SetAssignee(value NullableSimpleUserable)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. The assignees property +func (m *PullRequest) SetAssignees(value []SimpleUserable)() { + m.assignees = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *PullRequest) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetAutoMerge sets the auto_merge property value. The status of auto merging a pull request. +func (m *PullRequest) SetAutoMerge(value AutoMergeable)() { + m.auto_merge = value +} +// SetBase sets the base property value. The base property +func (m *PullRequest) SetBase(value PullRequest_baseable)() { + m.base = value +} +// SetBody sets the body property value. The body property +func (m *PullRequest) SetBody(value *string)() { + m.body = value +} +// SetChangedFiles sets the changed_files property value. The changed_files property +func (m *PullRequest) SetChangedFiles(value *int32)() { + m.changed_files = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *PullRequest) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetComments sets the comments property value. The comments property +func (m *PullRequest) SetComments(value *int32)() { + m.comments = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *PullRequest) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommits sets the commits property value. The commits property +func (m *PullRequest) SetCommits(value *int32)() { + m.commits = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *PullRequest) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PullRequest) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeletions sets the deletions property value. The deletions property +func (m *PullRequest) SetDeletions(value *int32)() { + m.deletions = value +} +// SetDiffUrl sets the diff_url property value. The diff_url property +func (m *PullRequest) SetDiffUrl(value *string)() { + m.diff_url = value +} +// SetDraft sets the draft property value. Indicates whether or not the pull request is a draft. +func (m *PullRequest) SetDraft(value *bool)() { + m.draft = value +} +// SetHead sets the head property value. The head property +func (m *PullRequest) SetHead(value PullRequest_headable)() { + m.head = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest) SetId(value *int64)() { + m.id = value +} +// SetIssueUrl sets the issue_url property value. The issue_url property +func (m *PullRequest) SetIssueUrl(value *string)() { + m.issue_url = value +} +// SetLabels sets the labels property value. The labels property +func (m *PullRequest) SetLabels(value []PullRequest_labelsable)() { + m.labels = value +} +// SetLinks sets the _links property value. The _links property +func (m *PullRequest) SetLinks(value PullRequest__linksable)() { + m._links = value +} +// SetLocked sets the locked property value. The locked property +func (m *PullRequest) SetLocked(value *bool)() { + m.locked = value +} +// SetMaintainerCanModify sets the maintainer_can_modify property value. Indicates whether maintainers can modify the pull request. +func (m *PullRequest) SetMaintainerCanModify(value *bool)() { + m.maintainer_can_modify = value +} +// SetMergeable sets the mergeable property value. The mergeable property +func (m *PullRequest) SetMergeable(value *bool)() { + m.mergeable = value +} +// SetMergeableState sets the mergeable_state property value. The mergeable_state property +func (m *PullRequest) SetMergeableState(value *string)() { + m.mergeable_state = value +} +// SetMergeCommitSha sets the merge_commit_sha property value. The merge_commit_sha property +func (m *PullRequest) SetMergeCommitSha(value *string)() { + m.merge_commit_sha = value +} +// SetMerged sets the merged property value. The merged property +func (m *PullRequest) SetMerged(value *bool)() { + m.merged = value +} +// SetMergedAt sets the merged_at property value. The merged_at property +func (m *PullRequest) SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.merged_at = value +} +// SetMergedBy sets the merged_by property value. A GitHub user. +func (m *PullRequest) SetMergedBy(value NullableSimpleUserable)() { + m.merged_by = value +} +// SetMilestone sets the milestone property value. A collection of related issues and pull requests. +func (m *PullRequest) SetMilestone(value NullableMilestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. Number uniquely identifying the pull request within its repository. +func (m *PullRequest) SetNumber(value *int32)() { + m.number = value +} +// SetPatchUrl sets the patch_url property value. The patch_url property +func (m *PullRequest) SetPatchUrl(value *string)() { + m.patch_url = value +} +// SetRebaseable sets the rebaseable property value. The rebaseable property +func (m *PullRequest) SetRebaseable(value *bool)() { + m.rebaseable = value +} +// SetRequestedReviewers sets the requested_reviewers property value. The requested_reviewers property +func (m *PullRequest) SetRequestedReviewers(value []SimpleUserable)() { + m.requested_reviewers = value +} +// SetRequestedTeams sets the requested_teams property value. The requested_teams property +func (m *PullRequest) SetRequestedTeams(value []TeamSimpleable)() { + m.requested_teams = value +} +// SetReviewComments sets the review_comments property value. The review_comments property +func (m *PullRequest) SetReviewComments(value *int32)() { + m.review_comments = value +} +// SetReviewCommentsUrl sets the review_comments_url property value. The review_comments_url property +func (m *PullRequest) SetReviewCommentsUrl(value *string)() { + m.review_comments_url = value +} +// SetReviewCommentUrl sets the review_comment_url property value. The review_comment_url property +func (m *PullRequest) SetReviewCommentUrl(value *string)() { + m.review_comment_url = value +} +// SetState sets the state property value. State of this Pull Request. Either `open` or `closed`. +func (m *PullRequest) SetState(value *PullRequest_state)() { + m.state = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *PullRequest) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetTitle sets the title property value. The title of the pull request. +func (m *PullRequest) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PullRequest) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *PullRequest) SetUser(value SimpleUserable)() { + m.user = value +} +type PullRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveLockReason()(*string) + GetAdditions()(*int32) + GetAssignee()(NullableSimpleUserable) + GetAssignees()([]SimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetAutoMerge()(AutoMergeable) + GetBase()(PullRequest_baseable) + GetBody()(*string) + GetChangedFiles()(*int32) + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetComments()(*int32) + GetCommentsUrl()(*string) + GetCommits()(*int32) + GetCommitsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletions()(*int32) + GetDiffUrl()(*string) + GetDraft()(*bool) + GetHead()(PullRequest_headable) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueUrl()(*string) + GetLabels()([]PullRequest_labelsable) + GetLinks()(PullRequest__linksable) + GetLocked()(*bool) + GetMaintainerCanModify()(*bool) + GetMergeable()(*bool) + GetMergeableState()(*string) + GetMergeCommitSha()(*string) + GetMerged()(*bool) + GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMergedBy()(NullableSimpleUserable) + GetMilestone()(NullableMilestoneable) + GetNodeId()(*string) + GetNumber()(*int32) + GetPatchUrl()(*string) + GetRebaseable()(*bool) + GetRequestedReviewers()([]SimpleUserable) + GetRequestedTeams()([]TeamSimpleable) + GetReviewComments()(*int32) + GetReviewCommentsUrl()(*string) + GetReviewCommentUrl()(*string) + GetState()(*PullRequest_state) + GetStatusesUrl()(*string) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(SimpleUserable) + SetActiveLockReason(value *string)() + SetAdditions(value *int32)() + SetAssignee(value NullableSimpleUserable)() + SetAssignees(value []SimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetAutoMerge(value AutoMergeable)() + SetBase(value PullRequest_baseable)() + SetBody(value *string)() + SetChangedFiles(value *int32)() + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetComments(value *int32)() + SetCommentsUrl(value *string)() + SetCommits(value *int32)() + SetCommitsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletions(value *int32)() + SetDiffUrl(value *string)() + SetDraft(value *bool)() + SetHead(value PullRequest_headable)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueUrl(value *string)() + SetLabels(value []PullRequest_labelsable)() + SetLinks(value PullRequest__linksable)() + SetLocked(value *bool)() + SetMaintainerCanModify(value *bool)() + SetMergeable(value *bool)() + SetMergeableState(value *string)() + SetMergeCommitSha(value *string)() + SetMerged(value *bool)() + SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMergedBy(value NullableSimpleUserable)() + SetMilestone(value NullableMilestoneable)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetPatchUrl(value *string)() + SetRebaseable(value *bool)() + SetRequestedReviewers(value []SimpleUserable)() + SetRequestedTeams(value []TeamSimpleable)() + SetReviewComments(value *int32)() + SetReviewCommentsUrl(value *string)() + SetReviewCommentUrl(value *string)() + SetState(value *PullRequest_state)() + SetStatusesUrl(value *string)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/pull_request503_error.go b/pkg/github/models/pull_request503_error.go new file mode 100644 index 0000000..ed9cd41 --- /dev/null +++ b/pkg/github/models/pull_request503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewPullRequest503Error instantiates a new PullRequest503Error and sets the default values. +func NewPullRequest503Error()(*PullRequest503Error) { + m := &PullRequest503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *PullRequest503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *PullRequest503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *PullRequest503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *PullRequest503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *PullRequest503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *PullRequest503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *PullRequest503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *PullRequest503Error) SetMessage(value *string)() { + m.message = value +} +type PullRequest503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/pull_request__links.go b/pkg/github/models/pull_request__links.go new file mode 100644 index 0000000..f005098 --- /dev/null +++ b/pkg/github/models/pull_request__links.go @@ -0,0 +1,283 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Hypermedia Link + comments Linkable + // Hypermedia Link + commits Linkable + // Hypermedia Link + html Linkable + // Hypermedia Link + issue Linkable + // Hypermedia Link + review_comment Linkable + // Hypermedia Link + review_comments Linkable + // Hypermedia Link + self Linkable + // Hypermedia Link + statuses Linkable +} +// NewPullRequest__links instantiates a new PullRequest__links and sets the default values. +func NewPullRequest__links()(*PullRequest__links) { + m := &PullRequest__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetComments()(Linkable) { + return m.comments +} +// GetCommits gets the commits property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetCommits()(Linkable) { + return m.commits +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetComments(val.(Linkable)) + } + return nil + } + res["commits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommits(val.(Linkable)) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(Linkable)) + } + return nil + } + res["issue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssue(val.(Linkable)) + } + return nil + } + res["review_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewComment(val.(Linkable)) + } + return nil + } + res["review_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewComments(val.(Linkable)) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelf(val.(Linkable)) + } + return nil + } + res["statuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatuses(val.(Linkable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetHtml()(Linkable) { + return m.html +} +// GetIssue gets the issue property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetIssue()(Linkable) { + return m.issue +} +// GetReviewComment gets the review_comment property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetReviewComment()(Linkable) { + return m.review_comment +} +// GetReviewComments gets the review_comments property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetReviewComments()(Linkable) { + return m.review_comments +} +// GetSelf gets the self property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetSelf()(Linkable) { + return m.self +} +// GetStatuses gets the statuses property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequest__links) GetStatuses()(Linkable) { + return m.statuses +} +// Serialize serializes information the current object +func (m *PullRequest__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("commits", m.GetCommits()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("issue", m.GetIssue()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_comment", m.GetReviewComment()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_comments", m.GetReviewComments()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("self", m.GetSelf()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("statuses", m.GetStatuses()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. Hypermedia Link +func (m *PullRequest__links) SetComments(value Linkable)() { + m.comments = value +} +// SetCommits sets the commits property value. Hypermedia Link +func (m *PullRequest__links) SetCommits(value Linkable)() { + m.commits = value +} +// SetHtml sets the html property value. Hypermedia Link +func (m *PullRequest__links) SetHtml(value Linkable)() { + m.html = value +} +// SetIssue sets the issue property value. Hypermedia Link +func (m *PullRequest__links) SetIssue(value Linkable)() { + m.issue = value +} +// SetReviewComment sets the review_comment property value. Hypermedia Link +func (m *PullRequest__links) SetReviewComment(value Linkable)() { + m.review_comment = value +} +// SetReviewComments sets the review_comments property value. Hypermedia Link +func (m *PullRequest__links) SetReviewComments(value Linkable)() { + m.review_comments = value +} +// SetSelf sets the self property value. Hypermedia Link +func (m *PullRequest__links) SetSelf(value Linkable)() { + m.self = value +} +// SetStatuses sets the statuses property value. Hypermedia Link +func (m *PullRequest__links) SetStatuses(value Linkable)() { + m.statuses = value +} +type PullRequest__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()(Linkable) + GetCommits()(Linkable) + GetHtml()(Linkable) + GetIssue()(Linkable) + GetReviewComment()(Linkable) + GetReviewComments()(Linkable) + GetSelf()(Linkable) + GetStatuses()(Linkable) + SetComments(value Linkable)() + SetCommits(value Linkable)() + SetHtml(value Linkable)() + SetIssue(value Linkable)() + SetReviewComment(value Linkable)() + SetReviewComments(value Linkable)() + SetSelf(value Linkable)() + SetStatuses(value Linkable)() +} diff --git a/pkg/github/models/pull_request_base.go b/pkg/github/models/pull_request_base.go new file mode 100644 index 0000000..141ccdc --- /dev/null +++ b/pkg/github/models/pull_request_base.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_base struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The label property + label *string + // The ref property + ref *string + // The repo property + repo PullRequest_base_repoable + // The sha property + sha *string + // The user property + user PullRequest_base_userable +} +// NewPullRequest_base instantiates a new PullRequest_base and sets the default values. +func NewPullRequest_base()(*PullRequest_base) { + m := &PullRequest_base{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_baseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_baseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_base(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_base) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_base) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_base_repoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(PullRequest_base_repoable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_base_userFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(PullRequest_base_userable)) + } + return nil + } + return res +} +// GetLabel gets the label property value. The label property +// returns a *string when successful +func (m *PullRequest_base) GetLabel()(*string) { + return m.label +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *PullRequest_base) GetRef()(*string) { + return m.ref +} +// GetRepo gets the repo property value. The repo property +// returns a PullRequest_base_repoable when successful +func (m *PullRequest_base) GetRepo()(PullRequest_base_repoable) { + return m.repo +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequest_base) GetSha()(*string) { + return m.sha +} +// GetUser gets the user property value. The user property +// returns a PullRequest_base_userable when successful +func (m *PullRequest_base) GetUser()(PullRequest_base_userable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequest_base) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_base) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabel sets the label property value. The label property +func (m *PullRequest_base) SetLabel(value *string)() { + m.label = value +} +// SetRef sets the ref property value. The ref property +func (m *PullRequest_base) SetRef(value *string)() { + m.ref = value +} +// SetRepo sets the repo property value. The repo property +func (m *PullRequest_base) SetRepo(value PullRequest_base_repoable)() { + m.repo = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequest_base) SetSha(value *string)() { + m.sha = value +} +// SetUser sets the user property value. The user property +func (m *PullRequest_base) SetUser(value PullRequest_base_userable)() { + m.user = value +} +type PullRequest_baseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabel()(*string) + GetRef()(*string) + GetRepo()(PullRequest_base_repoable) + GetSha()(*string) + GetUser()(PullRequest_base_userable) + SetLabel(value *string)() + SetRef(value *string)() + SetRepo(value PullRequest_base_repoable)() + SetSha(value *string)() + SetUser(value PullRequest_base_userable)() +} diff --git a/pkg/github/models/pull_request_base_repo.go b/pkg/github/models/pull_request_base_repo.go new file mode 100644 index 0000000..8a58604 --- /dev/null +++ b/pkg/github/models/pull_request_base_repo.go @@ -0,0 +1,2523 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_base_repo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_forking property + allow_forking *bool + // The allow_merge_commit property + allow_merge_commit *bool + // The allow_rebase_merge property + allow_rebase_merge *bool + // The allow_squash_merge property + allow_squash_merge *bool + // The archive_url property + archive_url *string + // The archived property + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_branch property + default_branch *string + // The deployments_url property + deployments_url *string + // The description property + description *string + // The disabled property + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // The has_discussions property + has_discussions *bool + // The has_downloads property + has_downloads *bool + // The has_issues property + has_issues *bool + // The has_pages property + has_pages *bool + // The has_projects property + has_projects *bool + // The has_wiki property + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The is_template property + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // License Simple + license NullableLicenseSimpleable + // The master_branch property + master_branch *string + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name property + name *string + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // The owner property + owner PullRequest_base_repo_ownerable + // The permissions property + permissions PullRequest_base_repo_permissionsable + // The private property + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The size property + size *int32 + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewPullRequest_base_repo instantiates a new PullRequest_base_repo and sets the default values. +func NewPullRequest_base_repo()(*PullRequest_base_repo) { + m := &PullRequest_base_repo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_base_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_base_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_base_repo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_base_repo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowForking gets the allow_forking property value. The allow_forking property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. The allow_merge_commit property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. The allow_rebase_merge property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. The allow_squash_merge property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetArchived gets the archived property value. The archived property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PullRequest_base_repo) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default_branch property +// returns a *string when successful +func (m *PullRequest_base_repo) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *PullRequest_base_repo) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. The disabled property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_base_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForking(val) + } + return nil + } + res["allow_merge_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMergeCommit(val) + } + return nil + } + res["allow_rebase_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowRebaseMerge(val) + } + return nil + } + res["allow_squash_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowSquashMerge(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_base_repo_ownerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(PullRequest_base_repo_ownerable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_base_repo_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(PullRequest_base_repo_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *PullRequest_base_repo) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. The has_discussions property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. The has_downloads property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. The has_issues property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. The has_projects property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. The has_wiki property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *PullRequest_base_repo) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetId()(*int32) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. The is_template property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *PullRequest_base_repo) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *PullRequest_base_repo) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *PullRequest_base_repo) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequest_base_repo) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_base_repo) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. The owner property +// returns a PullRequest_base_repo_ownerable when successful +func (m *PullRequest_base_repo) GetOwner()(PullRequest_base_repo_ownerable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a PullRequest_base_repo_permissionsable when successful +func (m *PullRequest_base_repo) GetPermissions()(PullRequest_base_repo_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. The private property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *PullRequest_base_repo) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetSize()(*int32) { + return m.size +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *PullRequest_base_repo) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *PullRequest_base_repo) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PullRequest_base_repo) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_base_repo) GetUrl()(*string) { + return m.url +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *PullRequest_base_repo) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *PullRequest_base_repo) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *PullRequest_base_repo) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *PullRequest_base_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_merge_commit", m.GetAllowMergeCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_rebase_merge", m.GetAllowRebaseMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_squash_merge", m.GetAllowSquashMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_base_repo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowForking sets the allow_forking property value. The allow_forking property +func (m *PullRequest_base_repo) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. The allow_merge_commit property +func (m *PullRequest_base_repo) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. The allow_rebase_merge property +func (m *PullRequest_base_repo) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. The allow_squash_merge property +func (m *PullRequest_base_repo) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetArchived sets the archived property value. The archived property +func (m *PullRequest_base_repo) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *PullRequest_base_repo) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *PullRequest_base_repo) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *PullRequest_base_repo) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *PullRequest_base_repo) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *PullRequest_base_repo) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *PullRequest_base_repo) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *PullRequest_base_repo) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *PullRequest_base_repo) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *PullRequest_base_repo) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *PullRequest_base_repo) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *PullRequest_base_repo) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PullRequest_base_repo) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default_branch property +func (m *PullRequest_base_repo) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *PullRequest_base_repo) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *PullRequest_base_repo) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. The disabled property +func (m *PullRequest_base_repo) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *PullRequest_base_repo) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PullRequest_base_repo) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *PullRequest_base_repo) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *PullRequest_base_repo) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *PullRequest_base_repo) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *PullRequest_base_repo) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *PullRequest_base_repo) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *PullRequest_base_repo) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *PullRequest_base_repo) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *PullRequest_base_repo) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *PullRequest_base_repo) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. The has_discussions property +func (m *PullRequest_base_repo) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. The has_downloads property +func (m *PullRequest_base_repo) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. The has_issues property +func (m *PullRequest_base_repo) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *PullRequest_base_repo) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. The has_projects property +func (m *PullRequest_base_repo) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. The has_wiki property +func (m *PullRequest_base_repo) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *PullRequest_base_repo) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *PullRequest_base_repo) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest_base_repo) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_base_repo) SetId(value *int32)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *PullRequest_base_repo) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *PullRequest_base_repo) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *PullRequest_base_repo) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. The is_template property +func (m *PullRequest_base_repo) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *PullRequest_base_repo) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *PullRequest_base_repo) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *PullRequest_base_repo) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *PullRequest_base_repo) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. License Simple +func (m *PullRequest_base_repo) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *PullRequest_base_repo) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *PullRequest_base_repo) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *PullRequest_base_repo) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *PullRequest_base_repo) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name property +func (m *PullRequest_base_repo) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_base_repo) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *PullRequest_base_repo) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *PullRequest_base_repo) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *PullRequest_base_repo) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. The owner property +func (m *PullRequest_base_repo) SetOwner(value PullRequest_base_repo_ownerable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *PullRequest_base_repo) SetPermissions(value PullRequest_base_repo_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. The private property +func (m *PullRequest_base_repo) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *PullRequest_base_repo) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *PullRequest_base_repo) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *PullRequest_base_repo) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetSize sets the size property value. The size property +func (m *PullRequest_base_repo) SetSize(value *int32)() { + m.size = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *PullRequest_base_repo) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *PullRequest_base_repo) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *PullRequest_base_repo) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *PullRequest_base_repo) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *PullRequest_base_repo) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *PullRequest_base_repo) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *PullRequest_base_repo) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *PullRequest_base_repo) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *PullRequest_base_repo) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *PullRequest_base_repo) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *PullRequest_base_repo) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *PullRequest_base_repo) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PullRequest_base_repo) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_base_repo) SetUrl(value *string)() { + m.url = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *PullRequest_base_repo) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *PullRequest_base_repo) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *PullRequest_base_repo) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *PullRequest_base_repo) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type PullRequest_base_repoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetMasterBranch()(*string) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(PullRequest_base_repo_ownerable) + GetPermissions()(PullRequest_base_repo_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetSize()(*int32) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetMasterBranch(value *string)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value PullRequest_base_repo_ownerable)() + SetPermissions(value PullRequest_base_repo_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetSize(value *int32)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/pull_request_base_repo_owner.go b/pkg/github/models/pull_request_base_repo_owner.go new file mode 100644 index 0000000..80915d1 --- /dev/null +++ b/pkg/github/models/pull_request_base_repo_owner.go @@ -0,0 +1,573 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_base_repo_owner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int32 + // The login property + login *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewPullRequest_base_repo_owner instantiates a new PullRequest_base_repo_owner and sets the default values. +func NewPullRequest_base_repo_owner()(*PullRequest_base_repo_owner) { + m := &PullRequest_base_repo_owner{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_base_repo_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_base_repo_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_base_repo_owner(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_base_repo_owner) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_base_repo_owner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *PullRequest_base_repo_owner) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *PullRequest_base_repo_owner) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_base_repo_owner) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequest_base_repo_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_base_repo_owner) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *PullRequest_base_repo_owner) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PullRequest_base_repo_owner) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *PullRequest_base_repo_owner) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *PullRequest_base_repo_owner) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *PullRequest_base_repo_owner) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *PullRequest_base_repo_owner) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest_base_repo_owner) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_base_repo_owner) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *PullRequest_base_repo_owner) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_base_repo_owner) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *PullRequest_base_repo_owner) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *PullRequest_base_repo_owner) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *PullRequest_base_repo_owner) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *PullRequest_base_repo_owner) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *PullRequest_base_repo_owner) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *PullRequest_base_repo_owner) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *PullRequest_base_repo_owner) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_base_repo_owner) SetUrl(value *string)() { + m.url = value +} +type PullRequest_base_repo_ownerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLogin()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_base_repo_permissions.go b/pkg/github/models/pull_request_base_repo_permissions.go new file mode 100644 index 0000000..65df8f0 --- /dev/null +++ b/pkg/github/models/pull_request_base_repo_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_base_repo_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewPullRequest_base_repo_permissions instantiates a new PullRequest_base_repo_permissions and sets the default values. +func NewPullRequest_base_repo_permissions()(*PullRequest_base_repo_permissions) { + m := &PullRequest_base_repo_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_base_repo_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_base_repo_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_base_repo_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_base_repo_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *PullRequest_base_repo_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_base_repo_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *PullRequest_base_repo_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *PullRequest_base_repo_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *PullRequest_base_repo_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *PullRequest_base_repo_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *PullRequest_base_repo_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_base_repo_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *PullRequest_base_repo_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *PullRequest_base_repo_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *PullRequest_base_repo_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *PullRequest_base_repo_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *PullRequest_base_repo_permissions) SetTriage(value *bool)() { + m.triage = value +} +type PullRequest_base_repo_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/pull_request_base_user.go b/pkg/github/models/pull_request_base_user.go new file mode 100644 index 0000000..dfc31c5 --- /dev/null +++ b/pkg/github/models/pull_request_base_user.go @@ -0,0 +1,573 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_base_user struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewPullRequest_base_user instantiates a new PullRequest_base_user and sets the default values. +func NewPullRequest_base_user()(*PullRequest_base_user) { + m := &PullRequest_base_user{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_base_userFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_base_userFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_base_user(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_base_user) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_base_user) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *PullRequest_base_user) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequest_base_user) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *PullRequest_base_user) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_base_user) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *PullRequest_base_user) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *PullRequest_base_user) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *PullRequest_base_user) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_base_user) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequest_base_user) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_base_user) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *PullRequest_base_user) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PullRequest_base_user) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *PullRequest_base_user) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *PullRequest_base_user) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *PullRequest_base_user) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *PullRequest_base_user) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest_base_user) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_base_user) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *PullRequest_base_user) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_base_user) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *PullRequest_base_user) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *PullRequest_base_user) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *PullRequest_base_user) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *PullRequest_base_user) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *PullRequest_base_user) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *PullRequest_base_user) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *PullRequest_base_user) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_base_user) SetUrl(value *string)() { + m.url = value +} +type PullRequest_base_userable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_head.go b/pkg/github/models/pull_request_head.go new file mode 100644 index 0000000..b5a049b --- /dev/null +++ b/pkg/github/models/pull_request_head.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_head struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The label property + label *string + // The ref property + ref *string + // The repo property + repo PullRequest_head_repoable + // The sha property + sha *string + // The user property + user PullRequest_head_userable +} +// NewPullRequest_head instantiates a new PullRequest_head and sets the default values. +func NewPullRequest_head()(*PullRequest_head) { + m := &PullRequest_head{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_headFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_headFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_head(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_head) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_head) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_head_repoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(PullRequest_head_repoable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_head_userFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(PullRequest_head_userable)) + } + return nil + } + return res +} +// GetLabel gets the label property value. The label property +// returns a *string when successful +func (m *PullRequest_head) GetLabel()(*string) { + return m.label +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *PullRequest_head) GetRef()(*string) { + return m.ref +} +// GetRepo gets the repo property value. The repo property +// returns a PullRequest_head_repoable when successful +func (m *PullRequest_head) GetRepo()(PullRequest_head_repoable) { + return m.repo +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequest_head) GetSha()(*string) { + return m.sha +} +// GetUser gets the user property value. The user property +// returns a PullRequest_head_userable when successful +func (m *PullRequest_head) GetUser()(PullRequest_head_userable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequest_head) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_head) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabel sets the label property value. The label property +func (m *PullRequest_head) SetLabel(value *string)() { + m.label = value +} +// SetRef sets the ref property value. The ref property +func (m *PullRequest_head) SetRef(value *string)() { + m.ref = value +} +// SetRepo sets the repo property value. The repo property +func (m *PullRequest_head) SetRepo(value PullRequest_head_repoable)() { + m.repo = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequest_head) SetSha(value *string)() { + m.sha = value +} +// SetUser sets the user property value. The user property +func (m *PullRequest_head) SetUser(value PullRequest_head_userable)() { + m.user = value +} +type PullRequest_headable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabel()(*string) + GetRef()(*string) + GetRepo()(PullRequest_head_repoable) + GetSha()(*string) + GetUser()(PullRequest_head_userable) + SetLabel(value *string)() + SetRef(value *string)() + SetRepo(value PullRequest_head_repoable)() + SetSha(value *string)() + SetUser(value PullRequest_head_userable)() +} diff --git a/pkg/github/models/pull_request_head_repo.go b/pkg/github/models/pull_request_head_repo.go new file mode 100644 index 0000000..6a6fe9a --- /dev/null +++ b/pkg/github/models/pull_request_head_repo.go @@ -0,0 +1,2523 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_head_repo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_forking property + allow_forking *bool + // The allow_merge_commit property + allow_merge_commit *bool + // The allow_rebase_merge property + allow_rebase_merge *bool + // The allow_squash_merge property + allow_squash_merge *bool + // The archive_url property + archive_url *string + // The archived property + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_branch property + default_branch *string + // The deployments_url property + deployments_url *string + // The description property + description *string + // The disabled property + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // The has_discussions property + has_discussions *bool + // The has_downloads property + has_downloads *bool + // The has_issues property + has_issues *bool + // The has_pages property + has_pages *bool + // The has_projects property + has_projects *bool + // The has_wiki property + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The is_template property + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // The license property + license PullRequest_head_repo_licenseable + // The master_branch property + master_branch *string + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name property + name *string + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // The owner property + owner PullRequest_head_repo_ownerable + // The permissions property + permissions PullRequest_head_repo_permissionsable + // The private property + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The size property + size *int32 + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewPullRequest_head_repo instantiates a new PullRequest_head_repo and sets the default values. +func NewPullRequest_head_repo()(*PullRequest_head_repo) { + m := &PullRequest_head_repo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_head_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_head_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_head_repo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_head_repo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowForking gets the allow_forking property value. The allow_forking property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. The allow_merge_commit property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. The allow_rebase_merge property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. The allow_squash_merge property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetArchived gets the archived property value. The archived property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PullRequest_head_repo) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default_branch property +// returns a *string when successful +func (m *PullRequest_head_repo) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *PullRequest_head_repo) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. The disabled property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_head_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForking(val) + } + return nil + } + res["allow_merge_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMergeCommit(val) + } + return nil + } + res["allow_rebase_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowRebaseMerge(val) + } + return nil + } + res["allow_squash_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowSquashMerge(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_head_repo_licenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(PullRequest_head_repo_licenseable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_head_repo_ownerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(PullRequest_head_repo_ownerable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequest_head_repo_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(PullRequest_head_repo_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *PullRequest_head_repo) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. The has_discussions property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. The has_downloads property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. The has_issues property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. The has_projects property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. The has_wiki property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *PullRequest_head_repo) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetId()(*int32) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. The is_template property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *PullRequest_head_repo) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. The license property +// returns a PullRequest_head_repo_licenseable when successful +func (m *PullRequest_head_repo) GetLicense()(PullRequest_head_repo_licenseable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *PullRequest_head_repo) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequest_head_repo) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_head_repo) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. The owner property +// returns a PullRequest_head_repo_ownerable when successful +func (m *PullRequest_head_repo) GetOwner()(PullRequest_head_repo_ownerable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a PullRequest_head_repo_permissionsable when successful +func (m *PullRequest_head_repo) GetPermissions()(PullRequest_head_repo_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. The private property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *PullRequest_head_repo) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetSize()(*int32) { + return m.size +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *PullRequest_head_repo) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *PullRequest_head_repo) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PullRequest_head_repo) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_head_repo) GetUrl()(*string) { + return m.url +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *PullRequest_head_repo) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *PullRequest_head_repo) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *PullRequest_head_repo) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *PullRequest_head_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_merge_commit", m.GetAllowMergeCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_rebase_merge", m.GetAllowRebaseMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_squash_merge", m.GetAllowSquashMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_head_repo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowForking sets the allow_forking property value. The allow_forking property +func (m *PullRequest_head_repo) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. The allow_merge_commit property +func (m *PullRequest_head_repo) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. The allow_rebase_merge property +func (m *PullRequest_head_repo) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. The allow_squash_merge property +func (m *PullRequest_head_repo) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetArchived sets the archived property value. The archived property +func (m *PullRequest_head_repo) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *PullRequest_head_repo) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *PullRequest_head_repo) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *PullRequest_head_repo) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *PullRequest_head_repo) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *PullRequest_head_repo) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *PullRequest_head_repo) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *PullRequest_head_repo) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *PullRequest_head_repo) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *PullRequest_head_repo) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *PullRequest_head_repo) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *PullRequest_head_repo) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PullRequest_head_repo) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default_branch property +func (m *PullRequest_head_repo) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *PullRequest_head_repo) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *PullRequest_head_repo) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. The disabled property +func (m *PullRequest_head_repo) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *PullRequest_head_repo) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PullRequest_head_repo) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *PullRequest_head_repo) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *PullRequest_head_repo) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *PullRequest_head_repo) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *PullRequest_head_repo) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *PullRequest_head_repo) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *PullRequest_head_repo) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *PullRequest_head_repo) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *PullRequest_head_repo) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *PullRequest_head_repo) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. The has_discussions property +func (m *PullRequest_head_repo) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. The has_downloads property +func (m *PullRequest_head_repo) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. The has_issues property +func (m *PullRequest_head_repo) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *PullRequest_head_repo) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. The has_projects property +func (m *PullRequest_head_repo) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. The has_wiki property +func (m *PullRequest_head_repo) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *PullRequest_head_repo) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *PullRequest_head_repo) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest_head_repo) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_head_repo) SetId(value *int32)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *PullRequest_head_repo) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *PullRequest_head_repo) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *PullRequest_head_repo) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. The is_template property +func (m *PullRequest_head_repo) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *PullRequest_head_repo) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *PullRequest_head_repo) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *PullRequest_head_repo) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *PullRequest_head_repo) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. The license property +func (m *PullRequest_head_repo) SetLicense(value PullRequest_head_repo_licenseable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *PullRequest_head_repo) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *PullRequest_head_repo) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *PullRequest_head_repo) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *PullRequest_head_repo) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name property +func (m *PullRequest_head_repo) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_head_repo) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *PullRequest_head_repo) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *PullRequest_head_repo) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *PullRequest_head_repo) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. The owner property +func (m *PullRequest_head_repo) SetOwner(value PullRequest_head_repo_ownerable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *PullRequest_head_repo) SetPermissions(value PullRequest_head_repo_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. The private property +func (m *PullRequest_head_repo) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *PullRequest_head_repo) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *PullRequest_head_repo) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *PullRequest_head_repo) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetSize sets the size property value. The size property +func (m *PullRequest_head_repo) SetSize(value *int32)() { + m.size = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *PullRequest_head_repo) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *PullRequest_head_repo) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *PullRequest_head_repo) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *PullRequest_head_repo) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *PullRequest_head_repo) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *PullRequest_head_repo) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *PullRequest_head_repo) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *PullRequest_head_repo) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *PullRequest_head_repo) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *PullRequest_head_repo) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *PullRequest_head_repo) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *PullRequest_head_repo) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PullRequest_head_repo) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_head_repo) SetUrl(value *string)() { + m.url = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *PullRequest_head_repo) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *PullRequest_head_repo) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *PullRequest_head_repo) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *PullRequest_head_repo) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type PullRequest_head_repoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(PullRequest_head_repo_licenseable) + GetMasterBranch()(*string) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(PullRequest_head_repo_ownerable) + GetPermissions()(PullRequest_head_repo_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetSize()(*int32) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value PullRequest_head_repo_licenseable)() + SetMasterBranch(value *string)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value PullRequest_head_repo_ownerable)() + SetPermissions(value PullRequest_head_repo_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetSize(value *int32)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/pull_request_head_repo_license.go b/pkg/github/models/pull_request_head_repo_license.go new file mode 100644 index 0000000..fa29afc --- /dev/null +++ b/pkg/github/models/pull_request_head_repo_license.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_head_repo_license struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The key property + key *string + // The name property + name *string + // The node_id property + node_id *string + // The spdx_id property + spdx_id *string + // The url property + url *string +} +// NewPullRequest_head_repo_license instantiates a new PullRequest_head_repo_license and sets the default values. +func NewPullRequest_head_repo_license()(*PullRequest_head_repo_license) { + m := &PullRequest_head_repo_license{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_head_repo_licenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_head_repo_licenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_head_repo_license(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_head_repo_license) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_head_repo_license) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *PullRequest_head_repo_license) GetKey()(*string) { + return m.key +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequest_head_repo_license) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_head_repo_license) GetNodeId()(*string) { + return m.node_id +} +// GetSpdxId gets the spdx_id property value. The spdx_id property +// returns a *string when successful +func (m *PullRequest_head_repo_license) GetSpdxId()(*string) { + return m.spdx_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_head_repo_license) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequest_head_repo_license) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdx_id", m.GetSpdxId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_head_repo_license) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The key property +func (m *PullRequest_head_repo_license) SetKey(value *string)() { + m.key = value +} +// SetName sets the name property value. The name property +func (m *PullRequest_head_repo_license) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_head_repo_license) SetNodeId(value *string)() { + m.node_id = value +} +// SetSpdxId sets the spdx_id property value. The spdx_id property +func (m *PullRequest_head_repo_license) SetSpdxId(value *string)() { + m.spdx_id = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_head_repo_license) SetUrl(value *string)() { + m.url = value +} +type PullRequest_head_repo_licenseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetName()(*string) + GetNodeId()(*string) + GetSpdxId()(*string) + GetUrl()(*string) + SetKey(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetSpdxId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_head_repo_owner.go b/pkg/github/models/pull_request_head_repo_owner.go new file mode 100644 index 0000000..fc90b90 --- /dev/null +++ b/pkg/github/models/pull_request_head_repo_owner.go @@ -0,0 +1,573 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_head_repo_owner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int32 + // The login property + login *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewPullRequest_head_repo_owner instantiates a new PullRequest_head_repo_owner and sets the default values. +func NewPullRequest_head_repo_owner()(*PullRequest_head_repo_owner) { + m := &PullRequest_head_repo_owner{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_head_repo_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_head_repo_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_head_repo_owner(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_head_repo_owner) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_head_repo_owner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *PullRequest_head_repo_owner) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *PullRequest_head_repo_owner) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_head_repo_owner) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequest_head_repo_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_head_repo_owner) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *PullRequest_head_repo_owner) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PullRequest_head_repo_owner) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *PullRequest_head_repo_owner) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *PullRequest_head_repo_owner) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *PullRequest_head_repo_owner) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *PullRequest_head_repo_owner) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest_head_repo_owner) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_head_repo_owner) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *PullRequest_head_repo_owner) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_head_repo_owner) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *PullRequest_head_repo_owner) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *PullRequest_head_repo_owner) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *PullRequest_head_repo_owner) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *PullRequest_head_repo_owner) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *PullRequest_head_repo_owner) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *PullRequest_head_repo_owner) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *PullRequest_head_repo_owner) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_head_repo_owner) SetUrl(value *string)() { + m.url = value +} +type PullRequest_head_repo_ownerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLogin()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_head_repo_permissions.go b/pkg/github/models/pull_request_head_repo_permissions.go new file mode 100644 index 0000000..fa9bee5 --- /dev/null +++ b/pkg/github/models/pull_request_head_repo_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_head_repo_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewPullRequest_head_repo_permissions instantiates a new PullRequest_head_repo_permissions and sets the default values. +func NewPullRequest_head_repo_permissions()(*PullRequest_head_repo_permissions) { + m := &PullRequest_head_repo_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_head_repo_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_head_repo_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_head_repo_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_head_repo_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *PullRequest_head_repo_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_head_repo_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *PullRequest_head_repo_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *PullRequest_head_repo_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *PullRequest_head_repo_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *PullRequest_head_repo_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *PullRequest_head_repo_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_head_repo_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *PullRequest_head_repo_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *PullRequest_head_repo_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *PullRequest_head_repo_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *PullRequest_head_repo_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *PullRequest_head_repo_permissions) SetTriage(value *bool)() { + m.triage = value +} +type PullRequest_head_repo_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/pull_request_head_user.go b/pkg/github/models/pull_request_head_user.go new file mode 100644 index 0000000..9dc9339 --- /dev/null +++ b/pkg/github/models/pull_request_head_user.go @@ -0,0 +1,573 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_head_user struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewPullRequest_head_user instantiates a new PullRequest_head_user and sets the default values. +func NewPullRequest_head_user()(*PullRequest_head_user) { + m := &PullRequest_head_user{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_head_userFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_head_userFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_head_user(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_head_user) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_head_user) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *PullRequest_head_user) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequest_head_user) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *PullRequest_head_user) GetLogin()(*string) { + return m.login +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_head_user) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *PullRequest_head_user) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *PullRequest_head_user) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *PullRequest_head_user) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_head_user) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequest_head_user) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_head_user) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *PullRequest_head_user) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *PullRequest_head_user) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *PullRequest_head_user) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *PullRequest_head_user) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *PullRequest_head_user) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *PullRequest_head_user) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequest_head_user) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_head_user) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *PullRequest_head_user) SetLogin(value *string)() { + m.login = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_head_user) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *PullRequest_head_user) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *PullRequest_head_user) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *PullRequest_head_user) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *PullRequest_head_user) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *PullRequest_head_user) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *PullRequest_head_user) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *PullRequest_head_user) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_head_user) SetUrl(value *string)() { + m.url = value +} +type PullRequest_head_userable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_labels.go b/pkg/github/models/pull_request_labels.go new file mode 100644 index 0000000..c1f0e28 --- /dev/null +++ b/pkg/github/models/pull_request_labels.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequest_labels struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The default property + defaultEscaped *bool + // The description property + description *string + // The id property + id *int64 + // The name property + name *string + // The node_id property + node_id *string + // The url property + url *string +} +// NewPullRequest_labels instantiates a new PullRequest_labels and sets the default values. +func NewPullRequest_labels()(*PullRequest_labels) { + m := &PullRequest_labels{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequest_labelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequest_labelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequest_labels(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequest_labels) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *PullRequest_labels) GetColor()(*string) { + return m.color +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *PullRequest_labels) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *PullRequest_labels) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequest_labels) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequest_labels) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequest_labels) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequest_labels) GetNodeId()(*string) { + return m.node_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequest_labels) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequest_labels) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequest_labels) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *PullRequest_labels) SetColor(value *string)() { + m.color = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *PullRequest_labels) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetDescription sets the description property value. The description property +func (m *PullRequest_labels) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *PullRequest_labels) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *PullRequest_labels) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequest_labels) SetNodeId(value *string)() { + m.node_id = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequest_labels) SetUrl(value *string)() { + m.url = value +} +type PullRequest_labelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDefaultEscaped()(*bool) + GetDescription()(*string) + GetId()(*int64) + GetName()(*string) + GetNodeId()(*string) + GetUrl()(*string) + SetColor(value *string)() + SetDefaultEscaped(value *bool)() + SetDescription(value *string)() + SetId(value *int64)() + SetName(value *string)() + SetNodeId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_merge_result.go b/pkg/github/models/pull_request_merge_result.go new file mode 100644 index 0000000..69c858f --- /dev/null +++ b/pkg/github/models/pull_request_merge_result.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PullRequestMergeResult pull Request Merge Result +type PullRequestMergeResult struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The merged property + merged *bool + // The message property + message *string + // The sha property + sha *string +} +// NewPullRequestMergeResult instantiates a new PullRequestMergeResult and sets the default values. +func NewPullRequestMergeResult()(*PullRequestMergeResult) { + m := &PullRequestMergeResult{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestMergeResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestMergeResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestMergeResult(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestMergeResult) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestMergeResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["merged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMerged(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 + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetMerged gets the merged property value. The merged property +// returns a *bool when successful +func (m *PullRequestMergeResult) GetMerged()(*bool) { + return m.merged +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *PullRequestMergeResult) GetMessage()(*string) { + return m.message +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequestMergeResult) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *PullRequestMergeResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("merged", m.GetMerged()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *PullRequestMergeResult) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMerged sets the merged property value. The merged property +func (m *PullRequestMergeResult) SetMerged(value *bool)() { + m.merged = value +} +// SetMessage sets the message property value. The message property +func (m *PullRequestMergeResult) SetMessage(value *string)() { + m.message = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequestMergeResult) SetSha(value *string)() { + m.sha = value +} +type PullRequestMergeResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMerged()(*bool) + GetMessage()(*string) + GetSha()(*string) + SetMerged(value *bool)() + SetMessage(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/models/pull_request_minimal.go b/pkg/github/models/pull_request_minimal.go new file mode 100644 index 0000000..d7c372c --- /dev/null +++ b/pkg/github/models/pull_request_minimal.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestMinimal struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The base property + base PullRequestMinimal_baseable + // The head property + head PullRequestMinimal_headable + // The id property + id *int64 + // The number property + number *int32 + // The url property + url *string +} +// NewPullRequestMinimal instantiates a new PullRequestMinimal and sets the default values. +func NewPullRequestMinimal()(*PullRequestMinimal) { + m := &PullRequestMinimal{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestMinimalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestMinimalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestMinimal(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestMinimal) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBase gets the base property value. The base property +// returns a PullRequestMinimal_baseable when successful +func (m *PullRequestMinimal) GetBase()(PullRequestMinimal_baseable) { + return m.base +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestMinimal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestMinimal_baseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBase(val.(PullRequestMinimal_baseable)) + } + return nil + } + res["head"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestMinimal_headFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHead(val.(PullRequestMinimal_headable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHead gets the head property value. The head property +// returns a PullRequestMinimal_headable when successful +func (m *PullRequestMinimal) GetHead()(PullRequestMinimal_headable) { + return m.head +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequestMinimal) GetId()(*int64) { + return m.id +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *PullRequestMinimal) GetNumber()(*int32) { + return m.number +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequestMinimal) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequestMinimal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("base", m.GetBase()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("head", m.GetHead()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequestMinimal) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBase sets the base property value. The base property +func (m *PullRequestMinimal) SetBase(value PullRequestMinimal_baseable)() { + m.base = value +} +// SetHead sets the head property value. The head property +func (m *PullRequestMinimal) SetHead(value PullRequestMinimal_headable)() { + m.head = value +} +// SetId sets the id property value. The id property +func (m *PullRequestMinimal) SetId(value *int64)() { + m.id = value +} +// SetNumber sets the number property value. The number property +func (m *PullRequestMinimal) SetNumber(value *int32)() { + m.number = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequestMinimal) SetUrl(value *string)() { + m.url = value +} +type PullRequestMinimalable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBase()(PullRequestMinimal_baseable) + GetHead()(PullRequestMinimal_headable) + GetId()(*int64) + GetNumber()(*int32) + GetUrl()(*string) + SetBase(value PullRequestMinimal_baseable)() + SetHead(value PullRequestMinimal_headable)() + SetId(value *int64)() + SetNumber(value *int32)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_minimal_base.go b/pkg/github/models/pull_request_minimal_base.go new file mode 100644 index 0000000..c2475b8 --- /dev/null +++ b/pkg/github/models/pull_request_minimal_base.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestMinimal_base struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ref property + ref *string + // The repo property + repo PullRequestMinimal_base_repoable + // The sha property + sha *string +} +// NewPullRequestMinimal_base instantiates a new PullRequestMinimal_base and sets the default values. +func NewPullRequestMinimal_base()(*PullRequestMinimal_base) { + m := &PullRequestMinimal_base{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestMinimal_baseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestMinimal_baseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestMinimal_base(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestMinimal_base) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestMinimal_base) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestMinimal_base_repoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(PullRequestMinimal_base_repoable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *PullRequestMinimal_base) GetRef()(*string) { + return m.ref +} +// GetRepo gets the repo property value. The repo property +// returns a PullRequestMinimal_base_repoable when successful +func (m *PullRequestMinimal_base) GetRepo()(PullRequestMinimal_base_repoable) { + return m.repo +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequestMinimal_base) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *PullRequestMinimal_base) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *PullRequestMinimal_base) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRef sets the ref property value. The ref property +func (m *PullRequestMinimal_base) SetRef(value *string)() { + m.ref = value +} +// SetRepo sets the repo property value. The repo property +func (m *PullRequestMinimal_base) SetRepo(value PullRequestMinimal_base_repoable)() { + m.repo = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequestMinimal_base) SetSha(value *string)() { + m.sha = value +} +type PullRequestMinimal_baseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRef()(*string) + GetRepo()(PullRequestMinimal_base_repoable) + GetSha()(*string) + SetRef(value *string)() + SetRepo(value PullRequestMinimal_base_repoable)() + SetSha(value *string)() +} diff --git a/pkg/github/models/pull_request_minimal_base_repo.go b/pkg/github/models/pull_request_minimal_base_repo.go new file mode 100644 index 0000000..3651138 --- /dev/null +++ b/pkg/github/models/pull_request_minimal_base_repo.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestMinimal_base_repo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int64 + // The name property + name *string + // The url property + url *string +} +// NewPullRequestMinimal_base_repo instantiates a new PullRequestMinimal_base_repo and sets the default values. +func NewPullRequestMinimal_base_repo()(*PullRequestMinimal_base_repo) { + m := &PullRequestMinimal_base_repo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestMinimal_base_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestMinimal_base_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestMinimal_base_repo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestMinimal_base_repo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestMinimal_base_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequestMinimal_base_repo) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequestMinimal_base_repo) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequestMinimal_base_repo) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequestMinimal_base_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequestMinimal_base_repo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *PullRequestMinimal_base_repo) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *PullRequestMinimal_base_repo) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequestMinimal_base_repo) SetUrl(value *string)() { + m.url = value +} +type PullRequestMinimal_base_repoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int64) + GetName()(*string) + GetUrl()(*string) + SetId(value *int64)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_minimal_head.go b/pkg/github/models/pull_request_minimal_head.go new file mode 100644 index 0000000..c836873 --- /dev/null +++ b/pkg/github/models/pull_request_minimal_head.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestMinimal_head struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ref property + ref *string + // The repo property + repo PullRequestMinimal_head_repoable + // The sha property + sha *string +} +// NewPullRequestMinimal_head instantiates a new PullRequestMinimal_head and sets the default values. +func NewPullRequestMinimal_head()(*PullRequestMinimal_head) { + m := &PullRequestMinimal_head{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestMinimal_headFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestMinimal_headFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestMinimal_head(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestMinimal_head) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestMinimal_head) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestMinimal_head_repoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(PullRequestMinimal_head_repoable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *PullRequestMinimal_head) GetRef()(*string) { + return m.ref +} +// GetRepo gets the repo property value. The repo property +// returns a PullRequestMinimal_head_repoable when successful +func (m *PullRequestMinimal_head) GetRepo()(PullRequestMinimal_head_repoable) { + return m.repo +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequestMinimal_head) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *PullRequestMinimal_head) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *PullRequestMinimal_head) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRef sets the ref property value. The ref property +func (m *PullRequestMinimal_head) SetRef(value *string)() { + m.ref = value +} +// SetRepo sets the repo property value. The repo property +func (m *PullRequestMinimal_head) SetRepo(value PullRequestMinimal_head_repoable)() { + m.repo = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequestMinimal_head) SetSha(value *string)() { + m.sha = value +} +type PullRequestMinimal_headable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRef()(*string) + GetRepo()(PullRequestMinimal_head_repoable) + GetSha()(*string) + SetRef(value *string)() + SetRepo(value PullRequestMinimal_head_repoable)() + SetSha(value *string)() +} diff --git a/pkg/github/models/pull_request_minimal_head_repo.go b/pkg/github/models/pull_request_minimal_head_repo.go new file mode 100644 index 0000000..8851842 --- /dev/null +++ b/pkg/github/models/pull_request_minimal_head_repo.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestMinimal_head_repo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int64 + // The name property + name *string + // The url property + url *string +} +// NewPullRequestMinimal_head_repo instantiates a new PullRequestMinimal_head_repo and sets the default values. +func NewPullRequestMinimal_head_repo()(*PullRequestMinimal_head_repo) { + m := &PullRequestMinimal_head_repo{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestMinimal_head_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestMinimal_head_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestMinimal_head_repo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestMinimal_head_repo) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestMinimal_head_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequestMinimal_head_repo) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequestMinimal_head_repo) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequestMinimal_head_repo) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequestMinimal_head_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequestMinimal_head_repo) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *PullRequestMinimal_head_repo) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *PullRequestMinimal_head_repo) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequestMinimal_head_repo) SetUrl(value *string)() { + m.url = value +} +type PullRequestMinimal_head_repoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int64) + GetName()(*string) + GetUrl()(*string) + SetId(value *int64)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_review.go b/pkg/github/models/pull_request_review.go new file mode 100644 index 0000000..544ee8d --- /dev/null +++ b/pkg/github/models/pull_request_review.go @@ -0,0 +1,431 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PullRequestReview pull Request Reviews are reviews on pull requests. +type PullRequestReview struct { + // The _links property + _links PullRequestReview__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // The text of the review. + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + commit_id *string + // The html_url property + html_url *string + // Unique identifier of the review + id *int32 + // The node_id property + node_id *string + // The pull_request_url property + pull_request_url *string + // The state property + state *string + // The submitted_at property + submitted_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + user NullableSimpleUserable +} +// NewPullRequestReview instantiates a new PullRequestReview and sets the default values. +func NewPullRequestReview()(*PullRequestReview) { + m := &PullRequestReview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReview(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *PullRequestReview) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The text of the review. +// returns a *string when successful +func (m *PullRequestReview) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *PullRequestReview) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *PullRequestReview) GetBodyText()(*string) { + return m.body_text +} +// GetCommitId gets the commit_id property value. A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. +// returns a *string when successful +func (m *PullRequestReview) GetCommitId()(*string) { + return m.commit_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReview__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(PullRequestReview__linksable)) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["pull_request_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["submitted_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmittedAt(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequestReview) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the review +// returns a *int32 when successful +func (m *PullRequestReview) GetId()(*int32) { + return m.id +} +// GetLinks gets the _links property value. The _links property +// returns a PullRequestReview__linksable when successful +func (m *PullRequestReview) GetLinks()(PullRequestReview__linksable) { + return m._links +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequestReview) GetNodeId()(*string) { + return m.node_id +} +// GetPullRequestUrl gets the pull_request_url property value. The pull_request_url property +// returns a *string when successful +func (m *PullRequestReview) GetPullRequestUrl()(*string) { + return m.pull_request_url +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *PullRequestReview) GetState()(*string) { + return m.state +} +// GetSubmittedAt gets the submitted_at property value. The submitted_at property +// returns a *Time when successful +func (m *PullRequestReview) GetSubmittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.submitted_at +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequestReview) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequestReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pull_request_url", m.GetPullRequestUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("submitted_at", m.GetSubmittedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *PullRequestReview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *PullRequestReview) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The text of the review. +func (m *PullRequestReview) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *PullRequestReview) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *PullRequestReview) SetBodyText(value *string)() { + m.body_text = value +} +// SetCommitId sets the commit_id property value. A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. +func (m *PullRequestReview) SetCommitId(value *string)() { + m.commit_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequestReview) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the review +func (m *PullRequestReview) SetId(value *int32)() { + m.id = value +} +// SetLinks sets the _links property value. The _links property +func (m *PullRequestReview) SetLinks(value PullRequestReview__linksable)() { + m._links = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequestReview) SetNodeId(value *string)() { + m.node_id = value +} +// SetPullRequestUrl sets the pull_request_url property value. The pull_request_url property +func (m *PullRequestReview) SetPullRequestUrl(value *string)() { + m.pull_request_url = value +} +// SetState sets the state property value. The state property +func (m *PullRequestReview) SetState(value *string)() { + m.state = value +} +// SetSubmittedAt sets the submitted_at property value. The submitted_at property +func (m *PullRequestReview) SetSubmittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.submitted_at = value +} +// SetUser sets the user property value. A GitHub user. +func (m *PullRequestReview) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type PullRequestReviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCommitId()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLinks()(PullRequestReview__linksable) + GetNodeId()(*string) + GetPullRequestUrl()(*string) + GetState()(*string) + GetSubmittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUser()(NullableSimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCommitId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLinks(value PullRequestReview__linksable)() + SetNodeId(value *string)() + SetPullRequestUrl(value *string)() + SetState(value *string)() + SetSubmittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/pull_request_review__links.go b/pkg/github/models/pull_request_review__links.go new file mode 100644 index 0000000..bf661f4 --- /dev/null +++ b/pkg/github/models/pull_request_review__links.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReview__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html property + html PullRequestReview__links_htmlable + // The pull_request property + pull_request PullRequestReview__links_pull_requestable +} +// NewPullRequestReview__links instantiates a new PullRequestReview__links and sets the default values. +func NewPullRequestReview__links()(*PullRequestReview__links) { + m := &PullRequestReview__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReview__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReview__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReview__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReview__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReview__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReview__links_htmlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(PullRequestReview__links_htmlable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReview__links_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(PullRequestReview__links_pull_requestable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. The html property +// returns a PullRequestReview__links_htmlable when successful +func (m *PullRequestReview__links) GetHtml()(PullRequestReview__links_htmlable) { + return m.html +} +// GetPullRequest gets the pull_request property value. The pull_request property +// returns a PullRequestReview__links_pull_requestable when successful +func (m *PullRequestReview__links) GetPullRequest()(PullRequestReview__links_pull_requestable) { + return m.pull_request +} +// Serialize serializes information the current object +func (m *PullRequestReview__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + 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 *PullRequestReview__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtml sets the html property value. The html property +func (m *PullRequestReview__links) SetHtml(value PullRequestReview__links_htmlable)() { + m.html = value +} +// SetPullRequest sets the pull_request property value. The pull_request property +func (m *PullRequestReview__links) SetPullRequest(value PullRequestReview__links_pull_requestable)() { + m.pull_request = value +} +type PullRequestReview__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtml()(PullRequestReview__links_htmlable) + GetPullRequest()(PullRequestReview__links_pull_requestable) + SetHtml(value PullRequestReview__links_htmlable)() + SetPullRequest(value PullRequestReview__links_pull_requestable)() +} diff --git a/pkg/github/models/pull_request_review__links_html.go b/pkg/github/models/pull_request_review__links_html.go new file mode 100644 index 0000000..4dd6cee --- /dev/null +++ b/pkg/github/models/pull_request_review__links_html.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReview__links_html struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewPullRequestReview__links_html instantiates a new PullRequestReview__links_html and sets the default values. +func NewPullRequestReview__links_html()(*PullRequestReview__links_html) { + m := &PullRequestReview__links_html{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReview__links_htmlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReview__links_htmlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReview__links_html(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReview__links_html) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReview__links_html) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *PullRequestReview__links_html) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *PullRequestReview__links_html) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *PullRequestReview__links_html) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *PullRequestReview__links_html) SetHref(value *string)() { + m.href = value +} +type PullRequestReview__links_htmlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/pull_request_review__links_pull_request.go b/pkg/github/models/pull_request_review__links_pull_request.go new file mode 100644 index 0000000..3d58c69 --- /dev/null +++ b/pkg/github/models/pull_request_review__links_pull_request.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReview__links_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewPullRequestReview__links_pull_request instantiates a new PullRequestReview__links_pull_request and sets the default values. +func NewPullRequestReview__links_pull_request()(*PullRequestReview__links_pull_request) { + m := &PullRequestReview__links_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReview__links_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReview__links_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReview__links_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReview__links_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReview__links_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *PullRequestReview__links_pull_request) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *PullRequestReview__links_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *PullRequestReview__links_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *PullRequestReview__links_pull_request) SetHref(value *string)() { + m.href = value +} +type PullRequestReview__links_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/pull_request_review_comment.go b/pkg/github/models/pull_request_review_comment.go new file mode 100644 index 0000000..fcbc299 --- /dev/null +++ b/pkg/github/models/pull_request_review_comment.go @@ -0,0 +1,902 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PullRequestReviewComment pull Request Review Comments are comments on a portion of the Pull Request's diff. +type PullRequestReviewComment struct { + // The _links property + _links PullRequestReviewComment__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // The text of the comment. + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The SHA of the commit to which the comment applies. + commit_id *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The diff of the line that the comment refers to. + diff_hunk *string + // HTML URL for the pull request review comment. + html_url *string + // The ID of the pull request review comment. + id *int64 + // The comment ID to reply to. + in_reply_to_id *int32 + // The line of the blob to which the comment applies. The last line of the range for a multi-line comment + line *int32 + // The node ID of the pull request review comment. + node_id *string + // The SHA of the original commit to which the comment applies. + original_commit_id *string + // The line of the blob to which the comment applies. The last line of the range for a multi-line comment + original_line *int32 + // The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + original_position *int32 + // The first line of the range for a multi-line comment. + original_start_line *int32 + // The relative path of the file to which the comment applies. + path *string + // The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + position *int32 + // The ID of the pull request review to which the comment belongs. + pull_request_review_id *int64 + // URL for the pull request that the review comment belongs to. + pull_request_url *string + // The reactions property + reactions ReactionRollupable + // The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + side *PullRequestReviewComment_side + // The first line of the range for a multi-line comment. + start_line *int32 + // The side of the first line of the range for a multi-line comment. + start_side *PullRequestReviewComment_start_side + // The level at which the comment is targeted, can be a diff line or a file. + subject_type *PullRequestReviewComment_subject_type + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the pull request review comment + url *string + // A GitHub user. + user SimpleUserable +} +// NewPullRequestReviewComment instantiates a new PullRequestReviewComment and sets the default values. +func NewPullRequestReviewComment()(*PullRequestReviewComment) { + m := &PullRequestReviewComment{ + } + m.SetAdditionalData(make(map[string]any)) + sideValue := RIGHT_PULLREQUESTREVIEWCOMMENT_SIDE + m.SetSide(&sideValue) + start_sideValue := RIGHT_PULLREQUESTREVIEWCOMMENT_START_SIDE + m.SetStartSide(&start_sideValue) + return m +} +// CreatePullRequestReviewCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReviewComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReviewComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *PullRequestReviewComment) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The text of the comment. +// returns a *string when successful +func (m *PullRequestReviewComment) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *PullRequestReviewComment) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *PullRequestReviewComment) GetBodyText()(*string) { + return m.body_text +} +// GetCommitId gets the commit_id property value. The SHA of the commit to which the comment applies. +// returns a *string when successful +func (m *PullRequestReviewComment) GetCommitId()(*string) { + return m.commit_id +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PullRequestReviewComment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiffHunk gets the diff_hunk property value. The diff of the line that the comment refers to. +// returns a *string when successful +func (m *PullRequestReviewComment) GetDiffHunk()(*string) { + return m.diff_hunk +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReviewComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReviewComment__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(PullRequestReviewComment__linksable)) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["diff_hunk"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffHunk(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["in_reply_to_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInReplyToId(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["original_commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalCommitId(val) + } + return nil + } + res["original_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOriginalLine(val) + } + return nil + } + res["original_position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOriginalPosition(val) + } + return nil + } + res["original_start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOriginalStartLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + res["pull_request_review_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestReviewId(val) + } + return nil + } + res["pull_request_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestUrl(val) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["side"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestReviewComment_side) + if err != nil { + return err + } + if val != nil { + m.SetSide(val.(*PullRequestReviewComment_side)) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + res["start_side"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestReviewComment_start_side) + if err != nil { + return err + } + if val != nil { + m.SetStartSide(val.(*PullRequestReviewComment_start_side)) + } + return nil + } + res["subject_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestReviewComment_subject_type) + if err != nil { + return err + } + if val != nil { + m.SetSubjectType(val.(*PullRequestReviewComment_subject_type)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. HTML URL for the pull request review comment. +// returns a *string when successful +func (m *PullRequestReviewComment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The ID of the pull request review comment. +// returns a *int64 when successful +func (m *PullRequestReviewComment) GetId()(*int64) { + return m.id +} +// GetInReplyToId gets the in_reply_to_id property value. The comment ID to reply to. +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetInReplyToId()(*int32) { + return m.in_reply_to_id +} +// GetLine gets the line property value. The line of the blob to which the comment applies. The last line of the range for a multi-line comment +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetLine()(*int32) { + return m.line +} +// GetLinks gets the _links property value. The _links property +// returns a PullRequestReviewComment__linksable when successful +func (m *PullRequestReviewComment) GetLinks()(PullRequestReviewComment__linksable) { + return m._links +} +// GetNodeId gets the node_id property value. The node ID of the pull request review comment. +// returns a *string when successful +func (m *PullRequestReviewComment) GetNodeId()(*string) { + return m.node_id +} +// GetOriginalCommitId gets the original_commit_id property value. The SHA of the original commit to which the comment applies. +// returns a *string when successful +func (m *PullRequestReviewComment) GetOriginalCommitId()(*string) { + return m.original_commit_id +} +// GetOriginalLine gets the original_line property value. The line of the blob to which the comment applies. The last line of the range for a multi-line comment +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetOriginalLine()(*int32) { + return m.original_line +} +// GetOriginalPosition gets the original_position property value. The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetOriginalPosition()(*int32) { + return m.original_position +} +// GetOriginalStartLine gets the original_start_line property value. The first line of the range for a multi-line comment. +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetOriginalStartLine()(*int32) { + return m.original_start_line +} +// GetPath gets the path property value. The relative path of the file to which the comment applies. +// returns a *string when successful +func (m *PullRequestReviewComment) GetPath()(*string) { + return m.path +} +// GetPosition gets the position property value. The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetPosition()(*int32) { + return m.position +} +// GetPullRequestReviewId gets the pull_request_review_id property value. The ID of the pull request review to which the comment belongs. +// returns a *int64 when successful +func (m *PullRequestReviewComment) GetPullRequestReviewId()(*int64) { + return m.pull_request_review_id +} +// GetPullRequestUrl gets the pull_request_url property value. URL for the pull request that the review comment belongs to. +// returns a *string when successful +func (m *PullRequestReviewComment) GetPullRequestUrl()(*string) { + return m.pull_request_url +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *PullRequestReviewComment) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetSide gets the side property value. The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment +// returns a *PullRequestReviewComment_side when successful +func (m *PullRequestReviewComment) GetSide()(*PullRequestReviewComment_side) { + return m.side +} +// GetStartLine gets the start_line property value. The first line of the range for a multi-line comment. +// returns a *int32 when successful +func (m *PullRequestReviewComment) GetStartLine()(*int32) { + return m.start_line +} +// GetStartSide gets the start_side property value. The side of the first line of the range for a multi-line comment. +// returns a *PullRequestReviewComment_start_side when successful +func (m *PullRequestReviewComment) GetStartSide()(*PullRequestReviewComment_start_side) { + return m.start_side +} +// GetSubjectType gets the subject_type property value. The level at which the comment is targeted, can be a diff line or a file. +// returns a *PullRequestReviewComment_subject_type when successful +func (m *PullRequestReviewComment) GetSubjectType()(*PullRequestReviewComment_subject_type) { + return m.subject_type +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PullRequestReviewComment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the pull request review comment +// returns a *string when successful +func (m *PullRequestReviewComment) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *PullRequestReviewComment) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequestReviewComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("diff_hunk", m.GetDiffHunk()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("in_reply_to_id", m.GetInReplyToId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("original_commit_id", m.GetOriginalCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("original_line", m.GetOriginalLine()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("original_position", m.GetOriginalPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("original_start_line", m.GetOriginalStartLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("pull_request_review_id", m.GetPullRequestReviewId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pull_request_url", m.GetPullRequestUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + if m.GetSide() != nil { + cast := (*m.GetSide()).String() + err := writer.WriteStringValue("side", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + if err != nil { + return err + } + } + if m.GetStartSide() != nil { + cast := (*m.GetStartSide()).String() + err := writer.WriteStringValue("start_side", &cast) + if err != nil { + return err + } + } + if m.GetSubjectType() != nil { + cast := (*m.GetSubjectType()).String() + err := writer.WriteStringValue("subject_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *PullRequestReviewComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *PullRequestReviewComment) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The text of the comment. +func (m *PullRequestReviewComment) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *PullRequestReviewComment) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *PullRequestReviewComment) SetBodyText(value *string)() { + m.body_text = value +} +// SetCommitId sets the commit_id property value. The SHA of the commit to which the comment applies. +func (m *PullRequestReviewComment) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PullRequestReviewComment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiffHunk sets the diff_hunk property value. The diff of the line that the comment refers to. +func (m *PullRequestReviewComment) SetDiffHunk(value *string)() { + m.diff_hunk = value +} +// SetHtmlUrl sets the html_url property value. HTML URL for the pull request review comment. +func (m *PullRequestReviewComment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The ID of the pull request review comment. +func (m *PullRequestReviewComment) SetId(value *int64)() { + m.id = value +} +// SetInReplyToId sets the in_reply_to_id property value. The comment ID to reply to. +func (m *PullRequestReviewComment) SetInReplyToId(value *int32)() { + m.in_reply_to_id = value +} +// SetLine sets the line property value. The line of the blob to which the comment applies. The last line of the range for a multi-line comment +func (m *PullRequestReviewComment) SetLine(value *int32)() { + m.line = value +} +// SetLinks sets the _links property value. The _links property +func (m *PullRequestReviewComment) SetLinks(value PullRequestReviewComment__linksable)() { + m._links = value +} +// SetNodeId sets the node_id property value. The node ID of the pull request review comment. +func (m *PullRequestReviewComment) SetNodeId(value *string)() { + m.node_id = value +} +// SetOriginalCommitId sets the original_commit_id property value. The SHA of the original commit to which the comment applies. +func (m *PullRequestReviewComment) SetOriginalCommitId(value *string)() { + m.original_commit_id = value +} +// SetOriginalLine sets the original_line property value. The line of the blob to which the comment applies. The last line of the range for a multi-line comment +func (m *PullRequestReviewComment) SetOriginalLine(value *int32)() { + m.original_line = value +} +// SetOriginalPosition sets the original_position property value. The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. +func (m *PullRequestReviewComment) SetOriginalPosition(value *int32)() { + m.original_position = value +} +// SetOriginalStartLine sets the original_start_line property value. The first line of the range for a multi-line comment. +func (m *PullRequestReviewComment) SetOriginalStartLine(value *int32)() { + m.original_start_line = value +} +// SetPath sets the path property value. The relative path of the file to which the comment applies. +func (m *PullRequestReviewComment) SetPath(value *string)() { + m.path = value +} +// SetPosition sets the position property value. The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. +func (m *PullRequestReviewComment) SetPosition(value *int32)() { + m.position = value +} +// SetPullRequestReviewId sets the pull_request_review_id property value. The ID of the pull request review to which the comment belongs. +func (m *PullRequestReviewComment) SetPullRequestReviewId(value *int64)() { + m.pull_request_review_id = value +} +// SetPullRequestUrl sets the pull_request_url property value. URL for the pull request that the review comment belongs to. +func (m *PullRequestReviewComment) SetPullRequestUrl(value *string)() { + m.pull_request_url = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *PullRequestReviewComment) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetSide sets the side property value. The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment +func (m *PullRequestReviewComment) SetSide(value *PullRequestReviewComment_side)() { + m.side = value +} +// SetStartLine sets the start_line property value. The first line of the range for a multi-line comment. +func (m *PullRequestReviewComment) SetStartLine(value *int32)() { + m.start_line = value +} +// SetStartSide sets the start_side property value. The side of the first line of the range for a multi-line comment. +func (m *PullRequestReviewComment) SetStartSide(value *PullRequestReviewComment_start_side)() { + m.start_side = value +} +// SetSubjectType sets the subject_type property value. The level at which the comment is targeted, can be a diff line or a file. +func (m *PullRequestReviewComment) SetSubjectType(value *PullRequestReviewComment_subject_type)() { + m.subject_type = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PullRequestReviewComment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the pull request review comment +func (m *PullRequestReviewComment) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *PullRequestReviewComment) SetUser(value SimpleUserable)() { + m.user = value +} +type PullRequestReviewCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCommitId()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiffHunk()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetInReplyToId()(*int32) + GetLine()(*int32) + GetLinks()(PullRequestReviewComment__linksable) + GetNodeId()(*string) + GetOriginalCommitId()(*string) + GetOriginalLine()(*int32) + GetOriginalPosition()(*int32) + GetOriginalStartLine()(*int32) + GetPath()(*string) + GetPosition()(*int32) + GetPullRequestReviewId()(*int64) + GetPullRequestUrl()(*string) + GetReactions()(ReactionRollupable) + GetSide()(*PullRequestReviewComment_side) + GetStartLine()(*int32) + GetStartSide()(*PullRequestReviewComment_start_side) + GetSubjectType()(*PullRequestReviewComment_subject_type) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(SimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCommitId(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiffHunk(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetInReplyToId(value *int32)() + SetLine(value *int32)() + SetLinks(value PullRequestReviewComment__linksable)() + SetNodeId(value *string)() + SetOriginalCommitId(value *string)() + SetOriginalLine(value *int32)() + SetOriginalPosition(value *int32)() + SetOriginalStartLine(value *int32)() + SetPath(value *string)() + SetPosition(value *int32)() + SetPullRequestReviewId(value *int64)() + SetPullRequestUrl(value *string)() + SetReactions(value ReactionRollupable)() + SetSide(value *PullRequestReviewComment_side)() + SetStartLine(value *int32)() + SetStartSide(value *PullRequestReviewComment_start_side)() + SetSubjectType(value *PullRequestReviewComment_subject_type)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/pull_request_review_comment__links.go b/pkg/github/models/pull_request_review_comment__links.go new file mode 100644 index 0000000..c5d7a9c --- /dev/null +++ b/pkg/github/models/pull_request_review_comment__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReviewComment__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html property + html PullRequestReviewComment__links_htmlable + // The pull_request property + pull_request PullRequestReviewComment__links_pull_requestable + // The self property + self PullRequestReviewComment__links_selfable +} +// NewPullRequestReviewComment__links instantiates a new PullRequestReviewComment__links and sets the default values. +func NewPullRequestReviewComment__links()(*PullRequestReviewComment__links) { + m := &PullRequestReviewComment__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReviewComment__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewComment__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReviewComment__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReviewComment__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReviewComment__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReviewComment__links_htmlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(PullRequestReviewComment__links_htmlable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReviewComment__links_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(PullRequestReviewComment__links_pull_requestable)) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestReviewComment__links_selfFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelf(val.(PullRequestReviewComment__links_selfable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. The html property +// returns a PullRequestReviewComment__links_htmlable when successful +func (m *PullRequestReviewComment__links) GetHtml()(PullRequestReviewComment__links_htmlable) { + return m.html +} +// GetPullRequest gets the pull_request property value. The pull_request property +// returns a PullRequestReviewComment__links_pull_requestable when successful +func (m *PullRequestReviewComment__links) GetPullRequest()(PullRequestReviewComment__links_pull_requestable) { + return m.pull_request +} +// GetSelf gets the self property value. The self property +// returns a PullRequestReviewComment__links_selfable when successful +func (m *PullRequestReviewComment__links) GetSelf()(PullRequestReviewComment__links_selfable) { + return m.self +} +// Serialize serializes information the current object +func (m *PullRequestReviewComment__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("self", m.GetSelf()) + 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 *PullRequestReviewComment__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtml sets the html property value. The html property +func (m *PullRequestReviewComment__links) SetHtml(value PullRequestReviewComment__links_htmlable)() { + m.html = value +} +// SetPullRequest sets the pull_request property value. The pull_request property +func (m *PullRequestReviewComment__links) SetPullRequest(value PullRequestReviewComment__links_pull_requestable)() { + m.pull_request = value +} +// SetSelf sets the self property value. The self property +func (m *PullRequestReviewComment__links) SetSelf(value PullRequestReviewComment__links_selfable)() { + m.self = value +} +type PullRequestReviewComment__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtml()(PullRequestReviewComment__links_htmlable) + GetPullRequest()(PullRequestReviewComment__links_pull_requestable) + GetSelf()(PullRequestReviewComment__links_selfable) + SetHtml(value PullRequestReviewComment__links_htmlable)() + SetPullRequest(value PullRequestReviewComment__links_pull_requestable)() + SetSelf(value PullRequestReviewComment__links_selfable)() +} diff --git a/pkg/github/models/pull_request_review_comment__links_html.go b/pkg/github/models/pull_request_review_comment__links_html.go new file mode 100644 index 0000000..d294261 --- /dev/null +++ b/pkg/github/models/pull_request_review_comment__links_html.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReviewComment__links_html struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewPullRequestReviewComment__links_html instantiates a new PullRequestReviewComment__links_html and sets the default values. +func NewPullRequestReviewComment__links_html()(*PullRequestReviewComment__links_html) { + m := &PullRequestReviewComment__links_html{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReviewComment__links_htmlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewComment__links_htmlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReviewComment__links_html(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReviewComment__links_html) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReviewComment__links_html) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *PullRequestReviewComment__links_html) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *PullRequestReviewComment__links_html) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *PullRequestReviewComment__links_html) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *PullRequestReviewComment__links_html) SetHref(value *string)() { + m.href = value +} +type PullRequestReviewComment__links_htmlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/pull_request_review_comment__links_pull_request.go b/pkg/github/models/pull_request_review_comment__links_pull_request.go new file mode 100644 index 0000000..b7d904c --- /dev/null +++ b/pkg/github/models/pull_request_review_comment__links_pull_request.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReviewComment__links_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewPullRequestReviewComment__links_pull_request instantiates a new PullRequestReviewComment__links_pull_request and sets the default values. +func NewPullRequestReviewComment__links_pull_request()(*PullRequestReviewComment__links_pull_request) { + m := &PullRequestReviewComment__links_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReviewComment__links_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewComment__links_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReviewComment__links_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReviewComment__links_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReviewComment__links_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *PullRequestReviewComment__links_pull_request) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *PullRequestReviewComment__links_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *PullRequestReviewComment__links_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *PullRequestReviewComment__links_pull_request) SetHref(value *string)() { + m.href = value +} +type PullRequestReviewComment__links_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/pull_request_review_comment__links_self.go b/pkg/github/models/pull_request_review_comment__links_self.go new file mode 100644 index 0000000..ae14572 --- /dev/null +++ b/pkg/github/models/pull_request_review_comment__links_self.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestReviewComment__links_self struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewPullRequestReviewComment__links_self instantiates a new PullRequestReviewComment__links_self and sets the default values. +func NewPullRequestReviewComment__links_self()(*PullRequestReviewComment__links_self) { + m := &PullRequestReviewComment__links_self{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReviewComment__links_selfFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewComment__links_selfFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReviewComment__links_self(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReviewComment__links_self) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReviewComment__links_self) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *PullRequestReviewComment__links_self) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *PullRequestReviewComment__links_self) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *PullRequestReviewComment__links_self) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *PullRequestReviewComment__links_self) SetHref(value *string)() { + m.href = value +} +type PullRequestReviewComment__links_selfable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/pull_request_review_comment_side.go b/pkg/github/models/pull_request_review_comment_side.go new file mode 100644 index 0000000..b94739b --- /dev/null +++ b/pkg/github/models/pull_request_review_comment_side.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment +type PullRequestReviewComment_side int + +const ( + LEFT_PULLREQUESTREVIEWCOMMENT_SIDE PullRequestReviewComment_side = iota + RIGHT_PULLREQUESTREVIEWCOMMENT_SIDE +) + +func (i PullRequestReviewComment_side) String() string { + return []string{"LEFT", "RIGHT"}[i] +} +func ParsePullRequestReviewComment_side(v string) (any, error) { + result := LEFT_PULLREQUESTREVIEWCOMMENT_SIDE + switch v { + case "LEFT": + result = LEFT_PULLREQUESTREVIEWCOMMENT_SIDE + case "RIGHT": + result = RIGHT_PULLREQUESTREVIEWCOMMENT_SIDE + default: + return 0, errors.New("Unknown PullRequestReviewComment_side value: " + v) + } + return &result, nil +} +func SerializePullRequestReviewComment_side(values []PullRequestReviewComment_side) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestReviewComment_side) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_review_comment_start_side.go b/pkg/github/models/pull_request_review_comment_start_side.go new file mode 100644 index 0000000..a658351 --- /dev/null +++ b/pkg/github/models/pull_request_review_comment_start_side.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The side of the first line of the range for a multi-line comment. +type PullRequestReviewComment_start_side int + +const ( + LEFT_PULLREQUESTREVIEWCOMMENT_START_SIDE PullRequestReviewComment_start_side = iota + RIGHT_PULLREQUESTREVIEWCOMMENT_START_SIDE +) + +func (i PullRequestReviewComment_start_side) String() string { + return []string{"LEFT", "RIGHT"}[i] +} +func ParsePullRequestReviewComment_start_side(v string) (any, error) { + result := LEFT_PULLREQUESTREVIEWCOMMENT_START_SIDE + switch v { + case "LEFT": + result = LEFT_PULLREQUESTREVIEWCOMMENT_START_SIDE + case "RIGHT": + result = RIGHT_PULLREQUESTREVIEWCOMMENT_START_SIDE + default: + return 0, errors.New("Unknown PullRequestReviewComment_start_side value: " + v) + } + return &result, nil +} +func SerializePullRequestReviewComment_start_side(values []PullRequestReviewComment_start_side) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestReviewComment_start_side) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_review_comment_subject_type.go b/pkg/github/models/pull_request_review_comment_subject_type.go new file mode 100644 index 0000000..deb3ad4 --- /dev/null +++ b/pkg/github/models/pull_request_review_comment_subject_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level at which the comment is targeted, can be a diff line or a file. +type PullRequestReviewComment_subject_type int + +const ( + LINE_PULLREQUESTREVIEWCOMMENT_SUBJECT_TYPE PullRequestReviewComment_subject_type = iota + FILE_PULLREQUESTREVIEWCOMMENT_SUBJECT_TYPE +) + +func (i PullRequestReviewComment_subject_type) String() string { + return []string{"line", "file"}[i] +} +func ParsePullRequestReviewComment_subject_type(v string) (any, error) { + result := LINE_PULLREQUESTREVIEWCOMMENT_SUBJECT_TYPE + switch v { + case "line": + result = LINE_PULLREQUESTREVIEWCOMMENT_SUBJECT_TYPE + case "file": + result = FILE_PULLREQUESTREVIEWCOMMENT_SUBJECT_TYPE + default: + return 0, errors.New("Unknown PullRequestReviewComment_subject_type value: " + v) + } + return &result, nil +} +func SerializePullRequestReviewComment_subject_type(values []PullRequestReviewComment_subject_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestReviewComment_subject_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_review_request.go b/pkg/github/models/pull_request_review_request.go new file mode 100644 index 0000000..3b52ba3 --- /dev/null +++ b/pkg/github/models/pull_request_review_request.go @@ -0,0 +1,134 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PullRequestReviewRequest pull Request Review Request +type PullRequestReviewRequest struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The teams property + teams []Teamable + // The users property + users []SimpleUserable +} +// NewPullRequestReviewRequest instantiates a new PullRequestReviewRequest and sets the default values. +func NewPullRequestReviewRequest()(*PullRequestReviewRequest) { + m := &PullRequestReviewRequest{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestReviewRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestReviewRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestReviewRequest(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestReviewRequest) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestReviewRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The teams property +// returns a []Teamable when successful +func (m *PullRequestReviewRequest) GetTeams()([]Teamable) { + return m.teams +} +// GetUsers gets the users property value. The users property +// returns a []SimpleUserable when successful +func (m *PullRequestReviewRequest) GetUsers()([]SimpleUserable) { + return m.users +} +// Serialize serializes information the current object +func (m *PullRequestReviewRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeams())) + for i, v := range m.GetTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("teams", cast) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequestReviewRequest) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTeams sets the teams property value. The teams property +func (m *PullRequestReviewRequest) SetTeams(value []Teamable)() { + m.teams = value +} +// SetUsers sets the users property value. The users property +func (m *PullRequestReviewRequest) SetUsers(value []SimpleUserable)() { + m.users = value +} +type PullRequestReviewRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTeams()([]Teamable) + GetUsers()([]SimpleUserable) + SetTeams(value []Teamable)() + SetUsers(value []SimpleUserable)() +} diff --git a/pkg/github/models/pull_request_simple.go b/pkg/github/models/pull_request_simple.go new file mode 100644 index 0000000..eea8993 --- /dev/null +++ b/pkg/github/models/pull_request_simple.go @@ -0,0 +1,1146 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PullRequestSimple pull Request Simple +type PullRequestSimple struct { + // The _links property + _links PullRequestSimple__linksable + // The active_lock_reason property + active_lock_reason *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee NullableSimpleUserable + // The assignees property + assignees []SimpleUserable + // How the author is associated with the repository. + author_association *AuthorAssociation + // The status of auto merging a pull request. + auto_merge AutoMergeable + // The base property + base PullRequestSimple_baseable + // The body property + body *string + // The closed_at property + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The diff_url property + diff_url *string + // Indicates whether or not the pull request is a draft. + draft *bool + // The head property + head PullRequestSimple_headable + // The html_url property + html_url *string + // The id property + id *int64 + // The issue_url property + issue_url *string + // The labels property + labels []PullRequestSimple_labelsable + // The locked property + locked *bool + // The merge_commit_sha property + merge_commit_sha *string + // The merged_at property + merged_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A collection of related issues and pull requests. + milestone NullableMilestoneable + // The node_id property + node_id *string + // The number property + number *int32 + // The patch_url property + patch_url *string + // The requested_reviewers property + requested_reviewers []SimpleUserable + // The requested_teams property + requested_teams []Teamable + // The review_comment_url property + review_comment_url *string + // The review_comments_url property + review_comments_url *string + // The state property + state *string + // The statuses_url property + statuses_url *string + // The title property + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewPullRequestSimple instantiates a new PullRequestSimple and sets the default values. +func NewPullRequestSimple()(*PullRequestSimple) { + m := &PullRequestSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestSimple(), nil +} +// GetActiveLockReason gets the active_lock_reason property value. The active_lock_reason property +// returns a *string when successful +func (m *PullRequestSimple) GetActiveLockReason()(*string) { + return m.active_lock_reason +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequestSimple) GetAssignee()(NullableSimpleUserable) { + return m.assignee +} +// GetAssignees gets the assignees property value. The assignees property +// returns a []SimpleUserable when successful +func (m *PullRequestSimple) GetAssignees()([]SimpleUserable) { + return m.assignees +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *PullRequestSimple) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetAutoMerge gets the auto_merge property value. The status of auto merging a pull request. +// returns a AutoMergeable when successful +func (m *PullRequestSimple) GetAutoMerge()(AutoMergeable) { + return m.auto_merge +} +// GetBase gets the base property value. The base property +// returns a PullRequestSimple_baseable when successful +func (m *PullRequestSimple) GetBase()(PullRequestSimple_baseable) { + return m.base +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *PullRequestSimple) GetBody()(*string) { + return m.body +} +// GetClosedAt gets the closed_at property value. The closed_at property +// returns a *Time when successful +func (m *PullRequestSimple) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *PullRequestSimple) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *PullRequestSimple) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *PullRequestSimple) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiffUrl gets the diff_url property value. The diff_url property +// returns a *string when successful +func (m *PullRequestSimple) GetDiffUrl()(*string) { + return m.diff_url +} +// GetDraft gets the draft property value. Indicates whether or not the pull request is a draft. +// returns a *bool when successful +func (m *PullRequestSimple) GetDraft()(*bool) { + return m.draft +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestSimple__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(PullRequestSimple__linksable)) + } + return nil + } + res["active_lock_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveLockReason(val) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(NullableSimpleUserable)) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetAssignees(res) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["auto_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAutoMergeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutoMerge(val.(AutoMergeable)) + } + return nil + } + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestSimple_baseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBase(val.(PullRequestSimple_baseable)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["diff_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffUrl(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["head"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePullRequestSimple_headFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHead(val.(PullRequestSimple_headable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issue_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueUrl(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePullRequestSimple_labelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PullRequestSimple_labelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PullRequestSimple_labelsable) + } + } + m.SetLabels(res) + } + return nil + } + res["locked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocked(val) + } + return nil + } + res["merge_commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitSha(val) + } + return nil + } + res["merged_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMergedAt(val) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableMilestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(NullableMilestoneable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["patch_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchUrl(val) + } + return nil + } + res["requested_reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetRequestedReviewers(res) + } + return nil + } + res["requested_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetRequestedTeams(res) + } + return nil + } + res["review_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewCommentUrl(val) + } + return nil + } + res["review_comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewCommentsUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHead gets the head property value. The head property +// returns a PullRequestSimple_headable when successful +func (m *PullRequestSimple) GetHead()(PullRequestSimple_headable) { + return m.head +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *PullRequestSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequestSimple) GetId()(*int64) { + return m.id +} +// GetIssueUrl gets the issue_url property value. The issue_url property +// returns a *string when successful +func (m *PullRequestSimple) GetIssueUrl()(*string) { + return m.issue_url +} +// GetLabels gets the labels property value. The labels property +// returns a []PullRequestSimple_labelsable when successful +func (m *PullRequestSimple) GetLabels()([]PullRequestSimple_labelsable) { + return m.labels +} +// GetLinks gets the _links property value. The _links property +// returns a PullRequestSimple__linksable when successful +func (m *PullRequestSimple) GetLinks()(PullRequestSimple__linksable) { + return m._links +} +// GetLocked gets the locked property value. The locked property +// returns a *bool when successful +func (m *PullRequestSimple) GetLocked()(*bool) { + return m.locked +} +// GetMergeCommitSha gets the merge_commit_sha property value. The merge_commit_sha property +// returns a *string when successful +func (m *PullRequestSimple) GetMergeCommitSha()(*string) { + return m.merge_commit_sha +} +// GetMergedAt gets the merged_at property value. The merged_at property +// returns a *Time when successful +func (m *PullRequestSimple) GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.merged_at +} +// GetMilestone gets the milestone property value. A collection of related issues and pull requests. +// returns a NullableMilestoneable when successful +func (m *PullRequestSimple) GetMilestone()(NullableMilestoneable) { + return m.milestone +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequestSimple) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *PullRequestSimple) GetNumber()(*int32) { + return m.number +} +// GetPatchUrl gets the patch_url property value. The patch_url property +// returns a *string when successful +func (m *PullRequestSimple) GetPatchUrl()(*string) { + return m.patch_url +} +// GetRequestedReviewers gets the requested_reviewers property value. The requested_reviewers property +// returns a []SimpleUserable when successful +func (m *PullRequestSimple) GetRequestedReviewers()([]SimpleUserable) { + return m.requested_reviewers +} +// GetRequestedTeams gets the requested_teams property value. The requested_teams property +// returns a []Teamable when successful +func (m *PullRequestSimple) GetRequestedTeams()([]Teamable) { + return m.requested_teams +} +// GetReviewCommentsUrl gets the review_comments_url property value. The review_comments_url property +// returns a *string when successful +func (m *PullRequestSimple) GetReviewCommentsUrl()(*string) { + return m.review_comments_url +} +// GetReviewCommentUrl gets the review_comment_url property value. The review_comment_url property +// returns a *string when successful +func (m *PullRequestSimple) GetReviewCommentUrl()(*string) { + return m.review_comment_url +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *PullRequestSimple) GetState()(*string) { + return m.state +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *PullRequestSimple) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *PullRequestSimple) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *PullRequestSimple) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequestSimple) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequestSimple) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequestSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("active_lock_reason", m.GetActiveLockReason()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignees())) + for i, v := range m.GetAssignees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("assignees", cast) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("auto_merge", m.GetAutoMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("base", m.GetBase()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("closed_at", m.GetClosedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("diff_url", m.GetDiffUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("head", m.GetHead()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_url", m.GetIssueUrl()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("locked", m.GetLocked()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("merged_at", m.GetMergedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merge_commit_sha", m.GetMergeCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patch_url", m.GetPatchUrl()) + if err != nil { + return err + } + } + if m.GetRequestedReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequestedReviewers())) + for i, v := range m.GetRequestedReviewers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("requested_reviewers", cast) + if err != nil { + return err + } + } + if m.GetRequestedTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequestedTeams())) + for i, v := range m.GetRequestedTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("requested_teams", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("review_comments_url", m.GetReviewCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("review_comment_url", m.GetReviewCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveLockReason sets the active_lock_reason property value. The active_lock_reason property +func (m *PullRequestSimple) SetActiveLockReason(value *string)() { + m.active_lock_reason = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequestSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *PullRequestSimple) SetAssignee(value NullableSimpleUserable)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. The assignees property +func (m *PullRequestSimple) SetAssignees(value []SimpleUserable)() { + m.assignees = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *PullRequestSimple) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetAutoMerge sets the auto_merge property value. The status of auto merging a pull request. +func (m *PullRequestSimple) SetAutoMerge(value AutoMergeable)() { + m.auto_merge = value +} +// SetBase sets the base property value. The base property +func (m *PullRequestSimple) SetBase(value PullRequestSimple_baseable)() { + m.base = value +} +// SetBody sets the body property value. The body property +func (m *PullRequestSimple) SetBody(value *string)() { + m.body = value +} +// SetClosedAt sets the closed_at property value. The closed_at property +func (m *PullRequestSimple) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *PullRequestSimple) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *PullRequestSimple) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *PullRequestSimple) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiffUrl sets the diff_url property value. The diff_url property +func (m *PullRequestSimple) SetDiffUrl(value *string)() { + m.diff_url = value +} +// SetDraft sets the draft property value. Indicates whether or not the pull request is a draft. +func (m *PullRequestSimple) SetDraft(value *bool)() { + m.draft = value +} +// SetHead sets the head property value. The head property +func (m *PullRequestSimple) SetHead(value PullRequestSimple_headable)() { + m.head = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *PullRequestSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *PullRequestSimple) SetId(value *int64)() { + m.id = value +} +// SetIssueUrl sets the issue_url property value. The issue_url property +func (m *PullRequestSimple) SetIssueUrl(value *string)() { + m.issue_url = value +} +// SetLabels sets the labels property value. The labels property +func (m *PullRequestSimple) SetLabels(value []PullRequestSimple_labelsable)() { + m.labels = value +} +// SetLinks sets the _links property value. The _links property +func (m *PullRequestSimple) SetLinks(value PullRequestSimple__linksable)() { + m._links = value +} +// SetLocked sets the locked property value. The locked property +func (m *PullRequestSimple) SetLocked(value *bool)() { + m.locked = value +} +// SetMergeCommitSha sets the merge_commit_sha property value. The merge_commit_sha property +func (m *PullRequestSimple) SetMergeCommitSha(value *string)() { + m.merge_commit_sha = value +} +// SetMergedAt sets the merged_at property value. The merged_at property +func (m *PullRequestSimple) SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.merged_at = value +} +// SetMilestone sets the milestone property value. A collection of related issues and pull requests. +func (m *PullRequestSimple) SetMilestone(value NullableMilestoneable)() { + m.milestone = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequestSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The number property +func (m *PullRequestSimple) SetNumber(value *int32)() { + m.number = value +} +// SetPatchUrl sets the patch_url property value. The patch_url property +func (m *PullRequestSimple) SetPatchUrl(value *string)() { + m.patch_url = value +} +// SetRequestedReviewers sets the requested_reviewers property value. The requested_reviewers property +func (m *PullRequestSimple) SetRequestedReviewers(value []SimpleUserable)() { + m.requested_reviewers = value +} +// SetRequestedTeams sets the requested_teams property value. The requested_teams property +func (m *PullRequestSimple) SetRequestedTeams(value []Teamable)() { + m.requested_teams = value +} +// SetReviewCommentsUrl sets the review_comments_url property value. The review_comments_url property +func (m *PullRequestSimple) SetReviewCommentsUrl(value *string)() { + m.review_comments_url = value +} +// SetReviewCommentUrl sets the review_comment_url property value. The review_comment_url property +func (m *PullRequestSimple) SetReviewCommentUrl(value *string)() { + m.review_comment_url = value +} +// SetState sets the state property value. The state property +func (m *PullRequestSimple) SetState(value *string)() { + m.state = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *PullRequestSimple) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetTitle sets the title property value. The title property +func (m *PullRequestSimple) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *PullRequestSimple) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequestSimple) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *PullRequestSimple) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type PullRequestSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveLockReason()(*string) + GetAssignee()(NullableSimpleUserable) + GetAssignees()([]SimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetAutoMerge()(AutoMergeable) + GetBase()(PullRequestSimple_baseable) + GetBody()(*string) + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiffUrl()(*string) + GetDraft()(*bool) + GetHead()(PullRequestSimple_headable) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueUrl()(*string) + GetLabels()([]PullRequestSimple_labelsable) + GetLinks()(PullRequestSimple__linksable) + GetLocked()(*bool) + GetMergeCommitSha()(*string) + GetMergedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMilestone()(NullableMilestoneable) + GetNodeId()(*string) + GetNumber()(*int32) + GetPatchUrl()(*string) + GetRequestedReviewers()([]SimpleUserable) + GetRequestedTeams()([]Teamable) + GetReviewCommentsUrl()(*string) + GetReviewCommentUrl()(*string) + GetState()(*string) + GetStatusesUrl()(*string) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetActiveLockReason(value *string)() + SetAssignee(value NullableSimpleUserable)() + SetAssignees(value []SimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetAutoMerge(value AutoMergeable)() + SetBase(value PullRequestSimple_baseable)() + SetBody(value *string)() + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiffUrl(value *string)() + SetDraft(value *bool)() + SetHead(value PullRequestSimple_headable)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueUrl(value *string)() + SetLabels(value []PullRequestSimple_labelsable)() + SetLinks(value PullRequestSimple__linksable)() + SetLocked(value *bool)() + SetMergeCommitSha(value *string)() + SetMergedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMilestone(value NullableMilestoneable)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetPatchUrl(value *string)() + SetRequestedReviewers(value []SimpleUserable)() + SetRequestedTeams(value []Teamable)() + SetReviewCommentsUrl(value *string)() + SetReviewCommentUrl(value *string)() + SetState(value *string)() + SetStatusesUrl(value *string)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/pull_request_simple__links.go b/pkg/github/models/pull_request_simple__links.go new file mode 100644 index 0000000..f964ceb --- /dev/null +++ b/pkg/github/models/pull_request_simple__links.go @@ -0,0 +1,283 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestSimple__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Hypermedia Link + comments Linkable + // Hypermedia Link + commits Linkable + // Hypermedia Link + html Linkable + // Hypermedia Link + issue Linkable + // Hypermedia Link + review_comment Linkable + // Hypermedia Link + review_comments Linkable + // Hypermedia Link + self Linkable + // Hypermedia Link + statuses Linkable +} +// NewPullRequestSimple__links instantiates a new PullRequestSimple__links and sets the default values. +func NewPullRequestSimple__links()(*PullRequestSimple__links) { + m := &PullRequestSimple__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestSimple__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestSimple__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestSimple__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestSimple__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetComments()(Linkable) { + return m.comments +} +// GetCommits gets the commits property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetCommits()(Linkable) { + return m.commits +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestSimple__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetComments(val.(Linkable)) + } + return nil + } + res["commits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommits(val.(Linkable)) + } + return nil + } + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(Linkable)) + } + return nil + } + res["issue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssue(val.(Linkable)) + } + return nil + } + res["review_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewComment(val.(Linkable)) + } + return nil + } + res["review_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewComments(val.(Linkable)) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelf(val.(Linkable)) + } + return nil + } + res["statuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatuses(val.(Linkable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetHtml()(Linkable) { + return m.html +} +// GetIssue gets the issue property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetIssue()(Linkable) { + return m.issue +} +// GetReviewComment gets the review_comment property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetReviewComment()(Linkable) { + return m.review_comment +} +// GetReviewComments gets the review_comments property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetReviewComments()(Linkable) { + return m.review_comments +} +// GetSelf gets the self property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetSelf()(Linkable) { + return m.self +} +// GetStatuses gets the statuses property value. Hypermedia Link +// returns a Linkable when successful +func (m *PullRequestSimple__links) GetStatuses()(Linkable) { + return m.statuses +} +// Serialize serializes information the current object +func (m *PullRequestSimple__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("commits", m.GetCommits()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("issue", m.GetIssue()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_comment", m.GetReviewComment()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_comments", m.GetReviewComments()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("self", m.GetSelf()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("statuses", m.GetStatuses()) + 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 *PullRequestSimple__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. Hypermedia Link +func (m *PullRequestSimple__links) SetComments(value Linkable)() { + m.comments = value +} +// SetCommits sets the commits property value. Hypermedia Link +func (m *PullRequestSimple__links) SetCommits(value Linkable)() { + m.commits = value +} +// SetHtml sets the html property value. Hypermedia Link +func (m *PullRequestSimple__links) SetHtml(value Linkable)() { + m.html = value +} +// SetIssue sets the issue property value. Hypermedia Link +func (m *PullRequestSimple__links) SetIssue(value Linkable)() { + m.issue = value +} +// SetReviewComment sets the review_comment property value. Hypermedia Link +func (m *PullRequestSimple__links) SetReviewComment(value Linkable)() { + m.review_comment = value +} +// SetReviewComments sets the review_comments property value. Hypermedia Link +func (m *PullRequestSimple__links) SetReviewComments(value Linkable)() { + m.review_comments = value +} +// SetSelf sets the self property value. Hypermedia Link +func (m *PullRequestSimple__links) SetSelf(value Linkable)() { + m.self = value +} +// SetStatuses sets the statuses property value. Hypermedia Link +func (m *PullRequestSimple__links) SetStatuses(value Linkable)() { + m.statuses = value +} +type PullRequestSimple__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()(Linkable) + GetCommits()(Linkable) + GetHtml()(Linkable) + GetIssue()(Linkable) + GetReviewComment()(Linkable) + GetReviewComments()(Linkable) + GetSelf()(Linkable) + GetStatuses()(Linkable) + SetComments(value Linkable)() + SetCommits(value Linkable)() + SetHtml(value Linkable)() + SetIssue(value Linkable)() + SetReviewComment(value Linkable)() + SetReviewComments(value Linkable)() + SetSelf(value Linkable)() + SetStatuses(value Linkable)() +} diff --git a/pkg/github/models/pull_request_simple_base.go b/pkg/github/models/pull_request_simple_base.go new file mode 100644 index 0000000..4c67fa0 --- /dev/null +++ b/pkg/github/models/pull_request_simple_base.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestSimple_base struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The label property + label *string + // The ref property + ref *string + // A repository on GitHub. + repo Repositoryable + // The sha property + sha *string + // A GitHub user. + user NullableSimpleUserable +} +// NewPullRequestSimple_base instantiates a new PullRequestSimple_base and sets the default values. +func NewPullRequestSimple_base()(*PullRequestSimple_base) { + m := &PullRequestSimple_base{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestSimple_baseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestSimple_baseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestSimple_base(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestSimple_base) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestSimple_base) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(Repositoryable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetLabel gets the label property value. The label property +// returns a *string when successful +func (m *PullRequestSimple_base) GetLabel()(*string) { + return m.label +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *PullRequestSimple_base) GetRef()(*string) { + return m.ref +} +// GetRepo gets the repo property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *PullRequestSimple_base) GetRepo()(Repositoryable) { + return m.repo +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequestSimple_base) GetSha()(*string) { + return m.sha +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequestSimple_base) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequestSimple_base) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *PullRequestSimple_base) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabel sets the label property value. The label property +func (m *PullRequestSimple_base) SetLabel(value *string)() { + m.label = value +} +// SetRef sets the ref property value. The ref property +func (m *PullRequestSimple_base) SetRef(value *string)() { + m.ref = value +} +// SetRepo sets the repo property value. A repository on GitHub. +func (m *PullRequestSimple_base) SetRepo(value Repositoryable)() { + m.repo = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequestSimple_base) SetSha(value *string)() { + m.sha = value +} +// SetUser sets the user property value. A GitHub user. +func (m *PullRequestSimple_base) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type PullRequestSimple_baseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabel()(*string) + GetRef()(*string) + GetRepo()(Repositoryable) + GetSha()(*string) + GetUser()(NullableSimpleUserable) + SetLabel(value *string)() + SetRef(value *string)() + SetRepo(value Repositoryable)() + SetSha(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/pull_request_simple_head.go b/pkg/github/models/pull_request_simple_head.go new file mode 100644 index 0000000..53ffb32 --- /dev/null +++ b/pkg/github/models/pull_request_simple_head.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestSimple_head struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The label property + label *string + // The ref property + ref *string + // A repository on GitHub. + repo Repositoryable + // The sha property + sha *string + // A GitHub user. + user NullableSimpleUserable +} +// NewPullRequestSimple_head instantiates a new PullRequestSimple_head and sets the default values. +func NewPullRequestSimple_head()(*PullRequestSimple_head) { + m := &PullRequestSimple_head{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestSimple_headFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestSimple_headFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestSimple_head(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestSimple_head) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestSimple_head) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepo(val.(Repositoryable)) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetLabel gets the label property value. The label property +// returns a *string when successful +func (m *PullRequestSimple_head) GetLabel()(*string) { + return m.label +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *PullRequestSimple_head) GetRef()(*string) { + return m.ref +} +// GetRepo gets the repo property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *PullRequestSimple_head) GetRepo()(Repositoryable) { + return m.repo +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *PullRequestSimple_head) GetSha()(*string) { + return m.sha +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *PullRequestSimple_head) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *PullRequestSimple_head) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repo", m.GetRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *PullRequestSimple_head) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabel sets the label property value. The label property +func (m *PullRequestSimple_head) SetLabel(value *string)() { + m.label = value +} +// SetRef sets the ref property value. The ref property +func (m *PullRequestSimple_head) SetRef(value *string)() { + m.ref = value +} +// SetRepo sets the repo property value. A repository on GitHub. +func (m *PullRequestSimple_head) SetRepo(value Repositoryable)() { + m.repo = value +} +// SetSha sets the sha property value. The sha property +func (m *PullRequestSimple_head) SetSha(value *string)() { + m.sha = value +} +// SetUser sets the user property value. A GitHub user. +func (m *PullRequestSimple_head) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type PullRequestSimple_headable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabel()(*string) + GetRef()(*string) + GetRepo()(Repositoryable) + GetSha()(*string) + GetUser()(NullableSimpleUserable) + SetLabel(value *string)() + SetRef(value *string)() + SetRepo(value Repositoryable)() + SetSha(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/pull_request_simple_labels.go b/pkg/github/models/pull_request_simple_labels.go new file mode 100644 index 0000000..93cd37e --- /dev/null +++ b/pkg/github/models/pull_request_simple_labels.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestSimple_labels struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The default property + defaultEscaped *bool + // The description property + description *string + // The id property + id *int64 + // The name property + name *string + // The node_id property + node_id *string + // The url property + url *string +} +// NewPullRequestSimple_labels instantiates a new PullRequestSimple_labels and sets the default values. +func NewPullRequestSimple_labels()(*PullRequestSimple_labels) { + m := &PullRequestSimple_labels{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePullRequestSimple_labelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestSimple_labelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestSimple_labels(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *PullRequestSimple_labels) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *PullRequestSimple_labels) GetColor()(*string) { + return m.color +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *PullRequestSimple_labels) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *PullRequestSimple_labels) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestSimple_labels) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *PullRequestSimple_labels) GetId()(*int64) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *PullRequestSimple_labels) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *PullRequestSimple_labels) GetNodeId()(*string) { + return m.node_id +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *PullRequestSimple_labels) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PullRequestSimple_labels) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PullRequestSimple_labels) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *PullRequestSimple_labels) SetColor(value *string)() { + m.color = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *PullRequestSimple_labels) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetDescription sets the description property value. The description property +func (m *PullRequestSimple_labels) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *PullRequestSimple_labels) SetId(value *int64)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *PullRequestSimple_labels) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *PullRequestSimple_labels) SetNodeId(value *string)() { + m.node_id = value +} +// SetUrl sets the url property value. The url property +func (m *PullRequestSimple_labels) SetUrl(value *string)() { + m.url = value +} +type PullRequestSimple_labelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDefaultEscaped()(*bool) + GetDescription()(*string) + GetId()(*int64) + GetName()(*string) + GetNodeId()(*string) + GetUrl()(*string) + SetColor(value *string)() + SetDefaultEscaped(value *bool)() + SetDescription(value *string)() + SetId(value *int64)() + SetName(value *string)() + SetNodeId(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/pull_request_state.go b/pkg/github/models/pull_request_state.go new file mode 100644 index 0000000..135ef8c --- /dev/null +++ b/pkg/github/models/pull_request_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// State of this Pull Request. Either `open` or `closed`. +type PullRequest_state int + +const ( + OPEN_PULLREQUEST_STATE PullRequest_state = iota + CLOSED_PULLREQUEST_STATE +) + +func (i PullRequest_state) String() string { + return []string{"open", "closed"}[i] +} +func ParsePullRequest_state(v string) (any, error) { + result := OPEN_PULLREQUEST_STATE + switch v { + case "open": + result = OPEN_PULLREQUEST_STATE + case "closed": + result = CLOSED_PULLREQUEST_STATE + default: + return 0, errors.New("Unknown PullRequest_state value: " + v) + } + return &result, nil +} +func SerializePullRequest_state(values []PullRequest_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequest_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook.go b/pkg/github/models/pull_request_webhook.go new file mode 100644 index 0000000..15965dd --- /dev/null +++ b/pkg/github/models/pull_request_webhook.go @@ -0,0 +1,275 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestWebhook struct { + PullRequest + // Whether to allow auto-merge for pull requests. + allow_auto_merge *bool + // Whether to allow updating the pull request's branch. + allow_update_branch *bool + // Whether to delete head branches when pull requests are merged. + delete_branch_on_merge *bool + // 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. + merge_commit_message *PullRequestWebhook_merge_commit_message + // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). + merge_commit_title *PullRequestWebhook_merge_commit_title + // 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. + squash_merge_commit_message *PullRequestWebhook_squash_merge_commit_message + // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_title *PullRequestWebhook_squash_merge_commit_title + // Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** + use_squash_pr_title_as_default *bool +} +// NewPullRequestWebhook instantiates a new PullRequestWebhook and sets the default values. +func NewPullRequestWebhook()(*PullRequestWebhook) { + m := &PullRequestWebhook{ + PullRequest: *NewPullRequest(), + } + return m +} +// CreatePullRequestWebhookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestWebhookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestWebhook(), nil +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Whether to allow auto-merge for pull requests. +// returns a *bool when successful +func (m *PullRequestWebhook) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowUpdateBranch gets the allow_update_branch property value. Whether to allow updating the pull request's branch. +// returns a *bool when successful +func (m *PullRequestWebhook) GetAllowUpdateBranch()(*bool) { + return m.allow_update_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged. +// returns a *bool when successful +func (m *PullRequestWebhook) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestWebhook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PullRequest.GetFieldDeserializers() + 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_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["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["merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitMessage(val.(*PullRequestWebhook_merge_commit_message)) + } + return nil + } + res["merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitTitle(val.(*PullRequestWebhook_merge_commit_title)) + } + return nil + } + res["squash_merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_squash_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitMessage(val.(*PullRequestWebhook_squash_merge_commit_message)) + } + return nil + } + res["squash_merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_squash_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitTitle(val.(*PullRequestWebhook_squash_merge_commit_title)) + } + 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 + } + return res +} +// GetMergeCommitMessage gets the merge_commit_message property value. 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. +// returns a *PullRequestWebhook_merge_commit_message when successful +func (m *PullRequestWebhook) GetMergeCommitMessage()(*PullRequestWebhook_merge_commit_message) { + return m.merge_commit_message +} +// GetMergeCommitTitle gets the merge_commit_title property value. 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"). +// returns a *PullRequestWebhook_merge_commit_title when successful +func (m *PullRequestWebhook) GetMergeCommitTitle()(*PullRequestWebhook_merge_commit_title) { + return m.merge_commit_title +} +// GetSquashMergeCommitMessage gets the squash_merge_commit_message property value. 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. +// returns a *PullRequestWebhook_squash_merge_commit_message when successful +func (m *PullRequestWebhook) GetSquashMergeCommitMessage()(*PullRequestWebhook_squash_merge_commit_message) { + return m.squash_merge_commit_message +} +// GetSquashMergeCommitTitle gets the squash_merge_commit_title property value. 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). +// returns a *PullRequestWebhook_squash_merge_commit_title when successful +func (m *PullRequestWebhook) GetSquashMergeCommitTitle()(*PullRequestWebhook_squash_merge_commit_title) { + return m.squash_merge_commit_title +} +// GetUseSquashPrTitleAsDefault gets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** +// returns a *bool when successful +func (m *PullRequestWebhook) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// Serialize serializes information the current object +func (m *PullRequestWebhook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PullRequest.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allow_auto_merge", m.GetAllowAutoMerge()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allow_update_branch", m.GetAllowUpdateBranch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + if m.GetMergeCommitMessage() != nil { + cast := (*m.GetMergeCommitMessage()).String() + err = writer.WriteStringValue("merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetMergeCommitTitle() != nil { + cast := (*m.GetMergeCommitTitle()).String() + err = writer.WriteStringValue("merge_commit_title", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitMessage() != nil { + cast := (*m.GetSquashMergeCommitMessage()).String() + err = writer.WriteStringValue("squash_merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitTitle() != nil { + cast := (*m.GetSquashMergeCommitTitle()).String() + err = writer.WriteStringValue("squash_merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Whether to allow auto-merge for pull requests. +func (m *PullRequestWebhook) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowUpdateBranch sets the allow_update_branch property value. Whether to allow updating the pull request's branch. +func (m *PullRequestWebhook) SetAllowUpdateBranch(value *bool)() { + m.allow_update_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged. +func (m *PullRequestWebhook) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetMergeCommitMessage sets the merge_commit_message property value. 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. +func (m *PullRequestWebhook) SetMergeCommitMessage(value *PullRequestWebhook_merge_commit_message)() { + m.merge_commit_message = value +} +// SetMergeCommitTitle sets the merge_commit_title property value. 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"). +func (m *PullRequestWebhook) SetMergeCommitTitle(value *PullRequestWebhook_merge_commit_title)() { + m.merge_commit_title = value +} +// SetSquashMergeCommitMessage sets the squash_merge_commit_message property value. 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. +func (m *PullRequestWebhook) SetSquashMergeCommitMessage(value *PullRequestWebhook_squash_merge_commit_message)() { + m.squash_merge_commit_message = value +} +// SetSquashMergeCommitTitle sets the squash_merge_commit_title property value. 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). +func (m *PullRequestWebhook) SetSquashMergeCommitTitle(value *PullRequestWebhook_squash_merge_commit_title)() { + m.squash_merge_commit_title = value +} +// SetUseSquashPrTitleAsDefault sets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** +func (m *PullRequestWebhook) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +type PullRequestWebhookable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PullRequestable + GetAllowAutoMerge()(*bool) + GetAllowUpdateBranch()(*bool) + GetDeleteBranchOnMerge()(*bool) + GetMergeCommitMessage()(*PullRequestWebhook_merge_commit_message) + GetMergeCommitTitle()(*PullRequestWebhook_merge_commit_title) + GetSquashMergeCommitMessage()(*PullRequestWebhook_squash_merge_commit_message) + GetSquashMergeCommitTitle()(*PullRequestWebhook_squash_merge_commit_title) + GetUseSquashPrTitleAsDefault()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowUpdateBranch(value *bool)() + SetDeleteBranchOnMerge(value *bool)() + SetMergeCommitMessage(value *PullRequestWebhook_merge_commit_message)() + SetMergeCommitTitle(value *PullRequestWebhook_merge_commit_title)() + SetSquashMergeCommitMessage(value *PullRequestWebhook_squash_merge_commit_message)() + SetSquashMergeCommitTitle(value *PullRequestWebhook_squash_merge_commit_title)() + SetUseSquashPrTitleAsDefault(value *bool)() +} diff --git a/pkg/github/models/pull_request_webhook_merge_commit_message.go b/pkg/github/models/pull_request_webhook_merge_commit_message.go new file mode 100644 index 0000000..a34f505 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type PullRequestWebhook_merge_commit_message int + +const ( + PR_BODY_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE PullRequestWebhook_merge_commit_message = iota + PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + BLANK_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE +) + +func (i PullRequestWebhook_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParsePullRequestWebhook_merge_commit_message(v string) (any, error) { + result := PR_BODY_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown PullRequestWebhook_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_merge_commit_message(values []PullRequestWebhook_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook_merge_commit_title.go b/pkg/github/models/pull_request_webhook_merge_commit_title.go new file mode 100644 index 0000000..7a66012 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). +type PullRequestWebhook_merge_commit_title int + +const ( + PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE PullRequestWebhook_merge_commit_title = iota + MERGE_MESSAGE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE +) + +func (i PullRequestWebhook_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParsePullRequestWebhook_merge_commit_title(v string) (any, error) { + result := PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown PullRequestWebhook_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_merge_commit_title(values []PullRequestWebhook_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go b/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go new file mode 100644 index 0000000..45003c9 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type PullRequestWebhook_squash_merge_commit_message int + +const ( + PR_BODY_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE PullRequestWebhook_squash_merge_commit_message = iota + COMMIT_MESSAGES_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i PullRequestWebhook_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParsePullRequestWebhook_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown PullRequestWebhook_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_squash_merge_commit_message(values []PullRequestWebhook_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go b/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go new file mode 100644 index 0000000..6247b09 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type PullRequestWebhook_squash_merge_commit_title int + +const ( + PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE PullRequestWebhook_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE +) + +func (i PullRequestWebhook_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParsePullRequestWebhook_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown PullRequestWebhook_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_squash_merge_commit_title(values []PullRequestWebhook_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rate_limit.go b/pkg/github/models/rate_limit.go new file mode 100644 index 0000000..36cbe71 --- /dev/null +++ b/pkg/github/models/rate_limit.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RateLimit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The limit property + limit *int32 + // The remaining property + remaining *int32 + // The reset property + reset *int32 + // The used property + used *int32 +} +// NewRateLimit instantiates a new RateLimit and sets the default values. +func NewRateLimit()(*RateLimit) { + m := &RateLimit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRateLimitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRateLimitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRateLimit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RateLimit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RateLimit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLimit(val) + } + return nil + } + res["remaining"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemaining(val) + } + return nil + } + res["reset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReset(val) + } + return nil + } + res["used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsed(val) + } + return nil + } + return res +} +// GetLimit gets the limit property value. The limit property +// returns a *int32 when successful +func (m *RateLimit) GetLimit()(*int32) { + return m.limit +} +// GetRemaining gets the remaining property value. The remaining property +// returns a *int32 when successful +func (m *RateLimit) GetRemaining()(*int32) { + return m.remaining +} +// GetReset gets the reset property value. The reset property +// returns a *int32 when successful +func (m *RateLimit) GetReset()(*int32) { + return m.reset +} +// GetUsed gets the used property value. The used property +// returns a *int32 when successful +func (m *RateLimit) GetUsed()(*int32) { + return m.used +} +// Serialize serializes information the current object +func (m *RateLimit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("limit", m.GetLimit()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("remaining", m.GetRemaining()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("reset", m.GetReset()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("used", m.GetUsed()) + 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 *RateLimit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLimit sets the limit property value. The limit property +func (m *RateLimit) SetLimit(value *int32)() { + m.limit = value +} +// SetRemaining sets the remaining property value. The remaining property +func (m *RateLimit) SetRemaining(value *int32)() { + m.remaining = value +} +// SetReset sets the reset property value. The reset property +func (m *RateLimit) SetReset(value *int32)() { + m.reset = value +} +// SetUsed sets the used property value. The used property +func (m *RateLimit) SetUsed(value *int32)() { + m.used = value +} +type RateLimitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLimit()(*int32) + GetRemaining()(*int32) + GetReset()(*int32) + GetUsed()(*int32) + SetLimit(value *int32)() + SetRemaining(value *int32)() + SetReset(value *int32)() + SetUsed(value *int32)() +} diff --git a/pkg/github/models/rate_limit_overview.go b/pkg/github/models/rate_limit_overview.go new file mode 100644 index 0000000..edb978c --- /dev/null +++ b/pkg/github/models/rate_limit_overview.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RateLimitOverview rate Limit Overview +type RateLimitOverview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The rate property + rate RateLimitable + // The resources property + resources RateLimitOverview_resourcesable +} +// NewRateLimitOverview instantiates a new RateLimitOverview and sets the default values. +func NewRateLimitOverview()(*RateLimitOverview) { + m := &RateLimitOverview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRateLimitOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRateLimitOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRateLimitOverview(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RateLimitOverview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RateLimitOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["rate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRate(val.(RateLimitable)) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitOverview_resourcesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResources(val.(RateLimitOverview_resourcesable)) + } + return nil + } + return res +} +// GetRate gets the rate property value. The rate property +// returns a RateLimitable when successful +func (m *RateLimitOverview) GetRate()(RateLimitable) { + return m.rate +} +// GetResources gets the resources property value. The resources property +// returns a RateLimitOverview_resourcesable when successful +func (m *RateLimitOverview) GetResources()(RateLimitOverview_resourcesable) { + return m.resources +} +// Serialize serializes information the current object +func (m *RateLimitOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("rate", m.GetRate()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("resources", m.GetResources()) + 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 *RateLimitOverview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRate sets the rate property value. The rate property +func (m *RateLimitOverview) SetRate(value RateLimitable)() { + m.rate = value +} +// SetResources sets the resources property value. The resources property +func (m *RateLimitOverview) SetResources(value RateLimitOverview_resourcesable)() { + m.resources = value +} +type RateLimitOverviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRate()(RateLimitable) + GetResources()(RateLimitOverview_resourcesable) + SetRate(value RateLimitable)() + SetResources(value RateLimitOverview_resourcesable)() +} diff --git a/pkg/github/models/rate_limit_overview_resources.go b/pkg/github/models/rate_limit_overview_resources.go new file mode 100644 index 0000000..71805c3 --- /dev/null +++ b/pkg/github/models/rate_limit_overview_resources.go @@ -0,0 +1,341 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RateLimitOverview_resources struct { + // The actions_runner_registration property + actions_runner_registration RateLimitable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code_scanning_upload property + code_scanning_upload RateLimitable + // The code_search property + code_search RateLimitable + // The core property + core RateLimitable + // The dependency_snapshots property + dependency_snapshots RateLimitable + // The graphql property + graphql RateLimitable + // The integration_manifest property + integration_manifest RateLimitable + // The scim property + scim RateLimitable + // The search property + search RateLimitable + // The source_import property + source_import RateLimitable +} +// NewRateLimitOverview_resources instantiates a new RateLimitOverview_resources and sets the default values. +func NewRateLimitOverview_resources()(*RateLimitOverview_resources) { + m := &RateLimitOverview_resources{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRateLimitOverview_resourcesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRateLimitOverview_resourcesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRateLimitOverview_resources(), nil +} +// GetActionsRunnerRegistration gets the actions_runner_registration property value. The actions_runner_registration property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetActionsRunnerRegistration()(RateLimitable) { + return m.actions_runner_registration +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RateLimitOverview_resources) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodeScanningUpload gets the code_scanning_upload property value. The code_scanning_upload property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetCodeScanningUpload()(RateLimitable) { + return m.code_scanning_upload +} +// GetCodeSearch gets the code_search property value. The code_search property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetCodeSearch()(RateLimitable) { + return m.code_search +} +// GetCore gets the core property value. The core property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetCore()(RateLimitable) { + return m.core +} +// GetDependencySnapshots gets the dependency_snapshots property value. The dependency_snapshots property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetDependencySnapshots()(RateLimitable) { + return m.dependency_snapshots +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RateLimitOverview_resources) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions_runner_registration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActionsRunnerRegistration(val.(RateLimitable)) + } + return nil + } + res["code_scanning_upload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeScanningUpload(val.(RateLimitable)) + } + return nil + } + res["code_search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeSearch(val.(RateLimitable)) + } + return nil + } + res["core"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCore(val.(RateLimitable)) + } + return nil + } + res["dependency_snapshots"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependencySnapshots(val.(RateLimitable)) + } + return nil + } + res["graphql"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGraphql(val.(RateLimitable)) + } + return nil + } + res["integration_manifest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIntegrationManifest(val.(RateLimitable)) + } + return nil + } + res["scim"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScim(val.(RateLimitable)) + } + return nil + } + res["search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSearch(val.(RateLimitable)) + } + return nil + } + res["source_import"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceImport(val.(RateLimitable)) + } + return nil + } + return res +} +// GetGraphql gets the graphql property value. The graphql property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetGraphql()(RateLimitable) { + return m.graphql +} +// GetIntegrationManifest gets the integration_manifest property value. The integration_manifest property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetIntegrationManifest()(RateLimitable) { + return m.integration_manifest +} +// GetScim gets the scim property value. The scim property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetScim()(RateLimitable) { + return m.scim +} +// GetSearch gets the search property value. The search property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetSearch()(RateLimitable) { + return m.search +} +// GetSourceImport gets the source_import property value. The source_import property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetSourceImport()(RateLimitable) { + return m.source_import +} +// Serialize serializes information the current object +func (m *RateLimitOverview_resources) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actions_runner_registration", m.GetActionsRunnerRegistration()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("code_scanning_upload", m.GetCodeScanningUpload()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("code_search", m.GetCodeSearch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("core", m.GetCore()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dependency_snapshots", m.GetDependencySnapshots()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("graphql", m.GetGraphql()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("integration_manifest", m.GetIntegrationManifest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("scim", m.GetScim()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("search", m.GetSearch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("source_import", m.GetSourceImport()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionsRunnerRegistration sets the actions_runner_registration property value. The actions_runner_registration property +func (m *RateLimitOverview_resources) SetActionsRunnerRegistration(value RateLimitable)() { + m.actions_runner_registration = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RateLimitOverview_resources) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodeScanningUpload sets the code_scanning_upload property value. The code_scanning_upload property +func (m *RateLimitOverview_resources) SetCodeScanningUpload(value RateLimitable)() { + m.code_scanning_upload = value +} +// SetCodeSearch sets the code_search property value. The code_search property +func (m *RateLimitOverview_resources) SetCodeSearch(value RateLimitable)() { + m.code_search = value +} +// SetCore sets the core property value. The core property +func (m *RateLimitOverview_resources) SetCore(value RateLimitable)() { + m.core = value +} +// SetDependencySnapshots sets the dependency_snapshots property value. The dependency_snapshots property +func (m *RateLimitOverview_resources) SetDependencySnapshots(value RateLimitable)() { + m.dependency_snapshots = value +} +// SetGraphql sets the graphql property value. The graphql property +func (m *RateLimitOverview_resources) SetGraphql(value RateLimitable)() { + m.graphql = value +} +// SetIntegrationManifest sets the integration_manifest property value. The integration_manifest property +func (m *RateLimitOverview_resources) SetIntegrationManifest(value RateLimitable)() { + m.integration_manifest = value +} +// SetScim sets the scim property value. The scim property +func (m *RateLimitOverview_resources) SetScim(value RateLimitable)() { + m.scim = value +} +// SetSearch sets the search property value. The search property +func (m *RateLimitOverview_resources) SetSearch(value RateLimitable)() { + m.search = value +} +// SetSourceImport sets the source_import property value. The source_import property +func (m *RateLimitOverview_resources) SetSourceImport(value RateLimitable)() { + m.source_import = value +} +type RateLimitOverview_resourcesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionsRunnerRegistration()(RateLimitable) + GetCodeScanningUpload()(RateLimitable) + GetCodeSearch()(RateLimitable) + GetCore()(RateLimitable) + GetDependencySnapshots()(RateLimitable) + GetGraphql()(RateLimitable) + GetIntegrationManifest()(RateLimitable) + GetScim()(RateLimitable) + GetSearch()(RateLimitable) + GetSourceImport()(RateLimitable) + SetActionsRunnerRegistration(value RateLimitable)() + SetCodeScanningUpload(value RateLimitable)() + SetCodeSearch(value RateLimitable)() + SetCore(value RateLimitable)() + SetDependencySnapshots(value RateLimitable)() + SetGraphql(value RateLimitable)() + SetIntegrationManifest(value RateLimitable)() + SetScim(value RateLimitable)() + SetSearch(value RateLimitable)() + SetSourceImport(value RateLimitable)() +} diff --git a/pkg/github/models/reaction.go b/pkg/github/models/reaction.go new file mode 100644 index 0000000..058d438 --- /dev/null +++ b/pkg/github/models/reaction.go @@ -0,0 +1,199 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Reaction reactions to conversations provide a way to help people express their feelings more simply and effectively. +type Reaction struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The reaction to use + content *Reaction_content + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int32 + // The node_id property + node_id *string + // A GitHub user. + user NullableSimpleUserable +} +// NewReaction instantiates a new Reaction and sets the default values. +func NewReaction()(*Reaction) { + m := &Reaction{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReactionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReactionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReaction(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Reaction) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContent gets the content property value. The reaction to use +// returns a *Reaction_content when successful +func (m *Reaction) GetContent()(*Reaction_content) { + return m.content +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Reaction) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Reaction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReaction_content) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(*Reaction_content)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Reaction) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Reaction) GetNodeId()(*string) { + return m.node_id +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Reaction) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *Reaction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContent() != nil { + cast := (*m.GetContent()).String() + err := writer.WriteStringValue("content", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *Reaction) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContent sets the content property value. The reaction to use +func (m *Reaction) SetContent(value *Reaction_content)() { + m.content = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Reaction) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *Reaction) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Reaction) SetNodeId(value *string)() { + m.node_id = value +} +// SetUser sets the user property value. A GitHub user. +func (m *Reaction) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type Reactionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*Reaction_content) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetNodeId()(*string) + GetUser()(NullableSimpleUserable) + SetContent(value *Reaction_content)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetNodeId(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/reaction_content.go b/pkg/github/models/reaction_content.go new file mode 100644 index 0000000..070a556 --- /dev/null +++ b/pkg/github/models/reaction_content.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// The reaction to use +type Reaction_content int + +const ( + PLUS_1_REACTION_CONTENT Reaction_content = iota + MINUS_1_REACTION_CONTENT + LAUGH_REACTION_CONTENT + CONFUSED_REACTION_CONTENT + HEART_REACTION_CONTENT + HOORAY_REACTION_CONTENT + ROCKET_REACTION_CONTENT + EYES_REACTION_CONTENT +) + +func (i Reaction_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReaction_content(v string) (any, error) { + result := PLUS_1_REACTION_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTION_CONTENT + case "-1": + result = MINUS_1_REACTION_CONTENT + case "laugh": + result = LAUGH_REACTION_CONTENT + case "confused": + result = CONFUSED_REACTION_CONTENT + case "heart": + result = HEART_REACTION_CONTENT + case "hooray": + result = HOORAY_REACTION_CONTENT + case "rocket": + result = ROCKET_REACTION_CONTENT + case "eyes": + result = EYES_REACTION_CONTENT + default: + return 0, errors.New("Unknown Reaction_content value: " + v) + } + return &result, nil +} +func SerializeReaction_content(values []Reaction_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Reaction_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/reaction_rollup.go b/pkg/github/models/reaction_rollup.go new file mode 100644 index 0000000..9b51070 --- /dev/null +++ b/pkg/github/models/reaction_rollup.go @@ -0,0 +1,341 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ReactionRollup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The confused property + confused *int32 + // The eyes property + eyes *int32 + // The heart property + heart *int32 + // The hooray property + hooray *int32 + // The laugh property + laugh *int32 + // The minus_1 property + minus_1 *int32 + // The plus_1 property + plus_1 *int32 + // The rocket property + rocket *int32 + // The total_count property + total_count *int32 + // The url property + url *string +} +// NewReactionRollup instantiates a new ReactionRollup and sets the default values. +func NewReactionRollup()(*ReactionRollup) { + m := &ReactionRollup{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReactionRollupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReactionRollupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReactionRollup(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReactionRollup) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfused gets the confused property value. The confused property +// returns a *int32 when successful +func (m *ReactionRollup) GetConfused()(*int32) { + return m.confused +} +// GetEyes gets the eyes property value. The eyes property +// returns a *int32 when successful +func (m *ReactionRollup) GetEyes()(*int32) { + return m.eyes +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReactionRollup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confused"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfused(val) + } + return nil + } + res["eyes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEyes(val) + } + return nil + } + res["heart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHeart(val) + } + return nil + } + res["hooray"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHooray(val) + } + return nil + } + res["laugh"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLaugh(val) + } + return nil + } + res["-1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinus1(val) + } + return nil + } + res["+1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPlus1(val) + } + return nil + } + res["rocket"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRocket(val) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHeart gets the heart property value. The heart property +// returns a *int32 when successful +func (m *ReactionRollup) GetHeart()(*int32) { + return m.heart +} +// GetHooray gets the hooray property value. The hooray property +// returns a *int32 when successful +func (m *ReactionRollup) GetHooray()(*int32) { + return m.hooray +} +// GetLaugh gets the laugh property value. The laugh property +// returns a *int32 when successful +func (m *ReactionRollup) GetLaugh()(*int32) { + return m.laugh +} +// GetMinus1 gets the -1 property value. The minus_1 property +// returns a *int32 when successful +func (m *ReactionRollup) GetMinus1()(*int32) { + return m.minus_1 +} +// GetPlus1 gets the +1 property value. The plus_1 property +// returns a *int32 when successful +func (m *ReactionRollup) GetPlus1()(*int32) { + return m.plus_1 +} +// GetRocket gets the rocket property value. The rocket property +// returns a *int32 when successful +func (m *ReactionRollup) GetRocket()(*int32) { + return m.rocket +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ReactionRollup) GetTotalCount()(*int32) { + return m.total_count +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ReactionRollup) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ReactionRollup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("confused", m.GetConfused()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("eyes", m.GetEyes()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("heart", m.GetHeart()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("hooray", m.GetHooray()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("laugh", m.GetLaugh()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("-1", m.GetMinus1()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("+1", m.GetPlus1()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("rocket", m.GetRocket()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ReactionRollup) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfused sets the confused property value. The confused property +func (m *ReactionRollup) SetConfused(value *int32)() { + m.confused = value +} +// SetEyes sets the eyes property value. The eyes property +func (m *ReactionRollup) SetEyes(value *int32)() { + m.eyes = value +} +// SetHeart sets the heart property value. The heart property +func (m *ReactionRollup) SetHeart(value *int32)() { + m.heart = value +} +// SetHooray sets the hooray property value. The hooray property +func (m *ReactionRollup) SetHooray(value *int32)() { + m.hooray = value +} +// SetLaugh sets the laugh property value. The laugh property +func (m *ReactionRollup) SetLaugh(value *int32)() { + m.laugh = value +} +// SetMinus1 sets the -1 property value. The minus_1 property +func (m *ReactionRollup) SetMinus1(value *int32)() { + m.minus_1 = value +} +// SetPlus1 sets the +1 property value. The plus_1 property +func (m *ReactionRollup) SetPlus1(value *int32)() { + m.plus_1 = value +} +// SetRocket sets the rocket property value. The rocket property +func (m *ReactionRollup) SetRocket(value *int32)() { + m.rocket = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ReactionRollup) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetUrl sets the url property value. The url property +func (m *ReactionRollup) SetUrl(value *string)() { + m.url = value +} +type ReactionRollupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfused()(*int32) + GetEyes()(*int32) + GetHeart()(*int32) + GetHooray()(*int32) + GetLaugh()(*int32) + GetMinus1()(*int32) + GetPlus1()(*int32) + GetRocket()(*int32) + GetTotalCount()(*int32) + GetUrl()(*string) + SetConfused(value *int32)() + SetEyes(value *int32)() + SetHeart(value *int32)() + SetHooray(value *int32)() + SetLaugh(value *int32)() + SetMinus1(value *int32)() + SetPlus1(value *int32)() + SetRocket(value *int32)() + SetTotalCount(value *int32)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/referenced_workflow.go b/pkg/github/models/referenced_workflow.go new file mode 100644 index 0000000..7b75833 --- /dev/null +++ b/pkg/github/models/referenced_workflow.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferencedWorkflow a workflow referenced/reused by the initial caller workflow +type ReferencedWorkflow struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The path property + path *string + // The ref property + ref *string + // The sha property + sha *string +} +// NewReferencedWorkflow instantiates a new ReferencedWorkflow and sets the default values. +func NewReferencedWorkflow()(*ReferencedWorkflow) { + m := &ReferencedWorkflow{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReferencedWorkflowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReferencedWorkflowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReferencedWorkflow(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReferencedWorkflow) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReferencedWorkflow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ReferencedWorkflow) GetPath()(*string) { + return m.path +} +// GetRef gets the ref property value. The ref property +// returns a *string when successful +func (m *ReferencedWorkflow) GetRef()(*string) { + return m.ref +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *ReferencedWorkflow) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ReferencedWorkflow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ReferencedWorkflow) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPath sets the path property value. The path property +func (m *ReferencedWorkflow) SetPath(value *string)() { + m.path = value +} +// SetRef sets the ref property value. The ref property +func (m *ReferencedWorkflow) SetRef(value *string)() { + m.ref = value +} +// SetSha sets the sha property value. The sha property +func (m *ReferencedWorkflow) SetSha(value *string)() { + m.sha = value +} +type ReferencedWorkflowable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPath()(*string) + GetRef()(*string) + GetSha()(*string) + SetPath(value *string)() + SetRef(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/models/referrer_traffic.go b/pkg/github/models/referrer_traffic.go new file mode 100644 index 0000000..a463ab4 --- /dev/null +++ b/pkg/github/models/referrer_traffic.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferrerTraffic referrer Traffic +type ReferrerTraffic struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The count property + count *int32 + // The referrer property + referrer *string + // The uniques property + uniques *int32 +} +// NewReferrerTraffic instantiates a new ReferrerTraffic and sets the default values. +func NewReferrerTraffic()(*ReferrerTraffic) { + m := &ReferrerTraffic{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReferrerTrafficFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReferrerTrafficFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReferrerTraffic(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReferrerTraffic) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCount gets the count property value. The count property +// returns a *int32 when successful +func (m *ReferrerTraffic) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReferrerTraffic) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + res["referrer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferrer(val) + } + return nil + } + res["uniques"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniques(val) + } + return nil + } + return res +} +// GetReferrer gets the referrer property value. The referrer property +// returns a *string when successful +func (m *ReferrerTraffic) GetReferrer()(*string) { + return m.referrer +} +// GetUniques gets the uniques property value. The uniques property +// returns a *int32 when successful +func (m *ReferrerTraffic) GetUniques()(*int32) { + return m.uniques +} +// Serialize serializes information the current object +func (m *ReferrerTraffic) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("referrer", m.GetReferrer()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniques", m.GetUniques()) + 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 *ReferrerTraffic) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCount sets the count property value. The count property +func (m *ReferrerTraffic) SetCount(value *int32)() { + m.count = value +} +// SetReferrer sets the referrer property value. The referrer property +func (m *ReferrerTraffic) SetReferrer(value *string)() { + m.referrer = value +} +// SetUniques sets the uniques property value. The uniques property +func (m *ReferrerTraffic) SetUniques(value *int32)() { + m.uniques = value +} +type ReferrerTrafficable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCount()(*int32) + GetReferrer()(*string) + GetUniques()(*int32) + SetCount(value *int32)() + SetReferrer(value *string)() + SetUniques(value *int32)() +} diff --git a/pkg/github/models/release.go b/pkg/github/models/release.go new file mode 100644 index 0000000..5f945d7 --- /dev/null +++ b/pkg/github/models/release.go @@ -0,0 +1,732 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Release a release. +type Release struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The assets property + assets []ReleaseAssetable + // The assets_url property + assets_url *string + // A GitHub user. + author SimpleUserable + // The body property + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The URL of the release discussion. + discussion_url *string + // true to create a draft (unpublished) release, false to create a published one. + draft *bool + // The html_url property + html_url *string + // The id property + id *int32 + // The mentions_count property + mentions_count *int32 + // The name property + name *string + // The node_id property + node_id *string + // Whether to identify the release as a prerelease or a full release. + prerelease *bool + // The published_at property + published_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The reactions property + reactions ReactionRollupable + // The name of the tag. + tag_name *string + // The tarball_url property + tarball_url *string + // Specifies the commitish value that determines where the Git tag is created from. + target_commitish *string + // The upload_url property + upload_url *string + // The url property + url *string + // The zipball_url property + zipball_url *string +} +// NewRelease instantiates a new Release and sets the default values. +func NewRelease()(*Release) { + m := &Release{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReleaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReleaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelease(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Release) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssets gets the assets property value. The assets property +// returns a []ReleaseAssetable when successful +func (m *Release) GetAssets()([]ReleaseAssetable) { + return m.assets +} +// GetAssetsUrl gets the assets_url property value. The assets_url property +// returns a *string when successful +func (m *Release) GetAssetsUrl()(*string) { + return m.assets_url +} +// GetAuthor gets the author property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *Release) GetAuthor()(SimpleUserable) { + return m.author +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *Release) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *Release) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *Release) GetBodyText()(*string) { + return m.body_text +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Release) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiscussionUrl gets the discussion_url property value. The URL of the release discussion. +// returns a *string when successful +func (m *Release) GetDiscussionUrl()(*string) { + return m.discussion_url +} +// GetDraft gets the draft property value. true to create a draft (unpublished) release, false to create a published one. +// returns a *bool when successful +func (m *Release) GetDraft()(*bool) { + return m.draft +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Release) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReleaseAssetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReleaseAssetable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ReleaseAssetable) + } + } + m.SetAssets(res) + } + return nil + } + res["assets_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssetsUrl(val) + } + return nil + } + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(SimpleUserable)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["discussion_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionUrl(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["mentions_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMentionsCount(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["prerelease"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrerelease(val) + } + return nil + } + res["published_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedAt(val) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["tag_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagName(val) + } + return nil + } + res["tarball_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarballUrl(val) + } + return nil + } + res["target_commitish"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetCommitish(val) + } + return nil + } + res["upload_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["zipball_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetZipballUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Release) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Release) GetId()(*int32) { + return m.id +} +// GetMentionsCount gets the mentions_count property value. The mentions_count property +// returns a *int32 when successful +func (m *Release) GetMentionsCount()(*int32) { + return m.mentions_count +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Release) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Release) GetNodeId()(*string) { + return m.node_id +} +// GetPrerelease gets the prerelease property value. Whether to identify the release as a prerelease or a full release. +// returns a *bool when successful +func (m *Release) GetPrerelease()(*bool) { + return m.prerelease +} +// GetPublishedAt gets the published_at property value. The published_at property +// returns a *Time when successful +func (m *Release) GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.published_at +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *Release) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetTagName gets the tag_name property value. The name of the tag. +// returns a *string when successful +func (m *Release) GetTagName()(*string) { + return m.tag_name +} +// GetTarballUrl gets the tarball_url property value. The tarball_url property +// returns a *string when successful +func (m *Release) GetTarballUrl()(*string) { + return m.tarball_url +} +// GetTargetCommitish gets the target_commitish property value. Specifies the commitish value that determines where the Git tag is created from. +// returns a *string when successful +func (m *Release) GetTargetCommitish()(*string) { + return m.target_commitish +} +// GetUploadUrl gets the upload_url property value. The upload_url property +// returns a *string when successful +func (m *Release) GetUploadUrl()(*string) { + return m.upload_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Release) GetUrl()(*string) { + return m.url +} +// GetZipballUrl gets the zipball_url property value. The zipball_url property +// returns a *string when successful +func (m *Release) GetZipballUrl()(*string) { + return m.zipball_url +} +// Serialize serializes information the current object +func (m *Release) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssets())) + for i, v := range m.GetAssets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("assets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assets_url", m.GetAssetsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("discussion_url", m.GetDiscussionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mentions_count", m.GetMentionsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prerelease", m.GetPrerelease()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("published_at", m.GetPublishedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tag_name", m.GetTagName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tarball_url", m.GetTarballUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_commitish", m.GetTargetCommitish()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("upload_url", m.GetUploadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("zipball_url", m.GetZipballUrl()) + 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 *Release) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssets sets the assets property value. The assets property +func (m *Release) SetAssets(value []ReleaseAssetable)() { + m.assets = value +} +// SetAssetsUrl sets the assets_url property value. The assets_url property +func (m *Release) SetAssetsUrl(value *string)() { + m.assets_url = value +} +// SetAuthor sets the author property value. A GitHub user. +func (m *Release) SetAuthor(value SimpleUserable)() { + m.author = value +} +// SetBody sets the body property value. The body property +func (m *Release) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *Release) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *Release) SetBodyText(value *string)() { + m.body_text = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Release) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiscussionUrl sets the discussion_url property value. The URL of the release discussion. +func (m *Release) SetDiscussionUrl(value *string)() { + m.discussion_url = value +} +// SetDraft sets the draft property value. true to create a draft (unpublished) release, false to create a published one. +func (m *Release) SetDraft(value *bool)() { + m.draft = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Release) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Release) SetId(value *int32)() { + m.id = value +} +// SetMentionsCount sets the mentions_count property value. The mentions_count property +func (m *Release) SetMentionsCount(value *int32)() { + m.mentions_count = value +} +// SetName sets the name property value. The name property +func (m *Release) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Release) SetNodeId(value *string)() { + m.node_id = value +} +// SetPrerelease sets the prerelease property value. Whether to identify the release as a prerelease or a full release. +func (m *Release) SetPrerelease(value *bool)() { + m.prerelease = value +} +// SetPublishedAt sets the published_at property value. The published_at property +func (m *Release) SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.published_at = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *Release) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetTagName sets the tag_name property value. The name of the tag. +func (m *Release) SetTagName(value *string)() { + m.tag_name = value +} +// SetTarballUrl sets the tarball_url property value. The tarball_url property +func (m *Release) SetTarballUrl(value *string)() { + m.tarball_url = value +} +// SetTargetCommitish sets the target_commitish property value. Specifies the commitish value that determines where the Git tag is created from. +func (m *Release) SetTargetCommitish(value *string)() { + m.target_commitish = value +} +// SetUploadUrl sets the upload_url property value. The upload_url property +func (m *Release) SetUploadUrl(value *string)() { + m.upload_url = value +} +// SetUrl sets the url property value. The url property +func (m *Release) SetUrl(value *string)() { + m.url = value +} +// SetZipballUrl sets the zipball_url property value. The zipball_url property +func (m *Release) SetZipballUrl(value *string)() { + m.zipball_url = value +} +type Releaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssets()([]ReleaseAssetable) + GetAssetsUrl()(*string) + GetAuthor()(SimpleUserable) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiscussionUrl()(*string) + GetDraft()(*bool) + GetHtmlUrl()(*string) + GetId()(*int32) + GetMentionsCount()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetPrerelease()(*bool) + GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReactions()(ReactionRollupable) + GetTagName()(*string) + GetTarballUrl()(*string) + GetTargetCommitish()(*string) + GetUploadUrl()(*string) + GetUrl()(*string) + GetZipballUrl()(*string) + SetAssets(value []ReleaseAssetable)() + SetAssetsUrl(value *string)() + SetAuthor(value SimpleUserable)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiscussionUrl(value *string)() + SetDraft(value *bool)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetMentionsCount(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetPrerelease(value *bool)() + SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReactions(value ReactionRollupable)() + SetTagName(value *string)() + SetTarballUrl(value *string)() + SetTargetCommitish(value *string)() + SetUploadUrl(value *string)() + SetUrl(value *string)() + SetZipballUrl(value *string)() +} diff --git a/pkg/github/models/release_asset.go b/pkg/github/models/release_asset.go new file mode 100644 index 0000000..019e884 --- /dev/null +++ b/pkg/github/models/release_asset.go @@ -0,0 +1,431 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReleaseAsset data related to a release. +type ReleaseAsset struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The browser_download_url property + browser_download_url *string + // The content_type property + content_type *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The download_count property + download_count *int32 + // The id property + id *int32 + // The label property + label *string + // The file name of the asset. + name *string + // The node_id property + node_id *string + // The size property + size *int32 + // State of the release asset. + state *ReleaseAsset_state + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + uploader NullableSimpleUserable + // The url property + url *string +} +// NewReleaseAsset instantiates a new ReleaseAsset and sets the default values. +func NewReleaseAsset()(*ReleaseAsset) { + m := &ReleaseAsset{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReleaseAssetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReleaseAssetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReleaseAsset(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReleaseAsset) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBrowserDownloadUrl gets the browser_download_url property value. The browser_download_url property +// returns a *string when successful +func (m *ReleaseAsset) GetBrowserDownloadUrl()(*string) { + return m.browser_download_url +} +// GetContentType gets the content_type property value. The content_type property +// returns a *string when successful +func (m *ReleaseAsset) GetContentType()(*string) { + return m.content_type +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ReleaseAsset) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDownloadCount gets the download_count property value. The download_count property +// returns a *int32 when successful +func (m *ReleaseAsset) GetDownloadCount()(*int32) { + return m.download_count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReleaseAsset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["browser_download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBrowserDownloadUrl(val) + } + return nil + } + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["download_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDownloadCount(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReleaseAsset_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ReleaseAsset_state)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["uploader"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUploader(val.(NullableSimpleUserable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ReleaseAsset) GetId()(*int32) { + return m.id +} +// GetLabel gets the label property value. The label property +// returns a *string when successful +func (m *ReleaseAsset) GetLabel()(*string) { + return m.label +} +// GetName gets the name property value. The file name of the asset. +// returns a *string when successful +func (m *ReleaseAsset) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ReleaseAsset) GetNodeId()(*string) { + return m.node_id +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *ReleaseAsset) GetSize()(*int32) { + return m.size +} +// GetState gets the state property value. State of the release asset. +// returns a *ReleaseAsset_state when successful +func (m *ReleaseAsset) GetState()(*ReleaseAsset_state) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *ReleaseAsset) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUploader gets the uploader property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *ReleaseAsset) GetUploader()(NullableSimpleUserable) { + return m.uploader +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ReleaseAsset) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ReleaseAsset) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("browser_download_url", m.GetBrowserDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("download_count", m.GetDownloadCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("uploader", m.GetUploader()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ReleaseAsset) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBrowserDownloadUrl sets the browser_download_url property value. The browser_download_url property +func (m *ReleaseAsset) SetBrowserDownloadUrl(value *string)() { + m.browser_download_url = value +} +// SetContentType sets the content_type property value. The content_type property +func (m *ReleaseAsset) SetContentType(value *string)() { + m.content_type = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ReleaseAsset) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDownloadCount sets the download_count property value. The download_count property +func (m *ReleaseAsset) SetDownloadCount(value *int32)() { + m.download_count = value +} +// SetId sets the id property value. The id property +func (m *ReleaseAsset) SetId(value *int32)() { + m.id = value +} +// SetLabel sets the label property value. The label property +func (m *ReleaseAsset) SetLabel(value *string)() { + m.label = value +} +// SetName sets the name property value. The file name of the asset. +func (m *ReleaseAsset) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ReleaseAsset) SetNodeId(value *string)() { + m.node_id = value +} +// SetSize sets the size property value. The size property +func (m *ReleaseAsset) SetSize(value *int32)() { + m.size = value +} +// SetState sets the state property value. State of the release asset. +func (m *ReleaseAsset) SetState(value *ReleaseAsset_state)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *ReleaseAsset) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUploader sets the uploader property value. A GitHub user. +func (m *ReleaseAsset) SetUploader(value NullableSimpleUserable)() { + m.uploader = value +} +// SetUrl sets the url property value. The url property +func (m *ReleaseAsset) SetUrl(value *string)() { + m.url = value +} +type ReleaseAssetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBrowserDownloadUrl()(*string) + GetContentType()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDownloadCount()(*int32) + GetId()(*int32) + GetLabel()(*string) + GetName()(*string) + GetNodeId()(*string) + GetSize()(*int32) + GetState()(*ReleaseAsset_state) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUploader()(NullableSimpleUserable) + GetUrl()(*string) + SetBrowserDownloadUrl(value *string)() + SetContentType(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDownloadCount(value *int32)() + SetId(value *int32)() + SetLabel(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetSize(value *int32)() + SetState(value *ReleaseAsset_state)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUploader(value NullableSimpleUserable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/release_asset_state.go b/pkg/github/models/release_asset_state.go new file mode 100644 index 0000000..49e5417 --- /dev/null +++ b/pkg/github/models/release_asset_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// State of the release asset. +type ReleaseAsset_state int + +const ( + UPLOADED_RELEASEASSET_STATE ReleaseAsset_state = iota + OPEN_RELEASEASSET_STATE +) + +func (i ReleaseAsset_state) String() string { + return []string{"uploaded", "open"}[i] +} +func ParseReleaseAsset_state(v string) (any, error) { + result := UPLOADED_RELEASEASSET_STATE + switch v { + case "uploaded": + result = UPLOADED_RELEASEASSET_STATE + case "open": + result = OPEN_RELEASEASSET_STATE + default: + return 0, errors.New("Unknown ReleaseAsset_state value: " + v) + } + return &result, nil +} +func SerializeReleaseAsset_state(values []ReleaseAsset_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReleaseAsset_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/release_notes_content.go b/pkg/github/models/release_notes_content.go new file mode 100644 index 0000000..30f4b09 --- /dev/null +++ b/pkg/github/models/release_notes_content.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReleaseNotesContent generated name and body describing a release +type ReleaseNotesContent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The generated body describing the contents of the release supporting markdown formatting + body *string + // The generated name of the release + name *string +} +// NewReleaseNotesContent instantiates a new ReleaseNotesContent and sets the default values. +func NewReleaseNotesContent()(*ReleaseNotesContent) { + m := &ReleaseNotesContent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReleaseNotesContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReleaseNotesContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReleaseNotesContent(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReleaseNotesContent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The generated body describing the contents of the release supporting markdown formatting +// returns a *string when successful +func (m *ReleaseNotesContent) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReleaseNotesContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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 + } + return res +} +// GetName gets the name property value. The generated name of the release +// returns a *string when successful +func (m *ReleaseNotesContent) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ReleaseNotesContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ReleaseNotesContent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The generated body describing the contents of the release supporting markdown formatting +func (m *ReleaseNotesContent) SetBody(value *string)() { + m.body = value +} +// SetName sets the name property value. The generated name of the release +func (m *ReleaseNotesContent) SetName(value *string)() { + m.name = value +} +type ReleaseNotesContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetName()(*string) + SetBody(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/removed_from_project_issue_event.go b/pkg/github/models/removed_from_project_issue_event.go new file mode 100644 index 0000000..a88a624 --- /dev/null +++ b/pkg/github/models/removed_from_project_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemovedFromProjectIssueEvent removed from Project Issue Event +type RemovedFromProjectIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The project_card property + project_card RemovedFromProjectIssueEvent_project_cardable + // The url property + url *string +} +// NewRemovedFromProjectIssueEvent instantiates a new RemovedFromProjectIssueEvent and sets the default values. +func NewRemovedFromProjectIssueEvent()(*RemovedFromProjectIssueEvent) { + m := &RemovedFromProjectIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRemovedFromProjectIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRemovedFromProjectIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemovedFromProjectIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *RemovedFromProjectIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RemovedFromProjectIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RemovedFromProjectIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["project_card"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRemovedFromProjectIssueEvent_project_cardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProjectCard(val.(RemovedFromProjectIssueEvent_project_cardable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *RemovedFromProjectIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *RemovedFromProjectIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetProjectCard gets the project_card property value. The project_card property +// returns a RemovedFromProjectIssueEvent_project_cardable when successful +func (m *RemovedFromProjectIssueEvent) GetProjectCard()(RemovedFromProjectIssueEvent_project_cardable) { + return m.project_card +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *RemovedFromProjectIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("project_card", m.GetProjectCard()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *RemovedFromProjectIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RemovedFromProjectIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *RemovedFromProjectIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *RemovedFromProjectIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RemovedFromProjectIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *RemovedFromProjectIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *RemovedFromProjectIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *RemovedFromProjectIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *RemovedFromProjectIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetProjectCard sets the project_card property value. The project_card property +func (m *RemovedFromProjectIssueEvent) SetProjectCard(value RemovedFromProjectIssueEvent_project_cardable)() { + m.project_card = value +} +// SetUrl sets the url property value. The url property +func (m *RemovedFromProjectIssueEvent) SetUrl(value *string)() { + m.url = value +} +type RemovedFromProjectIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetProjectCard()(RemovedFromProjectIssueEvent_project_cardable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetProjectCard(value RemovedFromProjectIssueEvent_project_cardable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/removed_from_project_issue_event_project_card.go b/pkg/github/models/removed_from_project_issue_event_project_card.go new file mode 100644 index 0000000..23745ae --- /dev/null +++ b/pkg/github/models/removed_from_project_issue_event_project_card.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RemovedFromProjectIssueEvent_project_card struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The column_name property + column_name *string + // The id property + id *int32 + // The previous_column_name property + previous_column_name *string + // The project_id property + project_id *int32 + // The project_url property + project_url *string + // The url property + url *string +} +// NewRemovedFromProjectIssueEvent_project_card instantiates a new RemovedFromProjectIssueEvent_project_card and sets the default values. +func NewRemovedFromProjectIssueEvent_project_card()(*RemovedFromProjectIssueEvent_project_card) { + m := &RemovedFromProjectIssueEvent_project_card{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRemovedFromProjectIssueEvent_project_cardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRemovedFromProjectIssueEvent_project_cardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemovedFromProjectIssueEvent_project_card(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumnName gets the column_name property value. The column_name property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetColumnName()(*string) { + return m.column_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["previous_column_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousColumnName(val) + } + return nil + } + res["project_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProjectId(val) + } + return nil + } + res["project_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProjectUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetId()(*int32) { + return m.id +} +// GetPreviousColumnName gets the previous_column_name property value. The previous_column_name property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetPreviousColumnName()(*string) { + return m.previous_column_name +} +// GetProjectId gets the project_id property value. The project_id property +// returns a *int32 when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetProjectId()(*int32) { + return m.project_id +} +// GetProjectUrl gets the project_url property value. The project_url property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetProjectUrl()(*string) { + return m.project_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *RemovedFromProjectIssueEvent_project_card) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *RemovedFromProjectIssueEvent_project_card) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("column_name", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_column_name", m.GetPreviousColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("project_id", m.GetProjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("project_url", m.GetProjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RemovedFromProjectIssueEvent_project_card) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumnName sets the column_name property value. The column_name property +func (m *RemovedFromProjectIssueEvent_project_card) SetColumnName(value *string)() { + m.column_name = value +} +// SetId sets the id property value. The id property +func (m *RemovedFromProjectIssueEvent_project_card) SetId(value *int32)() { + m.id = value +} +// SetPreviousColumnName sets the previous_column_name property value. The previous_column_name property +func (m *RemovedFromProjectIssueEvent_project_card) SetPreviousColumnName(value *string)() { + m.previous_column_name = value +} +// SetProjectId sets the project_id property value. The project_id property +func (m *RemovedFromProjectIssueEvent_project_card) SetProjectId(value *int32)() { + m.project_id = value +} +// SetProjectUrl sets the project_url property value. The project_url property +func (m *RemovedFromProjectIssueEvent_project_card) SetProjectUrl(value *string)() { + m.project_url = value +} +// SetUrl sets the url property value. The url property +func (m *RemovedFromProjectIssueEvent_project_card) SetUrl(value *string)() { + m.url = value +} +type RemovedFromProjectIssueEvent_project_cardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnName()(*string) + GetId()(*int32) + GetPreviousColumnName()(*string) + GetProjectId()(*int32) + GetProjectUrl()(*string) + GetUrl()(*string) + SetColumnName(value *string)() + SetId(value *int32)() + SetPreviousColumnName(value *string)() + SetProjectId(value *int32)() + SetProjectUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/renamed_issue_event.go b/pkg/github/models/renamed_issue_event.go new file mode 100644 index 0000000..fe0c701 --- /dev/null +++ b/pkg/github/models/renamed_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RenamedIssueEvent renamed Issue Event +type RenamedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The rename property + rename RenamedIssueEvent_renameable + // The url property + url *string +} +// NewRenamedIssueEvent instantiates a new RenamedIssueEvent and sets the default values. +func NewRenamedIssueEvent()(*RenamedIssueEvent) { + m := &RenamedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRenamedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRenamedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRenamedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *RenamedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RenamedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *RenamedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *RenamedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *RenamedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *RenamedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RenamedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["rename"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRenamedIssueEvent_renameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRename(val.(RenamedIssueEvent_renameable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *RenamedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *RenamedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *RenamedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetRename gets the rename property value. The rename property +// returns a RenamedIssueEvent_renameable when successful +func (m *RenamedIssueEvent) GetRename()(RenamedIssueEvent_renameable) { + return m.rename +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *RenamedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *RenamedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rename", m.GetRename()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *RenamedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RenamedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *RenamedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *RenamedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RenamedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *RenamedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *RenamedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *RenamedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *RenamedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetRename sets the rename property value. The rename property +func (m *RenamedIssueEvent) SetRename(value RenamedIssueEvent_renameable)() { + m.rename = value +} +// SetUrl sets the url property value. The url property +func (m *RenamedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type RenamedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetRename()(RenamedIssueEvent_renameable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetRename(value RenamedIssueEvent_renameable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/renamed_issue_event_rename.go b/pkg/github/models/renamed_issue_event_rename.go new file mode 100644 index 0000000..8eee09c --- /dev/null +++ b/pkg/github/models/renamed_issue_event_rename.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RenamedIssueEvent_rename struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The from property + from *string + // The to property + to *string +} +// NewRenamedIssueEvent_rename instantiates a new RenamedIssueEvent_rename and sets the default values. +func NewRenamedIssueEvent_rename()(*RenamedIssueEvent_rename) { + m := &RenamedIssueEvent_rename{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRenamedIssueEvent_renameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRenamedIssueEvent_renameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRenamedIssueEvent_rename(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RenamedIssueEvent_rename) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RenamedIssueEvent_rename) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFrom(val) + } + return nil + } + res["to"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTo(val) + } + return nil + } + return res +} +// GetFrom gets the from property value. The from property +// returns a *string when successful +func (m *RenamedIssueEvent_rename) GetFrom()(*string) { + return m.from +} +// GetTo gets the to property value. The to property +// returns a *string when successful +func (m *RenamedIssueEvent_rename) GetTo()(*string) { + return m.to +} +// Serialize serializes information the current object +func (m *RenamedIssueEvent_rename) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("to", m.GetTo()) + 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 *RenamedIssueEvent_rename) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFrom sets the from property value. The from property +func (m *RenamedIssueEvent_rename) SetFrom(value *string)() { + m.from = value +} +// SetTo sets the to property value. The to property +func (m *RenamedIssueEvent_rename) SetTo(value *string)() { + m.to = value +} +type RenamedIssueEvent_renameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFrom()(*string) + GetTo()(*string) + SetFrom(value *string)() + SetTo(value *string)() +} diff --git a/pkg/github/models/repo_codespaces_secret.go b/pkg/github/models/repo_codespaces_secret.go new file mode 100644 index 0000000..336b94e --- /dev/null +++ b/pkg/github/models/repo_codespaces_secret.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepoCodespacesSecret set repository secrets for GitHub Codespaces. +type RepoCodespacesSecret struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the secret. + name *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewRepoCodespacesSecret instantiates a new RepoCodespacesSecret and sets the default values. +func NewRepoCodespacesSecret()(*RepoCodespacesSecret) { + m := &RepoCodespacesSecret{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepoCodespacesSecretFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepoCodespacesSecretFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepoCodespacesSecret(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepoCodespacesSecret) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *RepoCodespacesSecret) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepoCodespacesSecret) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the secret. +// returns a *string when successful +func (m *RepoCodespacesSecret) GetName()(*string) { + return m.name +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *RepoCodespacesSecret) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *RepoCodespacesSecret) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepoCodespacesSecret) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RepoCodespacesSecret) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetName sets the name property value. The name of the secret. +func (m *RepoCodespacesSecret) SetName(value *string)() { + m.name = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *RepoCodespacesSecret) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type RepoCodespacesSecretable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/repo_search_result_item.go b/pkg/github/models/repo_search_result_item.go new file mode 100644 index 0000000..6076590 --- /dev/null +++ b/pkg/github/models/repo_search_result_item.go @@ -0,0 +1,2652 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepoSearchResultItem repo Search Result Item +type RepoSearchResultItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allow_auto_merge property + allow_auto_merge *bool + // The allow_forking property + allow_forking *bool + // The allow_merge_commit property + allow_merge_commit *bool + // The allow_rebase_merge property + allow_rebase_merge *bool + // The allow_squash_merge property + allow_squash_merge *bool + // The archive_url property + archive_url *string + // The archived property + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_branch property + default_branch *string + // The delete_branch_on_merge property + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // Returns whether or not this repository disabled. + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // The has_discussions property + has_discussions *bool + // The has_downloads property + has_downloads *bool + // The has_issues property + has_issues *bool + // The has_pages property + has_pages *bool + // The has_projects property + has_projects *bool + // The has_wiki property + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The is_template property + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // License Simple + license NullableLicenseSimpleable + // The master_branch property + master_branch *string + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name property + name *string + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + owner NullableSimpleUserable + // The permissions property + permissions RepoSearchResultItem_permissionsable + // The private property + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The score property + score *float64 + // The size property + size *int32 + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The text_matches property + text_matches []Repositoriesable + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewRepoSearchResultItem instantiates a new RepoSearchResultItem and sets the default values. +func NewRepoSearchResultItem()(*RepoSearchResultItem) { + m := &RepoSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepoSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepoSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepoSearchResultItem(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepoSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. The allow_auto_merge property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowForking gets the allow_forking property value. The allow_forking property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. The allow_merge_commit property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. The allow_rebase_merge property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. The allow_squash_merge property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetArchived gets the archived property value. The archived property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *RepoSearchResultItem) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default_branch property +// returns a *string when successful +func (m *RepoSearchResultItem) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. The delete_branch_on_merge property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *RepoSearchResultItem) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. Returns whether or not this repository disabled. +// returns a *bool when successful +func (m *RepoSearchResultItem) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepoSearchResultItem) 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["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepoSearchResultItem_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(RepoSearchResultItem_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Repositoriesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Repositoriesable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *RepoSearchResultItem) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. The has_discussions property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. The has_downloads property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. The has_issues property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. The has_projects property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. The has_wiki property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *RepoSearchResultItem) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetId()(*int32) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. The is_template property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *RepoSearchResultItem) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *RepoSearchResultItem) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *RepoSearchResultItem) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *RepoSearchResultItem) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *RepoSearchResultItem) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *RepoSearchResultItem) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a RepoSearchResultItem_permissionsable when successful +func (m *RepoSearchResultItem) GetPermissions()(RepoSearchResultItem_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. The private property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *RepoSearchResultItem) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *RepoSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetSize()(*int32) { + return m.size +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *RepoSearchResultItem) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Repositoriesable when successful +func (m *RepoSearchResultItem) GetTextMatches()([]Repositoriesable) { + return m.text_matches +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *RepoSearchResultItem) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *RepoSearchResultItem) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *RepoSearchResultItem) GetUrl()(*string) { + return m.url +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *RepoSearchResultItem) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *RepoSearchResultItem) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *RepoSearchResultItem) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *RepoSearchResultItem) 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("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepoSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. The allow_auto_merge property +func (m *RepoSearchResultItem) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowForking sets the allow_forking property value. The allow_forking property +func (m *RepoSearchResultItem) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. The allow_merge_commit property +func (m *RepoSearchResultItem) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. The allow_rebase_merge property +func (m *RepoSearchResultItem) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. The allow_squash_merge property +func (m *RepoSearchResultItem) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetArchived sets the archived property value. The archived property +func (m *RepoSearchResultItem) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *RepoSearchResultItem) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *RepoSearchResultItem) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *RepoSearchResultItem) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *RepoSearchResultItem) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *RepoSearchResultItem) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *RepoSearchResultItem) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *RepoSearchResultItem) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *RepoSearchResultItem) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *RepoSearchResultItem) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *RepoSearchResultItem) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *RepoSearchResultItem) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RepoSearchResultItem) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default_branch property +func (m *RepoSearchResultItem) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. The delete_branch_on_merge property +func (m *RepoSearchResultItem) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *RepoSearchResultItem) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *RepoSearchResultItem) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. Returns whether or not this repository disabled. +func (m *RepoSearchResultItem) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *RepoSearchResultItem) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *RepoSearchResultItem) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *RepoSearchResultItem) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *RepoSearchResultItem) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *RepoSearchResultItem) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *RepoSearchResultItem) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *RepoSearchResultItem) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *RepoSearchResultItem) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *RepoSearchResultItem) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *RepoSearchResultItem) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *RepoSearchResultItem) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. The has_discussions property +func (m *RepoSearchResultItem) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. The has_downloads property +func (m *RepoSearchResultItem) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. The has_issues property +func (m *RepoSearchResultItem) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *RepoSearchResultItem) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. The has_projects property +func (m *RepoSearchResultItem) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. The has_wiki property +func (m *RepoSearchResultItem) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *RepoSearchResultItem) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *RepoSearchResultItem) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *RepoSearchResultItem) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *RepoSearchResultItem) SetId(value *int32)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *RepoSearchResultItem) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *RepoSearchResultItem) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *RepoSearchResultItem) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. The is_template property +func (m *RepoSearchResultItem) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *RepoSearchResultItem) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *RepoSearchResultItem) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *RepoSearchResultItem) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *RepoSearchResultItem) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. License Simple +func (m *RepoSearchResultItem) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *RepoSearchResultItem) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *RepoSearchResultItem) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *RepoSearchResultItem) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *RepoSearchResultItem) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name property +func (m *RepoSearchResultItem) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *RepoSearchResultItem) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *RepoSearchResultItem) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *RepoSearchResultItem) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *RepoSearchResultItem) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *RepoSearchResultItem) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *RepoSearchResultItem) SetPermissions(value RepoSearchResultItem_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. The private property +func (m *RepoSearchResultItem) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *RepoSearchResultItem) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *RepoSearchResultItem) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *RepoSearchResultItem) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetScore sets the score property value. The score property +func (m *RepoSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetSize sets the size property value. The size property +func (m *RepoSearchResultItem) SetSize(value *int32)() { + m.size = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *RepoSearchResultItem) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *RepoSearchResultItem) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *RepoSearchResultItem) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *RepoSearchResultItem) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *RepoSearchResultItem) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *RepoSearchResultItem) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *RepoSearchResultItem) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *RepoSearchResultItem) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *RepoSearchResultItem) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *RepoSearchResultItem) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *RepoSearchResultItem) SetTextMatches(value []Repositoriesable)() { + m.text_matches = value +} +// SetTopics sets the topics property value. The topics property +func (m *RepoSearchResultItem) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *RepoSearchResultItem) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *RepoSearchResultItem) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *RepoSearchResultItem) SetUrl(value *string)() { + m.url = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *RepoSearchResultItem) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *RepoSearchResultItem) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *RepoSearchResultItem) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *RepoSearchResultItem) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type RepoSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetMasterBranch()(*string) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(NullableSimpleUserable) + GetPermissions()(RepoSearchResultItem_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetScore()(*float64) + GetSize()(*int32) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTextMatches()([]Repositoriesable) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetMasterBranch(value *string)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value NullableSimpleUserable)() + SetPermissions(value RepoSearchResultItem_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetScore(value *float64)() + SetSize(value *int32)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTextMatches(value []Repositoriesable)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/repo_search_result_item_permissions.go b/pkg/github/models/repo_search_result_item_permissions.go new file mode 100644 index 0000000..100580e --- /dev/null +++ b/pkg/github/models/repo_search_result_item_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepoSearchResultItem_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewRepoSearchResultItem_permissions instantiates a new RepoSearchResultItem_permissions and sets the default values. +func NewRepoSearchResultItem_permissions()(*RepoSearchResultItem_permissions) { + m := &RepoSearchResultItem_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepoSearchResultItem_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepoSearchResultItem_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepoSearchResultItem_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepoSearchResultItem_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *RepoSearchResultItem_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepoSearchResultItem_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *RepoSearchResultItem_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *RepoSearchResultItem_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *RepoSearchResultItem_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *RepoSearchResultItem_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *RepoSearchResultItem_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepoSearchResultItem_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *RepoSearchResultItem_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *RepoSearchResultItem_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *RepoSearchResultItem_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *RepoSearchResultItem_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *RepoSearchResultItem_permissions) SetTriage(value *bool)() { + m.triage = value +} +type RepoSearchResultItem_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/repositories.go b/pkg/github/models/repositories.go new file mode 100644 index 0000000..74af2a4 --- /dev/null +++ b/pkg/github/models/repositories.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Repositories struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fragment property + fragment *string + // The matches property + matches []Repositories_matchesable + // The object_type property + object_type *string + // The object_url property + object_url *string + // The property property + property *string +} +// NewRepositories instantiates a new Repositories and sets the default values. +func NewRepositories()(*Repositories) { + m := &Repositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositories(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Repositories) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Repositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFragment(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositories_matchesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Repositories_matchesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Repositories_matchesable) + } + } + m.SetMatches(res) + } + return nil + } + res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectUrl(val) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + return res +} +// GetFragment gets the fragment property value. The fragment property +// returns a *string when successful +func (m *Repositories) GetFragment()(*string) { + return m.fragment +} +// GetMatches gets the matches property value. The matches property +// returns a []Repositories_matchesable when successful +func (m *Repositories) GetMatches()([]Repositories_matchesable) { + return m.matches +} +// GetObjectType gets the object_type property value. The object_type property +// returns a *string when successful +func (m *Repositories) GetObjectType()(*string) { + return m.object_type +} +// GetObjectUrl gets the object_url property value. The object_url property +// returns a *string when successful +func (m *Repositories) GetObjectUrl()(*string) { + return m.object_url +} +// GetProperty gets the property property value. The property property +// returns a *string when successful +func (m *Repositories) GetProperty()(*string) { + return m.property +} +// Serialize serializes information the current object +func (m *Repositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fragment", m.GetFragment()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_type", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + 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 *Repositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFragment sets the fragment property value. The fragment property +func (m *Repositories) SetFragment(value *string)() { + m.fragment = value +} +// SetMatches sets the matches property value. The matches property +func (m *Repositories) SetMatches(value []Repositories_matchesable)() { + m.matches = value +} +// SetObjectType sets the object_type property value. The object_type property +func (m *Repositories) SetObjectType(value *string)() { + m.object_type = value +} +// SetObjectUrl sets the object_url property value. The object_url property +func (m *Repositories) SetObjectUrl(value *string)() { + m.object_url = value +} +// SetProperty sets the property property value. The property property +func (m *Repositories) SetProperty(value *string)() { + m.property = value +} +type Repositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFragment()(*string) + GetMatches()([]Repositories_matchesable) + GetObjectType()(*string) + GetObjectUrl()(*string) + GetProperty()(*string) + SetFragment(value *string)() + SetMatches(value []Repositories_matchesable)() + SetObjectType(value *string)() + SetObjectUrl(value *string)() + SetProperty(value *string)() +} diff --git a/pkg/github/models/repositories503_error.go b/pkg/github/models/repositories503_error.go new file mode 100644 index 0000000..20d33b2 --- /dev/null +++ b/pkg/github/models/repositories503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Repositories503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewRepositories503Error instantiates a new Repositories503Error and sets the default values. +func NewRepositories503Error()(*Repositories503Error) { + m := &Repositories503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositories503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositories503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositories503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Repositories503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Repositories503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Repositories503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Repositories503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Repositories503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Repositories503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Repositories503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Repositories503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Repositories503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Repositories503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Repositories503Error) SetMessage(value *string)() { + m.message = value +} +type Repositories503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/repositories_matches.go b/pkg/github/models/repositories_matches.go new file mode 100644 index 0000000..edcfdb1 --- /dev/null +++ b/pkg/github/models/repositories_matches.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Repositories_matches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The indices property + indices []int32 + // The text property + text *string +} +// NewRepositories_matches instantiates a new Repositories_matches and sets the default values. +func NewRepositories_matches()(*Repositories_matches) { + m := &Repositories_matches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositories_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositories_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositories_matches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Repositories_matches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Repositories_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetIndices(res) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetIndices gets the indices property value. The indices property +// returns a []int32 when successful +func (m *Repositories_matches) GetIndices()([]int32) { + return m.indices +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *Repositories_matches) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *Repositories_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIndices() != nil { + err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Repositories_matches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIndices sets the indices property value. The indices property +func (m *Repositories_matches) SetIndices(value []int32)() { + m.indices = value +} +// SetText sets the text property value. The text property +func (m *Repositories_matches) SetText(value *string)() { + m.text = value +} +type Repositories_matchesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndices()([]int32) + GetText()(*string) + SetIndices(value []int32)() + SetText(value *string)() +} diff --git a/pkg/github/models/repository.go b/pkg/github/models/repository.go new file mode 100644 index 0000000..2f854ab --- /dev/null +++ b/pkg/github/models/repository.go @@ -0,0 +1,2826 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Repository a repository on GitHub. +type Repository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to allow Auto-merge to be used on pull requests. + allow_auto_merge *bool + // Whether to allow forking this repo + allow_forking *bool + // Whether to allow merge commits for pull requests. + allow_merge_commit *bool + // Whether to allow rebase merges for pull requests. + allow_rebase_merge *bool + // Whether to allow squash merges for pull requests. + allow_squash_merge *bool + // Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + allow_update_branch *bool + // Whether anonymous git access is enabled for this repository + anonymous_access_enabled *bool + // The archive_url property + archive_url *string + // Whether the repository is archived. + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default branch of the repository. + default_branch *string + // Whether to delete head branches when pull requests are merged + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // Returns whether or not this repository disabled. + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // Whether discussions are enabled. + has_discussions *bool + // Whether downloads are enabled. + // Deprecated: + has_downloads *bool + // Whether issues are enabled. + has_issues *bool + // The has_pages property + has_pages *bool + // Whether projects are enabled. + has_projects *bool + // Whether the wiki is enabled. + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // Unique identifier of the repository + id *int64 + // Whether this repository acts as a template that can be used to generate new repositories. + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // License Simple + license NullableLicenseSimpleable + // The master_branch property + master_branch *string + // The 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. + merge_commit_message *Repository_merge_commit_message + // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_title *Repository_merge_commit_title + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name of the repository. + name *string + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + owner SimpleUserable + // The permissions property + permissions Repository_permissionsable + // Whether the repository is private or public. + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + size *int32 + // 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. + squash_merge_commit_message *Repository_squash_merge_commit_message + // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_title *Repository_squash_merge_commit_title + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The starred_at property + starred_at *string + // The statuses_url property + statuses_url *string + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + // Deprecated: + use_squash_pr_title_as_default *bool + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // Whether to require contributors to sign off on web-based commits + web_commit_signoff_required *bool +} +// NewRepository instantiates a new Repository and sets the default values. +func NewRepository()(*Repository) { + m := &Repository{ + } + m.SetAdditionalData(make(map[string]any)) + visibilityValue := "public" + m.SetVisibility(&visibilityValue) + return m +} +// CreateRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Repository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +// returns a *bool when successful +func (m *Repository) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowForking gets the allow_forking property value. Whether to allow forking this repo +// returns a *bool when successful +func (m *Repository) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +// returns a *bool when successful +func (m *Repository) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +// returns a *bool when successful +func (m *Repository) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +// returns a *bool when successful +func (m *Repository) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetAllowUpdateBranch gets the allow_update_branch property value. Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. +// returns a *bool when successful +func (m *Repository) GetAllowUpdateBranch()(*bool) { + return m.allow_update_branch +} +// GetAnonymousAccessEnabled gets the anonymous_access_enabled property value. Whether anonymous git access is enabled for this repository +// returns a *bool when successful +func (m *Repository) GetAnonymousAccessEnabled()(*bool) { + return m.anonymous_access_enabled +} +// GetArchived gets the archived property value. Whether the repository is archived. +// returns a *bool when successful +func (m *Repository) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *Repository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *Repository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *Repository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *Repository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *Repository) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *Repository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *Repository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *Repository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *Repository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *Repository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *Repository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Repository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default branch of the repository. +// returns a *string when successful +func (m *Repository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +// returns a *bool when successful +func (m *Repository) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *Repository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Repository) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. Returns whether or not this repository disabled. +// returns a *bool when successful +func (m *Repository) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *Repository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *Repository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Repository) 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["anonymous_access_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAnonymousAccessEnabled(val) + } + return nil + } + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepository_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitMessage(val.(*Repository_merge_commit_message)) + } + return nil + } + res["merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepository_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitTitle(val.(*Repository_merge_commit_title)) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepository_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(Repository_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["squash_merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepository_squash_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitMessage(val.(*Repository_squash_merge_commit_message)) + } + return nil + } + res["squash_merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepository_squash_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitTitle(val.(*Repository_squash_merge_commit_title)) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["starred_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredAt(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["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["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *Repository) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *Repository) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *Repository) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *Repository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *Repository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *Repository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *Repository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *Repository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *Repository) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDiscussions gets the has_discussions property value. Whether discussions are enabled. +// returns a *bool when successful +func (m *Repository) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. Whether downloads are enabled. +// Deprecated: +// returns a *bool when successful +func (m *Repository) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. Whether issues are enabled. +// returns a *bool when successful +func (m *Repository) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *Repository) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. Whether projects are enabled. +// returns a *bool when successful +func (m *Repository) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. Whether the wiki is enabled. +// returns a *bool when successful +func (m *Repository) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *Repository) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *Repository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Repository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the repository +// returns a *int64 when successful +func (m *Repository) GetId()(*int64) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *Repository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *Repository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *Repository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +// returns a *bool when successful +func (m *Repository) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *Repository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *Repository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *Repository) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *Repository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *Repository) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *Repository) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergeCommitMessage gets the merge_commit_message property value. 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. +// returns a *Repository_merge_commit_message when successful +func (m *Repository) GetMergeCommitMessage()(*Repository_merge_commit_message) { + return m.merge_commit_message +} +// GetMergeCommitTitle gets the merge_commit_title property value. 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). +// returns a *Repository_merge_commit_title when successful +func (m *Repository) GetMergeCommitTitle()(*Repository_merge_commit_title) { + return m.merge_commit_title +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *Repository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *Repository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *Repository) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *Repository) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Repository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *Repository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *Repository) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *Repository) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *Repository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a Repository_permissionsable when successful +func (m *Repository) GetPermissions()(Repository_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. Whether the repository is private or public. +// returns a *bool when successful +func (m *Repository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *Repository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *Repository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *Repository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +// returns a *int32 when successful +func (m *Repository) GetSize()(*int32) { + return m.size +} +// GetSquashMergeCommitMessage gets the squash_merge_commit_message property value. 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. +// returns a *Repository_squash_merge_commit_message when successful +func (m *Repository) GetSquashMergeCommitMessage()(*Repository_squash_merge_commit_message) { + return m.squash_merge_commit_message +} +// GetSquashMergeCommitTitle gets the squash_merge_commit_title property value. 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). +// returns a *Repository_squash_merge_commit_title when successful +func (m *Repository) GetSquashMergeCommitTitle()(*Repository_squash_merge_commit_title) { + return m.squash_merge_commit_title +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *Repository) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *Repository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *Repository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStarredAt gets the starred_at property value. The starred_at property +// returns a *string when successful +func (m *Repository) GetStarredAt()(*string) { + return m.starred_at +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *Repository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *Repository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *Repository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *Repository) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *Repository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *Repository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *Repository) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *Repository) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *Repository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Repository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Repository) GetUrl()(*string) { + return m.url +} +// GetUseSquashPrTitleAsDefault gets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. +// Deprecated: +// returns a *bool when successful +func (m *Repository) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *Repository) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *Repository) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *Repository) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. Whether to require contributors to sign off on web-based commits +// returns a *bool when successful +func (m *Repository) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *Repository) 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("anonymous_access_enabled", m.GetAnonymousAccessEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + if m.GetMergeCommitMessage() != nil { + cast := (*m.GetMergeCommitMessage()).String() + err := writer.WriteStringValue("merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetMergeCommitTitle() != nil { + cast := (*m.GetMergeCommitTitle()).String() + err := writer.WriteStringValue("merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitMessage() != nil { + cast := (*m.GetSquashMergeCommitMessage()).String() + err := writer.WriteStringValue("squash_merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitTitle() != nil { + cast := (*m.GetSquashMergeCommitTitle()).String() + err := writer.WriteStringValue("squash_merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_at", m.GetStarredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Repository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +func (m *Repository) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowForking sets the allow_forking property value. Whether to allow forking this repo +func (m *Repository) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +func (m *Repository) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +func (m *Repository) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +func (m *Repository) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetAllowUpdateBranch sets the allow_update_branch property value. Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. +func (m *Repository) SetAllowUpdateBranch(value *bool)() { + m.allow_update_branch = value +} +// SetAnonymousAccessEnabled sets the anonymous_access_enabled property value. Whether anonymous git access is enabled for this repository +func (m *Repository) SetAnonymousAccessEnabled(value *bool)() { + m.anonymous_access_enabled = value +} +// SetArchived sets the archived property value. Whether the repository is archived. +func (m *Repository) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *Repository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *Repository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *Repository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *Repository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *Repository) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *Repository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *Repository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *Repository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *Repository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *Repository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *Repository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Repository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default branch of the repository. +func (m *Repository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +func (m *Repository) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *Repository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *Repository) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. Returns whether or not this repository disabled. +func (m *Repository) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *Repository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *Repository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *Repository) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *Repository) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *Repository) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *Repository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *Repository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *Repository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *Repository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *Repository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *Repository) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDiscussions sets the has_discussions property value. Whether discussions are enabled. +func (m *Repository) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. Whether downloads are enabled. +// Deprecated: +func (m *Repository) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. Whether issues are enabled. +func (m *Repository) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *Repository) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. Whether projects are enabled. +func (m *Repository) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. Whether the wiki is enabled. +func (m *Repository) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *Repository) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *Repository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Repository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the repository +func (m *Repository) SetId(value *int64)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *Repository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *Repository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *Repository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +func (m *Repository) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *Repository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *Repository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *Repository) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *Repository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. License Simple +func (m *Repository) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *Repository) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergeCommitMessage sets the merge_commit_message property value. 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. +func (m *Repository) SetMergeCommitMessage(value *Repository_merge_commit_message)() { + m.merge_commit_message = value +} +// SetMergeCommitTitle sets the merge_commit_title property value. 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). +func (m *Repository) SetMergeCommitTitle(value *Repository_merge_commit_title)() { + m.merge_commit_title = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *Repository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *Repository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *Repository) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name of the repository. +func (m *Repository) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Repository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *Repository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *Repository) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *Repository) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *Repository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *Repository) SetPermissions(value Repository_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. Whether the repository is private or public. +func (m *Repository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *Repository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *Repository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *Repository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. +func (m *Repository) SetSize(value *int32)() { + m.size = value +} +// SetSquashMergeCommitMessage sets the squash_merge_commit_message property value. 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. +func (m *Repository) SetSquashMergeCommitMessage(value *Repository_squash_merge_commit_message)() { + m.squash_merge_commit_message = value +} +// SetSquashMergeCommitTitle sets the squash_merge_commit_title property value. 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). +func (m *Repository) SetSquashMergeCommitTitle(value *Repository_squash_merge_commit_title)() { + m.squash_merge_commit_title = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *Repository) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *Repository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *Repository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStarredAt sets the starred_at property value. The starred_at property +func (m *Repository) SetStarredAt(value *string)() { + m.starred_at = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *Repository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *Repository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *Repository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *Repository) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *Repository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *Repository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *Repository) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *Repository) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *Repository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Repository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Repository) SetUrl(value *string)() { + m.url = value +} +// SetUseSquashPrTitleAsDefault sets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. +// Deprecated: +func (m *Repository) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *Repository) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *Repository) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *Repository) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. Whether to require contributors to sign off on web-based commits +func (m *Repository) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type Repositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetAllowUpdateBranch()(*bool) + GetAnonymousAccessEnabled()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetMasterBranch()(*string) + GetMergeCommitMessage()(*Repository_merge_commit_message) + GetMergeCommitTitle()(*Repository_merge_commit_title) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(SimpleUserable) + GetPermissions()(Repository_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetSize()(*int32) + GetSquashMergeCommitMessage()(*Repository_squash_merge_commit_message) + GetSquashMergeCommitTitle()(*Repository_squash_merge_commit_title) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStarredAt()(*string) + GetStatusesUrl()(*string) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUseSquashPrTitleAsDefault()(*bool) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetAllowUpdateBranch(value *bool)() + SetAnonymousAccessEnabled(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetMasterBranch(value *string)() + SetMergeCommitMessage(value *Repository_merge_commit_message)() + SetMergeCommitTitle(value *Repository_merge_commit_title)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value SimpleUserable)() + SetPermissions(value Repository_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetSize(value *int32)() + SetSquashMergeCommitMessage(value *Repository_squash_merge_commit_message)() + SetSquashMergeCommitTitle(value *Repository_squash_merge_commit_title)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStarredAt(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUseSquashPrTitleAsDefault(value *bool)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/repository_advisory.go b/pkg/github/models/repository_advisory.go new file mode 100644 index 0000000..5332040 --- /dev/null +++ b/pkg/github/models/repository_advisory.go @@ -0,0 +1,772 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryAdvisory a repository security advisory. +type RepositoryAdvisory struct { + // The author of the advisory. + author SimpleUserable + // The date and time of when the advisory was closed, in ISO 8601 format. + closed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A list of teams that collaborate on the advisory. + collaborating_teams []Teamable + // A list of users that collaborate on the advisory. + collaborating_users []SimpleUserable + // The date and time of when the advisory was created, in ISO 8601 format. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The credits property + credits []RepositoryAdvisory_creditsable + // The credits_detailed property + credits_detailed []RepositoryAdvisoryCreditable + // The Common Vulnerabilities and Exposures (CVE) ID. + cve_id *string + // The cvss property + cvss RepositoryAdvisory_cvssable + // A list of only the CWE IDs. + cwe_ids []string + // The cwes property + cwes []RepositoryAdvisory_cwesable + // A detailed description of what the advisory entails. + description *string + // The GitHub Security Advisory ID. + ghsa_id *string + // The URL for the advisory. + html_url *string + // The identifiers property + identifiers []RepositoryAdvisory_identifiersable + // A temporary private fork of the advisory's repository for collaborating on a fix. + private_fork SimpleRepositoryable + // The date and time of when the advisory was published, in ISO 8601 format. + published_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The publisher of the advisory. + publisher SimpleUserable + // The severity of the advisory. + severity *RepositoryAdvisory_severity + // The state of the advisory. + state *RepositoryAdvisory_state + // The submission property + submission RepositoryAdvisory_submissionable + // A short summary of the advisory. + summary *string + // The date and time of when the advisory was last updated, in ISO 8601 format. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The API URL for the advisory. + url *string + // The vulnerabilities property + vulnerabilities []RepositoryAdvisoryVulnerabilityable + // The date and time of when the advisory was withdrawn, in ISO 8601 format. + withdrawn_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewRepositoryAdvisory instantiates a new RepositoryAdvisory and sets the default values. +func NewRepositoryAdvisory()(*RepositoryAdvisory) { + m := &RepositoryAdvisory{ + } + return m +} +// CreateRepositoryAdvisoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisory(), nil +} +// GetAuthor gets the author property value. The author of the advisory. +// returns a SimpleUserable when successful +func (m *RepositoryAdvisory) GetAuthor()(SimpleUserable) { + return m.author +} +// GetClosedAt gets the closed_at property value. The date and time of when the advisory was closed, in ISO 8601 format. +// returns a *Time when successful +func (m *RepositoryAdvisory) GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closed_at +} +// GetCollaboratingTeams gets the collaborating_teams property value. A list of teams that collaborate on the advisory. +// returns a []Teamable when successful +func (m *RepositoryAdvisory) GetCollaboratingTeams()([]Teamable) { + return m.collaborating_teams +} +// GetCollaboratingUsers gets the collaborating_users property value. A list of users that collaborate on the advisory. +// returns a []SimpleUserable when successful +func (m *RepositoryAdvisory) GetCollaboratingUsers()([]SimpleUserable) { + return m.collaborating_users +} +// GetCreatedAt gets the created_at property value. The date and time of when the advisory was created, in ISO 8601 format. +// returns a *Time when successful +func (m *RepositoryAdvisory) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCredits gets the credits property value. The credits property +// returns a []RepositoryAdvisory_creditsable when successful +func (m *RepositoryAdvisory) GetCredits()([]RepositoryAdvisory_creditsable) { + return m.credits +} +// GetCreditsDetailed gets the credits_detailed property value. The credits_detailed property +// returns a []RepositoryAdvisoryCreditable when successful +func (m *RepositoryAdvisory) GetCreditsDetailed()([]RepositoryAdvisoryCreditable) { + return m.credits_detailed +} +// GetCveId gets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +// returns a *string when successful +func (m *RepositoryAdvisory) GetCveId()(*string) { + return m.cve_id +} +// GetCvss gets the cvss property value. The cvss property +// returns a RepositoryAdvisory_cvssable when successful +func (m *RepositoryAdvisory) GetCvss()(RepositoryAdvisory_cvssable) { + return m.cvss +} +// GetCweIds gets the cwe_ids property value. A list of only the CWE IDs. +// returns a []string when successful +func (m *RepositoryAdvisory) GetCweIds()([]string) { + return m.cwe_ids +} +// GetCwes gets the cwes property value. The cwes property +// returns a []RepositoryAdvisory_cwesable when successful +func (m *RepositoryAdvisory) GetCwes()([]RepositoryAdvisory_cwesable) { + return m.cwes +} +// GetDescription gets the description property value. A detailed description of what the advisory entails. +// returns a *string when successful +func (m *RepositoryAdvisory) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(SimpleUserable)) + } + return nil + } + res["closed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedAt(val) + } + return nil + } + res["collaborating_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Teamable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Teamable) + } + } + m.SetCollaboratingTeams(res) + } + return nil + } + res["collaborating_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimpleUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SimpleUserable) + } + } + m.SetCollaboratingUsers(res) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["credits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisory_creditsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisory_creditsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisory_creditsable) + } + } + m.SetCredits(res) + } + return nil + } + res["credits_detailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisoryCreditFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisoryCreditable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisoryCreditable) + } + } + m.SetCreditsDetailed(res) + } + return nil + } + res["cve_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCveId(val) + } + return nil + } + res["cvss"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryAdvisory_cvssFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCvss(val.(RepositoryAdvisory_cvssable)) + } + return nil + } + res["cwe_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCweIds(res) + } + return nil + } + res["cwes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisory_cwesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisory_cwesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisory_cwesable) + } + } + m.SetCwes(res) + } + 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["ghsa_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGhsaId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["identifiers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisory_identifiersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisory_identifiersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisory_identifiersable) + } + } + m.SetIdentifiers(res) + } + return nil + } + res["private_fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrivateFork(val.(SimpleRepositoryable)) + } + return nil + } + res["published_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedAt(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val.(SimpleUserable)) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisory_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*RepositoryAdvisory_severity)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisory_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*RepositoryAdvisory_state)) + } + return nil + } + res["submission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryAdvisory_submissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubmission(val.(RepositoryAdvisory_submissionable)) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisoryVulnerabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisoryVulnerabilityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisoryVulnerabilityable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + res["withdrawn_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWithdrawnAt(val) + } + return nil + } + return res +} +// GetGhsaId gets the ghsa_id property value. The GitHub Security Advisory ID. +// returns a *string when successful +func (m *RepositoryAdvisory) GetGhsaId()(*string) { + return m.ghsa_id +} +// GetHtmlUrl gets the html_url property value. The URL for the advisory. +// returns a *string when successful +func (m *RepositoryAdvisory) GetHtmlUrl()(*string) { + return m.html_url +} +// GetIdentifiers gets the identifiers property value. The identifiers property +// returns a []RepositoryAdvisory_identifiersable when successful +func (m *RepositoryAdvisory) GetIdentifiers()([]RepositoryAdvisory_identifiersable) { + return m.identifiers +} +// GetPrivateFork gets the private_fork property value. A temporary private fork of the advisory's repository for collaborating on a fix. +// returns a SimpleRepositoryable when successful +func (m *RepositoryAdvisory) GetPrivateFork()(SimpleRepositoryable) { + return m.private_fork +} +// GetPublishedAt gets the published_at property value. The date and time of when the advisory was published, in ISO 8601 format. +// returns a *Time when successful +func (m *RepositoryAdvisory) GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.published_at +} +// GetPublisher gets the publisher property value. The publisher of the advisory. +// returns a SimpleUserable when successful +func (m *RepositoryAdvisory) GetPublisher()(SimpleUserable) { + return m.publisher +} +// GetSeverity gets the severity property value. The severity of the advisory. +// returns a *RepositoryAdvisory_severity when successful +func (m *RepositoryAdvisory) GetSeverity()(*RepositoryAdvisory_severity) { + return m.severity +} +// GetState gets the state property value. The state of the advisory. +// returns a *RepositoryAdvisory_state when successful +func (m *RepositoryAdvisory) GetState()(*RepositoryAdvisory_state) { + return m.state +} +// GetSubmission gets the submission property value. The submission property +// returns a RepositoryAdvisory_submissionable when successful +func (m *RepositoryAdvisory) GetSubmission()(RepositoryAdvisory_submissionable) { + return m.submission +} +// GetSummary gets the summary property value. A short summary of the advisory. +// returns a *string when successful +func (m *RepositoryAdvisory) GetSummary()(*string) { + return m.summary +} +// GetUpdatedAt gets the updated_at property value. The date and time of when the advisory was last updated, in ISO 8601 format. +// returns a *Time when successful +func (m *RepositoryAdvisory) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The API URL for the advisory. +// returns a *string when successful +func (m *RepositoryAdvisory) GetUrl()(*string) { + return m.url +} +// GetVulnerabilities gets the vulnerabilities property value. The vulnerabilities property +// returns a []RepositoryAdvisoryVulnerabilityable when successful +func (m *RepositoryAdvisory) GetVulnerabilities()([]RepositoryAdvisoryVulnerabilityable) { + return m.vulnerabilities +} +// GetWithdrawnAt gets the withdrawn_at property value. The date and time of when the advisory was withdrawn, in ISO 8601 format. +// returns a *Time when successful +func (m *RepositoryAdvisory) GetWithdrawnAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.withdrawn_at +} +// Serialize serializes information the current object +func (m *RepositoryAdvisory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCollaboratingTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCollaboratingTeams())) + for i, v := range m.GetCollaboratingTeams() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("collaborating_teams", cast) + if err != nil { + return err + } + } + if m.GetCollaboratingUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCollaboratingUsers())) + for i, v := range m.GetCollaboratingUsers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("collaborating_users", cast) + if err != nil { + return err + } + } + if m.GetCredits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCredits())) + for i, v := range m.GetCredits() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("credits", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cve_id", m.GetCveId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("cvss", m.GetCvss()) + if err != nil { + return err + } + } + if m.GetCweIds() != nil { + err := writer.WriteCollectionOfStringValues("cwe_ids", m.GetCweIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetVulnerabilities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilities())) + for i, v := range m.GetVulnerabilities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("vulnerabilities", cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthor sets the author property value. The author of the advisory. +func (m *RepositoryAdvisory) SetAuthor(value SimpleUserable)() { + m.author = value +} +// SetClosedAt sets the closed_at property value. The date and time of when the advisory was closed, in ISO 8601 format. +func (m *RepositoryAdvisory) SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closed_at = value +} +// SetCollaboratingTeams sets the collaborating_teams property value. A list of teams that collaborate on the advisory. +func (m *RepositoryAdvisory) SetCollaboratingTeams(value []Teamable)() { + m.collaborating_teams = value +} +// SetCollaboratingUsers sets the collaborating_users property value. A list of users that collaborate on the advisory. +func (m *RepositoryAdvisory) SetCollaboratingUsers(value []SimpleUserable)() { + m.collaborating_users = value +} +// SetCreatedAt sets the created_at property value. The date and time of when the advisory was created, in ISO 8601 format. +func (m *RepositoryAdvisory) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCredits sets the credits property value. The credits property +func (m *RepositoryAdvisory) SetCredits(value []RepositoryAdvisory_creditsable)() { + m.credits = value +} +// SetCreditsDetailed sets the credits_detailed property value. The credits_detailed property +func (m *RepositoryAdvisory) SetCreditsDetailed(value []RepositoryAdvisoryCreditable)() { + m.credits_detailed = value +} +// SetCveId sets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +func (m *RepositoryAdvisory) SetCveId(value *string)() { + m.cve_id = value +} +// SetCvss sets the cvss property value. The cvss property +func (m *RepositoryAdvisory) SetCvss(value RepositoryAdvisory_cvssable)() { + m.cvss = value +} +// SetCweIds sets the cwe_ids property value. A list of only the CWE IDs. +func (m *RepositoryAdvisory) SetCweIds(value []string)() { + m.cwe_ids = value +} +// SetCwes sets the cwes property value. The cwes property +func (m *RepositoryAdvisory) SetCwes(value []RepositoryAdvisory_cwesable)() { + m.cwes = value +} +// SetDescription sets the description property value. A detailed description of what the advisory entails. +func (m *RepositoryAdvisory) SetDescription(value *string)() { + m.description = value +} +// SetGhsaId sets the ghsa_id property value. The GitHub Security Advisory ID. +func (m *RepositoryAdvisory) SetGhsaId(value *string)() { + m.ghsa_id = value +} +// SetHtmlUrl sets the html_url property value. The URL for the advisory. +func (m *RepositoryAdvisory) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetIdentifiers sets the identifiers property value. The identifiers property +func (m *RepositoryAdvisory) SetIdentifiers(value []RepositoryAdvisory_identifiersable)() { + m.identifiers = value +} +// SetPrivateFork sets the private_fork property value. A temporary private fork of the advisory's repository for collaborating on a fix. +func (m *RepositoryAdvisory) SetPrivateFork(value SimpleRepositoryable)() { + m.private_fork = value +} +// SetPublishedAt sets the published_at property value. The date and time of when the advisory was published, in ISO 8601 format. +func (m *RepositoryAdvisory) SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.published_at = value +} +// SetPublisher sets the publisher property value. The publisher of the advisory. +func (m *RepositoryAdvisory) SetPublisher(value SimpleUserable)() { + m.publisher = value +} +// SetSeverity sets the severity property value. The severity of the advisory. +func (m *RepositoryAdvisory) SetSeverity(value *RepositoryAdvisory_severity)() { + m.severity = value +} +// SetState sets the state property value. The state of the advisory. +func (m *RepositoryAdvisory) SetState(value *RepositoryAdvisory_state)() { + m.state = value +} +// SetSubmission sets the submission property value. The submission property +func (m *RepositoryAdvisory) SetSubmission(value RepositoryAdvisory_submissionable)() { + m.submission = value +} +// SetSummary sets the summary property value. A short summary of the advisory. +func (m *RepositoryAdvisory) SetSummary(value *string)() { + m.summary = value +} +// SetUpdatedAt sets the updated_at property value. The date and time of when the advisory was last updated, in ISO 8601 format. +func (m *RepositoryAdvisory) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The API URL for the advisory. +func (m *RepositoryAdvisory) SetUrl(value *string)() { + m.url = value +} +// SetVulnerabilities sets the vulnerabilities property value. The vulnerabilities property +func (m *RepositoryAdvisory) SetVulnerabilities(value []RepositoryAdvisoryVulnerabilityable)() { + m.vulnerabilities = value +} +// SetWithdrawnAt sets the withdrawn_at property value. The date and time of when the advisory was withdrawn, in ISO 8601 format. +func (m *RepositoryAdvisory) SetWithdrawnAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.withdrawn_at = value +} +type RepositoryAdvisoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(SimpleUserable) + GetClosedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCollaboratingTeams()([]Teamable) + GetCollaboratingUsers()([]SimpleUserable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCredits()([]RepositoryAdvisory_creditsable) + GetCreditsDetailed()([]RepositoryAdvisoryCreditable) + GetCveId()(*string) + GetCvss()(RepositoryAdvisory_cvssable) + GetCweIds()([]string) + GetCwes()([]RepositoryAdvisory_cwesable) + GetDescription()(*string) + GetGhsaId()(*string) + GetHtmlUrl()(*string) + GetIdentifiers()([]RepositoryAdvisory_identifiersable) + GetPrivateFork()(SimpleRepositoryable) + GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublisher()(SimpleUserable) + GetSeverity()(*RepositoryAdvisory_severity) + GetState()(*RepositoryAdvisory_state) + GetSubmission()(RepositoryAdvisory_submissionable) + GetSummary()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVulnerabilities()([]RepositoryAdvisoryVulnerabilityable) + GetWithdrawnAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAuthor(value SimpleUserable)() + SetClosedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCollaboratingTeams(value []Teamable)() + SetCollaboratingUsers(value []SimpleUserable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCredits(value []RepositoryAdvisory_creditsable)() + SetCreditsDetailed(value []RepositoryAdvisoryCreditable)() + SetCveId(value *string)() + SetCvss(value RepositoryAdvisory_cvssable)() + SetCweIds(value []string)() + SetCwes(value []RepositoryAdvisory_cwesable)() + SetDescription(value *string)() + SetGhsaId(value *string)() + SetHtmlUrl(value *string)() + SetIdentifiers(value []RepositoryAdvisory_identifiersable)() + SetPrivateFork(value SimpleRepositoryable)() + SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublisher(value SimpleUserable)() + SetSeverity(value *RepositoryAdvisory_severity)() + SetState(value *RepositoryAdvisory_state)() + SetSubmission(value RepositoryAdvisory_submissionable)() + SetSummary(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVulnerabilities(value []RepositoryAdvisoryVulnerabilityable)() + SetWithdrawnAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/repository_advisory_create.go b/pkg/github/models/repository_advisory_create.go new file mode 100644 index 0000000..b2a83b8 --- /dev/null +++ b/pkg/github/models/repository_advisory_create.go @@ -0,0 +1,324 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisoryCreate struct { + // A list of users receiving credit for their participation in the security advisory. + credits []RepositoryAdvisoryCreate_creditsable + // The Common Vulnerabilities and Exposures (CVE) ID. + cve_id *string + // The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. + cvss_vector_string *string + // A list of Common Weakness Enumeration (CWE) IDs. + cwe_ids []string + // A detailed description of what the advisory impacts. + description *string + // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + severity *RepositoryAdvisoryCreate_severity + // Whether to create a temporary private fork of the repository to collaborate on a fix. + start_private_fork *bool + // A short summary of the advisory. + summary *string + // A product affected by the vulnerability detailed in a repository security advisory. + vulnerabilities []RepositoryAdvisoryCreate_vulnerabilitiesable +} +// NewRepositoryAdvisoryCreate instantiates a new RepositoryAdvisoryCreate and sets the default values. +func NewRepositoryAdvisoryCreate()(*RepositoryAdvisoryCreate) { + m := &RepositoryAdvisoryCreate{ + } + return m +} +// CreateRepositoryAdvisoryCreateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryCreateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryCreate(), nil +} +// GetCredits gets the credits property value. A list of users receiving credit for their participation in the security advisory. +// returns a []RepositoryAdvisoryCreate_creditsable when successful +func (m *RepositoryAdvisoryCreate) GetCredits()([]RepositoryAdvisoryCreate_creditsable) { + return m.credits +} +// GetCveId gets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate) GetCveId()(*string) { + return m.cve_id +} +// GetCvssVectorString gets the cvss_vector_string property value. The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate) GetCvssVectorString()(*string) { + return m.cvss_vector_string +} +// GetCweIds gets the cwe_ids property value. A list of Common Weakness Enumeration (CWE) IDs. +// returns a []string when successful +func (m *RepositoryAdvisoryCreate) GetCweIds()([]string) { + return m.cwe_ids +} +// GetDescription gets the description property value. A detailed description of what the advisory impacts. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryCreate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["credits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisoryCreate_creditsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisoryCreate_creditsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisoryCreate_creditsable) + } + } + m.SetCredits(res) + } + return nil + } + res["cve_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCveId(val) + } + return nil + } + res["cvss_vector_string"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCvssVectorString(val) + } + return nil + } + res["cwe_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCweIds(res) + } + 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["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisoryCreate_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*RepositoryAdvisoryCreate_severity)) + } + return nil + } + res["start_private_fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStartPrivateFork(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisoryCreate_vulnerabilitiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisoryCreate_vulnerabilitiesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisoryCreate_vulnerabilitiesable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + return res +} +// GetSeverity gets the severity property value. The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +// returns a *RepositoryAdvisoryCreate_severity when successful +func (m *RepositoryAdvisoryCreate) GetSeverity()(*RepositoryAdvisoryCreate_severity) { + return m.severity +} +// GetStartPrivateFork gets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +// returns a *bool when successful +func (m *RepositoryAdvisoryCreate) GetStartPrivateFork()(*bool) { + return m.start_private_fork +} +// GetSummary gets the summary property value. A short summary of the advisory. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate) GetSummary()(*string) { + return m.summary +} +// GetVulnerabilities gets the vulnerabilities property value. A product affected by the vulnerability detailed in a repository security advisory. +// returns a []RepositoryAdvisoryCreate_vulnerabilitiesable when successful +func (m *RepositoryAdvisoryCreate) GetVulnerabilities()([]RepositoryAdvisoryCreate_vulnerabilitiesable) { + return m.vulnerabilities +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryCreate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCredits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCredits())) + for i, v := range m.GetCredits() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("credits", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cve_id", m.GetCveId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cvss_vector_string", m.GetCvssVectorString()) + if err != nil { + return err + } + } + if m.GetCweIds() != nil { + err := writer.WriteCollectionOfStringValues("cwe_ids", m.GetCweIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("start_private_fork", m.GetStartPrivateFork()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetVulnerabilities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilities())) + for i, v := range m.GetVulnerabilities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("vulnerabilities", cast) + if err != nil { + return err + } + } + return nil +} +// SetCredits sets the credits property value. A list of users receiving credit for their participation in the security advisory. +func (m *RepositoryAdvisoryCreate) SetCredits(value []RepositoryAdvisoryCreate_creditsable)() { + m.credits = value +} +// SetCveId sets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +func (m *RepositoryAdvisoryCreate) SetCveId(value *string)() { + m.cve_id = value +} +// SetCvssVectorString sets the cvss_vector_string property value. The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +func (m *RepositoryAdvisoryCreate) SetCvssVectorString(value *string)() { + m.cvss_vector_string = value +} +// SetCweIds sets the cwe_ids property value. A list of Common Weakness Enumeration (CWE) IDs. +func (m *RepositoryAdvisoryCreate) SetCweIds(value []string)() { + m.cwe_ids = value +} +// SetDescription sets the description property value. A detailed description of what the advisory impacts. +func (m *RepositoryAdvisoryCreate) SetDescription(value *string)() { + m.description = value +} +// SetSeverity sets the severity property value. The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +func (m *RepositoryAdvisoryCreate) SetSeverity(value *RepositoryAdvisoryCreate_severity)() { + m.severity = value +} +// SetStartPrivateFork sets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +func (m *RepositoryAdvisoryCreate) SetStartPrivateFork(value *bool)() { + m.start_private_fork = value +} +// SetSummary sets the summary property value. A short summary of the advisory. +func (m *RepositoryAdvisoryCreate) SetSummary(value *string)() { + m.summary = value +} +// SetVulnerabilities sets the vulnerabilities property value. A product affected by the vulnerability detailed in a repository security advisory. +func (m *RepositoryAdvisoryCreate) SetVulnerabilities(value []RepositoryAdvisoryCreate_vulnerabilitiesable)() { + m.vulnerabilities = value +} +type RepositoryAdvisoryCreateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCredits()([]RepositoryAdvisoryCreate_creditsable) + GetCveId()(*string) + GetCvssVectorString()(*string) + GetCweIds()([]string) + GetDescription()(*string) + GetSeverity()(*RepositoryAdvisoryCreate_severity) + GetStartPrivateFork()(*bool) + GetSummary()(*string) + GetVulnerabilities()([]RepositoryAdvisoryCreate_vulnerabilitiesable) + SetCredits(value []RepositoryAdvisoryCreate_creditsable)() + SetCveId(value *string)() + SetCvssVectorString(value *string)() + SetCweIds(value []string)() + SetDescription(value *string)() + SetSeverity(value *RepositoryAdvisoryCreate_severity)() + SetStartPrivateFork(value *bool)() + SetSummary(value *string)() + SetVulnerabilities(value []RepositoryAdvisoryCreate_vulnerabilitiesable)() +} diff --git a/pkg/github/models/repository_advisory_create_credits.go b/pkg/github/models/repository_advisory_create_credits.go new file mode 100644 index 0000000..fc4920e --- /dev/null +++ b/pkg/github/models/repository_advisory_create_credits.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisoryCreate_credits struct { + // The username of the user credited. + login *string + // The type of credit the user is receiving. + typeEscaped *SecurityAdvisoryCreditTypes +} +// NewRepositoryAdvisoryCreate_credits instantiates a new RepositoryAdvisoryCreate_credits and sets the default values. +func NewRepositoryAdvisoryCreate_credits()(*RepositoryAdvisoryCreate_credits) { + m := &RepositoryAdvisoryCreate_credits{ + } + return m +} +// CreateRepositoryAdvisoryCreate_creditsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryCreate_creditsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryCreate_credits(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryCreate_credits) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryCreditTypes) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SecurityAdvisoryCreditTypes)) + } + return nil + } + return res +} +// GetLogin gets the login property value. The username of the user credited. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate_credits) GetLogin()(*string) { + return m.login +} +// GetTypeEscaped gets the type property value. The type of credit the user is receiving. +// returns a *SecurityAdvisoryCreditTypes when successful +func (m *RepositoryAdvisoryCreate_credits) GetTypeEscaped()(*SecurityAdvisoryCreditTypes) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryCreate_credits) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetLogin sets the login property value. The username of the user credited. +func (m *RepositoryAdvisoryCreate_credits) SetLogin(value *string)() { + m.login = value +} +// SetTypeEscaped sets the type property value. The type of credit the user is receiving. +func (m *RepositoryAdvisoryCreate_credits) SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() { + m.typeEscaped = value +} +type RepositoryAdvisoryCreate_creditsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLogin()(*string) + GetTypeEscaped()(*SecurityAdvisoryCreditTypes) + SetLogin(value *string)() + SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() +} diff --git a/pkg/github/models/repository_advisory_create_severity.go b/pkg/github/models/repository_advisory_create_severity.go new file mode 100644 index 0000000..e6c6a63 --- /dev/null +++ b/pkg/github/models/repository_advisory_create_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +type RepositoryAdvisoryCreate_severity int + +const ( + CRITICAL_REPOSITORYADVISORYCREATE_SEVERITY RepositoryAdvisoryCreate_severity = iota + HIGH_REPOSITORYADVISORYCREATE_SEVERITY + MEDIUM_REPOSITORYADVISORYCREATE_SEVERITY + LOW_REPOSITORYADVISORYCREATE_SEVERITY +) + +func (i RepositoryAdvisoryCreate_severity) String() string { + return []string{"critical", "high", "medium", "low"}[i] +} +func ParseRepositoryAdvisoryCreate_severity(v string) (any, error) { + result := CRITICAL_REPOSITORYADVISORYCREATE_SEVERITY + switch v { + case "critical": + result = CRITICAL_REPOSITORYADVISORYCREATE_SEVERITY + case "high": + result = HIGH_REPOSITORYADVISORYCREATE_SEVERITY + case "medium": + result = MEDIUM_REPOSITORYADVISORYCREATE_SEVERITY + case "low": + result = LOW_REPOSITORYADVISORYCREATE_SEVERITY + default: + return 0, errors.New("Unknown RepositoryAdvisoryCreate_severity value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisoryCreate_severity(values []RepositoryAdvisoryCreate_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisoryCreate_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_create_vulnerabilities.go b/pkg/github/models/repository_advisory_create_vulnerabilities.go new file mode 100644 index 0000000..50ebf65 --- /dev/null +++ b/pkg/github/models/repository_advisory_create_vulnerabilities.go @@ -0,0 +1,154 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisoryCreate_vulnerabilities struct { + // The name of the package affected by the vulnerability. + packageEscaped RepositoryAdvisoryCreate_vulnerabilities_packageable + // The package version(s) that resolve the vulnerability. + patched_versions *string + // The functions in the package that are affected. + vulnerable_functions []string + // The range of the package versions affected by the vulnerability. + vulnerable_version_range *string +} +// NewRepositoryAdvisoryCreate_vulnerabilities instantiates a new RepositoryAdvisoryCreate_vulnerabilities and sets the default values. +func NewRepositoryAdvisoryCreate_vulnerabilities()(*RepositoryAdvisoryCreate_vulnerabilities) { + m := &RepositoryAdvisoryCreate_vulnerabilities{ + } + return m +} +// CreateRepositoryAdvisoryCreate_vulnerabilitiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryCreate_vulnerabilitiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryCreate_vulnerabilities(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryAdvisoryCreate_vulnerabilities_packageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(RepositoryAdvisoryCreate_vulnerabilities_packageable)) + } + return nil + } + res["patched_versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchedVersions(val) + } + return nil + } + res["vulnerable_functions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetVulnerableFunctions(res) + } + return nil + } + res["vulnerable_version_range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVulnerableVersionRange(val) + } + return nil + } + return res +} +// GetPackageEscaped gets the package property value. The name of the package affected by the vulnerability. +// returns a RepositoryAdvisoryCreate_vulnerabilities_packageable when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities) GetPackageEscaped()(RepositoryAdvisoryCreate_vulnerabilities_packageable) { + return m.packageEscaped +} +// GetPatchedVersions gets the patched_versions property value. The package version(s) that resolve the vulnerability. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities) GetPatchedVersions()(*string) { + return m.patched_versions +} +// GetVulnerableFunctions gets the vulnerable_functions property value. The functions in the package that are affected. +// returns a []string when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities) GetVulnerableFunctions()([]string) { + return m.vulnerable_functions +} +// GetVulnerableVersionRange gets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities) GetVulnerableVersionRange()(*string) { + return m.vulnerable_version_range +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryCreate_vulnerabilities) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("package", m.GetPackageEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patched_versions", m.GetPatchedVersions()) + if err != nil { + return err + } + } + if m.GetVulnerableFunctions() != nil { + err := writer.WriteCollectionOfStringValues("vulnerable_functions", m.GetVulnerableFunctions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vulnerable_version_range", m.GetVulnerableVersionRange()) + if err != nil { + return err + } + } + return nil +} +// SetPackageEscaped sets the package property value. The name of the package affected by the vulnerability. +func (m *RepositoryAdvisoryCreate_vulnerabilities) SetPackageEscaped(value RepositoryAdvisoryCreate_vulnerabilities_packageable)() { + m.packageEscaped = value +} +// SetPatchedVersions sets the patched_versions property value. The package version(s) that resolve the vulnerability. +func (m *RepositoryAdvisoryCreate_vulnerabilities) SetPatchedVersions(value *string)() { + m.patched_versions = value +} +// SetVulnerableFunctions sets the vulnerable_functions property value. The functions in the package that are affected. +func (m *RepositoryAdvisoryCreate_vulnerabilities) SetVulnerableFunctions(value []string)() { + m.vulnerable_functions = value +} +// SetVulnerableVersionRange sets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +func (m *RepositoryAdvisoryCreate_vulnerabilities) SetVulnerableVersionRange(value *string)() { + m.vulnerable_version_range = value +} +type RepositoryAdvisoryCreate_vulnerabilitiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPackageEscaped()(RepositoryAdvisoryCreate_vulnerabilities_packageable) + GetPatchedVersions()(*string) + GetVulnerableFunctions()([]string) + GetVulnerableVersionRange()(*string) + SetPackageEscaped(value RepositoryAdvisoryCreate_vulnerabilities_packageable)() + SetPatchedVersions(value *string)() + SetVulnerableFunctions(value []string)() + SetVulnerableVersionRange(value *string)() +} diff --git a/pkg/github/models/repository_advisory_create_vulnerabilities_package.go b/pkg/github/models/repository_advisory_create_vulnerabilities_package.go new file mode 100644 index 0000000..2b71ccf --- /dev/null +++ b/pkg/github/models/repository_advisory_create_vulnerabilities_package.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryAdvisoryCreate_vulnerabilities_package the name of the package affected by the vulnerability. +type RepositoryAdvisoryCreate_vulnerabilities_package struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The package's language or package management ecosystem. + ecosystem *SecurityAdvisoryEcosystems + // The unique package name within its ecosystem. + name *string +} +// NewRepositoryAdvisoryCreate_vulnerabilities_package instantiates a new RepositoryAdvisoryCreate_vulnerabilities_package and sets the default values. +func NewRepositoryAdvisoryCreate_vulnerabilities_package()(*RepositoryAdvisoryCreate_vulnerabilities_package) { + m := &RepositoryAdvisoryCreate_vulnerabilities_package{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisoryCreate_vulnerabilities_packageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryCreate_vulnerabilities_packageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryCreate_vulnerabilities_package(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEcosystem gets the ecosystem property value. The package's language or package management ecosystem. +// returns a *SecurityAdvisoryEcosystems when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) GetEcosystem()(*SecurityAdvisoryEcosystems) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryEcosystems) + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(val.(*SecurityAdvisoryEcosystems)) + } + 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 + } + return res +} +// GetName gets the name property value. The unique package name within its ecosystem. +// returns a *string when successful +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEcosystem() != nil { + cast := (*m.GetEcosystem()).String() + err := writer.WriteStringValue("ecosystem", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *RepositoryAdvisoryCreate_vulnerabilities_package) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEcosystem sets the ecosystem property value. The package's language or package management ecosystem. +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) SetEcosystem(value *SecurityAdvisoryEcosystems)() { + m.ecosystem = value +} +// SetName sets the name property value. The unique package name within its ecosystem. +func (m *RepositoryAdvisoryCreate_vulnerabilities_package) SetName(value *string)() { + m.name = value +} +type RepositoryAdvisoryCreate_vulnerabilities_packageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystem()(*SecurityAdvisoryEcosystems) + GetName()(*string) + SetEcosystem(value *SecurityAdvisoryEcosystems)() + SetName(value *string)() +} diff --git a/pkg/github/models/repository_advisory_credit.go b/pkg/github/models/repository_advisory_credit.go new file mode 100644 index 0000000..7cfb237 --- /dev/null +++ b/pkg/github/models/repository_advisory_credit.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryAdvisoryCredit a credit given to a user for a repository security advisory. +type RepositoryAdvisoryCredit struct { + // The state of the user's acceptance of the credit. + state *RepositoryAdvisoryCredit_state + // The type of credit the user is receiving. + typeEscaped *SecurityAdvisoryCreditTypes + // A GitHub user. + user SimpleUserable +} +// NewRepositoryAdvisoryCredit instantiates a new RepositoryAdvisoryCredit and sets the default values. +func NewRepositoryAdvisoryCredit()(*RepositoryAdvisoryCredit) { + m := &RepositoryAdvisoryCredit{ + } + return m +} +// CreateRepositoryAdvisoryCreditFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryCreditFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryCredit(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryCredit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisoryCredit_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*RepositoryAdvisoryCredit_state)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryCreditTypes) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SecurityAdvisoryCreditTypes)) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetState gets the state property value. The state of the user's acceptance of the credit. +// returns a *RepositoryAdvisoryCredit_state when successful +func (m *RepositoryAdvisoryCredit) GetState()(*RepositoryAdvisoryCredit_state) { + return m.state +} +// GetTypeEscaped gets the type property value. The type of credit the user is receiving. +// returns a *SecurityAdvisoryCreditTypes when successful +func (m *RepositoryAdvisoryCredit) GetTypeEscaped()(*SecurityAdvisoryCreditTypes) { + return m.typeEscaped +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *RepositoryAdvisoryCredit) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryCredit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + return nil +} +// SetState sets the state property value. The state of the user's acceptance of the credit. +func (m *RepositoryAdvisoryCredit) SetState(value *RepositoryAdvisoryCredit_state)() { + m.state = value +} +// SetTypeEscaped sets the type property value. The type of credit the user is receiving. +func (m *RepositoryAdvisoryCredit) SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() { + m.typeEscaped = value +} +// SetUser sets the user property value. A GitHub user. +func (m *RepositoryAdvisoryCredit) SetUser(value SimpleUserable)() { + m.user = value +} +type RepositoryAdvisoryCreditable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetState()(*RepositoryAdvisoryCredit_state) + GetTypeEscaped()(*SecurityAdvisoryCreditTypes) + GetUser()(SimpleUserable) + SetState(value *RepositoryAdvisoryCredit_state)() + SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/repository_advisory_credit_state.go b/pkg/github/models/repository_advisory_credit_state.go new file mode 100644 index 0000000..00b230f --- /dev/null +++ b/pkg/github/models/repository_advisory_credit_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The state of the user's acceptance of the credit. +type RepositoryAdvisoryCredit_state int + +const ( + ACCEPTED_REPOSITORYADVISORYCREDIT_STATE RepositoryAdvisoryCredit_state = iota + DECLINED_REPOSITORYADVISORYCREDIT_STATE + PENDING_REPOSITORYADVISORYCREDIT_STATE +) + +func (i RepositoryAdvisoryCredit_state) String() string { + return []string{"accepted", "declined", "pending"}[i] +} +func ParseRepositoryAdvisoryCredit_state(v string) (any, error) { + result := ACCEPTED_REPOSITORYADVISORYCREDIT_STATE + switch v { + case "accepted": + result = ACCEPTED_REPOSITORYADVISORYCREDIT_STATE + case "declined": + result = DECLINED_REPOSITORYADVISORYCREDIT_STATE + case "pending": + result = PENDING_REPOSITORYADVISORYCREDIT_STATE + default: + return 0, errors.New("Unknown RepositoryAdvisoryCredit_state value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisoryCredit_state(values []RepositoryAdvisoryCredit_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisoryCredit_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_credits.go b/pkg/github/models/repository_advisory_credits.go new file mode 100644 index 0000000..ea68102 --- /dev/null +++ b/pkg/github/models/repository_advisory_credits.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisory_credits struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The username of the user credited. + login *string + // The type of credit the user is receiving. + typeEscaped *SecurityAdvisoryCreditTypes +} +// NewRepositoryAdvisory_credits instantiates a new RepositoryAdvisory_credits and sets the default values. +func NewRepositoryAdvisory_credits()(*RepositoryAdvisory_credits) { + m := &RepositoryAdvisory_credits{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisory_creditsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisory_creditsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisory_credits(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisory_credits) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisory_credits) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryCreditTypes) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SecurityAdvisoryCreditTypes)) + } + return nil + } + return res +} +// GetLogin gets the login property value. The username of the user credited. +// returns a *string when successful +func (m *RepositoryAdvisory_credits) GetLogin()(*string) { + return m.login +} +// GetTypeEscaped gets the type property value. The type of credit the user is receiving. +// returns a *SecurityAdvisoryCreditTypes when successful +func (m *RepositoryAdvisory_credits) GetTypeEscaped()(*SecurityAdvisoryCreditTypes) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryAdvisory_credits) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryAdvisory_credits) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLogin sets the login property value. The username of the user credited. +func (m *RepositoryAdvisory_credits) SetLogin(value *string)() { + m.login = value +} +// SetTypeEscaped sets the type property value. The type of credit the user is receiving. +func (m *RepositoryAdvisory_credits) SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() { + m.typeEscaped = value +} +type RepositoryAdvisory_creditsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLogin()(*string) + GetTypeEscaped()(*SecurityAdvisoryCreditTypes) + SetLogin(value *string)() + SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() +} diff --git a/pkg/github/models/repository_advisory_cvss.go b/pkg/github/models/repository_advisory_cvss.go new file mode 100644 index 0000000..2eba683 --- /dev/null +++ b/pkg/github/models/repository_advisory_cvss.go @@ -0,0 +1,103 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisory_cvss struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The CVSS score. + score *float64 + // The CVSS vector. + vector_string *string +} +// NewRepositoryAdvisory_cvss instantiates a new RepositoryAdvisory_cvss and sets the default values. +func NewRepositoryAdvisory_cvss()(*RepositoryAdvisory_cvss) { + m := &RepositoryAdvisory_cvss{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisory_cvssFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisory_cvssFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisory_cvss(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisory_cvss) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisory_cvss) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["vector_string"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVectorString(val) + } + return nil + } + return res +} +// GetScore gets the score property value. The CVSS score. +// returns a *float64 when successful +func (m *RepositoryAdvisory_cvss) GetScore()(*float64) { + return m.score +} +// GetVectorString gets the vector_string property value. The CVSS vector. +// returns a *string when successful +func (m *RepositoryAdvisory_cvss) GetVectorString()(*string) { + return m.vector_string +} +// Serialize serializes information the current object +func (m *RepositoryAdvisory_cvss) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("vector_string", m.GetVectorString()) + 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 *RepositoryAdvisory_cvss) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetScore sets the score property value. The CVSS score. +func (m *RepositoryAdvisory_cvss) SetScore(value *float64)() { + m.score = value +} +// SetVectorString sets the vector_string property value. The CVSS vector. +func (m *RepositoryAdvisory_cvss) SetVectorString(value *string)() { + m.vector_string = value +} +type RepositoryAdvisory_cvssable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetScore()(*float64) + GetVectorString()(*string) + SetScore(value *float64)() + SetVectorString(value *string)() +} diff --git a/pkg/github/models/repository_advisory_cwes.go b/pkg/github/models/repository_advisory_cwes.go new file mode 100644 index 0000000..e1b0f2a --- /dev/null +++ b/pkg/github/models/repository_advisory_cwes.go @@ -0,0 +1,103 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisory_cwes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The Common Weakness Enumeration (CWE) identifier. + cwe_id *string + // The name of the CWE. + name *string +} +// NewRepositoryAdvisory_cwes instantiates a new RepositoryAdvisory_cwes and sets the default values. +func NewRepositoryAdvisory_cwes()(*RepositoryAdvisory_cwes) { + m := &RepositoryAdvisory_cwes{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisory_cwesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisory_cwesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisory_cwes(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisory_cwes) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCweId gets the cwe_id property value. The Common Weakness Enumeration (CWE) identifier. +// returns a *string when successful +func (m *RepositoryAdvisory_cwes) GetCweId()(*string) { + return m.cwe_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisory_cwes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cwe_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCweId(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 + } + return res +} +// GetName gets the name property value. The name of the CWE. +// returns a *string when successful +func (m *RepositoryAdvisory_cwes) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *RepositoryAdvisory_cwes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cwe_id", m.GetCweId()) + 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 *RepositoryAdvisory_cwes) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCweId sets the cwe_id property value. The Common Weakness Enumeration (CWE) identifier. +func (m *RepositoryAdvisory_cwes) SetCweId(value *string)() { + m.cwe_id = value +} +// SetName sets the name property value. The name of the CWE. +func (m *RepositoryAdvisory_cwes) SetName(value *string)() { + m.name = value +} +type RepositoryAdvisory_cwesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCweId()(*string) + GetName()(*string) + SetCweId(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/repository_advisory_identifiers.go b/pkg/github/models/repository_advisory_identifiers.go new file mode 100644 index 0000000..ab3b3b3 --- /dev/null +++ b/pkg/github/models/repository_advisory_identifiers.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisory_identifiers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type of identifier. + typeEscaped *RepositoryAdvisory_identifiers_type + // The identifier value. + value *string +} +// NewRepositoryAdvisory_identifiers instantiates a new RepositoryAdvisory_identifiers and sets the default values. +func NewRepositoryAdvisory_identifiers()(*RepositoryAdvisory_identifiers) { + m := &RepositoryAdvisory_identifiers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisory_identifiersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisory_identifiersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisory_identifiers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisory_identifiers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisory_identifiers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisory_identifiers_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryAdvisory_identifiers_type)) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type of identifier. +// returns a *RepositoryAdvisory_identifiers_type when successful +func (m *RepositoryAdvisory_identifiers) GetTypeEscaped()(*RepositoryAdvisory_identifiers_type) { + return m.typeEscaped +} +// GetValue gets the value property value. The identifier value. +// returns a *string when successful +func (m *RepositoryAdvisory_identifiers) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *RepositoryAdvisory_identifiers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *RepositoryAdvisory_identifiers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type of identifier. +func (m *RepositoryAdvisory_identifiers) SetTypeEscaped(value *RepositoryAdvisory_identifiers_type)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The identifier value. +func (m *RepositoryAdvisory_identifiers) SetValue(value *string)() { + m.value = value +} +type RepositoryAdvisory_identifiersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*RepositoryAdvisory_identifiers_type) + GetValue()(*string) + SetTypeEscaped(value *RepositoryAdvisory_identifiers_type)() + SetValue(value *string)() +} diff --git a/pkg/github/models/repository_advisory_identifiers_type.go b/pkg/github/models/repository_advisory_identifiers_type.go new file mode 100644 index 0000000..1cfd6f0 --- /dev/null +++ b/pkg/github/models/repository_advisory_identifiers_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of identifier. +type RepositoryAdvisory_identifiers_type int + +const ( + CVE_REPOSITORYADVISORY_IDENTIFIERS_TYPE RepositoryAdvisory_identifiers_type = iota + GHSA_REPOSITORYADVISORY_IDENTIFIERS_TYPE +) + +func (i RepositoryAdvisory_identifiers_type) String() string { + return []string{"CVE", "GHSA"}[i] +} +func ParseRepositoryAdvisory_identifiers_type(v string) (any, error) { + result := CVE_REPOSITORYADVISORY_IDENTIFIERS_TYPE + switch v { + case "CVE": + result = CVE_REPOSITORYADVISORY_IDENTIFIERS_TYPE + case "GHSA": + result = GHSA_REPOSITORYADVISORY_IDENTIFIERS_TYPE + default: + return 0, errors.New("Unknown RepositoryAdvisory_identifiers_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisory_identifiers_type(values []RepositoryAdvisory_identifiers_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisory_identifiers_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_severity.go b/pkg/github/models/repository_advisory_severity.go new file mode 100644 index 0000000..c9a8cf0 --- /dev/null +++ b/pkg/github/models/repository_advisory_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the advisory. +type RepositoryAdvisory_severity int + +const ( + CRITICAL_REPOSITORYADVISORY_SEVERITY RepositoryAdvisory_severity = iota + HIGH_REPOSITORYADVISORY_SEVERITY + MEDIUM_REPOSITORYADVISORY_SEVERITY + LOW_REPOSITORYADVISORY_SEVERITY +) + +func (i RepositoryAdvisory_severity) String() string { + return []string{"critical", "high", "medium", "low"}[i] +} +func ParseRepositoryAdvisory_severity(v string) (any, error) { + result := CRITICAL_REPOSITORYADVISORY_SEVERITY + switch v { + case "critical": + result = CRITICAL_REPOSITORYADVISORY_SEVERITY + case "high": + result = HIGH_REPOSITORYADVISORY_SEVERITY + case "medium": + result = MEDIUM_REPOSITORYADVISORY_SEVERITY + case "low": + result = LOW_REPOSITORYADVISORY_SEVERITY + default: + return 0, errors.New("Unknown RepositoryAdvisory_severity value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisory_severity(values []RepositoryAdvisory_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisory_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_state.go b/pkg/github/models/repository_advisory_state.go new file mode 100644 index 0000000..ba49497 --- /dev/null +++ b/pkg/github/models/repository_advisory_state.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The state of the advisory. +type RepositoryAdvisory_state int + +const ( + PUBLISHED_REPOSITORYADVISORY_STATE RepositoryAdvisory_state = iota + CLOSED_REPOSITORYADVISORY_STATE + WITHDRAWN_REPOSITORYADVISORY_STATE + DRAFT_REPOSITORYADVISORY_STATE + TRIAGE_REPOSITORYADVISORY_STATE +) + +func (i RepositoryAdvisory_state) String() string { + return []string{"published", "closed", "withdrawn", "draft", "triage"}[i] +} +func ParseRepositoryAdvisory_state(v string) (any, error) { + result := PUBLISHED_REPOSITORYADVISORY_STATE + switch v { + case "published": + result = PUBLISHED_REPOSITORYADVISORY_STATE + case "closed": + result = CLOSED_REPOSITORYADVISORY_STATE + case "withdrawn": + result = WITHDRAWN_REPOSITORYADVISORY_STATE + case "draft": + result = DRAFT_REPOSITORYADVISORY_STATE + case "triage": + result = TRIAGE_REPOSITORYADVISORY_STATE + default: + return 0, errors.New("Unknown RepositoryAdvisory_state value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisory_state(values []RepositoryAdvisory_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisory_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_submission.go b/pkg/github/models/repository_advisory_submission.go new file mode 100644 index 0000000..784b6d6 --- /dev/null +++ b/pkg/github/models/repository_advisory_submission.go @@ -0,0 +1,74 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisory_submission struct { + // Whether a private vulnerability report was accepted by the repository's administrators. + accepted *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewRepositoryAdvisory_submission instantiates a new RepositoryAdvisory_submission and sets the default values. +func NewRepositoryAdvisory_submission()(*RepositoryAdvisory_submission) { + m := &RepositoryAdvisory_submission{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisory_submissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisory_submissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisory_submission(), nil +} +// GetAccepted gets the accepted property value. Whether a private vulnerability report was accepted by the repository's administrators. +// returns a *bool when successful +func (m *RepositoryAdvisory_submission) GetAccepted()(*bool) { + return m.accepted +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisory_submission) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisory_submission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccepted(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *RepositoryAdvisory_submission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccepted sets the accepted property value. Whether a private vulnerability report was accepted by the repository's administrators. +func (m *RepositoryAdvisory_submission) SetAccepted(value *bool)() { + m.accepted = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryAdvisory_submission) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type RepositoryAdvisory_submissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccepted()(*bool) + SetAccepted(value *bool)() +} diff --git a/pkg/github/models/repository_advisory_update.go b/pkg/github/models/repository_advisory_update.go new file mode 100644 index 0000000..f027ee5 --- /dev/null +++ b/pkg/github/models/repository_advisory_update.go @@ -0,0 +1,395 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisoryUpdate struct { + // A list of team slugs which have been granted write access to the advisory. + collaborating_teams []string + // A list of usernames who have been granted write access to the advisory. + collaborating_users []string + // A list of users receiving credit for their participation in the security advisory. + credits []RepositoryAdvisoryUpdate_creditsable + // The Common Vulnerabilities and Exposures (CVE) ID. + cve_id *string + // The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. + cvss_vector_string *string + // A list of Common Weakness Enumeration (CWE) IDs. + cwe_ids []string + // A detailed description of what the advisory impacts. + description *string + // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + severity *RepositoryAdvisoryUpdate_severity + // The state of the advisory. + state *RepositoryAdvisoryUpdate_state + // A short summary of the advisory. + summary *string + // A product affected by the vulnerability detailed in a repository security advisory. + vulnerabilities []RepositoryAdvisoryUpdate_vulnerabilitiesable +} +// NewRepositoryAdvisoryUpdate instantiates a new RepositoryAdvisoryUpdate and sets the default values. +func NewRepositoryAdvisoryUpdate()(*RepositoryAdvisoryUpdate) { + m := &RepositoryAdvisoryUpdate{ + } + return m +} +// CreateRepositoryAdvisoryUpdateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryUpdateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryUpdate(), nil +} +// GetCollaboratingTeams gets the collaborating_teams property value. A list of team slugs which have been granted write access to the advisory. +// returns a []string when successful +func (m *RepositoryAdvisoryUpdate) GetCollaboratingTeams()([]string) { + return m.collaborating_teams +} +// GetCollaboratingUsers gets the collaborating_users property value. A list of usernames who have been granted write access to the advisory. +// returns a []string when successful +func (m *RepositoryAdvisoryUpdate) GetCollaboratingUsers()([]string) { + return m.collaborating_users +} +// GetCredits gets the credits property value. A list of users receiving credit for their participation in the security advisory. +// returns a []RepositoryAdvisoryUpdate_creditsable when successful +func (m *RepositoryAdvisoryUpdate) GetCredits()([]RepositoryAdvisoryUpdate_creditsable) { + return m.credits +} +// GetCveId gets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate) GetCveId()(*string) { + return m.cve_id +} +// GetCvssVectorString gets the cvss_vector_string property value. The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate) GetCvssVectorString()(*string) { + return m.cvss_vector_string +} +// GetCweIds gets the cwe_ids property value. A list of Common Weakness Enumeration (CWE) IDs. +// returns a []string when successful +func (m *RepositoryAdvisoryUpdate) GetCweIds()([]string) { + return m.cwe_ids +} +// GetDescription gets the description property value. A detailed description of what the advisory impacts. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryUpdate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["collaborating_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCollaboratingTeams(res) + } + return nil + } + res["collaborating_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCollaboratingUsers(res) + } + return nil + } + res["credits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisoryUpdate_creditsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisoryUpdate_creditsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisoryUpdate_creditsable) + } + } + m.SetCredits(res) + } + return nil + } + res["cve_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCveId(val) + } + return nil + } + res["cvss_vector_string"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCvssVectorString(val) + } + return nil + } + res["cwe_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetCweIds(res) + } + 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["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisoryUpdate_severity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*RepositoryAdvisoryUpdate_severity)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryAdvisoryUpdate_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*RepositoryAdvisoryUpdate_state)) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["vulnerabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryAdvisoryUpdate_vulnerabilitiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryAdvisoryUpdate_vulnerabilitiesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryAdvisoryUpdate_vulnerabilitiesable) + } + } + m.SetVulnerabilities(res) + } + return nil + } + return res +} +// GetSeverity gets the severity property value. The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +// returns a *RepositoryAdvisoryUpdate_severity when successful +func (m *RepositoryAdvisoryUpdate) GetSeverity()(*RepositoryAdvisoryUpdate_severity) { + return m.severity +} +// GetState gets the state property value. The state of the advisory. +// returns a *RepositoryAdvisoryUpdate_state when successful +func (m *RepositoryAdvisoryUpdate) GetState()(*RepositoryAdvisoryUpdate_state) { + return m.state +} +// GetSummary gets the summary property value. A short summary of the advisory. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate) GetSummary()(*string) { + return m.summary +} +// GetVulnerabilities gets the vulnerabilities property value. A product affected by the vulnerability detailed in a repository security advisory. +// returns a []RepositoryAdvisoryUpdate_vulnerabilitiesable when successful +func (m *RepositoryAdvisoryUpdate) GetVulnerabilities()([]RepositoryAdvisoryUpdate_vulnerabilitiesable) { + return m.vulnerabilities +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryUpdate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCollaboratingTeams() != nil { + err := writer.WriteCollectionOfStringValues("collaborating_teams", m.GetCollaboratingTeams()) + if err != nil { + return err + } + } + if m.GetCollaboratingUsers() != nil { + err := writer.WriteCollectionOfStringValues("collaborating_users", m.GetCollaboratingUsers()) + if err != nil { + return err + } + } + if m.GetCredits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCredits())) + for i, v := range m.GetCredits() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("credits", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cve_id", m.GetCveId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cvss_vector_string", m.GetCvssVectorString()) + if err != nil { + return err + } + } + if m.GetCweIds() != nil { + err := writer.WriteCollectionOfStringValues("cwe_ids", m.GetCweIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err := writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetVulnerabilities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilities())) + for i, v := range m.GetVulnerabilities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("vulnerabilities", cast) + if err != nil { + return err + } + } + return nil +} +// SetCollaboratingTeams sets the collaborating_teams property value. A list of team slugs which have been granted write access to the advisory. +func (m *RepositoryAdvisoryUpdate) SetCollaboratingTeams(value []string)() { + m.collaborating_teams = value +} +// SetCollaboratingUsers sets the collaborating_users property value. A list of usernames who have been granted write access to the advisory. +func (m *RepositoryAdvisoryUpdate) SetCollaboratingUsers(value []string)() { + m.collaborating_users = value +} +// SetCredits sets the credits property value. A list of users receiving credit for their participation in the security advisory. +func (m *RepositoryAdvisoryUpdate) SetCredits(value []RepositoryAdvisoryUpdate_creditsable)() { + m.credits = value +} +// SetCveId sets the cve_id property value. The Common Vulnerabilities and Exposures (CVE) ID. +func (m *RepositoryAdvisoryUpdate) SetCveId(value *string)() { + m.cve_id = value +} +// SetCvssVectorString sets the cvss_vector_string property value. The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +func (m *RepositoryAdvisoryUpdate) SetCvssVectorString(value *string)() { + m.cvss_vector_string = value +} +// SetCweIds sets the cwe_ids property value. A list of Common Weakness Enumeration (CWE) IDs. +func (m *RepositoryAdvisoryUpdate) SetCweIds(value []string)() { + m.cwe_ids = value +} +// SetDescription sets the description property value. A detailed description of what the advisory impacts. +func (m *RepositoryAdvisoryUpdate) SetDescription(value *string)() { + m.description = value +} +// SetSeverity sets the severity property value. The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +func (m *RepositoryAdvisoryUpdate) SetSeverity(value *RepositoryAdvisoryUpdate_severity)() { + m.severity = value +} +// SetState sets the state property value. The state of the advisory. +func (m *RepositoryAdvisoryUpdate) SetState(value *RepositoryAdvisoryUpdate_state)() { + m.state = value +} +// SetSummary sets the summary property value. A short summary of the advisory. +func (m *RepositoryAdvisoryUpdate) SetSummary(value *string)() { + m.summary = value +} +// SetVulnerabilities sets the vulnerabilities property value. A product affected by the vulnerability detailed in a repository security advisory. +func (m *RepositoryAdvisoryUpdate) SetVulnerabilities(value []RepositoryAdvisoryUpdate_vulnerabilitiesable)() { + m.vulnerabilities = value +} +type RepositoryAdvisoryUpdateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollaboratingTeams()([]string) + GetCollaboratingUsers()([]string) + GetCredits()([]RepositoryAdvisoryUpdate_creditsable) + GetCveId()(*string) + GetCvssVectorString()(*string) + GetCweIds()([]string) + GetDescription()(*string) + GetSeverity()(*RepositoryAdvisoryUpdate_severity) + GetState()(*RepositoryAdvisoryUpdate_state) + GetSummary()(*string) + GetVulnerabilities()([]RepositoryAdvisoryUpdate_vulnerabilitiesable) + SetCollaboratingTeams(value []string)() + SetCollaboratingUsers(value []string)() + SetCredits(value []RepositoryAdvisoryUpdate_creditsable)() + SetCveId(value *string)() + SetCvssVectorString(value *string)() + SetCweIds(value []string)() + SetDescription(value *string)() + SetSeverity(value *RepositoryAdvisoryUpdate_severity)() + SetState(value *RepositoryAdvisoryUpdate_state)() + SetSummary(value *string)() + SetVulnerabilities(value []RepositoryAdvisoryUpdate_vulnerabilitiesable)() +} diff --git a/pkg/github/models/repository_advisory_update_credits.go b/pkg/github/models/repository_advisory_update_credits.go new file mode 100644 index 0000000..316dcb3 --- /dev/null +++ b/pkg/github/models/repository_advisory_update_credits.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisoryUpdate_credits struct { + // The username of the user credited. + login *string + // The type of credit the user is receiving. + typeEscaped *SecurityAdvisoryCreditTypes +} +// NewRepositoryAdvisoryUpdate_credits instantiates a new RepositoryAdvisoryUpdate_credits and sets the default values. +func NewRepositoryAdvisoryUpdate_credits()(*RepositoryAdvisoryUpdate_credits) { + m := &RepositoryAdvisoryUpdate_credits{ + } + return m +} +// CreateRepositoryAdvisoryUpdate_creditsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryUpdate_creditsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryUpdate_credits(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryUpdate_credits) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryCreditTypes) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SecurityAdvisoryCreditTypes)) + } + return nil + } + return res +} +// GetLogin gets the login property value. The username of the user credited. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate_credits) GetLogin()(*string) { + return m.login +} +// GetTypeEscaped gets the type property value. The type of credit the user is receiving. +// returns a *SecurityAdvisoryCreditTypes when successful +func (m *RepositoryAdvisoryUpdate_credits) GetTypeEscaped()(*SecurityAdvisoryCreditTypes) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryUpdate_credits) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetLogin sets the login property value. The username of the user credited. +func (m *RepositoryAdvisoryUpdate_credits) SetLogin(value *string)() { + m.login = value +} +// SetTypeEscaped sets the type property value. The type of credit the user is receiving. +func (m *RepositoryAdvisoryUpdate_credits) SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() { + m.typeEscaped = value +} +type RepositoryAdvisoryUpdate_creditsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLogin()(*string) + GetTypeEscaped()(*SecurityAdvisoryCreditTypes) + SetLogin(value *string)() + SetTypeEscaped(value *SecurityAdvisoryCreditTypes)() +} diff --git a/pkg/github/models/repository_advisory_update_severity.go b/pkg/github/models/repository_advisory_update_severity.go new file mode 100644 index 0000000..1ce74d4 --- /dev/null +++ b/pkg/github/models/repository_advisory_update_severity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. +type RepositoryAdvisoryUpdate_severity int + +const ( + CRITICAL_REPOSITORYADVISORYUPDATE_SEVERITY RepositoryAdvisoryUpdate_severity = iota + HIGH_REPOSITORYADVISORYUPDATE_SEVERITY + MEDIUM_REPOSITORYADVISORYUPDATE_SEVERITY + LOW_REPOSITORYADVISORYUPDATE_SEVERITY +) + +func (i RepositoryAdvisoryUpdate_severity) String() string { + return []string{"critical", "high", "medium", "low"}[i] +} +func ParseRepositoryAdvisoryUpdate_severity(v string) (any, error) { + result := CRITICAL_REPOSITORYADVISORYUPDATE_SEVERITY + switch v { + case "critical": + result = CRITICAL_REPOSITORYADVISORYUPDATE_SEVERITY + case "high": + result = HIGH_REPOSITORYADVISORYUPDATE_SEVERITY + case "medium": + result = MEDIUM_REPOSITORYADVISORYUPDATE_SEVERITY + case "low": + result = LOW_REPOSITORYADVISORYUPDATE_SEVERITY + default: + return 0, errors.New("Unknown RepositoryAdvisoryUpdate_severity value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisoryUpdate_severity(values []RepositoryAdvisoryUpdate_severity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisoryUpdate_severity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_update_state.go b/pkg/github/models/repository_advisory_update_state.go new file mode 100644 index 0000000..7b4f1e8 --- /dev/null +++ b/pkg/github/models/repository_advisory_update_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The state of the advisory. +type RepositoryAdvisoryUpdate_state int + +const ( + PUBLISHED_REPOSITORYADVISORYUPDATE_STATE RepositoryAdvisoryUpdate_state = iota + CLOSED_REPOSITORYADVISORYUPDATE_STATE + DRAFT_REPOSITORYADVISORYUPDATE_STATE +) + +func (i RepositoryAdvisoryUpdate_state) String() string { + return []string{"published", "closed", "draft"}[i] +} +func ParseRepositoryAdvisoryUpdate_state(v string) (any, error) { + result := PUBLISHED_REPOSITORYADVISORYUPDATE_STATE + switch v { + case "published": + result = PUBLISHED_REPOSITORYADVISORYUPDATE_STATE + case "closed": + result = CLOSED_REPOSITORYADVISORYUPDATE_STATE + case "draft": + result = DRAFT_REPOSITORYADVISORYUPDATE_STATE + default: + return 0, errors.New("Unknown RepositoryAdvisoryUpdate_state value: " + v) + } + return &result, nil +} +func SerializeRepositoryAdvisoryUpdate_state(values []RepositoryAdvisoryUpdate_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryAdvisoryUpdate_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_advisory_update_vulnerabilities.go b/pkg/github/models/repository_advisory_update_vulnerabilities.go new file mode 100644 index 0000000..7bc1178 --- /dev/null +++ b/pkg/github/models/repository_advisory_update_vulnerabilities.go @@ -0,0 +1,154 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryAdvisoryUpdate_vulnerabilities struct { + // The name of the package affected by the vulnerability. + packageEscaped RepositoryAdvisoryUpdate_vulnerabilities_packageable + // The package version(s) that resolve the vulnerability. + patched_versions *string + // The functions in the package that are affected. + vulnerable_functions []string + // The range of the package versions affected by the vulnerability. + vulnerable_version_range *string +} +// NewRepositoryAdvisoryUpdate_vulnerabilities instantiates a new RepositoryAdvisoryUpdate_vulnerabilities and sets the default values. +func NewRepositoryAdvisoryUpdate_vulnerabilities()(*RepositoryAdvisoryUpdate_vulnerabilities) { + m := &RepositoryAdvisoryUpdate_vulnerabilities{ + } + return m +} +// CreateRepositoryAdvisoryUpdate_vulnerabilitiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryUpdate_vulnerabilitiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryUpdate_vulnerabilities(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryAdvisoryUpdate_vulnerabilities_packageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(RepositoryAdvisoryUpdate_vulnerabilities_packageable)) + } + return nil + } + res["patched_versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchedVersions(val) + } + return nil + } + res["vulnerable_functions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetVulnerableFunctions(res) + } + return nil + } + res["vulnerable_version_range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVulnerableVersionRange(val) + } + return nil + } + return res +} +// GetPackageEscaped gets the package property value. The name of the package affected by the vulnerability. +// returns a RepositoryAdvisoryUpdate_vulnerabilities_packageable when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities) GetPackageEscaped()(RepositoryAdvisoryUpdate_vulnerabilities_packageable) { + return m.packageEscaped +} +// GetPatchedVersions gets the patched_versions property value. The package version(s) that resolve the vulnerability. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities) GetPatchedVersions()(*string) { + return m.patched_versions +} +// GetVulnerableFunctions gets the vulnerable_functions property value. The functions in the package that are affected. +// returns a []string when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities) GetVulnerableFunctions()([]string) { + return m.vulnerable_functions +} +// GetVulnerableVersionRange gets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities) GetVulnerableVersionRange()(*string) { + return m.vulnerable_version_range +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryUpdate_vulnerabilities) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("package", m.GetPackageEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patched_versions", m.GetPatchedVersions()) + if err != nil { + return err + } + } + if m.GetVulnerableFunctions() != nil { + err := writer.WriteCollectionOfStringValues("vulnerable_functions", m.GetVulnerableFunctions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vulnerable_version_range", m.GetVulnerableVersionRange()) + if err != nil { + return err + } + } + return nil +} +// SetPackageEscaped sets the package property value. The name of the package affected by the vulnerability. +func (m *RepositoryAdvisoryUpdate_vulnerabilities) SetPackageEscaped(value RepositoryAdvisoryUpdate_vulnerabilities_packageable)() { + m.packageEscaped = value +} +// SetPatchedVersions sets the patched_versions property value. The package version(s) that resolve the vulnerability. +func (m *RepositoryAdvisoryUpdate_vulnerabilities) SetPatchedVersions(value *string)() { + m.patched_versions = value +} +// SetVulnerableFunctions sets the vulnerable_functions property value. The functions in the package that are affected. +func (m *RepositoryAdvisoryUpdate_vulnerabilities) SetVulnerableFunctions(value []string)() { + m.vulnerable_functions = value +} +// SetVulnerableVersionRange sets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +func (m *RepositoryAdvisoryUpdate_vulnerabilities) SetVulnerableVersionRange(value *string)() { + m.vulnerable_version_range = value +} +type RepositoryAdvisoryUpdate_vulnerabilitiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPackageEscaped()(RepositoryAdvisoryUpdate_vulnerabilities_packageable) + GetPatchedVersions()(*string) + GetVulnerableFunctions()([]string) + GetVulnerableVersionRange()(*string) + SetPackageEscaped(value RepositoryAdvisoryUpdate_vulnerabilities_packageable)() + SetPatchedVersions(value *string)() + SetVulnerableFunctions(value []string)() + SetVulnerableVersionRange(value *string)() +} diff --git a/pkg/github/models/repository_advisory_update_vulnerabilities_package.go b/pkg/github/models/repository_advisory_update_vulnerabilities_package.go new file mode 100644 index 0000000..017867b --- /dev/null +++ b/pkg/github/models/repository_advisory_update_vulnerabilities_package.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryAdvisoryUpdate_vulnerabilities_package the name of the package affected by the vulnerability. +type RepositoryAdvisoryUpdate_vulnerabilities_package struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The package's language or package management ecosystem. + ecosystem *SecurityAdvisoryEcosystems + // The unique package name within its ecosystem. + name *string +} +// NewRepositoryAdvisoryUpdate_vulnerabilities_package instantiates a new RepositoryAdvisoryUpdate_vulnerabilities_package and sets the default values. +func NewRepositoryAdvisoryUpdate_vulnerabilities_package()(*RepositoryAdvisoryUpdate_vulnerabilities_package) { + m := &RepositoryAdvisoryUpdate_vulnerabilities_package{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisoryUpdate_vulnerabilities_packageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryUpdate_vulnerabilities_packageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryUpdate_vulnerabilities_package(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEcosystem gets the ecosystem property value. The package's language or package management ecosystem. +// returns a *SecurityAdvisoryEcosystems when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) GetEcosystem()(*SecurityAdvisoryEcosystems) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryEcosystems) + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(val.(*SecurityAdvisoryEcosystems)) + } + 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 + } + return res +} +// GetName gets the name property value. The unique package name within its ecosystem. +// returns a *string when successful +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEcosystem() != nil { + cast := (*m.GetEcosystem()).String() + err := writer.WriteStringValue("ecosystem", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *RepositoryAdvisoryUpdate_vulnerabilities_package) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEcosystem sets the ecosystem property value. The package's language or package management ecosystem. +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) SetEcosystem(value *SecurityAdvisoryEcosystems)() { + m.ecosystem = value +} +// SetName sets the name property value. The unique package name within its ecosystem. +func (m *RepositoryAdvisoryUpdate_vulnerabilities_package) SetName(value *string)() { + m.name = value +} +type RepositoryAdvisoryUpdate_vulnerabilities_packageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystem()(*SecurityAdvisoryEcosystems) + GetName()(*string) + SetEcosystem(value *SecurityAdvisoryEcosystems)() + SetName(value *string)() +} diff --git a/pkg/github/models/repository_advisory_vulnerability.go b/pkg/github/models/repository_advisory_vulnerability.go new file mode 100644 index 0000000..a97322d --- /dev/null +++ b/pkg/github/models/repository_advisory_vulnerability.go @@ -0,0 +1,155 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryAdvisoryVulnerability a product affected by the vulnerability detailed in a repository security advisory. +type RepositoryAdvisoryVulnerability struct { + // The name of the package affected by the vulnerability. + packageEscaped RepositoryAdvisoryVulnerability_packageable + // The package version(s) that resolve the vulnerability. + patched_versions *string + // The functions in the package that are affected. + vulnerable_functions []string + // The range of the package versions affected by the vulnerability. + vulnerable_version_range *string +} +// NewRepositoryAdvisoryVulnerability instantiates a new RepositoryAdvisoryVulnerability and sets the default values. +func NewRepositoryAdvisoryVulnerability()(*RepositoryAdvisoryVulnerability) { + m := &RepositoryAdvisoryVulnerability{ + } + return m +} +// CreateRepositoryAdvisoryVulnerabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryVulnerabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryVulnerability(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryVulnerability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryAdvisoryVulnerability_packageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(RepositoryAdvisoryVulnerability_packageable)) + } + return nil + } + res["patched_versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchedVersions(val) + } + return nil + } + res["vulnerable_functions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetVulnerableFunctions(res) + } + return nil + } + res["vulnerable_version_range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVulnerableVersionRange(val) + } + return nil + } + return res +} +// GetPackageEscaped gets the package property value. The name of the package affected by the vulnerability. +// returns a RepositoryAdvisoryVulnerability_packageable when successful +func (m *RepositoryAdvisoryVulnerability) GetPackageEscaped()(RepositoryAdvisoryVulnerability_packageable) { + return m.packageEscaped +} +// GetPatchedVersions gets the patched_versions property value. The package version(s) that resolve the vulnerability. +// returns a *string when successful +func (m *RepositoryAdvisoryVulnerability) GetPatchedVersions()(*string) { + return m.patched_versions +} +// GetVulnerableFunctions gets the vulnerable_functions property value. The functions in the package that are affected. +// returns a []string when successful +func (m *RepositoryAdvisoryVulnerability) GetVulnerableFunctions()([]string) { + return m.vulnerable_functions +} +// GetVulnerableVersionRange gets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +// returns a *string when successful +func (m *RepositoryAdvisoryVulnerability) GetVulnerableVersionRange()(*string) { + return m.vulnerable_version_range +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryVulnerability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("package", m.GetPackageEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("patched_versions", m.GetPatchedVersions()) + if err != nil { + return err + } + } + if m.GetVulnerableFunctions() != nil { + err := writer.WriteCollectionOfStringValues("vulnerable_functions", m.GetVulnerableFunctions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vulnerable_version_range", m.GetVulnerableVersionRange()) + if err != nil { + return err + } + } + return nil +} +// SetPackageEscaped sets the package property value. The name of the package affected by the vulnerability. +func (m *RepositoryAdvisoryVulnerability) SetPackageEscaped(value RepositoryAdvisoryVulnerability_packageable)() { + m.packageEscaped = value +} +// SetPatchedVersions sets the patched_versions property value. The package version(s) that resolve the vulnerability. +func (m *RepositoryAdvisoryVulnerability) SetPatchedVersions(value *string)() { + m.patched_versions = value +} +// SetVulnerableFunctions sets the vulnerable_functions property value. The functions in the package that are affected. +func (m *RepositoryAdvisoryVulnerability) SetVulnerableFunctions(value []string)() { + m.vulnerable_functions = value +} +// SetVulnerableVersionRange sets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +func (m *RepositoryAdvisoryVulnerability) SetVulnerableVersionRange(value *string)() { + m.vulnerable_version_range = value +} +type RepositoryAdvisoryVulnerabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPackageEscaped()(RepositoryAdvisoryVulnerability_packageable) + GetPatchedVersions()(*string) + GetVulnerableFunctions()([]string) + GetVulnerableVersionRange()(*string) + SetPackageEscaped(value RepositoryAdvisoryVulnerability_packageable)() + SetPatchedVersions(value *string)() + SetVulnerableFunctions(value []string)() + SetVulnerableVersionRange(value *string)() +} diff --git a/pkg/github/models/repository_advisory_vulnerability_package.go b/pkg/github/models/repository_advisory_vulnerability_package.go new file mode 100644 index 0000000..86fae5b --- /dev/null +++ b/pkg/github/models/repository_advisory_vulnerability_package.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryAdvisoryVulnerability_package the name of the package affected by the vulnerability. +type RepositoryAdvisoryVulnerability_package struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The package's language or package management ecosystem. + ecosystem *SecurityAdvisoryEcosystems + // The unique package name within its ecosystem. + name *string +} +// NewRepositoryAdvisoryVulnerability_package instantiates a new RepositoryAdvisoryVulnerability_package and sets the default values. +func NewRepositoryAdvisoryVulnerability_package()(*RepositoryAdvisoryVulnerability_package) { + m := &RepositoryAdvisoryVulnerability_package{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryAdvisoryVulnerability_packageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryAdvisoryVulnerability_packageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryAdvisoryVulnerability_package(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryAdvisoryVulnerability_package) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEcosystem gets the ecosystem property value. The package's language or package management ecosystem. +// returns a *SecurityAdvisoryEcosystems when successful +func (m *RepositoryAdvisoryVulnerability_package) GetEcosystem()(*SecurityAdvisoryEcosystems) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryAdvisoryVulnerability_package) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryEcosystems) + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(val.(*SecurityAdvisoryEcosystems)) + } + 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 + } + return res +} +// GetName gets the name property value. The unique package name within its ecosystem. +// returns a *string when successful +func (m *RepositoryAdvisoryVulnerability_package) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *RepositoryAdvisoryVulnerability_package) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEcosystem() != nil { + cast := (*m.GetEcosystem()).String() + err := writer.WriteStringValue("ecosystem", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *RepositoryAdvisoryVulnerability_package) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEcosystem sets the ecosystem property value. The package's language or package management ecosystem. +func (m *RepositoryAdvisoryVulnerability_package) SetEcosystem(value *SecurityAdvisoryEcosystems)() { + m.ecosystem = value +} +// SetName sets the name property value. The unique package name within its ecosystem. +func (m *RepositoryAdvisoryVulnerability_package) SetName(value *string)() { + m.name = value +} +type RepositoryAdvisoryVulnerability_packageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystem()(*SecurityAdvisoryEcosystems) + GetName()(*string) + SetEcosystem(value *SecurityAdvisoryEcosystems)() + SetName(value *string)() +} diff --git a/pkg/github/models/repository_collaborator_permission.go b/pkg/github/models/repository_collaborator_permission.go new file mode 100644 index 0000000..59df308 --- /dev/null +++ b/pkg/github/models/repository_collaborator_permission.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryCollaboratorPermission repository Collaborator Permission +type RepositoryCollaboratorPermission struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permission property + permission *string + // The role_name property + role_name *string + // Collaborator + user NullableCollaboratorable +} +// NewRepositoryCollaboratorPermission instantiates a new RepositoryCollaboratorPermission and sets the default values. +func NewRepositoryCollaboratorPermission()(*RepositoryCollaboratorPermission) { + m := &RepositoryCollaboratorPermission{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryCollaboratorPermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryCollaboratorPermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryCollaboratorPermission(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryCollaboratorPermission) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryCollaboratorPermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["role_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableCollaboratorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableCollaboratorable)) + } + return nil + } + return res +} +// GetPermission gets the permission property value. The permission property +// returns a *string when successful +func (m *RepositoryCollaboratorPermission) GetPermission()(*string) { + return m.permission +} +// GetRoleName gets the role_name property value. The role_name property +// returns a *string when successful +func (m *RepositoryCollaboratorPermission) GetRoleName()(*string) { + return m.role_name +} +// GetUser gets the user property value. Collaborator +// returns a NullableCollaboratorable when successful +func (m *RepositoryCollaboratorPermission) GetUser()(NullableCollaboratorable) { + return m.user +} +// Serialize serializes information the current object +func (m *RepositoryCollaboratorPermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role_name", m.GetRoleName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *RepositoryCollaboratorPermission) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPermission sets the permission property value. The permission property +func (m *RepositoryCollaboratorPermission) SetPermission(value *string)() { + m.permission = value +} +// SetRoleName sets the role_name property value. The role_name property +func (m *RepositoryCollaboratorPermission) SetRoleName(value *string)() { + m.role_name = value +} +// SetUser sets the user property value. Collaborator +func (m *RepositoryCollaboratorPermission) SetUser(value NullableCollaboratorable)() { + m.user = value +} +type RepositoryCollaboratorPermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPermission()(*string) + GetRoleName()(*string) + GetUser()(NullableCollaboratorable) + SetPermission(value *string)() + SetRoleName(value *string)() + SetUser(value NullableCollaboratorable)() +} diff --git a/pkg/github/models/repository_fine_grained_permission.go b/pkg/github/models/repository_fine_grained_permission.go new file mode 100644 index 0000000..e420117 --- /dev/null +++ b/pkg/github/models/repository_fine_grained_permission.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryFineGrainedPermission a fine-grained permission that protects repository resources. +type RepositoryFineGrainedPermission struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // The name property + name *string +} +// NewRepositoryFineGrainedPermission instantiates a new RepositoryFineGrainedPermission and sets the default values. +func NewRepositoryFineGrainedPermission()(*RepositoryFineGrainedPermission) { + m := &RepositoryFineGrainedPermission{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryFineGrainedPermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryFineGrainedPermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryFineGrainedPermission(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryFineGrainedPermission) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *RepositoryFineGrainedPermission) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryFineGrainedPermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *RepositoryFineGrainedPermission) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *RepositoryFineGrainedPermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *RepositoryFineGrainedPermission) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *RepositoryFineGrainedPermission) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name property +func (m *RepositoryFineGrainedPermission) SetName(value *string)() { + m.name = value +} +type RepositoryFineGrainedPermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + SetDescription(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/repository_invitation.go b/pkg/github/models/repository_invitation.go new file mode 100644 index 0000000..e286ea8 --- /dev/null +++ b/pkg/github/models/repository_invitation.go @@ -0,0 +1,344 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryInvitation repository invitations let you manage who you collaborate with. +type RepositoryInvitation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Whether or not the invitation has expired + expired *bool + // The html_url property + html_url *string + // Unique identifier of the repository invitation. + id *int64 + // A GitHub user. + invitee NullableSimpleUserable + // A GitHub user. + inviter NullableSimpleUserable + // The node_id property + node_id *string + // The permission associated with the invitation. + permissions *RepositoryInvitation_permissions + // Minimal Repository + repository MinimalRepositoryable + // URL for the repository invitation + url *string +} +// NewRepositoryInvitation instantiates a new RepositoryInvitation and sets the default values. +func NewRepositoryInvitation()(*RepositoryInvitation) { + m := &RepositoryInvitation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryInvitationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryInvitationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryInvitation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryInvitation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *RepositoryInvitation) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetExpired gets the expired property value. Whether or not the invitation has expired +// returns a *bool when successful +func (m *RepositoryInvitation) GetExpired()(*bool) { + return m.expired +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryInvitation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["expired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExpired(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["invitee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvitee(val.(NullableSimpleUserable)) + } + return nil + } + res["inviter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInviter(val.(NullableSimpleUserable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryInvitation_permissions) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(*RepositoryInvitation_permissions)) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *RepositoryInvitation) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the repository invitation. +// returns a *int64 when successful +func (m *RepositoryInvitation) GetId()(*int64) { + return m.id +} +// GetInvitee gets the invitee property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *RepositoryInvitation) GetInvitee()(NullableSimpleUserable) { + return m.invitee +} +// GetInviter gets the inviter property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *RepositoryInvitation) GetInviter()(NullableSimpleUserable) { + return m.inviter +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *RepositoryInvitation) GetNodeId()(*string) { + return m.node_id +} +// GetPermissions gets the permissions property value. The permission associated with the invitation. +// returns a *RepositoryInvitation_permissions when successful +func (m *RepositoryInvitation) GetPermissions()(*RepositoryInvitation_permissions) { + return m.permissions +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *RepositoryInvitation) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetUrl gets the url property value. URL for the repository invitation +// returns a *string when successful +func (m *RepositoryInvitation) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *RepositoryInvitation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("expired", m.GetExpired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("invitee", m.GetInvitee()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("inviter", m.GetInviter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + cast := (*m.GetPermissions()).String() + err := writer.WriteStringValue("permissions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryInvitation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RepositoryInvitation) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetExpired sets the expired property value. Whether or not the invitation has expired +func (m *RepositoryInvitation) SetExpired(value *bool)() { + m.expired = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *RepositoryInvitation) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the repository invitation. +func (m *RepositoryInvitation) SetId(value *int64)() { + m.id = value +} +// SetInvitee sets the invitee property value. A GitHub user. +func (m *RepositoryInvitation) SetInvitee(value NullableSimpleUserable)() { + m.invitee = value +} +// SetInviter sets the inviter property value. A GitHub user. +func (m *RepositoryInvitation) SetInviter(value NullableSimpleUserable)() { + m.inviter = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *RepositoryInvitation) SetNodeId(value *string)() { + m.node_id = value +} +// SetPermissions sets the permissions property value. The permission associated with the invitation. +func (m *RepositoryInvitation) SetPermissions(value *RepositoryInvitation_permissions)() { + m.permissions = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *RepositoryInvitation) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetUrl sets the url property value. URL for the repository invitation +func (m *RepositoryInvitation) SetUrl(value *string)() { + m.url = value +} +type RepositoryInvitationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExpired()(*bool) + GetHtmlUrl()(*string) + GetId()(*int64) + GetInvitee()(NullableSimpleUserable) + GetInviter()(NullableSimpleUserable) + GetNodeId()(*string) + GetPermissions()(*RepositoryInvitation_permissions) + GetRepository()(MinimalRepositoryable) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExpired(value *bool)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetInvitee(value NullableSimpleUserable)() + SetInviter(value NullableSimpleUserable)() + SetNodeId(value *string)() + SetPermissions(value *RepositoryInvitation_permissions)() + SetRepository(value MinimalRepositoryable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/repository_invitation_permissions.go b/pkg/github/models/repository_invitation_permissions.go new file mode 100644 index 0000000..8325113 --- /dev/null +++ b/pkg/github/models/repository_invitation_permissions.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The permission associated with the invitation. +type RepositoryInvitation_permissions int + +const ( + READ_REPOSITORYINVITATION_PERMISSIONS RepositoryInvitation_permissions = iota + WRITE_REPOSITORYINVITATION_PERMISSIONS + ADMIN_REPOSITORYINVITATION_PERMISSIONS + TRIAGE_REPOSITORYINVITATION_PERMISSIONS + MAINTAIN_REPOSITORYINVITATION_PERMISSIONS +) + +func (i RepositoryInvitation_permissions) String() string { + return []string{"read", "write", "admin", "triage", "maintain"}[i] +} +func ParseRepositoryInvitation_permissions(v string) (any, error) { + result := READ_REPOSITORYINVITATION_PERMISSIONS + switch v { + case "read": + result = READ_REPOSITORYINVITATION_PERMISSIONS + case "write": + result = WRITE_REPOSITORYINVITATION_PERMISSIONS + case "admin": + result = ADMIN_REPOSITORYINVITATION_PERMISSIONS + case "triage": + result = TRIAGE_REPOSITORYINVITATION_PERMISSIONS + case "maintain": + result = MAINTAIN_REPOSITORYINVITATION_PERMISSIONS + default: + return 0, errors.New("Unknown RepositoryInvitation_permissions value: " + v) + } + return &result, nil +} +func SerializeRepositoryInvitation_permissions(values []RepositoryInvitation_permissions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryInvitation_permissions) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_merge_commit_message.go b/pkg/github/models/repository_merge_commit_message.go new file mode 100644 index 0000000..7845119 --- /dev/null +++ b/pkg/github/models/repository_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type Repository_merge_commit_message int + +const ( + PR_BODY_REPOSITORY_MERGE_COMMIT_MESSAGE Repository_merge_commit_message = iota + PR_TITLE_REPOSITORY_MERGE_COMMIT_MESSAGE + BLANK_REPOSITORY_MERGE_COMMIT_MESSAGE +) + +func (i Repository_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseRepository_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOSITORY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOSITORY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_REPOSITORY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOSITORY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown Repository_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeRepository_merge_commit_message(values []Repository_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Repository_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_merge_commit_title.go b/pkg/github/models/repository_merge_commit_title.go new file mode 100644 index 0000000..a1816e6 --- /dev/null +++ b/pkg/github/models/repository_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +type Repository_merge_commit_title int + +const ( + PR_TITLE_REPOSITORY_MERGE_COMMIT_TITLE Repository_merge_commit_title = iota + MERGE_MESSAGE_REPOSITORY_MERGE_COMMIT_TITLE +) + +func (i Repository_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseRepository_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOSITORY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOSITORY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_REPOSITORY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown Repository_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeRepository_merge_commit_title(values []Repository_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Repository_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_permissions.go b/pkg/github/models/repository_permissions.go new file mode 100644 index 0000000..453eab6 --- /dev/null +++ b/pkg/github/models/repository_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Repository_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewRepository_permissions instantiates a new Repository_permissions and sets the default values. +func NewRepository_permissions()(*Repository_permissions) { + m := &Repository_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepository_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepository_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepository_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Repository_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *Repository_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Repository_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *Repository_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *Repository_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *Repository_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *Repository_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *Repository_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Repository_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *Repository_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *Repository_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *Repository_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *Repository_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *Repository_permissions) SetTriage(value *bool)() { + m.triage = value +} +type Repository_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/repository_rule.go b/pkg/github/models/repository_rule.go new file mode 100644 index 0000000..64a538b --- /dev/null +++ b/pkg/github/models/repository_rule.go @@ -0,0 +1,1853 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRule composed type wrapper for classes File_extension_restrictionable, File_path_restrictionable, Max_file_path_lengthable, Max_file_sizeable, RepositoryRuleBranchNamePatternable, RepositoryRuleCodeScanningable, RepositoryRuleCommitAuthorEmailPatternable, RepositoryRuleCommitMessagePatternable, RepositoryRuleCommitterEmailPatternable, RepositoryRuleCreationable, RepositoryRuleDeletionable, RepositoryRuleNonFastForwardable, RepositoryRulePullRequestable, RepositoryRuleRequiredDeploymentsable, RepositoryRuleRequiredLinearHistoryable, RepositoryRuleRequiredSignaturesable, RepositoryRuleRequiredStatusChecksable, RepositoryRuleTagNamePatternable, RepositoryRuleUpdateable, RepositoryRuleWorkflowsable +type RepositoryRule struct { + // Composed type representation for type File_extension_restrictionable + file_extension_restriction File_extension_restrictionable + // Composed type representation for type File_path_restrictionable + file_path_restriction File_path_restrictionable + // Composed type representation for type Max_file_path_lengthable + max_file_path_length Max_file_path_lengthable + // Composed type representation for type Max_file_sizeable + max_file_size Max_file_sizeable + // Composed type representation for type RepositoryRuleBranchNamePatternable + repositoryRuleBranchNamePattern RepositoryRuleBranchNamePatternable + // Composed type representation for type RepositoryRuleCodeScanningable + repositoryRuleCodeScanning RepositoryRuleCodeScanningable + // Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable + repositoryRuleCommitAuthorEmailPattern RepositoryRuleCommitAuthorEmailPatternable + // Composed type representation for type RepositoryRuleCommitMessagePatternable + repositoryRuleCommitMessagePattern RepositoryRuleCommitMessagePatternable + // Composed type representation for type RepositoryRuleCommitterEmailPatternable + repositoryRuleCommitterEmailPattern RepositoryRuleCommitterEmailPatternable + // Composed type representation for type RepositoryRuleCreationable + repositoryRuleCreation RepositoryRuleCreationable + // Composed type representation for type RepositoryRuleDeletionable + repositoryRuleDeletion RepositoryRuleDeletionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction File_extension_restrictionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction0 File_extension_restrictionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction1 File_extension_restrictionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction2 File_extension_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction File_path_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction0 File_path_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction1 File_path_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction2 File_path_restrictionable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length Max_file_path_lengthable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length0 Max_file_path_lengthable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length1 Max_file_path_lengthable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length2 Max_file_path_lengthable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size Max_file_sizeable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size0 Max_file_sizeable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size1 Max_file_sizeable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size2 Max_file_sizeable + // Composed type representation for type RepositoryRuleNonFastForwardable + repositoryRuleNonFastForward RepositoryRuleNonFastForwardable + // Composed type representation for type RepositoryRulePullRequestable + repositoryRulePullRequest RepositoryRulePullRequestable + // Composed type representation for type RepositoryRuleBranchNamePatternable + repositoryRuleRepositoryRuleBranchNamePattern RepositoryRuleBranchNamePatternable + // Composed type representation for type RepositoryRuleBranchNamePatternable + repositoryRuleRepositoryRuleBranchNamePattern0 RepositoryRuleBranchNamePatternable + // Composed type representation for type RepositoryRuleBranchNamePatternable + repositoryRuleRepositoryRuleBranchNamePattern1 RepositoryRuleBranchNamePatternable + // Composed type representation for type RepositoryRuleBranchNamePatternable + repositoryRuleRepositoryRuleBranchNamePattern2 RepositoryRuleBranchNamePatternable + // Composed type representation for type RepositoryRuleCodeScanningable + repositoryRuleRepositoryRuleCodeScanning RepositoryRuleCodeScanningable + // Composed type representation for type RepositoryRuleCodeScanningable + repositoryRuleRepositoryRuleCodeScanning0 RepositoryRuleCodeScanningable + // Composed type representation for type RepositoryRuleCodeScanningable + repositoryRuleRepositoryRuleCodeScanning1 RepositoryRuleCodeScanningable + // Composed type representation for type RepositoryRuleCodeScanningable + repositoryRuleRepositoryRuleCodeScanning2 RepositoryRuleCodeScanningable + // Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable + repositoryRuleRepositoryRuleCommitAuthorEmailPattern RepositoryRuleCommitAuthorEmailPatternable + // Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable + repositoryRuleRepositoryRuleCommitAuthorEmailPattern0 RepositoryRuleCommitAuthorEmailPatternable + // Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable + repositoryRuleRepositoryRuleCommitAuthorEmailPattern1 RepositoryRuleCommitAuthorEmailPatternable + // Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable + repositoryRuleRepositoryRuleCommitAuthorEmailPattern2 RepositoryRuleCommitAuthorEmailPatternable + // Composed type representation for type RepositoryRuleCommitMessagePatternable + repositoryRuleRepositoryRuleCommitMessagePattern RepositoryRuleCommitMessagePatternable + // Composed type representation for type RepositoryRuleCommitMessagePatternable + repositoryRuleRepositoryRuleCommitMessagePattern0 RepositoryRuleCommitMessagePatternable + // Composed type representation for type RepositoryRuleCommitMessagePatternable + repositoryRuleRepositoryRuleCommitMessagePattern1 RepositoryRuleCommitMessagePatternable + // Composed type representation for type RepositoryRuleCommitMessagePatternable + repositoryRuleRepositoryRuleCommitMessagePattern2 RepositoryRuleCommitMessagePatternable + // Composed type representation for type RepositoryRuleCommitterEmailPatternable + repositoryRuleRepositoryRuleCommitterEmailPattern RepositoryRuleCommitterEmailPatternable + // Composed type representation for type RepositoryRuleCommitterEmailPatternable + repositoryRuleRepositoryRuleCommitterEmailPattern0 RepositoryRuleCommitterEmailPatternable + // Composed type representation for type RepositoryRuleCommitterEmailPatternable + repositoryRuleRepositoryRuleCommitterEmailPattern1 RepositoryRuleCommitterEmailPatternable + // Composed type representation for type RepositoryRuleCommitterEmailPatternable + repositoryRuleRepositoryRuleCommitterEmailPattern2 RepositoryRuleCommitterEmailPatternable + // Composed type representation for type RepositoryRuleCreationable + repositoryRuleRepositoryRuleCreation RepositoryRuleCreationable + // Composed type representation for type RepositoryRuleCreationable + repositoryRuleRepositoryRuleCreation0 RepositoryRuleCreationable + // Composed type representation for type RepositoryRuleCreationable + repositoryRuleRepositoryRuleCreation1 RepositoryRuleCreationable + // Composed type representation for type RepositoryRuleCreationable + repositoryRuleRepositoryRuleCreation2 RepositoryRuleCreationable + // Composed type representation for type RepositoryRuleDeletionable + repositoryRuleRepositoryRuleDeletion RepositoryRuleDeletionable + // Composed type representation for type RepositoryRuleDeletionable + repositoryRuleRepositoryRuleDeletion0 RepositoryRuleDeletionable + // Composed type representation for type RepositoryRuleDeletionable + repositoryRuleRepositoryRuleDeletion1 RepositoryRuleDeletionable + // Composed type representation for type RepositoryRuleDeletionable + repositoryRuleRepositoryRuleDeletion2 RepositoryRuleDeletionable + // Composed type representation for type RepositoryRuleNonFastForwardable + repositoryRuleRepositoryRuleNonFastForward RepositoryRuleNonFastForwardable + // Composed type representation for type RepositoryRuleNonFastForwardable + repositoryRuleRepositoryRuleNonFastForward0 RepositoryRuleNonFastForwardable + // Composed type representation for type RepositoryRuleNonFastForwardable + repositoryRuleRepositoryRuleNonFastForward1 RepositoryRuleNonFastForwardable + // Composed type representation for type RepositoryRuleNonFastForwardable + repositoryRuleRepositoryRuleNonFastForward2 RepositoryRuleNonFastForwardable + // Composed type representation for type RepositoryRulePullRequestable + repositoryRuleRepositoryRulePullRequest RepositoryRulePullRequestable + // Composed type representation for type RepositoryRulePullRequestable + repositoryRuleRepositoryRulePullRequest0 RepositoryRulePullRequestable + // Composed type representation for type RepositoryRulePullRequestable + repositoryRuleRepositoryRulePullRequest1 RepositoryRulePullRequestable + // Composed type representation for type RepositoryRulePullRequestable + repositoryRuleRepositoryRulePullRequest2 RepositoryRulePullRequestable + // Composed type representation for type RepositoryRuleRequiredDeploymentsable + repositoryRuleRepositoryRuleRequiredDeployments RepositoryRuleRequiredDeploymentsable + // Composed type representation for type RepositoryRuleRequiredDeploymentsable + repositoryRuleRepositoryRuleRequiredDeployments0 RepositoryRuleRequiredDeploymentsable + // Composed type representation for type RepositoryRuleRequiredDeploymentsable + repositoryRuleRepositoryRuleRequiredDeployments1 RepositoryRuleRequiredDeploymentsable + // Composed type representation for type RepositoryRuleRequiredDeploymentsable + repositoryRuleRepositoryRuleRequiredDeployments2 RepositoryRuleRequiredDeploymentsable + // Composed type representation for type RepositoryRuleRequiredLinearHistoryable + repositoryRuleRepositoryRuleRequiredLinearHistory RepositoryRuleRequiredLinearHistoryable + // Composed type representation for type RepositoryRuleRequiredLinearHistoryable + repositoryRuleRepositoryRuleRequiredLinearHistory0 RepositoryRuleRequiredLinearHistoryable + // Composed type representation for type RepositoryRuleRequiredLinearHistoryable + repositoryRuleRepositoryRuleRequiredLinearHistory1 RepositoryRuleRequiredLinearHistoryable + // Composed type representation for type RepositoryRuleRequiredLinearHistoryable + repositoryRuleRepositoryRuleRequiredLinearHistory2 RepositoryRuleRequiredLinearHistoryable + // Composed type representation for type RepositoryRuleRequiredSignaturesable + repositoryRuleRepositoryRuleRequiredSignatures RepositoryRuleRequiredSignaturesable + // Composed type representation for type RepositoryRuleRequiredSignaturesable + repositoryRuleRepositoryRuleRequiredSignatures0 RepositoryRuleRequiredSignaturesable + // Composed type representation for type RepositoryRuleRequiredSignaturesable + repositoryRuleRepositoryRuleRequiredSignatures1 RepositoryRuleRequiredSignaturesable + // Composed type representation for type RepositoryRuleRequiredSignaturesable + repositoryRuleRepositoryRuleRequiredSignatures2 RepositoryRuleRequiredSignaturesable + // Composed type representation for type RepositoryRuleRequiredStatusChecksable + repositoryRuleRepositoryRuleRequiredStatusChecks RepositoryRuleRequiredStatusChecksable + // Composed type representation for type RepositoryRuleRequiredStatusChecksable + repositoryRuleRepositoryRuleRequiredStatusChecks0 RepositoryRuleRequiredStatusChecksable + // Composed type representation for type RepositoryRuleRequiredStatusChecksable + repositoryRuleRepositoryRuleRequiredStatusChecks1 RepositoryRuleRequiredStatusChecksable + // Composed type representation for type RepositoryRuleRequiredStatusChecksable + repositoryRuleRepositoryRuleRequiredStatusChecks2 RepositoryRuleRequiredStatusChecksable + // Composed type representation for type RepositoryRuleTagNamePatternable + repositoryRuleRepositoryRuleTagNamePattern RepositoryRuleTagNamePatternable + // Composed type representation for type RepositoryRuleTagNamePatternable + repositoryRuleRepositoryRuleTagNamePattern0 RepositoryRuleTagNamePatternable + // Composed type representation for type RepositoryRuleTagNamePatternable + repositoryRuleRepositoryRuleTagNamePattern1 RepositoryRuleTagNamePatternable + // Composed type representation for type RepositoryRuleTagNamePatternable + repositoryRuleRepositoryRuleTagNamePattern2 RepositoryRuleTagNamePatternable + // Composed type representation for type RepositoryRuleUpdateable + repositoryRuleRepositoryRuleUpdate RepositoryRuleUpdateable + // Composed type representation for type RepositoryRuleUpdateable + repositoryRuleRepositoryRuleUpdate0 RepositoryRuleUpdateable + // Composed type representation for type RepositoryRuleUpdateable + repositoryRuleRepositoryRuleUpdate1 RepositoryRuleUpdateable + // Composed type representation for type RepositoryRuleUpdateable + repositoryRuleRepositoryRuleUpdate2 RepositoryRuleUpdateable + // Composed type representation for type RepositoryRuleWorkflowsable + repositoryRuleRepositoryRuleWorkflows RepositoryRuleWorkflowsable + // Composed type representation for type RepositoryRuleWorkflowsable + repositoryRuleRepositoryRuleWorkflows0 RepositoryRuleWorkflowsable + // Composed type representation for type RepositoryRuleWorkflowsable + repositoryRuleRepositoryRuleWorkflows1 RepositoryRuleWorkflowsable + // Composed type representation for type RepositoryRuleWorkflowsable + repositoryRuleRepositoryRuleWorkflows2 RepositoryRuleWorkflowsable + // Composed type representation for type RepositoryRuleRequiredDeploymentsable + repositoryRuleRequiredDeployments RepositoryRuleRequiredDeploymentsable + // Composed type representation for type RepositoryRuleRequiredLinearHistoryable + repositoryRuleRequiredLinearHistory RepositoryRuleRequiredLinearHistoryable + // Composed type representation for type RepositoryRuleRequiredSignaturesable + repositoryRuleRequiredSignatures RepositoryRuleRequiredSignaturesable + // Composed type representation for type RepositoryRuleRequiredStatusChecksable + repositoryRuleRequiredStatusChecks RepositoryRuleRequiredStatusChecksable + // Composed type representation for type RepositoryRuleTagNamePatternable + repositoryRuleTagNamePattern RepositoryRuleTagNamePatternable + // Composed type representation for type RepositoryRuleUpdateable + repositoryRuleUpdate RepositoryRuleUpdateable + // Composed type representation for type RepositoryRuleWorkflowsable + repositoryRuleWorkflows RepositoryRuleWorkflowsable +} +// NewRepositoryRule instantiates a new RepositoryRule and sets the default values. +func NewRepositoryRule()(*RepositoryRule) { + m := &RepositoryRule{ + } + return m +} +// CreateRepositoryRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewRepositoryRule() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetFileExtensionRestriction gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetFileExtensionRestriction()(File_extension_restrictionable) { + return m.file_extension_restriction +} +// GetFilePathRestriction gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetFilePathRestriction()(File_path_restrictionable) { + return m.file_path_restriction +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *RepositoryRule) GetIsComposedType()(bool) { + return true +} +// GetMaxFilePathLength gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetMaxFilePathLength()(Max_file_path_lengthable) { + return m.max_file_path_length +} +// GetMaxFileSize gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetMaxFileSize()(Max_file_sizeable) { + return m.max_file_size +} +// GetRepositoryRuleBranchNamePattern gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +// returns a RepositoryRuleBranchNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) { + return m.repositoryRuleBranchNamePattern +} +// GetRepositoryRuleCodeScanning gets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +// returns a RepositoryRuleCodeScanningable when successful +func (m *RepositoryRule) GetRepositoryRuleCodeScanning()(RepositoryRuleCodeScanningable) { + return m.repositoryRuleCodeScanning +} +// GetRepositoryRuleCommitAuthorEmailPattern gets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +// returns a RepositoryRuleCommitAuthorEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleCommitAuthorEmailPattern()(RepositoryRuleCommitAuthorEmailPatternable) { + return m.repositoryRuleCommitAuthorEmailPattern +} +// GetRepositoryRuleCommitMessagePattern gets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +// returns a RepositoryRuleCommitMessagePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleCommitMessagePattern()(RepositoryRuleCommitMessagePatternable) { + return m.repositoryRuleCommitMessagePattern +} +// GetRepositoryRuleCommitterEmailPattern gets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +// returns a RepositoryRuleCommitterEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleCommitterEmailPattern()(RepositoryRuleCommitterEmailPatternable) { + return m.repositoryRuleCommitterEmailPattern +} +// GetRepositoryRuleCreation gets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +// returns a RepositoryRuleCreationable when successful +func (m *RepositoryRule) GetRepositoryRuleCreation()(RepositoryRuleCreationable) { + return m.repositoryRuleCreation +} +// GetRepositoryRuleDeletion gets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +// returns a RepositoryRuleDeletionable when successful +func (m *RepositoryRule) GetRepositoryRuleDeletion()(RepositoryRuleDeletionable) { + return m.repositoryRuleDeletion +} +// GetRepositoryRuleFileExtensionRestriction gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction +} +// GetRepositoryRuleFileExtensionRestriction0 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction0()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction0 +} +// GetRepositoryRuleFileExtensionRestriction1 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction1()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction1 +} +// GetRepositoryRuleFileExtensionRestriction2 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction2()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction2 +} +// GetRepositoryRuleFilePathRestriction gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction +} +// GetRepositoryRuleFilePathRestriction0 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction0()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction0 +} +// GetRepositoryRuleFilePathRestriction1 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction1()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction1 +} +// GetRepositoryRuleFilePathRestriction2 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction2()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction2 +} +// GetRepositoryRuleMaxFilePathLength gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length +} +// GetRepositoryRuleMaxFilePathLength0 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength0()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length0 +} +// GetRepositoryRuleMaxFilePathLength1 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength1()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length1 +} +// GetRepositoryRuleMaxFilePathLength2 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength2()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length2 +} +// GetRepositoryRuleMaxFileSize gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size +} +// GetRepositoryRuleMaxFileSize0 gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize0()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size0 +} +// GetRepositoryRuleMaxFileSize1 gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize1()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size1 +} +// GetRepositoryRuleMaxFileSize2 gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize2()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size2 +} +// GetRepositoryRuleNonFastForward gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +// returns a RepositoryRuleNonFastForwardable when successful +func (m *RepositoryRule) GetRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) { + return m.repositoryRuleNonFastForward +} +// GetRepositoryRulePullRequest gets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +// returns a RepositoryRulePullRequestable when successful +func (m *RepositoryRule) GetRepositoryRulePullRequest()(RepositoryRulePullRequestable) { + return m.repositoryRulePullRequest +} +// GetRepositoryRuleRepositoryRuleBranchNamePattern gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +// returns a RepositoryRuleBranchNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) { + return m.repositoryRuleRepositoryRuleBranchNamePattern +} +// GetRepositoryRuleRepositoryRuleBranchNamePattern0 gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +// returns a RepositoryRuleBranchNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleBranchNamePattern0()(RepositoryRuleBranchNamePatternable) { + return m.repositoryRuleRepositoryRuleBranchNamePattern0 +} +// GetRepositoryRuleRepositoryRuleBranchNamePattern1 gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +// returns a RepositoryRuleBranchNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleBranchNamePattern1()(RepositoryRuleBranchNamePatternable) { + return m.repositoryRuleRepositoryRuleBranchNamePattern1 +} +// GetRepositoryRuleRepositoryRuleBranchNamePattern2 gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +// returns a RepositoryRuleBranchNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleBranchNamePattern2()(RepositoryRuleBranchNamePatternable) { + return m.repositoryRuleRepositoryRuleBranchNamePattern2 +} +// GetRepositoryRuleRepositoryRuleCodeScanning gets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +// returns a RepositoryRuleCodeScanningable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCodeScanning()(RepositoryRuleCodeScanningable) { + return m.repositoryRuleRepositoryRuleCodeScanning +} +// GetRepositoryRuleRepositoryRuleCodeScanning0 gets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +// returns a RepositoryRuleCodeScanningable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCodeScanning0()(RepositoryRuleCodeScanningable) { + return m.repositoryRuleRepositoryRuleCodeScanning0 +} +// GetRepositoryRuleRepositoryRuleCodeScanning1 gets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +// returns a RepositoryRuleCodeScanningable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCodeScanning1()(RepositoryRuleCodeScanningable) { + return m.repositoryRuleRepositoryRuleCodeScanning1 +} +// GetRepositoryRuleRepositoryRuleCodeScanning2 gets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +// returns a RepositoryRuleCodeScanningable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCodeScanning2()(RepositoryRuleCodeScanningable) { + return m.repositoryRuleRepositoryRuleCodeScanning2 +} +// GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern gets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +// returns a RepositoryRuleCommitAuthorEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern()(RepositoryRuleCommitAuthorEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern +} +// GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0 gets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +// returns a RepositoryRuleCommitAuthorEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0()(RepositoryRuleCommitAuthorEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern0 +} +// GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1 gets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +// returns a RepositoryRuleCommitAuthorEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1()(RepositoryRuleCommitAuthorEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern1 +} +// GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2 gets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +// returns a RepositoryRuleCommitAuthorEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2()(RepositoryRuleCommitAuthorEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern2 +} +// GetRepositoryRuleRepositoryRuleCommitMessagePattern gets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +// returns a RepositoryRuleCommitMessagePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitMessagePattern()(RepositoryRuleCommitMessagePatternable) { + return m.repositoryRuleRepositoryRuleCommitMessagePattern +} +// GetRepositoryRuleRepositoryRuleCommitMessagePattern0 gets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +// returns a RepositoryRuleCommitMessagePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitMessagePattern0()(RepositoryRuleCommitMessagePatternable) { + return m.repositoryRuleRepositoryRuleCommitMessagePattern0 +} +// GetRepositoryRuleRepositoryRuleCommitMessagePattern1 gets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +// returns a RepositoryRuleCommitMessagePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitMessagePattern1()(RepositoryRuleCommitMessagePatternable) { + return m.repositoryRuleRepositoryRuleCommitMessagePattern1 +} +// GetRepositoryRuleRepositoryRuleCommitMessagePattern2 gets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +// returns a RepositoryRuleCommitMessagePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitMessagePattern2()(RepositoryRuleCommitMessagePatternable) { + return m.repositoryRuleRepositoryRuleCommitMessagePattern2 +} +// GetRepositoryRuleRepositoryRuleCommitterEmailPattern gets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +// returns a RepositoryRuleCommitterEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitterEmailPattern()(RepositoryRuleCommitterEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitterEmailPattern +} +// GetRepositoryRuleRepositoryRuleCommitterEmailPattern0 gets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +// returns a RepositoryRuleCommitterEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitterEmailPattern0()(RepositoryRuleCommitterEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitterEmailPattern0 +} +// GetRepositoryRuleRepositoryRuleCommitterEmailPattern1 gets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +// returns a RepositoryRuleCommitterEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitterEmailPattern1()(RepositoryRuleCommitterEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitterEmailPattern1 +} +// GetRepositoryRuleRepositoryRuleCommitterEmailPattern2 gets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +// returns a RepositoryRuleCommitterEmailPatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCommitterEmailPattern2()(RepositoryRuleCommitterEmailPatternable) { + return m.repositoryRuleRepositoryRuleCommitterEmailPattern2 +} +// GetRepositoryRuleRepositoryRuleCreation gets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +// returns a RepositoryRuleCreationable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCreation()(RepositoryRuleCreationable) { + return m.repositoryRuleRepositoryRuleCreation +} +// GetRepositoryRuleRepositoryRuleCreation0 gets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +// returns a RepositoryRuleCreationable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCreation0()(RepositoryRuleCreationable) { + return m.repositoryRuleRepositoryRuleCreation0 +} +// GetRepositoryRuleRepositoryRuleCreation1 gets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +// returns a RepositoryRuleCreationable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCreation1()(RepositoryRuleCreationable) { + return m.repositoryRuleRepositoryRuleCreation1 +} +// GetRepositoryRuleRepositoryRuleCreation2 gets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +// returns a RepositoryRuleCreationable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleCreation2()(RepositoryRuleCreationable) { + return m.repositoryRuleRepositoryRuleCreation2 +} +// GetRepositoryRuleRepositoryRuleDeletion gets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +// returns a RepositoryRuleDeletionable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleDeletion()(RepositoryRuleDeletionable) { + return m.repositoryRuleRepositoryRuleDeletion +} +// GetRepositoryRuleRepositoryRuleDeletion0 gets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +// returns a RepositoryRuleDeletionable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleDeletion0()(RepositoryRuleDeletionable) { + return m.repositoryRuleRepositoryRuleDeletion0 +} +// GetRepositoryRuleRepositoryRuleDeletion1 gets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +// returns a RepositoryRuleDeletionable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleDeletion1()(RepositoryRuleDeletionable) { + return m.repositoryRuleRepositoryRuleDeletion1 +} +// GetRepositoryRuleRepositoryRuleDeletion2 gets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +// returns a RepositoryRuleDeletionable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleDeletion2()(RepositoryRuleDeletionable) { + return m.repositoryRuleRepositoryRuleDeletion2 +} +// GetRepositoryRuleRepositoryRuleNonFastForward gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +// returns a RepositoryRuleNonFastForwardable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) { + return m.repositoryRuleRepositoryRuleNonFastForward +} +// GetRepositoryRuleRepositoryRuleNonFastForward0 gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +// returns a RepositoryRuleNonFastForwardable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleNonFastForward0()(RepositoryRuleNonFastForwardable) { + return m.repositoryRuleRepositoryRuleNonFastForward0 +} +// GetRepositoryRuleRepositoryRuleNonFastForward1 gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +// returns a RepositoryRuleNonFastForwardable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleNonFastForward1()(RepositoryRuleNonFastForwardable) { + return m.repositoryRuleRepositoryRuleNonFastForward1 +} +// GetRepositoryRuleRepositoryRuleNonFastForward2 gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +// returns a RepositoryRuleNonFastForwardable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleNonFastForward2()(RepositoryRuleNonFastForwardable) { + return m.repositoryRuleRepositoryRuleNonFastForward2 +} +// GetRepositoryRuleRepositoryRulePullRequest gets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +// returns a RepositoryRulePullRequestable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRulePullRequest()(RepositoryRulePullRequestable) { + return m.repositoryRuleRepositoryRulePullRequest +} +// GetRepositoryRuleRepositoryRulePullRequest0 gets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +// returns a RepositoryRulePullRequestable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRulePullRequest0()(RepositoryRulePullRequestable) { + return m.repositoryRuleRepositoryRulePullRequest0 +} +// GetRepositoryRuleRepositoryRulePullRequest1 gets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +// returns a RepositoryRulePullRequestable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRulePullRequest1()(RepositoryRulePullRequestable) { + return m.repositoryRuleRepositoryRulePullRequest1 +} +// GetRepositoryRuleRepositoryRulePullRequest2 gets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +// returns a RepositoryRulePullRequestable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRulePullRequest2()(RepositoryRulePullRequestable) { + return m.repositoryRuleRepositoryRulePullRequest2 +} +// GetRepositoryRuleRepositoryRuleRequiredDeployments gets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +// returns a RepositoryRuleRequiredDeploymentsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredDeployments()(RepositoryRuleRequiredDeploymentsable) { + return m.repositoryRuleRepositoryRuleRequiredDeployments +} +// GetRepositoryRuleRepositoryRuleRequiredDeployments0 gets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +// returns a RepositoryRuleRequiredDeploymentsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredDeployments0()(RepositoryRuleRequiredDeploymentsable) { + return m.repositoryRuleRepositoryRuleRequiredDeployments0 +} +// GetRepositoryRuleRepositoryRuleRequiredDeployments1 gets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +// returns a RepositoryRuleRequiredDeploymentsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredDeployments1()(RepositoryRuleRequiredDeploymentsable) { + return m.repositoryRuleRepositoryRuleRequiredDeployments1 +} +// GetRepositoryRuleRepositoryRuleRequiredDeployments2 gets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +// returns a RepositoryRuleRequiredDeploymentsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredDeployments2()(RepositoryRuleRequiredDeploymentsable) { + return m.repositoryRuleRepositoryRuleRequiredDeployments2 +} +// GetRepositoryRuleRepositoryRuleRequiredLinearHistory gets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +// returns a RepositoryRuleRequiredLinearHistoryable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredLinearHistory()(RepositoryRuleRequiredLinearHistoryable) { + return m.repositoryRuleRepositoryRuleRequiredLinearHistory +} +// GetRepositoryRuleRepositoryRuleRequiredLinearHistory0 gets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +// returns a RepositoryRuleRequiredLinearHistoryable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredLinearHistory0()(RepositoryRuleRequiredLinearHistoryable) { + return m.repositoryRuleRepositoryRuleRequiredLinearHistory0 +} +// GetRepositoryRuleRepositoryRuleRequiredLinearHistory1 gets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +// returns a RepositoryRuleRequiredLinearHistoryable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredLinearHistory1()(RepositoryRuleRequiredLinearHistoryable) { + return m.repositoryRuleRepositoryRuleRequiredLinearHistory1 +} +// GetRepositoryRuleRepositoryRuleRequiredLinearHistory2 gets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +// returns a RepositoryRuleRequiredLinearHistoryable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredLinearHistory2()(RepositoryRuleRequiredLinearHistoryable) { + return m.repositoryRuleRepositoryRuleRequiredLinearHistory2 +} +// GetRepositoryRuleRepositoryRuleRequiredSignatures gets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +// returns a RepositoryRuleRequiredSignaturesable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredSignatures()(RepositoryRuleRequiredSignaturesable) { + return m.repositoryRuleRepositoryRuleRequiredSignatures +} +// GetRepositoryRuleRepositoryRuleRequiredSignatures0 gets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +// returns a RepositoryRuleRequiredSignaturesable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredSignatures0()(RepositoryRuleRequiredSignaturesable) { + return m.repositoryRuleRepositoryRuleRequiredSignatures0 +} +// GetRepositoryRuleRepositoryRuleRequiredSignatures1 gets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +// returns a RepositoryRuleRequiredSignaturesable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredSignatures1()(RepositoryRuleRequiredSignaturesable) { + return m.repositoryRuleRepositoryRuleRequiredSignatures1 +} +// GetRepositoryRuleRepositoryRuleRequiredSignatures2 gets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +// returns a RepositoryRuleRequiredSignaturesable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredSignatures2()(RepositoryRuleRequiredSignaturesable) { + return m.repositoryRuleRepositoryRuleRequiredSignatures2 +} +// GetRepositoryRuleRepositoryRuleRequiredStatusChecks gets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +// returns a RepositoryRuleRequiredStatusChecksable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredStatusChecks()(RepositoryRuleRequiredStatusChecksable) { + return m.repositoryRuleRepositoryRuleRequiredStatusChecks +} +// GetRepositoryRuleRepositoryRuleRequiredStatusChecks0 gets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +// returns a RepositoryRuleRequiredStatusChecksable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredStatusChecks0()(RepositoryRuleRequiredStatusChecksable) { + return m.repositoryRuleRepositoryRuleRequiredStatusChecks0 +} +// GetRepositoryRuleRepositoryRuleRequiredStatusChecks1 gets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +// returns a RepositoryRuleRequiredStatusChecksable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredStatusChecks1()(RepositoryRuleRequiredStatusChecksable) { + return m.repositoryRuleRepositoryRuleRequiredStatusChecks1 +} +// GetRepositoryRuleRepositoryRuleRequiredStatusChecks2 gets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +// returns a RepositoryRuleRequiredStatusChecksable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleRequiredStatusChecks2()(RepositoryRuleRequiredStatusChecksable) { + return m.repositoryRuleRepositoryRuleRequiredStatusChecks2 +} +// GetRepositoryRuleRepositoryRuleTagNamePattern gets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +// returns a RepositoryRuleTagNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleTagNamePattern()(RepositoryRuleTagNamePatternable) { + return m.repositoryRuleRepositoryRuleTagNamePattern +} +// GetRepositoryRuleRepositoryRuleTagNamePattern0 gets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +// returns a RepositoryRuleTagNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleTagNamePattern0()(RepositoryRuleTagNamePatternable) { + return m.repositoryRuleRepositoryRuleTagNamePattern0 +} +// GetRepositoryRuleRepositoryRuleTagNamePattern1 gets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +// returns a RepositoryRuleTagNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleTagNamePattern1()(RepositoryRuleTagNamePatternable) { + return m.repositoryRuleRepositoryRuleTagNamePattern1 +} +// GetRepositoryRuleRepositoryRuleTagNamePattern2 gets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +// returns a RepositoryRuleTagNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleTagNamePattern2()(RepositoryRuleTagNamePatternable) { + return m.repositoryRuleRepositoryRuleTagNamePattern2 +} +// GetRepositoryRuleRepositoryRuleUpdate gets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +// returns a RepositoryRuleUpdateable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleUpdate()(RepositoryRuleUpdateable) { + return m.repositoryRuleRepositoryRuleUpdate +} +// GetRepositoryRuleRepositoryRuleUpdate0 gets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +// returns a RepositoryRuleUpdateable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleUpdate0()(RepositoryRuleUpdateable) { + return m.repositoryRuleRepositoryRuleUpdate0 +} +// GetRepositoryRuleRepositoryRuleUpdate1 gets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +// returns a RepositoryRuleUpdateable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleUpdate1()(RepositoryRuleUpdateable) { + return m.repositoryRuleRepositoryRuleUpdate1 +} +// GetRepositoryRuleRepositoryRuleUpdate2 gets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +// returns a RepositoryRuleUpdateable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleUpdate2()(RepositoryRuleUpdateable) { + return m.repositoryRuleRepositoryRuleUpdate2 +} +// GetRepositoryRuleRepositoryRuleWorkflows gets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +// returns a RepositoryRuleWorkflowsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleWorkflows()(RepositoryRuleWorkflowsable) { + return m.repositoryRuleRepositoryRuleWorkflows +} +// GetRepositoryRuleRepositoryRuleWorkflows0 gets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +// returns a RepositoryRuleWorkflowsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleWorkflows0()(RepositoryRuleWorkflowsable) { + return m.repositoryRuleRepositoryRuleWorkflows0 +} +// GetRepositoryRuleRepositoryRuleWorkflows1 gets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +// returns a RepositoryRuleWorkflowsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleWorkflows1()(RepositoryRuleWorkflowsable) { + return m.repositoryRuleRepositoryRuleWorkflows1 +} +// GetRepositoryRuleRepositoryRuleWorkflows2 gets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +// returns a RepositoryRuleWorkflowsable when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleWorkflows2()(RepositoryRuleWorkflowsable) { + return m.repositoryRuleRepositoryRuleWorkflows2 +} +// GetRepositoryRuleRequiredDeployments gets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +// returns a RepositoryRuleRequiredDeploymentsable when successful +func (m *RepositoryRule) GetRepositoryRuleRequiredDeployments()(RepositoryRuleRequiredDeploymentsable) { + return m.repositoryRuleRequiredDeployments +} +// GetRepositoryRuleRequiredLinearHistory gets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +// returns a RepositoryRuleRequiredLinearHistoryable when successful +func (m *RepositoryRule) GetRepositoryRuleRequiredLinearHistory()(RepositoryRuleRequiredLinearHistoryable) { + return m.repositoryRuleRequiredLinearHistory +} +// GetRepositoryRuleRequiredSignatures gets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +// returns a RepositoryRuleRequiredSignaturesable when successful +func (m *RepositoryRule) GetRepositoryRuleRequiredSignatures()(RepositoryRuleRequiredSignaturesable) { + return m.repositoryRuleRequiredSignatures +} +// GetRepositoryRuleRequiredStatusChecks gets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +// returns a RepositoryRuleRequiredStatusChecksable when successful +func (m *RepositoryRule) GetRepositoryRuleRequiredStatusChecks()(RepositoryRuleRequiredStatusChecksable) { + return m.repositoryRuleRequiredStatusChecks +} +// GetRepositoryRuleTagNamePattern gets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +// returns a RepositoryRuleTagNamePatternable when successful +func (m *RepositoryRule) GetRepositoryRuleTagNamePattern()(RepositoryRuleTagNamePatternable) { + return m.repositoryRuleTagNamePattern +} +// GetRepositoryRuleUpdate gets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +// returns a RepositoryRuleUpdateable when successful +func (m *RepositoryRule) GetRepositoryRuleUpdate()(RepositoryRuleUpdateable) { + return m.repositoryRuleUpdate +} +// GetRepositoryRuleWorkflows gets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +// returns a RepositoryRuleWorkflowsable when successful +func (m *RepositoryRule) GetRepositoryRuleWorkflows()(RepositoryRuleWorkflowsable) { + return m.repositoryRuleWorkflows +} +// Serialize serializes information the current object +func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFileExtensionRestriction() != nil { + err := writer.WriteObjectValue("", m.GetFileExtensionRestriction()) + if err != nil { + return err + } + } else if m.GetFilePathRestriction() != nil { + err := writer.WriteObjectValue("", m.GetFilePathRestriction()) + if err != nil { + return err + } + } else if m.GetMaxFilePathLength() != nil { + err := writer.WriteObjectValue("", m.GetMaxFilePathLength()) + if err != nil { + return err + } + } else if m.GetMaxFileSize() != nil { + err := writer.WriteObjectValue("", m.GetMaxFileSize()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleBranchNamePattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleBranchNamePattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleCodeScanning() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleCodeScanning()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleCommitAuthorEmailPattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleCommitAuthorEmailPattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleCommitMessagePattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleCommitMessagePattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleCommitterEmailPattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleCommitterEmailPattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleCreation() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleCreation()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleDeletion() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleDeletion()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleNonFastForward() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleNonFastForward()) + if err != nil { + return err + } + } else if m.GetRepositoryRulePullRequest() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRulePullRequest()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleBranchNamePattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleBranchNamePattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleBranchNamePattern0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleBranchNamePattern0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleBranchNamePattern1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleBranchNamePattern1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleBranchNamePattern2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleBranchNamePattern2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCodeScanning() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCodeScanning()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCodeScanning0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCodeScanning0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCodeScanning1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCodeScanning1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCodeScanning2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCodeScanning2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitMessagePattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitMessagePattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitMessagePattern0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitMessagePattern0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitMessagePattern1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitMessagePattern1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitMessagePattern2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitMessagePattern2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCommitterEmailPattern2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCreation() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCreation()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCreation0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCreation0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCreation1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCreation1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleCreation2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleCreation2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleDeletion() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleDeletion()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleDeletion0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleDeletion0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleDeletion1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleDeletion1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleDeletion2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleDeletion2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleNonFastForward() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleNonFastForward()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleNonFastForward0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleNonFastForward0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleNonFastForward1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleNonFastForward1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleNonFastForward2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleNonFastForward2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRulePullRequest() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRulePullRequest()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRulePullRequest0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRulePullRequest0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRulePullRequest1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRulePullRequest1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRulePullRequest2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRulePullRequest2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredDeployments() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredDeployments()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredDeployments0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredDeployments0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredDeployments1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredDeployments1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredDeployments2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredDeployments2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredLinearHistory2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredSignatures() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredSignatures()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredSignatures0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredSignatures0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredSignatures1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredSignatures1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredSignatures2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredSignatures2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleRequiredStatusChecks2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleTagNamePattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleTagNamePattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleTagNamePattern0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleTagNamePattern0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleTagNamePattern1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleTagNamePattern1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleTagNamePattern2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleTagNamePattern2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleUpdate() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleUpdate()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleUpdate0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleUpdate0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleUpdate1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleUpdate1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleUpdate2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleUpdate2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleWorkflows() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleWorkflows()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleWorkflows0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleWorkflows0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleWorkflows1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleWorkflows1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleWorkflows2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleWorkflows2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRequiredDeployments() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRequiredDeployments()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRequiredLinearHistory() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRequiredLinearHistory()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRequiredSignatures() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRequiredSignatures()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRequiredStatusChecks() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRequiredStatusChecks()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleTagNamePattern() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleTagNamePattern()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleUpdate() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleUpdate()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleWorkflows() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleWorkflows()) + if err != nil { + return err + } + } + return nil +} +// SetFileExtensionRestriction sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetFileExtensionRestriction(value File_extension_restrictionable)() { + m.file_extension_restriction = value +} +// SetFilePathRestriction sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetFilePathRestriction(value File_path_restrictionable)() { + m.file_path_restriction = value +} +// SetMaxFilePathLength sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetMaxFilePathLength(value Max_file_path_lengthable)() { + m.max_file_path_length = value +} +// SetMaxFileSize sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetMaxFileSize(value Max_file_sizeable)() { + m.max_file_size = value +} +// SetRepositoryRuleBranchNamePattern sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +func (m *RepositoryRule) SetRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() { + m.repositoryRuleBranchNamePattern = value +} +// SetRepositoryRuleCodeScanning sets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +func (m *RepositoryRule) SetRepositoryRuleCodeScanning(value RepositoryRuleCodeScanningable)() { + m.repositoryRuleCodeScanning = value +} +// SetRepositoryRuleCommitAuthorEmailPattern sets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleCommitAuthorEmailPattern(value RepositoryRuleCommitAuthorEmailPatternable)() { + m.repositoryRuleCommitAuthorEmailPattern = value +} +// SetRepositoryRuleCommitMessagePattern sets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +func (m *RepositoryRule) SetRepositoryRuleCommitMessagePattern(value RepositoryRuleCommitMessagePatternable)() { + m.repositoryRuleCommitMessagePattern = value +} +// SetRepositoryRuleCommitterEmailPattern sets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleCommitterEmailPattern(value RepositoryRuleCommitterEmailPatternable)() { + m.repositoryRuleCommitterEmailPattern = value +} +// SetRepositoryRuleCreation sets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +func (m *RepositoryRule) SetRepositoryRuleCreation(value RepositoryRuleCreationable)() { + m.repositoryRuleCreation = value +} +// SetRepositoryRuleDeletion sets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +func (m *RepositoryRule) SetRepositoryRuleDeletion(value RepositoryRuleDeletionable)() { + m.repositoryRuleDeletion = value +} +// SetRepositoryRuleFileExtensionRestriction sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction = value +} +// SetRepositoryRuleFileExtensionRestriction0 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction0(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction0 = value +} +// SetRepositoryRuleFileExtensionRestriction1 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction1(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction1 = value +} +// SetRepositoryRuleFileExtensionRestriction2 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction2(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction2 = value +} +// SetRepositoryRuleFilePathRestriction sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction = value +} +// SetRepositoryRuleFilePathRestriction0 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction0(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction0 = value +} +// SetRepositoryRuleFilePathRestriction1 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction1(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction1 = value +} +// SetRepositoryRuleFilePathRestriction2 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction2(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction2 = value +} +// SetRepositoryRuleMaxFilePathLength sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length = value +} +// SetRepositoryRuleMaxFilePathLength0 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength0(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length0 = value +} +// SetRepositoryRuleMaxFilePathLength1 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength1(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length1 = value +} +// SetRepositoryRuleMaxFilePathLength2 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength2(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length2 = value +} +// SetRepositoryRuleMaxFileSize sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size = value +} +// SetRepositoryRuleMaxFileSize0 sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize0(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size0 = value +} +// SetRepositoryRuleMaxFileSize1 sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize1(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size1 = value +} +// SetRepositoryRuleMaxFileSize2 sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize2(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size2 = value +} +// SetRepositoryRuleNonFastForward sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +func (m *RepositoryRule) SetRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() { + m.repositoryRuleNonFastForward = value +} +// SetRepositoryRulePullRequest sets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +func (m *RepositoryRule) SetRepositoryRulePullRequest(value RepositoryRulePullRequestable)() { + m.repositoryRulePullRequest = value +} +// SetRepositoryRuleRepositoryRuleBranchNamePattern sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() { + m.repositoryRuleRepositoryRuleBranchNamePattern = value +} +// SetRepositoryRuleRepositoryRuleBranchNamePattern0 sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleBranchNamePattern0(value RepositoryRuleBranchNamePatternable)() { + m.repositoryRuleRepositoryRuleBranchNamePattern0 = value +} +// SetRepositoryRuleRepositoryRuleBranchNamePattern1 sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleBranchNamePattern1(value RepositoryRuleBranchNamePatternable)() { + m.repositoryRuleRepositoryRuleBranchNamePattern1 = value +} +// SetRepositoryRuleRepositoryRuleBranchNamePattern2 sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleBranchNamePattern2(value RepositoryRuleBranchNamePatternable)() { + m.repositoryRuleRepositoryRuleBranchNamePattern2 = value +} +// SetRepositoryRuleRepositoryRuleCodeScanning sets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCodeScanning(value RepositoryRuleCodeScanningable)() { + m.repositoryRuleRepositoryRuleCodeScanning = value +} +// SetRepositoryRuleRepositoryRuleCodeScanning0 sets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCodeScanning0(value RepositoryRuleCodeScanningable)() { + m.repositoryRuleRepositoryRuleCodeScanning0 = value +} +// SetRepositoryRuleRepositoryRuleCodeScanning1 sets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCodeScanning1(value RepositoryRuleCodeScanningable)() { + m.repositoryRuleRepositoryRuleCodeScanning1 = value +} +// SetRepositoryRuleRepositoryRuleCodeScanning2 sets the repositoryRuleCodeScanning property value. Composed type representation for type RepositoryRuleCodeScanningable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCodeScanning2(value RepositoryRuleCodeScanningable)() { + m.repositoryRuleRepositoryRuleCodeScanning2 = value +} +// SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern sets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern(value RepositoryRuleCommitAuthorEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern = value +} +// SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0 sets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0(value RepositoryRuleCommitAuthorEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern0 = value +} +// SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1 sets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1(value RepositoryRuleCommitAuthorEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern1 = value +} +// SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2 sets the repositoryRuleCommitAuthorEmailPattern property value. Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2(value RepositoryRuleCommitAuthorEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitAuthorEmailPattern2 = value +} +// SetRepositoryRuleRepositoryRuleCommitMessagePattern sets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitMessagePattern(value RepositoryRuleCommitMessagePatternable)() { + m.repositoryRuleRepositoryRuleCommitMessagePattern = value +} +// SetRepositoryRuleRepositoryRuleCommitMessagePattern0 sets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitMessagePattern0(value RepositoryRuleCommitMessagePatternable)() { + m.repositoryRuleRepositoryRuleCommitMessagePattern0 = value +} +// SetRepositoryRuleRepositoryRuleCommitMessagePattern1 sets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitMessagePattern1(value RepositoryRuleCommitMessagePatternable)() { + m.repositoryRuleRepositoryRuleCommitMessagePattern1 = value +} +// SetRepositoryRuleRepositoryRuleCommitMessagePattern2 sets the repositoryRuleCommitMessagePattern property value. Composed type representation for type RepositoryRuleCommitMessagePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitMessagePattern2(value RepositoryRuleCommitMessagePatternable)() { + m.repositoryRuleRepositoryRuleCommitMessagePattern2 = value +} +// SetRepositoryRuleRepositoryRuleCommitterEmailPattern sets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitterEmailPattern(value RepositoryRuleCommitterEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitterEmailPattern = value +} +// SetRepositoryRuleRepositoryRuleCommitterEmailPattern0 sets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitterEmailPattern0(value RepositoryRuleCommitterEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitterEmailPattern0 = value +} +// SetRepositoryRuleRepositoryRuleCommitterEmailPattern1 sets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitterEmailPattern1(value RepositoryRuleCommitterEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitterEmailPattern1 = value +} +// SetRepositoryRuleRepositoryRuleCommitterEmailPattern2 sets the repositoryRuleCommitterEmailPattern property value. Composed type representation for type RepositoryRuleCommitterEmailPatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCommitterEmailPattern2(value RepositoryRuleCommitterEmailPatternable)() { + m.repositoryRuleRepositoryRuleCommitterEmailPattern2 = value +} +// SetRepositoryRuleRepositoryRuleCreation sets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCreation(value RepositoryRuleCreationable)() { + m.repositoryRuleRepositoryRuleCreation = value +} +// SetRepositoryRuleRepositoryRuleCreation0 sets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCreation0(value RepositoryRuleCreationable)() { + m.repositoryRuleRepositoryRuleCreation0 = value +} +// SetRepositoryRuleRepositoryRuleCreation1 sets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCreation1(value RepositoryRuleCreationable)() { + m.repositoryRuleRepositoryRuleCreation1 = value +} +// SetRepositoryRuleRepositoryRuleCreation2 sets the repositoryRuleCreation property value. Composed type representation for type RepositoryRuleCreationable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleCreation2(value RepositoryRuleCreationable)() { + m.repositoryRuleRepositoryRuleCreation2 = value +} +// SetRepositoryRuleRepositoryRuleDeletion sets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleDeletion(value RepositoryRuleDeletionable)() { + m.repositoryRuleRepositoryRuleDeletion = value +} +// SetRepositoryRuleRepositoryRuleDeletion0 sets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleDeletion0(value RepositoryRuleDeletionable)() { + m.repositoryRuleRepositoryRuleDeletion0 = value +} +// SetRepositoryRuleRepositoryRuleDeletion1 sets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleDeletion1(value RepositoryRuleDeletionable)() { + m.repositoryRuleRepositoryRuleDeletion1 = value +} +// SetRepositoryRuleRepositoryRuleDeletion2 sets the repositoryRuleDeletion property value. Composed type representation for type RepositoryRuleDeletionable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleDeletion2(value RepositoryRuleDeletionable)() { + m.repositoryRuleRepositoryRuleDeletion2 = value +} +// SetRepositoryRuleRepositoryRuleNonFastForward sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() { + m.repositoryRuleRepositoryRuleNonFastForward = value +} +// SetRepositoryRuleRepositoryRuleNonFastForward0 sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleNonFastForward0(value RepositoryRuleNonFastForwardable)() { + m.repositoryRuleRepositoryRuleNonFastForward0 = value +} +// SetRepositoryRuleRepositoryRuleNonFastForward1 sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleNonFastForward1(value RepositoryRuleNonFastForwardable)() { + m.repositoryRuleRepositoryRuleNonFastForward1 = value +} +// SetRepositoryRuleRepositoryRuleNonFastForward2 sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleNonFastForward2(value RepositoryRuleNonFastForwardable)() { + m.repositoryRuleRepositoryRuleNonFastForward2 = value +} +// SetRepositoryRuleRepositoryRulePullRequest sets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRulePullRequest(value RepositoryRulePullRequestable)() { + m.repositoryRuleRepositoryRulePullRequest = value +} +// SetRepositoryRuleRepositoryRulePullRequest0 sets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRulePullRequest0(value RepositoryRulePullRequestable)() { + m.repositoryRuleRepositoryRulePullRequest0 = value +} +// SetRepositoryRuleRepositoryRulePullRequest1 sets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRulePullRequest1(value RepositoryRulePullRequestable)() { + m.repositoryRuleRepositoryRulePullRequest1 = value +} +// SetRepositoryRuleRepositoryRulePullRequest2 sets the repositoryRulePullRequest property value. Composed type representation for type RepositoryRulePullRequestable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRulePullRequest2(value RepositoryRulePullRequestable)() { + m.repositoryRuleRepositoryRulePullRequest2 = value +} +// SetRepositoryRuleRepositoryRuleRequiredDeployments sets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredDeployments(value RepositoryRuleRequiredDeploymentsable)() { + m.repositoryRuleRepositoryRuleRequiredDeployments = value +} +// SetRepositoryRuleRepositoryRuleRequiredDeployments0 sets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredDeployments0(value RepositoryRuleRequiredDeploymentsable)() { + m.repositoryRuleRepositoryRuleRequiredDeployments0 = value +} +// SetRepositoryRuleRepositoryRuleRequiredDeployments1 sets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredDeployments1(value RepositoryRuleRequiredDeploymentsable)() { + m.repositoryRuleRepositoryRuleRequiredDeployments1 = value +} +// SetRepositoryRuleRepositoryRuleRequiredDeployments2 sets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredDeployments2(value RepositoryRuleRequiredDeploymentsable)() { + m.repositoryRuleRepositoryRuleRequiredDeployments2 = value +} +// SetRepositoryRuleRepositoryRuleRequiredLinearHistory sets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredLinearHistory(value RepositoryRuleRequiredLinearHistoryable)() { + m.repositoryRuleRepositoryRuleRequiredLinearHistory = value +} +// SetRepositoryRuleRepositoryRuleRequiredLinearHistory0 sets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredLinearHistory0(value RepositoryRuleRequiredLinearHistoryable)() { + m.repositoryRuleRepositoryRuleRequiredLinearHistory0 = value +} +// SetRepositoryRuleRepositoryRuleRequiredLinearHistory1 sets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredLinearHistory1(value RepositoryRuleRequiredLinearHistoryable)() { + m.repositoryRuleRepositoryRuleRequiredLinearHistory1 = value +} +// SetRepositoryRuleRepositoryRuleRequiredLinearHistory2 sets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredLinearHistory2(value RepositoryRuleRequiredLinearHistoryable)() { + m.repositoryRuleRepositoryRuleRequiredLinearHistory2 = value +} +// SetRepositoryRuleRepositoryRuleRequiredSignatures sets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredSignatures(value RepositoryRuleRequiredSignaturesable)() { + m.repositoryRuleRepositoryRuleRequiredSignatures = value +} +// SetRepositoryRuleRepositoryRuleRequiredSignatures0 sets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredSignatures0(value RepositoryRuleRequiredSignaturesable)() { + m.repositoryRuleRepositoryRuleRequiredSignatures0 = value +} +// SetRepositoryRuleRepositoryRuleRequiredSignatures1 sets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredSignatures1(value RepositoryRuleRequiredSignaturesable)() { + m.repositoryRuleRepositoryRuleRequiredSignatures1 = value +} +// SetRepositoryRuleRepositoryRuleRequiredSignatures2 sets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredSignatures2(value RepositoryRuleRequiredSignaturesable)() { + m.repositoryRuleRepositoryRuleRequiredSignatures2 = value +} +// SetRepositoryRuleRepositoryRuleRequiredStatusChecks sets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredStatusChecks(value RepositoryRuleRequiredStatusChecksable)() { + m.repositoryRuleRepositoryRuleRequiredStatusChecks = value +} +// SetRepositoryRuleRepositoryRuleRequiredStatusChecks0 sets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredStatusChecks0(value RepositoryRuleRequiredStatusChecksable)() { + m.repositoryRuleRepositoryRuleRequiredStatusChecks0 = value +} +// SetRepositoryRuleRepositoryRuleRequiredStatusChecks1 sets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredStatusChecks1(value RepositoryRuleRequiredStatusChecksable)() { + m.repositoryRuleRepositoryRuleRequiredStatusChecks1 = value +} +// SetRepositoryRuleRepositoryRuleRequiredStatusChecks2 sets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleRequiredStatusChecks2(value RepositoryRuleRequiredStatusChecksable)() { + m.repositoryRuleRepositoryRuleRequiredStatusChecks2 = value +} +// SetRepositoryRuleRepositoryRuleTagNamePattern sets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleTagNamePattern(value RepositoryRuleTagNamePatternable)() { + m.repositoryRuleRepositoryRuleTagNamePattern = value +} +// SetRepositoryRuleRepositoryRuleTagNamePattern0 sets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleTagNamePattern0(value RepositoryRuleTagNamePatternable)() { + m.repositoryRuleRepositoryRuleTagNamePattern0 = value +} +// SetRepositoryRuleRepositoryRuleTagNamePattern1 sets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleTagNamePattern1(value RepositoryRuleTagNamePatternable)() { + m.repositoryRuleRepositoryRuleTagNamePattern1 = value +} +// SetRepositoryRuleRepositoryRuleTagNamePattern2 sets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleTagNamePattern2(value RepositoryRuleTagNamePatternable)() { + m.repositoryRuleRepositoryRuleTagNamePattern2 = value +} +// SetRepositoryRuleRepositoryRuleUpdate sets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleUpdate(value RepositoryRuleUpdateable)() { + m.repositoryRuleRepositoryRuleUpdate = value +} +// SetRepositoryRuleRepositoryRuleUpdate0 sets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleUpdate0(value RepositoryRuleUpdateable)() { + m.repositoryRuleRepositoryRuleUpdate0 = value +} +// SetRepositoryRuleRepositoryRuleUpdate1 sets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleUpdate1(value RepositoryRuleUpdateable)() { + m.repositoryRuleRepositoryRuleUpdate1 = value +} +// SetRepositoryRuleRepositoryRuleUpdate2 sets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleUpdate2(value RepositoryRuleUpdateable)() { + m.repositoryRuleRepositoryRuleUpdate2 = value +} +// SetRepositoryRuleRepositoryRuleWorkflows sets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleWorkflows(value RepositoryRuleWorkflowsable)() { + m.repositoryRuleRepositoryRuleWorkflows = value +} +// SetRepositoryRuleRepositoryRuleWorkflows0 sets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleWorkflows0(value RepositoryRuleWorkflowsable)() { + m.repositoryRuleRepositoryRuleWorkflows0 = value +} +// SetRepositoryRuleRepositoryRuleWorkflows1 sets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleWorkflows1(value RepositoryRuleWorkflowsable)() { + m.repositoryRuleRepositoryRuleWorkflows1 = value +} +// SetRepositoryRuleRepositoryRuleWorkflows2 sets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleWorkflows2(value RepositoryRuleWorkflowsable)() { + m.repositoryRuleRepositoryRuleWorkflows2 = value +} +// SetRepositoryRuleRequiredDeployments sets the repositoryRuleRequiredDeployments property value. Composed type representation for type RepositoryRuleRequiredDeploymentsable +func (m *RepositoryRule) SetRepositoryRuleRequiredDeployments(value RepositoryRuleRequiredDeploymentsable)() { + m.repositoryRuleRequiredDeployments = value +} +// SetRepositoryRuleRequiredLinearHistory sets the repositoryRuleRequiredLinearHistory property value. Composed type representation for type RepositoryRuleRequiredLinearHistoryable +func (m *RepositoryRule) SetRepositoryRuleRequiredLinearHistory(value RepositoryRuleRequiredLinearHistoryable)() { + m.repositoryRuleRequiredLinearHistory = value +} +// SetRepositoryRuleRequiredSignatures sets the repositoryRuleRequiredSignatures property value. Composed type representation for type RepositoryRuleRequiredSignaturesable +func (m *RepositoryRule) SetRepositoryRuleRequiredSignatures(value RepositoryRuleRequiredSignaturesable)() { + m.repositoryRuleRequiredSignatures = value +} +// SetRepositoryRuleRequiredStatusChecks sets the repositoryRuleRequiredStatusChecks property value. Composed type representation for type RepositoryRuleRequiredStatusChecksable +func (m *RepositoryRule) SetRepositoryRuleRequiredStatusChecks(value RepositoryRuleRequiredStatusChecksable)() { + m.repositoryRuleRequiredStatusChecks = value +} +// SetRepositoryRuleTagNamePattern sets the repositoryRuleTagNamePattern property value. Composed type representation for type RepositoryRuleTagNamePatternable +func (m *RepositoryRule) SetRepositoryRuleTagNamePattern(value RepositoryRuleTagNamePatternable)() { + m.repositoryRuleTagNamePattern = value +} +// SetRepositoryRuleUpdate sets the repositoryRuleUpdate property value. Composed type representation for type RepositoryRuleUpdateable +func (m *RepositoryRule) SetRepositoryRuleUpdate(value RepositoryRuleUpdateable)() { + m.repositoryRuleUpdate = value +} +// SetRepositoryRuleWorkflows sets the repositoryRuleWorkflows property value. Composed type representation for type RepositoryRuleWorkflowsable +func (m *RepositoryRule) SetRepositoryRuleWorkflows(value RepositoryRuleWorkflowsable)() { + m.repositoryRuleWorkflows = value +} +type RepositoryRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileExtensionRestriction()(File_extension_restrictionable) + GetFilePathRestriction()(File_path_restrictionable) + GetMaxFilePathLength()(Max_file_path_lengthable) + GetMaxFileSize()(Max_file_sizeable) + GetRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) + GetRepositoryRuleCodeScanning()(RepositoryRuleCodeScanningable) + GetRepositoryRuleCommitAuthorEmailPattern()(RepositoryRuleCommitAuthorEmailPatternable) + GetRepositoryRuleCommitMessagePattern()(RepositoryRuleCommitMessagePatternable) + GetRepositoryRuleCommitterEmailPattern()(RepositoryRuleCommitterEmailPatternable) + GetRepositoryRuleCreation()(RepositoryRuleCreationable) + GetRepositoryRuleDeletion()(RepositoryRuleDeletionable) + GetRepositoryRuleFileExtensionRestriction()(File_extension_restrictionable) + GetRepositoryRuleFileExtensionRestriction0()(File_extension_restrictionable) + GetRepositoryRuleFileExtensionRestriction1()(File_extension_restrictionable) + GetRepositoryRuleFileExtensionRestriction2()(File_extension_restrictionable) + GetRepositoryRuleFilePathRestriction()(File_path_restrictionable) + GetRepositoryRuleFilePathRestriction0()(File_path_restrictionable) + GetRepositoryRuleFilePathRestriction1()(File_path_restrictionable) + GetRepositoryRuleFilePathRestriction2()(File_path_restrictionable) + GetRepositoryRuleMaxFilePathLength()(Max_file_path_lengthable) + GetRepositoryRuleMaxFilePathLength0()(Max_file_path_lengthable) + GetRepositoryRuleMaxFilePathLength1()(Max_file_path_lengthable) + GetRepositoryRuleMaxFilePathLength2()(Max_file_path_lengthable) + GetRepositoryRuleMaxFileSize()(Max_file_sizeable) + GetRepositoryRuleMaxFileSize0()(Max_file_sizeable) + GetRepositoryRuleMaxFileSize1()(Max_file_sizeable) + GetRepositoryRuleMaxFileSize2()(Max_file_sizeable) + GetRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) + GetRepositoryRulePullRequest()(RepositoryRulePullRequestable) + GetRepositoryRuleRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) + GetRepositoryRuleRepositoryRuleBranchNamePattern0()(RepositoryRuleBranchNamePatternable) + GetRepositoryRuleRepositoryRuleBranchNamePattern1()(RepositoryRuleBranchNamePatternable) + GetRepositoryRuleRepositoryRuleBranchNamePattern2()(RepositoryRuleBranchNamePatternable) + GetRepositoryRuleRepositoryRuleCodeScanning()(RepositoryRuleCodeScanningable) + GetRepositoryRuleRepositoryRuleCodeScanning0()(RepositoryRuleCodeScanningable) + GetRepositoryRuleRepositoryRuleCodeScanning1()(RepositoryRuleCodeScanningable) + GetRepositoryRuleRepositoryRuleCodeScanning2()(RepositoryRuleCodeScanningable) + GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern()(RepositoryRuleCommitAuthorEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0()(RepositoryRuleCommitAuthorEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1()(RepositoryRuleCommitAuthorEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2()(RepositoryRuleCommitAuthorEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitMessagePattern()(RepositoryRuleCommitMessagePatternable) + GetRepositoryRuleRepositoryRuleCommitMessagePattern0()(RepositoryRuleCommitMessagePatternable) + GetRepositoryRuleRepositoryRuleCommitMessagePattern1()(RepositoryRuleCommitMessagePatternable) + GetRepositoryRuleRepositoryRuleCommitMessagePattern2()(RepositoryRuleCommitMessagePatternable) + GetRepositoryRuleRepositoryRuleCommitterEmailPattern()(RepositoryRuleCommitterEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitterEmailPattern0()(RepositoryRuleCommitterEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitterEmailPattern1()(RepositoryRuleCommitterEmailPatternable) + GetRepositoryRuleRepositoryRuleCommitterEmailPattern2()(RepositoryRuleCommitterEmailPatternable) + GetRepositoryRuleRepositoryRuleCreation()(RepositoryRuleCreationable) + GetRepositoryRuleRepositoryRuleCreation0()(RepositoryRuleCreationable) + GetRepositoryRuleRepositoryRuleCreation1()(RepositoryRuleCreationable) + GetRepositoryRuleRepositoryRuleCreation2()(RepositoryRuleCreationable) + GetRepositoryRuleRepositoryRuleDeletion()(RepositoryRuleDeletionable) + GetRepositoryRuleRepositoryRuleDeletion0()(RepositoryRuleDeletionable) + GetRepositoryRuleRepositoryRuleDeletion1()(RepositoryRuleDeletionable) + GetRepositoryRuleRepositoryRuleDeletion2()(RepositoryRuleDeletionable) + GetRepositoryRuleRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) + GetRepositoryRuleRepositoryRuleNonFastForward0()(RepositoryRuleNonFastForwardable) + GetRepositoryRuleRepositoryRuleNonFastForward1()(RepositoryRuleNonFastForwardable) + GetRepositoryRuleRepositoryRuleNonFastForward2()(RepositoryRuleNonFastForwardable) + GetRepositoryRuleRepositoryRulePullRequest()(RepositoryRulePullRequestable) + GetRepositoryRuleRepositoryRulePullRequest0()(RepositoryRulePullRequestable) + GetRepositoryRuleRepositoryRulePullRequest1()(RepositoryRulePullRequestable) + GetRepositoryRuleRepositoryRulePullRequest2()(RepositoryRulePullRequestable) + GetRepositoryRuleRepositoryRuleRequiredDeployments()(RepositoryRuleRequiredDeploymentsable) + GetRepositoryRuleRepositoryRuleRequiredDeployments0()(RepositoryRuleRequiredDeploymentsable) + GetRepositoryRuleRepositoryRuleRequiredDeployments1()(RepositoryRuleRequiredDeploymentsable) + GetRepositoryRuleRepositoryRuleRequiredDeployments2()(RepositoryRuleRequiredDeploymentsable) + GetRepositoryRuleRepositoryRuleRequiredLinearHistory()(RepositoryRuleRequiredLinearHistoryable) + GetRepositoryRuleRepositoryRuleRequiredLinearHistory0()(RepositoryRuleRequiredLinearHistoryable) + GetRepositoryRuleRepositoryRuleRequiredLinearHistory1()(RepositoryRuleRequiredLinearHistoryable) + GetRepositoryRuleRepositoryRuleRequiredLinearHistory2()(RepositoryRuleRequiredLinearHistoryable) + GetRepositoryRuleRepositoryRuleRequiredSignatures()(RepositoryRuleRequiredSignaturesable) + GetRepositoryRuleRepositoryRuleRequiredSignatures0()(RepositoryRuleRequiredSignaturesable) + GetRepositoryRuleRepositoryRuleRequiredSignatures1()(RepositoryRuleRequiredSignaturesable) + GetRepositoryRuleRepositoryRuleRequiredSignatures2()(RepositoryRuleRequiredSignaturesable) + GetRepositoryRuleRepositoryRuleRequiredStatusChecks()(RepositoryRuleRequiredStatusChecksable) + GetRepositoryRuleRepositoryRuleRequiredStatusChecks0()(RepositoryRuleRequiredStatusChecksable) + GetRepositoryRuleRepositoryRuleRequiredStatusChecks1()(RepositoryRuleRequiredStatusChecksable) + GetRepositoryRuleRepositoryRuleRequiredStatusChecks2()(RepositoryRuleRequiredStatusChecksable) + GetRepositoryRuleRepositoryRuleTagNamePattern()(RepositoryRuleTagNamePatternable) + GetRepositoryRuleRepositoryRuleTagNamePattern0()(RepositoryRuleTagNamePatternable) + GetRepositoryRuleRepositoryRuleTagNamePattern1()(RepositoryRuleTagNamePatternable) + GetRepositoryRuleRepositoryRuleTagNamePattern2()(RepositoryRuleTagNamePatternable) + GetRepositoryRuleRepositoryRuleUpdate()(RepositoryRuleUpdateable) + GetRepositoryRuleRepositoryRuleUpdate0()(RepositoryRuleUpdateable) + GetRepositoryRuleRepositoryRuleUpdate1()(RepositoryRuleUpdateable) + GetRepositoryRuleRepositoryRuleUpdate2()(RepositoryRuleUpdateable) + GetRepositoryRuleRepositoryRuleWorkflows()(RepositoryRuleWorkflowsable) + GetRepositoryRuleRepositoryRuleWorkflows0()(RepositoryRuleWorkflowsable) + GetRepositoryRuleRepositoryRuleWorkflows1()(RepositoryRuleWorkflowsable) + GetRepositoryRuleRepositoryRuleWorkflows2()(RepositoryRuleWorkflowsable) + GetRepositoryRuleRequiredDeployments()(RepositoryRuleRequiredDeploymentsable) + GetRepositoryRuleRequiredLinearHistory()(RepositoryRuleRequiredLinearHistoryable) + GetRepositoryRuleRequiredSignatures()(RepositoryRuleRequiredSignaturesable) + GetRepositoryRuleRequiredStatusChecks()(RepositoryRuleRequiredStatusChecksable) + GetRepositoryRuleTagNamePattern()(RepositoryRuleTagNamePatternable) + GetRepositoryRuleUpdate()(RepositoryRuleUpdateable) + GetRepositoryRuleWorkflows()(RepositoryRuleWorkflowsable) + SetFileExtensionRestriction(value File_extension_restrictionable)() + SetFilePathRestriction(value File_path_restrictionable)() + SetMaxFilePathLength(value Max_file_path_lengthable)() + SetMaxFileSize(value Max_file_sizeable)() + SetRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() + SetRepositoryRuleCodeScanning(value RepositoryRuleCodeScanningable)() + SetRepositoryRuleCommitAuthorEmailPattern(value RepositoryRuleCommitAuthorEmailPatternable)() + SetRepositoryRuleCommitMessagePattern(value RepositoryRuleCommitMessagePatternable)() + SetRepositoryRuleCommitterEmailPattern(value RepositoryRuleCommitterEmailPatternable)() + SetRepositoryRuleCreation(value RepositoryRuleCreationable)() + SetRepositoryRuleDeletion(value RepositoryRuleDeletionable)() + SetRepositoryRuleFileExtensionRestriction(value File_extension_restrictionable)() + SetRepositoryRuleFileExtensionRestriction0(value File_extension_restrictionable)() + SetRepositoryRuleFileExtensionRestriction1(value File_extension_restrictionable)() + SetRepositoryRuleFileExtensionRestriction2(value File_extension_restrictionable)() + SetRepositoryRuleFilePathRestriction(value File_path_restrictionable)() + SetRepositoryRuleFilePathRestriction0(value File_path_restrictionable)() + SetRepositoryRuleFilePathRestriction1(value File_path_restrictionable)() + SetRepositoryRuleFilePathRestriction2(value File_path_restrictionable)() + SetRepositoryRuleMaxFilePathLength(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFilePathLength0(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFilePathLength1(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFilePathLength2(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFileSize(value Max_file_sizeable)() + SetRepositoryRuleMaxFileSize0(value Max_file_sizeable)() + SetRepositoryRuleMaxFileSize1(value Max_file_sizeable)() + SetRepositoryRuleMaxFileSize2(value Max_file_sizeable)() + SetRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() + SetRepositoryRulePullRequest(value RepositoryRulePullRequestable)() + SetRepositoryRuleRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() + SetRepositoryRuleRepositoryRuleBranchNamePattern0(value RepositoryRuleBranchNamePatternable)() + SetRepositoryRuleRepositoryRuleBranchNamePattern1(value RepositoryRuleBranchNamePatternable)() + SetRepositoryRuleRepositoryRuleBranchNamePattern2(value RepositoryRuleBranchNamePatternable)() + SetRepositoryRuleRepositoryRuleCodeScanning(value RepositoryRuleCodeScanningable)() + SetRepositoryRuleRepositoryRuleCodeScanning0(value RepositoryRuleCodeScanningable)() + SetRepositoryRuleRepositoryRuleCodeScanning1(value RepositoryRuleCodeScanningable)() + SetRepositoryRuleRepositoryRuleCodeScanning2(value RepositoryRuleCodeScanningable)() + SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern(value RepositoryRuleCommitAuthorEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern0(value RepositoryRuleCommitAuthorEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern1(value RepositoryRuleCommitAuthorEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitAuthorEmailPattern2(value RepositoryRuleCommitAuthorEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitMessagePattern(value RepositoryRuleCommitMessagePatternable)() + SetRepositoryRuleRepositoryRuleCommitMessagePattern0(value RepositoryRuleCommitMessagePatternable)() + SetRepositoryRuleRepositoryRuleCommitMessagePattern1(value RepositoryRuleCommitMessagePatternable)() + SetRepositoryRuleRepositoryRuleCommitMessagePattern2(value RepositoryRuleCommitMessagePatternable)() + SetRepositoryRuleRepositoryRuleCommitterEmailPattern(value RepositoryRuleCommitterEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitterEmailPattern0(value RepositoryRuleCommitterEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitterEmailPattern1(value RepositoryRuleCommitterEmailPatternable)() + SetRepositoryRuleRepositoryRuleCommitterEmailPattern2(value RepositoryRuleCommitterEmailPatternable)() + SetRepositoryRuleRepositoryRuleCreation(value RepositoryRuleCreationable)() + SetRepositoryRuleRepositoryRuleCreation0(value RepositoryRuleCreationable)() + SetRepositoryRuleRepositoryRuleCreation1(value RepositoryRuleCreationable)() + SetRepositoryRuleRepositoryRuleCreation2(value RepositoryRuleCreationable)() + SetRepositoryRuleRepositoryRuleDeletion(value RepositoryRuleDeletionable)() + SetRepositoryRuleRepositoryRuleDeletion0(value RepositoryRuleDeletionable)() + SetRepositoryRuleRepositoryRuleDeletion1(value RepositoryRuleDeletionable)() + SetRepositoryRuleRepositoryRuleDeletion2(value RepositoryRuleDeletionable)() + SetRepositoryRuleRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() + SetRepositoryRuleRepositoryRuleNonFastForward0(value RepositoryRuleNonFastForwardable)() + SetRepositoryRuleRepositoryRuleNonFastForward1(value RepositoryRuleNonFastForwardable)() + SetRepositoryRuleRepositoryRuleNonFastForward2(value RepositoryRuleNonFastForwardable)() + SetRepositoryRuleRepositoryRulePullRequest(value RepositoryRulePullRequestable)() + SetRepositoryRuleRepositoryRulePullRequest0(value RepositoryRulePullRequestable)() + SetRepositoryRuleRepositoryRulePullRequest1(value RepositoryRulePullRequestable)() + SetRepositoryRuleRepositoryRulePullRequest2(value RepositoryRulePullRequestable)() + SetRepositoryRuleRepositoryRuleRequiredDeployments(value RepositoryRuleRequiredDeploymentsable)() + SetRepositoryRuleRepositoryRuleRequiredDeployments0(value RepositoryRuleRequiredDeploymentsable)() + SetRepositoryRuleRepositoryRuleRequiredDeployments1(value RepositoryRuleRequiredDeploymentsable)() + SetRepositoryRuleRepositoryRuleRequiredDeployments2(value RepositoryRuleRequiredDeploymentsable)() + SetRepositoryRuleRepositoryRuleRequiredLinearHistory(value RepositoryRuleRequiredLinearHistoryable)() + SetRepositoryRuleRepositoryRuleRequiredLinearHistory0(value RepositoryRuleRequiredLinearHistoryable)() + SetRepositoryRuleRepositoryRuleRequiredLinearHistory1(value RepositoryRuleRequiredLinearHistoryable)() + SetRepositoryRuleRepositoryRuleRequiredLinearHistory2(value RepositoryRuleRequiredLinearHistoryable)() + SetRepositoryRuleRepositoryRuleRequiredSignatures(value RepositoryRuleRequiredSignaturesable)() + SetRepositoryRuleRepositoryRuleRequiredSignatures0(value RepositoryRuleRequiredSignaturesable)() + SetRepositoryRuleRepositoryRuleRequiredSignatures1(value RepositoryRuleRequiredSignaturesable)() + SetRepositoryRuleRepositoryRuleRequiredSignatures2(value RepositoryRuleRequiredSignaturesable)() + SetRepositoryRuleRepositoryRuleRequiredStatusChecks(value RepositoryRuleRequiredStatusChecksable)() + SetRepositoryRuleRepositoryRuleRequiredStatusChecks0(value RepositoryRuleRequiredStatusChecksable)() + SetRepositoryRuleRepositoryRuleRequiredStatusChecks1(value RepositoryRuleRequiredStatusChecksable)() + SetRepositoryRuleRepositoryRuleRequiredStatusChecks2(value RepositoryRuleRequiredStatusChecksable)() + SetRepositoryRuleRepositoryRuleTagNamePattern(value RepositoryRuleTagNamePatternable)() + SetRepositoryRuleRepositoryRuleTagNamePattern0(value RepositoryRuleTagNamePatternable)() + SetRepositoryRuleRepositoryRuleTagNamePattern1(value RepositoryRuleTagNamePatternable)() + SetRepositoryRuleRepositoryRuleTagNamePattern2(value RepositoryRuleTagNamePatternable)() + SetRepositoryRuleRepositoryRuleUpdate(value RepositoryRuleUpdateable)() + SetRepositoryRuleRepositoryRuleUpdate0(value RepositoryRuleUpdateable)() + SetRepositoryRuleRepositoryRuleUpdate1(value RepositoryRuleUpdateable)() + SetRepositoryRuleRepositoryRuleUpdate2(value RepositoryRuleUpdateable)() + SetRepositoryRuleRepositoryRuleWorkflows(value RepositoryRuleWorkflowsable)() + SetRepositoryRuleRepositoryRuleWorkflows0(value RepositoryRuleWorkflowsable)() + SetRepositoryRuleRepositoryRuleWorkflows1(value RepositoryRuleWorkflowsable)() + SetRepositoryRuleRepositoryRuleWorkflows2(value RepositoryRuleWorkflowsable)() + SetRepositoryRuleRequiredDeployments(value RepositoryRuleRequiredDeploymentsable)() + SetRepositoryRuleRequiredLinearHistory(value RepositoryRuleRequiredLinearHistoryable)() + SetRepositoryRuleRequiredSignatures(value RepositoryRuleRequiredSignaturesable)() + SetRepositoryRuleRequiredStatusChecks(value RepositoryRuleRequiredStatusChecksable)() + SetRepositoryRuleTagNamePattern(value RepositoryRuleTagNamePatternable)() + SetRepositoryRuleUpdate(value RepositoryRuleUpdateable)() + SetRepositoryRuleWorkflows(value RepositoryRuleWorkflowsable)() +} diff --git a/pkg/github/models/repository_rule_branch_name_pattern.go b/pkg/github/models/repository_rule_branch_name_pattern.go new file mode 100644 index 0000000..20ca9fa --- /dev/null +++ b/pkg/github/models/repository_rule_branch_name_pattern.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleBranchNamePattern parameters to be used for the branch_name_pattern rule +type RepositoryRuleBranchNamePattern struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleBranchNamePattern_parametersable + // The type property + typeEscaped *RepositoryRuleBranchNamePattern_type +} +// NewRepositoryRuleBranchNamePattern instantiates a new RepositoryRuleBranchNamePattern and sets the default values. +func NewRepositoryRuleBranchNamePattern()(*RepositoryRuleBranchNamePattern) { + m := &RepositoryRuleBranchNamePattern{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleBranchNamePatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleBranchNamePatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleBranchNamePattern(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleBranchNamePattern) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleBranchNamePattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleBranchNamePattern_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleBranchNamePattern_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleBranchNamePattern_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleBranchNamePattern_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleBranchNamePattern_parametersable when successful +func (m *RepositoryRuleBranchNamePattern) GetParameters()(RepositoryRuleBranchNamePattern_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleBranchNamePattern_type when successful +func (m *RepositoryRuleBranchNamePattern) GetTypeEscaped()(*RepositoryRuleBranchNamePattern_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleBranchNamePattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleBranchNamePattern) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleBranchNamePattern) SetParameters(value RepositoryRuleBranchNamePattern_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleBranchNamePattern) SetTypeEscaped(value *RepositoryRuleBranchNamePattern_type)() { + m.typeEscaped = value +} +type RepositoryRuleBranchNamePatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleBranchNamePattern_parametersable) + GetTypeEscaped()(*RepositoryRuleBranchNamePattern_type) + SetParameters(value RepositoryRuleBranchNamePattern_parametersable)() + SetTypeEscaped(value *RepositoryRuleBranchNamePattern_type)() +} diff --git a/pkg/github/models/repository_rule_branch_name_pattern_parameters.go b/pkg/github/models/repository_rule_branch_name_pattern_parameters.go new file mode 100644 index 0000000..498b7fe --- /dev/null +++ b/pkg/github/models/repository_rule_branch_name_pattern_parameters.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleBranchNamePattern_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How this rule will appear to users. + name *string + // If true, the rule will fail if the pattern matches. + negate *bool + // The operator to use for matching. + operator *RepositoryRuleBranchNamePattern_parameters_operator + // The pattern to match with. + pattern *string +} +// NewRepositoryRuleBranchNamePattern_parameters instantiates a new RepositoryRuleBranchNamePattern_parameters and sets the default values. +func NewRepositoryRuleBranchNamePattern_parameters()(*RepositoryRuleBranchNamePattern_parameters) { + m := &RepositoryRuleBranchNamePattern_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleBranchNamePattern_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleBranchNamePattern_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleBranchNamePattern_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleBranchNamePattern_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleBranchNamePattern_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["negate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNegate(val) + } + return nil + } + res["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleBranchNamePattern_parameters_operator) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*RepositoryRuleBranchNamePattern_parameters_operator)) + } + return nil + } + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + return res +} +// GetName gets the name property value. How this rule will appear to users. +// returns a *string when successful +func (m *RepositoryRuleBranchNamePattern_parameters) GetName()(*string) { + return m.name +} +// GetNegate gets the negate property value. If true, the rule will fail if the pattern matches. +// returns a *bool when successful +func (m *RepositoryRuleBranchNamePattern_parameters) GetNegate()(*bool) { + return m.negate +} +// GetOperator gets the operator property value. The operator to use for matching. +// returns a *RepositoryRuleBranchNamePattern_parameters_operator when successful +func (m *RepositoryRuleBranchNamePattern_parameters) GetOperator()(*RepositoryRuleBranchNamePattern_parameters_operator) { + return m.operator +} +// GetPattern gets the pattern property value. The pattern to match with. +// returns a *string when successful +func (m *RepositoryRuleBranchNamePattern_parameters) GetPattern()(*string) { + return m.pattern +} +// Serialize serializes information the current object +func (m *RepositoryRuleBranchNamePattern_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("negate", m.GetNegate()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + 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 *RepositoryRuleBranchNamePattern_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. How this rule will appear to users. +func (m *RepositoryRuleBranchNamePattern_parameters) SetName(value *string)() { + m.name = value +} +// SetNegate sets the negate property value. If true, the rule will fail if the pattern matches. +func (m *RepositoryRuleBranchNamePattern_parameters) SetNegate(value *bool)() { + m.negate = value +} +// SetOperator sets the operator property value. The operator to use for matching. +func (m *RepositoryRuleBranchNamePattern_parameters) SetOperator(value *RepositoryRuleBranchNamePattern_parameters_operator)() { + m.operator = value +} +// SetPattern sets the pattern property value. The pattern to match with. +func (m *RepositoryRuleBranchNamePattern_parameters) SetPattern(value *string)() { + m.pattern = value +} +type RepositoryRuleBranchNamePattern_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNegate()(*bool) + GetOperator()(*RepositoryRuleBranchNamePattern_parameters_operator) + GetPattern()(*string) + SetName(value *string)() + SetNegate(value *bool)() + SetOperator(value *RepositoryRuleBranchNamePattern_parameters_operator)() + SetPattern(value *string)() +} diff --git a/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go b/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go new file mode 100644 index 0000000..d192b70 --- /dev/null +++ b/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The operator to use for matching. +type RepositoryRuleBranchNamePattern_parameters_operator int + +const ( + STARTS_WITH_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR RepositoryRuleBranchNamePattern_parameters_operator = iota + ENDS_WITH_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + CONTAINS_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + REGEX_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR +) + +func (i RepositoryRuleBranchNamePattern_parameters_operator) String() string { + return []string{"starts_with", "ends_with", "contains", "regex"}[i] +} +func ParseRepositoryRuleBranchNamePattern_parameters_operator(v string) (any, error) { + result := STARTS_WITH_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + switch v { + case "starts_with": + result = STARTS_WITH_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + case "ends_with": + result = ENDS_WITH_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + case "contains": + result = CONTAINS_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + case "regex": + result = REGEX_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR + default: + return 0, errors.New("Unknown RepositoryRuleBranchNamePattern_parameters_operator value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleBranchNamePattern_parameters_operator(values []RepositoryRuleBranchNamePattern_parameters_operator) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleBranchNamePattern_parameters_operator) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_branch_name_pattern_type.go b/pkg/github/models/repository_rule_branch_name_pattern_type.go new file mode 100644 index 0000000..0fce8bf --- /dev/null +++ b/pkg/github/models/repository_rule_branch_name_pattern_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleBranchNamePattern_type int + +const ( + BRANCH_NAME_PATTERN_REPOSITORYRULEBRANCHNAMEPATTERN_TYPE RepositoryRuleBranchNamePattern_type = iota +) + +func (i RepositoryRuleBranchNamePattern_type) String() string { + return []string{"branch_name_pattern"}[i] +} +func ParseRepositoryRuleBranchNamePattern_type(v string) (any, error) { + result := BRANCH_NAME_PATTERN_REPOSITORYRULEBRANCHNAMEPATTERN_TYPE + switch v { + case "branch_name_pattern": + result = BRANCH_NAME_PATTERN_REPOSITORYRULEBRANCHNAMEPATTERN_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleBranchNamePattern_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleBranchNamePattern_type(values []RepositoryRuleBranchNamePattern_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleBranchNamePattern_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_code_scanning.go b/pkg/github/models/repository_rule_code_scanning.go new file mode 100644 index 0000000..c2bce2d --- /dev/null +++ b/pkg/github/models/repository_rule_code_scanning.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleCodeScanning choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. +type RepositoryRuleCodeScanning struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleCodeScanning_parametersable + // The type property + typeEscaped *RepositoryRuleCodeScanning_type +} +// NewRepositoryRuleCodeScanning instantiates a new RepositoryRuleCodeScanning and sets the default values. +func NewRepositoryRuleCodeScanning()(*RepositoryRuleCodeScanning) { + m := &RepositoryRuleCodeScanning{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCodeScanningFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCodeScanningFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCodeScanning(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCodeScanning) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCodeScanning) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleCodeScanning_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleCodeScanning_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCodeScanning_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleCodeScanning_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleCodeScanning_parametersable when successful +func (m *RepositoryRuleCodeScanning) GetParameters()(RepositoryRuleCodeScanning_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleCodeScanning_type when successful +func (m *RepositoryRuleCodeScanning) GetTypeEscaped()(*RepositoryRuleCodeScanning_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleCodeScanning) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleCodeScanning) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleCodeScanning) SetParameters(value RepositoryRuleCodeScanning_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleCodeScanning) SetTypeEscaped(value *RepositoryRuleCodeScanning_type)() { + m.typeEscaped = value +} +type RepositoryRuleCodeScanningable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleCodeScanning_parametersable) + GetTypeEscaped()(*RepositoryRuleCodeScanning_type) + SetParameters(value RepositoryRuleCodeScanning_parametersable)() + SetTypeEscaped(value *RepositoryRuleCodeScanning_type)() +} diff --git a/pkg/github/models/repository_rule_code_scanning_parameters.go b/pkg/github/models/repository_rule_code_scanning_parameters.go new file mode 100644 index 0000000..f43a876 --- /dev/null +++ b/pkg/github/models/repository_rule_code_scanning_parameters.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleCodeScanning_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Tools that must provide code scanning results for this rule to pass. + code_scanning_tools []RepositoryRuleParamsCodeScanningToolable +} +// NewRepositoryRuleCodeScanning_parameters instantiates a new RepositoryRuleCodeScanning_parameters and sets the default values. +func NewRepositoryRuleCodeScanning_parameters()(*RepositoryRuleCodeScanning_parameters) { + m := &RepositoryRuleCodeScanning_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCodeScanning_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCodeScanning_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCodeScanning_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCodeScanning_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodeScanningTools gets the code_scanning_tools property value. Tools that must provide code scanning results for this rule to pass. +// returns a []RepositoryRuleParamsCodeScanningToolable when successful +func (m *RepositoryRuleCodeScanning_parameters) GetCodeScanningTools()([]RepositoryRuleParamsCodeScanningToolable) { + return m.code_scanning_tools +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCodeScanning_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code_scanning_tools"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryRuleParamsCodeScanningToolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryRuleParamsCodeScanningToolable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryRuleParamsCodeScanningToolable) + } + } + m.SetCodeScanningTools(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *RepositoryRuleCodeScanning_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCodeScanningTools() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCodeScanningTools())) + for i, v := range m.GetCodeScanningTools() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("code_scanning_tools", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleCodeScanning_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodeScanningTools sets the code_scanning_tools property value. Tools that must provide code scanning results for this rule to pass. +func (m *RepositoryRuleCodeScanning_parameters) SetCodeScanningTools(value []RepositoryRuleParamsCodeScanningToolable)() { + m.code_scanning_tools = value +} +type RepositoryRuleCodeScanning_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodeScanningTools()([]RepositoryRuleParamsCodeScanningToolable) + SetCodeScanningTools(value []RepositoryRuleParamsCodeScanningToolable)() +} diff --git a/pkg/github/models/repository_rule_code_scanning_type.go b/pkg/github/models/repository_rule_code_scanning_type.go new file mode 100644 index 0000000..47648a5 --- /dev/null +++ b/pkg/github/models/repository_rule_code_scanning_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleCodeScanning_type int + +const ( + CODE_SCANNING_REPOSITORYRULECODESCANNING_TYPE RepositoryRuleCodeScanning_type = iota +) + +func (i RepositoryRuleCodeScanning_type) String() string { + return []string{"code_scanning"}[i] +} +func ParseRepositoryRuleCodeScanning_type(v string) (any, error) { + result := CODE_SCANNING_REPOSITORYRULECODESCANNING_TYPE + switch v { + case "code_scanning": + result = CODE_SCANNING_REPOSITORYRULECODESCANNING_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleCodeScanning_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCodeScanning_type(values []RepositoryRuleCodeScanning_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCodeScanning_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_commit_author_email_pattern.go b/pkg/github/models/repository_rule_commit_author_email_pattern.go new file mode 100644 index 0000000..5d0729e --- /dev/null +++ b/pkg/github/models/repository_rule_commit_author_email_pattern.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleCommitAuthorEmailPattern parameters to be used for the commit_author_email_pattern rule +type RepositoryRuleCommitAuthorEmailPattern struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleCommitAuthorEmailPattern_parametersable + // The type property + typeEscaped *RepositoryRuleCommitAuthorEmailPattern_type +} +// NewRepositoryRuleCommitAuthorEmailPattern instantiates a new RepositoryRuleCommitAuthorEmailPattern and sets the default values. +func NewRepositoryRuleCommitAuthorEmailPattern()(*RepositoryRuleCommitAuthorEmailPattern) { + m := &RepositoryRuleCommitAuthorEmailPattern{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCommitAuthorEmailPatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCommitAuthorEmailPatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCommitAuthorEmailPattern(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCommitAuthorEmailPattern) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCommitAuthorEmailPattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleCommitAuthorEmailPattern_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleCommitAuthorEmailPattern_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCommitAuthorEmailPattern_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleCommitAuthorEmailPattern_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleCommitAuthorEmailPattern_parametersable when successful +func (m *RepositoryRuleCommitAuthorEmailPattern) GetParameters()(RepositoryRuleCommitAuthorEmailPattern_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleCommitAuthorEmailPattern_type when successful +func (m *RepositoryRuleCommitAuthorEmailPattern) GetTypeEscaped()(*RepositoryRuleCommitAuthorEmailPattern_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleCommitAuthorEmailPattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleCommitAuthorEmailPattern) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleCommitAuthorEmailPattern) SetParameters(value RepositoryRuleCommitAuthorEmailPattern_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleCommitAuthorEmailPattern) SetTypeEscaped(value *RepositoryRuleCommitAuthorEmailPattern_type)() { + m.typeEscaped = value +} +type RepositoryRuleCommitAuthorEmailPatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleCommitAuthorEmailPattern_parametersable) + GetTypeEscaped()(*RepositoryRuleCommitAuthorEmailPattern_type) + SetParameters(value RepositoryRuleCommitAuthorEmailPattern_parametersable)() + SetTypeEscaped(value *RepositoryRuleCommitAuthorEmailPattern_type)() +} diff --git a/pkg/github/models/repository_rule_commit_author_email_pattern_parameters.go b/pkg/github/models/repository_rule_commit_author_email_pattern_parameters.go new file mode 100644 index 0000000..5787db7 --- /dev/null +++ b/pkg/github/models/repository_rule_commit_author_email_pattern_parameters.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleCommitAuthorEmailPattern_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How this rule will appear to users. + name *string + // If true, the rule will fail if the pattern matches. + negate *bool + // The operator to use for matching. + operator *RepositoryRuleCommitAuthorEmailPattern_parameters_operator + // The pattern to match with. + pattern *string +} +// NewRepositoryRuleCommitAuthorEmailPattern_parameters instantiates a new RepositoryRuleCommitAuthorEmailPattern_parameters and sets the default values. +func NewRepositoryRuleCommitAuthorEmailPattern_parameters()(*RepositoryRuleCommitAuthorEmailPattern_parameters) { + m := &RepositoryRuleCommitAuthorEmailPattern_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCommitAuthorEmailPattern_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCommitAuthorEmailPattern_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCommitAuthorEmailPattern_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["negate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNegate(val) + } + return nil + } + res["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCommitAuthorEmailPattern_parameters_operator) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*RepositoryRuleCommitAuthorEmailPattern_parameters_operator)) + } + return nil + } + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + return res +} +// GetName gets the name property value. How this rule will appear to users. +// returns a *string when successful +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) GetName()(*string) { + return m.name +} +// GetNegate gets the negate property value. If true, the rule will fail if the pattern matches. +// returns a *bool when successful +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) GetNegate()(*bool) { + return m.negate +} +// GetOperator gets the operator property value. The operator to use for matching. +// returns a *RepositoryRuleCommitAuthorEmailPattern_parameters_operator when successful +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) GetOperator()(*RepositoryRuleCommitAuthorEmailPattern_parameters_operator) { + return m.operator +} +// GetPattern gets the pattern property value. The pattern to match with. +// returns a *string when successful +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) GetPattern()(*string) { + return m.pattern +} +// Serialize serializes information the current object +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("negate", m.GetNegate()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + 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 *RepositoryRuleCommitAuthorEmailPattern_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. How this rule will appear to users. +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) SetName(value *string)() { + m.name = value +} +// SetNegate sets the negate property value. If true, the rule will fail if the pattern matches. +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) SetNegate(value *bool)() { + m.negate = value +} +// SetOperator sets the operator property value. The operator to use for matching. +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) SetOperator(value *RepositoryRuleCommitAuthorEmailPattern_parameters_operator)() { + m.operator = value +} +// SetPattern sets the pattern property value. The pattern to match with. +func (m *RepositoryRuleCommitAuthorEmailPattern_parameters) SetPattern(value *string)() { + m.pattern = value +} +type RepositoryRuleCommitAuthorEmailPattern_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNegate()(*bool) + GetOperator()(*RepositoryRuleCommitAuthorEmailPattern_parameters_operator) + GetPattern()(*string) + SetName(value *string)() + SetNegate(value *bool)() + SetOperator(value *RepositoryRuleCommitAuthorEmailPattern_parameters_operator)() + SetPattern(value *string)() +} diff --git a/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go b/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go new file mode 100644 index 0000000..85c4203 --- /dev/null +++ b/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The operator to use for matching. +type RepositoryRuleCommitAuthorEmailPattern_parameters_operator int + +const ( + STARTS_WITH_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR RepositoryRuleCommitAuthorEmailPattern_parameters_operator = iota + ENDS_WITH_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + CONTAINS_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + REGEX_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR +) + +func (i RepositoryRuleCommitAuthorEmailPattern_parameters_operator) String() string { + return []string{"starts_with", "ends_with", "contains", "regex"}[i] +} +func ParseRepositoryRuleCommitAuthorEmailPattern_parameters_operator(v string) (any, error) { + result := STARTS_WITH_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + switch v { + case "starts_with": + result = STARTS_WITH_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + case "ends_with": + result = ENDS_WITH_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + case "contains": + result = CONTAINS_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + case "regex": + result = REGEX_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR + default: + return 0, errors.New("Unknown RepositoryRuleCommitAuthorEmailPattern_parameters_operator value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCommitAuthorEmailPattern_parameters_operator(values []RepositoryRuleCommitAuthorEmailPattern_parameters_operator) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCommitAuthorEmailPattern_parameters_operator) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_commit_author_email_pattern_type.go b/pkg/github/models/repository_rule_commit_author_email_pattern_type.go new file mode 100644 index 0000000..1be3b2e --- /dev/null +++ b/pkg/github/models/repository_rule_commit_author_email_pattern_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleCommitAuthorEmailPattern_type int + +const ( + COMMIT_AUTHOR_EMAIL_PATTERN_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_TYPE RepositoryRuleCommitAuthorEmailPattern_type = iota +) + +func (i RepositoryRuleCommitAuthorEmailPattern_type) String() string { + return []string{"commit_author_email_pattern"}[i] +} +func ParseRepositoryRuleCommitAuthorEmailPattern_type(v string) (any, error) { + result := COMMIT_AUTHOR_EMAIL_PATTERN_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_TYPE + switch v { + case "commit_author_email_pattern": + result = COMMIT_AUTHOR_EMAIL_PATTERN_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleCommitAuthorEmailPattern_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCommitAuthorEmailPattern_type(values []RepositoryRuleCommitAuthorEmailPattern_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCommitAuthorEmailPattern_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_commit_message_pattern.go b/pkg/github/models/repository_rule_commit_message_pattern.go new file mode 100644 index 0000000..da8d458 --- /dev/null +++ b/pkg/github/models/repository_rule_commit_message_pattern.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleCommitMessagePattern parameters to be used for the commit_message_pattern rule +type RepositoryRuleCommitMessagePattern struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleCommitMessagePattern_parametersable + // The type property + typeEscaped *RepositoryRuleCommitMessagePattern_type +} +// NewRepositoryRuleCommitMessagePattern instantiates a new RepositoryRuleCommitMessagePattern and sets the default values. +func NewRepositoryRuleCommitMessagePattern()(*RepositoryRuleCommitMessagePattern) { + m := &RepositoryRuleCommitMessagePattern{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCommitMessagePatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCommitMessagePatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCommitMessagePattern(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCommitMessagePattern) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCommitMessagePattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleCommitMessagePattern_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleCommitMessagePattern_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCommitMessagePattern_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleCommitMessagePattern_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleCommitMessagePattern_parametersable when successful +func (m *RepositoryRuleCommitMessagePattern) GetParameters()(RepositoryRuleCommitMessagePattern_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleCommitMessagePattern_type when successful +func (m *RepositoryRuleCommitMessagePattern) GetTypeEscaped()(*RepositoryRuleCommitMessagePattern_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleCommitMessagePattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleCommitMessagePattern) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleCommitMessagePattern) SetParameters(value RepositoryRuleCommitMessagePattern_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleCommitMessagePattern) SetTypeEscaped(value *RepositoryRuleCommitMessagePattern_type)() { + m.typeEscaped = value +} +type RepositoryRuleCommitMessagePatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleCommitMessagePattern_parametersable) + GetTypeEscaped()(*RepositoryRuleCommitMessagePattern_type) + SetParameters(value RepositoryRuleCommitMessagePattern_parametersable)() + SetTypeEscaped(value *RepositoryRuleCommitMessagePattern_type)() +} diff --git a/pkg/github/models/repository_rule_commit_message_pattern_parameters.go b/pkg/github/models/repository_rule_commit_message_pattern_parameters.go new file mode 100644 index 0000000..5dfeb80 --- /dev/null +++ b/pkg/github/models/repository_rule_commit_message_pattern_parameters.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleCommitMessagePattern_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How this rule will appear to users. + name *string + // If true, the rule will fail if the pattern matches. + negate *bool + // The operator to use for matching. + operator *RepositoryRuleCommitMessagePattern_parameters_operator + // The pattern to match with. + pattern *string +} +// NewRepositoryRuleCommitMessagePattern_parameters instantiates a new RepositoryRuleCommitMessagePattern_parameters and sets the default values. +func NewRepositoryRuleCommitMessagePattern_parameters()(*RepositoryRuleCommitMessagePattern_parameters) { + m := &RepositoryRuleCommitMessagePattern_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCommitMessagePattern_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCommitMessagePattern_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCommitMessagePattern_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCommitMessagePattern_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCommitMessagePattern_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["negate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNegate(val) + } + return nil + } + res["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCommitMessagePattern_parameters_operator) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*RepositoryRuleCommitMessagePattern_parameters_operator)) + } + return nil + } + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + return res +} +// GetName gets the name property value. How this rule will appear to users. +// returns a *string when successful +func (m *RepositoryRuleCommitMessagePattern_parameters) GetName()(*string) { + return m.name +} +// GetNegate gets the negate property value. If true, the rule will fail if the pattern matches. +// returns a *bool when successful +func (m *RepositoryRuleCommitMessagePattern_parameters) GetNegate()(*bool) { + return m.negate +} +// GetOperator gets the operator property value. The operator to use for matching. +// returns a *RepositoryRuleCommitMessagePattern_parameters_operator when successful +func (m *RepositoryRuleCommitMessagePattern_parameters) GetOperator()(*RepositoryRuleCommitMessagePattern_parameters_operator) { + return m.operator +} +// GetPattern gets the pattern property value. The pattern to match with. +// returns a *string when successful +func (m *RepositoryRuleCommitMessagePattern_parameters) GetPattern()(*string) { + return m.pattern +} +// Serialize serializes information the current object +func (m *RepositoryRuleCommitMessagePattern_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("negate", m.GetNegate()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + 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 *RepositoryRuleCommitMessagePattern_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. How this rule will appear to users. +func (m *RepositoryRuleCommitMessagePattern_parameters) SetName(value *string)() { + m.name = value +} +// SetNegate sets the negate property value. If true, the rule will fail if the pattern matches. +func (m *RepositoryRuleCommitMessagePattern_parameters) SetNegate(value *bool)() { + m.negate = value +} +// SetOperator sets the operator property value. The operator to use for matching. +func (m *RepositoryRuleCommitMessagePattern_parameters) SetOperator(value *RepositoryRuleCommitMessagePattern_parameters_operator)() { + m.operator = value +} +// SetPattern sets the pattern property value. The pattern to match with. +func (m *RepositoryRuleCommitMessagePattern_parameters) SetPattern(value *string)() { + m.pattern = value +} +type RepositoryRuleCommitMessagePattern_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNegate()(*bool) + GetOperator()(*RepositoryRuleCommitMessagePattern_parameters_operator) + GetPattern()(*string) + SetName(value *string)() + SetNegate(value *bool)() + SetOperator(value *RepositoryRuleCommitMessagePattern_parameters_operator)() + SetPattern(value *string)() +} diff --git a/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go b/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go new file mode 100644 index 0000000..e310dd2 --- /dev/null +++ b/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The operator to use for matching. +type RepositoryRuleCommitMessagePattern_parameters_operator int + +const ( + STARTS_WITH_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR RepositoryRuleCommitMessagePattern_parameters_operator = iota + ENDS_WITH_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + CONTAINS_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + REGEX_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR +) + +func (i RepositoryRuleCommitMessagePattern_parameters_operator) String() string { + return []string{"starts_with", "ends_with", "contains", "regex"}[i] +} +func ParseRepositoryRuleCommitMessagePattern_parameters_operator(v string) (any, error) { + result := STARTS_WITH_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + switch v { + case "starts_with": + result = STARTS_WITH_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + case "ends_with": + result = ENDS_WITH_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + case "contains": + result = CONTAINS_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + case "regex": + result = REGEX_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR + default: + return 0, errors.New("Unknown RepositoryRuleCommitMessagePattern_parameters_operator value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCommitMessagePattern_parameters_operator(values []RepositoryRuleCommitMessagePattern_parameters_operator) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCommitMessagePattern_parameters_operator) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_commit_message_pattern_type.go b/pkg/github/models/repository_rule_commit_message_pattern_type.go new file mode 100644 index 0000000..8282213 --- /dev/null +++ b/pkg/github/models/repository_rule_commit_message_pattern_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleCommitMessagePattern_type int + +const ( + COMMIT_MESSAGE_PATTERN_REPOSITORYRULECOMMITMESSAGEPATTERN_TYPE RepositoryRuleCommitMessagePattern_type = iota +) + +func (i RepositoryRuleCommitMessagePattern_type) String() string { + return []string{"commit_message_pattern"}[i] +} +func ParseRepositoryRuleCommitMessagePattern_type(v string) (any, error) { + result := COMMIT_MESSAGE_PATTERN_REPOSITORYRULECOMMITMESSAGEPATTERN_TYPE + switch v { + case "commit_message_pattern": + result = COMMIT_MESSAGE_PATTERN_REPOSITORYRULECOMMITMESSAGEPATTERN_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleCommitMessagePattern_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCommitMessagePattern_type(values []RepositoryRuleCommitMessagePattern_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCommitMessagePattern_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_committer_email_pattern.go b/pkg/github/models/repository_rule_committer_email_pattern.go new file mode 100644 index 0000000..940cda6 --- /dev/null +++ b/pkg/github/models/repository_rule_committer_email_pattern.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleCommitterEmailPattern parameters to be used for the committer_email_pattern rule +type RepositoryRuleCommitterEmailPattern struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleCommitterEmailPattern_parametersable + // The type property + typeEscaped *RepositoryRuleCommitterEmailPattern_type +} +// NewRepositoryRuleCommitterEmailPattern instantiates a new RepositoryRuleCommitterEmailPattern and sets the default values. +func NewRepositoryRuleCommitterEmailPattern()(*RepositoryRuleCommitterEmailPattern) { + m := &RepositoryRuleCommitterEmailPattern{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCommitterEmailPatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCommitterEmailPatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCommitterEmailPattern(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCommitterEmailPattern) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCommitterEmailPattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleCommitterEmailPattern_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleCommitterEmailPattern_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCommitterEmailPattern_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleCommitterEmailPattern_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleCommitterEmailPattern_parametersable when successful +func (m *RepositoryRuleCommitterEmailPattern) GetParameters()(RepositoryRuleCommitterEmailPattern_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleCommitterEmailPattern_type when successful +func (m *RepositoryRuleCommitterEmailPattern) GetTypeEscaped()(*RepositoryRuleCommitterEmailPattern_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleCommitterEmailPattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleCommitterEmailPattern) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleCommitterEmailPattern) SetParameters(value RepositoryRuleCommitterEmailPattern_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleCommitterEmailPattern) SetTypeEscaped(value *RepositoryRuleCommitterEmailPattern_type)() { + m.typeEscaped = value +} +type RepositoryRuleCommitterEmailPatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleCommitterEmailPattern_parametersable) + GetTypeEscaped()(*RepositoryRuleCommitterEmailPattern_type) + SetParameters(value RepositoryRuleCommitterEmailPattern_parametersable)() + SetTypeEscaped(value *RepositoryRuleCommitterEmailPattern_type)() +} diff --git a/pkg/github/models/repository_rule_committer_email_pattern_parameters.go b/pkg/github/models/repository_rule_committer_email_pattern_parameters.go new file mode 100644 index 0000000..59befb8 --- /dev/null +++ b/pkg/github/models/repository_rule_committer_email_pattern_parameters.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleCommitterEmailPattern_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How this rule will appear to users. + name *string + // If true, the rule will fail if the pattern matches. + negate *bool + // The operator to use for matching. + operator *RepositoryRuleCommitterEmailPattern_parameters_operator + // The pattern to match with. + pattern *string +} +// NewRepositoryRuleCommitterEmailPattern_parameters instantiates a new RepositoryRuleCommitterEmailPattern_parameters and sets the default values. +func NewRepositoryRuleCommitterEmailPattern_parameters()(*RepositoryRuleCommitterEmailPattern_parameters) { + m := &RepositoryRuleCommitterEmailPattern_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCommitterEmailPattern_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCommitterEmailPattern_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCommitterEmailPattern_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCommitterEmailPattern_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCommitterEmailPattern_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["negate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNegate(val) + } + return nil + } + res["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCommitterEmailPattern_parameters_operator) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*RepositoryRuleCommitterEmailPattern_parameters_operator)) + } + return nil + } + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + return res +} +// GetName gets the name property value. How this rule will appear to users. +// returns a *string when successful +func (m *RepositoryRuleCommitterEmailPattern_parameters) GetName()(*string) { + return m.name +} +// GetNegate gets the negate property value. If true, the rule will fail if the pattern matches. +// returns a *bool when successful +func (m *RepositoryRuleCommitterEmailPattern_parameters) GetNegate()(*bool) { + return m.negate +} +// GetOperator gets the operator property value. The operator to use for matching. +// returns a *RepositoryRuleCommitterEmailPattern_parameters_operator when successful +func (m *RepositoryRuleCommitterEmailPattern_parameters) GetOperator()(*RepositoryRuleCommitterEmailPattern_parameters_operator) { + return m.operator +} +// GetPattern gets the pattern property value. The pattern to match with. +// returns a *string when successful +func (m *RepositoryRuleCommitterEmailPattern_parameters) GetPattern()(*string) { + return m.pattern +} +// Serialize serializes information the current object +func (m *RepositoryRuleCommitterEmailPattern_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("negate", m.GetNegate()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + 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 *RepositoryRuleCommitterEmailPattern_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. How this rule will appear to users. +func (m *RepositoryRuleCommitterEmailPattern_parameters) SetName(value *string)() { + m.name = value +} +// SetNegate sets the negate property value. If true, the rule will fail if the pattern matches. +func (m *RepositoryRuleCommitterEmailPattern_parameters) SetNegate(value *bool)() { + m.negate = value +} +// SetOperator sets the operator property value. The operator to use for matching. +func (m *RepositoryRuleCommitterEmailPattern_parameters) SetOperator(value *RepositoryRuleCommitterEmailPattern_parameters_operator)() { + m.operator = value +} +// SetPattern sets the pattern property value. The pattern to match with. +func (m *RepositoryRuleCommitterEmailPattern_parameters) SetPattern(value *string)() { + m.pattern = value +} +type RepositoryRuleCommitterEmailPattern_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNegate()(*bool) + GetOperator()(*RepositoryRuleCommitterEmailPattern_parameters_operator) + GetPattern()(*string) + SetName(value *string)() + SetNegate(value *bool)() + SetOperator(value *RepositoryRuleCommitterEmailPattern_parameters_operator)() + SetPattern(value *string)() +} diff --git a/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go b/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go new file mode 100644 index 0000000..a722faf --- /dev/null +++ b/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The operator to use for matching. +type RepositoryRuleCommitterEmailPattern_parameters_operator int + +const ( + STARTS_WITH_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR RepositoryRuleCommitterEmailPattern_parameters_operator = iota + ENDS_WITH_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + CONTAINS_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + REGEX_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR +) + +func (i RepositoryRuleCommitterEmailPattern_parameters_operator) String() string { + return []string{"starts_with", "ends_with", "contains", "regex"}[i] +} +func ParseRepositoryRuleCommitterEmailPattern_parameters_operator(v string) (any, error) { + result := STARTS_WITH_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + switch v { + case "starts_with": + result = STARTS_WITH_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + case "ends_with": + result = ENDS_WITH_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + case "contains": + result = CONTAINS_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + case "regex": + result = REGEX_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR + default: + return 0, errors.New("Unknown RepositoryRuleCommitterEmailPattern_parameters_operator value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCommitterEmailPattern_parameters_operator(values []RepositoryRuleCommitterEmailPattern_parameters_operator) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCommitterEmailPattern_parameters_operator) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_committer_email_pattern_type.go b/pkg/github/models/repository_rule_committer_email_pattern_type.go new file mode 100644 index 0000000..13b7488 --- /dev/null +++ b/pkg/github/models/repository_rule_committer_email_pattern_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleCommitterEmailPattern_type int + +const ( + COMMITTER_EMAIL_PATTERN_REPOSITORYRULECOMMITTEREMAILPATTERN_TYPE RepositoryRuleCommitterEmailPattern_type = iota +) + +func (i RepositoryRuleCommitterEmailPattern_type) String() string { + return []string{"committer_email_pattern"}[i] +} +func ParseRepositoryRuleCommitterEmailPattern_type(v string) (any, error) { + result := COMMITTER_EMAIL_PATTERN_REPOSITORYRULECOMMITTEREMAILPATTERN_TYPE + switch v { + case "committer_email_pattern": + result = COMMITTER_EMAIL_PATTERN_REPOSITORYRULECOMMITTEREMAILPATTERN_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleCommitterEmailPattern_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCommitterEmailPattern_type(values []RepositoryRuleCommitterEmailPattern_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCommitterEmailPattern_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_creation.go b/pkg/github/models/repository_rule_creation.go new file mode 100644 index 0000000..0493901 --- /dev/null +++ b/pkg/github/models/repository_rule_creation.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleCreation only allow users with bypass permission to create matching refs. +type RepositoryRuleCreation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type property + typeEscaped *RepositoryRuleCreation_type +} +// NewRepositoryRuleCreation instantiates a new RepositoryRuleCreation and sets the default values. +func NewRepositoryRuleCreation()(*RepositoryRuleCreation) { + m := &RepositoryRuleCreation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleCreationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleCreationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleCreation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleCreation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleCreation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleCreation_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleCreation_type)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleCreation_type when successful +func (m *RepositoryRuleCreation) GetTypeEscaped()(*RepositoryRuleCreation_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleCreation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleCreation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleCreation) SetTypeEscaped(value *RepositoryRuleCreation_type)() { + m.typeEscaped = value +} +type RepositoryRuleCreationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*RepositoryRuleCreation_type) + SetTypeEscaped(value *RepositoryRuleCreation_type)() +} diff --git a/pkg/github/models/repository_rule_creation_type.go b/pkg/github/models/repository_rule_creation_type.go new file mode 100644 index 0000000..830e8d0 --- /dev/null +++ b/pkg/github/models/repository_rule_creation_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleCreation_type int + +const ( + CREATION_REPOSITORYRULECREATION_TYPE RepositoryRuleCreation_type = iota +) + +func (i RepositoryRuleCreation_type) String() string { + return []string{"creation"}[i] +} +func ParseRepositoryRuleCreation_type(v string) (any, error) { + result := CREATION_REPOSITORYRULECREATION_TYPE + switch v { + case "creation": + result = CREATION_REPOSITORYRULECREATION_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleCreation_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleCreation_type(values []RepositoryRuleCreation_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleCreation_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_deletion.go b/pkg/github/models/repository_rule_deletion.go new file mode 100644 index 0000000..2fcc1e6 --- /dev/null +++ b/pkg/github/models/repository_rule_deletion.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleDeletion only allow users with bypass permissions to delete matching refs. +type RepositoryRuleDeletion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type property + typeEscaped *RepositoryRuleDeletion_type +} +// NewRepositoryRuleDeletion instantiates a new RepositoryRuleDeletion and sets the default values. +func NewRepositoryRuleDeletion()(*RepositoryRuleDeletion) { + m := &RepositoryRuleDeletion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleDeletionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleDeletionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleDeletion(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleDeletion) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleDeletion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleDeletion_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleDeletion_type)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleDeletion_type when successful +func (m *RepositoryRuleDeletion) GetTypeEscaped()(*RepositoryRuleDeletion_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleDeletion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleDeletion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleDeletion) SetTypeEscaped(value *RepositoryRuleDeletion_type)() { + m.typeEscaped = value +} +type RepositoryRuleDeletionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*RepositoryRuleDeletion_type) + SetTypeEscaped(value *RepositoryRuleDeletion_type)() +} diff --git a/pkg/github/models/repository_rule_deletion_type.go b/pkg/github/models/repository_rule_deletion_type.go new file mode 100644 index 0000000..77cb2c7 --- /dev/null +++ b/pkg/github/models/repository_rule_deletion_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleDeletion_type int + +const ( + DELETION_REPOSITORYRULEDELETION_TYPE RepositoryRuleDeletion_type = iota +) + +func (i RepositoryRuleDeletion_type) String() string { + return []string{"deletion"}[i] +} +func ParseRepositoryRuleDeletion_type(v string) (any, error) { + result := DELETION_REPOSITORYRULEDELETION_TYPE + switch v { + case "deletion": + result = DELETION_REPOSITORYRULEDELETION_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleDeletion_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleDeletion_type(values []RepositoryRuleDeletion_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleDeletion_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_detailed.go b/pkg/github/models/repository_rule_detailed.go new file mode 100644 index 0000000..30252c3 --- /dev/null +++ b/pkg/github/models/repository_rule_detailed.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleDetailed a repository rule with ruleset details. +type RepositoryRuleDetailed struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewRepositoryRuleDetailed instantiates a new RepositoryRuleDetailed and sets the default values. +func NewRepositoryRuleDetailed()(*RepositoryRuleDetailed) { + m := &RepositoryRuleDetailed{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleDetailedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleDetailedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleDetailed(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleDetailed) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleDetailed) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *RepositoryRuleDetailed) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleDetailed) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type RepositoryRuleDetailedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/repository_rule_enforcement.go b/pkg/github/models/repository_rule_enforcement.go new file mode 100644 index 0000000..668268d --- /dev/null +++ b/pkg/github/models/repository_rule_enforcement.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +type RepositoryRuleEnforcement int + +const ( + DISABLED_REPOSITORYRULEENFORCEMENT RepositoryRuleEnforcement = iota + ACTIVE_REPOSITORYRULEENFORCEMENT + EVALUATE_REPOSITORYRULEENFORCEMENT +) + +func (i RepositoryRuleEnforcement) String() string { + return []string{"disabled", "active", "evaluate"}[i] +} +func ParseRepositoryRuleEnforcement(v string) (any, error) { + result := DISABLED_REPOSITORYRULEENFORCEMENT + switch v { + case "disabled": + result = DISABLED_REPOSITORYRULEENFORCEMENT + case "active": + result = ACTIVE_REPOSITORYRULEENFORCEMENT + case "evaluate": + result = EVALUATE_REPOSITORYRULEENFORCEMENT + default: + return 0, errors.New("Unknown RepositoryRuleEnforcement value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleEnforcement(values []RepositoryRuleEnforcement) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleEnforcement) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_non_fast_forward.go b/pkg/github/models/repository_rule_non_fast_forward.go new file mode 100644 index 0000000..ca1a992 --- /dev/null +++ b/pkg/github/models/repository_rule_non_fast_forward.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleNonFastForward prevent users with push access from force pushing to refs. +type RepositoryRuleNonFastForward struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type property + typeEscaped *RepositoryRuleNonFastForward_type +} +// NewRepositoryRuleNonFastForward instantiates a new RepositoryRuleNonFastForward and sets the default values. +func NewRepositoryRuleNonFastForward()(*RepositoryRuleNonFastForward) { + m := &RepositoryRuleNonFastForward{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleNonFastForwardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleNonFastForwardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleNonFastForward(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleNonFastForward) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleNonFastForward) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleNonFastForward_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleNonFastForward_type)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleNonFastForward_type when successful +func (m *RepositoryRuleNonFastForward) GetTypeEscaped()(*RepositoryRuleNonFastForward_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleNonFastForward) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleNonFastForward) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleNonFastForward) SetTypeEscaped(value *RepositoryRuleNonFastForward_type)() { + m.typeEscaped = value +} +type RepositoryRuleNonFastForwardable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*RepositoryRuleNonFastForward_type) + SetTypeEscaped(value *RepositoryRuleNonFastForward_type)() +} diff --git a/pkg/github/models/repository_rule_non_fast_forward_type.go b/pkg/github/models/repository_rule_non_fast_forward_type.go new file mode 100644 index 0000000..5a1b21a --- /dev/null +++ b/pkg/github/models/repository_rule_non_fast_forward_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleNonFastForward_type int + +const ( + NON_FAST_FORWARD_REPOSITORYRULENONFASTFORWARD_TYPE RepositoryRuleNonFastForward_type = iota +) + +func (i RepositoryRuleNonFastForward_type) String() string { + return []string{"non_fast_forward"}[i] +} +func ParseRepositoryRuleNonFastForward_type(v string) (any, error) { + result := NON_FAST_FORWARD_REPOSITORYRULENONFASTFORWARD_TYPE + switch v { + case "non_fast_forward": + result = NON_FAST_FORWARD_REPOSITORYRULENONFASTFORWARD_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleNonFastForward_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleNonFastForward_type(values []RepositoryRuleNonFastForward_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleNonFastForward_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_params_code_scanning_tool.go b/pkg/github/models/repository_rule_params_code_scanning_tool.go new file mode 100644 index 0000000..e5fe6d7 --- /dev/null +++ b/pkg/github/models/repository_rule_params_code_scanning_tool.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleParamsCodeScanningTool a tool that must provide code scanning results for this rule to pass. +type RepositoryRuleParamsCodeScanningTool struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + alerts_threshold *RepositoryRuleParamsCodeScanningTool_alerts_threshold + // The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + security_alerts_threshold *RepositoryRuleParamsCodeScanningTool_security_alerts_threshold + // The name of a code scanning tool + tool *string +} +// NewRepositoryRuleParamsCodeScanningTool instantiates a new RepositoryRuleParamsCodeScanningTool and sets the default values. +func NewRepositoryRuleParamsCodeScanningTool()(*RepositoryRuleParamsCodeScanningTool) { + m := &RepositoryRuleParamsCodeScanningTool{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleParamsCodeScanningToolFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleParamsCodeScanningToolFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleParamsCodeScanningTool(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleParamsCodeScanningTool) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAlertsThreshold gets the alerts_threshold property value. The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." +// returns a *RepositoryRuleParamsCodeScanningTool_alerts_threshold when successful +func (m *RepositoryRuleParamsCodeScanningTool) GetAlertsThreshold()(*RepositoryRuleParamsCodeScanningTool_alerts_threshold) { + return m.alerts_threshold +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleParamsCodeScanningTool) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alerts_threshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleParamsCodeScanningTool_alerts_threshold) + if err != nil { + return err + } + if val != nil { + m.SetAlertsThreshold(val.(*RepositoryRuleParamsCodeScanningTool_alerts_threshold)) + } + return nil + } + res["security_alerts_threshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleParamsCodeScanningTool_security_alerts_threshold) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAlertsThreshold(val.(*RepositoryRuleParamsCodeScanningTool_security_alerts_threshold)) + } + return nil + } + res["tool"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTool(val) + } + return nil + } + return res +} +// GetSecurityAlertsThreshold gets the security_alerts_threshold property value. The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." +// returns a *RepositoryRuleParamsCodeScanningTool_security_alerts_threshold when successful +func (m *RepositoryRuleParamsCodeScanningTool) GetSecurityAlertsThreshold()(*RepositoryRuleParamsCodeScanningTool_security_alerts_threshold) { + return m.security_alerts_threshold +} +// GetTool gets the tool property value. The name of a code scanning tool +// returns a *string when successful +func (m *RepositoryRuleParamsCodeScanningTool) GetTool()(*string) { + return m.tool +} +// Serialize serializes information the current object +func (m *RepositoryRuleParamsCodeScanningTool) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAlertsThreshold() != nil { + cast := (*m.GetAlertsThreshold()).String() + err := writer.WriteStringValue("alerts_threshold", &cast) + if err != nil { + return err + } + } + if m.GetSecurityAlertsThreshold() != nil { + cast := (*m.GetSecurityAlertsThreshold()).String() + err := writer.WriteStringValue("security_alerts_threshold", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tool", m.GetTool()) + 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 *RepositoryRuleParamsCodeScanningTool) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAlertsThreshold sets the alerts_threshold property value. The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." +func (m *RepositoryRuleParamsCodeScanningTool) SetAlertsThreshold(value *RepositoryRuleParamsCodeScanningTool_alerts_threshold)() { + m.alerts_threshold = value +} +// SetSecurityAlertsThreshold sets the security_alerts_threshold property value. The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." +func (m *RepositoryRuleParamsCodeScanningTool) SetSecurityAlertsThreshold(value *RepositoryRuleParamsCodeScanningTool_security_alerts_threshold)() { + m.security_alerts_threshold = value +} +// SetTool sets the tool property value. The name of a code scanning tool +func (m *RepositoryRuleParamsCodeScanningTool) SetTool(value *string)() { + m.tool = value +} +type RepositoryRuleParamsCodeScanningToolable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertsThreshold()(*RepositoryRuleParamsCodeScanningTool_alerts_threshold) + GetSecurityAlertsThreshold()(*RepositoryRuleParamsCodeScanningTool_security_alerts_threshold) + GetTool()(*string) + SetAlertsThreshold(value *RepositoryRuleParamsCodeScanningTool_alerts_threshold)() + SetSecurityAlertsThreshold(value *RepositoryRuleParamsCodeScanningTool_security_alerts_threshold)() + SetTool(value *string)() +} diff --git a/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go b/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go new file mode 100644 index 0000000..30cf753 --- /dev/null +++ b/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." +type RepositoryRuleParamsCodeScanningTool_alerts_threshold int + +const ( + NONE_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD RepositoryRuleParamsCodeScanningTool_alerts_threshold = iota + ERRORS_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + ERRORS_AND_WARNINGS_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + ALL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD +) + +func (i RepositoryRuleParamsCodeScanningTool_alerts_threshold) String() string { + return []string{"none", "errors", "errors_and_warnings", "all"}[i] +} +func ParseRepositoryRuleParamsCodeScanningTool_alerts_threshold(v string) (any, error) { + result := NONE_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + switch v { + case "none": + result = NONE_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + case "errors": + result = ERRORS_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + case "errors_and_warnings": + result = ERRORS_AND_WARNINGS_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + case "all": + result = ALL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD + default: + return 0, errors.New("Unknown RepositoryRuleParamsCodeScanningTool_alerts_threshold value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleParamsCodeScanningTool_alerts_threshold(values []RepositoryRuleParamsCodeScanningTool_alerts_threshold) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleParamsCodeScanningTool_alerts_threshold) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go b/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go new file mode 100644 index 0000000..187693f --- /dev/null +++ b/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." +type RepositoryRuleParamsCodeScanningTool_security_alerts_threshold int + +const ( + NONE_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD RepositoryRuleParamsCodeScanningTool_security_alerts_threshold = iota + CRITICAL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + HIGH_OR_HIGHER_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + MEDIUM_OR_HIGHER_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + ALL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD +) + +func (i RepositoryRuleParamsCodeScanningTool_security_alerts_threshold) String() string { + return []string{"none", "critical", "high_or_higher", "medium_or_higher", "all"}[i] +} +func ParseRepositoryRuleParamsCodeScanningTool_security_alerts_threshold(v string) (any, error) { + result := NONE_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + switch v { + case "none": + result = NONE_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + case "critical": + result = CRITICAL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + case "high_or_higher": + result = HIGH_OR_HIGHER_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + case "medium_or_higher": + result = MEDIUM_OR_HIGHER_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + case "all": + result = ALL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD + default: + return 0, errors.New("Unknown RepositoryRuleParamsCodeScanningTool_security_alerts_threshold value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleParamsCodeScanningTool_security_alerts_threshold(values []RepositoryRuleParamsCodeScanningTool_security_alerts_threshold) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleParamsCodeScanningTool_security_alerts_threshold) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_params_status_check_configuration.go b/pkg/github/models/repository_rule_params_status_check_configuration.go new file mode 100644 index 0000000..06a851d --- /dev/null +++ b/pkg/github/models/repository_rule_params_status_check_configuration.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleParamsStatusCheckConfiguration required status check +type RepositoryRuleParamsStatusCheckConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The status check context name that must be present on the commit. + context *string + // The optional integration ID that this status check must originate from. + integration_id *int32 +} +// NewRepositoryRuleParamsStatusCheckConfiguration instantiates a new RepositoryRuleParamsStatusCheckConfiguration and sets the default values. +func NewRepositoryRuleParamsStatusCheckConfiguration()(*RepositoryRuleParamsStatusCheckConfiguration) { + m := &RepositoryRuleParamsStatusCheckConfiguration{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleParamsStatusCheckConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleParamsStatusCheckConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleParamsStatusCheckConfiguration(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleParamsStatusCheckConfiguration) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContext gets the context property value. The status check context name that must be present on the commit. +// returns a *string when successful +func (m *RepositoryRuleParamsStatusCheckConfiguration) GetContext()(*string) { + return m.context +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleParamsStatusCheckConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + res["integration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIntegrationId(val) + } + return nil + } + return res +} +// GetIntegrationId gets the integration_id property value. The optional integration ID that this status check must originate from. +// returns a *int32 when successful +func (m *RepositoryRuleParamsStatusCheckConfiguration) GetIntegrationId()(*int32) { + return m.integration_id +} +// Serialize serializes information the current object +func (m *RepositoryRuleParamsStatusCheckConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("integration_id", m.GetIntegrationId()) + 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 *RepositoryRuleParamsStatusCheckConfiguration) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContext sets the context property value. The status check context name that must be present on the commit. +func (m *RepositoryRuleParamsStatusCheckConfiguration) SetContext(value *string)() { + m.context = value +} +// SetIntegrationId sets the integration_id property value. The optional integration ID that this status check must originate from. +func (m *RepositoryRuleParamsStatusCheckConfiguration) SetIntegrationId(value *int32)() { + m.integration_id = value +} +type RepositoryRuleParamsStatusCheckConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContext()(*string) + GetIntegrationId()(*int32) + SetContext(value *string)() + SetIntegrationId(value *int32)() +} diff --git a/pkg/github/models/repository_rule_params_workflow_file_reference.go b/pkg/github/models/repository_rule_params_workflow_file_reference.go new file mode 100644 index 0000000..860f40e --- /dev/null +++ b/pkg/github/models/repository_rule_params_workflow_file_reference.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleParamsWorkflowFileReference a workflow that must run for this rule to pass +type RepositoryRuleParamsWorkflowFileReference struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The path to the workflow file + path *string + // The ref (branch or tag) of the workflow file to use + ref *string + // The ID of the repository where the workflow is defined + repository_id *int32 + // The commit SHA of the workflow file to use + sha *string +} +// NewRepositoryRuleParamsWorkflowFileReference instantiates a new RepositoryRuleParamsWorkflowFileReference and sets the default values. +func NewRepositoryRuleParamsWorkflowFileReference()(*RepositoryRuleParamsWorkflowFileReference) { + m := &RepositoryRuleParamsWorkflowFileReference{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleParamsWorkflowFileReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleParamsWorkflowFileReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleParamsWorkflowFileReference(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleParamsWorkflowFileReference) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleParamsWorkflowFileReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The path to the workflow file +// returns a *string when successful +func (m *RepositoryRuleParamsWorkflowFileReference) GetPath()(*string) { + return m.path +} +// GetRef gets the ref property value. The ref (branch or tag) of the workflow file to use +// returns a *string when successful +func (m *RepositoryRuleParamsWorkflowFileReference) GetRef()(*string) { + return m.ref +} +// GetRepositoryId gets the repository_id property value. The ID of the repository where the workflow is defined +// returns a *int32 when successful +func (m *RepositoryRuleParamsWorkflowFileReference) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetSha gets the sha property value. The commit SHA of the workflow file to use +// returns a *string when successful +func (m *RepositoryRuleParamsWorkflowFileReference) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *RepositoryRuleParamsWorkflowFileReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *RepositoryRuleParamsWorkflowFileReference) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPath sets the path property value. The path to the workflow file +func (m *RepositoryRuleParamsWorkflowFileReference) SetPath(value *string)() { + m.path = value +} +// SetRef sets the ref property value. The ref (branch or tag) of the workflow file to use +func (m *RepositoryRuleParamsWorkflowFileReference) SetRef(value *string)() { + m.ref = value +} +// SetRepositoryId sets the repository_id property value. The ID of the repository where the workflow is defined +func (m *RepositoryRuleParamsWorkflowFileReference) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetSha sets the sha property value. The commit SHA of the workflow file to use +func (m *RepositoryRuleParamsWorkflowFileReference) SetSha(value *string)() { + m.sha = value +} +type RepositoryRuleParamsWorkflowFileReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPath()(*string) + GetRef()(*string) + GetRepositoryId()(*int32) + GetSha()(*string) + SetPath(value *string)() + SetRef(value *string)() + SetRepositoryId(value *int32)() + SetSha(value *string)() +} diff --git a/pkg/github/models/repository_rule_pull_request.go b/pkg/github/models/repository_rule_pull_request.go new file mode 100644 index 0000000..9c20297 --- /dev/null +++ b/pkg/github/models/repository_rule_pull_request.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRulePullRequest require all commits be made to a non-target branch and submitted via a pull request before they can be merged. +type RepositoryRulePullRequest struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRulePullRequest_parametersable + // The type property + typeEscaped *RepositoryRulePullRequest_type +} +// NewRepositoryRulePullRequest instantiates a new RepositoryRulePullRequest and sets the default values. +func NewRepositoryRulePullRequest()(*RepositoryRulePullRequest) { + m := &RepositoryRulePullRequest{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRulePullRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRulePullRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRulePullRequest(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRulePullRequest) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRulePullRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRulePullRequest_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRulePullRequest_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRulePullRequest_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRulePullRequest_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRulePullRequest_parametersable when successful +func (m *RepositoryRulePullRequest) GetParameters()(RepositoryRulePullRequest_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRulePullRequest_type when successful +func (m *RepositoryRulePullRequest) GetTypeEscaped()(*RepositoryRulePullRequest_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRulePullRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRulePullRequest) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRulePullRequest) SetParameters(value RepositoryRulePullRequest_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRulePullRequest) SetTypeEscaped(value *RepositoryRulePullRequest_type)() { + m.typeEscaped = value +} +type RepositoryRulePullRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRulePullRequest_parametersable) + GetTypeEscaped()(*RepositoryRulePullRequest_type) + SetParameters(value RepositoryRulePullRequest_parametersable)() + SetTypeEscaped(value *RepositoryRulePullRequest_type)() +} diff --git a/pkg/github/models/repository_rule_pull_request_parameters.go b/pkg/github/models/repository_rule_pull_request_parameters.go new file mode 100644 index 0000000..9725325 --- /dev/null +++ b/pkg/github/models/repository_rule_pull_request_parameters.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRulePullRequest_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // New, reviewable commits pushed will dismiss previous pull request review approvals. + dismiss_stale_reviews_on_push *bool + // Require an approving review in pull requests that modify files that have a designated code owner. + require_code_owner_review *bool + // Whether the most recent reviewable push must be approved by someone other than the person who pushed it. + require_last_push_approval *bool + // The number of approving reviews that are required before a pull request can be merged. + required_approving_review_count *int32 + // All conversations on code must be resolved before a pull request can be merged. + required_review_thread_resolution *bool +} +// NewRepositoryRulePullRequest_parameters instantiates a new RepositoryRulePullRequest_parameters and sets the default values. +func NewRepositoryRulePullRequest_parameters()(*RepositoryRulePullRequest_parameters) { + m := &RepositoryRulePullRequest_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRulePullRequest_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRulePullRequest_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRulePullRequest_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRulePullRequest_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDismissStaleReviewsOnPush gets the dismiss_stale_reviews_on_push property value. New, reviewable commits pushed will dismiss previous pull request review approvals. +// returns a *bool when successful +func (m *RepositoryRulePullRequest_parameters) GetDismissStaleReviewsOnPush()(*bool) { + return m.dismiss_stale_reviews_on_push +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRulePullRequest_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dismiss_stale_reviews_on_push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissStaleReviewsOnPush(val) + } + return nil + } + res["require_code_owner_review"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireCodeOwnerReview(val) + } + return nil + } + res["require_last_push_approval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireLastPushApproval(val) + } + return nil + } + res["required_approving_review_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequiredApprovingReviewCount(val) + } + return nil + } + res["required_review_thread_resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiredReviewThreadResolution(val) + } + return nil + } + return res +} +// GetRequireCodeOwnerReview gets the require_code_owner_review property value. Require an approving review in pull requests that modify files that have a designated code owner. +// returns a *bool when successful +func (m *RepositoryRulePullRequest_parameters) GetRequireCodeOwnerReview()(*bool) { + return m.require_code_owner_review +} +// GetRequiredApprovingReviewCount gets the required_approving_review_count property value. The number of approving reviews that are required before a pull request can be merged. +// returns a *int32 when successful +func (m *RepositoryRulePullRequest_parameters) GetRequiredApprovingReviewCount()(*int32) { + return m.required_approving_review_count +} +// GetRequiredReviewThreadResolution gets the required_review_thread_resolution property value. All conversations on code must be resolved before a pull request can be merged. +// returns a *bool when successful +func (m *RepositoryRulePullRequest_parameters) GetRequiredReviewThreadResolution()(*bool) { + return m.required_review_thread_resolution +} +// GetRequireLastPushApproval gets the require_last_push_approval property value. Whether the most recent reviewable push must be approved by someone other than the person who pushed it. +// returns a *bool when successful +func (m *RepositoryRulePullRequest_parameters) GetRequireLastPushApproval()(*bool) { + return m.require_last_push_approval +} +// Serialize serializes information the current object +func (m *RepositoryRulePullRequest_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("dismiss_stale_reviews_on_push", m.GetDismissStaleReviewsOnPush()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("required_approving_review_count", m.GetRequiredApprovingReviewCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required_review_thread_resolution", m.GetRequiredReviewThreadResolution()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_code_owner_review", m.GetRequireCodeOwnerReview()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_last_push_approval", m.GetRequireLastPushApproval()) + 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 *RepositoryRulePullRequest_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDismissStaleReviewsOnPush sets the dismiss_stale_reviews_on_push property value. New, reviewable commits pushed will dismiss previous pull request review approvals. +func (m *RepositoryRulePullRequest_parameters) SetDismissStaleReviewsOnPush(value *bool)() { + m.dismiss_stale_reviews_on_push = value +} +// SetRequireCodeOwnerReview sets the require_code_owner_review property value. Require an approving review in pull requests that modify files that have a designated code owner. +func (m *RepositoryRulePullRequest_parameters) SetRequireCodeOwnerReview(value *bool)() { + m.require_code_owner_review = value +} +// SetRequiredApprovingReviewCount sets the required_approving_review_count property value. The number of approving reviews that are required before a pull request can be merged. +func (m *RepositoryRulePullRequest_parameters) SetRequiredApprovingReviewCount(value *int32)() { + m.required_approving_review_count = value +} +// SetRequiredReviewThreadResolution sets the required_review_thread_resolution property value. All conversations on code must be resolved before a pull request can be merged. +func (m *RepositoryRulePullRequest_parameters) SetRequiredReviewThreadResolution(value *bool)() { + m.required_review_thread_resolution = value +} +// SetRequireLastPushApproval sets the require_last_push_approval property value. Whether the most recent reviewable push must be approved by someone other than the person who pushed it. +func (m *RepositoryRulePullRequest_parameters) SetRequireLastPushApproval(value *bool)() { + m.require_last_push_approval = value +} +type RepositoryRulePullRequest_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDismissStaleReviewsOnPush()(*bool) + GetRequireCodeOwnerReview()(*bool) + GetRequiredApprovingReviewCount()(*int32) + GetRequiredReviewThreadResolution()(*bool) + GetRequireLastPushApproval()(*bool) + SetDismissStaleReviewsOnPush(value *bool)() + SetRequireCodeOwnerReview(value *bool)() + SetRequiredApprovingReviewCount(value *int32)() + SetRequiredReviewThreadResolution(value *bool)() + SetRequireLastPushApproval(value *bool)() +} diff --git a/pkg/github/models/repository_rule_pull_request_type.go b/pkg/github/models/repository_rule_pull_request_type.go new file mode 100644 index 0000000..976be58 --- /dev/null +++ b/pkg/github/models/repository_rule_pull_request_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRulePullRequest_type int + +const ( + PULL_REQUEST_REPOSITORYRULEPULLREQUEST_TYPE RepositoryRulePullRequest_type = iota +) + +func (i RepositoryRulePullRequest_type) String() string { + return []string{"pull_request"}[i] +} +func ParseRepositoryRulePullRequest_type(v string) (any, error) { + result := PULL_REQUEST_REPOSITORYRULEPULLREQUEST_TYPE + switch v { + case "pull_request": + result = PULL_REQUEST_REPOSITORYRULEPULLREQUEST_TYPE + default: + return 0, errors.New("Unknown RepositoryRulePullRequest_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRulePullRequest_type(values []RepositoryRulePullRequest_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRulePullRequest_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_required_deployments.go b/pkg/github/models/repository_rule_required_deployments.go new file mode 100644 index 0000000..63d62d9 --- /dev/null +++ b/pkg/github/models/repository_rule_required_deployments.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleRequiredDeployments choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. +type RepositoryRuleRequiredDeployments struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleRequiredDeployments_parametersable + // The type property + typeEscaped *RepositoryRuleRequiredDeployments_type +} +// NewRepositoryRuleRequiredDeployments instantiates a new RepositoryRuleRequiredDeployments and sets the default values. +func NewRepositoryRuleRequiredDeployments()(*RepositoryRuleRequiredDeployments) { + m := &RepositoryRuleRequiredDeployments{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleRequiredDeploymentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleRequiredDeploymentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleRequiredDeployments(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleRequiredDeployments) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleRequiredDeployments) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleRequiredDeployments_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleRequiredDeployments_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleRequiredDeployments_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleRequiredDeployments_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleRequiredDeployments_parametersable when successful +func (m *RepositoryRuleRequiredDeployments) GetParameters()(RepositoryRuleRequiredDeployments_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleRequiredDeployments_type when successful +func (m *RepositoryRuleRequiredDeployments) GetTypeEscaped()(*RepositoryRuleRequiredDeployments_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleRequiredDeployments) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleRequiredDeployments) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleRequiredDeployments) SetParameters(value RepositoryRuleRequiredDeployments_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleRequiredDeployments) SetTypeEscaped(value *RepositoryRuleRequiredDeployments_type)() { + m.typeEscaped = value +} +type RepositoryRuleRequiredDeploymentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleRequiredDeployments_parametersable) + GetTypeEscaped()(*RepositoryRuleRequiredDeployments_type) + SetParameters(value RepositoryRuleRequiredDeployments_parametersable)() + SetTypeEscaped(value *RepositoryRuleRequiredDeployments_type)() +} diff --git a/pkg/github/models/repository_rule_required_deployments_parameters.go b/pkg/github/models/repository_rule_required_deployments_parameters.go new file mode 100644 index 0000000..956dd9a --- /dev/null +++ b/pkg/github/models/repository_rule_required_deployments_parameters.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleRequiredDeployments_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The environments that must be successfully deployed to before branches can be merged. + required_deployment_environments []string +} +// NewRepositoryRuleRequiredDeployments_parameters instantiates a new RepositoryRuleRequiredDeployments_parameters and sets the default values. +func NewRepositoryRuleRequiredDeployments_parameters()(*RepositoryRuleRequiredDeployments_parameters) { + m := &RepositoryRuleRequiredDeployments_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleRequiredDeployments_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleRequiredDeployments_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleRequiredDeployments_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleRequiredDeployments_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleRequiredDeployments_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["required_deployment_environments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRequiredDeploymentEnvironments(res) + } + return nil + } + return res +} +// GetRequiredDeploymentEnvironments gets the required_deployment_environments property value. The environments that must be successfully deployed to before branches can be merged. +// returns a []string when successful +func (m *RepositoryRuleRequiredDeployments_parameters) GetRequiredDeploymentEnvironments()([]string) { + return m.required_deployment_environments +} +// Serialize serializes information the current object +func (m *RepositoryRuleRequiredDeployments_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRequiredDeploymentEnvironments() != nil { + err := writer.WriteCollectionOfStringValues("required_deployment_environments", m.GetRequiredDeploymentEnvironments()) + 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 *RepositoryRuleRequiredDeployments_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRequiredDeploymentEnvironments sets the required_deployment_environments property value. The environments that must be successfully deployed to before branches can be merged. +func (m *RepositoryRuleRequiredDeployments_parameters) SetRequiredDeploymentEnvironments(value []string)() { + m.required_deployment_environments = value +} +type RepositoryRuleRequiredDeployments_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRequiredDeploymentEnvironments()([]string) + SetRequiredDeploymentEnvironments(value []string)() +} diff --git a/pkg/github/models/repository_rule_required_deployments_type.go b/pkg/github/models/repository_rule_required_deployments_type.go new file mode 100644 index 0000000..cafa5e9 --- /dev/null +++ b/pkg/github/models/repository_rule_required_deployments_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleRequiredDeployments_type int + +const ( + REQUIRED_DEPLOYMENTS_REPOSITORYRULEREQUIREDDEPLOYMENTS_TYPE RepositoryRuleRequiredDeployments_type = iota +) + +func (i RepositoryRuleRequiredDeployments_type) String() string { + return []string{"required_deployments"}[i] +} +func ParseRepositoryRuleRequiredDeployments_type(v string) (any, error) { + result := REQUIRED_DEPLOYMENTS_REPOSITORYRULEREQUIREDDEPLOYMENTS_TYPE + switch v { + case "required_deployments": + result = REQUIRED_DEPLOYMENTS_REPOSITORYRULEREQUIREDDEPLOYMENTS_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleRequiredDeployments_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleRequiredDeployments_type(values []RepositoryRuleRequiredDeployments_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleRequiredDeployments_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_required_linear_history.go b/pkg/github/models/repository_rule_required_linear_history.go new file mode 100644 index 0000000..1e6334a --- /dev/null +++ b/pkg/github/models/repository_rule_required_linear_history.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleRequiredLinearHistory prevent merge commits from being pushed to matching refs. +type RepositoryRuleRequiredLinearHistory struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type property + typeEscaped *RepositoryRuleRequiredLinearHistory_type +} +// NewRepositoryRuleRequiredLinearHistory instantiates a new RepositoryRuleRequiredLinearHistory and sets the default values. +func NewRepositoryRuleRequiredLinearHistory()(*RepositoryRuleRequiredLinearHistory) { + m := &RepositoryRuleRequiredLinearHistory{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleRequiredLinearHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleRequiredLinearHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleRequiredLinearHistory(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleRequiredLinearHistory) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleRequiredLinearHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleRequiredLinearHistory_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleRequiredLinearHistory_type)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleRequiredLinearHistory_type when successful +func (m *RepositoryRuleRequiredLinearHistory) GetTypeEscaped()(*RepositoryRuleRequiredLinearHistory_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleRequiredLinearHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleRequiredLinearHistory) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleRequiredLinearHistory) SetTypeEscaped(value *RepositoryRuleRequiredLinearHistory_type)() { + m.typeEscaped = value +} +type RepositoryRuleRequiredLinearHistoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*RepositoryRuleRequiredLinearHistory_type) + SetTypeEscaped(value *RepositoryRuleRequiredLinearHistory_type)() +} diff --git a/pkg/github/models/repository_rule_required_linear_history_type.go b/pkg/github/models/repository_rule_required_linear_history_type.go new file mode 100644 index 0000000..ad62a70 --- /dev/null +++ b/pkg/github/models/repository_rule_required_linear_history_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleRequiredLinearHistory_type int + +const ( + REQUIRED_LINEAR_HISTORY_REPOSITORYRULEREQUIREDLINEARHISTORY_TYPE RepositoryRuleRequiredLinearHistory_type = iota +) + +func (i RepositoryRuleRequiredLinearHistory_type) String() string { + return []string{"required_linear_history"}[i] +} +func ParseRepositoryRuleRequiredLinearHistory_type(v string) (any, error) { + result := REQUIRED_LINEAR_HISTORY_REPOSITORYRULEREQUIREDLINEARHISTORY_TYPE + switch v { + case "required_linear_history": + result = REQUIRED_LINEAR_HISTORY_REPOSITORYRULEREQUIREDLINEARHISTORY_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleRequiredLinearHistory_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleRequiredLinearHistory_type(values []RepositoryRuleRequiredLinearHistory_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleRequiredLinearHistory_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_required_signatures.go b/pkg/github/models/repository_rule_required_signatures.go new file mode 100644 index 0000000..3d05048 --- /dev/null +++ b/pkg/github/models/repository_rule_required_signatures.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleRequiredSignatures commits pushed to matching refs must have verified signatures. +type RepositoryRuleRequiredSignatures struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The type property + typeEscaped *RepositoryRuleRequiredSignatures_type +} +// NewRepositoryRuleRequiredSignatures instantiates a new RepositoryRuleRequiredSignatures and sets the default values. +func NewRepositoryRuleRequiredSignatures()(*RepositoryRuleRequiredSignatures) { + m := &RepositoryRuleRequiredSignatures{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleRequiredSignaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleRequiredSignaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleRequiredSignatures(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleRequiredSignatures) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleRequiredSignatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleRequiredSignatures_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleRequiredSignatures_type)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleRequiredSignatures_type when successful +func (m *RepositoryRuleRequiredSignatures) GetTypeEscaped()(*RepositoryRuleRequiredSignatures_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleRequiredSignatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleRequiredSignatures) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleRequiredSignatures) SetTypeEscaped(value *RepositoryRuleRequiredSignatures_type)() { + m.typeEscaped = value +} +type RepositoryRuleRequiredSignaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTypeEscaped()(*RepositoryRuleRequiredSignatures_type) + SetTypeEscaped(value *RepositoryRuleRequiredSignatures_type)() +} diff --git a/pkg/github/models/repository_rule_required_signatures_type.go b/pkg/github/models/repository_rule_required_signatures_type.go new file mode 100644 index 0000000..2064b67 --- /dev/null +++ b/pkg/github/models/repository_rule_required_signatures_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleRequiredSignatures_type int + +const ( + REQUIRED_SIGNATURES_REPOSITORYRULEREQUIREDSIGNATURES_TYPE RepositoryRuleRequiredSignatures_type = iota +) + +func (i RepositoryRuleRequiredSignatures_type) String() string { + return []string{"required_signatures"}[i] +} +func ParseRepositoryRuleRequiredSignatures_type(v string) (any, error) { + result := REQUIRED_SIGNATURES_REPOSITORYRULEREQUIREDSIGNATURES_TYPE + switch v { + case "required_signatures": + result = REQUIRED_SIGNATURES_REPOSITORYRULEREQUIREDSIGNATURES_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleRequiredSignatures_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleRequiredSignatures_type(values []RepositoryRuleRequiredSignatures_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleRequiredSignatures_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_required_status_checks.go b/pkg/github/models/repository_rule_required_status_checks.go new file mode 100644 index 0000000..ab4cfe7 --- /dev/null +++ b/pkg/github/models/repository_rule_required_status_checks.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleRequiredStatusChecks choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass. +type RepositoryRuleRequiredStatusChecks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleRequiredStatusChecks_parametersable + // The type property + typeEscaped *RepositoryRuleRequiredStatusChecks_type +} +// NewRepositoryRuleRequiredStatusChecks instantiates a new RepositoryRuleRequiredStatusChecks and sets the default values. +func NewRepositoryRuleRequiredStatusChecks()(*RepositoryRuleRequiredStatusChecks) { + m := &RepositoryRuleRequiredStatusChecks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleRequiredStatusChecksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleRequiredStatusChecksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleRequiredStatusChecks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleRequiredStatusChecks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleRequiredStatusChecks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleRequiredStatusChecks_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleRequiredStatusChecks_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleRequiredStatusChecks_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleRequiredStatusChecks_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleRequiredStatusChecks_parametersable when successful +func (m *RepositoryRuleRequiredStatusChecks) GetParameters()(RepositoryRuleRequiredStatusChecks_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleRequiredStatusChecks_type when successful +func (m *RepositoryRuleRequiredStatusChecks) GetTypeEscaped()(*RepositoryRuleRequiredStatusChecks_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleRequiredStatusChecks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleRequiredStatusChecks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleRequiredStatusChecks) SetParameters(value RepositoryRuleRequiredStatusChecks_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleRequiredStatusChecks) SetTypeEscaped(value *RepositoryRuleRequiredStatusChecks_type)() { + m.typeEscaped = value +} +type RepositoryRuleRequiredStatusChecksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleRequiredStatusChecks_parametersable) + GetTypeEscaped()(*RepositoryRuleRequiredStatusChecks_type) + SetParameters(value RepositoryRuleRequiredStatusChecks_parametersable)() + SetTypeEscaped(value *RepositoryRuleRequiredStatusChecks_type)() +} diff --git a/pkg/github/models/repository_rule_required_status_checks_parameters.go b/pkg/github/models/repository_rule_required_status_checks_parameters.go new file mode 100644 index 0000000..5187b3d --- /dev/null +++ b/pkg/github/models/repository_rule_required_status_checks_parameters.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleRequiredStatusChecks_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Status checks that are required. + required_status_checks []RepositoryRuleParamsStatusCheckConfigurationable + // Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. + strict_required_status_checks_policy *bool +} +// NewRepositoryRuleRequiredStatusChecks_parameters instantiates a new RepositoryRuleRequiredStatusChecks_parameters and sets the default values. +func NewRepositoryRuleRequiredStatusChecks_parameters()(*RepositoryRuleRequiredStatusChecks_parameters) { + m := &RepositoryRuleRequiredStatusChecks_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleRequiredStatusChecks_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleRequiredStatusChecks_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleRequiredStatusChecks_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleRequiredStatusChecks_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleRequiredStatusChecks_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["required_status_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryRuleParamsStatusCheckConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryRuleParamsStatusCheckConfigurationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryRuleParamsStatusCheckConfigurationable) + } + } + m.SetRequiredStatusChecks(res) + } + return nil + } + res["strict_required_status_checks_policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStrictRequiredStatusChecksPolicy(val) + } + return nil + } + return res +} +// GetRequiredStatusChecks gets the required_status_checks property value. Status checks that are required. +// returns a []RepositoryRuleParamsStatusCheckConfigurationable when successful +func (m *RepositoryRuleRequiredStatusChecks_parameters) GetRequiredStatusChecks()([]RepositoryRuleParamsStatusCheckConfigurationable) { + return m.required_status_checks +} +// GetStrictRequiredStatusChecksPolicy gets the strict_required_status_checks_policy property value. Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. +// returns a *bool when successful +func (m *RepositoryRuleRequiredStatusChecks_parameters) GetStrictRequiredStatusChecksPolicy()(*bool) { + return m.strict_required_status_checks_policy +} +// Serialize serializes information the current object +func (m *RepositoryRuleRequiredStatusChecks_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRequiredStatusChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequiredStatusChecks())) + for i, v := range m.GetRequiredStatusChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("required_status_checks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("strict_required_status_checks_policy", m.GetStrictRequiredStatusChecksPolicy()) + 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 *RepositoryRuleRequiredStatusChecks_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRequiredStatusChecks sets the required_status_checks property value. Status checks that are required. +func (m *RepositoryRuleRequiredStatusChecks_parameters) SetRequiredStatusChecks(value []RepositoryRuleParamsStatusCheckConfigurationable)() { + m.required_status_checks = value +} +// SetStrictRequiredStatusChecksPolicy sets the strict_required_status_checks_policy property value. Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. +func (m *RepositoryRuleRequiredStatusChecks_parameters) SetStrictRequiredStatusChecksPolicy(value *bool)() { + m.strict_required_status_checks_policy = value +} +type RepositoryRuleRequiredStatusChecks_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRequiredStatusChecks()([]RepositoryRuleParamsStatusCheckConfigurationable) + GetStrictRequiredStatusChecksPolicy()(*bool) + SetRequiredStatusChecks(value []RepositoryRuleParamsStatusCheckConfigurationable)() + SetStrictRequiredStatusChecksPolicy(value *bool)() +} diff --git a/pkg/github/models/repository_rule_required_status_checks_type.go b/pkg/github/models/repository_rule_required_status_checks_type.go new file mode 100644 index 0000000..001208f --- /dev/null +++ b/pkg/github/models/repository_rule_required_status_checks_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleRequiredStatusChecks_type int + +const ( + REQUIRED_STATUS_CHECKS_REPOSITORYRULEREQUIREDSTATUSCHECKS_TYPE RepositoryRuleRequiredStatusChecks_type = iota +) + +func (i RepositoryRuleRequiredStatusChecks_type) String() string { + return []string{"required_status_checks"}[i] +} +func ParseRepositoryRuleRequiredStatusChecks_type(v string) (any, error) { + result := REQUIRED_STATUS_CHECKS_REPOSITORYRULEREQUIREDSTATUSCHECKS_TYPE + switch v { + case "required_status_checks": + result = REQUIRED_STATUS_CHECKS_REPOSITORYRULEREQUIREDSTATUSCHECKS_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleRequiredStatusChecks_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleRequiredStatusChecks_type(values []RepositoryRuleRequiredStatusChecks_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleRequiredStatusChecks_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_tag_name_pattern.go b/pkg/github/models/repository_rule_tag_name_pattern.go new file mode 100644 index 0000000..da8d71e --- /dev/null +++ b/pkg/github/models/repository_rule_tag_name_pattern.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleTagNamePattern parameters to be used for the tag_name_pattern rule +type RepositoryRuleTagNamePattern struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleTagNamePattern_parametersable + // The type property + typeEscaped *RepositoryRuleTagNamePattern_type +} +// NewRepositoryRuleTagNamePattern instantiates a new RepositoryRuleTagNamePattern and sets the default values. +func NewRepositoryRuleTagNamePattern()(*RepositoryRuleTagNamePattern) { + m := &RepositoryRuleTagNamePattern{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleTagNamePatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleTagNamePatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleTagNamePattern(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleTagNamePattern) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleTagNamePattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleTagNamePattern_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleTagNamePattern_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleTagNamePattern_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleTagNamePattern_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleTagNamePattern_parametersable when successful +func (m *RepositoryRuleTagNamePattern) GetParameters()(RepositoryRuleTagNamePattern_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleTagNamePattern_type when successful +func (m *RepositoryRuleTagNamePattern) GetTypeEscaped()(*RepositoryRuleTagNamePattern_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleTagNamePattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleTagNamePattern) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleTagNamePattern) SetParameters(value RepositoryRuleTagNamePattern_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleTagNamePattern) SetTypeEscaped(value *RepositoryRuleTagNamePattern_type)() { + m.typeEscaped = value +} +type RepositoryRuleTagNamePatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleTagNamePattern_parametersable) + GetTypeEscaped()(*RepositoryRuleTagNamePattern_type) + SetParameters(value RepositoryRuleTagNamePattern_parametersable)() + SetTypeEscaped(value *RepositoryRuleTagNamePattern_type)() +} diff --git a/pkg/github/models/repository_rule_tag_name_pattern_parameters.go b/pkg/github/models/repository_rule_tag_name_pattern_parameters.go new file mode 100644 index 0000000..4420e9c --- /dev/null +++ b/pkg/github/models/repository_rule_tag_name_pattern_parameters.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleTagNamePattern_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How this rule will appear to users. + name *string + // If true, the rule will fail if the pattern matches. + negate *bool + // The operator to use for matching. + operator *RepositoryRuleTagNamePattern_parameters_operator + // The pattern to match with. + pattern *string +} +// NewRepositoryRuleTagNamePattern_parameters instantiates a new RepositoryRuleTagNamePattern_parameters and sets the default values. +func NewRepositoryRuleTagNamePattern_parameters()(*RepositoryRuleTagNamePattern_parameters) { + m := &RepositoryRuleTagNamePattern_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleTagNamePattern_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleTagNamePattern_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleTagNamePattern_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleTagNamePattern_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleTagNamePattern_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["negate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNegate(val) + } + return nil + } + res["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleTagNamePattern_parameters_operator) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*RepositoryRuleTagNamePattern_parameters_operator)) + } + return nil + } + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + return res +} +// GetName gets the name property value. How this rule will appear to users. +// returns a *string when successful +func (m *RepositoryRuleTagNamePattern_parameters) GetName()(*string) { + return m.name +} +// GetNegate gets the negate property value. If true, the rule will fail if the pattern matches. +// returns a *bool when successful +func (m *RepositoryRuleTagNamePattern_parameters) GetNegate()(*bool) { + return m.negate +} +// GetOperator gets the operator property value. The operator to use for matching. +// returns a *RepositoryRuleTagNamePattern_parameters_operator when successful +func (m *RepositoryRuleTagNamePattern_parameters) GetOperator()(*RepositoryRuleTagNamePattern_parameters_operator) { + return m.operator +} +// GetPattern gets the pattern property value. The pattern to match with. +// returns a *string when successful +func (m *RepositoryRuleTagNamePattern_parameters) GetPattern()(*string) { + return m.pattern +} +// Serialize serializes information the current object +func (m *RepositoryRuleTagNamePattern_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("negate", m.GetNegate()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + 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 *RepositoryRuleTagNamePattern_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. How this rule will appear to users. +func (m *RepositoryRuleTagNamePattern_parameters) SetName(value *string)() { + m.name = value +} +// SetNegate sets the negate property value. If true, the rule will fail if the pattern matches. +func (m *RepositoryRuleTagNamePattern_parameters) SetNegate(value *bool)() { + m.negate = value +} +// SetOperator sets the operator property value. The operator to use for matching. +func (m *RepositoryRuleTagNamePattern_parameters) SetOperator(value *RepositoryRuleTagNamePattern_parameters_operator)() { + m.operator = value +} +// SetPattern sets the pattern property value. The pattern to match with. +func (m *RepositoryRuleTagNamePattern_parameters) SetPattern(value *string)() { + m.pattern = value +} +type RepositoryRuleTagNamePattern_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNegate()(*bool) + GetOperator()(*RepositoryRuleTagNamePattern_parameters_operator) + GetPattern()(*string) + SetName(value *string)() + SetNegate(value *bool)() + SetOperator(value *RepositoryRuleTagNamePattern_parameters_operator)() + SetPattern(value *string)() +} diff --git a/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go b/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go new file mode 100644 index 0000000..f35fb51 --- /dev/null +++ b/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The operator to use for matching. +type RepositoryRuleTagNamePattern_parameters_operator int + +const ( + STARTS_WITH_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR RepositoryRuleTagNamePattern_parameters_operator = iota + ENDS_WITH_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + CONTAINS_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + REGEX_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR +) + +func (i RepositoryRuleTagNamePattern_parameters_operator) String() string { + return []string{"starts_with", "ends_with", "contains", "regex"}[i] +} +func ParseRepositoryRuleTagNamePattern_parameters_operator(v string) (any, error) { + result := STARTS_WITH_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + switch v { + case "starts_with": + result = STARTS_WITH_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + case "ends_with": + result = ENDS_WITH_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + case "contains": + result = CONTAINS_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + case "regex": + result = REGEX_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR + default: + return 0, errors.New("Unknown RepositoryRuleTagNamePattern_parameters_operator value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleTagNamePattern_parameters_operator(values []RepositoryRuleTagNamePattern_parameters_operator) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleTagNamePattern_parameters_operator) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_tag_name_pattern_type.go b/pkg/github/models/repository_rule_tag_name_pattern_type.go new file mode 100644 index 0000000..b435eb0 --- /dev/null +++ b/pkg/github/models/repository_rule_tag_name_pattern_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleTagNamePattern_type int + +const ( + TAG_NAME_PATTERN_REPOSITORYRULETAGNAMEPATTERN_TYPE RepositoryRuleTagNamePattern_type = iota +) + +func (i RepositoryRuleTagNamePattern_type) String() string { + return []string{"tag_name_pattern"}[i] +} +func ParseRepositoryRuleTagNamePattern_type(v string) (any, error) { + result := TAG_NAME_PATTERN_REPOSITORYRULETAGNAMEPATTERN_TYPE + switch v { + case "tag_name_pattern": + result = TAG_NAME_PATTERN_REPOSITORYRULETAGNAMEPATTERN_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleTagNamePattern_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleTagNamePattern_type(values []RepositoryRuleTagNamePattern_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleTagNamePattern_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_update.go b/pkg/github/models/repository_rule_update.go new file mode 100644 index 0000000..f23ced2 --- /dev/null +++ b/pkg/github/models/repository_rule_update.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleUpdate only allow users with bypass permission to update matching refs. +type RepositoryRuleUpdate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleUpdate_parametersable + // The type property + typeEscaped *RepositoryRuleUpdate_type +} +// NewRepositoryRuleUpdate instantiates a new RepositoryRuleUpdate and sets the default values. +func NewRepositoryRuleUpdate()(*RepositoryRuleUpdate) { + m := &RepositoryRuleUpdate{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleUpdateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleUpdateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleUpdate(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleUpdate) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleUpdate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleUpdate_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleUpdate_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleUpdate_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleUpdate_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleUpdate_parametersable when successful +func (m *RepositoryRuleUpdate) GetParameters()(RepositoryRuleUpdate_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleUpdate_type when successful +func (m *RepositoryRuleUpdate) GetTypeEscaped()(*RepositoryRuleUpdate_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleUpdate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleUpdate) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleUpdate) SetParameters(value RepositoryRuleUpdate_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleUpdate) SetTypeEscaped(value *RepositoryRuleUpdate_type)() { + m.typeEscaped = value +} +type RepositoryRuleUpdateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleUpdate_parametersable) + GetTypeEscaped()(*RepositoryRuleUpdate_type) + SetParameters(value RepositoryRuleUpdate_parametersable)() + SetTypeEscaped(value *RepositoryRuleUpdate_type)() +} diff --git a/pkg/github/models/repository_rule_update_parameters.go b/pkg/github/models/repository_rule_update_parameters.go new file mode 100644 index 0000000..b6ef2d1 --- /dev/null +++ b/pkg/github/models/repository_rule_update_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleUpdate_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Branch can pull changes from its upstream repository + update_allows_fetch_and_merge *bool +} +// NewRepositoryRuleUpdate_parameters instantiates a new RepositoryRuleUpdate_parameters and sets the default values. +func NewRepositoryRuleUpdate_parameters()(*RepositoryRuleUpdate_parameters) { + m := &RepositoryRuleUpdate_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleUpdate_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleUpdate_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleUpdate_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleUpdate_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleUpdate_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["update_allows_fetch_and_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdateAllowsFetchAndMerge(val) + } + return nil + } + return res +} +// GetUpdateAllowsFetchAndMerge gets the update_allows_fetch_and_merge property value. Branch can pull changes from its upstream repository +// returns a *bool when successful +func (m *RepositoryRuleUpdate_parameters) GetUpdateAllowsFetchAndMerge()(*bool) { + return m.update_allows_fetch_and_merge +} +// Serialize serializes information the current object +func (m *RepositoryRuleUpdate_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("update_allows_fetch_and_merge", m.GetUpdateAllowsFetchAndMerge()) + 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 *RepositoryRuleUpdate_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUpdateAllowsFetchAndMerge sets the update_allows_fetch_and_merge property value. Branch can pull changes from its upstream repository +func (m *RepositoryRuleUpdate_parameters) SetUpdateAllowsFetchAndMerge(value *bool)() { + m.update_allows_fetch_and_merge = value +} +type RepositoryRuleUpdate_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUpdateAllowsFetchAndMerge()(*bool) + SetUpdateAllowsFetchAndMerge(value *bool)() +} diff --git a/pkg/github/models/repository_rule_update_type.go b/pkg/github/models/repository_rule_update_type.go new file mode 100644 index 0000000..0867f52 --- /dev/null +++ b/pkg/github/models/repository_rule_update_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleUpdate_type int + +const ( + UPDATE_REPOSITORYRULEUPDATE_TYPE RepositoryRuleUpdate_type = iota +) + +func (i RepositoryRuleUpdate_type) String() string { + return []string{"update"}[i] +} +func ParseRepositoryRuleUpdate_type(v string) (any, error) { + result := UPDATE_REPOSITORYRULEUPDATE_TYPE + switch v { + case "update": + result = UPDATE_REPOSITORYRULEUPDATE_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleUpdate_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleUpdate_type(values []RepositoryRuleUpdate_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleUpdate_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_workflows.go b/pkg/github/models/repository_rule_workflows.go new file mode 100644 index 0000000..eee7ba6 --- /dev/null +++ b/pkg/github/models/repository_rule_workflows.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleWorkflows require all changes made to a targeted branch to pass the specified workflows before they can be merged. +type RepositoryRuleWorkflows struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The parameters property + parameters RepositoryRuleWorkflows_parametersable + // The type property + typeEscaped *RepositoryRuleWorkflows_type +} +// NewRepositoryRuleWorkflows instantiates a new RepositoryRuleWorkflows and sets the default values. +func NewRepositoryRuleWorkflows()(*RepositoryRuleWorkflows) { + m := &RepositoryRuleWorkflows{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleWorkflowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleWorkflowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleWorkflows(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleWorkflows) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleWorkflows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleWorkflows_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleWorkflows_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleWorkflows_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleWorkflows_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleWorkflows_parametersable when successful +func (m *RepositoryRuleWorkflows) GetParameters()(RepositoryRuleWorkflows_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleWorkflows_type when successful +func (m *RepositoryRuleWorkflows) GetTypeEscaped()(*RepositoryRuleWorkflows_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleWorkflows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleWorkflows) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleWorkflows) SetParameters(value RepositoryRuleWorkflows_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleWorkflows) SetTypeEscaped(value *RepositoryRuleWorkflows_type)() { + m.typeEscaped = value +} +type RepositoryRuleWorkflowsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleWorkflows_parametersable) + GetTypeEscaped()(*RepositoryRuleWorkflows_type) + SetParameters(value RepositoryRuleWorkflows_parametersable)() + SetTypeEscaped(value *RepositoryRuleWorkflows_type)() +} diff --git a/pkg/github/models/repository_rule_workflows_parameters.go b/pkg/github/models/repository_rule_workflows_parameters.go new file mode 100644 index 0000000..0bbd8f8 --- /dev/null +++ b/pkg/github/models/repository_rule_workflows_parameters.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleWorkflows_parameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Workflows that must pass for this rule to pass. + workflows []RepositoryRuleParamsWorkflowFileReferenceable +} +// NewRepositoryRuleWorkflows_parameters instantiates a new RepositoryRuleWorkflows_parameters and sets the default values. +func NewRepositoryRuleWorkflows_parameters()(*RepositoryRuleWorkflows_parameters) { + m := &RepositoryRuleWorkflows_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleWorkflows_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleWorkflows_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleWorkflows_parameters(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleWorkflows_parameters) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleWorkflows_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryRuleParamsWorkflowFileReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryRuleParamsWorkflowFileReferenceable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryRuleParamsWorkflowFileReferenceable) + } + } + m.SetWorkflows(res) + } + return nil + } + return res +} +// GetWorkflows gets the workflows property value. Workflows that must pass for this rule to pass. +// returns a []RepositoryRuleParamsWorkflowFileReferenceable when successful +func (m *RepositoryRuleWorkflows_parameters) GetWorkflows()([]RepositoryRuleParamsWorkflowFileReferenceable) { + return m.workflows +} +// Serialize serializes information the current object +func (m *RepositoryRuleWorkflows_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetWorkflows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkflows())) + for i, v := range m.GetWorkflows() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("workflows", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRuleWorkflows_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetWorkflows sets the workflows property value. Workflows that must pass for this rule to pass. +func (m *RepositoryRuleWorkflows_parameters) SetWorkflows(value []RepositoryRuleParamsWorkflowFileReferenceable)() { + m.workflows = value +} +type RepositoryRuleWorkflows_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWorkflows()([]RepositoryRuleParamsWorkflowFileReferenceable) + SetWorkflows(value []RepositoryRuleParamsWorkflowFileReferenceable)() +} diff --git a/pkg/github/models/repository_rule_workflows_type.go b/pkg/github/models/repository_rule_workflows_type.go new file mode 100644 index 0000000..776cb3e --- /dev/null +++ b/pkg/github/models/repository_rule_workflows_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type RepositoryRuleWorkflows_type int + +const ( + WORKFLOWS_REPOSITORYRULEWORKFLOWS_TYPE RepositoryRuleWorkflows_type = iota +) + +func (i RepositoryRuleWorkflows_type) String() string { + return []string{"workflows"}[i] +} +func ParseRepositoryRuleWorkflows_type(v string) (any, error) { + result := WORKFLOWS_REPOSITORYRULEWORKFLOWS_TYPE + switch v { + case "workflows": + result = WORKFLOWS_REPOSITORYRULEWORKFLOWS_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleWorkflows_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleWorkflows_type(values []RepositoryRuleWorkflows_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleWorkflows_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_ruleset.go b/pkg/github/models/repository_ruleset.go new file mode 100644 index 0000000..ac1576a --- /dev/null +++ b/pkg/github/models/repository_ruleset.go @@ -0,0 +1,573 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleset a set of rules to apply when specified conditions are met. +type RepositoryRuleset struct { + // The _links property + _links RepositoryRuleset__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The actors that can bypass the rules in this ruleset + bypass_actors []RepositoryRulesetBypassActorable + // The conditions property + conditions RepositoryRuleset_RepositoryRuleset_conditionsable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. + current_user_can_bypass *RepositoryRuleset_current_user_can_bypass + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + enforcement *RepositoryRuleEnforcement + // The ID of the ruleset + id *int32 + // The name of the ruleset + name *string + // The node_id property + node_id *string + // The rules property + rules []RepositoryRuleable + // The name of the source + source *string + // The type of the source of the ruleset + source_type *RepositoryRuleset_source_type + // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. + target *RepositoryRuleset_target + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// RepositoryRuleset_RepositoryRuleset_conditions composed type wrapper for classes OrgRulesetConditionsable, RepositoryRulesetConditionsable +type RepositoryRuleset_RepositoryRuleset_conditions struct { + // Composed type representation for type OrgRulesetConditionsable + orgRulesetConditions OrgRulesetConditionsable + // Composed type representation for type RepositoryRulesetConditionsable + repositoryRulesetConditions RepositoryRulesetConditionsable +} +// NewRepositoryRuleset_RepositoryRuleset_conditions instantiates a new RepositoryRuleset_RepositoryRuleset_conditions and sets the default values. +func NewRepositoryRuleset_RepositoryRuleset_conditions()(*RepositoryRuleset_RepositoryRuleset_conditions) { + m := &RepositoryRuleset_RepositoryRuleset_conditions{ + } + return m +} +// CreateRepositoryRuleset_RepositoryRuleset_conditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleset_RepositoryRuleset_conditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewRepositoryRuleset_RepositoryRuleset_conditions() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateOrgRulesetConditionsFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(OrgRulesetConditionsable); ok { + result.SetOrgRulesetConditions(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateRepositoryRulesetConditionsFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(RepositoryRulesetConditionsable); ok { + result.SetRepositoryRulesetConditions(cast) + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleset_RepositoryRuleset_conditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *RepositoryRuleset_RepositoryRuleset_conditions) GetIsComposedType()(bool) { + return true +} +// GetOrgRulesetConditions gets the orgRulesetConditions property value. Composed type representation for type OrgRulesetConditionsable +// returns a OrgRulesetConditionsable when successful +func (m *RepositoryRuleset_RepositoryRuleset_conditions) GetOrgRulesetConditions()(OrgRulesetConditionsable) { + return m.orgRulesetConditions +} +// GetRepositoryRulesetConditions gets the repositoryRulesetConditions property value. Composed type representation for type RepositoryRulesetConditionsable +// returns a RepositoryRulesetConditionsable when successful +func (m *RepositoryRuleset_RepositoryRuleset_conditions) GetRepositoryRulesetConditions()(RepositoryRulesetConditionsable) { + return m.repositoryRulesetConditions +} +// Serialize serializes information the current object +func (m *RepositoryRuleset_RepositoryRuleset_conditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOrgRulesetConditions() != nil { + err := writer.WriteObjectValue("", m.GetOrgRulesetConditions()) + if err != nil { + return err + } + } else if m.GetRepositoryRulesetConditions() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRulesetConditions()) + if err != nil { + return err + } + } + return nil +} +// SetOrgRulesetConditions sets the orgRulesetConditions property value. Composed type representation for type OrgRulesetConditionsable +func (m *RepositoryRuleset_RepositoryRuleset_conditions) SetOrgRulesetConditions(value OrgRulesetConditionsable)() { + m.orgRulesetConditions = value +} +// SetRepositoryRulesetConditions sets the repositoryRulesetConditions property value. Composed type representation for type RepositoryRulesetConditionsable +func (m *RepositoryRuleset_RepositoryRuleset_conditions) SetRepositoryRulesetConditions(value RepositoryRulesetConditionsable)() { + m.repositoryRulesetConditions = value +} +type RepositoryRuleset_RepositoryRuleset_conditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrgRulesetConditions()(OrgRulesetConditionsable) + GetRepositoryRulesetConditions()(RepositoryRulesetConditionsable) + SetOrgRulesetConditions(value OrgRulesetConditionsable)() + SetRepositoryRulesetConditions(value RepositoryRulesetConditionsable)() +} +// NewRepositoryRuleset instantiates a new RepositoryRuleset and sets the default values. +func NewRepositoryRuleset()(*RepositoryRuleset) { + m := &RepositoryRuleset{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRulesetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRulesetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleset(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleset) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassActors gets the bypass_actors property value. The actors that can bypass the rules in this ruleset +// returns a []RepositoryRulesetBypassActorable when successful +func (m *RepositoryRuleset) GetBypassActors()([]RepositoryRulesetBypassActorable) { + return m.bypass_actors +} +// GetConditions gets the conditions property value. The conditions property +// returns a RepositoryRuleset_RepositoryRuleset_conditionsable when successful +func (m *RepositoryRuleset) GetConditions()(RepositoryRuleset_RepositoryRuleset_conditionsable) { + return m.conditions +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *RepositoryRuleset) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCurrentUserCanBypass gets the current_user_can_bypass property value. The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. +// returns a *RepositoryRuleset_current_user_can_bypass when successful +func (m *RepositoryRuleset) GetCurrentUserCanBypass()(*RepositoryRuleset_current_user_can_bypass) { + return m.current_user_can_bypass +} +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// returns a *RepositoryRuleEnforcement when successful +func (m *RepositoryRuleset) GetEnforcement()(*RepositoryRuleEnforcement) { + return m.enforcement +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleset__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(RepositoryRuleset__linksable)) + } + return nil + } + res["bypass_actors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryRulesetBypassActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryRulesetBypassActorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryRulesetBypassActorable) + } + } + m.SetBypassActors(res) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleset_RepositoryRuleset_conditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(RepositoryRuleset_RepositoryRuleset_conditionsable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["current_user_can_bypass"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleset_current_user_can_bypass) + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserCanBypass(val.(*RepositoryRuleset_current_user_can_bypass)) + } + return nil + } + res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleEnforcement) + if err != nil { + return err + } + if val != nil { + m.SetEnforcement(val.(*RepositoryRuleEnforcement)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRepositoryRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RepositoryRuleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RepositoryRuleable) + } + } + m.SetRules(res) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["source_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleset_source_type) + if err != nil { + return err + } + if val != nil { + m.SetSourceType(val.(*RepositoryRuleset_source_type)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleset_target) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(*RepositoryRuleset_target)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the ruleset +// returns a *int32 when successful +func (m *RepositoryRuleset) GetId()(*int32) { + return m.id +} +// GetLinks gets the _links property value. The _links property +// returns a RepositoryRuleset__linksable when successful +func (m *RepositoryRuleset) GetLinks()(RepositoryRuleset__linksable) { + return m._links +} +// GetName gets the name property value. The name of the ruleset +// returns a *string when successful +func (m *RepositoryRuleset) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *RepositoryRuleset) GetNodeId()(*string) { + return m.node_id +} +// GetRules gets the rules property value. The rules property +// returns a []RepositoryRuleable when successful +func (m *RepositoryRuleset) GetRules()([]RepositoryRuleable) { + return m.rules +} +// GetSource gets the source property value. The name of the source +// returns a *string when successful +func (m *RepositoryRuleset) GetSource()(*string) { + return m.source +} +// GetSourceType gets the source_type property value. The type of the source of the ruleset +// returns a *RepositoryRuleset_source_type when successful +func (m *RepositoryRuleset) GetSourceType()(*RepositoryRuleset_source_type) { + return m.source_type +} +// GetTarget gets the target property value. The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +// returns a *RepositoryRuleset_target when successful +func (m *RepositoryRuleset) GetTarget()(*RepositoryRuleset_target) { + return m.target +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *RepositoryRuleset) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *RepositoryRuleset) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBypassActors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBypassActors())) + for i, v := range m.GetBypassActors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bypass_actors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetCurrentUserCanBypass() != nil { + cast := (*m.GetCurrentUserCanBypass()).String() + err := writer.WriteStringValue("current_user_can_bypass", &cast) + if err != nil { + return err + } + } + if m.GetEnforcement() != nil { + cast := (*m.GetEnforcement()).String() + err := writer.WriteStringValue("enforcement", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetSourceType() != nil { + cast := (*m.GetSourceType()).String() + err := writer.WriteStringValue("source_type", &cast) + if err != nil { + return err + } + } + if m.GetTarget() != nil { + cast := (*m.GetTarget()).String() + err := writer.WriteStringValue("target", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *RepositoryRuleset) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassActors sets the bypass_actors property value. The actors that can bypass the rules in this ruleset +func (m *RepositoryRuleset) SetBypassActors(value []RepositoryRulesetBypassActorable)() { + m.bypass_actors = value +} +// SetConditions sets the conditions property value. The conditions property +func (m *RepositoryRuleset) SetConditions(value RepositoryRuleset_RepositoryRuleset_conditionsable)() { + m.conditions = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RepositoryRuleset) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCurrentUserCanBypass sets the current_user_can_bypass property value. The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. +func (m *RepositoryRuleset) SetCurrentUserCanBypass(value *RepositoryRuleset_current_user_can_bypass)() { + m.current_user_can_bypass = value +} +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +func (m *RepositoryRuleset) SetEnforcement(value *RepositoryRuleEnforcement)() { + m.enforcement = value +} +// SetId sets the id property value. The ID of the ruleset +func (m *RepositoryRuleset) SetId(value *int32)() { + m.id = value +} +// SetLinks sets the _links property value. The _links property +func (m *RepositoryRuleset) SetLinks(value RepositoryRuleset__linksable)() { + m._links = value +} +// SetName sets the name property value. The name of the ruleset +func (m *RepositoryRuleset) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *RepositoryRuleset) SetNodeId(value *string)() { + m.node_id = value +} +// SetRules sets the rules property value. The rules property +func (m *RepositoryRuleset) SetRules(value []RepositoryRuleable)() { + m.rules = value +} +// SetSource sets the source property value. The name of the source +func (m *RepositoryRuleset) SetSource(value *string)() { + m.source = value +} +// SetSourceType sets the source_type property value. The type of the source of the ruleset +func (m *RepositoryRuleset) SetSourceType(value *RepositoryRuleset_source_type)() { + m.source_type = value +} +// SetTarget sets the target property value. The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +func (m *RepositoryRuleset) SetTarget(value *RepositoryRuleset_target)() { + m.target = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *RepositoryRuleset) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type RepositoryRulesetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassActors()([]RepositoryRulesetBypassActorable) + GetConditions()(RepositoryRuleset_RepositoryRuleset_conditionsable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCurrentUserCanBypass()(*RepositoryRuleset_current_user_can_bypass) + GetEnforcement()(*RepositoryRuleEnforcement) + GetId()(*int32) + GetLinks()(RepositoryRuleset__linksable) + GetName()(*string) + GetNodeId()(*string) + GetRules()([]RepositoryRuleable) + GetSource()(*string) + GetSourceType()(*RepositoryRuleset_source_type) + GetTarget()(*RepositoryRuleset_target) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetBypassActors(value []RepositoryRulesetBypassActorable)() + SetConditions(value RepositoryRuleset_RepositoryRuleset_conditionsable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCurrentUserCanBypass(value *RepositoryRuleset_current_user_can_bypass)() + SetEnforcement(value *RepositoryRuleEnforcement)() + SetId(value *int32)() + SetLinks(value RepositoryRuleset__linksable)() + SetName(value *string)() + SetNodeId(value *string)() + SetRules(value []RepositoryRuleable)() + SetSource(value *string)() + SetSourceType(value *RepositoryRuleset_source_type)() + SetTarget(value *RepositoryRuleset_target)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/repository_ruleset__links.go b/pkg/github/models/repository_ruleset__links.go new file mode 100644 index 0000000..aa5b4ce --- /dev/null +++ b/pkg/github/models/repository_ruleset__links.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleset__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html property + html RepositoryRuleset__links_htmlable + // The self property + self RepositoryRuleset__links_selfable +} +// NewRepositoryRuleset__links instantiates a new RepositoryRuleset__links and sets the default values. +func NewRepositoryRuleset__links()(*RepositoryRuleset__links) { + m := &RepositoryRuleset__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleset__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleset__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleset__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleset__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleset__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleset__links_htmlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(RepositoryRuleset__links_htmlable)) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleset__links_selfFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelf(val.(RepositoryRuleset__links_selfable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. The html property +// returns a RepositoryRuleset__links_htmlable when successful +func (m *RepositoryRuleset__links) GetHtml()(RepositoryRuleset__links_htmlable) { + return m.html +} +// GetSelf gets the self property value. The self property +// returns a RepositoryRuleset__links_selfable when successful +func (m *RepositoryRuleset__links) GetSelf()(RepositoryRuleset__links_selfable) { + return m.self +} +// Serialize serializes information the current object +func (m *RepositoryRuleset__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("self", m.GetSelf()) + 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 *RepositoryRuleset__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtml sets the html property value. The html property +func (m *RepositoryRuleset__links) SetHtml(value RepositoryRuleset__links_htmlable)() { + m.html = value +} +// SetSelf sets the self property value. The self property +func (m *RepositoryRuleset__links) SetSelf(value RepositoryRuleset__links_selfable)() { + m.self = value +} +type RepositoryRuleset__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtml()(RepositoryRuleset__links_htmlable) + GetSelf()(RepositoryRuleset__links_selfable) + SetHtml(value RepositoryRuleset__links_htmlable)() + SetSelf(value RepositoryRuleset__links_selfable)() +} diff --git a/pkg/github/models/repository_ruleset__links_html.go b/pkg/github/models/repository_ruleset__links_html.go new file mode 100644 index 0000000..478469f --- /dev/null +++ b/pkg/github/models/repository_ruleset__links_html.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleset__links_html struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html URL of the ruleset + href *string +} +// NewRepositoryRuleset__links_html instantiates a new RepositoryRuleset__links_html and sets the default values. +func NewRepositoryRuleset__links_html()(*RepositoryRuleset__links_html) { + m := &RepositoryRuleset__links_html{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleset__links_htmlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleset__links_htmlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleset__links_html(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleset__links_html) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleset__links_html) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The html URL of the ruleset +// returns a *string when successful +func (m *RepositoryRuleset__links_html) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *RepositoryRuleset__links_html) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *RepositoryRuleset__links_html) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The html URL of the ruleset +func (m *RepositoryRuleset__links_html) SetHref(value *string)() { + m.href = value +} +type RepositoryRuleset__links_htmlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/repository_ruleset__links_self.go b/pkg/github/models/repository_ruleset__links_self.go new file mode 100644 index 0000000..692b860 --- /dev/null +++ b/pkg/github/models/repository_ruleset__links_self.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleset__links_self struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The URL of the ruleset + href *string +} +// NewRepositoryRuleset__links_self instantiates a new RepositoryRuleset__links_self and sets the default values. +func NewRepositoryRuleset__links_self()(*RepositoryRuleset__links_self) { + m := &RepositoryRuleset__links_self{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleset__links_selfFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleset__links_selfFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleset__links_self(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRuleset__links_self) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRuleset__links_self) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The URL of the ruleset +// returns a *string when successful +func (m *RepositoryRuleset__links_self) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *RepositoryRuleset__links_self) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *RepositoryRuleset__links_self) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The URL of the ruleset +func (m *RepositoryRuleset__links_self) SetHref(value *string)() { + m.href = value +} +type RepositoryRuleset__links_selfable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/repository_ruleset_bypass_actor.go b/pkg/github/models/repository_ruleset_bypass_actor.go new file mode 100644 index 0000000..9f383c4 --- /dev/null +++ b/pkg/github/models/repository_ruleset_bypass_actor.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRulesetBypassActor an actor that can bypass rules in a ruleset +type RepositoryRulesetBypassActor struct { + // The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. + actor_id *int32 + // The type of actor that can bypass a ruleset. + actor_type *RepositoryRulesetBypassActor_actor_type + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. + bypass_mode *RepositoryRulesetBypassActor_bypass_mode +} +// NewRepositoryRulesetBypassActor instantiates a new RepositoryRulesetBypassActor and sets the default values. +func NewRepositoryRulesetBypassActor()(*RepositoryRulesetBypassActor) { + m := &RepositoryRulesetBypassActor{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRulesetBypassActorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRulesetBypassActorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRulesetBypassActor(), nil +} +// GetActorId gets the actor_id property value. The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. +// returns a *int32 when successful +func (m *RepositoryRulesetBypassActor) GetActorId()(*int32) { + return m.actor_id +} +// GetActorType gets the actor_type property value. The type of actor that can bypass a ruleset. +// returns a *RepositoryRulesetBypassActor_actor_type when successful +func (m *RepositoryRulesetBypassActor) GetActorType()(*RepositoryRulesetBypassActor_actor_type) { + return m.actor_type +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRulesetBypassActor) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassMode gets the bypass_mode property value. When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. +// returns a *RepositoryRulesetBypassActor_bypass_mode when successful +func (m *RepositoryRulesetBypassActor) GetBypassMode()(*RepositoryRulesetBypassActor_bypass_mode) { + return m.bypass_mode +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRulesetBypassActor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActorId(val) + } + return nil + } + res["actor_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRulesetBypassActor_actor_type) + if err != nil { + return err + } + if val != nil { + m.SetActorType(val.(*RepositoryRulesetBypassActor_actor_type)) + } + return nil + } + res["bypass_mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRulesetBypassActor_bypass_mode) + if err != nil { + return err + } + if val != nil { + m.SetBypassMode(val.(*RepositoryRulesetBypassActor_bypass_mode)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *RepositoryRulesetBypassActor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("actor_id", m.GetActorId()) + if err != nil { + return err + } + } + if m.GetActorType() != nil { + cast := (*m.GetActorType()).String() + err := writer.WriteStringValue("actor_type", &cast) + if err != nil { + return err + } + } + if m.GetBypassMode() != nil { + cast := (*m.GetBypassMode()).String() + err := writer.WriteStringValue("bypass_mode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActorId sets the actor_id property value. The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. +func (m *RepositoryRulesetBypassActor) SetActorId(value *int32)() { + m.actor_id = value +} +// SetActorType sets the actor_type property value. The type of actor that can bypass a ruleset. +func (m *RepositoryRulesetBypassActor) SetActorType(value *RepositoryRulesetBypassActor_actor_type)() { + m.actor_type = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositoryRulesetBypassActor) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassMode sets the bypass_mode property value. When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. +func (m *RepositoryRulesetBypassActor) SetBypassMode(value *RepositoryRulesetBypassActor_bypass_mode)() { + m.bypass_mode = value +} +type RepositoryRulesetBypassActorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActorId()(*int32) + GetActorType()(*RepositoryRulesetBypassActor_actor_type) + GetBypassMode()(*RepositoryRulesetBypassActor_bypass_mode) + SetActorId(value *int32)() + SetActorType(value *RepositoryRulesetBypassActor_actor_type)() + SetBypassMode(value *RepositoryRulesetBypassActor_bypass_mode)() +} diff --git a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go new file mode 100644 index 0000000..e6b3f60 --- /dev/null +++ b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// The type of actor that can bypass a ruleset. +type RepositoryRulesetBypassActor_actor_type int + +const ( + INTEGRATION_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE RepositoryRulesetBypassActor_actor_type = iota + ORGANIZATIONADMIN_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + REPOSITORYROLE_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + TEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE +) + +func (i RepositoryRulesetBypassActor_actor_type) String() string { + return []string{"Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"}[i] +} +func ParseRepositoryRulesetBypassActor_actor_type(v string) (any, error) { + result := INTEGRATION_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + switch v { + case "Integration": + result = INTEGRATION_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + case "OrganizationAdmin": + result = ORGANIZATIONADMIN_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + case "RepositoryRole": + result = REPOSITORYROLE_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + case "Team": + result = TEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + case "DeployKey": + result = DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + default: + return 0, errors.New("Unknown RepositoryRulesetBypassActor_actor_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRulesetBypassActor_actor_type(values []RepositoryRulesetBypassActor_actor_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRulesetBypassActor_actor_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go b/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go new file mode 100644 index 0000000..93484ad --- /dev/null +++ b/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. +type RepositoryRulesetBypassActor_bypass_mode int + +const ( + ALWAYS_REPOSITORYRULESETBYPASSACTOR_BYPASS_MODE RepositoryRulesetBypassActor_bypass_mode = iota + PULL_REQUEST_REPOSITORYRULESETBYPASSACTOR_BYPASS_MODE +) + +func (i RepositoryRulesetBypassActor_bypass_mode) String() string { + return []string{"always", "pull_request"}[i] +} +func ParseRepositoryRulesetBypassActor_bypass_mode(v string) (any, error) { + result := ALWAYS_REPOSITORYRULESETBYPASSACTOR_BYPASS_MODE + switch v { + case "always": + result = ALWAYS_REPOSITORYRULESETBYPASSACTOR_BYPASS_MODE + case "pull_request": + result = PULL_REQUEST_REPOSITORYRULESETBYPASSACTOR_BYPASS_MODE + default: + return 0, errors.New("Unknown RepositoryRulesetBypassActor_bypass_mode value: " + v) + } + return &result, nil +} +func SerializeRepositoryRulesetBypassActor_bypass_mode(values []RepositoryRulesetBypassActor_bypass_mode) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRulesetBypassActor_bypass_mode) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_ruleset_conditions.go b/pkg/github/models/repository_ruleset_conditions.go new file mode 100644 index 0000000..1b42242 --- /dev/null +++ b/pkg/github/models/repository_ruleset_conditions.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRulesetConditions parameters for a repository ruleset ref name condition +type RepositoryRulesetConditions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ref_name property + ref_name RepositoryRulesetConditions_ref_nameable +} +// NewRepositoryRulesetConditions instantiates a new RepositoryRulesetConditions and sets the default values. +func NewRepositoryRulesetConditions()(*RepositoryRulesetConditions) { + m := &RepositoryRulesetConditions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRulesetConditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRulesetConditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRulesetConditions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRulesetConditions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRulesetConditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ref_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRulesetConditions_ref_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRefName(val.(RepositoryRulesetConditions_ref_nameable)) + } + return nil + } + return res +} +// GetRefName gets the ref_name property value. The ref_name property +// returns a RepositoryRulesetConditions_ref_nameable when successful +func (m *RepositoryRulesetConditions) GetRefName()(RepositoryRulesetConditions_ref_nameable) { + return m.ref_name +} +// Serialize serializes information the current object +func (m *RepositoryRulesetConditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("ref_name", m.GetRefName()) + 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 *RepositoryRulesetConditions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRefName sets the ref_name property value. The ref_name property +func (m *RepositoryRulesetConditions) SetRefName(value RepositoryRulesetConditions_ref_nameable)() { + m.ref_name = value +} +type RepositoryRulesetConditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRefName()(RepositoryRulesetConditions_ref_nameable) + SetRefName(value RepositoryRulesetConditions_ref_nameable)() +} diff --git a/pkg/github/models/repository_ruleset_conditions_ref_name.go b/pkg/github/models/repository_ruleset_conditions_ref_name.go new file mode 100644 index 0000000..93efdde --- /dev/null +++ b/pkg/github/models/repository_ruleset_conditions_ref_name.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRulesetConditions_ref_name struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + exclude []string + // Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + include []string +} +// NewRepositoryRulesetConditions_ref_name instantiates a new RepositoryRulesetConditions_ref_name and sets the default values. +func NewRepositoryRulesetConditions_ref_name()(*RepositoryRulesetConditions_ref_name) { + m := &RepositoryRulesetConditions_ref_name{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRulesetConditions_ref_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRulesetConditions_ref_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRulesetConditions_ref_name(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoryRulesetConditions_ref_name) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExclude gets the exclude property value. Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +// returns a []string when successful +func (m *RepositoryRulesetConditions_ref_name) GetExclude()([]string) { + return m.exclude +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoryRulesetConditions_ref_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["exclude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetExclude(res) + } + return nil + } + res["include"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetInclude(res) + } + return nil + } + return res +} +// GetInclude gets the include property value. Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. +// returns a []string when successful +func (m *RepositoryRulesetConditions_ref_name) GetInclude()([]string) { + return m.include +} +// Serialize serializes information the current object +func (m *RepositoryRulesetConditions_ref_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExclude() != nil { + err := writer.WriteCollectionOfStringValues("exclude", m.GetExclude()) + if err != nil { + return err + } + } + if m.GetInclude() != nil { + err := writer.WriteCollectionOfStringValues("include", m.GetInclude()) + 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 *RepositoryRulesetConditions_ref_name) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExclude sets the exclude property value. Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (m *RepositoryRulesetConditions_ref_name) SetExclude(value []string)() { + m.exclude = value +} +// SetInclude sets the include property value. Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. +func (m *RepositoryRulesetConditions_ref_name) SetInclude(value []string)() { + m.include = value +} +type RepositoryRulesetConditions_ref_nameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExclude()([]string) + GetInclude()([]string) + SetExclude(value []string)() + SetInclude(value []string)() +} diff --git a/pkg/github/models/repository_ruleset_current_user_can_bypass.go b/pkg/github/models/repository_ruleset_current_user_can_bypass.go new file mode 100644 index 0000000..e3ed3cc --- /dev/null +++ b/pkg/github/models/repository_ruleset_current_user_can_bypass.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. +type RepositoryRuleset_current_user_can_bypass int + +const ( + ALWAYS_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS RepositoryRuleset_current_user_can_bypass = iota + PULL_REQUESTS_ONLY_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS + NEVER_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS +) + +func (i RepositoryRuleset_current_user_can_bypass) String() string { + return []string{"always", "pull_requests_only", "never"}[i] +} +func ParseRepositoryRuleset_current_user_can_bypass(v string) (any, error) { + result := ALWAYS_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS + switch v { + case "always": + result = ALWAYS_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS + case "pull_requests_only": + result = PULL_REQUESTS_ONLY_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS + case "never": + result = NEVER_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS + default: + return 0, errors.New("Unknown RepositoryRuleset_current_user_can_bypass value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleset_current_user_can_bypass(values []RepositoryRuleset_current_user_can_bypass) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleset_current_user_can_bypass) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_ruleset_source_type.go b/pkg/github/models/repository_ruleset_source_type.go new file mode 100644 index 0000000..2334e3a --- /dev/null +++ b/pkg/github/models/repository_ruleset_source_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of the source of the ruleset +type RepositoryRuleset_source_type int + +const ( + REPOSITORY_REPOSITORYRULESET_SOURCE_TYPE RepositoryRuleset_source_type = iota + ORGANIZATION_REPOSITORYRULESET_SOURCE_TYPE +) + +func (i RepositoryRuleset_source_type) String() string { + return []string{"Repository", "Organization"}[i] +} +func ParseRepositoryRuleset_source_type(v string) (any, error) { + result := REPOSITORY_REPOSITORYRULESET_SOURCE_TYPE + switch v { + case "Repository": + result = REPOSITORY_REPOSITORYRULESET_SOURCE_TYPE + case "Organization": + result = ORGANIZATION_REPOSITORYRULESET_SOURCE_TYPE + default: + return 0, errors.New("Unknown RepositoryRuleset_source_type value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleset_source_type(values []RepositoryRuleset_source_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleset_source_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_ruleset_target.go b/pkg/github/models/repository_ruleset_target.go new file mode 100644 index 0000000..682eb98 --- /dev/null +++ b/pkg/github/models/repository_ruleset_target.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +type RepositoryRuleset_target int + +const ( + BRANCH_REPOSITORYRULESET_TARGET RepositoryRuleset_target = iota + TAG_REPOSITORYRULESET_TARGET + PUSH_REPOSITORYRULESET_TARGET +) + +func (i RepositoryRuleset_target) String() string { + return []string{"branch", "tag", "push"}[i] +} +func ParseRepositoryRuleset_target(v string) (any, error) { + result := BRANCH_REPOSITORYRULESET_TARGET + switch v { + case "branch": + result = BRANCH_REPOSITORYRULESET_TARGET + case "tag": + result = TAG_REPOSITORYRULESET_TARGET + case "push": + result = PUSH_REPOSITORYRULESET_TARGET + default: + return 0, errors.New("Unknown RepositoryRuleset_target value: " + v) + } + return &result, nil +} +func SerializeRepositoryRuleset_target(values []RepositoryRuleset_target) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleset_target) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_squash_merge_commit_message.go b/pkg/github/models/repository_squash_merge_commit_message.go new file mode 100644 index 0000000..e3b0aa9 --- /dev/null +++ b/pkg/github/models/repository_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type Repository_squash_merge_commit_message int + +const ( + PR_BODY_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE Repository_squash_merge_commit_message = iota + COMMIT_MESSAGES_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i Repository_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseRepository_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown Repository_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeRepository_squash_merge_commit_message(values []Repository_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Repository_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_squash_merge_commit_title.go b/pkg/github/models/repository_squash_merge_commit_title.go new file mode 100644 index 0000000..c01b3d3 --- /dev/null +++ b/pkg/github/models/repository_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type Repository_squash_merge_commit_title int + +const ( + PR_TITLE_REPOSITORY_SQUASH_MERGE_COMMIT_TITLE Repository_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_REPOSITORY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i Repository_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseRepository_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOSITORY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOSITORY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_REPOSITORY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown Repository_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeRepository_squash_merge_commit_title(values []Repository_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Repository_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_subscription.go b/pkg/github/models/repository_subscription.go new file mode 100644 index 0000000..da68734 --- /dev/null +++ b/pkg/github/models/repository_subscription.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositorySubscription repository invitations let you manage who you collaborate with. +type RepositorySubscription struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Determines if all notifications should be blocked from this repository. + ignored *bool + // The reason property + reason *string + // The repository_url property + repository_url *string + // Determines if notifications should be received from this repository. + subscribed *bool + // The url property + url *string +} +// NewRepositorySubscription instantiates a new RepositorySubscription and sets the default values. +func NewRepositorySubscription()(*RepositorySubscription) { + m := &RepositorySubscription{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositorySubscriptionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositorySubscriptionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositorySubscription(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositorySubscription) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *RepositorySubscription) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositorySubscription) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["ignored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnored(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["subscribed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribed(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetIgnored gets the ignored property value. Determines if all notifications should be blocked from this repository. +// returns a *bool when successful +func (m *RepositorySubscription) GetIgnored()(*bool) { + return m.ignored +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *RepositorySubscription) GetReason()(*string) { + return m.reason +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *RepositorySubscription) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetSubscribed gets the subscribed property value. Determines if notifications should be received from this repository. +// returns a *bool when successful +func (m *RepositorySubscription) GetSubscribed()(*bool) { + return m.subscribed +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *RepositorySubscription) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *RepositorySubscription) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("ignored", m.GetIgnored()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("subscribed", m.GetSubscribed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RepositorySubscription) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *RepositorySubscription) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetIgnored sets the ignored property value. Determines if all notifications should be blocked from this repository. +func (m *RepositorySubscription) SetIgnored(value *bool)() { + m.ignored = value +} +// SetReason sets the reason property value. The reason property +func (m *RepositorySubscription) SetReason(value *string)() { + m.reason = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *RepositorySubscription) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetSubscribed sets the subscribed property value. Determines if notifications should be received from this repository. +func (m *RepositorySubscription) SetSubscribed(value *bool)() { + m.subscribed = value +} +// SetUrl sets the url property value. The url property +func (m *RepositorySubscription) SetUrl(value *string)() { + m.url = value +} +type RepositorySubscriptionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIgnored()(*bool) + GetReason()(*string) + GetRepositoryUrl()(*string) + GetSubscribed()(*bool) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIgnored(value *bool)() + SetReason(value *string)() + SetRepositoryUrl(value *string)() + SetSubscribed(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/resource503_error.go b/pkg/github/models/resource503_error.go new file mode 100644 index 0000000..b8b92e0 --- /dev/null +++ b/pkg/github/models/resource503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Resource503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewResource503Error instantiates a new Resource503Error and sets the default values. +func NewResource503Error()(*Resource503Error) { + m := &Resource503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateResource503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateResource503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResource503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Resource503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Resource503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Resource503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Resource503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Resource503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Resource503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Resource503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Resource503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Resource503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Resource503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Resource503Error) SetMessage(value *string)() { + m.message = value +} +type Resource503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/review_comment.go b/pkg/github/models/review_comment.go new file mode 100644 index 0000000..f9e40b4 --- /dev/null +++ b/pkg/github/models/review_comment.go @@ -0,0 +1,872 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReviewComment legacy Review Comment +type ReviewComment struct { + // The _links property + _links ReviewComment__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // The body property + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The commit_id property + commit_id *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The diff_hunk property + diff_hunk *string + // The html_url property + html_url *string + // The id property + id *int64 + // The in_reply_to_id property + in_reply_to_id *int32 + // The line of the blob to which the comment applies. The last line of the range for a multi-line comment + line *int32 + // The node_id property + node_id *string + // The original_commit_id property + original_commit_id *string + // The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + original_line *int32 + // The original_position property + original_position *int32 + // The original first line of the range for a multi-line comment. + original_start_line *int32 + // The path property + path *string + // The position property + position *int32 + // The pull_request_review_id property + pull_request_review_id *int64 + // The pull_request_url property + pull_request_url *string + // The reactions property + reactions ReactionRollupable + // The side of the first line of the range for a multi-line comment. + side *ReviewComment_side + // The first line of the range for a multi-line comment. + start_line *int32 + // The side of the first line of the range for a multi-line comment. + start_side *ReviewComment_start_side + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // A GitHub user. + user NullableSimpleUserable +} +// NewReviewComment instantiates a new ReviewComment and sets the default values. +func NewReviewComment()(*ReviewComment) { + m := &ReviewComment{ + } + m.SetAdditionalData(make(map[string]any)) + sideValue := RIGHT_REVIEWCOMMENT_SIDE + m.SetSide(&sideValue) + start_sideValue := RIGHT_REVIEWCOMMENT_START_SIDE + m.SetStartSide(&start_sideValue) + return m +} +// CreateReviewCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *ReviewComment) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *ReviewComment) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *ReviewComment) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *ReviewComment) GetBodyText()(*string) { + return m.body_text +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *ReviewComment) GetCommitId()(*string) { + return m.commit_id +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ReviewComment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiffHunk gets the diff_hunk property value. The diff_hunk property +// returns a *string when successful +func (m *ReviewComment) GetDiffHunk()(*string) { + return m.diff_hunk +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReviewComment__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(ReviewComment__linksable)) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["diff_hunk"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiffHunk(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["in_reply_to_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInReplyToId(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["original_commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalCommitId(val) + } + return nil + } + res["original_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOriginalLine(val) + } + return nil + } + res["original_position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOriginalPosition(val) + } + return nil + } + res["original_start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOriginalStartLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + res["pull_request_review_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestReviewId(val) + } + return nil + } + res["pull_request_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestUrl(val) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["side"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReviewComment_side) + if err != nil { + return err + } + if val != nil { + m.SetSide(val.(*ReviewComment_side)) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + res["start_side"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReviewComment_start_side) + if err != nil { + return err + } + if val != nil { + m.SetStartSide(val.(*ReviewComment_start_side)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(NullableSimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *ReviewComment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *ReviewComment) GetId()(*int64) { + return m.id +} +// GetInReplyToId gets the in_reply_to_id property value. The in_reply_to_id property +// returns a *int32 when successful +func (m *ReviewComment) GetInReplyToId()(*int32) { + return m.in_reply_to_id +} +// GetLine gets the line property value. The line of the blob to which the comment applies. The last line of the range for a multi-line comment +// returns a *int32 when successful +func (m *ReviewComment) GetLine()(*int32) { + return m.line +} +// GetLinks gets the _links property value. The _links property +// returns a ReviewComment__linksable when successful +func (m *ReviewComment) GetLinks()(ReviewComment__linksable) { + return m._links +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ReviewComment) GetNodeId()(*string) { + return m.node_id +} +// GetOriginalCommitId gets the original_commit_id property value. The original_commit_id property +// returns a *string when successful +func (m *ReviewComment) GetOriginalCommitId()(*string) { + return m.original_commit_id +} +// GetOriginalLine gets the original_line property value. The original line of the blob to which the comment applies. The last line of the range for a multi-line comment +// returns a *int32 when successful +func (m *ReviewComment) GetOriginalLine()(*int32) { + return m.original_line +} +// GetOriginalPosition gets the original_position property value. The original_position property +// returns a *int32 when successful +func (m *ReviewComment) GetOriginalPosition()(*int32) { + return m.original_position +} +// GetOriginalStartLine gets the original_start_line property value. The original first line of the range for a multi-line comment. +// returns a *int32 when successful +func (m *ReviewComment) GetOriginalStartLine()(*int32) { + return m.original_start_line +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ReviewComment) GetPath()(*string) { + return m.path +} +// GetPosition gets the position property value. The position property +// returns a *int32 when successful +func (m *ReviewComment) GetPosition()(*int32) { + return m.position +} +// GetPullRequestReviewId gets the pull_request_review_id property value. The pull_request_review_id property +// returns a *int64 when successful +func (m *ReviewComment) GetPullRequestReviewId()(*int64) { + return m.pull_request_review_id +} +// GetPullRequestUrl gets the pull_request_url property value. The pull_request_url property +// returns a *string when successful +func (m *ReviewComment) GetPullRequestUrl()(*string) { + return m.pull_request_url +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *ReviewComment) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetSide gets the side property value. The side of the first line of the range for a multi-line comment. +// returns a *ReviewComment_side when successful +func (m *ReviewComment) GetSide()(*ReviewComment_side) { + return m.side +} +// GetStartLine gets the start_line property value. The first line of the range for a multi-line comment. +// returns a *int32 when successful +func (m *ReviewComment) GetStartLine()(*int32) { + return m.start_line +} +// GetStartSide gets the start_side property value. The side of the first line of the range for a multi-line comment. +// returns a *ReviewComment_start_side when successful +func (m *ReviewComment) GetStartSide()(*ReviewComment_start_side) { + return m.start_side +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *ReviewComment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ReviewComment) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *ReviewComment) GetUser()(NullableSimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *ReviewComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("diff_hunk", m.GetDiffHunk()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("in_reply_to_id", m.GetInReplyToId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("original_commit_id", m.GetOriginalCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("original_line", m.GetOriginalLine()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("original_position", m.GetOriginalPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("original_start_line", m.GetOriginalStartLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("pull_request_review_id", m.GetPullRequestReviewId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pull_request_url", m.GetPullRequestUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + if m.GetSide() != nil { + cast := (*m.GetSide()).String() + err := writer.WriteStringValue("side", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + if err != nil { + return err + } + } + if m.GetStartSide() != nil { + cast := (*m.GetStartSide()).String() + err := writer.WriteStringValue("start_side", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *ReviewComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *ReviewComment) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The body property +func (m *ReviewComment) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *ReviewComment) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *ReviewComment) SetBodyText(value *string)() { + m.body_text = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *ReviewComment) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ReviewComment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiffHunk sets the diff_hunk property value. The diff_hunk property +func (m *ReviewComment) SetDiffHunk(value *string)() { + m.diff_hunk = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *ReviewComment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *ReviewComment) SetId(value *int64)() { + m.id = value +} +// SetInReplyToId sets the in_reply_to_id property value. The in_reply_to_id property +func (m *ReviewComment) SetInReplyToId(value *int32)() { + m.in_reply_to_id = value +} +// SetLine sets the line property value. The line of the blob to which the comment applies. The last line of the range for a multi-line comment +func (m *ReviewComment) SetLine(value *int32)() { + m.line = value +} +// SetLinks sets the _links property value. The _links property +func (m *ReviewComment) SetLinks(value ReviewComment__linksable)() { + m._links = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ReviewComment) SetNodeId(value *string)() { + m.node_id = value +} +// SetOriginalCommitId sets the original_commit_id property value. The original_commit_id property +func (m *ReviewComment) SetOriginalCommitId(value *string)() { + m.original_commit_id = value +} +// SetOriginalLine sets the original_line property value. The original line of the blob to which the comment applies. The last line of the range for a multi-line comment +func (m *ReviewComment) SetOriginalLine(value *int32)() { + m.original_line = value +} +// SetOriginalPosition sets the original_position property value. The original_position property +func (m *ReviewComment) SetOriginalPosition(value *int32)() { + m.original_position = value +} +// SetOriginalStartLine sets the original_start_line property value. The original first line of the range for a multi-line comment. +func (m *ReviewComment) SetOriginalStartLine(value *int32)() { + m.original_start_line = value +} +// SetPath sets the path property value. The path property +func (m *ReviewComment) SetPath(value *string)() { + m.path = value +} +// SetPosition sets the position property value. The position property +func (m *ReviewComment) SetPosition(value *int32)() { + m.position = value +} +// SetPullRequestReviewId sets the pull_request_review_id property value. The pull_request_review_id property +func (m *ReviewComment) SetPullRequestReviewId(value *int64)() { + m.pull_request_review_id = value +} +// SetPullRequestUrl sets the pull_request_url property value. The pull_request_url property +func (m *ReviewComment) SetPullRequestUrl(value *string)() { + m.pull_request_url = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *ReviewComment) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetSide sets the side property value. The side of the first line of the range for a multi-line comment. +func (m *ReviewComment) SetSide(value *ReviewComment_side)() { + m.side = value +} +// SetStartLine sets the start_line property value. The first line of the range for a multi-line comment. +func (m *ReviewComment) SetStartLine(value *int32)() { + m.start_line = value +} +// SetStartSide sets the start_side property value. The side of the first line of the range for a multi-line comment. +func (m *ReviewComment) SetStartSide(value *ReviewComment_start_side)() { + m.start_side = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *ReviewComment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *ReviewComment) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *ReviewComment) SetUser(value NullableSimpleUserable)() { + m.user = value +} +type ReviewCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCommitId()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiffHunk()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetInReplyToId()(*int32) + GetLine()(*int32) + GetLinks()(ReviewComment__linksable) + GetNodeId()(*string) + GetOriginalCommitId()(*string) + GetOriginalLine()(*int32) + GetOriginalPosition()(*int32) + GetOriginalStartLine()(*int32) + GetPath()(*string) + GetPosition()(*int32) + GetPullRequestReviewId()(*int64) + GetPullRequestUrl()(*string) + GetReactions()(ReactionRollupable) + GetSide()(*ReviewComment_side) + GetStartLine()(*int32) + GetStartSide()(*ReviewComment_start_side) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(NullableSimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCommitId(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiffHunk(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetInReplyToId(value *int32)() + SetLine(value *int32)() + SetLinks(value ReviewComment__linksable)() + SetNodeId(value *string)() + SetOriginalCommitId(value *string)() + SetOriginalLine(value *int32)() + SetOriginalPosition(value *int32)() + SetOriginalStartLine(value *int32)() + SetPath(value *string)() + SetPosition(value *int32)() + SetPullRequestReviewId(value *int64)() + SetPullRequestUrl(value *string)() + SetReactions(value ReactionRollupable)() + SetSide(value *ReviewComment_side)() + SetStartLine(value *int32)() + SetStartSide(value *ReviewComment_start_side)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value NullableSimpleUserable)() +} diff --git a/pkg/github/models/review_comment__links.go b/pkg/github/models/review_comment__links.go new file mode 100644 index 0000000..ed64eb2 --- /dev/null +++ b/pkg/github/models/review_comment__links.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ReviewComment__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Hypermedia Link + html Linkable + // Hypermedia Link + pull_request Linkable + // Hypermedia Link + self Linkable +} +// NewReviewComment__links instantiates a new ReviewComment__links and sets the default values. +func NewReviewComment__links()(*ReviewComment__links) { + m := &ReviewComment__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewComment__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewComment__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewComment__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewComment__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewComment__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(Linkable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(Linkable)) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelf(val.(Linkable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. Hypermedia Link +// returns a Linkable when successful +func (m *ReviewComment__links) GetHtml()(Linkable) { + return m.html +} +// GetPullRequest gets the pull_request property value. Hypermedia Link +// returns a Linkable when successful +func (m *ReviewComment__links) GetPullRequest()(Linkable) { + return m.pull_request +} +// GetSelf gets the self property value. Hypermedia Link +// returns a Linkable when successful +func (m *ReviewComment__links) GetSelf()(Linkable) { + return m.self +} +// Serialize serializes information the current object +func (m *ReviewComment__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("self", m.GetSelf()) + 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 *ReviewComment__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtml sets the html property value. Hypermedia Link +func (m *ReviewComment__links) SetHtml(value Linkable)() { + m.html = value +} +// SetPullRequest sets the pull_request property value. Hypermedia Link +func (m *ReviewComment__links) SetPullRequest(value Linkable)() { + m.pull_request = value +} +// SetSelf sets the self property value. Hypermedia Link +func (m *ReviewComment__links) SetSelf(value Linkable)() { + m.self = value +} +type ReviewComment__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtml()(Linkable) + GetPullRequest()(Linkable) + GetSelf()(Linkable) + SetHtml(value Linkable)() + SetPullRequest(value Linkable)() + SetSelf(value Linkable)() +} diff --git a/pkg/github/models/review_comment_side.go b/pkg/github/models/review_comment_side.go new file mode 100644 index 0000000..b1e51ea --- /dev/null +++ b/pkg/github/models/review_comment_side.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The side of the first line of the range for a multi-line comment. +type ReviewComment_side int + +const ( + LEFT_REVIEWCOMMENT_SIDE ReviewComment_side = iota + RIGHT_REVIEWCOMMENT_SIDE +) + +func (i ReviewComment_side) String() string { + return []string{"LEFT", "RIGHT"}[i] +} +func ParseReviewComment_side(v string) (any, error) { + result := LEFT_REVIEWCOMMENT_SIDE + switch v { + case "LEFT": + result = LEFT_REVIEWCOMMENT_SIDE + case "RIGHT": + result = RIGHT_REVIEWCOMMENT_SIDE + default: + return 0, errors.New("Unknown ReviewComment_side value: " + v) + } + return &result, nil +} +func SerializeReviewComment_side(values []ReviewComment_side) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReviewComment_side) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/review_comment_start_side.go b/pkg/github/models/review_comment_start_side.go new file mode 100644 index 0000000..394c4a6 --- /dev/null +++ b/pkg/github/models/review_comment_start_side.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The side of the first line of the range for a multi-line comment. +type ReviewComment_start_side int + +const ( + LEFT_REVIEWCOMMENT_START_SIDE ReviewComment_start_side = iota + RIGHT_REVIEWCOMMENT_START_SIDE +) + +func (i ReviewComment_start_side) String() string { + return []string{"LEFT", "RIGHT"}[i] +} +func ParseReviewComment_start_side(v string) (any, error) { + result := LEFT_REVIEWCOMMENT_START_SIDE + switch v { + case "LEFT": + result = LEFT_REVIEWCOMMENT_START_SIDE + case "RIGHT": + result = RIGHT_REVIEWCOMMENT_START_SIDE + default: + return 0, errors.New("Unknown ReviewComment_start_side value: " + v) + } + return &result, nil +} +func SerializeReviewComment_start_side(values []ReviewComment_start_side) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReviewComment_start_side) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/review_custom_gates_comment_required.go b/pkg/github/models/review_custom_gates_comment_required.go new file mode 100644 index 0000000..fe7a334 --- /dev/null +++ b/pkg/github/models/review_custom_gates_comment_required.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ReviewCustomGatesCommentRequired struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Comment associated with the pending deployment protection rule. **Required when state is not provided.** + comment *string + // The name of the environment to approve or reject. + environment_name *string +} +// NewReviewCustomGatesCommentRequired instantiates a new ReviewCustomGatesCommentRequired and sets the default values. +func NewReviewCustomGatesCommentRequired()(*ReviewCustomGatesCommentRequired) { + m := &ReviewCustomGatesCommentRequired{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewCustomGatesCommentRequiredFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewCustomGatesCommentRequiredFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewCustomGatesCommentRequired(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewCustomGatesCommentRequired) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComment gets the comment property value. Comment associated with the pending deployment protection rule. **Required when state is not provided.** +// returns a *string when successful +func (m *ReviewCustomGatesCommentRequired) GetComment()(*string) { + return m.comment +} +// GetEnvironmentName gets the environment_name property value. The name of the environment to approve or reject. +// returns a *string when successful +func (m *ReviewCustomGatesCommentRequired) GetEnvironmentName()(*string) { + return m.environment_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewCustomGatesCommentRequired) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["environment_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ReviewCustomGatesCommentRequired) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment_name", m.GetEnvironmentName()) + 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 *ReviewCustomGatesCommentRequired) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComment sets the comment property value. Comment associated with the pending deployment protection rule. **Required when state is not provided.** +func (m *ReviewCustomGatesCommentRequired) SetComment(value *string)() { + m.comment = value +} +// SetEnvironmentName sets the environment_name property value. The name of the environment to approve or reject. +func (m *ReviewCustomGatesCommentRequired) SetEnvironmentName(value *string)() { + m.environment_name = value +} +type ReviewCustomGatesCommentRequiredable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetEnvironmentName()(*string) + SetComment(value *string)() + SetEnvironmentName(value *string)() +} diff --git a/pkg/github/models/review_custom_gates_state_required.go b/pkg/github/models/review_custom_gates_state_required.go new file mode 100644 index 0000000..1cd04c1 --- /dev/null +++ b/pkg/github/models/review_custom_gates_state_required.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ReviewCustomGatesStateRequired struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Optional comment to include with the review. + comment *string + // The name of the environment to approve or reject. + environment_name *string + // Whether to approve or reject deployment to the specified environments. + state *ReviewCustomGatesStateRequired_state +} +// NewReviewCustomGatesStateRequired instantiates a new ReviewCustomGatesStateRequired and sets the default values. +func NewReviewCustomGatesStateRequired()(*ReviewCustomGatesStateRequired) { + m := &ReviewCustomGatesStateRequired{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewCustomGatesStateRequiredFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewCustomGatesStateRequiredFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewCustomGatesStateRequired(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewCustomGatesStateRequired) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComment gets the comment property value. Optional comment to include with the review. +// returns a *string when successful +func (m *ReviewCustomGatesStateRequired) GetComment()(*string) { + return m.comment +} +// GetEnvironmentName gets the environment_name property value. The name of the environment to approve or reject. +// returns a *string when successful +func (m *ReviewCustomGatesStateRequired) GetEnvironmentName()(*string) { + return m.environment_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewCustomGatesStateRequired) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["environment_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentName(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReviewCustomGatesStateRequired_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ReviewCustomGatesStateRequired_state)) + } + return nil + } + return res +} +// GetState gets the state property value. Whether to approve or reject deployment to the specified environments. +// returns a *ReviewCustomGatesStateRequired_state when successful +func (m *ReviewCustomGatesStateRequired) GetState()(*ReviewCustomGatesStateRequired_state) { + return m.state +} +// Serialize serializes information the current object +func (m *ReviewCustomGatesStateRequired) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment_name", m.GetEnvironmentName()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ReviewCustomGatesStateRequired) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComment sets the comment property value. Optional comment to include with the review. +func (m *ReviewCustomGatesStateRequired) SetComment(value *string)() { + m.comment = value +} +// SetEnvironmentName sets the environment_name property value. The name of the environment to approve or reject. +func (m *ReviewCustomGatesStateRequired) SetEnvironmentName(value *string)() { + m.environment_name = value +} +// SetState sets the state property value. Whether to approve or reject deployment to the specified environments. +func (m *ReviewCustomGatesStateRequired) SetState(value *ReviewCustomGatesStateRequired_state)() { + m.state = value +} +type ReviewCustomGatesStateRequiredable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetEnvironmentName()(*string) + GetState()(*ReviewCustomGatesStateRequired_state) + SetComment(value *string)() + SetEnvironmentName(value *string)() + SetState(value *ReviewCustomGatesStateRequired_state)() +} diff --git a/pkg/github/models/review_custom_gates_state_required_state.go b/pkg/github/models/review_custom_gates_state_required_state.go new file mode 100644 index 0000000..efe458a --- /dev/null +++ b/pkg/github/models/review_custom_gates_state_required_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Whether to approve or reject deployment to the specified environments. +type ReviewCustomGatesStateRequired_state int + +const ( + APPROVED_REVIEWCUSTOMGATESSTATEREQUIRED_STATE ReviewCustomGatesStateRequired_state = iota + REJECTED_REVIEWCUSTOMGATESSTATEREQUIRED_STATE +) + +func (i ReviewCustomGatesStateRequired_state) String() string { + return []string{"approved", "rejected"}[i] +} +func ParseReviewCustomGatesStateRequired_state(v string) (any, error) { + result := APPROVED_REVIEWCUSTOMGATESSTATEREQUIRED_STATE + switch v { + case "approved": + result = APPROVED_REVIEWCUSTOMGATESSTATEREQUIRED_STATE + case "rejected": + result = REJECTED_REVIEWCUSTOMGATESSTATEREQUIRED_STATE + default: + return 0, errors.New("Unknown ReviewCustomGatesStateRequired_state value: " + v) + } + return &result, nil +} +func SerializeReviewCustomGatesStateRequired_state(values []ReviewCustomGatesStateRequired_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReviewCustomGatesStateRequired_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/review_dismissed_issue_event.go b/pkg/github/models/review_dismissed_issue_event.go new file mode 100644 index 0000000..668bd74 --- /dev/null +++ b/pkg/github/models/review_dismissed_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReviewDismissedIssueEvent review Dismissed Issue Event +type ReviewDismissedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The dismissed_review property + dismissed_review ReviewDismissedIssueEvent_dismissed_reviewable + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewReviewDismissedIssueEvent instantiates a new ReviewDismissedIssueEvent and sets the default values. +func NewReviewDismissedIssueEvent()(*ReviewDismissedIssueEvent) { + m := &ReviewDismissedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewDismissedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewDismissedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewDismissedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewDismissedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewDismissedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetDismissedReview gets the dismissed_review property value. The dismissed_review property +// returns a ReviewDismissedIssueEvent_dismissed_reviewable when successful +func (m *ReviewDismissedIssueEvent) GetDismissedReview()(ReviewDismissedIssueEvent_dismissed_reviewable) { + return m.dismissed_review +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewDismissedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["dismissed_review"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReviewDismissedIssueEvent_dismissed_reviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReview(val.(ReviewDismissedIssueEvent_dismissed_reviewable)) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ReviewDismissedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *ReviewDismissedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ReviewDismissedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dismissed_review", m.GetDismissedReview()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *ReviewDismissedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ReviewDismissedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *ReviewDismissedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *ReviewDismissedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ReviewDismissedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetDismissedReview sets the dismissed_review property value. The dismissed_review property +func (m *ReviewDismissedIssueEvent) SetDismissedReview(value ReviewDismissedIssueEvent_dismissed_reviewable)() { + m.dismissed_review = value +} +// SetEvent sets the event property value. The event property +func (m *ReviewDismissedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *ReviewDismissedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ReviewDismissedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *ReviewDismissedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *ReviewDismissedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type ReviewDismissedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetDismissedReview()(ReviewDismissedIssueEvent_dismissed_reviewable) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetDismissedReview(value ReviewDismissedIssueEvent_dismissed_reviewable)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/review_dismissed_issue_event_dismissed_review.go b/pkg/github/models/review_dismissed_issue_event_dismissed_review.go new file mode 100644 index 0000000..5644007 --- /dev/null +++ b/pkg/github/models/review_dismissed_issue_event_dismissed_review.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ReviewDismissedIssueEvent_dismissed_review struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dismissal_commit_id property + dismissal_commit_id *string + // The dismissal_message property + dismissal_message *string + // The review_id property + review_id *int32 + // The state property + state *string +} +// NewReviewDismissedIssueEvent_dismissed_review instantiates a new ReviewDismissedIssueEvent_dismissed_review and sets the default values. +func NewReviewDismissedIssueEvent_dismissed_review()(*ReviewDismissedIssueEvent_dismissed_review) { + m := &ReviewDismissedIssueEvent_dismissed_review{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewDismissedIssueEvent_dismissed_reviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewDismissedIssueEvent_dismissed_reviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewDismissedIssueEvent_dismissed_review(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewDismissedIssueEvent_dismissed_review) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDismissalCommitId gets the dismissal_commit_id property value. The dismissal_commit_id property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent_dismissed_review) GetDismissalCommitId()(*string) { + return m.dismissal_commit_id +} +// GetDismissalMessage gets the dismissal_message property value. The dismissal_message property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent_dismissed_review) GetDismissalMessage()(*string) { + return m.dismissal_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewDismissedIssueEvent_dismissed_review) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dismissal_commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissalCommitId(val) + } + return nil + } + res["dismissal_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissalMessage(val) + } + return nil + } + res["review_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReviewId(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetReviewId gets the review_id property value. The review_id property +// returns a *int32 when successful +func (m *ReviewDismissedIssueEvent_dismissed_review) GetReviewId()(*int32) { + return m.review_id +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *ReviewDismissedIssueEvent_dismissed_review) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *ReviewDismissedIssueEvent_dismissed_review) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dismissal_commit_id", m.GetDismissalCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dismissal_message", m.GetDismissalMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("review_id", m.GetReviewId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *ReviewDismissedIssueEvent_dismissed_review) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDismissalCommitId sets the dismissal_commit_id property value. The dismissal_commit_id property +func (m *ReviewDismissedIssueEvent_dismissed_review) SetDismissalCommitId(value *string)() { + m.dismissal_commit_id = value +} +// SetDismissalMessage sets the dismissal_message property value. The dismissal_message property +func (m *ReviewDismissedIssueEvent_dismissed_review) SetDismissalMessage(value *string)() { + m.dismissal_message = value +} +// SetReviewId sets the review_id property value. The review_id property +func (m *ReviewDismissedIssueEvent_dismissed_review) SetReviewId(value *int32)() { + m.review_id = value +} +// SetState sets the state property value. The state property +func (m *ReviewDismissedIssueEvent_dismissed_review) SetState(value *string)() { + m.state = value +} +type ReviewDismissedIssueEvent_dismissed_reviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDismissalCommitId()(*string) + GetDismissalMessage()(*string) + GetReviewId()(*int32) + GetState()(*string) + SetDismissalCommitId(value *string)() + SetDismissalMessage(value *string)() + SetReviewId(value *int32)() + SetState(value *string)() +} diff --git a/pkg/github/models/review_request_removed_issue_event.go b/pkg/github/models/review_request_removed_issue_event.go new file mode 100644 index 0000000..9aca40a --- /dev/null +++ b/pkg/github/models/review_request_removed_issue_event.go @@ -0,0 +1,400 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReviewRequestRemovedIssueEvent review Request Removed Issue Event +type ReviewRequestRemovedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // A GitHub user. + requested_reviewer SimpleUserable + // Groups of organization members that gives permissions on specified repositories. + requested_team Teamable + // A GitHub user. + review_requester SimpleUserable + // The url property + url *string +} +// NewReviewRequestRemovedIssueEvent instantiates a new ReviewRequestRemovedIssueEvent and sets the default values. +func NewReviewRequestRemovedIssueEvent()(*ReviewRequestRemovedIssueEvent) { + m := &ReviewRequestRemovedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewRequestRemovedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewRequestRemovedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewRequestRemovedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewRequestRemovedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewRequestRemovedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *ReviewRequestRemovedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *ReviewRequestRemovedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *ReviewRequestRemovedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *ReviewRequestRemovedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewRequestRemovedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["requested_reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedReviewer(val.(SimpleUserable)) + } + return nil + } + res["requested_team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedTeam(val.(Teamable)) + } + return nil + } + res["review_requester"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewRequester(val.(SimpleUserable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ReviewRequestRemovedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ReviewRequestRemovedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *ReviewRequestRemovedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetRequestedReviewer gets the requested_reviewer property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewRequestRemovedIssueEvent) GetRequestedReviewer()(SimpleUserable) { + return m.requested_reviewer +} +// GetRequestedTeam gets the requested_team property value. Groups of organization members that gives permissions on specified repositories. +// returns a Teamable when successful +func (m *ReviewRequestRemovedIssueEvent) GetRequestedTeam()(Teamable) { + return m.requested_team +} +// GetReviewRequester gets the review_requester property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewRequestRemovedIssueEvent) GetReviewRequester()(SimpleUserable) { + return m.review_requester +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ReviewRequestRemovedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ReviewRequestRemovedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requested_reviewer", m.GetRequestedReviewer()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requested_team", m.GetRequestedTeam()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_requester", m.GetReviewRequester()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *ReviewRequestRemovedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ReviewRequestRemovedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *ReviewRequestRemovedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *ReviewRequestRemovedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ReviewRequestRemovedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *ReviewRequestRemovedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *ReviewRequestRemovedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ReviewRequestRemovedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *ReviewRequestRemovedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetRequestedReviewer sets the requested_reviewer property value. A GitHub user. +func (m *ReviewRequestRemovedIssueEvent) SetRequestedReviewer(value SimpleUserable)() { + m.requested_reviewer = value +} +// SetRequestedTeam sets the requested_team property value. Groups of organization members that gives permissions on specified repositories. +func (m *ReviewRequestRemovedIssueEvent) SetRequestedTeam(value Teamable)() { + m.requested_team = value +} +// SetReviewRequester sets the review_requester property value. A GitHub user. +func (m *ReviewRequestRemovedIssueEvent) SetReviewRequester(value SimpleUserable)() { + m.review_requester = value +} +// SetUrl sets the url property value. The url property +func (m *ReviewRequestRemovedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type ReviewRequestRemovedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetRequestedReviewer()(SimpleUserable) + GetRequestedTeam()(Teamable) + GetReviewRequester()(SimpleUserable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetRequestedReviewer(value SimpleUserable)() + SetRequestedTeam(value Teamable)() + SetReviewRequester(value SimpleUserable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/review_requested_issue_event.go b/pkg/github/models/review_requested_issue_event.go new file mode 100644 index 0000000..b35cf9c --- /dev/null +++ b/pkg/github/models/review_requested_issue_event.go @@ -0,0 +1,400 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReviewRequestedIssueEvent review Requested Issue Event +type ReviewRequestedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // A GitHub user. + requested_reviewer SimpleUserable + // Groups of organization members that gives permissions on specified repositories. + requested_team Teamable + // A GitHub user. + review_requester SimpleUserable + // The url property + url *string +} +// NewReviewRequestedIssueEvent instantiates a new ReviewRequestedIssueEvent and sets the default values. +func NewReviewRequestedIssueEvent()(*ReviewRequestedIssueEvent) { + m := &ReviewRequestedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReviewRequestedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReviewRequestedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewRequestedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewRequestedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReviewRequestedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *ReviewRequestedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *ReviewRequestedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *ReviewRequestedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *ReviewRequestedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReviewRequestedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["requested_reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedReviewer(val.(SimpleUserable)) + } + return nil + } + res["requested_team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedTeam(val.(Teamable)) + } + return nil + } + res["review_requester"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewRequester(val.(SimpleUserable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *ReviewRequestedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *ReviewRequestedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *ReviewRequestedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetRequestedReviewer gets the requested_reviewer property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewRequestedIssueEvent) GetRequestedReviewer()(SimpleUserable) { + return m.requested_reviewer +} +// GetRequestedTeam gets the requested_team property value. Groups of organization members that gives permissions on specified repositories. +// returns a Teamable when successful +func (m *ReviewRequestedIssueEvent) GetRequestedTeam()(Teamable) { + return m.requested_team +} +// GetReviewRequester gets the review_requester property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ReviewRequestedIssueEvent) GetReviewRequester()(SimpleUserable) { + return m.review_requester +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ReviewRequestedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ReviewRequestedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requested_reviewer", m.GetRequestedReviewer()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requested_team", m.GetRequestedTeam()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("review_requester", m.GetReviewRequester()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *ReviewRequestedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ReviewRequestedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *ReviewRequestedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *ReviewRequestedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ReviewRequestedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *ReviewRequestedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *ReviewRequestedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *ReviewRequestedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *ReviewRequestedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetRequestedReviewer sets the requested_reviewer property value. A GitHub user. +func (m *ReviewRequestedIssueEvent) SetRequestedReviewer(value SimpleUserable)() { + m.requested_reviewer = value +} +// SetRequestedTeam sets the requested_team property value. Groups of organization members that gives permissions on specified repositories. +func (m *ReviewRequestedIssueEvent) SetRequestedTeam(value Teamable)() { + m.requested_team = value +} +// SetReviewRequester sets the review_requester property value. A GitHub user. +func (m *ReviewRequestedIssueEvent) SetReviewRequester(value SimpleUserable)() { + m.review_requester = value +} +// SetUrl sets the url property value. The url property +func (m *ReviewRequestedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type ReviewRequestedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetRequestedReviewer()(SimpleUserable) + GetRequestedTeam()(Teamable) + GetReviewRequester()(SimpleUserable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetRequestedReviewer(value SimpleUserable)() + SetRequestedTeam(value Teamable)() + SetReviewRequester(value SimpleUserable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/root.go b/pkg/github/models/root.go new file mode 100644 index 0000000..6f32793 --- /dev/null +++ b/pkg/github/models/root.go @@ -0,0 +1,1011 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Root struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The authorizations_url property + authorizations_url *string + // The code_search_url property + code_search_url *string + // The commit_search_url property + commit_search_url *string + // The current_user_authorizations_html_url property + current_user_authorizations_html_url *string + // The current_user_repositories_url property + current_user_repositories_url *string + // The current_user_url property + current_user_url *string + // The emails_url property + emails_url *string + // The emojis_url property + emojis_url *string + // The events_url property + events_url *string + // The feeds_url property + feeds_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The hub_url property + // Deprecated: + hub_url *string + // The issue_search_url property + issue_search_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The label_search_url property + label_search_url *string + // The notifications_url property + notifications_url *string + // The organization_repositories_url property + organization_repositories_url *string + // The organization_teams_url property + organization_teams_url *string + // The organization_url property + organization_url *string + // The public_gists_url property + public_gists_url *string + // The rate_limit_url property + rate_limit_url *string + // The repository_search_url property + repository_search_url *string + // The repository_url property + repository_url *string + // The starred_gists_url property + starred_gists_url *string + // The starred_url property + starred_url *string + // The topic_search_url property + topic_search_url *string + // The user_organizations_url property + user_organizations_url *string + // The user_repositories_url property + user_repositories_url *string + // The user_search_url property + user_search_url *string + // The user_url property + user_url *string +} +// NewRoot instantiates a new Root and sets the default values. +func NewRoot()(*Root) { + m := &Root{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoot(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Root) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorizationsUrl gets the authorizations_url property value. The authorizations_url property +// returns a *string when successful +func (m *Root) GetAuthorizationsUrl()(*string) { + return m.authorizations_url +} +// GetCodeSearchUrl gets the code_search_url property value. The code_search_url property +// returns a *string when successful +func (m *Root) GetCodeSearchUrl()(*string) { + return m.code_search_url +} +// GetCommitSearchUrl gets the commit_search_url property value. The commit_search_url property +// returns a *string when successful +func (m *Root) GetCommitSearchUrl()(*string) { + return m.commit_search_url +} +// GetCurrentUserAuthorizationsHtmlUrl gets the current_user_authorizations_html_url property value. The current_user_authorizations_html_url property +// returns a *string when successful +func (m *Root) GetCurrentUserAuthorizationsHtmlUrl()(*string) { + return m.current_user_authorizations_html_url +} +// GetCurrentUserRepositoriesUrl gets the current_user_repositories_url property value. The current_user_repositories_url property +// returns a *string when successful +func (m *Root) GetCurrentUserRepositoriesUrl()(*string) { + return m.current_user_repositories_url +} +// GetCurrentUserUrl gets the current_user_url property value. The current_user_url property +// returns a *string when successful +func (m *Root) GetCurrentUserUrl()(*string) { + return m.current_user_url +} +// GetEmailsUrl gets the emails_url property value. The emails_url property +// returns a *string when successful +func (m *Root) GetEmailsUrl()(*string) { + return m.emails_url +} +// GetEmojisUrl gets the emojis_url property value. The emojis_url property +// returns a *string when successful +func (m *Root) GetEmojisUrl()(*string) { + return m.emojis_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *Root) GetEventsUrl()(*string) { + return m.events_url +} +// GetFeedsUrl gets the feeds_url property value. The feeds_url property +// returns a *string when successful +func (m *Root) GetFeedsUrl()(*string) { + return m.feeds_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Root) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authorizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizationsUrl(val) + } + return nil + } + res["code_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCodeSearchUrl(val) + } + return nil + } + res["commit_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitSearchUrl(val) + } + return nil + } + res["current_user_authorizations_html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserAuthorizationsHtmlUrl(val) + } + return nil + } + res["current_user_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserRepositoriesUrl(val) + } + return nil + } + res["current_user_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUserUrl(val) + } + return nil + } + res["emails_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailsUrl(val) + } + return nil + } + res["emojis_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmojisUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["feeds_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFeedsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["hub_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHubUrl(val) + } + return nil + } + res["issue_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueSearchUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["label_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelSearchUrl(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["organization_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationRepositoriesUrl(val) + } + return nil + } + res["organization_teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationTeamsUrl(val) + } + return nil + } + res["organization_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationUrl(val) + } + return nil + } + res["public_gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicGistsUrl(val) + } + return nil + } + res["rate_limit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRateLimitUrl(val) + } + return nil + } + res["repository_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositorySearchUrl(val) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["starred_gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredGistsUrl(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["topic_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTopicSearchUrl(val) + } + return nil + } + res["user_organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserOrganizationsUrl(val) + } + return nil + } + res["user_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserRepositoriesUrl(val) + } + return nil + } + res["user_search_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserSearchUrl(val) + } + return nil + } + res["user_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *Root) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *Root) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *Root) GetGistsUrl()(*string) { + return m.gists_url +} +// GetHubUrl gets the hub_url property value. The hub_url property +// Deprecated: +// returns a *string when successful +func (m *Root) GetHubUrl()(*string) { + return m.hub_url +} +// GetIssueSearchUrl gets the issue_search_url property value. The issue_search_url property +// returns a *string when successful +func (m *Root) GetIssueSearchUrl()(*string) { + return m.issue_search_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *Root) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *Root) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelSearchUrl gets the label_search_url property value. The label_search_url property +// returns a *string when successful +func (m *Root) GetLabelSearchUrl()(*string) { + return m.label_search_url +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *Root) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOrganizationRepositoriesUrl gets the organization_repositories_url property value. The organization_repositories_url property +// returns a *string when successful +func (m *Root) GetOrganizationRepositoriesUrl()(*string) { + return m.organization_repositories_url +} +// GetOrganizationTeamsUrl gets the organization_teams_url property value. The organization_teams_url property +// returns a *string when successful +func (m *Root) GetOrganizationTeamsUrl()(*string) { + return m.organization_teams_url +} +// GetOrganizationUrl gets the organization_url property value. The organization_url property +// returns a *string when successful +func (m *Root) GetOrganizationUrl()(*string) { + return m.organization_url +} +// GetPublicGistsUrl gets the public_gists_url property value. The public_gists_url property +// returns a *string when successful +func (m *Root) GetPublicGistsUrl()(*string) { + return m.public_gists_url +} +// GetRateLimitUrl gets the rate_limit_url property value. The rate_limit_url property +// returns a *string when successful +func (m *Root) GetRateLimitUrl()(*string) { + return m.rate_limit_url +} +// GetRepositorySearchUrl gets the repository_search_url property value. The repository_search_url property +// returns a *string when successful +func (m *Root) GetRepositorySearchUrl()(*string) { + return m.repository_search_url +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *Root) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetStarredGistsUrl gets the starred_gists_url property value. The starred_gists_url property +// returns a *string when successful +func (m *Root) GetStarredGistsUrl()(*string) { + return m.starred_gists_url +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *Root) GetStarredUrl()(*string) { + return m.starred_url +} +// GetTopicSearchUrl gets the topic_search_url property value. The topic_search_url property +// returns a *string when successful +func (m *Root) GetTopicSearchUrl()(*string) { + return m.topic_search_url +} +// GetUserOrganizationsUrl gets the user_organizations_url property value. The user_organizations_url property +// returns a *string when successful +func (m *Root) GetUserOrganizationsUrl()(*string) { + return m.user_organizations_url +} +// GetUserRepositoriesUrl gets the user_repositories_url property value. The user_repositories_url property +// returns a *string when successful +func (m *Root) GetUserRepositoriesUrl()(*string) { + return m.user_repositories_url +} +// GetUserSearchUrl gets the user_search_url property value. The user_search_url property +// returns a *string when successful +func (m *Root) GetUserSearchUrl()(*string) { + return m.user_search_url +} +// GetUserUrl gets the user_url property value. The user_url property +// returns a *string when successful +func (m *Root) GetUserUrl()(*string) { + return m.user_url +} +// Serialize serializes information the current object +func (m *Root) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("authorizations_url", m.GetAuthorizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("code_search_url", m.GetCodeSearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_search_url", m.GetCommitSearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("current_user_authorizations_html_url", m.GetCurrentUserAuthorizationsHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("current_user_repositories_url", m.GetCurrentUserRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("current_user_url", m.GetCurrentUserUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("emails_url", m.GetEmailsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("emojis_url", m.GetEmojisUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("feeds_url", m.GetFeedsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hub_url", m.GetHubUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_search_url", m.GetIssueSearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("label_search_url", m.GetLabelSearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_repositories_url", m.GetOrganizationRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_teams_url", m.GetOrganizationTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_url", m.GetOrganizationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_gists_url", m.GetPublicGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rate_limit_url", m.GetRateLimitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_search_url", m.GetRepositorySearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_gists_url", m.GetStarredGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("topic_search_url", m.GetTopicSearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user_organizations_url", m.GetUserOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user_repositories_url", m.GetUserRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user_search_url", m.GetUserSearchUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user_url", m.GetUserUrl()) + 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 *Root) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorizationsUrl sets the authorizations_url property value. The authorizations_url property +func (m *Root) SetAuthorizationsUrl(value *string)() { + m.authorizations_url = value +} +// SetCodeSearchUrl sets the code_search_url property value. The code_search_url property +func (m *Root) SetCodeSearchUrl(value *string)() { + m.code_search_url = value +} +// SetCommitSearchUrl sets the commit_search_url property value. The commit_search_url property +func (m *Root) SetCommitSearchUrl(value *string)() { + m.commit_search_url = value +} +// SetCurrentUserAuthorizationsHtmlUrl sets the current_user_authorizations_html_url property value. The current_user_authorizations_html_url property +func (m *Root) SetCurrentUserAuthorizationsHtmlUrl(value *string)() { + m.current_user_authorizations_html_url = value +} +// SetCurrentUserRepositoriesUrl sets the current_user_repositories_url property value. The current_user_repositories_url property +func (m *Root) SetCurrentUserRepositoriesUrl(value *string)() { + m.current_user_repositories_url = value +} +// SetCurrentUserUrl sets the current_user_url property value. The current_user_url property +func (m *Root) SetCurrentUserUrl(value *string)() { + m.current_user_url = value +} +// SetEmailsUrl sets the emails_url property value. The emails_url property +func (m *Root) SetEmailsUrl(value *string)() { + m.emails_url = value +} +// SetEmojisUrl sets the emojis_url property value. The emojis_url property +func (m *Root) SetEmojisUrl(value *string)() { + m.emojis_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *Root) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFeedsUrl sets the feeds_url property value. The feeds_url property +func (m *Root) SetFeedsUrl(value *string)() { + m.feeds_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *Root) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *Root) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *Root) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetHubUrl sets the hub_url property value. The hub_url property +// Deprecated: +func (m *Root) SetHubUrl(value *string)() { + m.hub_url = value +} +// SetIssueSearchUrl sets the issue_search_url property value. The issue_search_url property +func (m *Root) SetIssueSearchUrl(value *string)() { + m.issue_search_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *Root) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *Root) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelSearchUrl sets the label_search_url property value. The label_search_url property +func (m *Root) SetLabelSearchUrl(value *string)() { + m.label_search_url = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *Root) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOrganizationRepositoriesUrl sets the organization_repositories_url property value. The organization_repositories_url property +func (m *Root) SetOrganizationRepositoriesUrl(value *string)() { + m.organization_repositories_url = value +} +// SetOrganizationTeamsUrl sets the organization_teams_url property value. The organization_teams_url property +func (m *Root) SetOrganizationTeamsUrl(value *string)() { + m.organization_teams_url = value +} +// SetOrganizationUrl sets the organization_url property value. The organization_url property +func (m *Root) SetOrganizationUrl(value *string)() { + m.organization_url = value +} +// SetPublicGistsUrl sets the public_gists_url property value. The public_gists_url property +func (m *Root) SetPublicGistsUrl(value *string)() { + m.public_gists_url = value +} +// SetRateLimitUrl sets the rate_limit_url property value. The rate_limit_url property +func (m *Root) SetRateLimitUrl(value *string)() { + m.rate_limit_url = value +} +// SetRepositorySearchUrl sets the repository_search_url property value. The repository_search_url property +func (m *Root) SetRepositorySearchUrl(value *string)() { + m.repository_search_url = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *Root) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetStarredGistsUrl sets the starred_gists_url property value. The starred_gists_url property +func (m *Root) SetStarredGistsUrl(value *string)() { + m.starred_gists_url = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *Root) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetTopicSearchUrl sets the topic_search_url property value. The topic_search_url property +func (m *Root) SetTopicSearchUrl(value *string)() { + m.topic_search_url = value +} +// SetUserOrganizationsUrl sets the user_organizations_url property value. The user_organizations_url property +func (m *Root) SetUserOrganizationsUrl(value *string)() { + m.user_organizations_url = value +} +// SetUserRepositoriesUrl sets the user_repositories_url property value. The user_repositories_url property +func (m *Root) SetUserRepositoriesUrl(value *string)() { + m.user_repositories_url = value +} +// SetUserSearchUrl sets the user_search_url property value. The user_search_url property +func (m *Root) SetUserSearchUrl(value *string)() { + m.user_search_url = value +} +// SetUserUrl sets the user_url property value. The user_url property +func (m *Root) SetUserUrl(value *string)() { + m.user_url = value +} +type Rootable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorizationsUrl()(*string) + GetCodeSearchUrl()(*string) + GetCommitSearchUrl()(*string) + GetCurrentUserAuthorizationsHtmlUrl()(*string) + GetCurrentUserRepositoriesUrl()(*string) + GetCurrentUserUrl()(*string) + GetEmailsUrl()(*string) + GetEmojisUrl()(*string) + GetEventsUrl()(*string) + GetFeedsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetHubUrl()(*string) + GetIssueSearchUrl()(*string) + GetIssuesUrl()(*string) + GetKeysUrl()(*string) + GetLabelSearchUrl()(*string) + GetNotificationsUrl()(*string) + GetOrganizationRepositoriesUrl()(*string) + GetOrganizationTeamsUrl()(*string) + GetOrganizationUrl()(*string) + GetPublicGistsUrl()(*string) + GetRateLimitUrl()(*string) + GetRepositorySearchUrl()(*string) + GetRepositoryUrl()(*string) + GetStarredGistsUrl()(*string) + GetStarredUrl()(*string) + GetTopicSearchUrl()(*string) + GetUserOrganizationsUrl()(*string) + GetUserRepositoriesUrl()(*string) + GetUserSearchUrl()(*string) + GetUserUrl()(*string) + SetAuthorizationsUrl(value *string)() + SetCodeSearchUrl(value *string)() + SetCommitSearchUrl(value *string)() + SetCurrentUserAuthorizationsHtmlUrl(value *string)() + SetCurrentUserRepositoriesUrl(value *string)() + SetCurrentUserUrl(value *string)() + SetEmailsUrl(value *string)() + SetEmojisUrl(value *string)() + SetEventsUrl(value *string)() + SetFeedsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetHubUrl(value *string)() + SetIssueSearchUrl(value *string)() + SetIssuesUrl(value *string)() + SetKeysUrl(value *string)() + SetLabelSearchUrl(value *string)() + SetNotificationsUrl(value *string)() + SetOrganizationRepositoriesUrl(value *string)() + SetOrganizationTeamsUrl(value *string)() + SetOrganizationUrl(value *string)() + SetPublicGistsUrl(value *string)() + SetRateLimitUrl(value *string)() + SetRepositorySearchUrl(value *string)() + SetRepositoryUrl(value *string)() + SetStarredGistsUrl(value *string)() + SetStarredUrl(value *string)() + SetTopicSearchUrl(value *string)() + SetUserOrganizationsUrl(value *string)() + SetUserRepositoriesUrl(value *string)() + SetUserSearchUrl(value *string)() + SetUserUrl(value *string)() +} diff --git a/pkg/github/models/rule_suite.go b/pkg/github/models/rule_suite.go new file mode 100644 index 0000000..eadb5c8 --- /dev/null +++ b/pkg/github/models/rule_suite.go @@ -0,0 +1,415 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RuleSuite response +type RuleSuite struct { + // The number that identifies the user. + actor_id *int32 + // The handle for the GitHub user account. + actor_name *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The last commit sha in the push evaluation. + after_sha *string + // The first commit sha before the push evaluation. + before_sha *string + // The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + evaluation_result *RuleSuite_evaluation_result + // The unique identifier of the rule insight. + id *int32 + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ref name that the evaluation ran on. + ref *string + // The ID of the repository associated with the rule evaluation. + repository_id *int32 + // The name of the repository without the `.git` extension. + repository_name *string + // The result of the rule evaluations for rules with the `active` enforcement status. + result *RuleSuite_result + // Details on the evaluated rules. + rule_evaluations []RuleSuite_rule_evaluationsable +} +// NewRuleSuite instantiates a new RuleSuite and sets the default values. +func NewRuleSuite()(*RuleSuite) { + m := &RuleSuite{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRuleSuiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRuleSuiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleSuite(), nil +} +// GetActorId gets the actor_id property value. The number that identifies the user. +// returns a *int32 when successful +func (m *RuleSuite) GetActorId()(*int32) { + return m.actor_id +} +// GetActorName gets the actor_name property value. The handle for the GitHub user account. +// returns a *string when successful +func (m *RuleSuite) GetActorName()(*string) { + return m.actor_name +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RuleSuite) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAfterSha gets the after_sha property value. The last commit sha in the push evaluation. +// returns a *string when successful +func (m *RuleSuite) GetAfterSha()(*string) { + return m.after_sha +} +// GetBeforeSha gets the before_sha property value. The first commit sha before the push evaluation. +// returns a *string when successful +func (m *RuleSuite) GetBeforeSha()(*string) { + return m.before_sha +} +// GetEvaluationResult gets the evaluation_result property value. The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. +// returns a *RuleSuite_evaluation_result when successful +func (m *RuleSuite) GetEvaluationResult()(*RuleSuite_evaluation_result) { + return m.evaluation_result +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RuleSuite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActorId(val) + } + return nil + } + res["actor_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActorName(val) + } + return nil + } + res["after_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAfterSha(val) + } + return nil + } + res["before_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBeforeSha(val) + } + return nil + } + res["evaluation_result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSuite_evaluation_result) + if err != nil { + return err + } + if val != nil { + m.SetEvaluationResult(val.(*RuleSuite_evaluation_result)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["repository_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryName(val) + } + return nil + } + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSuite_result) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(*RuleSuite_result)) + } + return nil + } + res["rule_evaluations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRuleSuite_rule_evaluationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RuleSuite_rule_evaluationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RuleSuite_rule_evaluationsable) + } + } + m.SetRuleEvaluations(res) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the rule insight. +// returns a *int32 when successful +func (m *RuleSuite) GetId()(*int32) { + return m.id +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *RuleSuite) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetRef gets the ref property value. The ref name that the evaluation ran on. +// returns a *string when successful +func (m *RuleSuite) GetRef()(*string) { + return m.ref +} +// GetRepositoryId gets the repository_id property value. The ID of the repository associated with the rule evaluation. +// returns a *int32 when successful +func (m *RuleSuite) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetRepositoryName gets the repository_name property value. The name of the repository without the `.git` extension. +// returns a *string when successful +func (m *RuleSuite) GetRepositoryName()(*string) { + return m.repository_name +} +// GetResult gets the result property value. The result of the rule evaluations for rules with the `active` enforcement status. +// returns a *RuleSuite_result when successful +func (m *RuleSuite) GetResult()(*RuleSuite_result) { + return m.result +} +// GetRuleEvaluations gets the rule_evaluations property value. Details on the evaluated rules. +// returns a []RuleSuite_rule_evaluationsable when successful +func (m *RuleSuite) GetRuleEvaluations()([]RuleSuite_rule_evaluationsable) { + return m.rule_evaluations +} +// Serialize serializes information the current object +func (m *RuleSuite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("actor_id", m.GetActorId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actor_name", m.GetActorName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("after_sha", m.GetAfterSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("before_sha", m.GetBeforeSha()) + if err != nil { + return err + } + } + if m.GetEvaluationResult() != nil { + cast := (*m.GetEvaluationResult()).String() + err := writer.WriteStringValue("evaluation_result", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_name", m.GetRepositoryName()) + if err != nil { + return err + } + } + if m.GetResult() != nil { + cast := (*m.GetResult()).String() + err := writer.WriteStringValue("result", &cast) + if err != nil { + return err + } + } + if m.GetRuleEvaluations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRuleEvaluations())) + for i, v := range m.GetRuleEvaluations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("rule_evaluations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActorId sets the actor_id property value. The number that identifies the user. +func (m *RuleSuite) SetActorId(value *int32)() { + m.actor_id = value +} +// SetActorName sets the actor_name property value. The handle for the GitHub user account. +func (m *RuleSuite) SetActorName(value *string)() { + m.actor_name = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RuleSuite) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAfterSha sets the after_sha property value. The last commit sha in the push evaluation. +func (m *RuleSuite) SetAfterSha(value *string)() { + m.after_sha = value +} +// SetBeforeSha sets the before_sha property value. The first commit sha before the push evaluation. +func (m *RuleSuite) SetBeforeSha(value *string)() { + m.before_sha = value +} +// SetEvaluationResult sets the evaluation_result property value. The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. +func (m *RuleSuite) SetEvaluationResult(value *RuleSuite_evaluation_result)() { + m.evaluation_result = value +} +// SetId sets the id property value. The unique identifier of the rule insight. +func (m *RuleSuite) SetId(value *int32)() { + m.id = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *RuleSuite) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetRef sets the ref property value. The ref name that the evaluation ran on. +func (m *RuleSuite) SetRef(value *string)() { + m.ref = value +} +// SetRepositoryId sets the repository_id property value. The ID of the repository associated with the rule evaluation. +func (m *RuleSuite) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetRepositoryName sets the repository_name property value. The name of the repository without the `.git` extension. +func (m *RuleSuite) SetRepositoryName(value *string)() { + m.repository_name = value +} +// SetResult sets the result property value. The result of the rule evaluations for rules with the `active` enforcement status. +func (m *RuleSuite) SetResult(value *RuleSuite_result)() { + m.result = value +} +// SetRuleEvaluations sets the rule_evaluations property value. Details on the evaluated rules. +func (m *RuleSuite) SetRuleEvaluations(value []RuleSuite_rule_evaluationsable)() { + m.rule_evaluations = value +} +type RuleSuiteable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActorId()(*int32) + GetActorName()(*string) + GetAfterSha()(*string) + GetBeforeSha()(*string) + GetEvaluationResult()(*RuleSuite_evaluation_result) + GetId()(*int32) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRef()(*string) + GetRepositoryId()(*int32) + GetRepositoryName()(*string) + GetResult()(*RuleSuite_result) + GetRuleEvaluations()([]RuleSuite_rule_evaluationsable) + SetActorId(value *int32)() + SetActorName(value *string)() + SetAfterSha(value *string)() + SetBeforeSha(value *string)() + SetEvaluationResult(value *RuleSuite_evaluation_result)() + SetId(value *int32)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRef(value *string)() + SetRepositoryId(value *int32)() + SetRepositoryName(value *string)() + SetResult(value *RuleSuite_result)() + SetRuleEvaluations(value []RuleSuite_rule_evaluationsable)() +} diff --git a/pkg/github/models/rule_suite_evaluation_result.go b/pkg/github/models/rule_suite_evaluation_result.go new file mode 100644 index 0000000..bdea671 --- /dev/null +++ b/pkg/github/models/rule_suite_evaluation_result.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. +type RuleSuite_evaluation_result int + +const ( + PASS_RULESUITE_EVALUATION_RESULT RuleSuite_evaluation_result = iota + FAIL_RULESUITE_EVALUATION_RESULT +) + +func (i RuleSuite_evaluation_result) String() string { + return []string{"pass", "fail"}[i] +} +func ParseRuleSuite_evaluation_result(v string) (any, error) { + result := PASS_RULESUITE_EVALUATION_RESULT + switch v { + case "pass": + result = PASS_RULESUITE_EVALUATION_RESULT + case "fail": + result = FAIL_RULESUITE_EVALUATION_RESULT + default: + return 0, errors.New("Unknown RuleSuite_evaluation_result value: " + v) + } + return &result, nil +} +func SerializeRuleSuite_evaluation_result(values []RuleSuite_evaluation_result) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RuleSuite_evaluation_result) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rule_suite_result.go b/pkg/github/models/rule_suite_result.go new file mode 100644 index 0000000..276cc0b --- /dev/null +++ b/pkg/github/models/rule_suite_result.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The result of the rule evaluations for rules with the `active` enforcement status. +type RuleSuite_result int + +const ( + PASS_RULESUITE_RESULT RuleSuite_result = iota + FAIL_RULESUITE_RESULT + BYPASS_RULESUITE_RESULT +) + +func (i RuleSuite_result) String() string { + return []string{"pass", "fail", "bypass"}[i] +} +func ParseRuleSuite_result(v string) (any, error) { + result := PASS_RULESUITE_RESULT + switch v { + case "pass": + result = PASS_RULESUITE_RESULT + case "fail": + result = FAIL_RULESUITE_RESULT + case "bypass": + result = BYPASS_RULESUITE_RESULT + default: + return 0, errors.New("Unknown RuleSuite_result value: " + v) + } + return &result, nil +} +func SerializeRuleSuite_result(values []RuleSuite_result) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RuleSuite_result) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rule_suite_rule_evaluations.go b/pkg/github/models/rule_suite_rule_evaluations.go new file mode 100644 index 0000000..5485f1c --- /dev/null +++ b/pkg/github/models/rule_suite_rule_evaluations.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RuleSuite_rule_evaluations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Any associated details with the rule evaluation. + details *string + // The enforcement level of this rule source. + enforcement *RuleSuite_rule_evaluations_enforcement + // The result of the evaluation of the individual rule. + result *RuleSuite_rule_evaluations_result + // The rule_source property + rule_source RuleSuite_rule_evaluations_rule_sourceable + // The type of rule. + rule_type *string +} +// NewRuleSuite_rule_evaluations instantiates a new RuleSuite_rule_evaluations and sets the default values. +func NewRuleSuite_rule_evaluations()(*RuleSuite_rule_evaluations) { + m := &RuleSuite_rule_evaluations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRuleSuite_rule_evaluationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRuleSuite_rule_evaluationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleSuite_rule_evaluations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RuleSuite_rule_evaluations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDetails gets the details property value. Any associated details with the rule evaluation. +// returns a *string when successful +func (m *RuleSuite_rule_evaluations) GetDetails()(*string) { + return m.details +} +// GetEnforcement gets the enforcement property value. The enforcement level of this rule source. +// returns a *RuleSuite_rule_evaluations_enforcement when successful +func (m *RuleSuite_rule_evaluations) GetEnforcement()(*RuleSuite_rule_evaluations_enforcement) { + return m.enforcement +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RuleSuite_rule_evaluations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetails(val) + } + return nil + } + res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSuite_rule_evaluations_enforcement) + if err != nil { + return err + } + if val != nil { + m.SetEnforcement(val.(*RuleSuite_rule_evaluations_enforcement)) + } + return nil + } + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSuite_rule_evaluations_result) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(*RuleSuite_rule_evaluations_result)) + } + return nil + } + res["rule_source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRuleSuite_rule_evaluations_rule_sourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRuleSource(val.(RuleSuite_rule_evaluations_rule_sourceable)) + } + return nil + } + res["rule_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleType(val) + } + return nil + } + return res +} +// GetResult gets the result property value. The result of the evaluation of the individual rule. +// returns a *RuleSuite_rule_evaluations_result when successful +func (m *RuleSuite_rule_evaluations) GetResult()(*RuleSuite_rule_evaluations_result) { + return m.result +} +// GetRuleSource gets the rule_source property value. The rule_source property +// returns a RuleSuite_rule_evaluations_rule_sourceable when successful +func (m *RuleSuite_rule_evaluations) GetRuleSource()(RuleSuite_rule_evaluations_rule_sourceable) { + return m.rule_source +} +// GetRuleType gets the rule_type property value. The type of rule. +// returns a *string when successful +func (m *RuleSuite_rule_evaluations) GetRuleType()(*string) { + return m.rule_type +} +// Serialize serializes information the current object +func (m *RuleSuite_rule_evaluations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("details", m.GetDetails()) + if err != nil { + return err + } + } + if m.GetEnforcement() != nil { + cast := (*m.GetEnforcement()).String() + err := writer.WriteStringValue("enforcement", &cast) + if err != nil { + return err + } + } + if m.GetResult() != nil { + cast := (*m.GetResult()).String() + err := writer.WriteStringValue("result", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rule_source", m.GetRuleSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rule_type", m.GetRuleType()) + 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 *RuleSuite_rule_evaluations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDetails sets the details property value. Any associated details with the rule evaluation. +func (m *RuleSuite_rule_evaluations) SetDetails(value *string)() { + m.details = value +} +// SetEnforcement sets the enforcement property value. The enforcement level of this rule source. +func (m *RuleSuite_rule_evaluations) SetEnforcement(value *RuleSuite_rule_evaluations_enforcement)() { + m.enforcement = value +} +// SetResult sets the result property value. The result of the evaluation of the individual rule. +func (m *RuleSuite_rule_evaluations) SetResult(value *RuleSuite_rule_evaluations_result)() { + m.result = value +} +// SetRuleSource sets the rule_source property value. The rule_source property +func (m *RuleSuite_rule_evaluations) SetRuleSource(value RuleSuite_rule_evaluations_rule_sourceable)() { + m.rule_source = value +} +// SetRuleType sets the rule_type property value. The type of rule. +func (m *RuleSuite_rule_evaluations) SetRuleType(value *string)() { + m.rule_type = value +} +type RuleSuite_rule_evaluationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetails()(*string) + GetEnforcement()(*RuleSuite_rule_evaluations_enforcement) + GetResult()(*RuleSuite_rule_evaluations_result) + GetRuleSource()(RuleSuite_rule_evaluations_rule_sourceable) + GetRuleType()(*string) + SetDetails(value *string)() + SetEnforcement(value *RuleSuite_rule_evaluations_enforcement)() + SetResult(value *RuleSuite_rule_evaluations_result)() + SetRuleSource(value RuleSuite_rule_evaluations_rule_sourceable)() + SetRuleType(value *string)() +} diff --git a/pkg/github/models/rule_suite_rule_evaluations_enforcement.go b/pkg/github/models/rule_suite_rule_evaluations_enforcement.go new file mode 100644 index 0000000..3b1b54b --- /dev/null +++ b/pkg/github/models/rule_suite_rule_evaluations_enforcement.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enforcement level of this rule source. +type RuleSuite_rule_evaluations_enforcement int + +const ( + ACTIVE_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT RuleSuite_rule_evaluations_enforcement = iota + EVALUATE_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT + DELETEDRULESET_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT +) + +func (i RuleSuite_rule_evaluations_enforcement) String() string { + return []string{"active", "evaluate", "deleted ruleset"}[i] +} +func ParseRuleSuite_rule_evaluations_enforcement(v string) (any, error) { + result := ACTIVE_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT + switch v { + case "active": + result = ACTIVE_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT + case "evaluate": + result = EVALUATE_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT + case "deleted ruleset": + result = DELETEDRULESET_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT + default: + return 0, errors.New("Unknown RuleSuite_rule_evaluations_enforcement value: " + v) + } + return &result, nil +} +func SerializeRuleSuite_rule_evaluations_enforcement(values []RuleSuite_rule_evaluations_enforcement) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RuleSuite_rule_evaluations_enforcement) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rule_suite_rule_evaluations_result.go b/pkg/github/models/rule_suite_rule_evaluations_result.go new file mode 100644 index 0000000..b93259e --- /dev/null +++ b/pkg/github/models/rule_suite_rule_evaluations_result.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The result of the evaluation of the individual rule. +type RuleSuite_rule_evaluations_result int + +const ( + PASS_RULESUITE_RULE_EVALUATIONS_RESULT RuleSuite_rule_evaluations_result = iota + FAIL_RULESUITE_RULE_EVALUATIONS_RESULT +) + +func (i RuleSuite_rule_evaluations_result) String() string { + return []string{"pass", "fail"}[i] +} +func ParseRuleSuite_rule_evaluations_result(v string) (any, error) { + result := PASS_RULESUITE_RULE_EVALUATIONS_RESULT + switch v { + case "pass": + result = PASS_RULESUITE_RULE_EVALUATIONS_RESULT + case "fail": + result = FAIL_RULESUITE_RULE_EVALUATIONS_RESULT + default: + return 0, errors.New("Unknown RuleSuite_rule_evaluations_result value: " + v) + } + return &result, nil +} +func SerializeRuleSuite_rule_evaluations_result(values []RuleSuite_rule_evaluations_result) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RuleSuite_rule_evaluations_result) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rule_suite_rule_evaluations_rule_source.go b/pkg/github/models/rule_suite_rule_evaluations_rule_source.go new file mode 100644 index 0000000..f287a1b --- /dev/null +++ b/pkg/github/models/rule_suite_rule_evaluations_rule_source.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RuleSuite_rule_evaluations_rule_source struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the rule source. + id *int32 + // The name of the rule source. + name *string + // The type of rule source. + typeEscaped *string +} +// NewRuleSuite_rule_evaluations_rule_source instantiates a new RuleSuite_rule_evaluations_rule_source and sets the default values. +func NewRuleSuite_rule_evaluations_rule_source()(*RuleSuite_rule_evaluations_rule_source) { + m := &RuleSuite_rule_evaluations_rule_source{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRuleSuite_rule_evaluations_rule_sourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRuleSuite_rule_evaluations_rule_sourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleSuite_rule_evaluations_rule_source(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RuleSuite_rule_evaluations_rule_source) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RuleSuite_rule_evaluations_rule_source) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the rule source. +// returns a *int32 when successful +func (m *RuleSuite_rule_evaluations_rule_source) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the rule source. +// returns a *string when successful +func (m *RuleSuite_rule_evaluations_rule_source) GetName()(*string) { + return m.name +} +// GetTypeEscaped gets the type property value. The type of rule source. +// returns a *string when successful +func (m *RuleSuite_rule_evaluations_rule_source) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RuleSuite_rule_evaluations_rule_source) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *RuleSuite_rule_evaluations_rule_source) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The ID of the rule source. +func (m *RuleSuite_rule_evaluations_rule_source) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the rule source. +func (m *RuleSuite_rule_evaluations_rule_source) SetName(value *string)() { + m.name = value +} +// SetTypeEscaped sets the type property value. The type of rule source. +func (m *RuleSuite_rule_evaluations_rule_source) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type RuleSuite_rule_evaluations_rule_sourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetName()(*string) + GetTypeEscaped()(*string) + SetId(value *int32)() + SetName(value *string)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/rule_suites.go b/pkg/github/models/rule_suites.go new file mode 100644 index 0000000..9e67b8a --- /dev/null +++ b/pkg/github/models/rule_suites.go @@ -0,0 +1,373 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RuleSuites struct { + // The number that identifies the user. + actor_id *int32 + // The handle for the GitHub user account. + actor_name *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The last commit sha in the push evaluation. + after_sha *string + // The first commit sha before the push evaluation. + before_sha *string + // The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. + evaluation_result *RuleSuites_evaluation_result + // The unique identifier of the rule insight. + id *int32 + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ref name that the evaluation ran on. + ref *string + // The ID of the repository associated with the rule evaluation. + repository_id *int32 + // The name of the repository without the `.git` extension. + repository_name *string + // The result of the rule evaluations for rules with the `active` enforcement status. + result *RuleSuites_result +} +// NewRuleSuites instantiates a new RuleSuites and sets the default values. +func NewRuleSuites()(*RuleSuites) { + m := &RuleSuites{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRuleSuitesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRuleSuitesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleSuites(), nil +} +// GetActorId gets the actor_id property value. The number that identifies the user. +// returns a *int32 when successful +func (m *RuleSuites) GetActorId()(*int32) { + return m.actor_id +} +// GetActorName gets the actor_name property value. The handle for the GitHub user account. +// returns a *string when successful +func (m *RuleSuites) GetActorName()(*string) { + return m.actor_name +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RuleSuites) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAfterSha gets the after_sha property value. The last commit sha in the push evaluation. +// returns a *string when successful +func (m *RuleSuites) GetAfterSha()(*string) { + return m.after_sha +} +// GetBeforeSha gets the before_sha property value. The first commit sha before the push evaluation. +// returns a *string when successful +func (m *RuleSuites) GetBeforeSha()(*string) { + return m.before_sha +} +// GetEvaluationResult gets the evaluation_result property value. The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. +// returns a *RuleSuites_evaluation_result when successful +func (m *RuleSuites) GetEvaluationResult()(*RuleSuites_evaluation_result) { + return m.evaluation_result +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RuleSuites) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActorId(val) + } + return nil + } + res["actor_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActorName(val) + } + return nil + } + res["after_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAfterSha(val) + } + return nil + } + res["before_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBeforeSha(val) + } + return nil + } + res["evaluation_result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSuites_evaluation_result) + if err != nil { + return err + } + if val != nil { + m.SetEvaluationResult(val.(*RuleSuites_evaluation_result)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["repository_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryName(val) + } + return nil + } + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSuites_result) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(*RuleSuites_result)) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the rule insight. +// returns a *int32 when successful +func (m *RuleSuites) GetId()(*int32) { + return m.id +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *RuleSuites) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetRef gets the ref property value. The ref name that the evaluation ran on. +// returns a *string when successful +func (m *RuleSuites) GetRef()(*string) { + return m.ref +} +// GetRepositoryId gets the repository_id property value. The ID of the repository associated with the rule evaluation. +// returns a *int32 when successful +func (m *RuleSuites) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetRepositoryName gets the repository_name property value. The name of the repository without the `.git` extension. +// returns a *string when successful +func (m *RuleSuites) GetRepositoryName()(*string) { + return m.repository_name +} +// GetResult gets the result property value. The result of the rule evaluations for rules with the `active` enforcement status. +// returns a *RuleSuites_result when successful +func (m *RuleSuites) GetResult()(*RuleSuites_result) { + return m.result +} +// Serialize serializes information the current object +func (m *RuleSuites) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("actor_id", m.GetActorId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actor_name", m.GetActorName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("after_sha", m.GetAfterSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("before_sha", m.GetBeforeSha()) + if err != nil { + return err + } + } + if m.GetEvaluationResult() != nil { + cast := (*m.GetEvaluationResult()).String() + err := writer.WriteStringValue("evaluation_result", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_name", m.GetRepositoryName()) + if err != nil { + return err + } + } + if m.GetResult() != nil { + cast := (*m.GetResult()).String() + err := writer.WriteStringValue("result", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActorId sets the actor_id property value. The number that identifies the user. +func (m *RuleSuites) SetActorId(value *int32)() { + m.actor_id = value +} +// SetActorName sets the actor_name property value. The handle for the GitHub user account. +func (m *RuleSuites) SetActorName(value *string)() { + m.actor_name = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RuleSuites) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAfterSha sets the after_sha property value. The last commit sha in the push evaluation. +func (m *RuleSuites) SetAfterSha(value *string)() { + m.after_sha = value +} +// SetBeforeSha sets the before_sha property value. The first commit sha before the push evaluation. +func (m *RuleSuites) SetBeforeSha(value *string)() { + m.before_sha = value +} +// SetEvaluationResult sets the evaluation_result property value. The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. +func (m *RuleSuites) SetEvaluationResult(value *RuleSuites_evaluation_result)() { + m.evaluation_result = value +} +// SetId sets the id property value. The unique identifier of the rule insight. +func (m *RuleSuites) SetId(value *int32)() { + m.id = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *RuleSuites) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetRef sets the ref property value. The ref name that the evaluation ran on. +func (m *RuleSuites) SetRef(value *string)() { + m.ref = value +} +// SetRepositoryId sets the repository_id property value. The ID of the repository associated with the rule evaluation. +func (m *RuleSuites) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetRepositoryName sets the repository_name property value. The name of the repository without the `.git` extension. +func (m *RuleSuites) SetRepositoryName(value *string)() { + m.repository_name = value +} +// SetResult sets the result property value. The result of the rule evaluations for rules with the `active` enforcement status. +func (m *RuleSuites) SetResult(value *RuleSuites_result)() { + m.result = value +} +type RuleSuitesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActorId()(*int32) + GetActorName()(*string) + GetAfterSha()(*string) + GetBeforeSha()(*string) + GetEvaluationResult()(*RuleSuites_evaluation_result) + GetId()(*int32) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRef()(*string) + GetRepositoryId()(*int32) + GetRepositoryName()(*string) + GetResult()(*RuleSuites_result) + SetActorId(value *int32)() + SetActorName(value *string)() + SetAfterSha(value *string)() + SetBeforeSha(value *string)() + SetEvaluationResult(value *RuleSuites_evaluation_result)() + SetId(value *int32)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRef(value *string)() + SetRepositoryId(value *int32)() + SetRepositoryName(value *string)() + SetResult(value *RuleSuites_result)() +} diff --git a/pkg/github/models/rule_suites_evaluation_result.go b/pkg/github/models/rule_suites_evaluation_result.go new file mode 100644 index 0000000..36ca145 --- /dev/null +++ b/pkg/github/models/rule_suites_evaluation_result.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. +type RuleSuites_evaluation_result int + +const ( + PASS_RULESUITES_EVALUATION_RESULT RuleSuites_evaluation_result = iota + FAIL_RULESUITES_EVALUATION_RESULT +) + +func (i RuleSuites_evaluation_result) String() string { + return []string{"pass", "fail"}[i] +} +func ParseRuleSuites_evaluation_result(v string) (any, error) { + result := PASS_RULESUITES_EVALUATION_RESULT + switch v { + case "pass": + result = PASS_RULESUITES_EVALUATION_RESULT + case "fail": + result = FAIL_RULESUITES_EVALUATION_RESULT + default: + return 0, errors.New("Unknown RuleSuites_evaluation_result value: " + v) + } + return &result, nil +} +func SerializeRuleSuites_evaluation_result(values []RuleSuites_evaluation_result) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RuleSuites_evaluation_result) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rule_suites_result.go b/pkg/github/models/rule_suites_result.go new file mode 100644 index 0000000..2de4355 --- /dev/null +++ b/pkg/github/models/rule_suites_result.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The result of the rule evaluations for rules with the `active` enforcement status. +type RuleSuites_result int + +const ( + PASS_RULESUITES_RESULT RuleSuites_result = iota + FAIL_RULESUITES_RESULT + BYPASS_RULESUITES_RESULT +) + +func (i RuleSuites_result) String() string { + return []string{"pass", "fail", "bypass"}[i] +} +func ParseRuleSuites_result(v string) (any, error) { + result := PASS_RULESUITES_RESULT + switch v { + case "pass": + result = PASS_RULESUITES_RESULT + case "fail": + result = FAIL_RULESUITES_RESULT + case "bypass": + result = BYPASS_RULESUITES_RESULT + default: + return 0, errors.New("Unknown RuleSuites_result value: " + v) + } + return &result, nil +} +func SerializeRuleSuites_result(values []RuleSuites_result) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RuleSuites_result) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/runner.go b/pkg/github/models/runner.go new file mode 100644 index 0000000..09ce496 --- /dev/null +++ b/pkg/github/models/runner.go @@ -0,0 +1,267 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Runner a self hosted runner +type Runner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The busy property + busy *bool + // The id of the runner. + id *int32 + // The labels property + labels []RunnerLabelable + // The name of the runner. + name *string + // The Operating System of the runner. + os *string + // The id of the runner group. + runner_group_id *int32 + // The status of the runner. + status *string +} +// NewRunner instantiates a new Runner and sets the default values. +func NewRunner()(*Runner) { + m := &Runner{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRunnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRunner(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Runner) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBusy gets the busy property value. The busy property +// returns a *bool when successful +func (m *Runner) GetBusy()(*bool) { + return m.busy +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Runner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["busy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBusy(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["os"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOs(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + 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 +} +// GetId gets the id property value. The id of the runner. +// returns a *int32 when successful +func (m *Runner) GetId()(*int32) { + return m.id +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *Runner) GetLabels()([]RunnerLabelable) { + return m.labels +} +// GetName gets the name property value. The name of the runner. +// returns a *string when successful +func (m *Runner) GetName()(*string) { + return m.name +} +// GetOs gets the os property value. The Operating System of the runner. +// returns a *string when successful +func (m *Runner) GetOs()(*string) { + return m.os +} +// GetRunnerGroupId gets the runner_group_id property value. The id of the runner group. +// returns a *int32 when successful +func (m *Runner) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetStatus gets the status property value. The status of the runner. +// returns a *string when successful +func (m *Runner) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *Runner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("busy", m.GetBusy()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("os", m.GetOs()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + { + 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 *Runner) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBusy sets the busy property value. The busy property +func (m *Runner) SetBusy(value *bool)() { + m.busy = value +} +// SetId sets the id property value. The id of the runner. +func (m *Runner) SetId(value *int32)() { + m.id = value +} +// SetLabels sets the labels property value. The labels property +func (m *Runner) SetLabels(value []RunnerLabelable)() { + m.labels = value +} +// SetName sets the name property value. The name of the runner. +func (m *Runner) SetName(value *string)() { + m.name = value +} +// SetOs sets the os property value. The Operating System of the runner. +func (m *Runner) SetOs(value *string)() { + m.os = value +} +// SetRunnerGroupId sets the runner_group_id property value. The id of the runner group. +func (m *Runner) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetStatus sets the status property value. The status of the runner. +func (m *Runner) SetStatus(value *string)() { + m.status = value +} +type Runnerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBusy()(*bool) + GetId()(*int32) + GetLabels()([]RunnerLabelable) + GetName()(*string) + GetOs()(*string) + GetRunnerGroupId()(*int32) + GetStatus()(*string) + SetBusy(value *bool)() + SetId(value *int32)() + SetLabels(value []RunnerLabelable)() + SetName(value *string)() + SetOs(value *string)() + SetRunnerGroupId(value *int32)() + SetStatus(value *string)() +} diff --git a/pkg/github/models/runner_application.go b/pkg/github/models/runner_application.go new file mode 100644 index 0000000..b46e5c6 --- /dev/null +++ b/pkg/github/models/runner_application.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RunnerApplication runner Application +type RunnerApplication struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The architecture property + architecture *string + // The download_url property + download_url *string + // The filename property + filename *string + // The os property + os *string + // The sha256_checksum property + sha256_checksum *string + // A short lived bearer token used to download the runner, if needed. + temp_download_token *string +} +// NewRunnerApplication instantiates a new RunnerApplication and sets the default values. +func NewRunnerApplication()(*RunnerApplication) { + m := &RunnerApplication{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRunnerApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunnerApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRunnerApplication(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RunnerApplication) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchitecture gets the architecture property value. The architecture property +// returns a *string when successful +func (m *RunnerApplication) GetArchitecture()(*string) { + return m.architecture +} +// GetDownloadUrl gets the download_url property value. The download_url property +// returns a *string when successful +func (m *RunnerApplication) GetDownloadUrl()(*string) { + return m.download_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunnerApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["architecture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchitecture(val) + } + return nil + } + res["download_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUrl(val) + } + return nil + } + res["filename"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilename(val) + } + return nil + } + res["os"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOs(val) + } + return nil + } + res["sha256_checksum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha256Checksum(val) + } + return nil + } + res["temp_download_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempDownloadToken(val) + } + return nil + } + return res +} +// GetFilename gets the filename property value. The filename property +// returns a *string when successful +func (m *RunnerApplication) GetFilename()(*string) { + return m.filename +} +// GetOs gets the os property value. The os property +// returns a *string when successful +func (m *RunnerApplication) GetOs()(*string) { + return m.os +} +// GetSha256Checksum gets the sha256_checksum property value. The sha256_checksum property +// returns a *string when successful +func (m *RunnerApplication) GetSha256Checksum()(*string) { + return m.sha256_checksum +} +// GetTempDownloadToken gets the temp_download_token property value. A short lived bearer token used to download the runner, if needed. +// returns a *string when successful +func (m *RunnerApplication) GetTempDownloadToken()(*string) { + return m.temp_download_token +} +// Serialize serializes information the current object +func (m *RunnerApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("architecture", m.GetArchitecture()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("download_url", m.GetDownloadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("filename", m.GetFilename()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("os", m.GetOs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha256_checksum", m.GetSha256Checksum()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_download_token", m.GetTempDownloadToken()) + 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 *RunnerApplication) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchitecture sets the architecture property value. The architecture property +func (m *RunnerApplication) SetArchitecture(value *string)() { + m.architecture = value +} +// SetDownloadUrl sets the download_url property value. The download_url property +func (m *RunnerApplication) SetDownloadUrl(value *string)() { + m.download_url = value +} +// SetFilename sets the filename property value. The filename property +func (m *RunnerApplication) SetFilename(value *string)() { + m.filename = value +} +// SetOs sets the os property value. The os property +func (m *RunnerApplication) SetOs(value *string)() { + m.os = value +} +// SetSha256Checksum sets the sha256_checksum property value. The sha256_checksum property +func (m *RunnerApplication) SetSha256Checksum(value *string)() { + m.sha256_checksum = value +} +// SetTempDownloadToken sets the temp_download_token property value. A short lived bearer token used to download the runner, if needed. +func (m *RunnerApplication) SetTempDownloadToken(value *string)() { + m.temp_download_token = value +} +type RunnerApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchitecture()(*string) + GetDownloadUrl()(*string) + GetFilename()(*string) + GetOs()(*string) + GetSha256Checksum()(*string) + GetTempDownloadToken()(*string) + SetArchitecture(value *string)() + SetDownloadUrl(value *string)() + SetFilename(value *string)() + SetOs(value *string)() + SetSha256Checksum(value *string)() + SetTempDownloadToken(value *string)() +} diff --git a/pkg/github/models/runner_groups_enterprise.go b/pkg/github/models/runner_groups_enterprise.go new file mode 100644 index 0000000..af9964d --- /dev/null +++ b/pkg/github/models/runner_groups_enterprise.go @@ -0,0 +1,376 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RunnerGroupsEnterprise struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allows_public_repositories property + allows_public_repositories *bool + // The default property + defaultEscaped *bool + // The hosted_runners_url property + hosted_runners_url *string + // The id property + id *float64 + // The name property + name *string + // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + restricted_to_workflows *bool + // The runners_url property + runners_url *string + // The selected_organizations_url property + selected_organizations_url *string + // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + selected_workflows []string + // The visibility property + visibility *string + // If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + workflow_restrictions_read_only *bool +} +// NewRunnerGroupsEnterprise instantiates a new RunnerGroupsEnterprise and sets the default values. +func NewRunnerGroupsEnterprise()(*RunnerGroupsEnterprise) { + m := &RunnerGroupsEnterprise{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRunnerGroupsEnterpriseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunnerGroupsEnterpriseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRunnerGroupsEnterprise(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RunnerGroupsEnterprise) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowsPublicRepositories gets the allows_public_repositories property value. The allows_public_repositories property +// returns a *bool when successful +func (m *RunnerGroupsEnterprise) GetAllowsPublicRepositories()(*bool) { + return m.allows_public_repositories +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *RunnerGroupsEnterprise) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunnerGroupsEnterprise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsPublicRepositories(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(val) + } + return nil + } + res["hosted_runners_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostedRunnersUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictedToWorkflows(val) + } + return nil + } + res["runners_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnersUrl(val) + } + return nil + } + res["selected_organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedOrganizationsUrl(val) + } + return nil + } + res["selected_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedWorkflows(res) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["workflow_restrictions_read_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowRestrictionsReadOnly(val) + } + return nil + } + return res +} +// GetHostedRunnersUrl gets the hosted_runners_url property value. The hosted_runners_url property +// returns a *string when successful +func (m *RunnerGroupsEnterprise) GetHostedRunnersUrl()(*string) { + return m.hosted_runners_url +} +// GetId gets the id property value. The id property +// returns a *float64 when successful +func (m *RunnerGroupsEnterprise) GetId()(*float64) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *RunnerGroupsEnterprise) GetName()(*string) { + return m.name +} +// GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +// returns a *bool when successful +func (m *RunnerGroupsEnterprise) GetRestrictedToWorkflows()(*bool) { + return m.restricted_to_workflows +} +// GetRunnersUrl gets the runners_url property value. The runners_url property +// returns a *string when successful +func (m *RunnerGroupsEnterprise) GetRunnersUrl()(*string) { + return m.runners_url +} +// GetSelectedOrganizationsUrl gets the selected_organizations_url property value. The selected_organizations_url property +// returns a *string when successful +func (m *RunnerGroupsEnterprise) GetSelectedOrganizationsUrl()(*string) { + return m.selected_organizations_url +} +// GetSelectedWorkflows gets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +// returns a []string when successful +func (m *RunnerGroupsEnterprise) GetSelectedWorkflows()([]string) { + return m.selected_workflows +} +// GetVisibility gets the visibility property value. The visibility property +// returns a *string when successful +func (m *RunnerGroupsEnterprise) GetVisibility()(*string) { + return m.visibility +} +// GetWorkflowRestrictionsReadOnly gets the workflow_restrictions_read_only property value. If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. +// returns a *bool when successful +func (m *RunnerGroupsEnterprise) GetWorkflowRestrictionsReadOnly()(*bool) { + return m.workflow_restrictions_read_only +} +// Serialize serializes information the current object +func (m *RunnerGroupsEnterprise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allows_public_repositories", m.GetAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hosted_runners_url", m.GetHostedRunnersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("runners_url", m.GetRunnersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_organizations_url", m.GetSelectedOrganizationsUrl()) + if err != nil { + return err + } + } + if m.GetSelectedWorkflows() != nil { + err := writer.WriteCollectionOfStringValues("selected_workflows", m.GetSelectedWorkflows()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("workflow_restrictions_read_only", m.GetWorkflowRestrictionsReadOnly()) + 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 *RunnerGroupsEnterprise) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowsPublicRepositories sets the allows_public_repositories property value. The allows_public_repositories property +func (m *RunnerGroupsEnterprise) SetAllowsPublicRepositories(value *bool)() { + m.allows_public_repositories = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *RunnerGroupsEnterprise) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetHostedRunnersUrl sets the hosted_runners_url property value. The hosted_runners_url property +func (m *RunnerGroupsEnterprise) SetHostedRunnersUrl(value *string)() { + m.hosted_runners_url = value +} +// SetId sets the id property value. The id property +func (m *RunnerGroupsEnterprise) SetId(value *float64)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *RunnerGroupsEnterprise) SetName(value *string)() { + m.name = value +} +// SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +func (m *RunnerGroupsEnterprise) SetRestrictedToWorkflows(value *bool)() { + m.restricted_to_workflows = value +} +// SetRunnersUrl sets the runners_url property value. The runners_url property +func (m *RunnerGroupsEnterprise) SetRunnersUrl(value *string)() { + m.runners_url = value +} +// SetSelectedOrganizationsUrl sets the selected_organizations_url property value. The selected_organizations_url property +func (m *RunnerGroupsEnterprise) SetSelectedOrganizationsUrl(value *string)() { + m.selected_organizations_url = value +} +// SetSelectedWorkflows sets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +func (m *RunnerGroupsEnterprise) SetSelectedWorkflows(value []string)() { + m.selected_workflows = value +} +// SetVisibility sets the visibility property value. The visibility property +func (m *RunnerGroupsEnterprise) SetVisibility(value *string)() { + m.visibility = value +} +// SetWorkflowRestrictionsReadOnly sets the workflow_restrictions_read_only property value. If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. +func (m *RunnerGroupsEnterprise) SetWorkflowRestrictionsReadOnly(value *bool)() { + m.workflow_restrictions_read_only = value +} +type RunnerGroupsEnterpriseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsPublicRepositories()(*bool) + GetDefaultEscaped()(*bool) + GetHostedRunnersUrl()(*string) + GetId()(*float64) + GetName()(*string) + GetRestrictedToWorkflows()(*bool) + GetRunnersUrl()(*string) + GetSelectedOrganizationsUrl()(*string) + GetSelectedWorkflows()([]string) + GetVisibility()(*string) + GetWorkflowRestrictionsReadOnly()(*bool) + SetAllowsPublicRepositories(value *bool)() + SetDefaultEscaped(value *bool)() + SetHostedRunnersUrl(value *string)() + SetId(value *float64)() + SetName(value *string)() + SetRestrictedToWorkflows(value *bool)() + SetRunnersUrl(value *string)() + SetSelectedOrganizationsUrl(value *string)() + SetSelectedWorkflows(value []string)() + SetVisibility(value *string)() + SetWorkflowRestrictionsReadOnly(value *bool)() +} diff --git a/pkg/github/models/runner_groups_org.go b/pkg/github/models/runner_groups_org.go new file mode 100644 index 0000000..1d7e950 --- /dev/null +++ b/pkg/github/models/runner_groups_org.go @@ -0,0 +1,434 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RunnerGroupsOrg struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The allows_public_repositories property + allows_public_repositories *bool + // The default property + defaultEscaped *bool + // The hosted_runners_url property + hosted_runners_url *string + // The id property + id *float64 + // The inherited property + inherited *bool + // The inherited_allows_public_repositories property + inherited_allows_public_repositories *bool + // The name property + name *string + // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + restricted_to_workflows *bool + // The runners_url property + runners_url *string + // Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` + selected_repositories_url *string + // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + selected_workflows []string + // The visibility property + visibility *string + // If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + workflow_restrictions_read_only *bool +} +// NewRunnerGroupsOrg instantiates a new RunnerGroupsOrg and sets the default values. +func NewRunnerGroupsOrg()(*RunnerGroupsOrg) { + m := &RunnerGroupsOrg{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRunnerGroupsOrgFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunnerGroupsOrgFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRunnerGroupsOrg(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RunnerGroupsOrg) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowsPublicRepositories gets the allows_public_repositories property value. The allows_public_repositories property +// returns a *bool when successful +func (m *RunnerGroupsOrg) GetAllowsPublicRepositories()(*bool) { + return m.allows_public_repositories +} +// GetDefaultEscaped gets the default property value. The default property +// returns a *bool when successful +func (m *RunnerGroupsOrg) GetDefaultEscaped()(*bool) { + return m.defaultEscaped +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunnerGroupsOrg) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsPublicRepositories(val) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultEscaped(val) + } + return nil + } + res["hosted_runners_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostedRunnersUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["inherited"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInherited(val) + } + return nil + } + res["inherited_allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInheritedAllowsPublicRepositories(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["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictedToWorkflows(val) + } + return nil + } + res["runners_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnersUrl(val) + } + return nil + } + res["selected_repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelectedRepositoriesUrl(val) + } + return nil + } + res["selected_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedWorkflows(res) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["workflow_restrictions_read_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowRestrictionsReadOnly(val) + } + return nil + } + return res +} +// GetHostedRunnersUrl gets the hosted_runners_url property value. The hosted_runners_url property +// returns a *string when successful +func (m *RunnerGroupsOrg) GetHostedRunnersUrl()(*string) { + return m.hosted_runners_url +} +// GetId gets the id property value. The id property +// returns a *float64 when successful +func (m *RunnerGroupsOrg) GetId()(*float64) { + return m.id +} +// GetInherited gets the inherited property value. The inherited property +// returns a *bool when successful +func (m *RunnerGroupsOrg) GetInherited()(*bool) { + return m.inherited +} +// GetInheritedAllowsPublicRepositories gets the inherited_allows_public_repositories property value. The inherited_allows_public_repositories property +// returns a *bool when successful +func (m *RunnerGroupsOrg) GetInheritedAllowsPublicRepositories()(*bool) { + return m.inherited_allows_public_repositories +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *RunnerGroupsOrg) GetName()(*string) { + return m.name +} +// GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +// returns a *bool when successful +func (m *RunnerGroupsOrg) GetRestrictedToWorkflows()(*bool) { + return m.restricted_to_workflows +} +// GetRunnersUrl gets the runners_url property value. The runners_url property +// returns a *string when successful +func (m *RunnerGroupsOrg) GetRunnersUrl()(*string) { + return m.runners_url +} +// GetSelectedRepositoriesUrl gets the selected_repositories_url property value. Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` +// returns a *string when successful +func (m *RunnerGroupsOrg) GetSelectedRepositoriesUrl()(*string) { + return m.selected_repositories_url +} +// GetSelectedWorkflows gets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +// returns a []string when successful +func (m *RunnerGroupsOrg) GetSelectedWorkflows()([]string) { + return m.selected_workflows +} +// GetVisibility gets the visibility property value. The visibility property +// returns a *string when successful +func (m *RunnerGroupsOrg) GetVisibility()(*string) { + return m.visibility +} +// GetWorkflowRestrictionsReadOnly gets the workflow_restrictions_read_only property value. If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. +// returns a *bool when successful +func (m *RunnerGroupsOrg) GetWorkflowRestrictionsReadOnly()(*bool) { + return m.workflow_restrictions_read_only +} +// Serialize serializes information the current object +func (m *RunnerGroupsOrg) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allows_public_repositories", m.GetAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("default", m.GetDefaultEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hosted_runners_url", m.GetHostedRunnersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("inherited", m.GetInherited()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("inherited_allows_public_repositories", m.GetInheritedAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("runners_url", m.GetRunnersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("selected_repositories_url", m.GetSelectedRepositoriesUrl()) + if err != nil { + return err + } + } + if m.GetSelectedWorkflows() != nil { + err := writer.WriteCollectionOfStringValues("selected_workflows", m.GetSelectedWorkflows()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("workflow_restrictions_read_only", m.GetWorkflowRestrictionsReadOnly()) + 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 *RunnerGroupsOrg) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowsPublicRepositories sets the allows_public_repositories property value. The allows_public_repositories property +func (m *RunnerGroupsOrg) SetAllowsPublicRepositories(value *bool)() { + m.allows_public_repositories = value +} +// SetDefaultEscaped sets the default property value. The default property +func (m *RunnerGroupsOrg) SetDefaultEscaped(value *bool)() { + m.defaultEscaped = value +} +// SetHostedRunnersUrl sets the hosted_runners_url property value. The hosted_runners_url property +func (m *RunnerGroupsOrg) SetHostedRunnersUrl(value *string)() { + m.hosted_runners_url = value +} +// SetId sets the id property value. The id property +func (m *RunnerGroupsOrg) SetId(value *float64)() { + m.id = value +} +// SetInherited sets the inherited property value. The inherited property +func (m *RunnerGroupsOrg) SetInherited(value *bool)() { + m.inherited = value +} +// SetInheritedAllowsPublicRepositories sets the inherited_allows_public_repositories property value. The inherited_allows_public_repositories property +func (m *RunnerGroupsOrg) SetInheritedAllowsPublicRepositories(value *bool)() { + m.inherited_allows_public_repositories = value +} +// SetName sets the name property value. The name property +func (m *RunnerGroupsOrg) SetName(value *string)() { + m.name = value +} +// SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +func (m *RunnerGroupsOrg) SetRestrictedToWorkflows(value *bool)() { + m.restricted_to_workflows = value +} +// SetRunnersUrl sets the runners_url property value. The runners_url property +func (m *RunnerGroupsOrg) SetRunnersUrl(value *string)() { + m.runners_url = value +} +// SetSelectedRepositoriesUrl sets the selected_repositories_url property value. Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` +func (m *RunnerGroupsOrg) SetSelectedRepositoriesUrl(value *string)() { + m.selected_repositories_url = value +} +// SetSelectedWorkflows sets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +func (m *RunnerGroupsOrg) SetSelectedWorkflows(value []string)() { + m.selected_workflows = value +} +// SetVisibility sets the visibility property value. The visibility property +func (m *RunnerGroupsOrg) SetVisibility(value *string)() { + m.visibility = value +} +// SetWorkflowRestrictionsReadOnly sets the workflow_restrictions_read_only property value. If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. +func (m *RunnerGroupsOrg) SetWorkflowRestrictionsReadOnly(value *bool)() { + m.workflow_restrictions_read_only = value +} +type RunnerGroupsOrgable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsPublicRepositories()(*bool) + GetDefaultEscaped()(*bool) + GetHostedRunnersUrl()(*string) + GetId()(*float64) + GetInherited()(*bool) + GetInheritedAllowsPublicRepositories()(*bool) + GetName()(*string) + GetRestrictedToWorkflows()(*bool) + GetRunnersUrl()(*string) + GetSelectedRepositoriesUrl()(*string) + GetSelectedWorkflows()([]string) + GetVisibility()(*string) + GetWorkflowRestrictionsReadOnly()(*bool) + SetAllowsPublicRepositories(value *bool)() + SetDefaultEscaped(value *bool)() + SetHostedRunnersUrl(value *string)() + SetId(value *float64)() + SetInherited(value *bool)() + SetInheritedAllowsPublicRepositories(value *bool)() + SetName(value *string)() + SetRestrictedToWorkflows(value *bool)() + SetRunnersUrl(value *string)() + SetSelectedRepositoriesUrl(value *string)() + SetSelectedWorkflows(value []string)() + SetVisibility(value *string)() + SetWorkflowRestrictionsReadOnly(value *bool)() +} diff --git a/pkg/github/models/runner_label.go b/pkg/github/models/runner_label.go new file mode 100644 index 0000000..f26890c --- /dev/null +++ b/pkg/github/models/runner_label.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RunnerLabel a label for a self hosted runner +type RunnerLabel struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Unique identifier of the label. + id *int32 + // Name of the label. + name *string + // The type of label. Read-only labels are applied automatically when the runner is configured. + typeEscaped *RunnerLabel_type +} +// NewRunnerLabel instantiates a new RunnerLabel and sets the default values. +func NewRunnerLabel()(*RunnerLabel) { + m := &RunnerLabel{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRunnerLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRunnerLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRunnerLabel(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RunnerLabel) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RunnerLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunnerLabel_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RunnerLabel_type)) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the label. +// returns a *int32 when successful +func (m *RunnerLabel) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. Name of the label. +// returns a *string when successful +func (m *RunnerLabel) GetName()(*string) { + return m.name +} +// GetTypeEscaped gets the type property value. The type of label. Read-only labels are applied automatically when the runner is configured. +// returns a *RunnerLabel_type when successful +func (m *RunnerLabel) GetTypeEscaped()(*RunnerLabel_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RunnerLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RunnerLabel) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. Unique identifier of the label. +func (m *RunnerLabel) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. Name of the label. +func (m *RunnerLabel) SetName(value *string)() { + m.name = value +} +// SetTypeEscaped sets the type property value. The type of label. Read-only labels are applied automatically when the runner is configured. +func (m *RunnerLabel) SetTypeEscaped(value *RunnerLabel_type)() { + m.typeEscaped = value +} +type RunnerLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetName()(*string) + GetTypeEscaped()(*RunnerLabel_type) + SetId(value *int32)() + SetName(value *string)() + SetTypeEscaped(value *RunnerLabel_type)() +} diff --git a/pkg/github/models/runner_label_type.go b/pkg/github/models/runner_label_type.go new file mode 100644 index 0000000..2c93d19 --- /dev/null +++ b/pkg/github/models/runner_label_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The type of label. Read-only labels are applied automatically when the runner is configured. +type RunnerLabel_type int + +const ( + READONLY_RUNNERLABEL_TYPE RunnerLabel_type = iota + CUSTOM_RUNNERLABEL_TYPE +) + +func (i RunnerLabel_type) String() string { + return []string{"read-only", "custom"}[i] +} +func ParseRunnerLabel_type(v string) (any, error) { + result := READONLY_RUNNERLABEL_TYPE + switch v { + case "read-only": + result = READONLY_RUNNERLABEL_TYPE + case "custom": + result = CUSTOM_RUNNERLABEL_TYPE + default: + return 0, errors.New("Unknown RunnerLabel_type value: " + v) + } + return &result, nil +} +func SerializeRunnerLabel_type(values []RunnerLabel_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RunnerLabel_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/scim_enterprise_group_list.go b/pkg/github/models/scim_enterprise_group_list.go new file mode 100644 index 0000000..b1c1fab --- /dev/null +++ b/pkg/github/models/scim_enterprise_group_list.go @@ -0,0 +1,214 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimEnterpriseGroupList struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Number of objects per page + itemsPerPage *int32 + // Information about each provisioned group. + resources []ScimEnterpriseGroupResponseable + // The URIs that are used to indicate the namespaces of the list SCIM schemas. + schemas []ScimEnterpriseGroupList_schemas + // A starting index for the returned page + startIndex *int32 + // Number of results found + totalResults *int32 +} +// NewScimEnterpriseGroupList instantiates a new ScimEnterpriseGroupList and sets the default values. +func NewScimEnterpriseGroupList()(*ScimEnterpriseGroupList) { + m := &ScimEnterpriseGroupList{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimEnterpriseGroupListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimEnterpriseGroupListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimEnterpriseGroupList(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimEnterpriseGroupList) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimEnterpriseGroupList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["itemsPerPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetItemsPerPage(val) + } + return nil + } + res["Resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimEnterpriseGroupResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimEnterpriseGroupResponseable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimEnterpriseGroupResponseable) + } + } + m.SetResources(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseScimEnterpriseGroupList_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]ScimEnterpriseGroupList_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*ScimEnterpriseGroupList_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + res["startIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartIndex(val) + } + return nil + } + res["totalResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalResults(val) + } + return nil + } + return res +} +// GetItemsPerPage gets the itemsPerPage property value. Number of objects per page +// returns a *int32 when successful +func (m *ScimEnterpriseGroupList) GetItemsPerPage()(*int32) { + return m.itemsPerPage +} +// GetResources gets the Resources property value. Information about each provisioned group. +// returns a []ScimEnterpriseGroupResponseable when successful +func (m *ScimEnterpriseGroupList) GetResources()([]ScimEnterpriseGroupResponseable) { + return m.resources +} +// GetSchemas gets the schemas property value. The URIs that are used to indicate the namespaces of the list SCIM schemas. +// returns a []ScimEnterpriseGroupList_schemas when successful +func (m *ScimEnterpriseGroupList) GetSchemas()([]ScimEnterpriseGroupList_schemas) { + return m.schemas +} +// GetStartIndex gets the startIndex property value. A starting index for the returned page +// returns a *int32 when successful +func (m *ScimEnterpriseGroupList) GetStartIndex()(*int32) { + return m.startIndex +} +// GetTotalResults gets the totalResults property value. Number of results found +// returns a *int32 when successful +func (m *ScimEnterpriseGroupList) GetTotalResults()(*int32) { + return m.totalResults +} +// Serialize serializes information the current object +func (m *ScimEnterpriseGroupList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("itemsPerPage", m.GetItemsPerPage()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("Resources", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializeScimEnterpriseGroupList_schemas(m.GetSchemas())) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("startIndex", m.GetStartIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("totalResults", m.GetTotalResults()) + 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 *ScimEnterpriseGroupList) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetItemsPerPage sets the itemsPerPage property value. Number of objects per page +func (m *ScimEnterpriseGroupList) SetItemsPerPage(value *int32)() { + m.itemsPerPage = value +} +// SetResources sets the Resources property value. Information about each provisioned group. +func (m *ScimEnterpriseGroupList) SetResources(value []ScimEnterpriseGroupResponseable)() { + m.resources = value +} +// SetSchemas sets the schemas property value. The URIs that are used to indicate the namespaces of the list SCIM schemas. +func (m *ScimEnterpriseGroupList) SetSchemas(value []ScimEnterpriseGroupList_schemas)() { + m.schemas = value +} +// SetStartIndex sets the startIndex property value. A starting index for the returned page +func (m *ScimEnterpriseGroupList) SetStartIndex(value *int32)() { + m.startIndex = value +} +// SetTotalResults sets the totalResults property value. Number of results found +func (m *ScimEnterpriseGroupList) SetTotalResults(value *int32)() { + m.totalResults = value +} +type ScimEnterpriseGroupListable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemsPerPage()(*int32) + GetResources()([]ScimEnterpriseGroupResponseable) + GetSchemas()([]ScimEnterpriseGroupList_schemas) + GetStartIndex()(*int32) + GetTotalResults()(*int32) + SetItemsPerPage(value *int32)() + SetResources(value []ScimEnterpriseGroupResponseable)() + SetSchemas(value []ScimEnterpriseGroupList_schemas)() + SetStartIndex(value *int32)() + SetTotalResults(value *int32)() +} diff --git a/pkg/github/models/scim_enterprise_group_list_schemas.go b/pkg/github/models/scim_enterprise_group_list_schemas.go new file mode 100644 index 0000000..cc51aa2 --- /dev/null +++ b/pkg/github/models/scim_enterprise_group_list_schemas.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type ScimEnterpriseGroupList_schemas int + +const ( + URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_SCIMENTERPRISEGROUPLIST_SCHEMAS ScimEnterpriseGroupList_schemas = iota +) + +func (i ScimEnterpriseGroupList_schemas) String() string { + return []string{"urn:ietf:params:scim:api:messages:2.0:ListResponse"}[i] +} +func ParseScimEnterpriseGroupList_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_SCIMENTERPRISEGROUPLIST_SCHEMAS + switch v { + case "urn:ietf:params:scim:api:messages:2.0:ListResponse": + result = URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_SCIMENTERPRISEGROUPLIST_SCHEMAS + default: + return 0, errors.New("Unknown ScimEnterpriseGroupList_schemas value: " + v) + } + return &result, nil +} +func SerializeScimEnterpriseGroupList_schemas(values []ScimEnterpriseGroupList_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ScimEnterpriseGroupList_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/scim_enterprise_group_response.go b/pkg/github/models/scim_enterprise_group_response.go new file mode 100644 index 0000000..3e1b316 --- /dev/null +++ b/pkg/github/models/scim_enterprise_group_response.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimEnterpriseGroupResponse struct { + GroupResponse + // The internally generated id for the group object. + id *string + // The metadata associated with the creation/updates to the user. + meta Metaable +} +// NewScimEnterpriseGroupResponse instantiates a new ScimEnterpriseGroupResponse and sets the default values. +func NewScimEnterpriseGroupResponse()(*ScimEnterpriseGroupResponse) { + m := &ScimEnterpriseGroupResponse{ + GroupResponse: *NewGroupResponse(), + } + return m +} +// CreateScimEnterpriseGroupResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimEnterpriseGroupResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimEnterpriseGroupResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimEnterpriseGroupResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupResponse.GetFieldDeserializers() + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMetaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(Metaable)) + } + return nil + } + return res +} +// GetId gets the id property value. The internally generated id for the group object. +// returns a *string when successful +func (m *ScimEnterpriseGroupResponse) GetId()(*string) { + return m.id +} +// GetMeta gets the meta property value. The metadata associated with the creation/updates to the user. +// returns a Metaable when successful +func (m *ScimEnterpriseGroupResponse) GetMeta()(Metaable) { + return m.meta +} +// Serialize serializes information the current object +func (m *ScimEnterpriseGroupResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupResponse.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + return nil +} +// SetId sets the id property value. The internally generated id for the group object. +func (m *ScimEnterpriseGroupResponse) SetId(value *string)() { + m.id = value +} +// SetMeta sets the meta property value. The metadata associated with the creation/updates to the user. +func (m *ScimEnterpriseGroupResponse) SetMeta(value Metaable)() { + m.meta = value +} +type ScimEnterpriseGroupResponseable interface { + GroupResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetMeta()(Metaable) + SetId(value *string)() + SetMeta(value Metaable)() +} diff --git a/pkg/github/models/scim_enterprise_group_response_members.go b/pkg/github/models/scim_enterprise_group_response_members.go new file mode 100644 index 0000000..7a807c2 --- /dev/null +++ b/pkg/github/models/scim_enterprise_group_response_members.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimEnterpriseGroupResponse_members struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display property + display *string + // The Ref property + ref *string + // The value property + value *string +} +// NewScimEnterpriseGroupResponse_members instantiates a new ScimEnterpriseGroupResponse_members and sets the default values. +func NewScimEnterpriseGroupResponse_members()(*ScimEnterpriseGroupResponse_members) { + m := &ScimEnterpriseGroupResponse_members{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimEnterpriseGroupResponse_membersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimEnterpriseGroupResponse_membersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimEnterpriseGroupResponse_members(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimEnterpriseGroupResponse_members) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplay gets the display property value. The display property +// returns a *string when successful +func (m *ScimEnterpriseGroupResponse_members) GetDisplay()(*string) { + return m.display +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimEnterpriseGroupResponse_members) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplay(val) + } + return nil + } + res["$ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetRef gets the $ref property value. The Ref property +// returns a *string when successful +func (m *ScimEnterpriseGroupResponse_members) GetRef()(*string) { + return m.ref +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *ScimEnterpriseGroupResponse_members) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ScimEnterpriseGroupResponse_members) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display", m.GetDisplay()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("$ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ScimEnterpriseGroupResponse_members) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplay sets the display property value. The display property +func (m *ScimEnterpriseGroupResponse_members) SetDisplay(value *string)() { + m.display = value +} +// SetRef sets the $ref property value. The Ref property +func (m *ScimEnterpriseGroupResponse_members) SetRef(value *string)() { + m.ref = value +} +// SetValue sets the value property value. The value property +func (m *ScimEnterpriseGroupResponse_members) SetValue(value *string)() { + m.value = value +} +type ScimEnterpriseGroupResponse_membersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplay()(*string) + GetRef()(*string) + GetValue()(*string) + SetDisplay(value *string)() + SetRef(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/scim_enterprise_user_list.go b/pkg/github/models/scim_enterprise_user_list.go new file mode 100644 index 0000000..68b63ed --- /dev/null +++ b/pkg/github/models/scim_enterprise_user_list.go @@ -0,0 +1,214 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimEnterpriseUserList struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Number of objects per page + itemsPerPage *int32 + // Information about each provisioned account. + resources []ScimEnterpriseUserResponseable + // The URIs that are used to indicate the namespaces of the list SCIM schemas. + schemas []ScimEnterpriseUserList_schemas + // A starting index for the returned page + startIndex *int32 + // Number of results found + totalResults *int32 +} +// NewScimEnterpriseUserList instantiates a new ScimEnterpriseUserList and sets the default values. +func NewScimEnterpriseUserList()(*ScimEnterpriseUserList) { + m := &ScimEnterpriseUserList{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimEnterpriseUserListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimEnterpriseUserListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimEnterpriseUserList(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimEnterpriseUserList) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimEnterpriseUserList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["itemsPerPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetItemsPerPage(val) + } + return nil + } + res["Resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimEnterpriseUserResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimEnterpriseUserResponseable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimEnterpriseUserResponseable) + } + } + m.SetResources(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseScimEnterpriseUserList_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]ScimEnterpriseUserList_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*ScimEnterpriseUserList_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + res["startIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartIndex(val) + } + return nil + } + res["totalResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalResults(val) + } + return nil + } + return res +} +// GetItemsPerPage gets the itemsPerPage property value. Number of objects per page +// returns a *int32 when successful +func (m *ScimEnterpriseUserList) GetItemsPerPage()(*int32) { + return m.itemsPerPage +} +// GetResources gets the Resources property value. Information about each provisioned account. +// returns a []ScimEnterpriseUserResponseable when successful +func (m *ScimEnterpriseUserList) GetResources()([]ScimEnterpriseUserResponseable) { + return m.resources +} +// GetSchemas gets the schemas property value. The URIs that are used to indicate the namespaces of the list SCIM schemas. +// returns a []ScimEnterpriseUserList_schemas when successful +func (m *ScimEnterpriseUserList) GetSchemas()([]ScimEnterpriseUserList_schemas) { + return m.schemas +} +// GetStartIndex gets the startIndex property value. A starting index for the returned page +// returns a *int32 when successful +func (m *ScimEnterpriseUserList) GetStartIndex()(*int32) { + return m.startIndex +} +// GetTotalResults gets the totalResults property value. Number of results found +// returns a *int32 when successful +func (m *ScimEnterpriseUserList) GetTotalResults()(*int32) { + return m.totalResults +} +// Serialize serializes information the current object +func (m *ScimEnterpriseUserList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("itemsPerPage", m.GetItemsPerPage()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("Resources", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializeScimEnterpriseUserList_schemas(m.GetSchemas())) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("startIndex", m.GetStartIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("totalResults", m.GetTotalResults()) + 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 *ScimEnterpriseUserList) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetItemsPerPage sets the itemsPerPage property value. Number of objects per page +func (m *ScimEnterpriseUserList) SetItemsPerPage(value *int32)() { + m.itemsPerPage = value +} +// SetResources sets the Resources property value. Information about each provisioned account. +func (m *ScimEnterpriseUserList) SetResources(value []ScimEnterpriseUserResponseable)() { + m.resources = value +} +// SetSchemas sets the schemas property value. The URIs that are used to indicate the namespaces of the list SCIM schemas. +func (m *ScimEnterpriseUserList) SetSchemas(value []ScimEnterpriseUserList_schemas)() { + m.schemas = value +} +// SetStartIndex sets the startIndex property value. A starting index for the returned page +func (m *ScimEnterpriseUserList) SetStartIndex(value *int32)() { + m.startIndex = value +} +// SetTotalResults sets the totalResults property value. Number of results found +func (m *ScimEnterpriseUserList) SetTotalResults(value *int32)() { + m.totalResults = value +} +type ScimEnterpriseUserListable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemsPerPage()(*int32) + GetResources()([]ScimEnterpriseUserResponseable) + GetSchemas()([]ScimEnterpriseUserList_schemas) + GetStartIndex()(*int32) + GetTotalResults()(*int32) + SetItemsPerPage(value *int32)() + SetResources(value []ScimEnterpriseUserResponseable)() + SetSchemas(value []ScimEnterpriseUserList_schemas)() + SetStartIndex(value *int32)() + SetTotalResults(value *int32)() +} diff --git a/pkg/github/models/scim_enterprise_user_list_schemas.go b/pkg/github/models/scim_enterprise_user_list_schemas.go new file mode 100644 index 0000000..501c08f --- /dev/null +++ b/pkg/github/models/scim_enterprise_user_list_schemas.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type ScimEnterpriseUserList_schemas int + +const ( + URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_SCIMENTERPRISEUSERLIST_SCHEMAS ScimEnterpriseUserList_schemas = iota +) + +func (i ScimEnterpriseUserList_schemas) String() string { + return []string{"urn:ietf:params:scim:api:messages:2.0:ListResponse"}[i] +} +func ParseScimEnterpriseUserList_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_SCIMENTERPRISEUSERLIST_SCHEMAS + switch v { + case "urn:ietf:params:scim:api:messages:2.0:ListResponse": + result = URNIETFPARAMSSCIMAPIMESSAGES20LISTRESPONSE_SCIMENTERPRISEUSERLIST_SCHEMAS + default: + return 0, errors.New("Unknown ScimEnterpriseUserList_schemas value: " + v) + } + return &result, nil +} +func SerializeScimEnterpriseUserList_schemas(values []ScimEnterpriseUserList_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ScimEnterpriseUserList_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/scim_enterprise_user_response.go b/pkg/github/models/scim_enterprise_user_response.go new file mode 100644 index 0000000..bf16902 --- /dev/null +++ b/pkg/github/models/scim_enterprise_user_response.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimEnterpriseUserResponse struct { + UserResponse + // Provisioned SCIM groups that the user is a member of. + groups []ScimEnterpriseUserResponse_groupsable + // The internally generated id for the user object. + id *string + // The metadata associated with the creation/updates to the user. + meta Metaable +} +// NewScimEnterpriseUserResponse instantiates a new ScimEnterpriseUserResponse and sets the default values. +func NewScimEnterpriseUserResponse()(*ScimEnterpriseUserResponse) { + m := &ScimEnterpriseUserResponse{ + UserResponse: *NewUserResponse(), + } + return m +} +// CreateScimEnterpriseUserResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimEnterpriseUserResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimEnterpriseUserResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimEnterpriseUserResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserResponse.GetFieldDeserializers() + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimEnterpriseUserResponse_groupsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimEnterpriseUserResponse_groupsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimEnterpriseUserResponse_groupsable) + } + } + m.SetGroups(res) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMetaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(Metaable)) + } + return nil + } + return res +} +// GetGroups gets the groups property value. Provisioned SCIM groups that the user is a member of. +// returns a []ScimEnterpriseUserResponse_groupsable when successful +func (m *ScimEnterpriseUserResponse) GetGroups()([]ScimEnterpriseUserResponse_groupsable) { + return m.groups +} +// GetId gets the id property value. The internally generated id for the user object. +// returns a *string when successful +func (m *ScimEnterpriseUserResponse) GetId()(*string) { + return m.id +} +// GetMeta gets the meta property value. The metadata associated with the creation/updates to the user. +// returns a Metaable when successful +func (m *ScimEnterpriseUserResponse) GetMeta()(Metaable) { + return m.meta +} +// Serialize serializes information the current object +func (m *ScimEnterpriseUserResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + return nil +} +// SetGroups sets the groups property value. Provisioned SCIM groups that the user is a member of. +func (m *ScimEnterpriseUserResponse) SetGroups(value []ScimEnterpriseUserResponse_groupsable)() { + m.groups = value +} +// SetId sets the id property value. The internally generated id for the user object. +func (m *ScimEnterpriseUserResponse) SetId(value *string)() { + m.id = value +} +// SetMeta sets the meta property value. The metadata associated with the creation/updates to the user. +func (m *ScimEnterpriseUserResponse) SetMeta(value Metaable)() { + m.meta = value +} +type ScimEnterpriseUserResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserResponseable + GetGroups()([]ScimEnterpriseUserResponse_groupsable) + GetId()(*string) + GetMeta()(Metaable) + SetGroups(value []ScimEnterpriseUserResponse_groupsable)() + SetId(value *string)() + SetMeta(value Metaable)() +} diff --git a/pkg/github/models/scim_enterprise_user_response_groups.go b/pkg/github/models/scim_enterprise_user_response_groups.go new file mode 100644 index 0000000..2b29284 --- /dev/null +++ b/pkg/github/models/scim_enterprise_user_response_groups.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimEnterpriseUserResponse_groups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display property + display *string + // The Ref property + ref *string + // The value property + value *string +} +// NewScimEnterpriseUserResponse_groups instantiates a new ScimEnterpriseUserResponse_groups and sets the default values. +func NewScimEnterpriseUserResponse_groups()(*ScimEnterpriseUserResponse_groups) { + m := &ScimEnterpriseUserResponse_groups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimEnterpriseUserResponse_groupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimEnterpriseUserResponse_groupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimEnterpriseUserResponse_groups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimEnterpriseUserResponse_groups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplay gets the display property value. The display property +// returns a *string when successful +func (m *ScimEnterpriseUserResponse_groups) GetDisplay()(*string) { + return m.display +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimEnterpriseUserResponse_groups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplay(val) + } + return nil + } + res["$ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetRef gets the $ref property value. The Ref property +// returns a *string when successful +func (m *ScimEnterpriseUserResponse_groups) GetRef()(*string) { + return m.ref +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *ScimEnterpriseUserResponse_groups) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ScimEnterpriseUserResponse_groups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display", m.GetDisplay()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("$ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ScimEnterpriseUserResponse_groups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplay sets the display property value. The display property +func (m *ScimEnterpriseUserResponse_groups) SetDisplay(value *string)() { + m.display = value +} +// SetRef sets the $ref property value. The Ref property +func (m *ScimEnterpriseUserResponse_groups) SetRef(value *string)() { + m.ref = value +} +// SetValue sets the value property value. The value property +func (m *ScimEnterpriseUserResponse_groups) SetValue(value *string)() { + m.value = value +} +type ScimEnterpriseUserResponse_groupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplay()(*string) + GetRef()(*string) + GetValue()(*string) + SetDisplay(value *string)() + SetRef(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/scim_error.go b/pkg/github/models/scim_error.go new file mode 100644 index 0000000..81fc74d --- /dev/null +++ b/pkg/github/models/scim_error.go @@ -0,0 +1,240 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScimError scim Error +type ScimError 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 detail property + detail *string + // The documentation_url property + documentation_url *string + // The message property + message *string + // The schemas property + schemas []string + // The scimType property + scimType *string + // The status property + status *int32 +} +// NewScimError instantiates a new ScimError and sets the default values. +func NewScimError()(*ScimError) { + m := &ScimError{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimError(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ScimError) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimError) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDetail gets the detail property value. The detail property +// returns a *string when successful +func (m *ScimError) GetDetail()(*string) { + return m.detail +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ScimError) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSchemas(res) + } + return nil + } + res["scimType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScimType(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ScimError) GetMessage()(*string) { + return m.message +} +// GetSchemas gets the schemas property value. The schemas property +// returns a []string when successful +func (m *ScimError) GetSchemas()([]string) { + return m.schemas +} +// GetScimType gets the scimType property value. The scimType property +// returns a *string when successful +func (m *ScimError) GetScimType()(*string) { + return m.scimType +} +// GetStatus gets the status property value. The status property +// returns a *int32 when successful +func (m *ScimError) GetStatus()(*int32) { + return m.status +} +// Serialize serializes information the current object +func (m *ScimError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", m.GetSchemas()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("scimType", m.GetScimType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("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 *ScimError) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDetail sets the detail property value. The detail property +func (m *ScimError) SetDetail(value *string)() { + m.detail = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ScimError) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ScimError) SetMessage(value *string)() { + m.message = value +} +// SetSchemas sets the schemas property value. The schemas property +func (m *ScimError) SetSchemas(value []string)() { + m.schemas = value +} +// SetScimType sets the scimType property value. The scimType property +func (m *ScimError) SetScimType(value *string)() { + m.scimType = value +} +// SetStatus sets the status property value. The status property +func (m *ScimError) SetStatus(value *int32)() { + m.status = value +} +type ScimErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + GetSchemas()([]string) + GetScimType()(*string) + GetStatus()(*int32) + SetDetail(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() + SetSchemas(value []string)() + SetScimType(value *string)() + SetStatus(value *int32)() +} diff --git a/pkg/github/models/scim_user.go b/pkg/github/models/scim_user.go new file mode 100644 index 0000000..546234e --- /dev/null +++ b/pkg/github/models/scim_user.go @@ -0,0 +1,483 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScimUser sCIM /Users provisioning endpoints +type ScimUser struct { + // The active status of the User. + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the user, suitable for display to end-users + displayName *string + // user emails + emails []ScimUser_emailsable + // The ID of the User. + externalId *string + // associated groups + groups []ScimUser_groupsable + // Unique identifier of an external identity + id *string + // The meta property + meta ScimUser_metaable + // The name property + name ScimUser_nameable + // Set of operations to be performed + operations []ScimUser_operationsable + // The ID of the organization. + organization_id *int32 + // The roles property + roles []ScimUser_rolesable + // SCIM schema used. + schemas []string + // Configured by the admin. Could be an email, login, or username + userName *string +} +// NewScimUser instantiates a new ScimUser and sets the default values. +func NewScimUser()(*ScimUser) { + m := &ScimUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser(), nil +} +// GetActive gets the active property value. The active status of the User. +// returns a *bool when successful +func (m *ScimUser) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The name of the user, suitable for display to end-users +// returns a *string when successful +func (m *ScimUser) GetDisplayName()(*string) { + return m.displayName +} +// GetEmails gets the emails property value. user emails +// returns a []ScimUser_emailsable when successful +func (m *ScimUser) GetEmails()([]ScimUser_emailsable) { + return m.emails +} +// GetExternalId gets the externalId property value. The ID of the User. +// returns a *string when successful +func (m *ScimUser) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimUser_emailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimUser_emailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimUser_emailsable) + } + } + m.SetEmails(res) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimUser_groupsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimUser_groupsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimUser_groupsable) + } + } + m.SetGroups(res) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["meta"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateScimUser_metaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeta(val.(ScimUser_metaable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateScimUser_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetName(val.(ScimUser_nameable)) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimUser_operationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimUser_operationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimUser_operationsable) + } + } + m.SetOperations(res) + } + return nil + } + res["organization_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationId(val) + } + return nil + } + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimUser_rolesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimUser_rolesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimUser_rolesable) + } + } + m.SetRoles(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSchemas(res) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetGroups gets the groups property value. associated groups +// returns a []ScimUser_groupsable when successful +func (m *ScimUser) GetGroups()([]ScimUser_groupsable) { + return m.groups +} +// GetId gets the id property value. Unique identifier of an external identity +// returns a *string when successful +func (m *ScimUser) GetId()(*string) { + return m.id +} +// GetMeta gets the meta property value. The meta property +// returns a ScimUser_metaable when successful +func (m *ScimUser) GetMeta()(ScimUser_metaable) { + return m.meta +} +// GetName gets the name property value. The name property +// returns a ScimUser_nameable when successful +func (m *ScimUser) GetName()(ScimUser_nameable) { + return m.name +} +// GetOperations gets the operations property value. Set of operations to be performed +// returns a []ScimUser_operationsable when successful +func (m *ScimUser) GetOperations()([]ScimUser_operationsable) { + return m.operations +} +// GetOrganizationId gets the organization_id property value. The ID of the organization. +// returns a *int32 when successful +func (m *ScimUser) GetOrganizationId()(*int32) { + return m.organization_id +} +// GetRoles gets the roles property value. The roles property +// returns a []ScimUser_rolesable when successful +func (m *ScimUser) GetRoles()([]ScimUser_rolesable) { + return m.roles +} +// GetSchemas gets the schemas property value. SCIM schema used. +// returns a []string when successful +func (m *ScimUser) GetSchemas()([]string) { + return m.schemas +} +// GetUserName gets the userName property value. Configured by the admin. Could be an email, login, or username +// returns a *string when successful +func (m *ScimUser) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *ScimUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("meta", m.GetMeta()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("organization_id", m.GetOrganizationId()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoles())) + for i, v := range m.GetRoles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("roles", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", m.GetSchemas()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The active status of the User. +func (m *ScimUser) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ScimUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The name of the user, suitable for display to end-users +func (m *ScimUser) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmails sets the emails property value. user emails +func (m *ScimUser) SetEmails(value []ScimUser_emailsable)() { + m.emails = value +} +// SetExternalId sets the externalId property value. The ID of the User. +func (m *ScimUser) SetExternalId(value *string)() { + m.externalId = value +} +// SetGroups sets the groups property value. associated groups +func (m *ScimUser) SetGroups(value []ScimUser_groupsable)() { + m.groups = value +} +// SetId sets the id property value. Unique identifier of an external identity +func (m *ScimUser) SetId(value *string)() { + m.id = value +} +// SetMeta sets the meta property value. The meta property +func (m *ScimUser) SetMeta(value ScimUser_metaable)() { + m.meta = value +} +// SetName sets the name property value. The name property +func (m *ScimUser) SetName(value ScimUser_nameable)() { + m.name = value +} +// SetOperations sets the operations property value. Set of operations to be performed +func (m *ScimUser) SetOperations(value []ScimUser_operationsable)() { + m.operations = value +} +// SetOrganizationId sets the organization_id property value. The ID of the organization. +func (m *ScimUser) SetOrganizationId(value *int32)() { + m.organization_id = value +} +// SetRoles sets the roles property value. The roles property +func (m *ScimUser) SetRoles(value []ScimUser_rolesable)() { + m.roles = value +} +// SetSchemas sets the schemas property value. SCIM schema used. +func (m *ScimUser) SetSchemas(value []string)() { + m.schemas = value +} +// SetUserName sets the userName property value. Configured by the admin. Could be an email, login, or username +func (m *ScimUser) SetUserName(value *string)() { + m.userName = value +} +type ScimUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetDisplayName()(*string) + GetEmails()([]ScimUser_emailsable) + GetExternalId()(*string) + GetGroups()([]ScimUser_groupsable) + GetId()(*string) + GetMeta()(ScimUser_metaable) + GetName()(ScimUser_nameable) + GetOperations()([]ScimUser_operationsable) + GetOrganizationId()(*int32) + GetRoles()([]ScimUser_rolesable) + GetSchemas()([]string) + GetUserName()(*string) + SetActive(value *bool)() + SetDisplayName(value *string)() + SetEmails(value []ScimUser_emailsable)() + SetExternalId(value *string)() + SetGroups(value []ScimUser_groupsable)() + SetId(value *string)() + SetMeta(value ScimUser_metaable)() + SetName(value ScimUser_nameable)() + SetOperations(value []ScimUser_operationsable)() + SetOrganizationId(value *int32)() + SetRoles(value []ScimUser_rolesable)() + SetSchemas(value []string)() + SetUserName(value *string)() +} diff --git a/pkg/github/models/scim_user_emails.go b/pkg/github/models/scim_user_emails.go new file mode 100644 index 0000000..24727c4 --- /dev/null +++ b/pkg/github/models/scim_user_emails.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_emails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The primary property + primary *bool + // The type property + typeEscaped *string + // The value property + value *string +} +// NewScimUser_emails instantiates a new ScimUser_emails and sets the default values. +func NewScimUser_emails()(*ScimUser_emails) { + m := &ScimUser_emails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_emailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_emailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_emails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_emails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_emails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetPrimary gets the primary property value. The primary property +// returns a *bool when successful +func (m *ScimUser_emails) GetPrimary()(*bool) { + return m.primary +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *ScimUser_emails) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *ScimUser_emails) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ScimUser_emails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("primary", m.GetPrimary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ScimUser_emails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPrimary sets the primary property value. The primary property +func (m *ScimUser_emails) SetPrimary(value *bool)() { + m.primary = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ScimUser_emails) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The value property +func (m *ScimUser_emails) SetValue(value *string)() { + m.value = value +} +type ScimUser_emailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrimary()(*bool) + GetTypeEscaped()(*string) + GetValue()(*string) + SetPrimary(value *bool)() + SetTypeEscaped(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/scim_user_groups.go b/pkg/github/models/scim_user_groups.go new file mode 100644 index 0000000..af3b37b --- /dev/null +++ b/pkg/github/models/scim_user_groups.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_groups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display property + display *string + // The value property + value *string +} +// NewScimUser_groups instantiates a new ScimUser_groups and sets the default values. +func NewScimUser_groups()(*ScimUser_groups) { + m := &ScimUser_groups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_groupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_groupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_groups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_groups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplay gets the display property value. The display property +// returns a *string when successful +func (m *ScimUser_groups) GetDisplay()(*string) { + return m.display +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_groups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplay(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *ScimUser_groups) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ScimUser_groups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display", m.GetDisplay()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ScimUser_groups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplay sets the display property value. The display property +func (m *ScimUser_groups) SetDisplay(value *string)() { + m.display = value +} +// SetValue sets the value property value. The value property +func (m *ScimUser_groups) SetValue(value *string)() { + m.value = value +} +type ScimUser_groupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplay()(*string) + GetValue()(*string) + SetDisplay(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/scim_user_list.go b/pkg/github/models/scim_user_list.go new file mode 100644 index 0000000..81d327e --- /dev/null +++ b/pkg/github/models/scim_user_list.go @@ -0,0 +1,215 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScimUserList sCIM User List +type ScimUserList struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The itemsPerPage property + itemsPerPage *int32 + // The Resources property + resources []ScimUserable + // SCIM schema used. + schemas []string + // The startIndex property + startIndex *int32 + // The totalResults property + totalResults *int32 +} +// NewScimUserList instantiates a new ScimUserList and sets the default values. +func NewScimUserList()(*ScimUserList) { + m := &ScimUserList{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUserListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUserListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUserList(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUserList) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUserList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["itemsPerPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetItemsPerPage(val) + } + return nil + } + res["Resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScimUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScimUserable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ScimUserable) + } + } + m.SetResources(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSchemas(res) + } + return nil + } + res["startIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartIndex(val) + } + return nil + } + res["totalResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalResults(val) + } + return nil + } + return res +} +// GetItemsPerPage gets the itemsPerPage property value. The itemsPerPage property +// returns a *int32 when successful +func (m *ScimUserList) GetItemsPerPage()(*int32) { + return m.itemsPerPage +} +// GetResources gets the Resources property value. The Resources property +// returns a []ScimUserable when successful +func (m *ScimUserList) GetResources()([]ScimUserable) { + return m.resources +} +// GetSchemas gets the schemas property value. SCIM schema used. +// returns a []string when successful +func (m *ScimUserList) GetSchemas()([]string) { + return m.schemas +} +// GetStartIndex gets the startIndex property value. The startIndex property +// returns a *int32 when successful +func (m *ScimUserList) GetStartIndex()(*int32) { + return m.startIndex +} +// GetTotalResults gets the totalResults property value. The totalResults property +// returns a *int32 when successful +func (m *ScimUserList) GetTotalResults()(*int32) { + return m.totalResults +} +// Serialize serializes information the current object +func (m *ScimUserList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("itemsPerPage", m.GetItemsPerPage()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("Resources", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", m.GetSchemas()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("startIndex", m.GetStartIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("totalResults", m.GetTotalResults()) + 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 *ScimUserList) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetItemsPerPage sets the itemsPerPage property value. The itemsPerPage property +func (m *ScimUserList) SetItemsPerPage(value *int32)() { + m.itemsPerPage = value +} +// SetResources sets the Resources property value. The Resources property +func (m *ScimUserList) SetResources(value []ScimUserable)() { + m.resources = value +} +// SetSchemas sets the schemas property value. SCIM schema used. +func (m *ScimUserList) SetSchemas(value []string)() { + m.schemas = value +} +// SetStartIndex sets the startIndex property value. The startIndex property +func (m *ScimUserList) SetStartIndex(value *int32)() { + m.startIndex = value +} +// SetTotalResults sets the totalResults property value. The totalResults property +func (m *ScimUserList) SetTotalResults(value *int32)() { + m.totalResults = value +} +type ScimUserListable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemsPerPage()(*int32) + GetResources()([]ScimUserable) + GetSchemas()([]string) + GetStartIndex()(*int32) + GetTotalResults()(*int32) + SetItemsPerPage(value *int32)() + SetResources(value []ScimUserable)() + SetSchemas(value []string)() + SetStartIndex(value *int32)() + SetTotalResults(value *int32)() +} diff --git a/pkg/github/models/scim_user_meta.go b/pkg/github/models/scim_user_meta.go new file mode 100644 index 0000000..5742312 --- /dev/null +++ b/pkg/github/models/scim_user_meta.go @@ -0,0 +1,168 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_meta struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created property + created *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastModified property + lastModified *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The location property + location *string + // The resourceType property + resourceType *string +} +// NewScimUser_meta instantiates a new ScimUser_meta and sets the default values. +func NewScimUser_meta()(*ScimUser_meta) { + m := &ScimUser_meta{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_metaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_metaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_meta(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_meta) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreated gets the created property value. The created property +// returns a *Time when successful +func (m *ScimUser_meta) GetCreated()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_meta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreated(val) + } + return nil + } + res["lastModified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModified(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["resourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceType(val) + } + return nil + } + return res +} +// GetLastModified gets the lastModified property value. The lastModified property +// returns a *Time when successful +func (m *ScimUser_meta) GetLastModified()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModified +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *ScimUser_meta) GetLocation()(*string) { + return m.location +} +// GetResourceType gets the resourceType property value. The resourceType property +// returns a *string when successful +func (m *ScimUser_meta) GetResourceType()(*string) { + return m.resourceType +} +// Serialize serializes information the current object +func (m *ScimUser_meta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created", m.GetCreated()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModified", m.GetLastModified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceType", m.GetResourceType()) + 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 *ScimUser_meta) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreated sets the created property value. The created property +func (m *ScimUser_meta) SetCreated(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created = value +} +// SetLastModified sets the lastModified property value. The lastModified property +func (m *ScimUser_meta) SetLastModified(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModified = value +} +// SetLocation sets the location property value. The location property +func (m *ScimUser_meta) SetLocation(value *string)() { + m.location = value +} +// SetResourceType sets the resourceType property value. The resourceType property +func (m *ScimUser_meta) SetResourceType(value *string)() { + m.resourceType = value +} +type ScimUser_metaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreated()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModified()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocation()(*string) + GetResourceType()(*string) + SetCreated(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModified(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocation(value *string)() + SetResourceType(value *string)() +} diff --git a/pkg/github/models/scim_user_name.go b/pkg/github/models/scim_user_name.go new file mode 100644 index 0000000..2e122c4 --- /dev/null +++ b/pkg/github/models/scim_user_name.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_name struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The familyName property + familyName *string + // The formatted property + formatted *string + // The givenName property + givenName *string +} +// NewScimUser_name instantiates a new ScimUser_name and sets the default values. +func NewScimUser_name()(*ScimUser_name) { + m := &ScimUser_name{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_name(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_name) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFamilyName gets the familyName property value. The familyName property +// returns a *string when successful +func (m *ScimUser_name) GetFamilyName()(*string) { + return m.familyName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["familyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamilyName(val) + } + return nil + } + res["formatted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormatted(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + return res +} +// GetFormatted gets the formatted property value. The formatted property +// returns a *string when successful +func (m *ScimUser_name) GetFormatted()(*string) { + return m.formatted +} +// GetGivenName gets the givenName property value. The givenName property +// returns a *string when successful +func (m *ScimUser_name) GetGivenName()(*string) { + return m.givenName +} +// Serialize serializes information the current object +func (m *ScimUser_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("familyName", m.GetFamilyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formatted", m.GetFormatted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + 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 *ScimUser_name) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFamilyName sets the familyName property value. The familyName property +func (m *ScimUser_name) SetFamilyName(value *string)() { + m.familyName = value +} +// SetFormatted sets the formatted property value. The formatted property +func (m *ScimUser_name) SetFormatted(value *string)() { + m.formatted = value +} +// SetGivenName sets the givenName property value. The givenName property +func (m *ScimUser_name) SetGivenName(value *string)() { + m.givenName = value +} +type ScimUser_nameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFamilyName()(*string) + GetFormatted()(*string) + GetGivenName()(*string) + SetFamilyName(value *string)() + SetFormatted(value *string)() + SetGivenName(value *string)() +} diff --git a/pkg/github/models/scim_user_operations.go b/pkg/github/models/scim_user_operations.go new file mode 100644 index 0000000..5cf715e --- /dev/null +++ b/pkg/github/models/scim_user_operations.go @@ -0,0 +1,246 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_operations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The op property + op *ScimUser_operations_op + // The path property + path *string + // The value property + value ScimUser_operations_ScimUser_operations_valueable +} +// ScimUser_operations_ScimUser_operations_value composed type wrapper for classes ScimUser_operations_valueMember1able, ScimUser_operations_valueMember2able, string +type ScimUser_operations_ScimUser_operations_value struct { + // Composed type representation for type ScimUser_operations_valueMember1able + scimUser_operations_valueMember1 ScimUser_operations_valueMember1able + // Composed type representation for type ScimUser_operations_valueMember2able + scimUser_operations_valueMember2 ScimUser_operations_valueMember2able + // Composed type representation for type string + string *string +} +// NewScimUser_operations_ScimUser_operations_value instantiates a new ScimUser_operations_ScimUser_operations_value and sets the default values. +func NewScimUser_operations_ScimUser_operations_value()(*ScimUser_operations_ScimUser_operations_value) { + m := &ScimUser_operations_ScimUser_operations_value{ + } + return m +} +// CreateScimUser_operations_ScimUser_operations_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_operations_ScimUser_operations_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewScimUser_operations_ScimUser_operations_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_operations_ScimUser_operations_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ScimUser_operations_ScimUser_operations_value) GetIsComposedType()(bool) { + return true +} +// GetScimUserOperationsValueMember1 gets the scimUser_operations_valueMember1 property value. Composed type representation for type ScimUser_operations_valueMember1able +// returns a ScimUser_operations_valueMember1able when successful +func (m *ScimUser_operations_ScimUser_operations_value) GetScimUserOperationsValueMember1()(ScimUser_operations_valueMember1able) { + return m.scimUser_operations_valueMember1 +} +// GetScimUserOperationsValueMember2 gets the scimUser_operations_valueMember2 property value. Composed type representation for type ScimUser_operations_valueMember2able +// returns a ScimUser_operations_valueMember2able when successful +func (m *ScimUser_operations_ScimUser_operations_value) GetScimUserOperationsValueMember2()(ScimUser_operations_valueMember2able) { + return m.scimUser_operations_valueMember2 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ScimUser_operations_ScimUser_operations_value) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ScimUser_operations_ScimUser_operations_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetScimUserOperationsValueMember1() != nil { + err := writer.WriteObjectValue("", m.GetScimUserOperationsValueMember1()) + if err != nil { + return err + } + } else if m.GetScimUserOperationsValueMember2() != nil { + err := writer.WriteObjectValue("", m.GetScimUserOperationsValueMember2()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetScimUserOperationsValueMember1 sets the scimUser_operations_valueMember1 property value. Composed type representation for type ScimUser_operations_valueMember1able +func (m *ScimUser_operations_ScimUser_operations_value) SetScimUserOperationsValueMember1(value ScimUser_operations_valueMember1able)() { + m.scimUser_operations_valueMember1 = value +} +// SetScimUserOperationsValueMember2 sets the scimUser_operations_valueMember2 property value. Composed type representation for type ScimUser_operations_valueMember2able +func (m *ScimUser_operations_ScimUser_operations_value) SetScimUserOperationsValueMember2(value ScimUser_operations_valueMember2able)() { + m.scimUser_operations_valueMember2 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ScimUser_operations_ScimUser_operations_value) SetString(value *string)() { + m.string = value +} +type ScimUser_operations_ScimUser_operations_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetScimUserOperationsValueMember1()(ScimUser_operations_valueMember1able) + GetScimUserOperationsValueMember2()(ScimUser_operations_valueMember2able) + GetString()(*string) + SetScimUserOperationsValueMember1(value ScimUser_operations_valueMember1able)() + SetScimUserOperationsValueMember2(value ScimUser_operations_valueMember2able)() + SetString(value *string)() +} +// NewScimUser_operations instantiates a new ScimUser_operations and sets the default values. +func NewScimUser_operations()(*ScimUser_operations) { + m := &ScimUser_operations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_operationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_operationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_operations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_operations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_operations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["op"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScimUser_operations_op) + if err != nil { + return err + } + if val != nil { + m.SetOp(val.(*ScimUser_operations_op)) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateScimUser_operations_ScimUser_operations_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(ScimUser_operations_ScimUser_operations_valueable)) + } + return nil + } + return res +} +// GetOp gets the op property value. The op property +// returns a *ScimUser_operations_op when successful +func (m *ScimUser_operations) GetOp()(*ScimUser_operations_op) { + return m.op +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ScimUser_operations) GetPath()(*string) { + return m.path +} +// GetValue gets the value property value. The value property +// returns a ScimUser_operations_ScimUser_operations_valueable when successful +func (m *ScimUser_operations) GetValue()(ScimUser_operations_ScimUser_operations_valueable) { + return m.value +} +// Serialize serializes information the current object +func (m *ScimUser_operations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOp() != nil { + cast := (*m.GetOp()).String() + err := writer.WriteStringValue("op", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("value", m.GetValue()) + 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 *ScimUser_operations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOp sets the op property value. The op property +func (m *ScimUser_operations) SetOp(value *ScimUser_operations_op)() { + m.op = value +} +// SetPath sets the path property value. The path property +func (m *ScimUser_operations) SetPath(value *string)() { + m.path = value +} +// SetValue sets the value property value. The value property +func (m *ScimUser_operations) SetValue(value ScimUser_operations_ScimUser_operations_valueable)() { + m.value = value +} +type ScimUser_operationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOp()(*ScimUser_operations_op) + GetPath()(*string) + GetValue()(ScimUser_operations_ScimUser_operations_valueable) + SetOp(value *ScimUser_operations_op)() + SetPath(value *string)() + SetValue(value ScimUser_operations_ScimUser_operations_valueable)() +} diff --git a/pkg/github/models/scim_user_operations_op.go b/pkg/github/models/scim_user_operations_op.go new file mode 100644 index 0000000..5647de1 --- /dev/null +++ b/pkg/github/models/scim_user_operations_op.go @@ -0,0 +1,39 @@ +package models +import ( + "errors" +) +type ScimUser_operations_op int + +const ( + ADD_SCIMUSER_OPERATIONS_OP ScimUser_operations_op = iota + REMOVE_SCIMUSER_OPERATIONS_OP + REPLACE_SCIMUSER_OPERATIONS_OP +) + +func (i ScimUser_operations_op) String() string { + return []string{"add", "remove", "replace"}[i] +} +func ParseScimUser_operations_op(v string) (any, error) { + result := ADD_SCIMUSER_OPERATIONS_OP + switch v { + case "add": + result = ADD_SCIMUSER_OPERATIONS_OP + case "remove": + result = REMOVE_SCIMUSER_OPERATIONS_OP + case "replace": + result = REPLACE_SCIMUSER_OPERATIONS_OP + default: + return 0, errors.New("Unknown ScimUser_operations_op value: " + v) + } + return &result, nil +} +func SerializeScimUser_operations_op(values []ScimUser_operations_op) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ScimUser_operations_op) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/scim_user_operations_value_member1.go b/pkg/github/models/scim_user_operations_value_member1.go new file mode 100644 index 0000000..ec02e94 --- /dev/null +++ b/pkg/github/models/scim_user_operations_value_member1.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_operations_valueMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewScimUser_operations_valueMember1 instantiates a new ScimUser_operations_valueMember1 and sets the default values. +func NewScimUser_operations_valueMember1()(*ScimUser_operations_valueMember1) { + m := &ScimUser_operations_valueMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_operations_valueMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_operations_valueMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_operations_valueMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_operations_valueMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_operations_valueMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ScimUser_operations_valueMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ScimUser_operations_valueMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ScimUser_operations_valueMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/scim_user_operations_value_member2.go b/pkg/github/models/scim_user_operations_value_member2.go new file mode 100644 index 0000000..99cf6b6 --- /dev/null +++ b/pkg/github/models/scim_user_operations_value_member2.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_operations_valueMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewScimUser_operations_valueMember2 instantiates a new ScimUser_operations_valueMember2 and sets the default values. +func NewScimUser_operations_valueMember2()(*ScimUser_operations_valueMember2) { + m := &ScimUser_operations_valueMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_operations_valueMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_operations_valueMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_operations_valueMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_operations_valueMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_operations_valueMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ScimUser_operations_valueMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ScimUser_operations_valueMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ScimUser_operations_valueMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/scim_user_roles.go b/pkg/github/models/scim_user_roles.go new file mode 100644 index 0000000..099449a --- /dev/null +++ b/pkg/github/models/scim_user_roles.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ScimUser_roles struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display property + display *string + // The primary property + primary *bool + // The type property + typeEscaped *string + // The value property + value *string +} +// NewScimUser_roles instantiates a new ScimUser_roles and sets the default values. +func NewScimUser_roles()(*ScimUser_roles) { + m := &ScimUser_roles{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateScimUser_rolesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateScimUser_rolesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScimUser_roles(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ScimUser_roles) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplay gets the display property value. The display property +// returns a *string when successful +func (m *ScimUser_roles) GetDisplay()(*string) { + return m.display +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ScimUser_roles) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplay(val) + } + return nil + } + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetPrimary gets the primary property value. The primary property +// returns a *bool when successful +func (m *ScimUser_roles) GetPrimary()(*bool) { + return m.primary +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *ScimUser_roles) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *ScimUser_roles) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ScimUser_roles) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display", m.GetDisplay()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("primary", m.GetPrimary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ScimUser_roles) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplay sets the display property value. The display property +func (m *ScimUser_roles) SetDisplay(value *string)() { + m.display = value +} +// SetPrimary sets the primary property value. The primary property +func (m *ScimUser_roles) SetPrimary(value *bool)() { + m.primary = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *ScimUser_roles) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The value property +func (m *ScimUser_roles) SetValue(value *string)() { + m.value = value +} +type ScimUser_rolesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplay()(*string) + GetPrimary()(*bool) + GetTypeEscaped()(*string) + GetValue()(*string) + SetDisplay(value *string)() + SetPrimary(value *bool)() + SetTypeEscaped(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/secret_scanning_alert.go b/pkg/github/models/secret_scanning_alert.go new file mode 100644 index 0000000..1ccbed9 --- /dev/null +++ b/pkg/github/models/secret_scanning_alert.go @@ -0,0 +1,547 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningAlert struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The GitHub URL of the alert resource. + html_url *string + // The REST API URL of the code locations for this alert. + locations_url *string + // The security alert number. + number *int32 + // Whether push protection was bypassed for the detected secret. + push_protection_bypassed *bool + // The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + push_protection_bypassed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + push_protection_bypassed_by NullableSimpleUserable + // **Required when the `state` is `resolved`.** The reason for resolving the alert. + resolution *SecretScanningAlertResolution + // An optional comment to resolve an alert. + resolution_comment *string + // The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + resolved_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + resolved_by NullableSimpleUserable + // The secret that was detected. + secret *string + // The type of secret that secret scanning detected. + secret_type *string + // User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + secret_type_display_name *string + // Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + state *SecretScanningAlertState + // The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The REST API URL of the alert resource. + url *string + // The token status as of the latest validity check. + validity *SecretScanningAlert_validity +} +// NewSecretScanningAlert instantiates a new SecretScanningAlert and sets the default values. +func NewSecretScanningAlert()(*SecretScanningAlert) { + m := &SecretScanningAlert{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningAlert(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningAlert) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *SecretScanningAlert) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["locations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationsUrl(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["push_protection_bypassed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassed(val) + } + return nil + } + res["push_protection_bypassed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassedAt(val) + } + return nil + } + res["push_protection_bypassed_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningAlertResolution) + if err != nil { + return err + } + if val != nil { + m.SetResolution(val.(*SecretScanningAlertResolution)) + } + return nil + } + res["resolution_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResolutionComment(val) + } + return nil + } + res["resolved_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetResolvedAt(val) + } + return nil + } + res["resolved_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResolvedBy(val.(NullableSimpleUserable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["secret_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretType(val) + } + return nil + } + res["secret_type_display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretTypeDisplayName(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*SecretScanningAlertState)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["validity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningAlert_validity) + if err != nil { + return err + } + if val != nil { + m.SetValidity(val.(*SecretScanningAlert_validity)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The GitHub URL of the alert resource. +// returns a *string when successful +func (m *SecretScanningAlert) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLocationsUrl gets the locations_url property value. The REST API URL of the code locations for this alert. +// returns a *string when successful +func (m *SecretScanningAlert) GetLocationsUrl()(*string) { + return m.locations_url +} +// GetNumber gets the number property value. The security alert number. +// returns a *int32 when successful +func (m *SecretScanningAlert) GetNumber()(*int32) { + return m.number +} +// GetPushProtectionBypassed gets the push_protection_bypassed property value. Whether push protection was bypassed for the detected secret. +// returns a *bool when successful +func (m *SecretScanningAlert) GetPushProtectionBypassed()(*bool) { + return m.push_protection_bypassed +} +// GetPushProtectionBypassedAt gets the push_protection_bypassed_at property value. The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *SecretScanningAlert) GetPushProtectionBypassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.push_protection_bypassed_at +} +// GetPushProtectionBypassedBy gets the push_protection_bypassed_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *SecretScanningAlert) GetPushProtectionBypassedBy()(NullableSimpleUserable) { + return m.push_protection_bypassed_by +} +// GetResolution gets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. +// returns a *SecretScanningAlertResolution when successful +func (m *SecretScanningAlert) GetResolution()(*SecretScanningAlertResolution) { + return m.resolution +} +// GetResolutionComment gets the resolution_comment property value. An optional comment to resolve an alert. +// returns a *string when successful +func (m *SecretScanningAlert) GetResolutionComment()(*string) { + return m.resolution_comment +} +// GetResolvedAt gets the resolved_at property value. The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *SecretScanningAlert) GetResolvedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.resolved_at +} +// GetResolvedBy gets the resolved_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *SecretScanningAlert) GetResolvedBy()(NullableSimpleUserable) { + return m.resolved_by +} +// GetSecret gets the secret property value. The secret that was detected. +// returns a *string when successful +func (m *SecretScanningAlert) GetSecret()(*string) { + return m.secret +} +// GetSecretType gets the secret_type property value. The type of secret that secret scanning detected. +// returns a *string when successful +func (m *SecretScanningAlert) GetSecretType()(*string) { + return m.secret_type +} +// GetSecretTypeDisplayName gets the secret_type_display_name property value. User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." +// returns a *string when successful +func (m *SecretScanningAlert) GetSecretTypeDisplayName()(*string) { + return m.secret_type_display_name +} +// GetState gets the state property value. Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +// returns a *SecretScanningAlertState when successful +func (m *SecretScanningAlert) GetState()(*SecretScanningAlertState) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *SecretScanningAlert) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The REST API URL of the alert resource. +// returns a *string when successful +func (m *SecretScanningAlert) GetUrl()(*string) { + return m.url +} +// GetValidity gets the validity property value. The token status as of the latest validity check. +// returns a *SecretScanningAlert_validity when successful +func (m *SecretScanningAlert) GetValidity()(*SecretScanningAlert_validity) { + return m.validity +} +// Serialize serializes information the current object +func (m *SecretScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("locations_url", m.GetLocationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push_protection_bypassed", m.GetPushProtectionBypassed()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("push_protection_bypassed_at", m.GetPushProtectionBypassedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("push_protection_bypassed_by", m.GetPushProtectionBypassedBy()) + if err != nil { + return err + } + } + if m.GetResolution() != nil { + cast := (*m.GetResolution()).String() + err := writer.WriteStringValue("resolution", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resolution_comment", m.GetResolutionComment()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("resolved_at", m.GetResolvedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("resolved_by", m.GetResolvedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_type", m.GetSecretType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_type_display_name", m.GetSecretTypeDisplayName()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetValidity() != nil { + cast := (*m.GetValidity()).String() + err := writer.WriteStringValue("validity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningAlert) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *SecretScanningAlert) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The GitHub URL of the alert resource. +func (m *SecretScanningAlert) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLocationsUrl sets the locations_url property value. The REST API URL of the code locations for this alert. +func (m *SecretScanningAlert) SetLocationsUrl(value *string)() { + m.locations_url = value +} +// SetNumber sets the number property value. The security alert number. +func (m *SecretScanningAlert) SetNumber(value *int32)() { + m.number = value +} +// SetPushProtectionBypassed sets the push_protection_bypassed property value. Whether push protection was bypassed for the detected secret. +func (m *SecretScanningAlert) SetPushProtectionBypassed(value *bool)() { + m.push_protection_bypassed = value +} +// SetPushProtectionBypassedAt sets the push_protection_bypassed_at property value. The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *SecretScanningAlert) SetPushProtectionBypassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.push_protection_bypassed_at = value +} +// SetPushProtectionBypassedBy sets the push_protection_bypassed_by property value. A GitHub user. +func (m *SecretScanningAlert) SetPushProtectionBypassedBy(value NullableSimpleUserable)() { + m.push_protection_bypassed_by = value +} +// SetResolution sets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. +func (m *SecretScanningAlert) SetResolution(value *SecretScanningAlertResolution)() { + m.resolution = value +} +// SetResolutionComment sets the resolution_comment property value. An optional comment to resolve an alert. +func (m *SecretScanningAlert) SetResolutionComment(value *string)() { + m.resolution_comment = value +} +// SetResolvedAt sets the resolved_at property value. The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *SecretScanningAlert) SetResolvedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.resolved_at = value +} +// SetResolvedBy sets the resolved_by property value. A GitHub user. +func (m *SecretScanningAlert) SetResolvedBy(value NullableSimpleUserable)() { + m.resolved_by = value +} +// SetSecret sets the secret property value. The secret that was detected. +func (m *SecretScanningAlert) SetSecret(value *string)() { + m.secret = value +} +// SetSecretType sets the secret_type property value. The type of secret that secret scanning detected. +func (m *SecretScanningAlert) SetSecretType(value *string)() { + m.secret_type = value +} +// SetSecretTypeDisplayName sets the secret_type_display_name property value. User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." +func (m *SecretScanningAlert) SetSecretTypeDisplayName(value *string)() { + m.secret_type_display_name = value +} +// SetState sets the state property value. Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +func (m *SecretScanningAlert) SetState(value *SecretScanningAlertState)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *SecretScanningAlert) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The REST API URL of the alert resource. +func (m *SecretScanningAlert) SetUrl(value *string)() { + m.url = value +} +// SetValidity sets the validity property value. The token status as of the latest validity check. +func (m *SecretScanningAlert) SetValidity(value *SecretScanningAlert_validity)() { + m.validity = value +} +type SecretScanningAlertable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetLocationsUrl()(*string) + GetNumber()(*int32) + GetPushProtectionBypassed()(*bool) + GetPushProtectionBypassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPushProtectionBypassedBy()(NullableSimpleUserable) + GetResolution()(*SecretScanningAlertResolution) + GetResolutionComment()(*string) + GetResolvedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResolvedBy()(NullableSimpleUserable) + GetSecret()(*string) + GetSecretType()(*string) + GetSecretTypeDisplayName()(*string) + GetState()(*SecretScanningAlertState) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetValidity()(*SecretScanningAlert_validity) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetLocationsUrl(value *string)() + SetNumber(value *int32)() + SetPushProtectionBypassed(value *bool)() + SetPushProtectionBypassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPushProtectionBypassedBy(value NullableSimpleUserable)() + SetResolution(value *SecretScanningAlertResolution)() + SetResolutionComment(value *string)() + SetResolvedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResolvedBy(value NullableSimpleUserable)() + SetSecret(value *string)() + SetSecretType(value *string)() + SetSecretTypeDisplayName(value *string)() + SetState(value *SecretScanningAlertState)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetValidity(value *SecretScanningAlert_validity)() +} diff --git a/pkg/github/models/secret_scanning_alert503_error.go b/pkg/github/models/secret_scanning_alert503_error.go new file mode 100644 index 0000000..5eb9722 --- /dev/null +++ b/pkg/github/models/secret_scanning_alert503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningAlert503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewSecretScanningAlert503Error instantiates a new SecretScanningAlert503Error and sets the default values. +func NewSecretScanningAlert503Error()(*SecretScanningAlert503Error) { + m := &SecretScanningAlert503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningAlert503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningAlert503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningAlert503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *SecretScanningAlert503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningAlert503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *SecretScanningAlert503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *SecretScanningAlert503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningAlert503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *SecretScanningAlert503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *SecretScanningAlert503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningAlert503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *SecretScanningAlert503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *SecretScanningAlert503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *SecretScanningAlert503Error) SetMessage(value *string)() { + m.message = value +} +type SecretScanningAlert503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/secret_scanning_alert_resolution.go b/pkg/github/models/secret_scanning_alert_resolution.go new file mode 100644 index 0000000..f6f615b --- /dev/null +++ b/pkg/github/models/secret_scanning_alert_resolution.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// **Required when the `state` is `resolved`.** The reason for resolving the alert. +type SecretScanningAlertResolution int + +const ( + FALSE_POSITIVE_SECRETSCANNINGALERTRESOLUTION SecretScanningAlertResolution = iota + WONT_FIX_SECRETSCANNINGALERTRESOLUTION + REVOKED_SECRETSCANNINGALERTRESOLUTION + USED_IN_TESTS_SECRETSCANNINGALERTRESOLUTION +) + +func (i SecretScanningAlertResolution) String() string { + return []string{"false_positive", "wont_fix", "revoked", "used_in_tests"}[i] +} +func ParseSecretScanningAlertResolution(v string) (any, error) { + result := FALSE_POSITIVE_SECRETSCANNINGALERTRESOLUTION + switch v { + case "false_positive": + result = FALSE_POSITIVE_SECRETSCANNINGALERTRESOLUTION + case "wont_fix": + result = WONT_FIX_SECRETSCANNINGALERTRESOLUTION + case "revoked": + result = REVOKED_SECRETSCANNINGALERTRESOLUTION + case "used_in_tests": + result = USED_IN_TESTS_SECRETSCANNINGALERTRESOLUTION + default: + return 0, errors.New("Unknown SecretScanningAlertResolution value: " + v) + } + return &result, nil +} +func SerializeSecretScanningAlertResolution(values []SecretScanningAlertResolution) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecretScanningAlertResolution) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/secret_scanning_alert_state.go b/pkg/github/models/secret_scanning_alert_state.go new file mode 100644 index 0000000..647a089 --- /dev/null +++ b/pkg/github/models/secret_scanning_alert_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +type SecretScanningAlertState int + +const ( + OPEN_SECRETSCANNINGALERTSTATE SecretScanningAlertState = iota + RESOLVED_SECRETSCANNINGALERTSTATE +) + +func (i SecretScanningAlertState) String() string { + return []string{"open", "resolved"}[i] +} +func ParseSecretScanningAlertState(v string) (any, error) { + result := OPEN_SECRETSCANNINGALERTSTATE + switch v { + case "open": + result = OPEN_SECRETSCANNINGALERTSTATE + case "resolved": + result = RESOLVED_SECRETSCANNINGALERTSTATE + default: + return 0, errors.New("Unknown SecretScanningAlertState value: " + v) + } + return &result, nil +} +func SerializeSecretScanningAlertState(values []SecretScanningAlertState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecretScanningAlertState) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/secret_scanning_alert_validity.go b/pkg/github/models/secret_scanning_alert_validity.go new file mode 100644 index 0000000..d7cd111 --- /dev/null +++ b/pkg/github/models/secret_scanning_alert_validity.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The token status as of the latest validity check. +type SecretScanningAlert_validity int + +const ( + ACTIVE_SECRETSCANNINGALERT_VALIDITY SecretScanningAlert_validity = iota + INACTIVE_SECRETSCANNINGALERT_VALIDITY + UNKNOWN_SECRETSCANNINGALERT_VALIDITY +) + +func (i SecretScanningAlert_validity) String() string { + return []string{"active", "inactive", "unknown"}[i] +} +func ParseSecretScanningAlert_validity(v string) (any, error) { + result := ACTIVE_SECRETSCANNINGALERT_VALIDITY + switch v { + case "active": + result = ACTIVE_SECRETSCANNINGALERT_VALIDITY + case "inactive": + result = INACTIVE_SECRETSCANNINGALERT_VALIDITY + case "unknown": + result = UNKNOWN_SECRETSCANNINGALERT_VALIDITY + default: + return 0, errors.New("Unknown SecretScanningAlert_validity value: " + v) + } + return &result, nil +} +func SerializeSecretScanningAlert_validity(values []SecretScanningAlert_validity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecretScanningAlert_validity) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/secret_scanning_location.go b/pkg/github/models/secret_scanning_location.go new file mode 100644 index 0000000..bc5f454 --- /dev/null +++ b/pkg/github/models/secret_scanning_location.go @@ -0,0 +1,391 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningLocation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The details property + details SecretScanningLocation_SecretScanningLocation_detailsable + // The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. + typeEscaped *SecretScanningLocation_type +} +// SecretScanningLocation_SecretScanningLocation_details composed type wrapper for classes SecretScanningLocationCommitable, SecretScanningLocationDiscussionBodyable, SecretScanningLocationDiscussionCommentable, SecretScanningLocationDiscussionTitleable, SecretScanningLocationIssueBodyable, SecretScanningLocationIssueCommentable, SecretScanningLocationIssueTitleable, SecretScanningLocationPullRequestBodyable, SecretScanningLocationPullRequestCommentable, SecretScanningLocationPullRequestReviewable, SecretScanningLocationPullRequestReviewCommentable, SecretScanningLocationPullRequestTitleable, SecretScanningLocationWikiCommitable +type SecretScanningLocation_SecretScanningLocation_details struct { + // Composed type representation for type SecretScanningLocationCommitable + secretScanningLocationCommit SecretScanningLocationCommitable + // Composed type representation for type SecretScanningLocationDiscussionBodyable + secretScanningLocationDiscussionBody SecretScanningLocationDiscussionBodyable + // Composed type representation for type SecretScanningLocationDiscussionCommentable + secretScanningLocationDiscussionComment SecretScanningLocationDiscussionCommentable + // Composed type representation for type SecretScanningLocationDiscussionTitleable + secretScanningLocationDiscussionTitle SecretScanningLocationDiscussionTitleable + // Composed type representation for type SecretScanningLocationIssueBodyable + secretScanningLocationIssueBody SecretScanningLocationIssueBodyable + // Composed type representation for type SecretScanningLocationIssueCommentable + secretScanningLocationIssueComment SecretScanningLocationIssueCommentable + // Composed type representation for type SecretScanningLocationIssueTitleable + secretScanningLocationIssueTitle SecretScanningLocationIssueTitleable + // Composed type representation for type SecretScanningLocationPullRequestBodyable + secretScanningLocationPullRequestBody SecretScanningLocationPullRequestBodyable + // Composed type representation for type SecretScanningLocationPullRequestCommentable + secretScanningLocationPullRequestComment SecretScanningLocationPullRequestCommentable + // Composed type representation for type SecretScanningLocationPullRequestReviewable + secretScanningLocationPullRequestReview SecretScanningLocationPullRequestReviewable + // Composed type representation for type SecretScanningLocationPullRequestReviewCommentable + secretScanningLocationPullRequestReviewComment SecretScanningLocationPullRequestReviewCommentable + // Composed type representation for type SecretScanningLocationPullRequestTitleable + secretScanningLocationPullRequestTitle SecretScanningLocationPullRequestTitleable + // Composed type representation for type SecretScanningLocationWikiCommitable + secretScanningLocationWikiCommit SecretScanningLocationWikiCommitable +} +// NewSecretScanningLocation_SecretScanningLocation_details instantiates a new SecretScanningLocation_SecretScanningLocation_details and sets the default values. +func NewSecretScanningLocation_SecretScanningLocation_details()(*SecretScanningLocation_SecretScanningLocation_details) { + m := &SecretScanningLocation_SecretScanningLocation_details{ + } + return m +} +// CreateSecretScanningLocation_SecretScanningLocation_detailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocation_SecretScanningLocation_detailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewSecretScanningLocation_SecretScanningLocation_details() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetIsComposedType()(bool) { + return true +} +// GetSecretScanningLocationCommit gets the secretScanningLocationCommit property value. Composed type representation for type SecretScanningLocationCommitable +// returns a SecretScanningLocationCommitable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationCommit()(SecretScanningLocationCommitable) { + return m.secretScanningLocationCommit +} +// GetSecretScanningLocationDiscussionBody gets the secretScanningLocationDiscussionBody property value. Composed type representation for type SecretScanningLocationDiscussionBodyable +// returns a SecretScanningLocationDiscussionBodyable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationDiscussionBody()(SecretScanningLocationDiscussionBodyable) { + return m.secretScanningLocationDiscussionBody +} +// GetSecretScanningLocationDiscussionComment gets the secretScanningLocationDiscussionComment property value. Composed type representation for type SecretScanningLocationDiscussionCommentable +// returns a SecretScanningLocationDiscussionCommentable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationDiscussionComment()(SecretScanningLocationDiscussionCommentable) { + return m.secretScanningLocationDiscussionComment +} +// GetSecretScanningLocationDiscussionTitle gets the secretScanningLocationDiscussionTitle property value. Composed type representation for type SecretScanningLocationDiscussionTitleable +// returns a SecretScanningLocationDiscussionTitleable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationDiscussionTitle()(SecretScanningLocationDiscussionTitleable) { + return m.secretScanningLocationDiscussionTitle +} +// GetSecretScanningLocationIssueBody gets the secretScanningLocationIssueBody property value. Composed type representation for type SecretScanningLocationIssueBodyable +// returns a SecretScanningLocationIssueBodyable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationIssueBody()(SecretScanningLocationIssueBodyable) { + return m.secretScanningLocationIssueBody +} +// GetSecretScanningLocationIssueComment gets the secretScanningLocationIssueComment property value. Composed type representation for type SecretScanningLocationIssueCommentable +// returns a SecretScanningLocationIssueCommentable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationIssueComment()(SecretScanningLocationIssueCommentable) { + return m.secretScanningLocationIssueComment +} +// GetSecretScanningLocationIssueTitle gets the secretScanningLocationIssueTitle property value. Composed type representation for type SecretScanningLocationIssueTitleable +// returns a SecretScanningLocationIssueTitleable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationIssueTitle()(SecretScanningLocationIssueTitleable) { + return m.secretScanningLocationIssueTitle +} +// GetSecretScanningLocationPullRequestBody gets the secretScanningLocationPullRequestBody property value. Composed type representation for type SecretScanningLocationPullRequestBodyable +// returns a SecretScanningLocationPullRequestBodyable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestBody()(SecretScanningLocationPullRequestBodyable) { + return m.secretScanningLocationPullRequestBody +} +// GetSecretScanningLocationPullRequestComment gets the secretScanningLocationPullRequestComment property value. Composed type representation for type SecretScanningLocationPullRequestCommentable +// returns a SecretScanningLocationPullRequestCommentable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestComment()(SecretScanningLocationPullRequestCommentable) { + return m.secretScanningLocationPullRequestComment +} +// GetSecretScanningLocationPullRequestReview gets the secretScanningLocationPullRequestReview property value. Composed type representation for type SecretScanningLocationPullRequestReviewable +// returns a SecretScanningLocationPullRequestReviewable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestReview()(SecretScanningLocationPullRequestReviewable) { + return m.secretScanningLocationPullRequestReview +} +// GetSecretScanningLocationPullRequestReviewComment gets the secretScanningLocationPullRequestReviewComment property value. Composed type representation for type SecretScanningLocationPullRequestReviewCommentable +// returns a SecretScanningLocationPullRequestReviewCommentable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestReviewComment()(SecretScanningLocationPullRequestReviewCommentable) { + return m.secretScanningLocationPullRequestReviewComment +} +// GetSecretScanningLocationPullRequestTitle gets the secretScanningLocationPullRequestTitle property value. Composed type representation for type SecretScanningLocationPullRequestTitleable +// returns a SecretScanningLocationPullRequestTitleable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestTitle()(SecretScanningLocationPullRequestTitleable) { + return m.secretScanningLocationPullRequestTitle +} +// GetSecretScanningLocationWikiCommit gets the secretScanningLocationWikiCommit property value. Composed type representation for type SecretScanningLocationWikiCommitable +// returns a SecretScanningLocationWikiCommitable when successful +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationWikiCommit()(SecretScanningLocationWikiCommitable) { + return m.secretScanningLocationWikiCommit +} +// Serialize serializes information the current object +func (m *SecretScanningLocation_SecretScanningLocation_details) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecretScanningLocationCommit() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationCommit()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationDiscussionBody() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationDiscussionBody()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationDiscussionComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationDiscussionComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationDiscussionTitle() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationDiscussionTitle()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationIssueBody() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationIssueBody()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationIssueComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationIssueComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationIssueTitle() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationIssueTitle()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestBody() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestBody()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestReview() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestReview()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestReviewComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestReviewComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestTitle() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestTitle()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationWikiCommit() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationWikiCommit()) + if err != nil { + return err + } + } + return nil +} +// SetSecretScanningLocationCommit sets the secretScanningLocationCommit property value. Composed type representation for type SecretScanningLocationCommitable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationCommit(value SecretScanningLocationCommitable)() { + m.secretScanningLocationCommit = value +} +// SetSecretScanningLocationDiscussionBody sets the secretScanningLocationDiscussionBody property value. Composed type representation for type SecretScanningLocationDiscussionBodyable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationDiscussionBody(value SecretScanningLocationDiscussionBodyable)() { + m.secretScanningLocationDiscussionBody = value +} +// SetSecretScanningLocationDiscussionComment sets the secretScanningLocationDiscussionComment property value. Composed type representation for type SecretScanningLocationDiscussionCommentable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationDiscussionComment(value SecretScanningLocationDiscussionCommentable)() { + m.secretScanningLocationDiscussionComment = value +} +// SetSecretScanningLocationDiscussionTitle sets the secretScanningLocationDiscussionTitle property value. Composed type representation for type SecretScanningLocationDiscussionTitleable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationDiscussionTitle(value SecretScanningLocationDiscussionTitleable)() { + m.secretScanningLocationDiscussionTitle = value +} +// SetSecretScanningLocationIssueBody sets the secretScanningLocationIssueBody property value. Composed type representation for type SecretScanningLocationIssueBodyable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationIssueBody(value SecretScanningLocationIssueBodyable)() { + m.secretScanningLocationIssueBody = value +} +// SetSecretScanningLocationIssueComment sets the secretScanningLocationIssueComment property value. Composed type representation for type SecretScanningLocationIssueCommentable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationIssueComment(value SecretScanningLocationIssueCommentable)() { + m.secretScanningLocationIssueComment = value +} +// SetSecretScanningLocationIssueTitle sets the secretScanningLocationIssueTitle property value. Composed type representation for type SecretScanningLocationIssueTitleable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationIssueTitle(value SecretScanningLocationIssueTitleable)() { + m.secretScanningLocationIssueTitle = value +} +// SetSecretScanningLocationPullRequestBody sets the secretScanningLocationPullRequestBody property value. Composed type representation for type SecretScanningLocationPullRequestBodyable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestBody(value SecretScanningLocationPullRequestBodyable)() { + m.secretScanningLocationPullRequestBody = value +} +// SetSecretScanningLocationPullRequestComment sets the secretScanningLocationPullRequestComment property value. Composed type representation for type SecretScanningLocationPullRequestCommentable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestComment(value SecretScanningLocationPullRequestCommentable)() { + m.secretScanningLocationPullRequestComment = value +} +// SetSecretScanningLocationPullRequestReview sets the secretScanningLocationPullRequestReview property value. Composed type representation for type SecretScanningLocationPullRequestReviewable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestReview(value SecretScanningLocationPullRequestReviewable)() { + m.secretScanningLocationPullRequestReview = value +} +// SetSecretScanningLocationPullRequestReviewComment sets the secretScanningLocationPullRequestReviewComment property value. Composed type representation for type SecretScanningLocationPullRequestReviewCommentable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestReviewComment(value SecretScanningLocationPullRequestReviewCommentable)() { + m.secretScanningLocationPullRequestReviewComment = value +} +// SetSecretScanningLocationPullRequestTitle sets the secretScanningLocationPullRequestTitle property value. Composed type representation for type SecretScanningLocationPullRequestTitleable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestTitle(value SecretScanningLocationPullRequestTitleable)() { + m.secretScanningLocationPullRequestTitle = value +} +// SetSecretScanningLocationWikiCommit sets the secretScanningLocationWikiCommit property value. Composed type representation for type SecretScanningLocationWikiCommitable +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationWikiCommit(value SecretScanningLocationWikiCommitable)() { + m.secretScanningLocationWikiCommit = value +} +type SecretScanningLocation_SecretScanningLocation_detailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecretScanningLocationCommit()(SecretScanningLocationCommitable) + GetSecretScanningLocationDiscussionBody()(SecretScanningLocationDiscussionBodyable) + GetSecretScanningLocationDiscussionComment()(SecretScanningLocationDiscussionCommentable) + GetSecretScanningLocationDiscussionTitle()(SecretScanningLocationDiscussionTitleable) + GetSecretScanningLocationIssueBody()(SecretScanningLocationIssueBodyable) + GetSecretScanningLocationIssueComment()(SecretScanningLocationIssueCommentable) + GetSecretScanningLocationIssueTitle()(SecretScanningLocationIssueTitleable) + GetSecretScanningLocationPullRequestBody()(SecretScanningLocationPullRequestBodyable) + GetSecretScanningLocationPullRequestComment()(SecretScanningLocationPullRequestCommentable) + GetSecretScanningLocationPullRequestReview()(SecretScanningLocationPullRequestReviewable) + GetSecretScanningLocationPullRequestReviewComment()(SecretScanningLocationPullRequestReviewCommentable) + GetSecretScanningLocationPullRequestTitle()(SecretScanningLocationPullRequestTitleable) + GetSecretScanningLocationWikiCommit()(SecretScanningLocationWikiCommitable) + SetSecretScanningLocationCommit(value SecretScanningLocationCommitable)() + SetSecretScanningLocationDiscussionBody(value SecretScanningLocationDiscussionBodyable)() + SetSecretScanningLocationDiscussionComment(value SecretScanningLocationDiscussionCommentable)() + SetSecretScanningLocationDiscussionTitle(value SecretScanningLocationDiscussionTitleable)() + SetSecretScanningLocationIssueBody(value SecretScanningLocationIssueBodyable)() + SetSecretScanningLocationIssueComment(value SecretScanningLocationIssueCommentable)() + SetSecretScanningLocationIssueTitle(value SecretScanningLocationIssueTitleable)() + SetSecretScanningLocationPullRequestBody(value SecretScanningLocationPullRequestBodyable)() + SetSecretScanningLocationPullRequestComment(value SecretScanningLocationPullRequestCommentable)() + SetSecretScanningLocationPullRequestReview(value SecretScanningLocationPullRequestReviewable)() + SetSecretScanningLocationPullRequestReviewComment(value SecretScanningLocationPullRequestReviewCommentable)() + SetSecretScanningLocationPullRequestTitle(value SecretScanningLocationPullRequestTitleable)() + SetSecretScanningLocationWikiCommit(value SecretScanningLocationWikiCommitable)() +} +// NewSecretScanningLocation instantiates a new SecretScanningLocation and sets the default values. +func NewSecretScanningLocation()(*SecretScanningLocation) { + m := &SecretScanningLocation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDetails gets the details property value. The details property +// returns a SecretScanningLocation_SecretScanningLocation_detailsable when successful +func (m *SecretScanningLocation) GetDetails()(SecretScanningLocation_SecretScanningLocation_detailsable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecretScanningLocation_SecretScanningLocation_detailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(SecretScanningLocation_SecretScanningLocation_detailsable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningLocation_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SecretScanningLocation_type)) + } + return nil + } + return res +} +// GetTypeEscaped gets the type property value. The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. +// returns a *SecretScanningLocation_type when successful +func (m *SecretScanningLocation) GetTypeEscaped()(*SecretScanningLocation_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *SecretScanningLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDetails sets the details property value. The details property +func (m *SecretScanningLocation) SetDetails(value SecretScanningLocation_SecretScanningLocation_detailsable)() { + m.details = value +} +// SetTypeEscaped sets the type property value. The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. +func (m *SecretScanningLocation) SetTypeEscaped(value *SecretScanningLocation_type)() { + m.typeEscaped = value +} +type SecretScanningLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetails()(SecretScanningLocation_SecretScanningLocation_detailsable) + GetTypeEscaped()(*SecretScanningLocation_type) + SetDetails(value SecretScanningLocation_SecretScanningLocation_detailsable)() + SetTypeEscaped(value *SecretScanningLocation_type)() +} diff --git a/pkg/github/models/secret_scanning_location_commit.go b/pkg/github/models/secret_scanning_location_commit.go new file mode 100644 index 0000000..0b0cc7b --- /dev/null +++ b/pkg/github/models/secret_scanning_location_commit.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationCommit represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. +type SecretScanningLocationCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // SHA-1 hash ID of the associated blob + blob_sha *string + // The API URL to get the associated blob resource + blob_url *string + // SHA-1 hash ID of the associated commit + commit_sha *string + // The API URL to get the associated commit resource + commit_url *string + // The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII + end_column *float64 + // Line number at which the secret ends in the file + end_line *float64 + // The file path in the repository + path *string + // The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII + start_column *float64 + // Line number at which the secret starts in the file + start_line *float64 +} +// NewSecretScanningLocationCommit instantiates a new SecretScanningLocationCommit and sets the default values. +func NewSecretScanningLocationCommit()(*SecretScanningLocationCommit) { + m := &SecretScanningLocationCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBlobSha gets the blob_sha property value. SHA-1 hash ID of the associated blob +// returns a *string when successful +func (m *SecretScanningLocationCommit) GetBlobSha()(*string) { + return m.blob_sha +} +// GetBlobUrl gets the blob_url property value. The API URL to get the associated blob resource +// returns a *string when successful +func (m *SecretScanningLocationCommit) GetBlobUrl()(*string) { + return m.blob_url +} +// GetCommitSha gets the commit_sha property value. SHA-1 hash ID of the associated commit +// returns a *string when successful +func (m *SecretScanningLocationCommit) GetCommitSha()(*string) { + return m.commit_sha +} +// GetCommitUrl gets the commit_url property value. The API URL to get the associated commit resource +// returns a *string when successful +func (m *SecretScanningLocationCommit) GetCommitUrl()(*string) { + return m.commit_url +} +// GetEndColumn gets the end_column property value. The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII +// returns a *float64 when successful +func (m *SecretScanningLocationCommit) GetEndColumn()(*float64) { + return m.end_column +} +// GetEndLine gets the end_line property value. Line number at which the secret ends in the file +// returns a *float64 when successful +func (m *SecretScanningLocationCommit) GetEndLine()(*float64) { + return m.end_line +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["blob_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobSha(val) + } + return nil + } + res["blob_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobUrl(val) + } + return nil + } + res["commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitSha(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["end_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetEndColumn(val) + } + return nil + } + res["end_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetEndLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["start_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetStartColumn(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The file path in the repository +// returns a *string when successful +func (m *SecretScanningLocationCommit) GetPath()(*string) { + return m.path +} +// GetStartColumn gets the start_column property value. The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII +// returns a *float64 when successful +func (m *SecretScanningLocationCommit) GetStartColumn()(*float64) { + return m.start_column +} +// GetStartLine gets the start_line property value. Line number at which the secret starts in the file +// returns a *float64 when successful +func (m *SecretScanningLocationCommit) GetStartLine()(*float64) { + return m.start_line +} +// Serialize serializes information the current object +func (m *SecretScanningLocationCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("blob_sha", m.GetBlobSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blob_url", m.GetBlobUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_sha", m.GetCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("end_column", m.GetEndColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("end_line", m.GetEndLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("start_column", m.GetStartColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("start_line", m.GetStartLine()) + 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 *SecretScanningLocationCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBlobSha sets the blob_sha property value. SHA-1 hash ID of the associated blob +func (m *SecretScanningLocationCommit) SetBlobSha(value *string)() { + m.blob_sha = value +} +// SetBlobUrl sets the blob_url property value. The API URL to get the associated blob resource +func (m *SecretScanningLocationCommit) SetBlobUrl(value *string)() { + m.blob_url = value +} +// SetCommitSha sets the commit_sha property value. SHA-1 hash ID of the associated commit +func (m *SecretScanningLocationCommit) SetCommitSha(value *string)() { + m.commit_sha = value +} +// SetCommitUrl sets the commit_url property value. The API URL to get the associated commit resource +func (m *SecretScanningLocationCommit) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetEndColumn sets the end_column property value. The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII +func (m *SecretScanningLocationCommit) SetEndColumn(value *float64)() { + m.end_column = value +} +// SetEndLine sets the end_line property value. Line number at which the secret ends in the file +func (m *SecretScanningLocationCommit) SetEndLine(value *float64)() { + m.end_line = value +} +// SetPath sets the path property value. The file path in the repository +func (m *SecretScanningLocationCommit) SetPath(value *string)() { + m.path = value +} +// SetStartColumn sets the start_column property value. The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII +func (m *SecretScanningLocationCommit) SetStartColumn(value *float64)() { + m.start_column = value +} +// SetStartLine sets the start_line property value. Line number at which the secret starts in the file +func (m *SecretScanningLocationCommit) SetStartLine(value *float64)() { + m.start_line = value +} +type SecretScanningLocationCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlobSha()(*string) + GetBlobUrl()(*string) + GetCommitSha()(*string) + GetCommitUrl()(*string) + GetEndColumn()(*float64) + GetEndLine()(*float64) + GetPath()(*string) + GetStartColumn()(*float64) + GetStartLine()(*float64) + SetBlobSha(value *string)() + SetBlobUrl(value *string)() + SetCommitSha(value *string)() + SetCommitUrl(value *string)() + SetEndColumn(value *float64)() + SetEndLine(value *float64)() + SetPath(value *string)() + SetStartColumn(value *float64)() + SetStartLine(value *float64)() +} diff --git a/pkg/github/models/secret_scanning_location_discussion_body.go b/pkg/github/models/secret_scanning_location_discussion_body.go new file mode 100644 index 0000000..66ddae5 --- /dev/null +++ b/pkg/github/models/secret_scanning_location_discussion_body.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationDiscussionBody represents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion. +type SecretScanningLocationDiscussionBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The URL to the discussion where the secret was detected. + discussion_body_url *string +} +// NewSecretScanningLocationDiscussionBody instantiates a new SecretScanningLocationDiscussionBody and sets the default values. +func NewSecretScanningLocationDiscussionBody()(*SecretScanningLocationDiscussionBody) { + m := &SecretScanningLocationDiscussionBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationDiscussionBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationDiscussionBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationDiscussionBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationDiscussionBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiscussionBodyUrl gets the discussion_body_url property value. The URL to the discussion where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationDiscussionBody) GetDiscussionBodyUrl()(*string) { + return m.discussion_body_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationDiscussionBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["discussion_body_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionBodyUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecretScanningLocationDiscussionBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("discussion_body_url", m.GetDiscussionBodyUrl()) + 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 *SecretScanningLocationDiscussionBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiscussionBodyUrl sets the discussion_body_url property value. The URL to the discussion where the secret was detected. +func (m *SecretScanningLocationDiscussionBody) SetDiscussionBodyUrl(value *string)() { + m.discussion_body_url = value +} +type SecretScanningLocationDiscussionBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscussionBodyUrl()(*string) + SetDiscussionBodyUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_discussion_comment.go b/pkg/github/models/secret_scanning_location_discussion_comment.go new file mode 100644 index 0000000..cfe8f97 --- /dev/null +++ b/pkg/github/models/secret_scanning_location_discussion_comment.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationDiscussionComment represents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion. +type SecretScanningLocationDiscussionComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the discussion comment where the secret was detected. + discussion_comment_url *string +} +// NewSecretScanningLocationDiscussionComment instantiates a new SecretScanningLocationDiscussionComment and sets the default values. +func NewSecretScanningLocationDiscussionComment()(*SecretScanningLocationDiscussionComment) { + m := &SecretScanningLocationDiscussionComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationDiscussionCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationDiscussionCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationDiscussionComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationDiscussionComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiscussionCommentUrl gets the discussion_comment_url property value. The API URL to get the discussion comment where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationDiscussionComment) GetDiscussionCommentUrl()(*string) { + return m.discussion_comment_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationDiscussionComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["discussion_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionCommentUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecretScanningLocationDiscussionComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("discussion_comment_url", m.GetDiscussionCommentUrl()) + 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 *SecretScanningLocationDiscussionComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiscussionCommentUrl sets the discussion_comment_url property value. The API URL to get the discussion comment where the secret was detected. +func (m *SecretScanningLocationDiscussionComment) SetDiscussionCommentUrl(value *string)() { + m.discussion_comment_url = value +} +type SecretScanningLocationDiscussionCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscussionCommentUrl()(*string) + SetDiscussionCommentUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_discussion_title.go b/pkg/github/models/secret_scanning_location_discussion_title.go new file mode 100644 index 0000000..cd63d06 --- /dev/null +++ b/pkg/github/models/secret_scanning_location_discussion_title.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationDiscussionTitle represents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion. +type SecretScanningLocationDiscussionTitle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The URL to the discussion where the secret was detected. + discussion_title_url *string +} +// NewSecretScanningLocationDiscussionTitle instantiates a new SecretScanningLocationDiscussionTitle and sets the default values. +func NewSecretScanningLocationDiscussionTitle()(*SecretScanningLocationDiscussionTitle) { + m := &SecretScanningLocationDiscussionTitle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationDiscussionTitleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationDiscussionTitleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationDiscussionTitle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationDiscussionTitle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiscussionTitleUrl gets the discussion_title_url property value. The URL to the discussion where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationDiscussionTitle) GetDiscussionTitleUrl()(*string) { + return m.discussion_title_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationDiscussionTitle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["discussion_title_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionTitleUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecretScanningLocationDiscussionTitle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("discussion_title_url", m.GetDiscussionTitleUrl()) + 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 *SecretScanningLocationDiscussionTitle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiscussionTitleUrl sets the discussion_title_url property value. The URL to the discussion where the secret was detected. +func (m *SecretScanningLocationDiscussionTitle) SetDiscussionTitleUrl(value *string)() { + m.discussion_title_url = value +} +type SecretScanningLocationDiscussionTitleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscussionTitleUrl()(*string) + SetDiscussionTitleUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_issue_body.go b/pkg/github/models/secret_scanning_location_issue_body.go new file mode 100644 index 0000000..7998752 --- /dev/null +++ b/pkg/github/models/secret_scanning_location_issue_body.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationIssueBody represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. +type SecretScanningLocationIssueBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the issue where the secret was detected. + issue_body_url *string +} +// NewSecretScanningLocationIssueBody instantiates a new SecretScanningLocationIssueBody and sets the default values. +func NewSecretScanningLocationIssueBody()(*SecretScanningLocationIssueBody) { + m := &SecretScanningLocationIssueBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationIssueBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationIssueBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationIssueBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationIssueBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationIssueBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["issue_body_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueBodyUrl(val) + } + return nil + } + return res +} +// GetIssueBodyUrl gets the issue_body_url property value. The API URL to get the issue where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationIssueBody) GetIssueBodyUrl()(*string) { + return m.issue_body_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationIssueBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("issue_body_url", m.GetIssueBodyUrl()) + 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 *SecretScanningLocationIssueBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIssueBodyUrl sets the issue_body_url property value. The API URL to get the issue where the secret was detected. +func (m *SecretScanningLocationIssueBody) SetIssueBodyUrl(value *string)() { + m.issue_body_url = value +} +type SecretScanningLocationIssueBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssueBodyUrl()(*string) + SetIssueBodyUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_issue_comment.go b/pkg/github/models/secret_scanning_location_issue_comment.go new file mode 100644 index 0000000..5d4c73e --- /dev/null +++ b/pkg/github/models/secret_scanning_location_issue_comment.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationIssueComment represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. +type SecretScanningLocationIssueComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the issue comment where the secret was detected. + issue_comment_url *string +} +// NewSecretScanningLocationIssueComment instantiates a new SecretScanningLocationIssueComment and sets the default values. +func NewSecretScanningLocationIssueComment()(*SecretScanningLocationIssueComment) { + m := &SecretScanningLocationIssueComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationIssueCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationIssueCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationIssueComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationIssueComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationIssueComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + return res +} +// GetIssueCommentUrl gets the issue_comment_url property value. The API URL to get the issue comment where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationIssueComment) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationIssueComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + 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 *SecretScanningLocationIssueComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The API URL to get the issue comment where the secret was detected. +func (m *SecretScanningLocationIssueComment) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +type SecretScanningLocationIssueCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssueCommentUrl()(*string) + SetIssueCommentUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_issue_title.go b/pkg/github/models/secret_scanning_location_issue_title.go new file mode 100644 index 0000000..a0eef7c --- /dev/null +++ b/pkg/github/models/secret_scanning_location_issue_title.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationIssueTitle represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. +type SecretScanningLocationIssueTitle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the issue where the secret was detected. + issue_title_url *string +} +// NewSecretScanningLocationIssueTitle instantiates a new SecretScanningLocationIssueTitle and sets the default values. +func NewSecretScanningLocationIssueTitle()(*SecretScanningLocationIssueTitle) { + m := &SecretScanningLocationIssueTitle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationIssueTitleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationIssueTitleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationIssueTitle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationIssueTitle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationIssueTitle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["issue_title_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueTitleUrl(val) + } + return nil + } + return res +} +// GetIssueTitleUrl gets the issue_title_url property value. The API URL to get the issue where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationIssueTitle) GetIssueTitleUrl()(*string) { + return m.issue_title_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationIssueTitle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("issue_title_url", m.GetIssueTitleUrl()) + 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 *SecretScanningLocationIssueTitle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIssueTitleUrl sets the issue_title_url property value. The API URL to get the issue where the secret was detected. +func (m *SecretScanningLocationIssueTitle) SetIssueTitleUrl(value *string)() { + m.issue_title_url = value +} +type SecretScanningLocationIssueTitleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssueTitleUrl()(*string) + SetIssueTitleUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_pull_request_body.go b/pkg/github/models/secret_scanning_location_pull_request_body.go new file mode 100644 index 0000000..3ca6cfe --- /dev/null +++ b/pkg/github/models/secret_scanning_location_pull_request_body.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestBody represents a 'pull_request_body' secret scanning location type. This location type shows that a secret was detected in the body of a pull request. +type SecretScanningLocationPullRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request where the secret was detected. + pull_request_body_url *string +} +// NewSecretScanningLocationPullRequestBody instantiates a new SecretScanningLocationPullRequestBody and sets the default values. +func NewSecretScanningLocationPullRequestBody()(*SecretScanningLocationPullRequestBody) { + m := &SecretScanningLocationPullRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationPullRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationPullRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationPullRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_body_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestBodyUrl(val) + } + return nil + } + return res +} +// GetPullRequestBodyUrl gets the pull_request_body_url property value. The API URL to get the pull request where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationPullRequestBody) GetPullRequestBodyUrl()(*string) { + return m.pull_request_body_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_body_url", m.GetPullRequestBodyUrl()) + 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 *SecretScanningLocationPullRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestBodyUrl sets the pull_request_body_url property value. The API URL to get the pull request where the secret was detected. +func (m *SecretScanningLocationPullRequestBody) SetPullRequestBodyUrl(value *string)() { + m.pull_request_body_url = value +} +type SecretScanningLocationPullRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestBodyUrl()(*string) + SetPullRequestBodyUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_pull_request_comment.go b/pkg/github/models/secret_scanning_location_pull_request_comment.go new file mode 100644 index 0000000..a11440a --- /dev/null +++ b/pkg/github/models/secret_scanning_location_pull_request_comment.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestComment represents a 'pull_request_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a pull request. +type SecretScanningLocationPullRequestComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request comment where the secret was detected. + pull_request_comment_url *string +} +// NewSecretScanningLocationPullRequestComment instantiates a new SecretScanningLocationPullRequestComment and sets the default values. +func NewSecretScanningLocationPullRequestComment()(*SecretScanningLocationPullRequestComment) { + m := &SecretScanningLocationPullRequestComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationPullRequestCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationPullRequestComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationPullRequestComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestCommentUrl(val) + } + return nil + } + return res +} +// GetPullRequestCommentUrl gets the pull_request_comment_url property value. The API URL to get the pull request comment where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationPullRequestComment) GetPullRequestCommentUrl()(*string) { + return m.pull_request_comment_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_comment_url", m.GetPullRequestCommentUrl()) + 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 *SecretScanningLocationPullRequestComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestCommentUrl sets the pull_request_comment_url property value. The API URL to get the pull request comment where the secret was detected. +func (m *SecretScanningLocationPullRequestComment) SetPullRequestCommentUrl(value *string)() { + m.pull_request_comment_url = value +} +type SecretScanningLocationPullRequestCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestCommentUrl()(*string) + SetPullRequestCommentUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_pull_request_review.go b/pkg/github/models/secret_scanning_location_pull_request_review.go new file mode 100644 index 0000000..89d6389 --- /dev/null +++ b/pkg/github/models/secret_scanning_location_pull_request_review.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestReview represents a 'pull_request_review' secret scanning location type. This location type shows that a secret was detected in a review on a pull request. +type SecretScanningLocationPullRequestReview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request review where the secret was detected. + pull_request_review_url *string +} +// NewSecretScanningLocationPullRequestReview instantiates a new SecretScanningLocationPullRequestReview and sets the default values. +func NewSecretScanningLocationPullRequestReview()(*SecretScanningLocationPullRequestReview) { + m := &SecretScanningLocationPullRequestReview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationPullRequestReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestReview(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationPullRequestReview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationPullRequestReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_review_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestReviewUrl(val) + } + return nil + } + return res +} +// GetPullRequestReviewUrl gets the pull_request_review_url property value. The API URL to get the pull request review where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationPullRequestReview) GetPullRequestReviewUrl()(*string) { + return m.pull_request_review_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_review_url", m.GetPullRequestReviewUrl()) + 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 *SecretScanningLocationPullRequestReview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestReviewUrl sets the pull_request_review_url property value. The API URL to get the pull request review where the secret was detected. +func (m *SecretScanningLocationPullRequestReview) SetPullRequestReviewUrl(value *string)() { + m.pull_request_review_url = value +} +type SecretScanningLocationPullRequestReviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestReviewUrl()(*string) + SetPullRequestReviewUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_pull_request_review_comment.go b/pkg/github/models/secret_scanning_location_pull_request_review_comment.go new file mode 100644 index 0000000..8a11d0d --- /dev/null +++ b/pkg/github/models/secret_scanning_location_pull_request_review_comment.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestReviewComment represents a 'pull_request_review_comment' secret scanning location type. This location type shows that a secret was detected in a review comment on a pull request. +type SecretScanningLocationPullRequestReviewComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request review comment where the secret was detected. + pull_request_review_comment_url *string +} +// NewSecretScanningLocationPullRequestReviewComment instantiates a new SecretScanningLocationPullRequestReviewComment and sets the default values. +func NewSecretScanningLocationPullRequestReviewComment()(*SecretScanningLocationPullRequestReviewComment) { + m := &SecretScanningLocationPullRequestReviewComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestReviewCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationPullRequestReviewCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestReviewComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationPullRequestReviewComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationPullRequestReviewComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_review_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestReviewCommentUrl(val) + } + return nil + } + return res +} +// GetPullRequestReviewCommentUrl gets the pull_request_review_comment_url property value. The API URL to get the pull request review comment where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationPullRequestReviewComment) GetPullRequestReviewCommentUrl()(*string) { + return m.pull_request_review_comment_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestReviewComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_review_comment_url", m.GetPullRequestReviewCommentUrl()) + 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 *SecretScanningLocationPullRequestReviewComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestReviewCommentUrl sets the pull_request_review_comment_url property value. The API URL to get the pull request review comment where the secret was detected. +func (m *SecretScanningLocationPullRequestReviewComment) SetPullRequestReviewCommentUrl(value *string)() { + m.pull_request_review_comment_url = value +} +type SecretScanningLocationPullRequestReviewCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestReviewCommentUrl()(*string) + SetPullRequestReviewCommentUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_pull_request_title.go b/pkg/github/models/secret_scanning_location_pull_request_title.go new file mode 100644 index 0000000..e5c8d82 --- /dev/null +++ b/pkg/github/models/secret_scanning_location_pull_request_title.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestTitle represents a 'pull_request_title' secret scanning location type. This location type shows that a secret was detected in the title of a pull request. +type SecretScanningLocationPullRequestTitle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request where the secret was detected. + pull_request_title_url *string +} +// NewSecretScanningLocationPullRequestTitle instantiates a new SecretScanningLocationPullRequestTitle and sets the default values. +func NewSecretScanningLocationPullRequestTitle()(*SecretScanningLocationPullRequestTitle) { + m := &SecretScanningLocationPullRequestTitle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestTitleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationPullRequestTitleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestTitle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationPullRequestTitle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationPullRequestTitle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_title_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestTitleUrl(val) + } + return nil + } + return res +} +// GetPullRequestTitleUrl gets the pull_request_title_url property value. The API URL to get the pull request where the secret was detected. +// returns a *string when successful +func (m *SecretScanningLocationPullRequestTitle) GetPullRequestTitleUrl()(*string) { + return m.pull_request_title_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestTitle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_title_url", m.GetPullRequestTitleUrl()) + 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 *SecretScanningLocationPullRequestTitle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestTitleUrl sets the pull_request_title_url property value. The API URL to get the pull request where the secret was detected. +func (m *SecretScanningLocationPullRequestTitle) SetPullRequestTitleUrl(value *string)() { + m.pull_request_title_url = value +} +type SecretScanningLocationPullRequestTitleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestTitleUrl()(*string) + SetPullRequestTitleUrl(value *string)() +} diff --git a/pkg/github/models/secret_scanning_location_type.go b/pkg/github/models/secret_scanning_location_type.go new file mode 100644 index 0000000..f5ba61c --- /dev/null +++ b/pkg/github/models/secret_scanning_location_type.go @@ -0,0 +1,70 @@ +package models +import ( + "errors" +) +// The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. +type SecretScanningLocation_type int + +const ( + COMMIT_SECRETSCANNINGLOCATION_TYPE SecretScanningLocation_type = iota + WIKI_COMMIT_SECRETSCANNINGLOCATION_TYPE + ISSUE_TITLE_SECRETSCANNINGLOCATION_TYPE + ISSUE_BODY_SECRETSCANNINGLOCATION_TYPE + ISSUE_COMMENT_SECRETSCANNINGLOCATION_TYPE + DISCUSSION_TITLE_SECRETSCANNINGLOCATION_TYPE + DISCUSSION_BODY_SECRETSCANNINGLOCATION_TYPE + DISCUSSION_COMMENT_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_TITLE_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_BODY_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_COMMENT_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_REVIEW_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_REVIEW_COMMENT_SECRETSCANNINGLOCATION_TYPE +) + +func (i SecretScanningLocation_type) String() string { + return []string{"commit", "wiki_commit", "issue_title", "issue_body", "issue_comment", "discussion_title", "discussion_body", "discussion_comment", "pull_request_title", "pull_request_body", "pull_request_comment", "pull_request_review", "pull_request_review_comment"}[i] +} +func ParseSecretScanningLocation_type(v string) (any, error) { + result := COMMIT_SECRETSCANNINGLOCATION_TYPE + switch v { + case "commit": + result = COMMIT_SECRETSCANNINGLOCATION_TYPE + case "wiki_commit": + result = WIKI_COMMIT_SECRETSCANNINGLOCATION_TYPE + case "issue_title": + result = ISSUE_TITLE_SECRETSCANNINGLOCATION_TYPE + case "issue_body": + result = ISSUE_BODY_SECRETSCANNINGLOCATION_TYPE + case "issue_comment": + result = ISSUE_COMMENT_SECRETSCANNINGLOCATION_TYPE + case "discussion_title": + result = DISCUSSION_TITLE_SECRETSCANNINGLOCATION_TYPE + case "discussion_body": + result = DISCUSSION_BODY_SECRETSCANNINGLOCATION_TYPE + case "discussion_comment": + result = DISCUSSION_COMMENT_SECRETSCANNINGLOCATION_TYPE + case "pull_request_title": + result = PULL_REQUEST_TITLE_SECRETSCANNINGLOCATION_TYPE + case "pull_request_body": + result = PULL_REQUEST_BODY_SECRETSCANNINGLOCATION_TYPE + case "pull_request_comment": + result = PULL_REQUEST_COMMENT_SECRETSCANNINGLOCATION_TYPE + case "pull_request_review": + result = PULL_REQUEST_REVIEW_SECRETSCANNINGLOCATION_TYPE + case "pull_request_review_comment": + result = PULL_REQUEST_REVIEW_COMMENT_SECRETSCANNINGLOCATION_TYPE + default: + return 0, errors.New("Unknown SecretScanningLocation_type value: " + v) + } + return &result, nil +} +func SerializeSecretScanningLocation_type(values []SecretScanningLocation_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecretScanningLocation_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/secret_scanning_location_wiki_commit.go b/pkg/github/models/secret_scanning_location_wiki_commit.go new file mode 100644 index 0000000..14032fb --- /dev/null +++ b/pkg/github/models/secret_scanning_location_wiki_commit.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationWikiCommit represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki. +type SecretScanningLocationWikiCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // SHA-1 hash ID of the associated blob + blob_sha *string + // SHA-1 hash ID of the associated commit + commit_sha *string + // The GitHub URL to get the associated wiki commit + commit_url *string + // The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII. + end_column *float64 + // Line number at which the secret ends in the file + end_line *float64 + // The GitHub URL to get the associated wiki page + page_url *string + // The file path of the wiki page + path *string + // The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII. + start_column *float64 + // Line number at which the secret starts in the file + start_line *float64 +} +// NewSecretScanningLocationWikiCommit instantiates a new SecretScanningLocationWikiCommit and sets the default values. +func NewSecretScanningLocationWikiCommit()(*SecretScanningLocationWikiCommit) { + m := &SecretScanningLocationWikiCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationWikiCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningLocationWikiCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationWikiCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningLocationWikiCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBlobSha gets the blob_sha property value. SHA-1 hash ID of the associated blob +// returns a *string when successful +func (m *SecretScanningLocationWikiCommit) GetBlobSha()(*string) { + return m.blob_sha +} +// GetCommitSha gets the commit_sha property value. SHA-1 hash ID of the associated commit +// returns a *string when successful +func (m *SecretScanningLocationWikiCommit) GetCommitSha()(*string) { + return m.commit_sha +} +// GetCommitUrl gets the commit_url property value. The GitHub URL to get the associated wiki commit +// returns a *string when successful +func (m *SecretScanningLocationWikiCommit) GetCommitUrl()(*string) { + return m.commit_url +} +// GetEndColumn gets the end_column property value. The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII. +// returns a *float64 when successful +func (m *SecretScanningLocationWikiCommit) GetEndColumn()(*float64) { + return m.end_column +} +// GetEndLine gets the end_line property value. Line number at which the secret ends in the file +// returns a *float64 when successful +func (m *SecretScanningLocationWikiCommit) GetEndLine()(*float64) { + return m.end_line +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningLocationWikiCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["blob_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobSha(val) + } + return nil + } + res["commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitSha(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["end_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetEndColumn(val) + } + return nil + } + res["end_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetEndLine(val) + } + return nil + } + res["page_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPageUrl(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["start_column"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetStartColumn(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + return res +} +// GetPageUrl gets the page_url property value. The GitHub URL to get the associated wiki page +// returns a *string when successful +func (m *SecretScanningLocationWikiCommit) GetPageUrl()(*string) { + return m.page_url +} +// GetPath gets the path property value. The file path of the wiki page +// returns a *string when successful +func (m *SecretScanningLocationWikiCommit) GetPath()(*string) { + return m.path +} +// GetStartColumn gets the start_column property value. The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII. +// returns a *float64 when successful +func (m *SecretScanningLocationWikiCommit) GetStartColumn()(*float64) { + return m.start_column +} +// GetStartLine gets the start_line property value. Line number at which the secret starts in the file +// returns a *float64 when successful +func (m *SecretScanningLocationWikiCommit) GetStartLine()(*float64) { + return m.start_line +} +// Serialize serializes information the current object +func (m *SecretScanningLocationWikiCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("blob_sha", m.GetBlobSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_sha", m.GetCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("end_column", m.GetEndColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("end_line", m.GetEndLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("page_url", m.GetPageUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("start_column", m.GetStartColumn()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("start_line", m.GetStartLine()) + 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 *SecretScanningLocationWikiCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBlobSha sets the blob_sha property value. SHA-1 hash ID of the associated blob +func (m *SecretScanningLocationWikiCommit) SetBlobSha(value *string)() { + m.blob_sha = value +} +// SetCommitSha sets the commit_sha property value. SHA-1 hash ID of the associated commit +func (m *SecretScanningLocationWikiCommit) SetCommitSha(value *string)() { + m.commit_sha = value +} +// SetCommitUrl sets the commit_url property value. The GitHub URL to get the associated wiki commit +func (m *SecretScanningLocationWikiCommit) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetEndColumn sets the end_column property value. The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII. +func (m *SecretScanningLocationWikiCommit) SetEndColumn(value *float64)() { + m.end_column = value +} +// SetEndLine sets the end_line property value. Line number at which the secret ends in the file +func (m *SecretScanningLocationWikiCommit) SetEndLine(value *float64)() { + m.end_line = value +} +// SetPageUrl sets the page_url property value. The GitHub URL to get the associated wiki page +func (m *SecretScanningLocationWikiCommit) SetPageUrl(value *string)() { + m.page_url = value +} +// SetPath sets the path property value. The file path of the wiki page +func (m *SecretScanningLocationWikiCommit) SetPath(value *string)() { + m.path = value +} +// SetStartColumn sets the start_column property value. The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII. +func (m *SecretScanningLocationWikiCommit) SetStartColumn(value *float64)() { + m.start_column = value +} +// SetStartLine sets the start_line property value. Line number at which the secret starts in the file +func (m *SecretScanningLocationWikiCommit) SetStartLine(value *float64)() { + m.start_line = value +} +type SecretScanningLocationWikiCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlobSha()(*string) + GetCommitSha()(*string) + GetCommitUrl()(*string) + GetEndColumn()(*float64) + GetEndLine()(*float64) + GetPageUrl()(*string) + GetPath()(*string) + GetStartColumn()(*float64) + GetStartLine()(*float64) + SetBlobSha(value *string)() + SetCommitSha(value *string)() + SetCommitUrl(value *string)() + SetEndColumn(value *float64)() + SetEndLine(value *float64)() + SetPageUrl(value *string)() + SetPath(value *string)() + SetStartColumn(value *float64)() + SetStartLine(value *float64)() +} diff --git a/pkg/github/models/security_advisory_credit_types.go b/pkg/github/models/security_advisory_credit_types.go new file mode 100644 index 0000000..fca2756 --- /dev/null +++ b/pkg/github/models/security_advisory_credit_types.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// The type of credit the user is receiving. +type SecurityAdvisoryCreditTypes int + +const ( + ANALYST_SECURITYADVISORYCREDITTYPES SecurityAdvisoryCreditTypes = iota + FINDER_SECURITYADVISORYCREDITTYPES + REPORTER_SECURITYADVISORYCREDITTYPES + COORDINATOR_SECURITYADVISORYCREDITTYPES + REMEDIATION_DEVELOPER_SECURITYADVISORYCREDITTYPES + REMEDIATION_REVIEWER_SECURITYADVISORYCREDITTYPES + REMEDIATION_VERIFIER_SECURITYADVISORYCREDITTYPES + TOOL_SECURITYADVISORYCREDITTYPES + SPONSOR_SECURITYADVISORYCREDITTYPES + OTHER_SECURITYADVISORYCREDITTYPES +) + +func (i SecurityAdvisoryCreditTypes) String() string { + return []string{"analyst", "finder", "reporter", "coordinator", "remediation_developer", "remediation_reviewer", "remediation_verifier", "tool", "sponsor", "other"}[i] +} +func ParseSecurityAdvisoryCreditTypes(v string) (any, error) { + result := ANALYST_SECURITYADVISORYCREDITTYPES + switch v { + case "analyst": + result = ANALYST_SECURITYADVISORYCREDITTYPES + case "finder": + result = FINDER_SECURITYADVISORYCREDITTYPES + case "reporter": + result = REPORTER_SECURITYADVISORYCREDITTYPES + case "coordinator": + result = COORDINATOR_SECURITYADVISORYCREDITTYPES + case "remediation_developer": + result = REMEDIATION_DEVELOPER_SECURITYADVISORYCREDITTYPES + case "remediation_reviewer": + result = REMEDIATION_REVIEWER_SECURITYADVISORYCREDITTYPES + case "remediation_verifier": + result = REMEDIATION_VERIFIER_SECURITYADVISORYCREDITTYPES + case "tool": + result = TOOL_SECURITYADVISORYCREDITTYPES + case "sponsor": + result = SPONSOR_SECURITYADVISORYCREDITTYPES + case "other": + result = OTHER_SECURITYADVISORYCREDITTYPES + default: + return 0, errors.New("Unknown SecurityAdvisoryCreditTypes value: " + v) + } + return &result, nil +} +func SerializeSecurityAdvisoryCreditTypes(values []SecurityAdvisoryCreditTypes) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAdvisoryCreditTypes) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/security_advisory_ecosystems.go b/pkg/github/models/security_advisory_ecosystems.go new file mode 100644 index 0000000..d22ab7b --- /dev/null +++ b/pkg/github/models/security_advisory_ecosystems.go @@ -0,0 +1,70 @@ +package models +import ( + "errors" +) +// The package's language or package management ecosystem. +type SecurityAdvisoryEcosystems int + +const ( + RUBYGEMS_SECURITYADVISORYECOSYSTEMS SecurityAdvisoryEcosystems = iota + NPM_SECURITYADVISORYECOSYSTEMS + PIP_SECURITYADVISORYECOSYSTEMS + MAVEN_SECURITYADVISORYECOSYSTEMS + NUGET_SECURITYADVISORYECOSYSTEMS + COMPOSER_SECURITYADVISORYECOSYSTEMS + GO_SECURITYADVISORYECOSYSTEMS + RUST_SECURITYADVISORYECOSYSTEMS + ERLANG_SECURITYADVISORYECOSYSTEMS + ACTIONS_SECURITYADVISORYECOSYSTEMS + PUB_SECURITYADVISORYECOSYSTEMS + OTHER_SECURITYADVISORYECOSYSTEMS + SWIFT_SECURITYADVISORYECOSYSTEMS +) + +func (i SecurityAdvisoryEcosystems) String() string { + return []string{"rubygems", "npm", "pip", "maven", "nuget", "composer", "go", "rust", "erlang", "actions", "pub", "other", "swift"}[i] +} +func ParseSecurityAdvisoryEcosystems(v string) (any, error) { + result := RUBYGEMS_SECURITYADVISORYECOSYSTEMS + switch v { + case "rubygems": + result = RUBYGEMS_SECURITYADVISORYECOSYSTEMS + case "npm": + result = NPM_SECURITYADVISORYECOSYSTEMS + case "pip": + result = PIP_SECURITYADVISORYECOSYSTEMS + case "maven": + result = MAVEN_SECURITYADVISORYECOSYSTEMS + case "nuget": + result = NUGET_SECURITYADVISORYECOSYSTEMS + case "composer": + result = COMPOSER_SECURITYADVISORYECOSYSTEMS + case "go": + result = GO_SECURITYADVISORYECOSYSTEMS + case "rust": + result = RUST_SECURITYADVISORYECOSYSTEMS + case "erlang": + result = ERLANG_SECURITYADVISORYECOSYSTEMS + case "actions": + result = ACTIONS_SECURITYADVISORYECOSYSTEMS + case "pub": + result = PUB_SECURITYADVISORYECOSYSTEMS + case "other": + result = OTHER_SECURITYADVISORYECOSYSTEMS + case "swift": + result = SWIFT_SECURITYADVISORYECOSYSTEMS + default: + return 0, errors.New("Unknown SecurityAdvisoryEcosystems value: " + v) + } + return &result, nil +} +func SerializeSecurityAdvisoryEcosystems(values []SecurityAdvisoryEcosystems) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAdvisoryEcosystems) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/security_and_analysis.go b/pkg/github/models/security_and_analysis.go new file mode 100644 index 0000000..a70df56 --- /dev/null +++ b/pkg/github/models/security_and_analysis.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecurityAndAnalysis struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The advanced_security property + advanced_security SecurityAndAnalysis_advanced_securityable + // Enable or disable Dependabot security updates for the repository. + dependabot_security_updates SecurityAndAnalysis_dependabot_security_updatesable + // The secret_scanning property + secret_scanning SecurityAndAnalysis_secret_scanningable + // The secret_scanning_push_protection property + secret_scanning_push_protection SecurityAndAnalysis_secret_scanning_push_protectionable + // The secret_scanning_validity_checks property + secret_scanning_validity_checks SecurityAndAnalysis_secret_scanning_validity_checksable +} +// NewSecurityAndAnalysis instantiates a new SecurityAndAnalysis and sets the default values. +func NewSecurityAndAnalysis()(*SecurityAndAnalysis) { + m := &SecurityAndAnalysis{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecurityAndAnalysisFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecurityAndAnalysisFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAndAnalysis(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecurityAndAnalysis) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurity gets the advanced_security property value. The advanced_security property +// returns a SecurityAndAnalysis_advanced_securityable when successful +func (m *SecurityAndAnalysis) GetAdvancedSecurity()(SecurityAndAnalysis_advanced_securityable) { + return m.advanced_security +} +// GetDependabotSecurityUpdates gets the dependabot_security_updates property value. Enable or disable Dependabot security updates for the repository. +// returns a SecurityAndAnalysis_dependabot_security_updatesable when successful +func (m *SecurityAndAnalysis) GetDependabotSecurityUpdates()(SecurityAndAnalysis_dependabot_security_updatesable) { + return m.dependabot_security_updates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecurityAndAnalysis) 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(CreateSecurityAndAnalysis_advanced_securityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurity(val.(SecurityAndAnalysis_advanced_securityable)) + } + return nil + } + res["dependabot_security_updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysis_dependabot_security_updatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependabotSecurityUpdates(val.(SecurityAndAnalysis_dependabot_security_updatesable)) + } + return nil + } + res["secret_scanning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysis_secret_scanningFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanning(val.(SecurityAndAnalysis_secret_scanningable)) + } + return nil + } + res["secret_scanning_push_protection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysis_secret_scanning_push_protectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtection(val.(SecurityAndAnalysis_secret_scanning_push_protectionable)) + } + return nil + } + res["secret_scanning_validity_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAndAnalysis_secret_scanning_validity_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningValidityChecks(val.(SecurityAndAnalysis_secret_scanning_validity_checksable)) + } + return nil + } + return res +} +// GetSecretScanning gets the secret_scanning property value. The secret_scanning property +// returns a SecurityAndAnalysis_secret_scanningable when successful +func (m *SecurityAndAnalysis) GetSecretScanning()(SecurityAndAnalysis_secret_scanningable) { + return m.secret_scanning +} +// GetSecretScanningPushProtection gets the secret_scanning_push_protection property value. The secret_scanning_push_protection property +// returns a SecurityAndAnalysis_secret_scanning_push_protectionable when successful +func (m *SecurityAndAnalysis) GetSecretScanningPushProtection()(SecurityAndAnalysis_secret_scanning_push_protectionable) { + return m.secret_scanning_push_protection +} +// GetSecretScanningValidityChecks gets the secret_scanning_validity_checks property value. The secret_scanning_validity_checks property +// returns a SecurityAndAnalysis_secret_scanning_validity_checksable when successful +func (m *SecurityAndAnalysis) GetSecretScanningValidityChecks()(SecurityAndAnalysis_secret_scanning_validity_checksable) { + return m.secret_scanning_validity_checks +} +// Serialize serializes information the current object +func (m *SecurityAndAnalysis) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("advanced_security", m.GetAdvancedSecurity()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dependabot_security_updates", m.GetDependabotSecurityUpdates()) + 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.WriteObjectValue("secret_scanning_validity_checks", m.GetSecretScanningValidityChecks()) + 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 *SecurityAndAnalysis) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurity sets the advanced_security property value. The advanced_security property +func (m *SecurityAndAnalysis) SetAdvancedSecurity(value SecurityAndAnalysis_advanced_securityable)() { + m.advanced_security = value +} +// SetDependabotSecurityUpdates sets the dependabot_security_updates property value. Enable or disable Dependabot security updates for the repository. +func (m *SecurityAndAnalysis) SetDependabotSecurityUpdates(value SecurityAndAnalysis_dependabot_security_updatesable)() { + m.dependabot_security_updates = value +} +// SetSecretScanning sets the secret_scanning property value. The secret_scanning property +func (m *SecurityAndAnalysis) SetSecretScanning(value SecurityAndAnalysis_secret_scanningable)() { + m.secret_scanning = value +} +// SetSecretScanningPushProtection sets the secret_scanning_push_protection property value. The secret_scanning_push_protection property +func (m *SecurityAndAnalysis) SetSecretScanningPushProtection(value SecurityAndAnalysis_secret_scanning_push_protectionable)() { + m.secret_scanning_push_protection = value +} +// SetSecretScanningValidityChecks sets the secret_scanning_validity_checks property value. The secret_scanning_validity_checks property +func (m *SecurityAndAnalysis) SetSecretScanningValidityChecks(value SecurityAndAnalysis_secret_scanning_validity_checksable)() { + m.secret_scanning_validity_checks = value +} +type SecurityAndAnalysisable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurity()(SecurityAndAnalysis_advanced_securityable) + GetDependabotSecurityUpdates()(SecurityAndAnalysis_dependabot_security_updatesable) + GetSecretScanning()(SecurityAndAnalysis_secret_scanningable) + GetSecretScanningPushProtection()(SecurityAndAnalysis_secret_scanning_push_protectionable) + GetSecretScanningValidityChecks()(SecurityAndAnalysis_secret_scanning_validity_checksable) + SetAdvancedSecurity(value SecurityAndAnalysis_advanced_securityable)() + SetDependabotSecurityUpdates(value SecurityAndAnalysis_dependabot_security_updatesable)() + SetSecretScanning(value SecurityAndAnalysis_secret_scanningable)() + SetSecretScanningPushProtection(value SecurityAndAnalysis_secret_scanning_push_protectionable)() + SetSecretScanningValidityChecks(value SecurityAndAnalysis_secret_scanning_validity_checksable)() +} diff --git a/pkg/github/models/security_and_analysis_advanced_security.go b/pkg/github/models/security_and_analysis_advanced_security.go new file mode 100644 index 0000000..11e63c9 --- /dev/null +++ b/pkg/github/models/security_and_analysis_advanced_security.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecurityAndAnalysis_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 + // The status property + status *SecurityAndAnalysis_advanced_security_status +} +// NewSecurityAndAnalysis_advanced_security instantiates a new SecurityAndAnalysis_advanced_security and sets the default values. +func NewSecurityAndAnalysis_advanced_security()(*SecurityAndAnalysis_advanced_security) { + m := &SecurityAndAnalysis_advanced_security{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecurityAndAnalysis_advanced_securityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecurityAndAnalysis_advanced_securityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAndAnalysis_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. +// returns a map[string]any when successful +func (m *SecurityAndAnalysis_advanced_security) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecurityAndAnalysis_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.GetEnumValue(ParseSecurityAndAnalysis_advanced_security_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SecurityAndAnalysis_advanced_security_status)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +// returns a *SecurityAndAnalysis_advanced_security_status when successful +func (m *SecurityAndAnalysis_advanced_security) GetStatus()(*SecurityAndAnalysis_advanced_security_status) { + return m.status +} +// Serialize serializes information the current object +func (m *SecurityAndAnalysis_advanced_security) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecurityAndAnalysis_advanced_security) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The status property +func (m *SecurityAndAnalysis_advanced_security) SetStatus(value *SecurityAndAnalysis_advanced_security_status)() { + m.status = value +} +type SecurityAndAnalysis_advanced_securityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*SecurityAndAnalysis_advanced_security_status) + SetStatus(value *SecurityAndAnalysis_advanced_security_status)() +} diff --git a/pkg/github/models/security_and_analysis_advanced_security_status.go b/pkg/github/models/security_and_analysis_advanced_security_status.go new file mode 100644 index 0000000..2063e01 --- /dev/null +++ b/pkg/github/models/security_and_analysis_advanced_security_status.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type SecurityAndAnalysis_advanced_security_status int + +const ( + ENABLED_SECURITYANDANALYSIS_ADVANCED_SECURITY_STATUS SecurityAndAnalysis_advanced_security_status = iota + DISABLED_SECURITYANDANALYSIS_ADVANCED_SECURITY_STATUS +) + +func (i SecurityAndAnalysis_advanced_security_status) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseSecurityAndAnalysis_advanced_security_status(v string) (any, error) { + result := ENABLED_SECURITYANDANALYSIS_ADVANCED_SECURITY_STATUS + switch v { + case "enabled": + result = ENABLED_SECURITYANDANALYSIS_ADVANCED_SECURITY_STATUS + case "disabled": + result = DISABLED_SECURITYANDANALYSIS_ADVANCED_SECURITY_STATUS + default: + return 0, errors.New("Unknown SecurityAndAnalysis_advanced_security_status value: " + v) + } + return &result, nil +} +func SerializeSecurityAndAnalysis_advanced_security_status(values []SecurityAndAnalysis_advanced_security_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAndAnalysis_advanced_security_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/security_and_analysis_dependabot_security_updates.go b/pkg/github/models/security_and_analysis_dependabot_security_updates.go new file mode 100644 index 0000000..d8c8448 --- /dev/null +++ b/pkg/github/models/security_and_analysis_dependabot_security_updates.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityAndAnalysis_dependabot_security_updates enable or disable Dependabot security updates for the repository. +type SecurityAndAnalysis_dependabot_security_updates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The enablement status of Dependabot security updates for the repository. + status *SecurityAndAnalysis_dependabot_security_updates_status +} +// NewSecurityAndAnalysis_dependabot_security_updates instantiates a new SecurityAndAnalysis_dependabot_security_updates and sets the default values. +func NewSecurityAndAnalysis_dependabot_security_updates()(*SecurityAndAnalysis_dependabot_security_updates) { + m := &SecurityAndAnalysis_dependabot_security_updates{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecurityAndAnalysis_dependabot_security_updatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecurityAndAnalysis_dependabot_security_updatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAndAnalysis_dependabot_security_updates(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecurityAndAnalysis_dependabot_security_updates) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecurityAndAnalysis_dependabot_security_updates) 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.GetEnumValue(ParseSecurityAndAnalysis_dependabot_security_updates_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SecurityAndAnalysis_dependabot_security_updates_status)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The enablement status of Dependabot security updates for the repository. +// returns a *SecurityAndAnalysis_dependabot_security_updates_status when successful +func (m *SecurityAndAnalysis_dependabot_security_updates) GetStatus()(*SecurityAndAnalysis_dependabot_security_updates_status) { + return m.status +} +// Serialize serializes information the current object +func (m *SecurityAndAnalysis_dependabot_security_updates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecurityAndAnalysis_dependabot_security_updates) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The enablement status of Dependabot security updates for the repository. +func (m *SecurityAndAnalysis_dependabot_security_updates) SetStatus(value *SecurityAndAnalysis_dependabot_security_updates_status)() { + m.status = value +} +type SecurityAndAnalysis_dependabot_security_updatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*SecurityAndAnalysis_dependabot_security_updates_status) + SetStatus(value *SecurityAndAnalysis_dependabot_security_updates_status)() +} diff --git a/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go b/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go new file mode 100644 index 0000000..906d4c8 --- /dev/null +++ b/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The enablement status of Dependabot security updates for the repository. +type SecurityAndAnalysis_dependabot_security_updates_status int + +const ( + ENABLED_SECURITYANDANALYSIS_DEPENDABOT_SECURITY_UPDATES_STATUS SecurityAndAnalysis_dependabot_security_updates_status = iota + DISABLED_SECURITYANDANALYSIS_DEPENDABOT_SECURITY_UPDATES_STATUS +) + +func (i SecurityAndAnalysis_dependabot_security_updates_status) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseSecurityAndAnalysis_dependabot_security_updates_status(v string) (any, error) { + result := ENABLED_SECURITYANDANALYSIS_DEPENDABOT_SECURITY_UPDATES_STATUS + switch v { + case "enabled": + result = ENABLED_SECURITYANDANALYSIS_DEPENDABOT_SECURITY_UPDATES_STATUS + case "disabled": + result = DISABLED_SECURITYANDANALYSIS_DEPENDABOT_SECURITY_UPDATES_STATUS + default: + return 0, errors.New("Unknown SecurityAndAnalysis_dependabot_security_updates_status value: " + v) + } + return &result, nil +} +func SerializeSecurityAndAnalysis_dependabot_security_updates_status(values []SecurityAndAnalysis_dependabot_security_updates_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAndAnalysis_dependabot_security_updates_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/security_and_analysis_secret_scanning.go b/pkg/github/models/security_and_analysis_secret_scanning.go new file mode 100644 index 0000000..27a4fa5 --- /dev/null +++ b/pkg/github/models/security_and_analysis_secret_scanning.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecurityAndAnalysis_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 + // The status property + status *SecurityAndAnalysis_secret_scanning_status +} +// NewSecurityAndAnalysis_secret_scanning instantiates a new SecurityAndAnalysis_secret_scanning and sets the default values. +func NewSecurityAndAnalysis_secret_scanning()(*SecurityAndAnalysis_secret_scanning) { + m := &SecurityAndAnalysis_secret_scanning{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecurityAndAnalysis_secret_scanningFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecurityAndAnalysis_secret_scanningFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAndAnalysis_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. +// returns a map[string]any when successful +func (m *SecurityAndAnalysis_secret_scanning) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecurityAndAnalysis_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.GetEnumValue(ParseSecurityAndAnalysis_secret_scanning_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SecurityAndAnalysis_secret_scanning_status)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +// returns a *SecurityAndAnalysis_secret_scanning_status when successful +func (m *SecurityAndAnalysis_secret_scanning) GetStatus()(*SecurityAndAnalysis_secret_scanning_status) { + return m.status +} +// Serialize serializes information the current object +func (m *SecurityAndAnalysis_secret_scanning) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecurityAndAnalysis_secret_scanning) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The status property +func (m *SecurityAndAnalysis_secret_scanning) SetStatus(value *SecurityAndAnalysis_secret_scanning_status)() { + m.status = value +} +type SecurityAndAnalysis_secret_scanningable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*SecurityAndAnalysis_secret_scanning_status) + SetStatus(value *SecurityAndAnalysis_secret_scanning_status)() +} diff --git a/pkg/github/models/security_and_analysis_secret_scanning_push_protection.go b/pkg/github/models/security_and_analysis_secret_scanning_push_protection.go new file mode 100644 index 0000000..97a7db0 --- /dev/null +++ b/pkg/github/models/security_and_analysis_secret_scanning_push_protection.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecurityAndAnalysis_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 + // The status property + status *SecurityAndAnalysis_secret_scanning_push_protection_status +} +// NewSecurityAndAnalysis_secret_scanning_push_protection instantiates a new SecurityAndAnalysis_secret_scanning_push_protection and sets the default values. +func NewSecurityAndAnalysis_secret_scanning_push_protection()(*SecurityAndAnalysis_secret_scanning_push_protection) { + m := &SecurityAndAnalysis_secret_scanning_push_protection{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecurityAndAnalysis_secret_scanning_push_protectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecurityAndAnalysis_secret_scanning_push_protectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAndAnalysis_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. +// returns a map[string]any when successful +func (m *SecurityAndAnalysis_secret_scanning_push_protection) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecurityAndAnalysis_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.GetEnumValue(ParseSecurityAndAnalysis_secret_scanning_push_protection_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SecurityAndAnalysis_secret_scanning_push_protection_status)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +// returns a *SecurityAndAnalysis_secret_scanning_push_protection_status when successful +func (m *SecurityAndAnalysis_secret_scanning_push_protection) GetStatus()(*SecurityAndAnalysis_secret_scanning_push_protection_status) { + return m.status +} +// Serialize serializes information the current object +func (m *SecurityAndAnalysis_secret_scanning_push_protection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecurityAndAnalysis_secret_scanning_push_protection) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The status property +func (m *SecurityAndAnalysis_secret_scanning_push_protection) SetStatus(value *SecurityAndAnalysis_secret_scanning_push_protection_status)() { + m.status = value +} +type SecurityAndAnalysis_secret_scanning_push_protectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*SecurityAndAnalysis_secret_scanning_push_protection_status) + SetStatus(value *SecurityAndAnalysis_secret_scanning_push_protection_status)() +} diff --git a/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go b/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go new file mode 100644 index 0000000..985ae0b --- /dev/null +++ b/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type SecurityAndAnalysis_secret_scanning_push_protection_status int + +const ( + ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_PUSH_PROTECTION_STATUS SecurityAndAnalysis_secret_scanning_push_protection_status = iota + DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_PUSH_PROTECTION_STATUS +) + +func (i SecurityAndAnalysis_secret_scanning_push_protection_status) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseSecurityAndAnalysis_secret_scanning_push_protection_status(v string) (any, error) { + result := ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_PUSH_PROTECTION_STATUS + switch v { + case "enabled": + result = ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_PUSH_PROTECTION_STATUS + case "disabled": + result = DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_PUSH_PROTECTION_STATUS + default: + return 0, errors.New("Unknown SecurityAndAnalysis_secret_scanning_push_protection_status value: " + v) + } + return &result, nil +} +func SerializeSecurityAndAnalysis_secret_scanning_push_protection_status(values []SecurityAndAnalysis_secret_scanning_push_protection_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAndAnalysis_secret_scanning_push_protection_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/security_and_analysis_secret_scanning_status.go b/pkg/github/models/security_and_analysis_secret_scanning_status.go new file mode 100644 index 0000000..59118e7 --- /dev/null +++ b/pkg/github/models/security_and_analysis_secret_scanning_status.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type SecurityAndAnalysis_secret_scanning_status int + +const ( + ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_STATUS SecurityAndAnalysis_secret_scanning_status = iota + DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_STATUS +) + +func (i SecurityAndAnalysis_secret_scanning_status) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseSecurityAndAnalysis_secret_scanning_status(v string) (any, error) { + result := ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_STATUS + switch v { + case "enabled": + result = ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_STATUS + case "disabled": + result = DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_STATUS + default: + return 0, errors.New("Unknown SecurityAndAnalysis_secret_scanning_status value: " + v) + } + return &result, nil +} +func SerializeSecurityAndAnalysis_secret_scanning_status(values []SecurityAndAnalysis_secret_scanning_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAndAnalysis_secret_scanning_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/security_and_analysis_secret_scanning_validity_checks.go b/pkg/github/models/security_and_analysis_secret_scanning_validity_checks.go new file mode 100644 index 0000000..928899c --- /dev/null +++ b/pkg/github/models/security_and_analysis_secret_scanning_validity_checks.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecurityAndAnalysis_secret_scanning_validity_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The status property + status *SecurityAndAnalysis_secret_scanning_validity_checks_status +} +// NewSecurityAndAnalysis_secret_scanning_validity_checks instantiates a new SecurityAndAnalysis_secret_scanning_validity_checks and sets the default values. +func NewSecurityAndAnalysis_secret_scanning_validity_checks()(*SecurityAndAnalysis_secret_scanning_validity_checks) { + m := &SecurityAndAnalysis_secret_scanning_validity_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecurityAndAnalysis_secret_scanning_validity_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecurityAndAnalysis_secret_scanning_validity_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAndAnalysis_secret_scanning_validity_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecurityAndAnalysis_secret_scanning_validity_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecurityAndAnalysis_secret_scanning_validity_checks) 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.GetEnumValue(ParseSecurityAndAnalysis_secret_scanning_validity_checks_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SecurityAndAnalysis_secret_scanning_validity_checks_status)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +// returns a *SecurityAndAnalysis_secret_scanning_validity_checks_status when successful +func (m *SecurityAndAnalysis_secret_scanning_validity_checks) GetStatus()(*SecurityAndAnalysis_secret_scanning_validity_checks_status) { + return m.status +} +// Serialize serializes information the current object +func (m *SecurityAndAnalysis_secret_scanning_validity_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecurityAndAnalysis_secret_scanning_validity_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. The status property +func (m *SecurityAndAnalysis_secret_scanning_validity_checks) SetStatus(value *SecurityAndAnalysis_secret_scanning_validity_checks_status)() { + m.status = value +} +type SecurityAndAnalysis_secret_scanning_validity_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*SecurityAndAnalysis_secret_scanning_validity_checks_status) + SetStatus(value *SecurityAndAnalysis_secret_scanning_validity_checks_status)() +} diff --git a/pkg/github/models/security_and_analysis_secret_scanning_validity_checks_status.go b/pkg/github/models/security_and_analysis_secret_scanning_validity_checks_status.go new file mode 100644 index 0000000..061d094 --- /dev/null +++ b/pkg/github/models/security_and_analysis_secret_scanning_validity_checks_status.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +type SecurityAndAnalysis_secret_scanning_validity_checks_status int + +const ( + ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_VALIDITY_CHECKS_STATUS SecurityAndAnalysis_secret_scanning_validity_checks_status = iota + DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_VALIDITY_CHECKS_STATUS +) + +func (i SecurityAndAnalysis_secret_scanning_validity_checks_status) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseSecurityAndAnalysis_secret_scanning_validity_checks_status(v string) (any, error) { + result := ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_VALIDITY_CHECKS_STATUS + switch v { + case "enabled": + result = ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_VALIDITY_CHECKS_STATUS + case "disabled": + result = DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_VALIDITY_CHECKS_STATUS + default: + return 0, errors.New("Unknown SecurityAndAnalysis_secret_scanning_validity_checks_status value: " + v) + } + return &result, nil +} +func SerializeSecurityAndAnalysis_secret_scanning_validity_checks_status(values []SecurityAndAnalysis_secret_scanning_validity_checks_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecurityAndAnalysis_secret_scanning_validity_checks_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/selected_actions.go b/pkg/github/models/selected_actions.go new file mode 100644 index 0000000..a6b0ab3 --- /dev/null +++ b/pkg/github/models/selected_actions.go @@ -0,0 +1,144 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SelectedActions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. + github_owned_allowed *bool + // Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`. + patterns_allowed []string + // Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. + verified_allowed *bool +} +// NewSelectedActions instantiates a new SelectedActions and sets the default values. +func NewSelectedActions()(*SelectedActions) { + m := &SelectedActions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSelectedActionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSelectedActionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSelectedActions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SelectedActions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SelectedActions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["github_owned_allowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGithubOwnedAllowed(val) + } + return nil + } + res["patterns_allowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPatternsAllowed(res) + } + return nil + } + res["verified_allowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerifiedAllowed(val) + } + return nil + } + return res +} +// GetGithubOwnedAllowed gets the github_owned_allowed property value. Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. +// returns a *bool when successful +func (m *SelectedActions) GetGithubOwnedAllowed()(*bool) { + return m.github_owned_allowed +} +// GetPatternsAllowed gets the patterns_allowed property value. Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`. +// returns a []string when successful +func (m *SelectedActions) GetPatternsAllowed()([]string) { + return m.patterns_allowed +} +// GetVerifiedAllowed gets the verified_allowed property value. Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. +// returns a *bool when successful +func (m *SelectedActions) GetVerifiedAllowed()(*bool) { + return m.verified_allowed +} +// Serialize serializes information the current object +func (m *SelectedActions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("github_owned_allowed", m.GetGithubOwnedAllowed()) + if err != nil { + return err + } + } + if m.GetPatternsAllowed() != nil { + err := writer.WriteCollectionOfStringValues("patterns_allowed", m.GetPatternsAllowed()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified_allowed", m.GetVerifiedAllowed()) + 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 *SelectedActions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGithubOwnedAllowed sets the github_owned_allowed property value. Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. +func (m *SelectedActions) SetGithubOwnedAllowed(value *bool)() { + m.github_owned_allowed = value +} +// SetPatternsAllowed sets the patterns_allowed property value. Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`. +func (m *SelectedActions) SetPatternsAllowed(value []string)() { + m.patterns_allowed = value +} +// SetVerifiedAllowed sets the verified_allowed property value. Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. +func (m *SelectedActions) SetVerifiedAllowed(value *bool)() { + m.verified_allowed = value +} +type SelectedActionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGithubOwnedAllowed()(*bool) + GetPatternsAllowed()([]string) + GetVerifiedAllowed()(*bool) + SetGithubOwnedAllowed(value *bool)() + SetPatternsAllowed(value []string)() + SetVerifiedAllowed(value *bool)() +} diff --git a/pkg/github/models/server_statistics.go b/pkg/github/models/server_statistics.go new file mode 100644 index 0000000..2321f93 --- /dev/null +++ b/pkg/github/models/server_statistics.go @@ -0,0 +1,341 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics struct { + // Actions metrics that are included in the Server Statistics payload/export from GHES + actions_stats ServerStatisticsActionsable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The collection_date property + collection_date *string + // The dormant_users property + dormant_users ServerStatistics_dormant_usersable + // The ghe_stats property + ghe_stats ServerStatistics_ghe_statsable + // The ghes_version property + ghes_version *string + // The github_connect property + github_connect ServerStatistics_github_connectable + // The host_name property + host_name *string + // Packages metrics that are included in the Server Statistics payload/export from GHES + packages_stats ServerStatisticsPackagesable + // The schema_version property + schema_version *string + // The server_id property + server_id *string +} +// NewServerStatistics instantiates a new ServerStatistics and sets the default values. +func NewServerStatistics()(*ServerStatistics) { + m := &ServerStatistics{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics(), nil +} +// GetActionsStats gets the actions_stats property value. Actions metrics that are included in the Server Statistics payload/export from GHES +// returns a ServerStatisticsActionsable when successful +func (m *ServerStatistics) GetActionsStats()(ServerStatisticsActionsable) { + return m.actions_stats +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCollectionDate gets the collection_date property value. The collection_date property +// returns a *string when successful +func (m *ServerStatistics) GetCollectionDate()(*string) { + return m.collection_date +} +// GetDormantUsers gets the dormant_users property value. The dormant_users property +// returns a ServerStatistics_dormant_usersable when successful +func (m *ServerStatistics) GetDormantUsers()(ServerStatistics_dormant_usersable) { + return m.dormant_users +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions_stats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatisticsActionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActionsStats(val.(ServerStatisticsActionsable)) + } + return nil + } + res["collection_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollectionDate(val) + } + return nil + } + res["dormant_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_dormant_usersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDormantUsers(val.(ServerStatistics_dormant_usersable)) + } + return nil + } + res["ghe_stats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_statsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGheStats(val.(ServerStatistics_ghe_statsable)) + } + return nil + } + res["ghes_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGhesVersion(val) + } + return nil + } + res["github_connect"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_github_connectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGithubConnect(val.(ServerStatistics_github_connectable)) + } + return nil + } + res["host_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostName(val) + } + return nil + } + res["packages_stats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatisticsPackagesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackagesStats(val.(ServerStatisticsPackagesable)) + } + return nil + } + res["schema_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchemaVersion(val) + } + return nil + } + res["server_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerId(val) + } + return nil + } + return res +} +// GetGheStats gets the ghe_stats property value. The ghe_stats property +// returns a ServerStatistics_ghe_statsable when successful +func (m *ServerStatistics) GetGheStats()(ServerStatistics_ghe_statsable) { + return m.ghe_stats +} +// GetGhesVersion gets the ghes_version property value. The ghes_version property +// returns a *string when successful +func (m *ServerStatistics) GetGhesVersion()(*string) { + return m.ghes_version +} +// GetGithubConnect gets the github_connect property value. The github_connect property +// returns a ServerStatistics_github_connectable when successful +func (m *ServerStatistics) GetGithubConnect()(ServerStatistics_github_connectable) { + return m.github_connect +} +// GetHostName gets the host_name property value. The host_name property +// returns a *string when successful +func (m *ServerStatistics) GetHostName()(*string) { + return m.host_name +} +// GetPackagesStats gets the packages_stats property value. Packages metrics that are included in the Server Statistics payload/export from GHES +// returns a ServerStatisticsPackagesable when successful +func (m *ServerStatistics) GetPackagesStats()(ServerStatisticsPackagesable) { + return m.packages_stats +} +// GetSchemaVersion gets the schema_version property value. The schema_version property +// returns a *string when successful +func (m *ServerStatistics) GetSchemaVersion()(*string) { + return m.schema_version +} +// GetServerId gets the server_id property value. The server_id property +// returns a *string when successful +func (m *ServerStatistics) GetServerId()(*string) { + return m.server_id +} +// Serialize serializes information the current object +func (m *ServerStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actions_stats", m.GetActionsStats()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collection_date", m.GetCollectionDate()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dormant_users", m.GetDormantUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ghes_version", m.GetGhesVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("ghe_stats", m.GetGheStats()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("github_connect", m.GetGithubConnect()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("host_name", m.GetHostName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("packages_stats", m.GetPackagesStats()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("schema_version", m.GetSchemaVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("server_id", m.GetServerId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionsStats sets the actions_stats property value. Actions metrics that are included in the Server Statistics payload/export from GHES +func (m *ServerStatistics) SetActionsStats(value ServerStatisticsActionsable)() { + m.actions_stats = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ServerStatistics) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCollectionDate sets the collection_date property value. The collection_date property +func (m *ServerStatistics) SetCollectionDate(value *string)() { + m.collection_date = value +} +// SetDormantUsers sets the dormant_users property value. The dormant_users property +func (m *ServerStatistics) SetDormantUsers(value ServerStatistics_dormant_usersable)() { + m.dormant_users = value +} +// SetGheStats sets the ghe_stats property value. The ghe_stats property +func (m *ServerStatistics) SetGheStats(value ServerStatistics_ghe_statsable)() { + m.ghe_stats = value +} +// SetGhesVersion sets the ghes_version property value. The ghes_version property +func (m *ServerStatistics) SetGhesVersion(value *string)() { + m.ghes_version = value +} +// SetGithubConnect sets the github_connect property value. The github_connect property +func (m *ServerStatistics) SetGithubConnect(value ServerStatistics_github_connectable)() { + m.github_connect = value +} +// SetHostName sets the host_name property value. The host_name property +func (m *ServerStatistics) SetHostName(value *string)() { + m.host_name = value +} +// SetPackagesStats sets the packages_stats property value. Packages metrics that are included in the Server Statistics payload/export from GHES +func (m *ServerStatistics) SetPackagesStats(value ServerStatisticsPackagesable)() { + m.packages_stats = value +} +// SetSchemaVersion sets the schema_version property value. The schema_version property +func (m *ServerStatistics) SetSchemaVersion(value *string)() { + m.schema_version = value +} +// SetServerId sets the server_id property value. The server_id property +func (m *ServerStatistics) SetServerId(value *string)() { + m.server_id = value +} +type ServerStatisticsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionsStats()(ServerStatisticsActionsable) + GetCollectionDate()(*string) + GetDormantUsers()(ServerStatistics_dormant_usersable) + GetGheStats()(ServerStatistics_ghe_statsable) + GetGhesVersion()(*string) + GetGithubConnect()(ServerStatistics_github_connectable) + GetHostName()(*string) + GetPackagesStats()(ServerStatisticsPackagesable) + GetSchemaVersion()(*string) + GetServerId()(*string) + SetActionsStats(value ServerStatisticsActionsable)() + SetCollectionDate(value *string)() + SetDormantUsers(value ServerStatistics_dormant_usersable)() + SetGheStats(value ServerStatistics_ghe_statsable)() + SetGhesVersion(value *string)() + SetGithubConnect(value ServerStatistics_github_connectable)() + SetHostName(value *string)() + SetPackagesStats(value ServerStatisticsPackagesable)() + SetSchemaVersion(value *string)() + SetServerId(value *string)() +} diff --git a/pkg/github/models/server_statistics_actions.go b/pkg/github/models/server_statistics_actions.go new file mode 100644 index 0000000..4f4587e --- /dev/null +++ b/pkg/github/models/server_statistics_actions.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServerStatisticsActions actions metrics that are included in the Server Statistics payload/export from GHES +type ServerStatisticsActions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total number of repositories in a GHES installation that have Actions enabled + number_of_repos_using_actions *int32 + // The percentage of repositories in a GHES installation that have Actions enabled + percentage_of_repos_using_actions *string +} +// NewServerStatisticsActions instantiates a new ServerStatisticsActions and sets the default values. +func NewServerStatisticsActions()(*ServerStatisticsActions) { + m := &ServerStatisticsActions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatisticsActionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatisticsActionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatisticsActions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatisticsActions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatisticsActions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["number_of_repos_using_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfReposUsingActions(val) + } + return nil + } + res["percentage_of_repos_using_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPercentageOfReposUsingActions(val) + } + return nil + } + return res +} +// GetNumberOfReposUsingActions gets the number_of_repos_using_actions property value. The total number of repositories in a GHES installation that have Actions enabled +// returns a *int32 when successful +func (m *ServerStatisticsActions) GetNumberOfReposUsingActions()(*int32) { + return m.number_of_repos_using_actions +} +// GetPercentageOfReposUsingActions gets the percentage_of_repos_using_actions property value. The percentage of repositories in a GHES installation that have Actions enabled +// returns a *string when successful +func (m *ServerStatisticsActions) GetPercentageOfReposUsingActions()(*string) { + return m.percentage_of_repos_using_actions +} +// Serialize serializes information the current object +func (m *ServerStatisticsActions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("number_of_repos_using_actions", m.GetNumberOfReposUsingActions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("percentage_of_repos_using_actions", m.GetPercentageOfReposUsingActions()) + 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 *ServerStatisticsActions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNumberOfReposUsingActions sets the number_of_repos_using_actions property value. The total number of repositories in a GHES installation that have Actions enabled +func (m *ServerStatisticsActions) SetNumberOfReposUsingActions(value *int32)() { + m.number_of_repos_using_actions = value +} +// SetPercentageOfReposUsingActions sets the percentage_of_repos_using_actions property value. The percentage of repositories in a GHES installation that have Actions enabled +func (m *ServerStatisticsActions) SetPercentageOfReposUsingActions(value *string)() { + m.percentage_of_repos_using_actions = value +} +type ServerStatisticsActionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNumberOfReposUsingActions()(*int32) + GetPercentageOfReposUsingActions()(*string) + SetNumberOfReposUsingActions(value *int32)() + SetPercentageOfReposUsingActions(value *string)() +} diff --git a/pkg/github/models/server_statistics_dormant_users.go b/pkg/github/models/server_statistics_dormant_users.go new file mode 100644 index 0000000..d744e41 --- /dev/null +++ b/pkg/github/models/server_statistics_dormant_users.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_dormant_users struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dormancy_threshold property + dormancy_threshold *string + // The total_dormant_users property + total_dormant_users *int32 +} +// NewServerStatistics_dormant_users instantiates a new ServerStatistics_dormant_users and sets the default values. +func NewServerStatistics_dormant_users()(*ServerStatistics_dormant_users) { + m := &ServerStatistics_dormant_users{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_dormant_usersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_dormant_usersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_dormant_users(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_dormant_users) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDormancyThreshold gets the dormancy_threshold property value. The dormancy_threshold property +// returns a *string when successful +func (m *ServerStatistics_dormant_users) GetDormancyThreshold()(*string) { + return m.dormancy_threshold +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_dormant_users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dormancy_threshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDormancyThreshold(val) + } + return nil + } + res["total_dormant_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalDormantUsers(val) + } + return nil + } + return res +} +// GetTotalDormantUsers gets the total_dormant_users property value. The total_dormant_users property +// returns a *int32 when successful +func (m *ServerStatistics_dormant_users) GetTotalDormantUsers()(*int32) { + return m.total_dormant_users +} +// Serialize serializes information the current object +func (m *ServerStatistics_dormant_users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dormancy_threshold", m.GetDormancyThreshold()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_dormant_users", m.GetTotalDormantUsers()) + 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 *ServerStatistics_dormant_users) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDormancyThreshold sets the dormancy_threshold property value. The dormancy_threshold property +func (m *ServerStatistics_dormant_users) SetDormancyThreshold(value *string)() { + m.dormancy_threshold = value +} +// SetTotalDormantUsers sets the total_dormant_users property value. The total_dormant_users property +func (m *ServerStatistics_dormant_users) SetTotalDormantUsers(value *int32)() { + m.total_dormant_users = value +} +type ServerStatistics_dormant_usersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDormancyThreshold()(*string) + GetTotalDormantUsers()(*int32) + SetDormancyThreshold(value *string)() + SetTotalDormantUsers(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats.go b/pkg/github/models/server_statistics_ghe_stats.go new file mode 100644 index 0000000..9671447 --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats.go @@ -0,0 +1,341 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comments property + comments ServerStatistics_ghe_stats_commentsable + // The gists property + gists ServerStatistics_ghe_stats_gistsable + // The hooks property + hooks ServerStatistics_ghe_stats_hooksable + // The issues property + issues ServerStatistics_ghe_stats_issuesable + // The milestones property + milestones ServerStatistics_ghe_stats_milestonesable + // The orgs property + orgs ServerStatistics_ghe_stats_orgsable + // The pages property + pages ServerStatistics_ghe_stats_pagesable + // The pulls property + pulls ServerStatistics_ghe_stats_pullsable + // The repos property + repos ServerStatistics_ghe_stats_reposable + // The users property + users ServerStatistics_ghe_stats_usersable +} +// NewServerStatistics_ghe_stats instantiates a new ServerStatistics_ghe_stats and sets the default values. +func NewServerStatistics_ghe_stats()(*ServerStatistics_ghe_stats) { + m := &ServerStatistics_ghe_stats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_statsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_statsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. The comments property +// returns a ServerStatistics_ghe_stats_commentsable when successful +func (m *ServerStatistics_ghe_stats) GetComments()(ServerStatistics_ghe_stats_commentsable) { + return m.comments +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_commentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetComments(val.(ServerStatistics_ghe_stats_commentsable)) + } + return nil + } + res["gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_gistsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGists(val.(ServerStatistics_ghe_stats_gistsable)) + } + return nil + } + res["hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_hooksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHooks(val.(ServerStatistics_ghe_stats_hooksable)) + } + return nil + } + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_issuesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssues(val.(ServerStatistics_ghe_stats_issuesable)) + } + return nil + } + res["milestones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_milestonesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestones(val.(ServerStatistics_ghe_stats_milestonesable)) + } + return nil + } + res["orgs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_orgsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrgs(val.(ServerStatistics_ghe_stats_orgsable)) + } + return nil + } + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_pagesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPages(val.(ServerStatistics_ghe_stats_pagesable)) + } + return nil + } + res["pulls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_pullsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPulls(val.(ServerStatistics_ghe_stats_pullsable)) + } + return nil + } + res["repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_reposFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepos(val.(ServerStatistics_ghe_stats_reposable)) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServerStatistics_ghe_stats_usersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUsers(val.(ServerStatistics_ghe_stats_usersable)) + } + return nil + } + return res +} +// GetGists gets the gists property value. The gists property +// returns a ServerStatistics_ghe_stats_gistsable when successful +func (m *ServerStatistics_ghe_stats) GetGists()(ServerStatistics_ghe_stats_gistsable) { + return m.gists +} +// GetHooks gets the hooks property value. The hooks property +// returns a ServerStatistics_ghe_stats_hooksable when successful +func (m *ServerStatistics_ghe_stats) GetHooks()(ServerStatistics_ghe_stats_hooksable) { + return m.hooks +} +// GetIssues gets the issues property value. The issues property +// returns a ServerStatistics_ghe_stats_issuesable when successful +func (m *ServerStatistics_ghe_stats) GetIssues()(ServerStatistics_ghe_stats_issuesable) { + return m.issues +} +// GetMilestones gets the milestones property value. The milestones property +// returns a ServerStatistics_ghe_stats_milestonesable when successful +func (m *ServerStatistics_ghe_stats) GetMilestones()(ServerStatistics_ghe_stats_milestonesable) { + return m.milestones +} +// GetOrgs gets the orgs property value. The orgs property +// returns a ServerStatistics_ghe_stats_orgsable when successful +func (m *ServerStatistics_ghe_stats) GetOrgs()(ServerStatistics_ghe_stats_orgsable) { + return m.orgs +} +// GetPages gets the pages property value. The pages property +// returns a ServerStatistics_ghe_stats_pagesable when successful +func (m *ServerStatistics_ghe_stats) GetPages()(ServerStatistics_ghe_stats_pagesable) { + return m.pages +} +// GetPulls gets the pulls property value. The pulls property +// returns a ServerStatistics_ghe_stats_pullsable when successful +func (m *ServerStatistics_ghe_stats) GetPulls()(ServerStatistics_ghe_stats_pullsable) { + return m.pulls +} +// GetRepos gets the repos property value. The repos property +// returns a ServerStatistics_ghe_stats_reposable when successful +func (m *ServerStatistics_ghe_stats) GetRepos()(ServerStatistics_ghe_stats_reposable) { + return m.repos +} +// GetUsers gets the users property value. The users property +// returns a ServerStatistics_ghe_stats_usersable when successful +func (m *ServerStatistics_ghe_stats) GetUsers()(ServerStatistics_ghe_stats_usersable) { + return m.users +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("gists", m.GetGists()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("hooks", m.GetHooks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("issues", m.GetIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestones", m.GetMilestones()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("orgs", m.GetOrgs()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pages", m.GetPages()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pulls", m.GetPulls()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repos", m.GetRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("users", m.GetUsers()) + 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 *ServerStatistics_ghe_stats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. The comments property +func (m *ServerStatistics_ghe_stats) SetComments(value ServerStatistics_ghe_stats_commentsable)() { + m.comments = value +} +// SetGists sets the gists property value. The gists property +func (m *ServerStatistics_ghe_stats) SetGists(value ServerStatistics_ghe_stats_gistsable)() { + m.gists = value +} +// SetHooks sets the hooks property value. The hooks property +func (m *ServerStatistics_ghe_stats) SetHooks(value ServerStatistics_ghe_stats_hooksable)() { + m.hooks = value +} +// SetIssues sets the issues property value. The issues property +func (m *ServerStatistics_ghe_stats) SetIssues(value ServerStatistics_ghe_stats_issuesable)() { + m.issues = value +} +// SetMilestones sets the milestones property value. The milestones property +func (m *ServerStatistics_ghe_stats) SetMilestones(value ServerStatistics_ghe_stats_milestonesable)() { + m.milestones = value +} +// SetOrgs sets the orgs property value. The orgs property +func (m *ServerStatistics_ghe_stats) SetOrgs(value ServerStatistics_ghe_stats_orgsable)() { + m.orgs = value +} +// SetPages sets the pages property value. The pages property +func (m *ServerStatistics_ghe_stats) SetPages(value ServerStatistics_ghe_stats_pagesable)() { + m.pages = value +} +// SetPulls sets the pulls property value. The pulls property +func (m *ServerStatistics_ghe_stats) SetPulls(value ServerStatistics_ghe_stats_pullsable)() { + m.pulls = value +} +// SetRepos sets the repos property value. The repos property +func (m *ServerStatistics_ghe_stats) SetRepos(value ServerStatistics_ghe_stats_reposable)() { + m.repos = value +} +// SetUsers sets the users property value. The users property +func (m *ServerStatistics_ghe_stats) SetUsers(value ServerStatistics_ghe_stats_usersable)() { + m.users = value +} +type ServerStatistics_ghe_statsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()(ServerStatistics_ghe_stats_commentsable) + GetGists()(ServerStatistics_ghe_stats_gistsable) + GetHooks()(ServerStatistics_ghe_stats_hooksable) + GetIssues()(ServerStatistics_ghe_stats_issuesable) + GetMilestones()(ServerStatistics_ghe_stats_milestonesable) + GetOrgs()(ServerStatistics_ghe_stats_orgsable) + GetPages()(ServerStatistics_ghe_stats_pagesable) + GetPulls()(ServerStatistics_ghe_stats_pullsable) + GetRepos()(ServerStatistics_ghe_stats_reposable) + GetUsers()(ServerStatistics_ghe_stats_usersable) + SetComments(value ServerStatistics_ghe_stats_commentsable)() + SetGists(value ServerStatistics_ghe_stats_gistsable)() + SetHooks(value ServerStatistics_ghe_stats_hooksable)() + SetIssues(value ServerStatistics_ghe_stats_issuesable)() + SetMilestones(value ServerStatistics_ghe_stats_milestonesable)() + SetOrgs(value ServerStatistics_ghe_stats_orgsable)() + SetPages(value ServerStatistics_ghe_stats_pagesable)() + SetPulls(value ServerStatistics_ghe_stats_pullsable)() + SetRepos(value ServerStatistics_ghe_stats_reposable)() + SetUsers(value ServerStatistics_ghe_stats_usersable)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_comments.go b/pkg/github/models/server_statistics_ghe_stats_comments.go new file mode 100644 index 0000000..55b6de6 --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_comments.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_comments struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_commit_comments property + total_commit_comments *int32 + // The total_gist_comments property + total_gist_comments *int32 + // The total_issue_comments property + total_issue_comments *int32 + // The total_pull_request_comments property + total_pull_request_comments *int32 +} +// NewServerStatistics_ghe_stats_comments instantiates a new ServerStatistics_ghe_stats_comments and sets the default values. +func NewServerStatistics_ghe_stats_comments()(*ServerStatistics_ghe_stats_comments) { + m := &ServerStatistics_ghe_stats_comments{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_commentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_commentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_comments(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_comments) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_comments) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_commit_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCommitComments(val) + } + return nil + } + res["total_gist_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalGistComments(val) + } + return nil + } + res["total_issue_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalIssueComments(val) + } + return nil + } + res["total_pull_request_comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPullRequestComments(val) + } + return nil + } + return res +} +// GetTotalCommitComments gets the total_commit_comments property value. The total_commit_comments property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_comments) GetTotalCommitComments()(*int32) { + return m.total_commit_comments +} +// GetTotalGistComments gets the total_gist_comments property value. The total_gist_comments property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_comments) GetTotalGistComments()(*int32) { + return m.total_gist_comments +} +// GetTotalIssueComments gets the total_issue_comments property value. The total_issue_comments property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_comments) GetTotalIssueComments()(*int32) { + return m.total_issue_comments +} +// GetTotalPullRequestComments gets the total_pull_request_comments property value. The total_pull_request_comments property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_comments) GetTotalPullRequestComments()(*int32) { + return m.total_pull_request_comments +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_comments) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_commit_comments", m.GetTotalCommitComments()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_gist_comments", m.GetTotalGistComments()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_issue_comments", m.GetTotalIssueComments()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_pull_request_comments", m.GetTotalPullRequestComments()) + 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 *ServerStatistics_ghe_stats_comments) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCommitComments sets the total_commit_comments property value. The total_commit_comments property +func (m *ServerStatistics_ghe_stats_comments) SetTotalCommitComments(value *int32)() { + m.total_commit_comments = value +} +// SetTotalGistComments sets the total_gist_comments property value. The total_gist_comments property +func (m *ServerStatistics_ghe_stats_comments) SetTotalGistComments(value *int32)() { + m.total_gist_comments = value +} +// SetTotalIssueComments sets the total_issue_comments property value. The total_issue_comments property +func (m *ServerStatistics_ghe_stats_comments) SetTotalIssueComments(value *int32)() { + m.total_issue_comments = value +} +// SetTotalPullRequestComments sets the total_pull_request_comments property value. The total_pull_request_comments property +func (m *ServerStatistics_ghe_stats_comments) SetTotalPullRequestComments(value *int32)() { + m.total_pull_request_comments = value +} +type ServerStatistics_ghe_stats_commentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCommitComments()(*int32) + GetTotalGistComments()(*int32) + GetTotalIssueComments()(*int32) + GetTotalPullRequestComments()(*int32) + SetTotalCommitComments(value *int32)() + SetTotalGistComments(value *int32)() + SetTotalIssueComments(value *int32)() + SetTotalPullRequestComments(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_gists.go b/pkg/github/models/server_statistics_ghe_stats_gists.go new file mode 100644 index 0000000..0eada43 --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_gists.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_gists struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The private_gists property + private_gists *int32 + // The public_gists property + public_gists *int32 + // The total_gists property + total_gists *int32 +} +// NewServerStatistics_ghe_stats_gists instantiates a new ServerStatistics_ghe_stats_gists and sets the default values. +func NewServerStatistics_ghe_stats_gists()(*ServerStatistics_ghe_stats_gists) { + m := &ServerStatistics_ghe_stats_gists{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_gistsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_gistsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_gists(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_gists) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_gists) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["private_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateGists(val) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["total_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalGists(val) + } + return nil + } + return res +} +// GetPrivateGists gets the private_gists property value. The private_gists property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_gists) GetPrivateGists()(*int32) { + return m.private_gists +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_gists) GetPublicGists()(*int32) { + return m.public_gists +} +// GetTotalGists gets the total_gists property value. The total_gists property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_gists) GetTotalGists()(*int32) { + return m.total_gists +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_gists) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("private_gists", m.GetPrivateGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_gists", m.GetTotalGists()) + 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 *ServerStatistics_ghe_stats_gists) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPrivateGists sets the private_gists property value. The private_gists property +func (m *ServerStatistics_ghe_stats_gists) SetPrivateGists(value *int32)() { + m.private_gists = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *ServerStatistics_ghe_stats_gists) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetTotalGists sets the total_gists property value. The total_gists property +func (m *ServerStatistics_ghe_stats_gists) SetTotalGists(value *int32)() { + m.total_gists = value +} +type ServerStatistics_ghe_stats_gistsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrivateGists()(*int32) + GetPublicGists()(*int32) + GetTotalGists()(*int32) + SetPrivateGists(value *int32)() + SetPublicGists(value *int32)() + SetTotalGists(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_hooks.go b/pkg/github/models/server_statistics_ghe_stats_hooks.go new file mode 100644 index 0000000..4e2f41f --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_hooks.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_hooks struct { + // The active_hooks property + active_hooks *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The inactive_hooks property + inactive_hooks *int32 + // The total_hooks property + total_hooks *int32 +} +// NewServerStatistics_ghe_stats_hooks instantiates a new ServerStatistics_ghe_stats_hooks and sets the default values. +func NewServerStatistics_ghe_stats_hooks()(*ServerStatistics_ghe_stats_hooks) { + m := &ServerStatistics_ghe_stats_hooks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_hooksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_hooksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_hooks(), nil +} +// GetActiveHooks gets the active_hooks property value. The active_hooks property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_hooks) GetActiveHooks()(*int32) { + return m.active_hooks +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_hooks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_hooks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active_hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveHooks(val) + } + return nil + } + res["inactive_hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInactiveHooks(val) + } + return nil + } + res["total_hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalHooks(val) + } + return nil + } + return res +} +// GetInactiveHooks gets the inactive_hooks property value. The inactive_hooks property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_hooks) GetInactiveHooks()(*int32) { + return m.inactive_hooks +} +// GetTotalHooks gets the total_hooks property value. The total_hooks property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_hooks) GetTotalHooks()(*int32) { + return m.total_hooks +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_hooks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("active_hooks", m.GetActiveHooks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("inactive_hooks", m.GetInactiveHooks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_hooks", m.GetTotalHooks()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActiveHooks sets the active_hooks property value. The active_hooks property +func (m *ServerStatistics_ghe_stats_hooks) SetActiveHooks(value *int32)() { + m.active_hooks = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ServerStatistics_ghe_stats_hooks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetInactiveHooks sets the inactive_hooks property value. The inactive_hooks property +func (m *ServerStatistics_ghe_stats_hooks) SetInactiveHooks(value *int32)() { + m.inactive_hooks = value +} +// SetTotalHooks sets the total_hooks property value. The total_hooks property +func (m *ServerStatistics_ghe_stats_hooks) SetTotalHooks(value *int32)() { + m.total_hooks = value +} +type ServerStatistics_ghe_stats_hooksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveHooks()(*int32) + GetInactiveHooks()(*int32) + GetTotalHooks()(*int32) + SetActiveHooks(value *int32)() + SetInactiveHooks(value *int32)() + SetTotalHooks(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_issues.go b/pkg/github/models/server_statistics_ghe_stats_issues.go new file mode 100644 index 0000000..8e8b0eb --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_issues.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_issues struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The closed_issues property + closed_issues *int32 + // The open_issues property + open_issues *int32 + // The total_issues property + total_issues *int32 +} +// NewServerStatistics_ghe_stats_issues instantiates a new ServerStatistics_ghe_stats_issues and sets the default values. +func NewServerStatistics_ghe_stats_issues()(*ServerStatistics_ghe_stats_issues) { + m := &ServerStatistics_ghe_stats_issues{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_issuesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_issuesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_issues(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_issues) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClosedIssues gets the closed_issues property value. The closed_issues property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_issues) GetClosedIssues()(*int32) { + return m.closed_issues +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_issues) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["closed_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetClosedIssues(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["total_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalIssues(val) + } + return nil + } + return res +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_issues) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetTotalIssues gets the total_issues property value. The total_issues property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_issues) GetTotalIssues()(*int32) { + return m.total_issues +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_issues) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("closed_issues", m.GetClosedIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_issues", m.GetTotalIssues()) + 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 *ServerStatistics_ghe_stats_issues) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClosedIssues sets the closed_issues property value. The closed_issues property +func (m *ServerStatistics_ghe_stats_issues) SetClosedIssues(value *int32)() { + m.closed_issues = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *ServerStatistics_ghe_stats_issues) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetTotalIssues sets the total_issues property value. The total_issues property +func (m *ServerStatistics_ghe_stats_issues) SetTotalIssues(value *int32)() { + m.total_issues = value +} +type ServerStatistics_ghe_stats_issuesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedIssues()(*int32) + GetOpenIssues()(*int32) + GetTotalIssues()(*int32) + SetClosedIssues(value *int32)() + SetOpenIssues(value *int32)() + SetTotalIssues(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_milestones.go b/pkg/github/models/server_statistics_ghe_stats_milestones.go new file mode 100644 index 0000000..39c8a48 --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_milestones.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_milestones struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The closed_milestones property + closed_milestones *int32 + // The open_milestones property + open_milestones *int32 + // The total_milestones property + total_milestones *int32 +} +// NewServerStatistics_ghe_stats_milestones instantiates a new ServerStatistics_ghe_stats_milestones and sets the default values. +func NewServerStatistics_ghe_stats_milestones()(*ServerStatistics_ghe_stats_milestones) { + m := &ServerStatistics_ghe_stats_milestones{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_milestonesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_milestonesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_milestones(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_milestones) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClosedMilestones gets the closed_milestones property value. The closed_milestones property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_milestones) GetClosedMilestones()(*int32) { + return m.closed_milestones +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_milestones) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["closed_milestones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetClosedMilestones(val) + } + return nil + } + res["open_milestones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenMilestones(val) + } + return nil + } + res["total_milestones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMilestones(val) + } + return nil + } + return res +} +// GetOpenMilestones gets the open_milestones property value. The open_milestones property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_milestones) GetOpenMilestones()(*int32) { + return m.open_milestones +} +// GetTotalMilestones gets the total_milestones property value. The total_milestones property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_milestones) GetTotalMilestones()(*int32) { + return m.total_milestones +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_milestones) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("closed_milestones", m.GetClosedMilestones()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_milestones", m.GetOpenMilestones()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_milestones", m.GetTotalMilestones()) + 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 *ServerStatistics_ghe_stats_milestones) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClosedMilestones sets the closed_milestones property value. The closed_milestones property +func (m *ServerStatistics_ghe_stats_milestones) SetClosedMilestones(value *int32)() { + m.closed_milestones = value +} +// SetOpenMilestones sets the open_milestones property value. The open_milestones property +func (m *ServerStatistics_ghe_stats_milestones) SetOpenMilestones(value *int32)() { + m.open_milestones = value +} +// SetTotalMilestones sets the total_milestones property value. The total_milestones property +func (m *ServerStatistics_ghe_stats_milestones) SetTotalMilestones(value *int32)() { + m.total_milestones = value +} +type ServerStatistics_ghe_stats_milestonesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedMilestones()(*int32) + GetOpenMilestones()(*int32) + GetTotalMilestones()(*int32) + SetClosedMilestones(value *int32)() + SetOpenMilestones(value *int32)() + SetTotalMilestones(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_orgs.go b/pkg/github/models/server_statistics_ghe_stats_orgs.go new file mode 100644 index 0000000..857e4ab --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_orgs.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_orgs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The disabled_orgs property + disabled_orgs *int32 + // The total_orgs property + total_orgs *int32 + // The total_team_members property + total_team_members *int32 + // The total_teams property + total_teams *int32 +} +// NewServerStatistics_ghe_stats_orgs instantiates a new ServerStatistics_ghe_stats_orgs and sets the default values. +func NewServerStatistics_ghe_stats_orgs()(*ServerStatistics_ghe_stats_orgs) { + m := &ServerStatistics_ghe_stats_orgs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_orgsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_orgsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_orgs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_orgs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisabledOrgs gets the disabled_orgs property value. The disabled_orgs property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_orgs) GetDisabledOrgs()(*int32) { + return m.disabled_orgs +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_orgs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["disabled_orgs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDisabledOrgs(val) + } + return nil + } + res["total_orgs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalOrgs(val) + } + return nil + } + res["total_team_members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTeamMembers(val) + } + return nil + } + res["total_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTeams(val) + } + return nil + } + return res +} +// GetTotalOrgs gets the total_orgs property value. The total_orgs property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_orgs) GetTotalOrgs()(*int32) { + return m.total_orgs +} +// GetTotalTeamMembers gets the total_team_members property value. The total_team_members property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_orgs) GetTotalTeamMembers()(*int32) { + return m.total_team_members +} +// GetTotalTeams gets the total_teams property value. The total_teams property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_orgs) GetTotalTeams()(*int32) { + return m.total_teams +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_orgs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("disabled_orgs", m.GetDisabledOrgs()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_orgs", m.GetTotalOrgs()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_teams", m.GetTotalTeams()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_team_members", m.GetTotalTeamMembers()) + 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 *ServerStatistics_ghe_stats_orgs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisabledOrgs sets the disabled_orgs property value. The disabled_orgs property +func (m *ServerStatistics_ghe_stats_orgs) SetDisabledOrgs(value *int32)() { + m.disabled_orgs = value +} +// SetTotalOrgs sets the total_orgs property value. The total_orgs property +func (m *ServerStatistics_ghe_stats_orgs) SetTotalOrgs(value *int32)() { + m.total_orgs = value +} +// SetTotalTeamMembers sets the total_team_members property value. The total_team_members property +func (m *ServerStatistics_ghe_stats_orgs) SetTotalTeamMembers(value *int32)() { + m.total_team_members = value +} +// SetTotalTeams sets the total_teams property value. The total_teams property +func (m *ServerStatistics_ghe_stats_orgs) SetTotalTeams(value *int32)() { + m.total_teams = value +} +type ServerStatistics_ghe_stats_orgsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisabledOrgs()(*int32) + GetTotalOrgs()(*int32) + GetTotalTeamMembers()(*int32) + GetTotalTeams()(*int32) + SetDisabledOrgs(value *int32)() + SetTotalOrgs(value *int32)() + SetTotalTeamMembers(value *int32)() + SetTotalTeams(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_pages.go b/pkg/github/models/server_statistics_ghe_stats_pages.go new file mode 100644 index 0000000..c8e6afd --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_pages.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_pages struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_pages property + total_pages *int32 +} +// NewServerStatistics_ghe_stats_pages instantiates a new ServerStatistics_ghe_stats_pages and sets the default values. +func NewServerStatistics_ghe_stats_pages()(*ServerStatistics_ghe_stats_pages) { + m := &ServerStatistics_ghe_stats_pages{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_pagesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_pagesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_pages(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_pages) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_pages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPages(val) + } + return nil + } + return res +} +// GetTotalPages gets the total_pages property value. The total_pages property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_pages) GetTotalPages()(*int32) { + return m.total_pages +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_pages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_pages", m.GetTotalPages()) + 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 *ServerStatistics_ghe_stats_pages) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalPages sets the total_pages property value. The total_pages property +func (m *ServerStatistics_ghe_stats_pages) SetTotalPages(value *int32)() { + m.total_pages = value +} +type ServerStatistics_ghe_stats_pagesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalPages()(*int32) + SetTotalPages(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_pulls.go b/pkg/github/models/server_statistics_ghe_stats_pulls.go new file mode 100644 index 0000000..e317f18 --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_pulls.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_pulls struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The mergeable_pulls property + mergeable_pulls *int32 + // The merged_pulls property + merged_pulls *int32 + // The total_pulls property + total_pulls *int32 + // The unmergeable_pulls property + unmergeable_pulls *int32 +} +// NewServerStatistics_ghe_stats_pulls instantiates a new ServerStatistics_ghe_stats_pulls and sets the default values. +func NewServerStatistics_ghe_stats_pulls()(*ServerStatistics_ghe_stats_pulls) { + m := &ServerStatistics_ghe_stats_pulls{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_pullsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_pullsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_pulls(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_pulls) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_pulls) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["mergeable_pulls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMergeablePulls(val) + } + return nil + } + res["merged_pulls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMergedPulls(val) + } + return nil + } + res["total_pulls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPulls(val) + } + return nil + } + res["unmergeable_pulls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnmergeablePulls(val) + } + return nil + } + return res +} +// GetMergeablePulls gets the mergeable_pulls property value. The mergeable_pulls property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_pulls) GetMergeablePulls()(*int32) { + return m.mergeable_pulls +} +// GetMergedPulls gets the merged_pulls property value. The merged_pulls property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_pulls) GetMergedPulls()(*int32) { + return m.merged_pulls +} +// GetTotalPulls gets the total_pulls property value. The total_pulls property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_pulls) GetTotalPulls()(*int32) { + return m.total_pulls +} +// GetUnmergeablePulls gets the unmergeable_pulls property value. The unmergeable_pulls property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_pulls) GetUnmergeablePulls()(*int32) { + return m.unmergeable_pulls +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_pulls) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("mergeable_pulls", m.GetMergeablePulls()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("merged_pulls", m.GetMergedPulls()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_pulls", m.GetTotalPulls()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unmergeable_pulls", m.GetUnmergeablePulls()) + 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 *ServerStatistics_ghe_stats_pulls) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMergeablePulls sets the mergeable_pulls property value. The mergeable_pulls property +func (m *ServerStatistics_ghe_stats_pulls) SetMergeablePulls(value *int32)() { + m.mergeable_pulls = value +} +// SetMergedPulls sets the merged_pulls property value. The merged_pulls property +func (m *ServerStatistics_ghe_stats_pulls) SetMergedPulls(value *int32)() { + m.merged_pulls = value +} +// SetTotalPulls sets the total_pulls property value. The total_pulls property +func (m *ServerStatistics_ghe_stats_pulls) SetTotalPulls(value *int32)() { + m.total_pulls = value +} +// SetUnmergeablePulls sets the unmergeable_pulls property value. The unmergeable_pulls property +func (m *ServerStatistics_ghe_stats_pulls) SetUnmergeablePulls(value *int32)() { + m.unmergeable_pulls = value +} +type ServerStatistics_ghe_stats_pullsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMergeablePulls()(*int32) + GetMergedPulls()(*int32) + GetTotalPulls()(*int32) + GetUnmergeablePulls()(*int32) + SetMergeablePulls(value *int32)() + SetMergedPulls(value *int32)() + SetTotalPulls(value *int32)() + SetUnmergeablePulls(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_repos.go b/pkg/github/models/server_statistics_ghe_stats_repos.go new file mode 100644 index 0000000..0bfd520 --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_repos.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_repos struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fork_repos property + fork_repos *int32 + // The org_repos property + org_repos *int32 + // The root_repos property + root_repos *int32 + // The total_pushes property + total_pushes *int32 + // The total_repos property + total_repos *int32 + // The total_wikis property + total_wikis *int32 +} +// NewServerStatistics_ghe_stats_repos instantiates a new ServerStatistics_ghe_stats_repos and sets the default values. +func NewServerStatistics_ghe_stats_repos()(*ServerStatistics_ghe_stats_repos) { + m := &ServerStatistics_ghe_stats_repos{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_reposFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_reposFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_repos(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_repos) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_repos) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fork_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForkRepos(val) + } + return nil + } + res["org_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrgRepos(val) + } + return nil + } + res["root_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRootRepos(val) + } + return nil + } + res["total_pushes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPushes(val) + } + return nil + } + res["total_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalRepos(val) + } + return nil + } + res["total_wikis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalWikis(val) + } + return nil + } + return res +} +// GetForkRepos gets the fork_repos property value. The fork_repos property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_repos) GetForkRepos()(*int32) { + return m.fork_repos +} +// GetOrgRepos gets the org_repos property value. The org_repos property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_repos) GetOrgRepos()(*int32) { + return m.org_repos +} +// GetRootRepos gets the root_repos property value. The root_repos property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_repos) GetRootRepos()(*int32) { + return m.root_repos +} +// GetTotalPushes gets the total_pushes property value. The total_pushes property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_repos) GetTotalPushes()(*int32) { + return m.total_pushes +} +// GetTotalRepos gets the total_repos property value. The total_repos property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_repos) GetTotalRepos()(*int32) { + return m.total_repos +} +// GetTotalWikis gets the total_wikis property value. The total_wikis property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_repos) GetTotalWikis()(*int32) { + return m.total_wikis +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_repos) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("fork_repos", m.GetForkRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("org_repos", m.GetOrgRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("root_repos", m.GetRootRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_pushes", m.GetTotalPushes()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_repos", m.GetTotalRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_wikis", m.GetTotalWikis()) + 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 *ServerStatistics_ghe_stats_repos) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetForkRepos sets the fork_repos property value. The fork_repos property +func (m *ServerStatistics_ghe_stats_repos) SetForkRepos(value *int32)() { + m.fork_repos = value +} +// SetOrgRepos sets the org_repos property value. The org_repos property +func (m *ServerStatistics_ghe_stats_repos) SetOrgRepos(value *int32)() { + m.org_repos = value +} +// SetRootRepos sets the root_repos property value. The root_repos property +func (m *ServerStatistics_ghe_stats_repos) SetRootRepos(value *int32)() { + m.root_repos = value +} +// SetTotalPushes sets the total_pushes property value. The total_pushes property +func (m *ServerStatistics_ghe_stats_repos) SetTotalPushes(value *int32)() { + m.total_pushes = value +} +// SetTotalRepos sets the total_repos property value. The total_repos property +func (m *ServerStatistics_ghe_stats_repos) SetTotalRepos(value *int32)() { + m.total_repos = value +} +// SetTotalWikis sets the total_wikis property value. The total_wikis property +func (m *ServerStatistics_ghe_stats_repos) SetTotalWikis(value *int32)() { + m.total_wikis = value +} +type ServerStatistics_ghe_stats_reposable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetForkRepos()(*int32) + GetOrgRepos()(*int32) + GetRootRepos()(*int32) + GetTotalPushes()(*int32) + GetTotalRepos()(*int32) + GetTotalWikis()(*int32) + SetForkRepos(value *int32)() + SetOrgRepos(value *int32)() + SetRootRepos(value *int32)() + SetTotalPushes(value *int32)() + SetTotalRepos(value *int32)() + SetTotalWikis(value *int32)() +} diff --git a/pkg/github/models/server_statistics_ghe_stats_users.go b/pkg/github/models/server_statistics_ghe_stats_users.go new file mode 100644 index 0000000..45a1d7b --- /dev/null +++ b/pkg/github/models/server_statistics_ghe_stats_users.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_ghe_stats_users struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin_users property + admin_users *int32 + // The suspended_users property + suspended_users *int32 + // The total_users property + total_users *int32 +} +// NewServerStatistics_ghe_stats_users instantiates a new ServerStatistics_ghe_stats_users and sets the default values. +func NewServerStatistics_ghe_stats_users()(*ServerStatistics_ghe_stats_users) { + m := &ServerStatistics_ghe_stats_users{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_ghe_stats_usersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_ghe_stats_usersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_ghe_stats_users(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_ghe_stats_users) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdminUsers gets the admin_users property value. The admin_users property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_users) GetAdminUsers()(*int32) { + return m.admin_users +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_ghe_stats_users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAdminUsers(val) + } + return nil + } + res["suspended_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuspendedUsers(val) + } + return nil + } + res["total_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUsers(val) + } + return nil + } + return res +} +// GetSuspendedUsers gets the suspended_users property value. The suspended_users property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_users) GetSuspendedUsers()(*int32) { + return m.suspended_users +} +// GetTotalUsers gets the total_users property value. The total_users property +// returns a *int32 when successful +func (m *ServerStatistics_ghe_stats_users) GetTotalUsers()(*int32) { + return m.total_users +} +// Serialize serializes information the current object +func (m *ServerStatistics_ghe_stats_users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("admin_users", m.GetAdminUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("suspended_users", m.GetSuspendedUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_users", m.GetTotalUsers()) + 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 *ServerStatistics_ghe_stats_users) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdminUsers sets the admin_users property value. The admin_users property +func (m *ServerStatistics_ghe_stats_users) SetAdminUsers(value *int32)() { + m.admin_users = value +} +// SetSuspendedUsers sets the suspended_users property value. The suspended_users property +func (m *ServerStatistics_ghe_stats_users) SetSuspendedUsers(value *int32)() { + m.suspended_users = value +} +// SetTotalUsers sets the total_users property value. The total_users property +func (m *ServerStatistics_ghe_stats_users) SetTotalUsers(value *int32)() { + m.total_users = value +} +type ServerStatistics_ghe_stats_usersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdminUsers()(*int32) + GetSuspendedUsers()(*int32) + GetTotalUsers()(*int32) + SetAdminUsers(value *int32)() + SetSuspendedUsers(value *int32)() + SetTotalUsers(value *int32)() +} diff --git a/pkg/github/models/server_statistics_github_connect.go b/pkg/github/models/server_statistics_github_connect.go new file mode 100644 index 0000000..0f2f111 --- /dev/null +++ b/pkg/github/models/server_statistics_github_connect.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatistics_github_connect struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The features_enabled property + features_enabled []string +} +// NewServerStatistics_github_connect instantiates a new ServerStatistics_github_connect and sets the default values. +func NewServerStatistics_github_connect()(*ServerStatistics_github_connect) { + m := &ServerStatistics_github_connect{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatistics_github_connectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatistics_github_connectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatistics_github_connect(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatistics_github_connect) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFeaturesEnabled gets the features_enabled property value. The features_enabled property +// returns a []string when successful +func (m *ServerStatistics_github_connect) GetFeaturesEnabled()([]string) { + return m.features_enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatistics_github_connect) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["features_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetFeaturesEnabled(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ServerStatistics_github_connect) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFeaturesEnabled() != nil { + err := writer.WriteCollectionOfStringValues("features_enabled", m.GetFeaturesEnabled()) + 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 *ServerStatistics_github_connect) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFeaturesEnabled sets the features_enabled property value. The features_enabled property +func (m *ServerStatistics_github_connect) SetFeaturesEnabled(value []string)() { + m.features_enabled = value +} +type ServerStatistics_github_connectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeaturesEnabled()([]string) + SetFeaturesEnabled(value []string)() +} diff --git a/pkg/github/models/server_statistics_packages.go b/pkg/github/models/server_statistics_packages.go new file mode 100644 index 0000000..cf3f1ac --- /dev/null +++ b/pkg/github/models/server_statistics_packages.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServerStatisticsPackages packages metrics that are included in the Server Statistics payload/export from GHES +type ServerStatisticsPackages struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The details of the package ecosystems that are enabled in a GHES installation + ecosystems []ServerStatisticsPackages_ecosystemsable + // Whether GitHub Packages is enabled globally in a GHES installation + registry_enabled *bool + // Whether a beta registry is enabled in a GHES installation + registry_v2_enabled *bool +} +// NewServerStatisticsPackages instantiates a new ServerStatisticsPackages and sets the default values. +func NewServerStatisticsPackages()(*ServerStatisticsPackages) { + m := &ServerStatisticsPackages{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatisticsPackagesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatisticsPackagesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatisticsPackages(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatisticsPackages) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEcosystems gets the ecosystems property value. The details of the package ecosystems that are enabled in a GHES installation +// returns a []ServerStatisticsPackages_ecosystemsable when successful +func (m *ServerStatisticsPackages) GetEcosystems()([]ServerStatisticsPackages_ecosystemsable) { + return m.ecosystems +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatisticsPackages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServerStatisticsPackages_ecosystemsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServerStatisticsPackages_ecosystemsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ServerStatisticsPackages_ecosystemsable) + } + } + m.SetEcosystems(res) + } + return nil + } + res["registry_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryEnabled(val) + } + return nil + } + res["registry_v2_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryV2Enabled(val) + } + return nil + } + return res +} +// GetRegistryEnabled gets the registry_enabled property value. Whether GitHub Packages is enabled globally in a GHES installation +// returns a *bool when successful +func (m *ServerStatisticsPackages) GetRegistryEnabled()(*bool) { + return m.registry_enabled +} +// GetRegistryV2Enabled gets the registry_v2_enabled property value. Whether a beta registry is enabled in a GHES installation +// returns a *bool when successful +func (m *ServerStatisticsPackages) GetRegistryV2Enabled()(*bool) { + return m.registry_v2_enabled +} +// Serialize serializes information the current object +func (m *ServerStatisticsPackages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEcosystems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEcosystems())) + for i, v := range m.GetEcosystems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("ecosystems", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("registry_enabled", m.GetRegistryEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("registry_v2_enabled", m.GetRegistryV2Enabled()) + 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 *ServerStatisticsPackages) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEcosystems sets the ecosystems property value. The details of the package ecosystems that are enabled in a GHES installation +func (m *ServerStatisticsPackages) SetEcosystems(value []ServerStatisticsPackages_ecosystemsable)() { + m.ecosystems = value +} +// SetRegistryEnabled sets the registry_enabled property value. Whether GitHub Packages is enabled globally in a GHES installation +func (m *ServerStatisticsPackages) SetRegistryEnabled(value *bool)() { + m.registry_enabled = value +} +// SetRegistryV2Enabled sets the registry_v2_enabled property value. Whether a beta registry is enabled in a GHES installation +func (m *ServerStatisticsPackages) SetRegistryV2Enabled(value *bool)() { + m.registry_v2_enabled = value +} +type ServerStatisticsPackagesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystems()([]ServerStatisticsPackages_ecosystemsable) + GetRegistryEnabled()(*bool) + GetRegistryV2Enabled()(*bool) + SetEcosystems(value []ServerStatisticsPackages_ecosystemsable)() + SetRegistryEnabled(value *bool)() + SetRegistryV2Enabled(value *bool)() +} diff --git a/pkg/github/models/server_statistics_packages_ecosystems.go b/pkg/github/models/server_statistics_packages_ecosystems.go new file mode 100644 index 0000000..109fc64 --- /dev/null +++ b/pkg/github/models/server_statistics_packages_ecosystems.go @@ -0,0 +1,401 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ServerStatisticsPackages_ecosystems struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total number of packages in an ecosystem that have been created in the 24 hours prior to `collection_date` for a GHES installation + daily_create_count *int32 + // The total number of packages in an ecosystem that have been deleted in the 24 hours prior to `collection_date` for a GHES installation + daily_delete_count *int32 + // The total number of packages in an ecosystem that have been downloaded in the 24 hours prior to `collection_date` for a GHES installation + daily_download_count *int32 + // The total number of packages in an ecosystem that have been updated in the 24 hours prior to `collection_date` for a GHES installation + daily_update_count *int32 + // Shows if a package system is enabled, disabled, or read-only in a GHES installation + enabled *ServerStatisticsPackages_ecosystems_enabled + // The total number of internal packages in a package ecosystem in a GHES installation + internal_packages_count *int32 + // The name of the package ecosystem + name *ServerStatisticsPackages_ecosystems_name + // The total number of organization packages in a package ecosystem in a GHES installation + organization_packages_count *int32 + // The total number of private packages in a package ecosystem in a GHES installation + private_packages_count *int32 + // The total number of public packages in a package ecosystem in a GHES installation + public_packages_count *int32 + // The total number of published packages in a package ecosystem in a GHES installation + published_packages_count *int32 + // The total number of user packages in a package ecosystem in a GHES installation + user_packages_count *int32 +} +// NewServerStatisticsPackages_ecosystems instantiates a new ServerStatisticsPackages_ecosystems and sets the default values. +func NewServerStatisticsPackages_ecosystems()(*ServerStatisticsPackages_ecosystems) { + m := &ServerStatisticsPackages_ecosystems{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateServerStatisticsPackages_ecosystemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateServerStatisticsPackages_ecosystemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerStatisticsPackages_ecosystems(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ServerStatisticsPackages_ecosystems) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDailyCreateCount gets the daily_create_count property value. The total number of packages in an ecosystem that have been created in the 24 hours prior to `collection_date` for a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetDailyCreateCount()(*int32) { + return m.daily_create_count +} +// GetDailyDeleteCount gets the daily_delete_count property value. The total number of packages in an ecosystem that have been deleted in the 24 hours prior to `collection_date` for a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetDailyDeleteCount()(*int32) { + return m.daily_delete_count +} +// GetDailyDownloadCount gets the daily_download_count property value. The total number of packages in an ecosystem that have been downloaded in the 24 hours prior to `collection_date` for a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetDailyDownloadCount()(*int32) { + return m.daily_download_count +} +// GetDailyUpdateCount gets the daily_update_count property value. The total number of packages in an ecosystem that have been updated in the 24 hours prior to `collection_date` for a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetDailyUpdateCount()(*int32) { + return m.daily_update_count +} +// GetEnabled gets the enabled property value. Shows if a package system is enabled, disabled, or read-only in a GHES installation +// returns a *ServerStatisticsPackages_ecosystems_enabled when successful +func (m *ServerStatisticsPackages_ecosystems) GetEnabled()(*ServerStatisticsPackages_ecosystems_enabled) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ServerStatisticsPackages_ecosystems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["daily_create_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDailyCreateCount(val) + } + return nil + } + res["daily_delete_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDailyDeleteCount(val) + } + return nil + } + res["daily_download_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDailyDownloadCount(val) + } + return nil + } + res["daily_update_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDailyUpdateCount(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServerStatisticsPackages_ecosystems_enabled) + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val.(*ServerStatisticsPackages_ecosystems_enabled)) + } + return nil + } + res["internal_packages_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInternalPackagesCount(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServerStatisticsPackages_ecosystems_name) + if err != nil { + return err + } + if val != nil { + m.SetName(val.(*ServerStatisticsPackages_ecosystems_name)) + } + return nil + } + res["organization_packages_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPackagesCount(val) + } + return nil + } + res["private_packages_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivatePackagesCount(val) + } + return nil + } + res["public_packages_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicPackagesCount(val) + } + return nil + } + res["published_packages_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublishedPackagesCount(val) + } + return nil + } + res["user_packages_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUserPackagesCount(val) + } + return nil + } + return res +} +// GetInternalPackagesCount gets the internal_packages_count property value. The total number of internal packages in a package ecosystem in a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetInternalPackagesCount()(*int32) { + return m.internal_packages_count +} +// GetName gets the name property value. The name of the package ecosystem +// returns a *ServerStatisticsPackages_ecosystems_name when successful +func (m *ServerStatisticsPackages_ecosystems) GetName()(*ServerStatisticsPackages_ecosystems_name) { + return m.name +} +// GetOrganizationPackagesCount gets the organization_packages_count property value. The total number of organization packages in a package ecosystem in a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetOrganizationPackagesCount()(*int32) { + return m.organization_packages_count +} +// GetPrivatePackagesCount gets the private_packages_count property value. The total number of private packages in a package ecosystem in a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetPrivatePackagesCount()(*int32) { + return m.private_packages_count +} +// GetPublicPackagesCount gets the public_packages_count property value. The total number of public packages in a package ecosystem in a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetPublicPackagesCount()(*int32) { + return m.public_packages_count +} +// GetPublishedPackagesCount gets the published_packages_count property value. The total number of published packages in a package ecosystem in a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetPublishedPackagesCount()(*int32) { + return m.published_packages_count +} +// GetUserPackagesCount gets the user_packages_count property value. The total number of user packages in a package ecosystem in a GHES installation +// returns a *int32 when successful +func (m *ServerStatisticsPackages_ecosystems) GetUserPackagesCount()(*int32) { + return m.user_packages_count +} +// Serialize serializes information the current object +func (m *ServerStatisticsPackages_ecosystems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("daily_create_count", m.GetDailyCreateCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("daily_delete_count", m.GetDailyDeleteCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("daily_download_count", m.GetDailyDownloadCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("daily_update_count", m.GetDailyUpdateCount()) + if err != nil { + return err + } + } + if m.GetEnabled() != nil { + cast := (*m.GetEnabled()).String() + err := writer.WriteStringValue("enabled", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("internal_packages_count", m.GetInternalPackagesCount()) + if err != nil { + return err + } + } + if m.GetName() != nil { + cast := (*m.GetName()).String() + err := writer.WriteStringValue("name", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("organization_packages_count", m.GetOrganizationPackagesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_packages_count", m.GetPrivatePackagesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_packages_count", m.GetPublicPackagesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("published_packages_count", m.GetPublishedPackagesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("user_packages_count", m.GetUserPackagesCount()) + 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 *ServerStatisticsPackages_ecosystems) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDailyCreateCount sets the daily_create_count property value. The total number of packages in an ecosystem that have been created in the 24 hours prior to `collection_date` for a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetDailyCreateCount(value *int32)() { + m.daily_create_count = value +} +// SetDailyDeleteCount sets the daily_delete_count property value. The total number of packages in an ecosystem that have been deleted in the 24 hours prior to `collection_date` for a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetDailyDeleteCount(value *int32)() { + m.daily_delete_count = value +} +// SetDailyDownloadCount sets the daily_download_count property value. The total number of packages in an ecosystem that have been downloaded in the 24 hours prior to `collection_date` for a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetDailyDownloadCount(value *int32)() { + m.daily_download_count = value +} +// SetDailyUpdateCount sets the daily_update_count property value. The total number of packages in an ecosystem that have been updated in the 24 hours prior to `collection_date` for a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetDailyUpdateCount(value *int32)() { + m.daily_update_count = value +} +// SetEnabled sets the enabled property value. Shows if a package system is enabled, disabled, or read-only in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetEnabled(value *ServerStatisticsPackages_ecosystems_enabled)() { + m.enabled = value +} +// SetInternalPackagesCount sets the internal_packages_count property value. The total number of internal packages in a package ecosystem in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetInternalPackagesCount(value *int32)() { + m.internal_packages_count = value +} +// SetName sets the name property value. The name of the package ecosystem +func (m *ServerStatisticsPackages_ecosystems) SetName(value *ServerStatisticsPackages_ecosystems_name)() { + m.name = value +} +// SetOrganizationPackagesCount sets the organization_packages_count property value. The total number of organization packages in a package ecosystem in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetOrganizationPackagesCount(value *int32)() { + m.organization_packages_count = value +} +// SetPrivatePackagesCount sets the private_packages_count property value. The total number of private packages in a package ecosystem in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetPrivatePackagesCount(value *int32)() { + m.private_packages_count = value +} +// SetPublicPackagesCount sets the public_packages_count property value. The total number of public packages in a package ecosystem in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetPublicPackagesCount(value *int32)() { + m.public_packages_count = value +} +// SetPublishedPackagesCount sets the published_packages_count property value. The total number of published packages in a package ecosystem in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetPublishedPackagesCount(value *int32)() { + m.published_packages_count = value +} +// SetUserPackagesCount sets the user_packages_count property value. The total number of user packages in a package ecosystem in a GHES installation +func (m *ServerStatisticsPackages_ecosystems) SetUserPackagesCount(value *int32)() { + m.user_packages_count = value +} +type ServerStatisticsPackages_ecosystemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDailyCreateCount()(*int32) + GetDailyDeleteCount()(*int32) + GetDailyDownloadCount()(*int32) + GetDailyUpdateCount()(*int32) + GetEnabled()(*ServerStatisticsPackages_ecosystems_enabled) + GetInternalPackagesCount()(*int32) + GetName()(*ServerStatisticsPackages_ecosystems_name) + GetOrganizationPackagesCount()(*int32) + GetPrivatePackagesCount()(*int32) + GetPublicPackagesCount()(*int32) + GetPublishedPackagesCount()(*int32) + GetUserPackagesCount()(*int32) + SetDailyCreateCount(value *int32)() + SetDailyDeleteCount(value *int32)() + SetDailyDownloadCount(value *int32)() + SetDailyUpdateCount(value *int32)() + SetEnabled(value *ServerStatisticsPackages_ecosystems_enabled)() + SetInternalPackagesCount(value *int32)() + SetName(value *ServerStatisticsPackages_ecosystems_name)() + SetOrganizationPackagesCount(value *int32)() + SetPrivatePackagesCount(value *int32)() + SetPublicPackagesCount(value *int32)() + SetPublishedPackagesCount(value *int32)() + SetUserPackagesCount(value *int32)() +} diff --git a/pkg/github/models/server_statistics_packages_ecosystems_enabled.go b/pkg/github/models/server_statistics_packages_ecosystems_enabled.go new file mode 100644 index 0000000..e783bd1 --- /dev/null +++ b/pkg/github/models/server_statistics_packages_ecosystems_enabled.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Shows if a package system is enabled, disabled, or read-only in a GHES installation +type ServerStatisticsPackages_ecosystems_enabled int + +const ( + TRUE_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED ServerStatisticsPackages_ecosystems_enabled = iota + FALSE_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED + READONLY_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED +) + +func (i ServerStatisticsPackages_ecosystems_enabled) String() string { + return []string{"TRUE", "FALSE", "READONLY"}[i] +} +func ParseServerStatisticsPackages_ecosystems_enabled(v string) (any, error) { + result := TRUE_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED + switch v { + case "TRUE": + result = TRUE_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED + case "FALSE": + result = FALSE_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED + case "READONLY": + result = READONLY_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_ENABLED + default: + return 0, errors.New("Unknown ServerStatisticsPackages_ecosystems_enabled value: " + v) + } + return &result, nil +} +func SerializeServerStatisticsPackages_ecosystems_enabled(values []ServerStatisticsPackages_ecosystems_enabled) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ServerStatisticsPackages_ecosystems_enabled) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/server_statistics_packages_ecosystems_name.go b/pkg/github/models/server_statistics_packages_ecosystems_name.go new file mode 100644 index 0000000..b9e285d --- /dev/null +++ b/pkg/github/models/server_statistics_packages_ecosystems_name.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The name of the package ecosystem +type ServerStatisticsPackages_ecosystems_name int + +const ( + NPM_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME ServerStatisticsPackages_ecosystems_name = iota + MAVEN_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + DOCKER_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + NUGET_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + RUBYGEMS_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + CONTAINERS_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME +) + +func (i ServerStatisticsPackages_ecosystems_name) String() string { + return []string{"npm", "maven", "docker", "nuget", "rubygems", "containers"}[i] +} +func ParseServerStatisticsPackages_ecosystems_name(v string) (any, error) { + result := NPM_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + switch v { + case "npm": + result = NPM_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + case "maven": + result = MAVEN_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + case "docker": + result = DOCKER_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + case "nuget": + result = NUGET_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + case "rubygems": + result = RUBYGEMS_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + case "containers": + result = CONTAINERS_SERVERSTATISTICSPACKAGES_ECOSYSTEMS_NAME + default: + return 0, errors.New("Unknown ServerStatisticsPackages_ecosystems_name value: " + v) + } + return &result, nil +} +func SerializeServerStatisticsPackages_ecosystems_name(values []ServerStatisticsPackages_ecosystems_name) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ServerStatisticsPackages_ecosystems_name) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/short_blob.go b/pkg/github/models/short_blob.go new file mode 100644 index 0000000..56966b1 --- /dev/null +++ b/pkg/github/models/short_blob.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ShortBlob short Blob +type ShortBlob struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewShortBlob instantiates a new ShortBlob and sets the default values. +func NewShortBlob()(*ShortBlob) { + m := &ShortBlob{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateShortBlobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateShortBlobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewShortBlob(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ShortBlob) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ShortBlob) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *ShortBlob) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ShortBlob) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ShortBlob) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ShortBlob) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *ShortBlob) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *ShortBlob) SetUrl(value *string)() { + m.url = value +} +type ShortBlobable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/short_branch.go b/pkg/github/models/short_branch.go new file mode 100644 index 0000000..b60d286 --- /dev/null +++ b/pkg/github/models/short_branch.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ShortBranch short Branch +type ShortBranch struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit property + commit ShortBranch_commitable + // The name property + name *string + // The protected property + protected *bool + // Branch Protection + protection BranchProtectionable + // The protection_url property + protection_url *string +} +// NewShortBranch instantiates a new ShortBranch and sets the default values. +func NewShortBranch()(*ShortBranch) { + m := &ShortBranch{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateShortBranchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateShortBranchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewShortBranch(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ShortBranch) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommit gets the commit property value. The commit property +// returns a ShortBranch_commitable when successful +func (m *ShortBranch) GetCommit()(ShortBranch_commitable) { + return m.commit +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ShortBranch) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateShortBranch_commitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(ShortBranch_commitable)) + } + 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["protected"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProtected(val) + } + return nil + } + res["protection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBranchProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProtection(val.(BranchProtectionable)) + } + return nil + } + res["protection_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProtectionUrl(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ShortBranch) GetName()(*string) { + return m.name +} +// GetProtected gets the protected property value. The protected property +// returns a *bool when successful +func (m *ShortBranch) GetProtected()(*bool) { + return m.protected +} +// GetProtection gets the protection property value. Branch Protection +// returns a BranchProtectionable when successful +func (m *ShortBranch) GetProtection()(BranchProtectionable) { + return m.protection +} +// GetProtectionUrl gets the protection_url property value. The protection_url property +// returns a *string when successful +func (m *ShortBranch) GetProtectionUrl()(*string) { + return m.protection_url +} +// Serialize serializes information the current object +func (m *ShortBranch) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("protected", m.GetProtected()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("protection", m.GetProtection()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("protection_url", m.GetProtectionUrl()) + 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 *ShortBranch) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommit sets the commit property value. The commit property +func (m *ShortBranch) SetCommit(value ShortBranch_commitable)() { + m.commit = value +} +// SetName sets the name property value. The name property +func (m *ShortBranch) SetName(value *string)() { + m.name = value +} +// SetProtected sets the protected property value. The protected property +func (m *ShortBranch) SetProtected(value *bool)() { + m.protected = value +} +// SetProtection sets the protection property value. Branch Protection +func (m *ShortBranch) SetProtection(value BranchProtectionable)() { + m.protection = value +} +// SetProtectionUrl sets the protection_url property value. The protection_url property +func (m *ShortBranch) SetProtectionUrl(value *string)() { + m.protection_url = value +} +type ShortBranchable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommit()(ShortBranch_commitable) + GetName()(*string) + GetProtected()(*bool) + GetProtection()(BranchProtectionable) + GetProtectionUrl()(*string) + SetCommit(value ShortBranch_commitable)() + SetName(value *string)() + SetProtected(value *bool)() + SetProtection(value BranchProtectionable)() + SetProtectionUrl(value *string)() +} diff --git a/pkg/github/models/short_branch_commit.go b/pkg/github/models/short_branch_commit.go new file mode 100644 index 0000000..292c4ad --- /dev/null +++ b/pkg/github/models/short_branch_commit.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ShortBranch_commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewShortBranch_commit instantiates a new ShortBranch_commit and sets the default values. +func NewShortBranch_commit()(*ShortBranch_commit) { + m := &ShortBranch_commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateShortBranch_commitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateShortBranch_commitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewShortBranch_commit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ShortBranch_commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ShortBranch_commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *ShortBranch_commit) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ShortBranch_commit) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ShortBranch_commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ShortBranch_commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *ShortBranch_commit) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *ShortBranch_commit) SetUrl(value *string)() { + m.url = value +} +type ShortBranch_commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0.go b/pkg/github/models/sigstore_bundle0.go new file mode 100644 index 0000000..45c6d51 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SigstoreBundle0 sigstore Bundle v0.1 +type SigstoreBundle0 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dsseEnvelope property + dsseEnvelope SigstoreBundle0_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial SigstoreBundle0_verificationMaterialable +} +// NewSigstoreBundle0 instantiates a new SigstoreBundle0 and sets the default values. +func NewSigstoreBundle0()(*SigstoreBundle0) { + m := &SigstoreBundle0{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a SigstoreBundle0_dsseEnvelopeable when successful +func (m *SigstoreBundle0) GetDsseEnvelope()(SigstoreBundle0_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(SigstoreBundle0_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(SigstoreBundle0_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *SigstoreBundle0) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a SigstoreBundle0_verificationMaterialable when successful +func (m *SigstoreBundle0) GetVerificationMaterial()(SigstoreBundle0_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *SigstoreBundle0) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *SigstoreBundle0) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *SigstoreBundle0) SetDsseEnvelope(value SigstoreBundle0_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *SigstoreBundle0) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *SigstoreBundle0) SetVerificationMaterial(value SigstoreBundle0_verificationMaterialable)() { + m.verificationMaterial = value +} +type SigstoreBundle0able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(SigstoreBundle0_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(SigstoreBundle0_verificationMaterialable) + SetDsseEnvelope(value SigstoreBundle0_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value SigstoreBundle0_verificationMaterialable)() +} diff --git a/pkg/github/models/sigstore_bundle0_dsse_envelope.go b/pkg/github/models/sigstore_bundle0_dsse_envelope.go new file mode 100644 index 0000000..dbfa43c --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_dsse_envelope.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The payload property + payload *string + // The payloadType property + payloadType *string + // The signatures property + signatures []SigstoreBundle0_dsseEnvelope_signaturesable +} +// NewSigstoreBundle0_dsseEnvelope instantiates a new SigstoreBundle0_dsseEnvelope and sets the default values. +func NewSigstoreBundle0_dsseEnvelope()(*SigstoreBundle0_dsseEnvelope) { + m := &SigstoreBundle0_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_dsseEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_dsseEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["payloadType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadType(val) + } + return nil + } + res["signatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SigstoreBundle0_dsseEnvelope_signaturesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SigstoreBundle0_dsseEnvelope_signaturesable) + } + } + m.SetSignatures(res) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope) GetPayload()(*string) { + return m.payload +} +// GetPayloadType gets the payloadType property value. The payloadType property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope) GetPayloadType()(*string) { + return m.payloadType +} +// GetSignatures gets the signatures property value. The signatures property +// returns a []SigstoreBundle0_dsseEnvelope_signaturesable when successful +func (m *SigstoreBundle0_dsseEnvelope) GetSignatures()([]SigstoreBundle0_dsseEnvelope_signaturesable) { + return m.signatures +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("payloadType", m.GetPayloadType()) + if err != nil { + return err + } + } + if m.GetSignatures() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSignatures())) + for i, v := range m.GetSignatures() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("signatures", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SigstoreBundle0_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPayload sets the payload property value. The payload property +func (m *SigstoreBundle0_dsseEnvelope) SetPayload(value *string)() { + m.payload = value +} +// SetPayloadType sets the payloadType property value. The payloadType property +func (m *SigstoreBundle0_dsseEnvelope) SetPayloadType(value *string)() { + m.payloadType = value +} +// SetSignatures sets the signatures property value. The signatures property +func (m *SigstoreBundle0_dsseEnvelope) SetSignatures(value []SigstoreBundle0_dsseEnvelope_signaturesable)() { + m.signatures = value +} +type SigstoreBundle0_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()(*string) + GetPayloadType()(*string) + GetSignatures()([]SigstoreBundle0_dsseEnvelope_signaturesable) + SetPayload(value *string)() + SetPayloadType(value *string)() + SetSignatures(value []SigstoreBundle0_dsseEnvelope_signaturesable)() +} diff --git a/pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go b/pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go new file mode 100644 index 0000000..92c1cf2 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_dsseEnvelope_signatures struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The keyid property + keyid *string + // The sig property + sig *string +} +// NewSigstoreBundle0_dsseEnvelope_signatures instantiates a new SigstoreBundle0_dsseEnvelope_signatures and sets the default values. +func NewSigstoreBundle0_dsseEnvelope_signatures()(*SigstoreBundle0_dsseEnvelope_signatures) { + m := &SigstoreBundle0_dsseEnvelope_signatures{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_dsseEnvelope_signatures(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_dsseEnvelope_signatures) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_dsseEnvelope_signatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["keyid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyid(val) + } + return nil + } + res["sig"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSig(val) + } + return nil + } + return res +} +// GetKeyid gets the keyid property value. The keyid property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope_signatures) GetKeyid()(*string) { + return m.keyid +} +// GetSig gets the sig property value. The sig property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope_signatures) GetSig()(*string) { + return m.sig +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_dsseEnvelope_signatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("keyid", m.GetKeyid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sig", m.GetSig()) + 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 *SigstoreBundle0_dsseEnvelope_signatures) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKeyid sets the keyid property value. The keyid property +func (m *SigstoreBundle0_dsseEnvelope_signatures) SetKeyid(value *string)() { + m.keyid = value +} +// SetSig sets the sig property value. The sig property +func (m *SigstoreBundle0_dsseEnvelope_signatures) SetSig(value *string)() { + m.sig = value +} +type SigstoreBundle0_dsseEnvelope_signaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKeyid()(*string) + GetSig()(*string) + SetKeyid(value *string)() + SetSig(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material.go b/pkg/github/models/sigstore_bundle0_verification_material.go new file mode 100644 index 0000000..a80a426 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The timestampVerificationData property + timestampVerificationData *string + // The tlogEntries property + tlogEntries []SigstoreBundle0_verificationMaterial_tlogEntriesable + // The x509CertificateChain property + x509CertificateChain SigstoreBundle0_verificationMaterial_x509CertificateChainable +} +// NewSigstoreBundle0_verificationMaterial instantiates a new SigstoreBundle0_verificationMaterial and sets the default values. +func NewSigstoreBundle0_verificationMaterial()(*SigstoreBundle0_verificationMaterial) { + m := &SigstoreBundle0_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["timestampVerificationData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestampVerificationData(val) + } + return nil + } + res["tlogEntries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SigstoreBundle0_verificationMaterial_tlogEntriesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SigstoreBundle0_verificationMaterial_tlogEntriesable) + } + } + m.SetTlogEntries(res) + } + return nil + } + res["x509CertificateChain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetX509CertificateChain(val.(SigstoreBundle0_verificationMaterial_x509CertificateChainable)) + } + return nil + } + return res +} +// GetTimestampVerificationData gets the timestampVerificationData property value. The timestampVerificationData property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial) GetTimestampVerificationData()(*string) { + return m.timestampVerificationData +} +// GetTlogEntries gets the tlogEntries property value. The tlogEntries property +// returns a []SigstoreBundle0_verificationMaterial_tlogEntriesable when successful +func (m *SigstoreBundle0_verificationMaterial) GetTlogEntries()([]SigstoreBundle0_verificationMaterial_tlogEntriesable) { + return m.tlogEntries +} +// GetX509CertificateChain gets the x509CertificateChain property value. The x509CertificateChain property +// returns a SigstoreBundle0_verificationMaterial_x509CertificateChainable when successful +func (m *SigstoreBundle0_verificationMaterial) GetX509CertificateChain()(SigstoreBundle0_verificationMaterial_x509CertificateChainable) { + return m.x509CertificateChain +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("timestampVerificationData", m.GetTimestampVerificationData()) + if err != nil { + return err + } + } + if m.GetTlogEntries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTlogEntries())) + for i, v := range m.GetTlogEntries() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("tlogEntries", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("x509CertificateChain", m.GetX509CertificateChain()) + 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 *SigstoreBundle0_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTimestampVerificationData sets the timestampVerificationData property value. The timestampVerificationData property +func (m *SigstoreBundle0_verificationMaterial) SetTimestampVerificationData(value *string)() { + m.timestampVerificationData = value +} +// SetTlogEntries sets the tlogEntries property value. The tlogEntries property +func (m *SigstoreBundle0_verificationMaterial) SetTlogEntries(value []SigstoreBundle0_verificationMaterial_tlogEntriesable)() { + m.tlogEntries = value +} +// SetX509CertificateChain sets the x509CertificateChain property value. The x509CertificateChain property +func (m *SigstoreBundle0_verificationMaterial) SetX509CertificateChain(value SigstoreBundle0_verificationMaterial_x509CertificateChainable)() { + m.x509CertificateChain = value +} +type SigstoreBundle0_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTimestampVerificationData()(*string) + GetTlogEntries()([]SigstoreBundle0_verificationMaterial_tlogEntriesable) + GetX509CertificateChain()(SigstoreBundle0_verificationMaterial_x509CertificateChainable) + SetTimestampVerificationData(value *string)() + SetTlogEntries(value []SigstoreBundle0_verificationMaterial_tlogEntriesable)() + SetX509CertificateChain(value SigstoreBundle0_verificationMaterial_x509CertificateChainable)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go new file mode 100644 index 0000000..c406172 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The canonicalizedBody property + canonicalizedBody *string + // The inclusionPromise property + inclusionPromise SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable + // The inclusionProof property + inclusionProof *string + // The integratedTime property + integratedTime *string + // The kindVersion property + kindVersion SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable + // The logId property + logId SigstoreBundle0_verificationMaterial_tlogEntries_logIdable + // The logIndex property + logIndex *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries()(*SigstoreBundle0_verificationMaterial_tlogEntries) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanonicalizedBody gets the canonicalizedBody property value. The canonicalizedBody property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetCanonicalizedBody()(*string) { + return m.canonicalizedBody +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["canonicalizedBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCanonicalizedBody(val) + } + return nil + } + res["inclusionPromise"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInclusionPromise(val.(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)) + } + return nil + } + res["inclusionProof"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInclusionProof(val) + } + return nil + } + res["integratedTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntegratedTime(val) + } + return nil + } + res["kindVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetKindVersion(val.(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)) + } + return nil + } + res["logId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLogId(val.(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)) + } + return nil + } + res["logIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogIndex(val) + } + return nil + } + return res +} +// GetInclusionPromise gets the inclusionPromise property value. The inclusionPromise property +// returns a SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetInclusionPromise()(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable) { + return m.inclusionPromise +} +// GetInclusionProof gets the inclusionProof property value. The inclusionProof property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetInclusionProof()(*string) { + return m.inclusionProof +} +// GetIntegratedTime gets the integratedTime property value. The integratedTime property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetIntegratedTime()(*string) { + return m.integratedTime +} +// GetKindVersion gets the kindVersion property value. The kindVersion property +// returns a SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetKindVersion()(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable) { + return m.kindVersion +} +// GetLogId gets the logId property value. The logId property +// returns a SigstoreBundle0_verificationMaterial_tlogEntries_logIdable when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetLogId()(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable) { + return m.logId +} +// GetLogIndex gets the logIndex property value. The logIndex property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetLogIndex()(*string) { + return m.logIndex +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("canonicalizedBody", m.GetCanonicalizedBody()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("inclusionPromise", m.GetInclusionPromise()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("inclusionProof", m.GetInclusionProof()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("integratedTime", m.GetIntegratedTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("kindVersion", m.GetKindVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("logId", m.GetLogId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("logIndex", m.GetLogIndex()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanonicalizedBody sets the canonicalizedBody property value. The canonicalizedBody property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetCanonicalizedBody(value *string)() { + m.canonicalizedBody = value +} +// SetInclusionPromise sets the inclusionPromise property value. The inclusionPromise property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetInclusionPromise(value SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)() { + m.inclusionPromise = value +} +// SetInclusionProof sets the inclusionProof property value. The inclusionProof property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetInclusionProof(value *string)() { + m.inclusionProof = value +} +// SetIntegratedTime sets the integratedTime property value. The integratedTime property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetIntegratedTime(value *string)() { + m.integratedTime = value +} +// SetKindVersion sets the kindVersion property value. The kindVersion property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetKindVersion(value SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)() { + m.kindVersion = value +} +// SetLogId sets the logId property value. The logId property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetLogId(value SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)() { + m.logId = value +} +// SetLogIndex sets the logIndex property value. The logIndex property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetLogIndex(value *string)() { + m.logIndex = value +} +type SigstoreBundle0_verificationMaterial_tlogEntriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanonicalizedBody()(*string) + GetInclusionPromise()(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable) + GetInclusionProof()(*string) + GetIntegratedTime()(*string) + GetKindVersion()(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable) + GetLogId()(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable) + GetLogIndex()(*string) + SetCanonicalizedBody(value *string)() + SetInclusionPromise(value SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)() + SetInclusionProof(value *string)() + SetIntegratedTime(value *string)() + SetKindVersion(value SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)() + SetLogId(value SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)() + SetLogIndex(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go new file mode 100644 index 0000000..f10a022 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The signedEntryTimestamp property + signedEntryTimestamp *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise()(*SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["signedEntryTimestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignedEntryTimestamp(val) + } + return nil + } + return res +} +// GetSignedEntryTimestamp gets the signedEntryTimestamp property value. The signedEntryTimestamp property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetSignedEntryTimestamp()(*string) { + return m.signedEntryTimestamp +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("signedEntryTimestamp", m.GetSignedEntryTimestamp()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSignedEntryTimestamp sets the signedEntryTimestamp property value. The signedEntryTimestamp property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) SetSignedEntryTimestamp(value *string)() { + m.signedEntryTimestamp = value +} +type SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSignedEntryTimestamp()(*string) + SetSignedEntryTimestamp(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go new file mode 100644 index 0000000..9715e6a --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The kind property + kind *string + // The version property + version *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion()(*SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKind(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetKind gets the kind property value. The kind property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetKind()(*string) { + return m.kind +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("kind", m.GetKind()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKind sets the kind property value. The kind property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetKind(value *string)() { + m.kind = value +} +// SetVersion sets the version property value. The version property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetVersion(value *string)() { + m.version = value +} +type SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKind()(*string) + GetVersion()(*string) + SetKind(value *string)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go new file mode 100644 index 0000000..a7884c6 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries_logId struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The keyId property + keyId *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries_logId instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_logId and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries_logId()(*SigstoreBundle0_verificationMaterial_tlogEntries_logId) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries_logId{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries_logId(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["keyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKeyId gets the keyId property value. The keyId property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetKeyId()(*string) { + return m.keyId +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("keyId", m.GetKeyId()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKeyId sets the keyId property value. The keyId property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) SetKeyId(value *string)() { + m.keyId = value +} +type SigstoreBundle0_verificationMaterial_tlogEntries_logIdable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKeyId()(*string) + SetKeyId(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go new file mode 100644 index 0000000..3744709 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_x509CertificateChain struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The certificates property + certificates []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable +} +// NewSigstoreBundle0_verificationMaterial_x509CertificateChain instantiates a new SigstoreBundle0_verificationMaterial_x509CertificateChain and sets the default values. +func NewSigstoreBundle0_verificationMaterial_x509CertificateChain()(*SigstoreBundle0_verificationMaterial_x509CertificateChain) { + m := &SigstoreBundle0_verificationMaterial_x509CertificateChain{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_x509CertificateChain(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCertificates gets the certificates property value. The certificates property +// returns a []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetCertificates()([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) { + return m.certificates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) + } + } + m.SetCertificates(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCertificates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificates())) + for i, v := range m.GetCertificates() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("certificates", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCertificates sets the certificates property value. The certificates property +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) SetCertificates(value []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable)() { + m.certificates = value +} +type SigstoreBundle0_verificationMaterial_x509CertificateChainable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificates()([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) + SetCertificates(value []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go new file mode 100644 index 0000000..101c4a6 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The rawBytes property + rawBytes *string +} +// NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates instantiates a new SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates and sets the default values. +func NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates()(*SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) { + m := &SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["rawBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawBytes(val) + } + return nil + } + return res +} +// GetRawBytes gets the rawBytes property value. The rawBytes property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetRawBytes()(*string) { + return m.rawBytes +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("rawBytes", m.GetRawBytes()) + 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRawBytes sets the rawBytes property value. The rawBytes property +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) SetRawBytes(value *string)() { + m.rawBytes = value +} +type SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRawBytes()(*string) + SetRawBytes(value *string)() +} diff --git a/pkg/github/models/simple_classroom.go b/pkg/github/models/simple_classroom.go new file mode 100644 index 0000000..86a51f6 --- /dev/null +++ b/pkg/github/models/simple_classroom.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleClassroom a GitHub Classroom classroom +type SimpleClassroom struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Returns whether classroom is archived or not. + archived *bool + // Unique identifier of the classroom. + id *int32 + // The name of the classroom. + name *string + // The url of the classroom on GitHub Classroom. + url *string +} +// NewSimpleClassroom instantiates a new SimpleClassroom and sets the default values. +func NewSimpleClassroom()(*SimpleClassroom) { + m := &SimpleClassroom{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleClassroomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleClassroomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleClassroom(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleClassroom) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchived gets the archived property value. Returns whether classroom is archived or not. +// returns a *bool when successful +func (m *SimpleClassroom) GetArchived()(*bool) { + return m.archived +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleClassroom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the classroom. +// returns a *int32 when successful +func (m *SimpleClassroom) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the classroom. +// returns a *string when successful +func (m *SimpleClassroom) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url of the classroom on GitHub Classroom. +// returns a *string when successful +func (m *SimpleClassroom) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *SimpleClassroom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SimpleClassroom) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchived sets the archived property value. Returns whether classroom is archived or not. +func (m *SimpleClassroom) SetArchived(value *bool)() { + m.archived = value +} +// SetId sets the id property value. Unique identifier of the classroom. +func (m *SimpleClassroom) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the classroom. +func (m *SimpleClassroom) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url of the classroom on GitHub Classroom. +func (m *SimpleClassroom) SetUrl(value *string)() { + m.url = value +} +type SimpleClassroomable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchived()(*bool) + GetId()(*int32) + GetName()(*string) + GetUrl()(*string) + SetArchived(value *bool)() + SetId(value *int32)() + SetName(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/simple_classroom_assignment.go b/pkg/github/models/simple_classroom_assignment.go new file mode 100644 index 0000000..a9415d7 --- /dev/null +++ b/pkg/github/models/simple_classroom_assignment.go @@ -0,0 +1,576 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleClassroomAssignment a GitHub Classroom assignment +type SimpleClassroomAssignment struct { + // The number of students that have accepted the assignment. + accepted *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub Classroom classroom + classroom SimpleClassroomable + // The time at which the assignment is due. + deadline *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The selected editor for the assignment. + editor *string + // Whether feedback pull request will be created on assignment acceptance. + feedback_pull_requests_enabled *bool + // Unique identifier of the repository. + id *int32 + // Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. + invitations_enabled *bool + // The link that a student can use to accept the assignment. + invite_link *string + // The programming language used in the assignment. + language *string + // The maximum allowable members per team. + max_members *int32 + // The maximum allowable teams for the assignment. + max_teams *int32 + // The number of students that have passed the assignment. + passing *int32 + // Whether an accepted assignment creates a public repository. + public_repo *bool + // Sluggified name of the assignment. + slug *string + // Whether students are admins on created repository on accepted assignment. + students_are_repo_admins *bool + // The number of students that have submitted the assignment. + submitted *int32 + // Assignment title. + title *string + // Whether it's a Group Assignment or Individual Assignment. + typeEscaped *SimpleClassroomAssignment_type +} +// NewSimpleClassroomAssignment instantiates a new SimpleClassroomAssignment and sets the default values. +func NewSimpleClassroomAssignment()(*SimpleClassroomAssignment) { + m := &SimpleClassroomAssignment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleClassroomAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleClassroomAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleClassroomAssignment(), nil +} +// GetAccepted gets the accepted property value. The number of students that have accepted the assignment. +// returns a *int32 when successful +func (m *SimpleClassroomAssignment) GetAccepted()(*int32) { + return m.accepted +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleClassroomAssignment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClassroom gets the classroom property value. A GitHub Classroom classroom +// returns a SimpleClassroomable when successful +func (m *SimpleClassroomAssignment) GetClassroom()(SimpleClassroomable) { + return m.classroom +} +// GetDeadline gets the deadline property value. The time at which the assignment is due. +// returns a *Time when successful +func (m *SimpleClassroomAssignment) GetDeadline()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deadline +} +// GetEditor gets the editor property value. The selected editor for the assignment. +// returns a *string when successful +func (m *SimpleClassroomAssignment) GetEditor()(*string) { + return m.editor +} +// GetFeedbackPullRequestsEnabled gets the feedback_pull_requests_enabled property value. Whether feedback pull request will be created on assignment acceptance. +// returns a *bool when successful +func (m *SimpleClassroomAssignment) GetFeedbackPullRequestsEnabled()(*bool) { + return m.feedback_pull_requests_enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleClassroomAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAccepted(val) + } + return nil + } + res["classroom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleClassroomFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClassroom(val.(SimpleClassroomable)) + } + return nil + } + res["deadline"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeadline(val) + } + return nil + } + res["editor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEditor(val) + } + return nil + } + res["feedback_pull_requests_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFeedbackPullRequestsEnabled(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["invitations_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitationsEnabled(val) + } + return nil + } + res["invite_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInviteLink(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["max_members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxMembers(val) + } + return nil + } + res["max_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxTeams(val) + } + return nil + } + res["passing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPassing(val) + } + return nil + } + res["public_repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepo(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["students_are_repo_admins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStudentsAreRepoAdmins(val) + } + return nil + } + res["submitted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubmitted(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSimpleClassroomAssignment_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*SimpleClassroomAssignment_type)) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the repository. +// returns a *int32 when successful +func (m *SimpleClassroomAssignment) GetId()(*int32) { + return m.id +} +// GetInvitationsEnabled gets the invitations_enabled property value. Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. +// returns a *bool when successful +func (m *SimpleClassroomAssignment) GetInvitationsEnabled()(*bool) { + return m.invitations_enabled +} +// GetInviteLink gets the invite_link property value. The link that a student can use to accept the assignment. +// returns a *string when successful +func (m *SimpleClassroomAssignment) GetInviteLink()(*string) { + return m.invite_link +} +// GetLanguage gets the language property value. The programming language used in the assignment. +// returns a *string when successful +func (m *SimpleClassroomAssignment) GetLanguage()(*string) { + return m.language +} +// GetMaxMembers gets the max_members property value. The maximum allowable members per team. +// returns a *int32 when successful +func (m *SimpleClassroomAssignment) GetMaxMembers()(*int32) { + return m.max_members +} +// GetMaxTeams gets the max_teams property value. The maximum allowable teams for the assignment. +// returns a *int32 when successful +func (m *SimpleClassroomAssignment) GetMaxTeams()(*int32) { + return m.max_teams +} +// GetPassing gets the passing property value. The number of students that have passed the assignment. +// returns a *int32 when successful +func (m *SimpleClassroomAssignment) GetPassing()(*int32) { + return m.passing +} +// GetPublicRepo gets the public_repo property value. Whether an accepted assignment creates a public repository. +// returns a *bool when successful +func (m *SimpleClassroomAssignment) GetPublicRepo()(*bool) { + return m.public_repo +} +// GetSlug gets the slug property value. Sluggified name of the assignment. +// returns a *string when successful +func (m *SimpleClassroomAssignment) GetSlug()(*string) { + return m.slug +} +// GetStudentsAreRepoAdmins gets the students_are_repo_admins property value. Whether students are admins on created repository on accepted assignment. +// returns a *bool when successful +func (m *SimpleClassroomAssignment) GetStudentsAreRepoAdmins()(*bool) { + return m.students_are_repo_admins +} +// GetSubmitted gets the submitted property value. The number of students that have submitted the assignment. +// returns a *int32 when successful +func (m *SimpleClassroomAssignment) GetSubmitted()(*int32) { + return m.submitted +} +// GetTitle gets the title property value. Assignment title. +// returns a *string when successful +func (m *SimpleClassroomAssignment) GetTitle()(*string) { + return m.title +} +// GetTypeEscaped gets the type property value. Whether it's a Group Assignment or Individual Assignment. +// returns a *SimpleClassroomAssignment_type when successful +func (m *SimpleClassroomAssignment) GetTypeEscaped()(*SimpleClassroomAssignment_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *SimpleClassroomAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("accepted", m.GetAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("classroom", m.GetClassroom()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("deadline", m.GetDeadline()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("editor", m.GetEditor()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("feedback_pull_requests_enabled", m.GetFeedbackPullRequestsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("invitations_enabled", m.GetInvitationsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("invite_link", m.GetInviteLink()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("max_members", m.GetMaxMembers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("max_teams", m.GetMaxTeams()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("passing", m.GetPassing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public_repo", m.GetPublicRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("students_are_repo_admins", m.GetStudentsAreRepoAdmins()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("submitted", m.GetSubmitted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccepted sets the accepted property value. The number of students that have accepted the assignment. +func (m *SimpleClassroomAssignment) SetAccepted(value *int32)() { + m.accepted = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SimpleClassroomAssignment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClassroom sets the classroom property value. A GitHub Classroom classroom +func (m *SimpleClassroomAssignment) SetClassroom(value SimpleClassroomable)() { + m.classroom = value +} +// SetDeadline sets the deadline property value. The time at which the assignment is due. +func (m *SimpleClassroomAssignment) SetDeadline(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deadline = value +} +// SetEditor sets the editor property value. The selected editor for the assignment. +func (m *SimpleClassroomAssignment) SetEditor(value *string)() { + m.editor = value +} +// SetFeedbackPullRequestsEnabled sets the feedback_pull_requests_enabled property value. Whether feedback pull request will be created on assignment acceptance. +func (m *SimpleClassroomAssignment) SetFeedbackPullRequestsEnabled(value *bool)() { + m.feedback_pull_requests_enabled = value +} +// SetId sets the id property value. Unique identifier of the repository. +func (m *SimpleClassroomAssignment) SetId(value *int32)() { + m.id = value +} +// SetInvitationsEnabled sets the invitations_enabled property value. Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. +func (m *SimpleClassroomAssignment) SetInvitationsEnabled(value *bool)() { + m.invitations_enabled = value +} +// SetInviteLink sets the invite_link property value. The link that a student can use to accept the assignment. +func (m *SimpleClassroomAssignment) SetInviteLink(value *string)() { + m.invite_link = value +} +// SetLanguage sets the language property value. The programming language used in the assignment. +func (m *SimpleClassroomAssignment) SetLanguage(value *string)() { + m.language = value +} +// SetMaxMembers sets the max_members property value. The maximum allowable members per team. +func (m *SimpleClassroomAssignment) SetMaxMembers(value *int32)() { + m.max_members = value +} +// SetMaxTeams sets the max_teams property value. The maximum allowable teams for the assignment. +func (m *SimpleClassroomAssignment) SetMaxTeams(value *int32)() { + m.max_teams = value +} +// SetPassing sets the passing property value. The number of students that have passed the assignment. +func (m *SimpleClassroomAssignment) SetPassing(value *int32)() { + m.passing = value +} +// SetPublicRepo sets the public_repo property value. Whether an accepted assignment creates a public repository. +func (m *SimpleClassroomAssignment) SetPublicRepo(value *bool)() { + m.public_repo = value +} +// SetSlug sets the slug property value. Sluggified name of the assignment. +func (m *SimpleClassroomAssignment) SetSlug(value *string)() { + m.slug = value +} +// SetStudentsAreRepoAdmins sets the students_are_repo_admins property value. Whether students are admins on created repository on accepted assignment. +func (m *SimpleClassroomAssignment) SetStudentsAreRepoAdmins(value *bool)() { + m.students_are_repo_admins = value +} +// SetSubmitted sets the submitted property value. The number of students that have submitted the assignment. +func (m *SimpleClassroomAssignment) SetSubmitted(value *int32)() { + m.submitted = value +} +// SetTitle sets the title property value. Assignment title. +func (m *SimpleClassroomAssignment) SetTitle(value *string)() { + m.title = value +} +// SetTypeEscaped sets the type property value. Whether it's a Group Assignment or Individual Assignment. +func (m *SimpleClassroomAssignment) SetTypeEscaped(value *SimpleClassroomAssignment_type)() { + m.typeEscaped = value +} +type SimpleClassroomAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccepted()(*int32) + GetClassroom()(SimpleClassroomable) + GetDeadline()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEditor()(*string) + GetFeedbackPullRequestsEnabled()(*bool) + GetId()(*int32) + GetInvitationsEnabled()(*bool) + GetInviteLink()(*string) + GetLanguage()(*string) + GetMaxMembers()(*int32) + GetMaxTeams()(*int32) + GetPassing()(*int32) + GetPublicRepo()(*bool) + GetSlug()(*string) + GetStudentsAreRepoAdmins()(*bool) + GetSubmitted()(*int32) + GetTitle()(*string) + GetTypeEscaped()(*SimpleClassroomAssignment_type) + SetAccepted(value *int32)() + SetClassroom(value SimpleClassroomable)() + SetDeadline(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEditor(value *string)() + SetFeedbackPullRequestsEnabled(value *bool)() + SetId(value *int32)() + SetInvitationsEnabled(value *bool)() + SetInviteLink(value *string)() + SetLanguage(value *string)() + SetMaxMembers(value *int32)() + SetMaxTeams(value *int32)() + SetPassing(value *int32)() + SetPublicRepo(value *bool)() + SetSlug(value *string)() + SetStudentsAreRepoAdmins(value *bool)() + SetSubmitted(value *int32)() + SetTitle(value *string)() + SetTypeEscaped(value *SimpleClassroomAssignment_type)() +} diff --git a/pkg/github/models/simple_classroom_assignment_type.go b/pkg/github/models/simple_classroom_assignment_type.go new file mode 100644 index 0000000..5e9dfb1 --- /dev/null +++ b/pkg/github/models/simple_classroom_assignment_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Whether it's a Group Assignment or Individual Assignment. +type SimpleClassroomAssignment_type int + +const ( + INDIVIDUAL_SIMPLECLASSROOMASSIGNMENT_TYPE SimpleClassroomAssignment_type = iota + GROUP_SIMPLECLASSROOMASSIGNMENT_TYPE +) + +func (i SimpleClassroomAssignment_type) String() string { + return []string{"individual", "group"}[i] +} +func ParseSimpleClassroomAssignment_type(v string) (any, error) { + result := INDIVIDUAL_SIMPLECLASSROOMASSIGNMENT_TYPE + switch v { + case "individual": + result = INDIVIDUAL_SIMPLECLASSROOMASSIGNMENT_TYPE + case "group": + result = GROUP_SIMPLECLASSROOMASSIGNMENT_TYPE + default: + return 0, errors.New("Unknown SimpleClassroomAssignment_type value: " + v) + } + return &result, nil +} +func SerializeSimpleClassroomAssignment_type(values []SimpleClassroomAssignment_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SimpleClassroomAssignment_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/simple_classroom_organization.go b/pkg/github/models/simple_classroom_organization.go new file mode 100644 index 0000000..31fcfed --- /dev/null +++ b/pkg/github/models/simple_classroom_organization.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleClassroomOrganization a GitHub organization. +type SimpleClassroomOrganization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string +} +// NewSimpleClassroomOrganization instantiates a new SimpleClassroomOrganization and sets the default values. +func NewSimpleClassroomOrganization()(*SimpleClassroomOrganization) { + m := &SimpleClassroomOrganization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleClassroomOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleClassroomOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleClassroomOrganization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleClassroomOrganization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *SimpleClassroomOrganization) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleClassroomOrganization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *SimpleClassroomOrganization) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *SimpleClassroomOrganization) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *SimpleClassroomOrganization) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *SimpleClassroomOrganization) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *SimpleClassroomOrganization) GetNodeId()(*string) { + return m.node_id +} +// Serialize serializes information the current object +func (m *SimpleClassroomOrganization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + 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 *SimpleClassroomOrganization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *SimpleClassroomOrganization) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *SimpleClassroomOrganization) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *SimpleClassroomOrganization) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *SimpleClassroomOrganization) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *SimpleClassroomOrganization) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *SimpleClassroomOrganization) SetNodeId(value *string)() { + m.node_id = value +} +type SimpleClassroomOrganizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + SetAvatarUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() +} diff --git a/pkg/github/models/simple_classroom_repository.go b/pkg/github/models/simple_classroom_repository.go new file mode 100644 index 0000000..d7804a0 --- /dev/null +++ b/pkg/github/models/simple_classroom_repository.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleClassroomRepository a GitHub repository view for Classroom +type SimpleClassroomRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The default branch for the repository. + default_branch *string + // The full, globally unique name of the repository. + full_name *string + // The URL to view the repository on GitHub.com. + html_url *string + // A unique identifier of the repository. + id *int32 + // The GraphQL identifier of the repository. + node_id *string + // Whether the repository is private. + private *bool +} +// NewSimpleClassroomRepository instantiates a new SimpleClassroomRepository and sets the default values. +func NewSimpleClassroomRepository()(*SimpleClassroomRepository) { + m := &SimpleClassroomRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleClassroomRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleClassroomRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleClassroomRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleClassroomRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDefaultBranch gets the default_branch property value. The default branch for the repository. +// returns a *string when successful +func (m *SimpleClassroomRepository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleClassroomRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + return res +} +// GetFullName gets the full_name property value. The full, globally unique name of the repository. +// returns a *string when successful +func (m *SimpleClassroomRepository) GetFullName()(*string) { + return m.full_name +} +// GetHtmlUrl gets the html_url property value. The URL to view the repository on GitHub.com. +// returns a *string when successful +func (m *SimpleClassroomRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. A unique identifier of the repository. +// returns a *int32 when successful +func (m *SimpleClassroomRepository) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The GraphQL identifier of the repository. +// returns a *string when successful +func (m *SimpleClassroomRepository) GetNodeId()(*string) { + return m.node_id +} +// GetPrivate gets the private property value. Whether the repository is private. +// returns a *bool when successful +func (m *SimpleClassroomRepository) GetPrivate()(*bool) { + return m.private +} +// Serialize serializes information the current object +func (m *SimpleClassroomRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + 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 *SimpleClassroomRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDefaultBranch sets the default_branch property value. The default branch for the repository. +func (m *SimpleClassroomRepository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetFullName sets the full_name property value. The full, globally unique name of the repository. +func (m *SimpleClassroomRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetHtmlUrl sets the html_url property value. The URL to view the repository on GitHub.com. +func (m *SimpleClassroomRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. A unique identifier of the repository. +func (m *SimpleClassroomRepository) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The GraphQL identifier of the repository. +func (m *SimpleClassroomRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetPrivate sets the private property value. Whether the repository is private. +func (m *SimpleClassroomRepository) SetPrivate(value *bool)() { + m.private = value +} +type SimpleClassroomRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultBranch()(*string) + GetFullName()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPrivate()(*bool) + SetDefaultBranch(value *string)() + SetFullName(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPrivate(value *bool)() +} diff --git a/pkg/github/models/simple_classroom_user.go b/pkg/github/models/simple_classroom_user.go new file mode 100644 index 0000000..ec5a3cb --- /dev/null +++ b/pkg/github/models/simple_classroom_user.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleClassroomUser a GitHub user simplified for Classroom. +type SimpleClassroomUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The login property + login *string +} +// NewSimpleClassroomUser instantiates a new SimpleClassroomUser and sets the default values. +func NewSimpleClassroomUser()(*SimpleClassroomUser) { + m := &SimpleClassroomUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleClassroomUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleClassroomUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleClassroomUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleClassroomUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *SimpleClassroomUser) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleClassroomUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *SimpleClassroomUser) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *SimpleClassroomUser) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *SimpleClassroomUser) GetLogin()(*string) { + return m.login +} +// Serialize serializes information the current object +func (m *SimpleClassroomUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.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 *SimpleClassroomUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *SimpleClassroomUser) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *SimpleClassroomUser) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *SimpleClassroomUser) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *SimpleClassroomUser) SetLogin(value *string)() { + m.login = value +} +type SimpleClassroomUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLogin()(*string) + SetAvatarUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLogin(value *string)() +} diff --git a/pkg/github/models/simple_commit.go b/pkg/github/models/simple_commit.go new file mode 100644 index 0000000..319c3cd --- /dev/null +++ b/pkg/github/models/simple_commit.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleCommit a commit. +type SimpleCommit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Information about the Git author + author SimpleCommit_authorable + // Information about the Git committer + committer SimpleCommit_committerable + // SHA for the commit + id *string + // Message describing the purpose of the commit + message *string + // Timestamp of the commit + timestamp *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // SHA for the commit's tree + tree_id *string +} +// NewSimpleCommit instantiates a new SimpleCommit and sets the default values. +func NewSimpleCommit()(*SimpleCommit) { + m := &SimpleCommit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleCommitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleCommitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleCommit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleCommit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. Information about the Git author +// returns a SimpleCommit_authorable when successful +func (m *SimpleCommit) GetAuthor()(SimpleCommit_authorable) { + return m.author +} +// GetCommitter gets the committer property value. Information about the Git committer +// returns a SimpleCommit_committerable when successful +func (m *SimpleCommit) GetCommitter()(SimpleCommit_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleCommit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleCommit_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(SimpleCommit_authorable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleCommit_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(SimpleCommit_committerable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + res["timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestamp(val) + } + return nil + } + res["tree_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreeId(val) + } + return nil + } + return res +} +// GetId gets the id property value. SHA for the commit +// returns a *string when successful +func (m *SimpleCommit) GetId()(*string) { + return m.id +} +// GetMessage gets the message property value. Message describing the purpose of the commit +// returns a *string when successful +func (m *SimpleCommit) GetMessage()(*string) { + return m.message +} +// GetTimestamp gets the timestamp property value. Timestamp of the commit +// returns a *Time when successful +func (m *SimpleCommit) GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.timestamp +} +// GetTreeId gets the tree_id property value. SHA for the commit's tree +// returns a *string when successful +func (m *SimpleCommit) GetTreeId()(*string) { + return m.tree_id +} +// Serialize serializes information the current object +func (m *SimpleCommit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("timestamp", m.GetTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tree_id", m.GetTreeId()) + 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 *SimpleCommit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. Information about the Git author +func (m *SimpleCommit) SetAuthor(value SimpleCommit_authorable)() { + m.author = value +} +// SetCommitter sets the committer property value. Information about the Git committer +func (m *SimpleCommit) SetCommitter(value SimpleCommit_committerable)() { + m.committer = value +} +// SetId sets the id property value. SHA for the commit +func (m *SimpleCommit) SetId(value *string)() { + m.id = value +} +// SetMessage sets the message property value. Message describing the purpose of the commit +func (m *SimpleCommit) SetMessage(value *string)() { + m.message = value +} +// SetTimestamp sets the timestamp property value. Timestamp of the commit +func (m *SimpleCommit) SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.timestamp = value +} +// SetTreeId sets the tree_id property value. SHA for the commit's tree +func (m *SimpleCommit) SetTreeId(value *string)() { + m.tree_id = value +} +type SimpleCommitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(SimpleCommit_authorable) + GetCommitter()(SimpleCommit_committerable) + GetId()(*string) + GetMessage()(*string) + GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTreeId()(*string) + SetAuthor(value SimpleCommit_authorable)() + SetCommitter(value SimpleCommit_committerable)() + SetId(value *string)() + SetMessage(value *string)() + SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTreeId(value *string)() +} diff --git a/pkg/github/models/simple_commit_author.go b/pkg/github/models/simple_commit_author.go new file mode 100644 index 0000000..5b308cf --- /dev/null +++ b/pkg/github/models/simple_commit_author.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleCommit_author information about the Git author +type SimpleCommit_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Git email address of the commit's author + email *string + // Name of the commit's author + name *string +} +// NewSimpleCommit_author instantiates a new SimpleCommit_author and sets the default values. +func NewSimpleCommit_author()(*SimpleCommit_author) { + m := &SimpleCommit_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleCommit_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleCommit_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleCommit_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleCommit_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. Git email address of the commit's author +// returns a *string when successful +func (m *SimpleCommit_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleCommit_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the commit's author +// returns a *string when successful +func (m *SimpleCommit_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *SimpleCommit_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *SimpleCommit_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. Git email address of the commit's author +func (m *SimpleCommit_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the commit's author +func (m *SimpleCommit_author) SetName(value *string)() { + m.name = value +} +type SimpleCommit_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/simple_commit_committer.go b/pkg/github/models/simple_commit_committer.go new file mode 100644 index 0000000..0150089 --- /dev/null +++ b/pkg/github/models/simple_commit_committer.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleCommit_committer information about the Git committer +type SimpleCommit_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Git email address of the commit's committer + email *string + // Name of the commit's committer + name *string +} +// NewSimpleCommit_committer instantiates a new SimpleCommit_committer and sets the default values. +func NewSimpleCommit_committer()(*SimpleCommit_committer) { + m := &SimpleCommit_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleCommit_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleCommit_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleCommit_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleCommit_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. Git email address of the commit's committer +// returns a *string when successful +func (m *SimpleCommit_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleCommit_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the commit's committer +// returns a *string when successful +func (m *SimpleCommit_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *SimpleCommit_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *SimpleCommit_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. Git email address of the commit's committer +func (m *SimpleCommit_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the commit's committer +func (m *SimpleCommit_committer) SetName(value *string)() { + m.name = value +} +type SimpleCommit_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/simple_commit_status.go b/pkg/github/models/simple_commit_status.go new file mode 100644 index 0000000..bcd10b4 --- /dev/null +++ b/pkg/github/models/simple_commit_status.go @@ -0,0 +1,371 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SimpleCommitStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The context property + context *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The id property + id *int32 + // The node_id property + node_id *string + // The required property + required *bool + // The state property + state *string + // The target_url property + target_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewSimpleCommitStatus instantiates a new SimpleCommitStatus and sets the default values. +func NewSimpleCommitStatus()(*SimpleCommitStatus) { + m := &SimpleCommitStatus{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleCommitStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleCommitStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleCommitStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleCommitStatus) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *SimpleCommitStatus) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetContext gets the context property value. The context property +// returns a *string when successful +func (m *SimpleCommitStatus) GetContext()(*string) { + return m.context +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *SimpleCommitStatus) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *SimpleCommitStatus) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleCommitStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["target_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *SimpleCommitStatus) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *SimpleCommitStatus) GetNodeId()(*string) { + return m.node_id +} +// GetRequired gets the required property value. The required property +// returns a *bool when successful +func (m *SimpleCommitStatus) GetRequired()(*bool) { + return m.required +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *SimpleCommitStatus) GetState()(*string) { + return m.state +} +// GetTargetUrl gets the target_url property value. The target_url property +// returns a *string when successful +func (m *SimpleCommitStatus) GetTargetUrl()(*string) { + return m.target_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *SimpleCommitStatus) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *SimpleCommitStatus) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *SimpleCommitStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_url", m.GetTargetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SimpleCommitStatus) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *SimpleCommitStatus) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetContext sets the context property value. The context property +func (m *SimpleCommitStatus) SetContext(value *string)() { + m.context = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *SimpleCommitStatus) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *SimpleCommitStatus) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *SimpleCommitStatus) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *SimpleCommitStatus) SetNodeId(value *string)() { + m.node_id = value +} +// SetRequired sets the required property value. The required property +func (m *SimpleCommitStatus) SetRequired(value *bool)() { + m.required = value +} +// SetState sets the state property value. The state property +func (m *SimpleCommitStatus) SetState(value *string)() { + m.state = value +} +// SetTargetUrl sets the target_url property value. The target_url property +func (m *SimpleCommitStatus) SetTargetUrl(value *string)() { + m.target_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *SimpleCommitStatus) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *SimpleCommitStatus) SetUrl(value *string)() { + m.url = value +} +type SimpleCommitStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetContext()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetRequired()(*bool) + GetState()(*string) + GetTargetUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetContext(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetRequired(value *bool)() + SetState(value *string)() + SetTargetUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/simple_repository.go b/pkg/github/models/simple_repository.go new file mode 100644 index 0000000..dae4b6d --- /dev/null +++ b/pkg/github/models/simple_repository.go @@ -0,0 +1,1386 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleRepository a GitHub repository. +type SimpleRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A template for the API URL to download the repository as an archive. + archive_url *string + // A template for the API URL to list the available assignees for issues in the repository. + assignees_url *string + // A template for the API URL to create or retrieve a raw Git blob in the repository. + blobs_url *string + // A template for the API URL to get information about branches in the repository. + branches_url *string + // A template for the API URL to get information about collaborators of the repository. + collaborators_url *string + // A template for the API URL to get information about comments on the repository. + comments_url *string + // A template for the API URL to get information about commits on the repository. + commits_url *string + // A template for the API URL to compare two commits or refs. + compare_url *string + // A template for the API URL to get the contents of the repository. + contents_url *string + // A template for the API URL to list the contributors to the repository. + contributors_url *string + // The API URL to list the deployments of the repository. + deployments_url *string + // The repository description. + description *string + // The API URL to list the downloads on the repository. + downloads_url *string + // The API URL to list the events of the repository. + events_url *string + // Whether the repository is a fork. + fork *bool + // The API URL to list the forks of the repository. + forks_url *string + // The full, globally unique, name of the repository. + full_name *string + // A template for the API URL to get information about Git commits of the repository. + git_commits_url *string + // A template for the API URL to get information about Git refs of the repository. + git_refs_url *string + // A template for the API URL to get information about Git tags of the repository. + git_tags_url *string + // The API URL to list the hooks on the repository. + hooks_url *string + // The URL to view the repository on GitHub.com. + html_url *string + // A unique identifier of the repository. + id *int64 + // A template for the API URL to get information about issue comments on the repository. + issue_comment_url *string + // A template for the API URL to get information about issue events on the repository. + issue_events_url *string + // A template for the API URL to get information about issues on the repository. + issues_url *string + // A template for the API URL to get information about deploy keys on the repository. + keys_url *string + // A template for the API URL to get information about labels of the repository. + labels_url *string + // The API URL to get information about the languages of the repository. + languages_url *string + // The API URL to merge branches in the repository. + merges_url *string + // A template for the API URL to get information about milestones of the repository. + milestones_url *string + // The name of the repository. + name *string + // The GraphQL identifier of the repository. + node_id *string + // A template for the API URL to get information about notifications on the repository. + notifications_url *string + // A GitHub user. + owner SimpleUserable + // Whether the repository is private. + private *bool + // A template for the API URL to get information about pull requests on the repository. + pulls_url *string + // A template for the API URL to get information about releases on the repository. + releases_url *string + // The API URL to list the stargazers on the repository. + stargazers_url *string + // A template for the API URL to get information about statuses of a commit. + statuses_url *string + // The API URL to list the subscribers on the repository. + subscribers_url *string + // The API URL to subscribe to notifications for this repository. + subscription_url *string + // The API URL to get information about tags on the repository. + tags_url *string + // The API URL to list the teams on the repository. + teams_url *string + // A template for the API URL to create or retrieve a raw Git tree of the repository. + trees_url *string + // The URL to get more information about the repository from the GitHub API. + url *string +} +// NewSimpleRepository instantiates a new SimpleRepository and sets the default values. +func NewSimpleRepository()(*SimpleRepository) { + m := &SimpleRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchiveUrl gets the archive_url property value. A template for the API URL to download the repository as an archive. +// returns a *string when successful +func (m *SimpleRepository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. A template for the API URL to list the available assignees for issues in the repository. +// returns a *string when successful +func (m *SimpleRepository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. A template for the API URL to create or retrieve a raw Git blob in the repository. +// returns a *string when successful +func (m *SimpleRepository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. A template for the API URL to get information about branches in the repository. +// returns a *string when successful +func (m *SimpleRepository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. A template for the API URL to get information about collaborators of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. A template for the API URL to get information about comments on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. A template for the API URL to get information about commits on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. A template for the API URL to compare two commits or refs. +// returns a *string when successful +func (m *SimpleRepository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. A template for the API URL to get the contents of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. A template for the API URL to list the contributors to the repository. +// returns a *string when successful +func (m *SimpleRepository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetDeploymentsUrl gets the deployments_url property value. The API URL to list the deployments of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The repository description. +// returns a *string when successful +func (m *SimpleRepository) GetDescription()(*string) { + return m.description +} +// GetDownloadsUrl gets the downloads_url property value. The API URL to list the downloads on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The API URL to list the events of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(SimpleUserable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. Whether the repository is a fork. +// returns a *bool when successful +func (m *SimpleRepository) GetFork()(*bool) { + return m.fork +} +// GetForksUrl gets the forks_url property value. The API URL to list the forks of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full, globally unique, name of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. A template for the API URL to get information about Git commits of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. A template for the API URL to get information about Git refs of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. A template for the API URL to get information about Git tags of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetHooksUrl gets the hooks_url property value. The API URL to list the hooks on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The URL to view the repository on GitHub.com. +// returns a *string when successful +func (m *SimpleRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. A unique identifier of the repository. +// returns a *int64 when successful +func (m *SimpleRepository) GetId()(*int64) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. A template for the API URL to get information about issue comments on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. A template for the API URL to get information about issue events on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. A template for the API URL to get information about issues on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetKeysUrl gets the keys_url property value. A template for the API URL to get information about deploy keys on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. A template for the API URL to get information about labels of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguagesUrl gets the languages_url property value. The API URL to get information about the languages of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetMergesUrl gets the merges_url property value. The API URL to merge branches in the repository. +// returns a *string when successful +func (m *SimpleRepository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. A template for the API URL to get information about milestones of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The GraphQL identifier of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. A template for the API URL to get information about notifications on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOwner gets the owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *SimpleRepository) GetOwner()(SimpleUserable) { + return m.owner +} +// GetPrivate gets the private property value. Whether the repository is private. +// returns a *bool when successful +func (m *SimpleRepository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. A template for the API URL to get information about pull requests on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetReleasesUrl gets the releases_url property value. A template for the API URL to get information about releases on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetStargazersUrl gets the stargazers_url property value. The API URL to list the stargazers on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. A template for the API URL to get information about statuses of a commit. +// returns a *string when successful +func (m *SimpleRepository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersUrl gets the subscribers_url property value. The API URL to list the subscribers on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The API URL to subscribe to notifications for this repository. +// returns a *string when successful +func (m *SimpleRepository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetTagsUrl gets the tags_url property value. The API URL to get information about tags on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The API URL to list the teams on the repository. +// returns a *string when successful +func (m *SimpleRepository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTreesUrl gets the trees_url property value. A template for the API URL to create or retrieve a raw Git tree of the repository. +// returns a *string when successful +func (m *SimpleRepository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUrl gets the url property value. The URL to get more information about the repository from the GitHub API. +// returns a *string when successful +func (m *SimpleRepository) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *SimpleRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SimpleRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchiveUrl sets the archive_url property value. A template for the API URL to download the repository as an archive. +func (m *SimpleRepository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. A template for the API URL to list the available assignees for issues in the repository. +func (m *SimpleRepository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. A template for the API URL to create or retrieve a raw Git blob in the repository. +func (m *SimpleRepository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. A template for the API URL to get information about branches in the repository. +func (m *SimpleRepository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. A template for the API URL to get information about collaborators of the repository. +func (m *SimpleRepository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. A template for the API URL to get information about comments on the repository. +func (m *SimpleRepository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. A template for the API URL to get information about commits on the repository. +func (m *SimpleRepository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. A template for the API URL to compare two commits or refs. +func (m *SimpleRepository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. A template for the API URL to get the contents of the repository. +func (m *SimpleRepository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. A template for the API URL to list the contributors to the repository. +func (m *SimpleRepository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetDeploymentsUrl sets the deployments_url property value. The API URL to list the deployments of the repository. +func (m *SimpleRepository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The repository description. +func (m *SimpleRepository) SetDescription(value *string)() { + m.description = value +} +// SetDownloadsUrl sets the downloads_url property value. The API URL to list the downloads on the repository. +func (m *SimpleRepository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The API URL to list the events of the repository. +func (m *SimpleRepository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. Whether the repository is a fork. +func (m *SimpleRepository) SetFork(value *bool)() { + m.fork = value +} +// SetForksUrl sets the forks_url property value. The API URL to list the forks of the repository. +func (m *SimpleRepository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full, globally unique, name of the repository. +func (m *SimpleRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. A template for the API URL to get information about Git commits of the repository. +func (m *SimpleRepository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. A template for the API URL to get information about Git refs of the repository. +func (m *SimpleRepository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. A template for the API URL to get information about Git tags of the repository. +func (m *SimpleRepository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetHooksUrl sets the hooks_url property value. The API URL to list the hooks on the repository. +func (m *SimpleRepository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The URL to view the repository on GitHub.com. +func (m *SimpleRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. A unique identifier of the repository. +func (m *SimpleRepository) SetId(value *int64)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. A template for the API URL to get information about issue comments on the repository. +func (m *SimpleRepository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. A template for the API URL to get information about issue events on the repository. +func (m *SimpleRepository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. A template for the API URL to get information about issues on the repository. +func (m *SimpleRepository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetKeysUrl sets the keys_url property value. A template for the API URL to get information about deploy keys on the repository. +func (m *SimpleRepository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. A template for the API URL to get information about labels of the repository. +func (m *SimpleRepository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguagesUrl sets the languages_url property value. The API URL to get information about the languages of the repository. +func (m *SimpleRepository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetMergesUrl sets the merges_url property value. The API URL to merge branches in the repository. +func (m *SimpleRepository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. A template for the API URL to get information about milestones of the repository. +func (m *SimpleRepository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetName sets the name property value. The name of the repository. +func (m *SimpleRepository) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The GraphQL identifier of the repository. +func (m *SimpleRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. A template for the API URL to get information about notifications on the repository. +func (m *SimpleRepository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *SimpleRepository) SetOwner(value SimpleUserable)() { + m.owner = value +} +// SetPrivate sets the private property value. Whether the repository is private. +func (m *SimpleRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. A template for the API URL to get information about pull requests on the repository. +func (m *SimpleRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetReleasesUrl sets the releases_url property value. A template for the API URL to get information about releases on the repository. +func (m *SimpleRepository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetStargazersUrl sets the stargazers_url property value. The API URL to list the stargazers on the repository. +func (m *SimpleRepository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. A template for the API URL to get information about statuses of a commit. +func (m *SimpleRepository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersUrl sets the subscribers_url property value. The API URL to list the subscribers on the repository. +func (m *SimpleRepository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The API URL to subscribe to notifications for this repository. +func (m *SimpleRepository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetTagsUrl sets the tags_url property value. The API URL to get information about tags on the repository. +func (m *SimpleRepository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The API URL to list the teams on the repository. +func (m *SimpleRepository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTreesUrl sets the trees_url property value. A template for the API URL to create or retrieve a raw Git tree of the repository. +func (m *SimpleRepository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUrl sets the url property value. The URL to get more information about the repository from the GitHub API. +func (m *SimpleRepository) SetUrl(value *string)() { + m.url = value +} +type SimpleRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguagesUrl()(*string) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOwner()(SimpleUserable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetReleasesUrl()(*string) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTreesUrl()(*string) + GetUrl()(*string) + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguagesUrl(value *string)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOwner(value SimpleUserable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetReleasesUrl(value *string)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTreesUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/simple_user.go b/pkg/github/models/simple_user.go new file mode 100644 index 0000000..d90bd0f --- /dev/null +++ b/pkg/github/models/simple_user.go @@ -0,0 +1,661 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SimpleUser a GitHub user. +type SimpleUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The email property + email *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int64 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_at property + starred_at *string + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewSimpleUser instantiates a new SimpleUser and sets the default values. +func NewSimpleUser()(*SimpleUser) { + m := &SimpleUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSimpleUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSimpleUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSimpleUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SimpleUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *SimpleUser) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *SimpleUser) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *SimpleUser) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SimpleUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredAt(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *SimpleUser) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *SimpleUser) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *SimpleUser) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *SimpleUser) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *SimpleUser) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *SimpleUser) GetId()(*int64) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *SimpleUser) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *SimpleUser) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *SimpleUser) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *SimpleUser) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *SimpleUser) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *SimpleUser) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *SimpleUser) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredAt gets the starred_at property value. The starred_at property +// returns a *string when successful +func (m *SimpleUser) GetStarredAt()(*string) { + return m.starred_at +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *SimpleUser) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *SimpleUser) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *SimpleUser) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *SimpleUser) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *SimpleUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_at", m.GetStarredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *SimpleUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *SimpleUser) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEmail sets the email property value. The email property +func (m *SimpleUser) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *SimpleUser) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *SimpleUser) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *SimpleUser) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *SimpleUser) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *SimpleUser) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *SimpleUser) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *SimpleUser) SetId(value *int64)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *SimpleUser) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *SimpleUser) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *SimpleUser) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *SimpleUser) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *SimpleUser) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *SimpleUser) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *SimpleUser) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredAt sets the starred_at property value. The starred_at property +func (m *SimpleUser) SetStarredAt(value *string)() { + m.starred_at = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *SimpleUser) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *SimpleUser) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *SimpleUser) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *SimpleUser) SetUrl(value *string)() { + m.url = value +} +type SimpleUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredAt()(*string) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredAt(value *string)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/snapshot.go b/pkg/github/models/snapshot.go new file mode 100644 index 0000000..fc69691 --- /dev/null +++ b/pkg/github/models/snapshot.go @@ -0,0 +1,266 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Snapshot create a new snapshot of a repository's dependencies. +type Snapshot struct { + // A description of the detector used. + detector Snapshot_detectorable + // The job property + job Snapshot_jobable + // A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. + manifests Snapshot_manifestsable + // User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + metadata Metadataable + // The repository branch that triggered this snapshot. + ref *string + // The time at which the snapshot was scanned. + scanned *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + sha *string + // The version of the repository snapshot submission. + version *int32 +} +// NewSnapshot instantiates a new Snapshot and sets the default values. +func NewSnapshot()(*Snapshot) { + m := &Snapshot{ + } + return m +} +// CreateSnapshotFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSnapshotFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSnapshot(), nil +} +// GetDetector gets the detector property value. A description of the detector used. +// returns a Snapshot_detectorable when successful +func (m *Snapshot) GetDetector()(Snapshot_detectorable) { + return m.detector +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Snapshot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detector"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSnapshot_detectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetector(val.(Snapshot_detectorable)) + } + return nil + } + res["job"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSnapshot_jobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetJob(val.(Snapshot_jobable)) + } + return nil + } + res["manifests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSnapshot_manifestsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManifests(val.(Snapshot_manifestsable)) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMetadataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val.(Metadataable)) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["scanned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetScanned(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetJob gets the job property value. The job property +// returns a Snapshot_jobable when successful +func (m *Snapshot) GetJob()(Snapshot_jobable) { + return m.job +} +// GetManifests gets the manifests property value. A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. +// returns a Snapshot_manifestsable when successful +func (m *Snapshot) GetManifests()(Snapshot_manifestsable) { + return m.manifests +} +// GetMetadata gets the metadata property value. User-defined metadata to store domain-specific information limited to 8 keys with scalar values. +// returns a Metadataable when successful +func (m *Snapshot) GetMetadata()(Metadataable) { + return m.metadata +} +// GetRef gets the ref property value. The repository branch that triggered this snapshot. +// returns a *string when successful +func (m *Snapshot) GetRef()(*string) { + return m.ref +} +// GetScanned gets the scanned property value. The time at which the snapshot was scanned. +// returns a *Time when successful +func (m *Snapshot) GetScanned()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.scanned +} +// GetSha gets the sha property value. The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. +// returns a *string when successful +func (m *Snapshot) GetSha()(*string) { + return m.sha +} +// GetVersion gets the version property value. The version of the repository snapshot submission. +// returns a *int32 when successful +func (m *Snapshot) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *Snapshot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("detector", m.GetDetector()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("job", m.GetJob()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("manifests", m.GetManifests()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("scanned", m.GetScanned()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDetector sets the detector property value. A description of the detector used. +func (m *Snapshot) SetDetector(value Snapshot_detectorable)() { + m.detector = value +} +// SetJob sets the job property value. The job property +func (m *Snapshot) SetJob(value Snapshot_jobable)() { + m.job = value +} +// SetManifests sets the manifests property value. A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. +func (m *Snapshot) SetManifests(value Snapshot_manifestsable)() { + m.manifests = value +} +// SetMetadata sets the metadata property value. User-defined metadata to store domain-specific information limited to 8 keys with scalar values. +func (m *Snapshot) SetMetadata(value Metadataable)() { + m.metadata = value +} +// SetRef sets the ref property value. The repository branch that triggered this snapshot. +func (m *Snapshot) SetRef(value *string)() { + m.ref = value +} +// SetScanned sets the scanned property value. The time at which the snapshot was scanned. +func (m *Snapshot) SetScanned(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.scanned = value +} +// SetSha sets the sha property value. The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. +func (m *Snapshot) SetSha(value *string)() { + m.sha = value +} +// SetVersion sets the version property value. The version of the repository snapshot submission. +func (m *Snapshot) SetVersion(value *int32)() { + m.version = value +} +type Snapshotable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetector()(Snapshot_detectorable) + GetJob()(Snapshot_jobable) + GetManifests()(Snapshot_manifestsable) + GetMetadata()(Metadataable) + GetRef()(*string) + GetScanned()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSha()(*string) + GetVersion()(*int32) + SetDetector(value Snapshot_detectorable)() + SetJob(value Snapshot_jobable)() + SetManifests(value Snapshot_manifestsable)() + SetMetadata(value Metadataable)() + SetRef(value *string)() + SetScanned(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSha(value *string)() + SetVersion(value *int32)() +} diff --git a/pkg/github/models/snapshot_detector.go b/pkg/github/models/snapshot_detector.go new file mode 100644 index 0000000..4c3e499 --- /dev/null +++ b/pkg/github/models/snapshot_detector.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Snapshot_detector a description of the detector used. +type Snapshot_detector struct { + // The name of the detector used. + name *string + // The url of the detector used. + url *string + // The version of the detector used. + version *string +} +// NewSnapshot_detector instantiates a new Snapshot_detector and sets the default values. +func NewSnapshot_detector()(*Snapshot_detector) { + m := &Snapshot_detector{ + } + return m +} +// CreateSnapshot_detectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSnapshot_detectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSnapshot_detector(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Snapshot_detector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the detector used. +// returns a *string when successful +func (m *Snapshot_detector) GetName()(*string) { + return m.name +} +// GetUrl gets the url property value. The url of the detector used. +// returns a *string when successful +func (m *Snapshot_detector) GetUrl()(*string) { + return m.url +} +// GetVersion gets the version property value. The version of the detector used. +// returns a *string when successful +func (m *Snapshot_detector) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *Snapshot_detector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetName sets the name property value. The name of the detector used. +func (m *Snapshot_detector) SetName(value *string)() { + m.name = value +} +// SetUrl sets the url property value. The url of the detector used. +func (m *Snapshot_detector) SetUrl(value *string)() { + m.url = value +} +// SetVersion sets the version property value. The version of the detector used. +func (m *Snapshot_detector) SetVersion(value *string)() { + m.version = value +} +type Snapshot_detectorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetUrl()(*string) + GetVersion()(*string) + SetName(value *string)() + SetUrl(value *string)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/snapshot_job.go b/pkg/github/models/snapshot_job.go new file mode 100644 index 0000000..aff72c6 --- /dev/null +++ b/pkg/github/models/snapshot_job.go @@ -0,0 +1,119 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Snapshot_job struct { + // Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + correlator *string + // The url for the job. + html_url *string + // The external ID of the job. + id *string +} +// NewSnapshot_job instantiates a new Snapshot_job and sets the default values. +func NewSnapshot_job()(*Snapshot_job) { + m := &Snapshot_job{ + } + return m +} +// CreateSnapshot_jobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSnapshot_jobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSnapshot_job(), nil +} +// GetCorrelator gets the correlator property value. Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. +// returns a *string when successful +func (m *Snapshot_job) GetCorrelator()(*string) { + return m.correlator +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Snapshot_job) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["correlator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelator(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The url for the job. +// returns a *string when successful +func (m *Snapshot_job) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The external ID of the job. +// returns a *string when successful +func (m *Snapshot_job) GetId()(*string) { + return m.id +} +// Serialize serializes information the current object +func (m *Snapshot_job) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("correlator", m.GetCorrelator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + return nil +} +// SetCorrelator sets the correlator property value. Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. +func (m *Snapshot_job) SetCorrelator(value *string)() { + m.correlator = value +} +// SetHtmlUrl sets the html_url property value. The url for the job. +func (m *Snapshot_job) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The external ID of the job. +func (m *Snapshot_job) SetId(value *string)() { + m.id = value +} +type Snapshot_jobable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCorrelator()(*string) + GetHtmlUrl()(*string) + GetId()(*string) + SetCorrelator(value *string)() + SetHtmlUrl(value *string)() + SetId(value *string)() +} diff --git a/pkg/github/models/snapshot_manifests.go b/pkg/github/models/snapshot_manifests.go new file mode 100644 index 0000000..77dcf51 --- /dev/null +++ b/pkg/github/models/snapshot_manifests.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Snapshot_manifests a collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. +type Snapshot_manifests struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewSnapshot_manifests instantiates a new Snapshot_manifests and sets the default values. +func NewSnapshot_manifests()(*Snapshot_manifests) { + m := &Snapshot_manifests{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSnapshot_manifestsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSnapshot_manifestsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSnapshot_manifests(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Snapshot_manifests) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Snapshot_manifests) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *Snapshot_manifests) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Snapshot_manifests) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type Snapshot_manifestsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/social_account.go b/pkg/github/models/social_account.go new file mode 100644 index 0000000..5998cfe --- /dev/null +++ b/pkg/github/models/social_account.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SocialAccount social media account +type SocialAccount struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The provider property + provider *string + // The url property + url *string +} +// NewSocialAccount instantiates a new SocialAccount and sets the default values. +func NewSocialAccount()(*SocialAccount) { + m := &SocialAccount{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSocialAccountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSocialAccountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSocialAccount(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SocialAccount) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SocialAccount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvider(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetProvider gets the provider property value. The provider property +// returns a *string when successful +func (m *SocialAccount) GetProvider()(*string) { + return m.provider +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *SocialAccount) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *SocialAccount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("provider", m.GetProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SocialAccount) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetProvider sets the provider property value. The provider property +func (m *SocialAccount) SetProvider(value *string)() { + m.provider = value +} +// SetUrl sets the url property value. The url property +func (m *SocialAccount) SetUrl(value *string)() { + m.url = value +} +type SocialAccountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProvider()(*string) + GetUrl()(*string) + SetProvider(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/ssh_signing_key.go b/pkg/github/models/ssh_signing_key.go new file mode 100644 index 0000000..21a76d3 --- /dev/null +++ b/pkg/github/models/ssh_signing_key.go @@ -0,0 +1,169 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SshSigningKey a public SSH key used to sign Git commits +type SshSigningKey struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *int32 + // The key property + key *string + // The title property + title *string +} +// NewSshSigningKey instantiates a new SshSigningKey and sets the default values. +func NewSshSigningKey()(*SshSigningKey) { + m := &SshSigningKey{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSshSigningKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSshSigningKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSshSigningKey(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SshSigningKey) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *SshSigningKey) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SshSigningKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *SshSigningKey) GetId()(*int32) { + return m.id +} +// GetKey gets the key property value. The key property +// returns a *string when successful +func (m *SshSigningKey) GetKey()(*string) { + return m.key +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *SshSigningKey) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *SshSigningKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *SshSigningKey) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *SshSigningKey) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetId sets the id property value. The id property +func (m *SshSigningKey) SetId(value *int32)() { + m.id = value +} +// SetKey sets the key property value. The key property +func (m *SshSigningKey) SetKey(value *string)() { + m.key = value +} +// SetTitle sets the title property value. The title property +func (m *SshSigningKey) SetTitle(value *string)() { + m.title = value +} +type SshSigningKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*int32) + GetKey()(*string) + GetTitle()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *int32)() + SetKey(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/models/state_change_issue_event.go b/pkg/github/models/state_change_issue_event.go new file mode 100644 index 0000000..da93e4a --- /dev/null +++ b/pkg/github/models/state_change_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StateChangeIssueEvent state Change Issue Event +type StateChangeIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The state_reason property + state_reason *string + // The url property + url *string +} +// NewStateChangeIssueEvent instantiates a new StateChangeIssueEvent and sets the default values. +func NewStateChangeIssueEvent()(*StateChangeIssueEvent) { + m := &StateChangeIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStateChangeIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStateChangeIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStateChangeIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *StateChangeIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StateChangeIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StateChangeIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["state_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStateReason(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *StateChangeIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *StateChangeIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetStateReason gets the state_reason property value. The state_reason property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetStateReason()(*string) { + return m.state_reason +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *StateChangeIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *StateChangeIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state_reason", m.GetStateReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *StateChangeIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StateChangeIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *StateChangeIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *StateChangeIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *StateChangeIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *StateChangeIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *StateChangeIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *StateChangeIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *StateChangeIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetStateReason sets the state_reason property value. The state_reason property +func (m *StateChangeIssueEvent) SetStateReason(value *string)() { + m.state_reason = value +} +// SetUrl sets the url property value. The url property +func (m *StateChangeIssueEvent) SetUrl(value *string)() { + m.url = value +} +type StateChangeIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetStateReason()(*string) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetStateReason(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/status.go b/pkg/github/models/status.go new file mode 100644 index 0000000..e6d2a27 --- /dev/null +++ b/pkg/github/models/status.go @@ -0,0 +1,371 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Status the status of a commit. +type Status struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The context property + context *string + // The created_at property + created_at *string + // A GitHub user. + creator NullableSimpleUserable + // The description property + description *string + // The id property + id *int32 + // The node_id property + node_id *string + // The state property + state *string + // The target_url property + target_url *string + // The updated_at property + updated_at *string + // The url property + url *string +} +// NewStatus instantiates a new Status and sets the default values. +func NewStatus()(*Status) { + m := &Status{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStatus(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Status) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *Status) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetContext gets the context property value. The context property +// returns a *string when successful +func (m *Status) GetContext()(*string) { + return m.context +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *Status) GetCreatedAt()(*string) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *Status) GetCreator()(NullableSimpleUserable) { + return m.creator +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Status) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Status) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(NullableSimpleUserable)) + } + 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["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["target_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Status) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Status) GetNodeId()(*string) { + return m.node_id +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *Status) GetState()(*string) { + return m.state +} +// GetTargetUrl gets the target_url property value. The target_url property +// returns a *string when successful +func (m *Status) GetTargetUrl()(*string) { + return m.target_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *Status) GetUpdatedAt()(*string) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Status) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Status) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_url", m.GetTargetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Status) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *Status) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetContext sets the context property value. The context property +func (m *Status) SetContext(value *string)() { + m.context = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Status) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *Status) SetCreator(value NullableSimpleUserable)() { + m.creator = value +} +// SetDescription sets the description property value. The description property +func (m *Status) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *Status) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Status) SetNodeId(value *string)() { + m.node_id = value +} +// SetState sets the state property value. The state property +func (m *Status) SetState(value *string)() { + m.state = value +} +// SetTargetUrl sets the target_url property value. The target_url property +func (m *Status) SetTargetUrl(value *string)() { + m.target_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Status) SetUpdatedAt(value *string)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Status) SetUrl(value *string)() { + m.url = value +} +type Statusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetContext()(*string) + GetCreatedAt()(*string) + GetCreator()(NullableSimpleUserable) + GetDescription()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetState()(*string) + GetTargetUrl()(*string) + GetUpdatedAt()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetContext(value *string)() + SetCreatedAt(value *string)() + SetCreator(value NullableSimpleUserable)() + SetDescription(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetState(value *string)() + SetTargetUrl(value *string)() + SetUpdatedAt(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/status_check_policy.go b/pkg/github/models/status_check_policy.go new file mode 100644 index 0000000..383fa00 --- /dev/null +++ b/pkg/github/models/status_check_policy.go @@ -0,0 +1,215 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StatusCheckPolicy status Check Policy +type StatusCheckPolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The checks property + checks []StatusCheckPolicy_checksable + // The contexts property + contexts []string + // The contexts_url property + contexts_url *string + // The strict property + strict *bool + // The url property + url *string +} +// NewStatusCheckPolicy instantiates a new StatusCheckPolicy and sets the default values. +func NewStatusCheckPolicy()(*StatusCheckPolicy) { + m := &StatusCheckPolicy{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStatusCheckPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStatusCheckPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStatusCheckPolicy(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StatusCheckPolicy) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChecks gets the checks property value. The checks property +// returns a []StatusCheckPolicy_checksable when successful +func (m *StatusCheckPolicy) GetChecks()([]StatusCheckPolicy_checksable) { + return m.checks +} +// GetContexts gets the contexts property value. The contexts property +// returns a []string when successful +func (m *StatusCheckPolicy) GetContexts()([]string) { + return m.contexts +} +// GetContextsUrl gets the contexts_url property value. The contexts_url property +// returns a *string when successful +func (m *StatusCheckPolicy) GetContextsUrl()(*string) { + return m.contexts_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StatusCheckPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStatusCheckPolicy_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StatusCheckPolicy_checksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(StatusCheckPolicy_checksable) + } + } + m.SetChecks(res) + } + return nil + } + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + res["contexts_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContextsUrl(val) + } + return nil + } + res["strict"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStrict(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetStrict gets the strict property value. The strict property +// returns a *bool when successful +func (m *StatusCheckPolicy) GetStrict()(*bool) { + return m.strict +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *StatusCheckPolicy) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *StatusCheckPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChecks())) + for i, v := range m.GetChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("checks", cast) + if err != nil { + return err + } + } + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contexts_url", m.GetContextsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("strict", m.GetStrict()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *StatusCheckPolicy) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChecks sets the checks property value. The checks property +func (m *StatusCheckPolicy) SetChecks(value []StatusCheckPolicy_checksable)() { + m.checks = value +} +// SetContexts sets the contexts property value. The contexts property +func (m *StatusCheckPolicy) SetContexts(value []string)() { + m.contexts = value +} +// SetContextsUrl sets the contexts_url property value. The contexts_url property +func (m *StatusCheckPolicy) SetContextsUrl(value *string)() { + m.contexts_url = value +} +// SetStrict sets the strict property value. The strict property +func (m *StatusCheckPolicy) SetStrict(value *bool)() { + m.strict = value +} +// SetUrl sets the url property value. The url property +func (m *StatusCheckPolicy) SetUrl(value *string)() { + m.url = value +} +type StatusCheckPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecks()([]StatusCheckPolicy_checksable) + GetContexts()([]string) + GetContextsUrl()(*string) + GetStrict()(*bool) + GetUrl()(*string) + SetChecks(value []StatusCheckPolicy_checksable)() + SetContexts(value []string)() + SetContextsUrl(value *string)() + SetStrict(value *bool)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/status_check_policy_checks.go b/pkg/github/models/status_check_policy_checks.go new file mode 100644 index 0000000..cde7c50 --- /dev/null +++ b/pkg/github/models/status_check_policy_checks.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StatusCheckPolicy_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The app_id property + app_id *int32 + // The context property + context *string +} +// NewStatusCheckPolicy_checks instantiates a new StatusCheckPolicy_checks and sets the default values. +func NewStatusCheckPolicy_checks()(*StatusCheckPolicy_checks) { + m := &StatusCheckPolicy_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateStatusCheckPolicy_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStatusCheckPolicy_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStatusCheckPolicy_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *StatusCheckPolicy_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The app_id property +// returns a *int32 when successful +func (m *StatusCheckPolicy_checks) GetAppId()(*int32) { + return m.app_id +} +// GetContext gets the context property value. The context property +// returns a *string when successful +func (m *StatusCheckPolicy_checks) GetContext()(*string) { + return m.context +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StatusCheckPolicy_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *StatusCheckPolicy_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + 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 *StatusCheckPolicy_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The app_id property +func (m *StatusCheckPolicy_checks) SetAppId(value *int32)() { + m.app_id = value +} +// SetContext sets the context property value. The context property +func (m *StatusCheckPolicy_checks) SetContext(value *string)() { + m.context = value +} +type StatusCheckPolicy_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int32) + GetContext()(*string) + SetAppId(value *int32)() + SetContext(value *string)() +} diff --git a/pkg/github/models/tag.go b/pkg/github/models/tag.go new file mode 100644 index 0000000..33a0269 --- /dev/null +++ b/pkg/github/models/tag.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Tag tag +type Tag struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit property + commit Tag_commitable + // The name property + name *string + // The node_id property + node_id *string + // The tarball_url property + tarball_url *string + // The zipball_url property + zipball_url *string +} +// NewTag instantiates a new Tag and sets the default values. +func NewTag()(*Tag) { + m := &Tag{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTag(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Tag) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommit gets the commit property value. The commit property +// returns a Tag_commitable when successful +func (m *Tag) GetCommit()(Tag_commitable) { + return m.commit +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Tag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTag_commitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommit(val.(Tag_commitable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["tarball_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarballUrl(val) + } + return nil + } + res["zipball_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetZipballUrl(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Tag) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Tag) GetNodeId()(*string) { + return m.node_id +} +// GetTarballUrl gets the tarball_url property value. The tarball_url property +// returns a *string when successful +func (m *Tag) GetTarballUrl()(*string) { + return m.tarball_url +} +// GetZipballUrl gets the zipball_url property value. The zipball_url property +// returns a *string when successful +func (m *Tag) GetZipballUrl()(*string) { + return m.zipball_url +} +// Serialize serializes information the current object +func (m *Tag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("commit", m.GetCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tarball_url", m.GetTarballUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("zipball_url", m.GetZipballUrl()) + 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 *Tag) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommit sets the commit property value. The commit property +func (m *Tag) SetCommit(value Tag_commitable)() { + m.commit = value +} +// SetName sets the name property value. The name property +func (m *Tag) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Tag) SetNodeId(value *string)() { + m.node_id = value +} +// SetTarballUrl sets the tarball_url property value. The tarball_url property +func (m *Tag) SetTarballUrl(value *string)() { + m.tarball_url = value +} +// SetZipballUrl sets the zipball_url property value. The zipball_url property +func (m *Tag) SetZipballUrl(value *string)() { + m.zipball_url = value +} +type Tagable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommit()(Tag_commitable) + GetName()(*string) + GetNodeId()(*string) + GetTarballUrl()(*string) + GetZipballUrl()(*string) + SetCommit(value Tag_commitable)() + SetName(value *string)() + SetNodeId(value *string)() + SetTarballUrl(value *string)() + SetZipballUrl(value *string)() +} diff --git a/pkg/github/models/tag_commit.go b/pkg/github/models/tag_commit.go new file mode 100644 index 0000000..63ff25e --- /dev/null +++ b/pkg/github/models/tag_commit.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Tag_commit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha property + sha *string + // The url property + url *string +} +// NewTag_commit instantiates a new Tag_commit and sets the default values. +func NewTag_commit()(*Tag_commit) { + m := &Tag_commit{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTag_commitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTag_commitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTag_commit(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Tag_commit) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Tag_commit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. The sha property +// returns a *string when successful +func (m *Tag_commit) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Tag_commit) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Tag_commit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Tag_commit) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. The sha property +func (m *Tag_commit) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *Tag_commit) SetUrl(value *string)() { + m.url = value +} +type Tag_commitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/tag_protection.go b/pkg/github/models/tag_protection.go new file mode 100644 index 0000000..a0d9766 --- /dev/null +++ b/pkg/github/models/tag_protection.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TagProtection tag protection +type TagProtection struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *string + // The enabled property + enabled *bool + // The id property + id *int32 + // The pattern property + pattern *string + // The updated_at property + updated_at *string +} +// NewTagProtection instantiates a new TagProtection and sets the default values. +func NewTagProtection()(*TagProtection) { + m := &TagProtection{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTagProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTagProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTagProtection(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TagProtection) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *TagProtection) GetCreatedAt()(*string) { + return m.created_at +} +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *TagProtection) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TagProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TagProtection) GetId()(*int32) { + return m.id +} +// GetPattern gets the pattern property value. The pattern property +// returns a *string when successful +func (m *TagProtection) GetPattern()(*string) { + return m.pattern +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *TagProtection) GetUpdatedAt()(*string) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *TagProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TagProtection) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TagProtection) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *TagProtection) SetEnabled(value *bool)() { + m.enabled = value +} +// SetId sets the id property value. The id property +func (m *TagProtection) SetId(value *int32)() { + m.id = value +} +// SetPattern sets the pattern property value. The pattern property +func (m *TagProtection) SetPattern(value *string)() { + m.pattern = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TagProtection) SetUpdatedAt(value *string)() { + m.updated_at = value +} +type TagProtectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetEnabled()(*bool) + GetId()(*int32) + GetPattern()(*string) + GetUpdatedAt()(*string) + SetCreatedAt(value *string)() + SetEnabled(value *bool)() + SetId(value *int32)() + SetPattern(value *string)() + SetUpdatedAt(value *string)() +} diff --git a/pkg/github/models/team.go b/pkg/github/models/team.go new file mode 100644 index 0000000..ecd18c8 --- /dev/null +++ b/pkg/github/models/team.go @@ -0,0 +1,458 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Team groups of organization members that gives permissions on specified repositories. +type Team struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // The html_url property + html_url *string + // The id property + id *int32 + // The members_url property + members_url *string + // The name property + name *string + // The node_id property + node_id *string + // The notification_setting property + notification_setting *string + // Groups of organization members that gives permissions on specified repositories. + parent NullableTeamSimpleable + // The permission property + permission *string + // The permissions property + permissions Team_permissionsable + // The privacy property + privacy *string + // The repositories_url property + repositories_url *string + // The slug property + slug *string + // The url property + url *string +} +// NewTeam instantiates a new Team and sets the default values. +func NewTeam()(*Team) { + m := &Team{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeam(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Team) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *Team) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Team) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationSetting(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableTeamSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(NullableTeamSimpleable)) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeam_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(Team_permissionsable)) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Team) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Team) GetId()(*int32) { + return m.id +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *Team) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Team) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Team) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationSetting gets the notification_setting property value. The notification_setting property +// returns a *string when successful +func (m *Team) GetNotificationSetting()(*string) { + return m.notification_setting +} +// GetParent gets the parent property value. Groups of organization members that gives permissions on specified repositories. +// returns a NullableTeamSimpleable when successful +func (m *Team) GetParent()(NullableTeamSimpleable) { + return m.parent +} +// GetPermission gets the permission property value. The permission property +// returns a *string when successful +func (m *Team) GetPermission()(*string) { + return m.permission +} +// GetPermissions gets the permissions property value. The permissions property +// returns a Team_permissionsable when successful +func (m *Team) GetPermissions()(Team_permissionsable) { + return m.permissions +} +// GetPrivacy gets the privacy property value. The privacy property +// returns a *string when successful +func (m *Team) GetPrivacy()(*string) { + return m.privacy +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *Team) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *Team) GetSlug()(*string) { + return m.slug +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Team) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Team) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_setting", m.GetNotificationSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacy", m.GetPrivacy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Team) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *Team) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Team) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Team) SetId(value *int32)() { + m.id = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *Team) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *Team) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Team) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationSetting sets the notification_setting property value. The notification_setting property +func (m *Team) SetNotificationSetting(value *string)() { + m.notification_setting = value +} +// SetParent sets the parent property value. Groups of organization members that gives permissions on specified repositories. +func (m *Team) SetParent(value NullableTeamSimpleable)() { + m.parent = value +} +// SetPermission sets the permission property value. The permission property +func (m *Team) SetPermission(value *string)() { + m.permission = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *Team) SetPermissions(value Team_permissionsable)() { + m.permissions = value +} +// SetPrivacy sets the privacy property value. The privacy property +func (m *Team) SetPrivacy(value *string)() { + m.privacy = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *Team) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetSlug sets the slug property value. The slug property +func (m *Team) SetSlug(value *string)() { + m.slug = value +} +// SetUrl sets the url property value. The url property +func (m *Team) SetUrl(value *string)() { + m.url = value +} +type Teamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationSetting()(*string) + GetParent()(NullableTeamSimpleable) + GetPermission()(*string) + GetPermissions()(Team_permissionsable) + GetPrivacy()(*string) + GetRepositoriesUrl()(*string) + GetSlug()(*string) + GetUrl()(*string) + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationSetting(value *string)() + SetParent(value NullableTeamSimpleable)() + SetPermission(value *string)() + SetPermissions(value Team_permissionsable)() + SetPrivacy(value *string)() + SetRepositoriesUrl(value *string)() + SetSlug(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_discussion.go b/pkg/github/models/team_discussion.go new file mode 100644 index 0000000..1ee9971 --- /dev/null +++ b/pkg/github/models/team_discussion.go @@ -0,0 +1,575 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamDiscussion a team discussion is a persistent record of a free-form conversation within a team. +type TeamDiscussion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + author NullableSimpleUserable + // The main text of the discussion. + body *string + // The body_html property + body_html *string + // The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + body_version *string + // The comments_count property + comments_count *int32 + // The comments_url property + comments_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // The last_edited_at property + last_edited_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The node_id property + node_id *string + // The unique sequence number of a team discussion. + number *int32 + // Whether or not this discussion should be pinned for easy retrieval. + pinned *bool + // Whether or not this discussion should be restricted to team members and organization owners. + private *bool + // The reactions property + reactions ReactionRollupable + // The team_url property + team_url *string + // The title of the discussion. + title *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewTeamDiscussion instantiates a new TeamDiscussion and sets the default values. +func NewTeamDiscussion()(*TeamDiscussion) { + m := &TeamDiscussion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamDiscussionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamDiscussionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamDiscussion(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamDiscussion) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *TeamDiscussion) GetAuthor()(NullableSimpleUserable) { + return m.author +} +// GetBody gets the body property value. The main text of the discussion. +// returns a *string when successful +func (m *TeamDiscussion) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *TeamDiscussion) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyVersion gets the body_version property value. The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. +// returns a *string when successful +func (m *TeamDiscussion) GetBodyVersion()(*string) { + return m.body_version +} +// GetCommentsCount gets the comments_count property value. The comments_count property +// returns a *int32 when successful +func (m *TeamDiscussion) GetCommentsCount()(*int32) { + return m.comments_count +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *TeamDiscussion) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TeamDiscussion) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamDiscussion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(NullableSimpleUserable)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyVersion(val) + } + return nil + } + res["comments_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommentsCount(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["last_edited_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastEditedAt(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["pinned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPinned(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["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["team_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamDiscussion) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLastEditedAt gets the last_edited_at property value. The last_edited_at property +// returns a *Time when successful +func (m *TeamDiscussion) GetLastEditedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_edited_at +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamDiscussion) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The unique sequence number of a team discussion. +// returns a *int32 when successful +func (m *TeamDiscussion) GetNumber()(*int32) { + return m.number +} +// GetPinned gets the pinned property value. Whether or not this discussion should be pinned for easy retrieval. +// returns a *bool when successful +func (m *TeamDiscussion) GetPinned()(*bool) { + return m.pinned +} +// GetPrivate gets the private property value. Whether or not this discussion should be restricted to team members and organization owners. +// returns a *bool when successful +func (m *TeamDiscussion) GetPrivate()(*bool) { + return m.private +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *TeamDiscussion) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetTeamUrl gets the team_url property value. The team_url property +// returns a *string when successful +func (m *TeamDiscussion) GetTeamUrl()(*string) { + return m.team_url +} +// GetTitle gets the title property value. The title of the discussion. +// returns a *string when successful +func (m *TeamDiscussion) GetTitle()(*string) { + return m.title +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TeamDiscussion) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamDiscussion) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamDiscussion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_version", m.GetBodyVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("comments_count", m.GetCommentsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_edited_at", m.GetLastEditedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pinned", m.GetPinned()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("team_url", m.GetTeamUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamDiscussion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. A GitHub user. +func (m *TeamDiscussion) SetAuthor(value NullableSimpleUserable)() { + m.author = value +} +// SetBody sets the body property value. The main text of the discussion. +func (m *TeamDiscussion) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *TeamDiscussion) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyVersion sets the body_version property value. The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. +func (m *TeamDiscussion) SetBodyVersion(value *string)() { + m.body_version = value +} +// SetCommentsCount sets the comments_count property value. The comments_count property +func (m *TeamDiscussion) SetCommentsCount(value *int32)() { + m.comments_count = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *TeamDiscussion) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TeamDiscussion) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamDiscussion) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLastEditedAt sets the last_edited_at property value. The last_edited_at property +func (m *TeamDiscussion) SetLastEditedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_edited_at = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamDiscussion) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The unique sequence number of a team discussion. +func (m *TeamDiscussion) SetNumber(value *int32)() { + m.number = value +} +// SetPinned sets the pinned property value. Whether or not this discussion should be pinned for easy retrieval. +func (m *TeamDiscussion) SetPinned(value *bool)() { + m.pinned = value +} +// SetPrivate sets the private property value. Whether or not this discussion should be restricted to team members and organization owners. +func (m *TeamDiscussion) SetPrivate(value *bool)() { + m.private = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *TeamDiscussion) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetTeamUrl sets the team_url property value. The team_url property +func (m *TeamDiscussion) SetTeamUrl(value *string)() { + m.team_url = value +} +// SetTitle sets the title property value. The title of the discussion. +func (m *TeamDiscussion) SetTitle(value *string)() { + m.title = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TeamDiscussion) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *TeamDiscussion) SetUrl(value *string)() { + m.url = value +} +type TeamDiscussionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(NullableSimpleUserable) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyVersion()(*string) + GetCommentsCount()(*int32) + GetCommentsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetLastEditedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNodeId()(*string) + GetNumber()(*int32) + GetPinned()(*bool) + GetPrivate()(*bool) + GetReactions()(ReactionRollupable) + GetTeamUrl()(*string) + GetTitle()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAuthor(value NullableSimpleUserable)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyVersion(value *string)() + SetCommentsCount(value *int32)() + SetCommentsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetLastEditedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetPinned(value *bool)() + SetPrivate(value *bool)() + SetReactions(value ReactionRollupable)() + SetTeamUrl(value *string)() + SetTitle(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_discussion_comment.go b/pkg/github/models/team_discussion_comment.go new file mode 100644 index 0000000..660d75e --- /dev/null +++ b/pkg/github/models/team_discussion_comment.go @@ -0,0 +1,430 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamDiscussionComment a reply to a discussion within a team. +type TeamDiscussionComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + author NullableSimpleUserable + // The main text of the comment. + body *string + // The body_html property + body_html *string + // The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + body_version *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The discussion_url property + discussion_url *string + // The html_url property + html_url *string + // The last_edited_at property + last_edited_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The node_id property + node_id *string + // The unique sequence number of a team discussion comment. + number *int32 + // The reactions property + reactions ReactionRollupable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewTeamDiscussionComment instantiates a new TeamDiscussionComment and sets the default values. +func NewTeamDiscussionComment()(*TeamDiscussionComment) { + m := &TeamDiscussionComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamDiscussionCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamDiscussionCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamDiscussionComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamDiscussionComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *TeamDiscussionComment) GetAuthor()(NullableSimpleUserable) { + return m.author +} +// GetBody gets the body property value. The main text of the comment. +// returns a *string when successful +func (m *TeamDiscussionComment) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *TeamDiscussionComment) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyVersion gets the body_version property value. The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. +// returns a *string when successful +func (m *TeamDiscussionComment) GetBodyVersion()(*string) { + return m.body_version +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TeamDiscussionComment) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDiscussionUrl gets the discussion_url property value. The discussion_url property +// returns a *string when successful +func (m *TeamDiscussionComment) GetDiscussionUrl()(*string) { + return m.discussion_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamDiscussionComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(NullableSimpleUserable)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyVersion(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["discussion_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["last_edited_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastEditedAt(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamDiscussionComment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetLastEditedAt gets the last_edited_at property value. The last_edited_at property +// returns a *Time when successful +func (m *TeamDiscussionComment) GetLastEditedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_edited_at +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamDiscussionComment) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The unique sequence number of a team discussion comment. +// returns a *int32 when successful +func (m *TeamDiscussionComment) GetNumber()(*int32) { + return m.number +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *TeamDiscussionComment) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TeamDiscussionComment) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamDiscussionComment) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamDiscussionComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_version", m.GetBodyVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("discussion_url", m.GetDiscussionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_edited_at", m.GetLastEditedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamDiscussionComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. A GitHub user. +func (m *TeamDiscussionComment) SetAuthor(value NullableSimpleUserable)() { + m.author = value +} +// SetBody sets the body property value. The main text of the comment. +func (m *TeamDiscussionComment) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *TeamDiscussionComment) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyVersion sets the body_version property value. The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. +func (m *TeamDiscussionComment) SetBodyVersion(value *string)() { + m.body_version = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TeamDiscussionComment) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDiscussionUrl sets the discussion_url property value. The discussion_url property +func (m *TeamDiscussionComment) SetDiscussionUrl(value *string)() { + m.discussion_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamDiscussionComment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetLastEditedAt sets the last_edited_at property value. The last_edited_at property +func (m *TeamDiscussionComment) SetLastEditedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_edited_at = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamDiscussionComment) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The unique sequence number of a team discussion comment. +func (m *TeamDiscussionComment) SetNumber(value *int32)() { + m.number = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *TeamDiscussionComment) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TeamDiscussionComment) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *TeamDiscussionComment) SetUrl(value *string)() { + m.url = value +} +type TeamDiscussionCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(NullableSimpleUserable) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyVersion()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDiscussionUrl()(*string) + GetHtmlUrl()(*string) + GetLastEditedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNodeId()(*string) + GetNumber()(*int32) + GetReactions()(ReactionRollupable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAuthor(value NullableSimpleUserable)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyVersion(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDiscussionUrl(value *string)() + SetHtmlUrl(value *string)() + SetLastEditedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetReactions(value ReactionRollupable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_full.go b/pkg/github/models/team_full.go new file mode 100644 index 0000000..26cbb65 --- /dev/null +++ b/pkg/github/models/team_full.go @@ -0,0 +1,606 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamFull groups of organization members that gives permissions on specified repositories. +type TeamFull struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The html_url property + html_url *string + // Unique identifier of the team + id *int32 + // Distinguished Name (DN) that team maps to within LDAP environment + ldap_dn *string + // The members_count property + members_count *int32 + // The members_url property + members_url *string + // Name of the team + name *string + // The node_id property + node_id *string + // The notification setting the team has set + notification_setting *TeamFull_notification_setting + // Team Organization + organization TeamOrganizationable + // Groups of organization members that gives permissions on specified repositories. + parent NullableTeamSimpleable + // Permission that the team will have for its repositories + permission *string + // The level of privacy this team should have + privacy *TeamFull_privacy + // The repos_count property + repos_count *int32 + // The repositories_url property + repositories_url *string + // The slug property + slug *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the team + url *string +} +// NewTeamFull instantiates a new TeamFull and sets the default values. +func NewTeamFull()(*TeamFull) { + m := &TeamFull{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamFullFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamFullFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamFull(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamFull) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TeamFull) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *TeamFull) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamFull) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["ldap_dn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLdapDn(val) + } + return nil + } + res["members_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMembersCount(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamFull_notification_setting) + if err != nil { + return err + } + if val != nil { + m.SetNotificationSetting(val.(*TeamFull_notification_setting)) + } + return nil + } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(TeamOrganizationable)) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableTeamSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(NullableTeamSimpleable)) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamFull_privacy) + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val.(*TeamFull_privacy)) + } + return nil + } + res["repos_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReposCount(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamFull) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the team +// returns a *int32 when successful +func (m *TeamFull) GetId()(*int32) { + return m.id +} +// GetLdapDn gets the ldap_dn property value. Distinguished Name (DN) that team maps to within LDAP environment +// returns a *string when successful +func (m *TeamFull) GetLdapDn()(*string) { + return m.ldap_dn +} +// GetMembersCount gets the members_count property value. The members_count property +// returns a *int32 when successful +func (m *TeamFull) GetMembersCount()(*int32) { + return m.members_count +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *TeamFull) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. Name of the team +// returns a *string when successful +func (m *TeamFull) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamFull) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationSetting gets the notification_setting property value. The notification setting the team has set +// returns a *TeamFull_notification_setting when successful +func (m *TeamFull) GetNotificationSetting()(*TeamFull_notification_setting) { + return m.notification_setting +} +// GetOrganization gets the organization property value. Team Organization +// returns a TeamOrganizationable when successful +func (m *TeamFull) GetOrganization()(TeamOrganizationable) { + return m.organization +} +// GetParent gets the parent property value. Groups of organization members that gives permissions on specified repositories. +// returns a NullableTeamSimpleable when successful +func (m *TeamFull) GetParent()(NullableTeamSimpleable) { + return m.parent +} +// GetPermission gets the permission property value. Permission that the team will have for its repositories +// returns a *string when successful +func (m *TeamFull) GetPermission()(*string) { + return m.permission +} +// GetPrivacy gets the privacy property value. The level of privacy this team should have +// returns a *TeamFull_privacy when successful +func (m *TeamFull) GetPrivacy()(*TeamFull_privacy) { + return m.privacy +} +// GetReposCount gets the repos_count property value. The repos_count property +// returns a *int32 when successful +func (m *TeamFull) GetReposCount()(*int32) { + return m.repos_count +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *TeamFull) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *TeamFull) GetSlug()(*string) { + return m.slug +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TeamFull) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the team +// returns a *string when successful +func (m *TeamFull) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamFull) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ldap_dn", m.GetLdapDn()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("members_count", m.GetMembersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetNotificationSetting() != nil { + cast := (*m.GetNotificationSetting()).String() + err := writer.WriteStringValue("notification_setting", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + if m.GetPrivacy() != nil { + cast := (*m.GetPrivacy()).String() + err := writer.WriteStringValue("privacy", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repos_count", m.GetReposCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamFull) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TeamFull) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDescription sets the description property value. The description property +func (m *TeamFull) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamFull) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the team +func (m *TeamFull) SetId(value *int32)() { + m.id = value +} +// SetLdapDn sets the ldap_dn property value. Distinguished Name (DN) that team maps to within LDAP environment +func (m *TeamFull) SetLdapDn(value *string)() { + m.ldap_dn = value +} +// SetMembersCount sets the members_count property value. The members_count property +func (m *TeamFull) SetMembersCount(value *int32)() { + m.members_count = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *TeamFull) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. Name of the team +func (m *TeamFull) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamFull) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationSetting sets the notification_setting property value. The notification setting the team has set +func (m *TeamFull) SetNotificationSetting(value *TeamFull_notification_setting)() { + m.notification_setting = value +} +// SetOrganization sets the organization property value. Team Organization +func (m *TeamFull) SetOrganization(value TeamOrganizationable)() { + m.organization = value +} +// SetParent sets the parent property value. Groups of organization members that gives permissions on specified repositories. +func (m *TeamFull) SetParent(value NullableTeamSimpleable)() { + m.parent = value +} +// SetPermission sets the permission property value. Permission that the team will have for its repositories +func (m *TeamFull) SetPermission(value *string)() { + m.permission = value +} +// SetPrivacy sets the privacy property value. The level of privacy this team should have +func (m *TeamFull) SetPrivacy(value *TeamFull_privacy)() { + m.privacy = value +} +// SetReposCount sets the repos_count property value. The repos_count property +func (m *TeamFull) SetReposCount(value *int32)() { + m.repos_count = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *TeamFull) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetSlug sets the slug property value. The slug property +func (m *TeamFull) SetSlug(value *string)() { + m.slug = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TeamFull) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the team +func (m *TeamFull) SetUrl(value *string)() { + m.url = value +} +type TeamFullable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLdapDn()(*string) + GetMembersCount()(*int32) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationSetting()(*TeamFull_notification_setting) + GetOrganization()(TeamOrganizationable) + GetParent()(NullableTeamSimpleable) + GetPermission()(*string) + GetPrivacy()(*TeamFull_privacy) + GetReposCount()(*int32) + GetRepositoriesUrl()(*string) + GetSlug()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLdapDn(value *string)() + SetMembersCount(value *int32)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationSetting(value *TeamFull_notification_setting)() + SetOrganization(value TeamOrganizationable)() + SetParent(value NullableTeamSimpleable)() + SetPermission(value *string)() + SetPrivacy(value *TeamFull_privacy)() + SetReposCount(value *int32)() + SetRepositoriesUrl(value *string)() + SetSlug(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_full_notification_setting.go b/pkg/github/models/team_full_notification_setting.go new file mode 100644 index 0000000..6bcdc7d --- /dev/null +++ b/pkg/github/models/team_full_notification_setting.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The notification setting the team has set +type TeamFull_notification_setting int + +const ( + NOTIFICATIONS_ENABLED_TEAMFULL_NOTIFICATION_SETTING TeamFull_notification_setting = iota + NOTIFICATIONS_DISABLED_TEAMFULL_NOTIFICATION_SETTING +) + +func (i TeamFull_notification_setting) String() string { + return []string{"notifications_enabled", "notifications_disabled"}[i] +} +func ParseTeamFull_notification_setting(v string) (any, error) { + result := NOTIFICATIONS_ENABLED_TEAMFULL_NOTIFICATION_SETTING + switch v { + case "notifications_enabled": + result = NOTIFICATIONS_ENABLED_TEAMFULL_NOTIFICATION_SETTING + case "notifications_disabled": + result = NOTIFICATIONS_DISABLED_TEAMFULL_NOTIFICATION_SETTING + default: + return 0, errors.New("Unknown TeamFull_notification_setting value: " + v) + } + return &result, nil +} +func SerializeTeamFull_notification_setting(values []TeamFull_notification_setting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamFull_notification_setting) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/team_full_privacy.go b/pkg/github/models/team_full_privacy.go new file mode 100644 index 0000000..1b7d0f4 --- /dev/null +++ b/pkg/github/models/team_full_privacy.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of privacy this team should have +type TeamFull_privacy int + +const ( + CLOSED_TEAMFULL_PRIVACY TeamFull_privacy = iota + SECRET_TEAMFULL_PRIVACY +) + +func (i TeamFull_privacy) String() string { + return []string{"closed", "secret"}[i] +} +func ParseTeamFull_privacy(v string) (any, error) { + result := CLOSED_TEAMFULL_PRIVACY + switch v { + case "closed": + result = CLOSED_TEAMFULL_PRIVACY + case "secret": + result = SECRET_TEAMFULL_PRIVACY + default: + return 0, errors.New("Unknown TeamFull_privacy value: " + v) + } + return &result, nil +} +func SerializeTeamFull_privacy(values []TeamFull_privacy) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamFull_privacy) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/team_membership.go b/pkg/github/models/team_membership.go new file mode 100644 index 0000000..8f5bdf0 --- /dev/null +++ b/pkg/github/models/team_membership.go @@ -0,0 +1,143 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamMembership team Membership +type TeamMembership struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The role of the user in the team. + role *TeamMembership_role + // The state of the user's membership in the team. + state *TeamMembership_state + // The url property + url *string +} +// NewTeamMembership instantiates a new TeamMembership and sets the default values. +func NewTeamMembership()(*TeamMembership) { + m := &TeamMembership{ + } + m.SetAdditionalData(make(map[string]any)) + roleValue := MEMBER_TEAMMEMBERSHIP_ROLE + m.SetRole(&roleValue) + return m +} +// CreateTeamMembershipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamMembershipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamMembership(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamMembership) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamMembership) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamMembership_role) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*TeamMembership_role)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamMembership_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*TeamMembership_state)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetRole gets the role property value. The role of the user in the team. +// returns a *TeamMembership_role when successful +func (m *TeamMembership) GetRole()(*TeamMembership_role) { + return m.role +} +// GetState gets the state property value. The state of the user's membership in the team. +// returns a *TeamMembership_state when successful +func (m *TeamMembership) GetState()(*TeamMembership_state) { + return m.state +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamMembership) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamMembership) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err := writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamMembership) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRole sets the role property value. The role of the user in the team. +func (m *TeamMembership) SetRole(value *TeamMembership_role)() { + m.role = value +} +// SetState sets the state property value. The state of the user's membership in the team. +func (m *TeamMembership) SetState(value *TeamMembership_state)() { + m.state = value +} +// SetUrl sets the url property value. The url property +func (m *TeamMembership) SetUrl(value *string)() { + m.url = value +} +type TeamMembershipable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRole()(*TeamMembership_role) + GetState()(*TeamMembership_state) + GetUrl()(*string) + SetRole(value *TeamMembership_role)() + SetState(value *TeamMembership_state)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_membership_role.go b/pkg/github/models/team_membership_role.go new file mode 100644 index 0000000..e280eb0 --- /dev/null +++ b/pkg/github/models/team_membership_role.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The role of the user in the team. +type TeamMembership_role int + +const ( + MEMBER_TEAMMEMBERSHIP_ROLE TeamMembership_role = iota + MAINTAINER_TEAMMEMBERSHIP_ROLE +) + +func (i TeamMembership_role) String() string { + return []string{"member", "maintainer"}[i] +} +func ParseTeamMembership_role(v string) (any, error) { + result := MEMBER_TEAMMEMBERSHIP_ROLE + switch v { + case "member": + result = MEMBER_TEAMMEMBERSHIP_ROLE + case "maintainer": + result = MAINTAINER_TEAMMEMBERSHIP_ROLE + default: + return 0, errors.New("Unknown TeamMembership_role value: " + v) + } + return &result, nil +} +func SerializeTeamMembership_role(values []TeamMembership_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamMembership_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/team_membership_state.go b/pkg/github/models/team_membership_state.go new file mode 100644 index 0000000..17b0580 --- /dev/null +++ b/pkg/github/models/team_membership_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The state of the user's membership in the team. +type TeamMembership_state int + +const ( + ACTIVE_TEAMMEMBERSHIP_STATE TeamMembership_state = iota + PENDING_TEAMMEMBERSHIP_STATE +) + +func (i TeamMembership_state) String() string { + return []string{"active", "pending"}[i] +} +func ParseTeamMembership_state(v string) (any, error) { + result := ACTIVE_TEAMMEMBERSHIP_STATE + switch v { + case "active": + result = ACTIVE_TEAMMEMBERSHIP_STATE + case "pending": + result = PENDING_TEAMMEMBERSHIP_STATE + default: + return 0, errors.New("Unknown TeamMembership_state value: " + v) + } + return &result, nil +} +func SerializeTeamMembership_state(values []TeamMembership_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamMembership_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/team_organization.go b/pkg/github/models/team_organization.go new file mode 100644 index 0000000..439df77 --- /dev/null +++ b/pkg/github/models/team_organization.go @@ -0,0 +1,1474 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamOrganization team Organization +type TeamOrganization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The archived_at property + archived_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The avatar_url property + avatar_url *string + // The billing_email property + billing_email *string + // The blog property + blog *string + // The collaborators property + collaborators *int32 + // The company property + company *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default_repository_permission property + default_repository_permission *string + // The description property + description *string + // The disk_usage property + disk_usage *int32 + // The email property + email *string + // The events_url property + events_url *string + // The followers property + followers *int32 + // The following property + following *int32 + // The has_organization_projects property + has_organization_projects *bool + // The has_repository_projects property + has_repository_projects *bool + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // The id property + id *int32 + // The is_verified property + is_verified *bool + // The issues_url property + issues_url *string + // The location property + location *string + // The login property + login *string + // The members_allowed_repository_creation_type property + members_allowed_repository_creation_type *string + // The members_can_create_internal_repositories property + members_can_create_internal_repositories *bool + // The members_can_create_pages property + members_can_create_pages *bool + // The members_can_create_private_pages property + members_can_create_private_pages *bool + // The members_can_create_private_repositories property + members_can_create_private_repositories *bool + // The members_can_create_public_pages property + members_can_create_public_pages *bool + // The members_can_create_public_repositories property + members_can_create_public_repositories *bool + // The members_can_create_repositories property + members_can_create_repositories *bool + // The members_can_fork_private_repositories property + members_can_fork_private_repositories *bool + // The members_url property + members_url *string + // The name property + name *string + // The node_id property + node_id *string + // The owned_private_repos property + owned_private_repos *int32 + // The plan property + plan TeamOrganization_planable + // The private_gists property + private_gists *int32 + // The public_gists property + public_gists *int32 + // The public_members_url property + public_members_url *string + // The public_repos property + public_repos *int32 + // The repos_url property + repos_url *string + // The total_private_repos property + total_private_repos *int32 + // The twitter_username property + twitter_username *string + // The two_factor_requirement_enabled property + two_factor_requirement_enabled *bool + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The web_commit_signoff_required property + web_commit_signoff_required *bool +} +// NewTeamOrganization instantiates a new TeamOrganization and sets the default values. +func NewTeamOrganization()(*TeamOrganization) { + m := &TeamOrganization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamOrganization(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamOrganization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchivedAt gets the archived_at property value. The archived_at property +// returns a *Time when successful +func (m *TeamOrganization) GetArchivedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.archived_at +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *TeamOrganization) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetBillingEmail gets the billing_email property value. The billing_email property +// returns a *string when successful +func (m *TeamOrganization) GetBillingEmail()(*string) { + return m.billing_email +} +// GetBlog gets the blog property value. The blog property +// returns a *string when successful +func (m *TeamOrganization) GetBlog()(*string) { + return m.blog +} +// GetCollaborators gets the collaborators property value. The collaborators property +// returns a *int32 when successful +func (m *TeamOrganization) GetCollaborators()(*int32) { + return m.collaborators +} +// GetCompany gets the company property value. The company property +// returns a *string when successful +func (m *TeamOrganization) GetCompany()(*string) { + return m.company +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TeamOrganization) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultRepositoryPermission gets the default_repository_permission property value. The default_repository_permission property +// returns a *string when successful +func (m *TeamOrganization) GetDefaultRepositoryPermission()(*string) { + return m.default_repository_permission +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *TeamOrganization) GetDescription()(*string) { + return m.description +} +// GetDiskUsage gets the disk_usage property value. The disk_usage property +// returns a *int32 when successful +func (m *TeamOrganization) GetDiskUsage()(*int32) { + return m.disk_usage +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *TeamOrganization) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *TeamOrganization) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamOrganization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["archived_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetArchivedAt(val) + } + return nil + } + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["billing_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillingEmail(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCollaborators(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_repository_permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultRepositoryPermission(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["disk_usage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDiskUsage(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowing(val) + } + return nil + } + res["has_organization_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasOrganizationProjects(val) + } + return nil + } + res["has_repository_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasRepositoryProjects(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVerified(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["members_allowed_repository_creation_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersAllowedRepositoryCreationType(val) + } + return nil + } + res["members_can_create_internal_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreateInternalRepositories(val) + } + return nil + } + res["members_can_create_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePages(val) + } + return nil + } + res["members_can_create_private_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePrivatePages(val) + } + return nil + } + res["members_can_create_private_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePrivateRepositories(val) + } + return nil + } + res["members_can_create_public_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePublicPages(val) + } + return nil + } + res["members_can_create_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePublicRepositories(val) + } + return nil + } + res["members_can_create_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreateRepositories(val) + } + return nil + } + res["members_can_fork_private_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanForkPrivateRepositories(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["owned_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOwnedPrivateRepos(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamOrganization_planFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(TeamOrganization_planable)) + } + return nil + } + res["private_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateGists(val) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicMembersUrl(val) + } + return nil + } + res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepos(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["total_private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPrivateRepos(val) + } + return nil + } + res["twitter_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTwitterUsername(val) + } + return nil + } + res["two_factor_requirement_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTwoFactorRequirementEnabled(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + 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 +} +// GetFollowers gets the followers property value. The followers property +// returns a *int32 when successful +func (m *TeamOrganization) GetFollowers()(*int32) { + return m.followers +} +// GetFollowing gets the following property value. The following property +// returns a *int32 when successful +func (m *TeamOrganization) GetFollowing()(*int32) { + return m.following +} +// GetHasOrganizationProjects gets the has_organization_projects property value. The has_organization_projects property +// returns a *bool when successful +func (m *TeamOrganization) GetHasOrganizationProjects()(*bool) { + return m.has_organization_projects +} +// GetHasRepositoryProjects gets the has_repository_projects property value. The has_repository_projects property +// returns a *bool when successful +func (m *TeamOrganization) GetHasRepositoryProjects()(*bool) { + return m.has_repository_projects +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *TeamOrganization) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamOrganization) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TeamOrganization) GetId()(*int32) { + return m.id +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *TeamOrganization) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsVerified gets the is_verified property value. The is_verified property +// returns a *bool when successful +func (m *TeamOrganization) GetIsVerified()(*bool) { + return m.is_verified +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *TeamOrganization) GetLocation()(*string) { + return m.location +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *TeamOrganization) GetLogin()(*string) { + return m.login +} +// GetMembersAllowedRepositoryCreationType gets the members_allowed_repository_creation_type property value. The members_allowed_repository_creation_type property +// returns a *string when successful +func (m *TeamOrganization) GetMembersAllowedRepositoryCreationType()(*string) { + return m.members_allowed_repository_creation_type +} +// GetMembersCanCreateInternalRepositories gets the members_can_create_internal_repositories property value. The members_can_create_internal_repositories property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreateInternalRepositories()(*bool) { + return m.members_can_create_internal_repositories +} +// GetMembersCanCreatePages gets the members_can_create_pages property value. The members_can_create_pages property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreatePages()(*bool) { + return m.members_can_create_pages +} +// GetMembersCanCreatePrivatePages gets the members_can_create_private_pages property value. The members_can_create_private_pages property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreatePrivatePages()(*bool) { + return m.members_can_create_private_pages +} +// GetMembersCanCreatePrivateRepositories gets the members_can_create_private_repositories property value. The members_can_create_private_repositories property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreatePrivateRepositories()(*bool) { + return m.members_can_create_private_repositories +} +// GetMembersCanCreatePublicPages gets the members_can_create_public_pages property value. The members_can_create_public_pages property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreatePublicPages()(*bool) { + return m.members_can_create_public_pages +} +// GetMembersCanCreatePublicRepositories gets the members_can_create_public_repositories property value. The members_can_create_public_repositories property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreatePublicRepositories()(*bool) { + return m.members_can_create_public_repositories +} +// GetMembersCanCreateRepositories gets the members_can_create_repositories property value. The members_can_create_repositories property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanCreateRepositories()(*bool) { + return m.members_can_create_repositories +} +// GetMembersCanForkPrivateRepositories gets the members_can_fork_private_repositories property value. The members_can_fork_private_repositories property +// returns a *bool when successful +func (m *TeamOrganization) GetMembersCanForkPrivateRepositories()(*bool) { + return m.members_can_fork_private_repositories +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *TeamOrganization) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TeamOrganization) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamOrganization) GetNodeId()(*string) { + return m.node_id +} +// GetOwnedPrivateRepos gets the owned_private_repos property value. The owned_private_repos property +// returns a *int32 when successful +func (m *TeamOrganization) GetOwnedPrivateRepos()(*int32) { + return m.owned_private_repos +} +// GetPlan gets the plan property value. The plan property +// returns a TeamOrganization_planable when successful +func (m *TeamOrganization) GetPlan()(TeamOrganization_planable) { + return m.plan +} +// GetPrivateGists gets the private_gists property value. The private_gists property +// returns a *int32 when successful +func (m *TeamOrganization) GetPrivateGists()(*int32) { + return m.private_gists +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *TeamOrganization) GetPublicGists()(*int32) { + return m.public_gists +} +// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property +// returns a *string when successful +func (m *TeamOrganization) GetPublicMembersUrl()(*string) { + return m.public_members_url +} +// GetPublicRepos gets the public_repos property value. The public_repos property +// returns a *int32 when successful +func (m *TeamOrganization) GetPublicRepos()(*int32) { + return m.public_repos +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *TeamOrganization) GetReposUrl()(*string) { + return m.repos_url +} +// GetTotalPrivateRepos gets the total_private_repos property value. The total_private_repos property +// returns a *int32 when successful +func (m *TeamOrganization) GetTotalPrivateRepos()(*int32) { + return m.total_private_repos +} +// GetTwitterUsername gets the twitter_username property value. The twitter_username property +// returns a *string when successful +func (m *TeamOrganization) GetTwitterUsername()(*string) { + return m.twitter_username +} +// GetTwoFactorRequirementEnabled gets the two_factor_requirement_enabled property value. The two_factor_requirement_enabled property +// returns a *bool when successful +func (m *TeamOrganization) GetTwoFactorRequirementEnabled()(*bool) { + return m.two_factor_requirement_enabled +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *TeamOrganization) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TeamOrganization) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamOrganization) GetUrl()(*string) { + return m.url +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property +// returns a *bool when successful +func (m *TeamOrganization) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *TeamOrganization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("archived_at", m.GetArchivedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("billing_email", m.GetBillingEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("collaborators", m.GetCollaborators()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_repository_permission", m.GetDefaultRepositoryPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("disk_usage", m.GetDiskUsage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("followers", m.GetFollowers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("following", m.GetFollowing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_organization_projects", m.GetHasOrganizationProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_repository_projects", m.GetHasRepositoryProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_verified", m.GetIsVerified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_allowed_repository_creation_type", m.GetMembersAllowedRepositoryCreationType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_internal_repositories", m.GetMembersCanCreateInternalRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_pages", m.GetMembersCanCreatePages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_private_pages", m.GetMembersCanCreatePrivatePages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_private_repositories", m.GetMembersCanCreatePrivateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_public_pages", m.GetMembersCanCreatePublicPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_public_repositories", m.GetMembersCanCreatePublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_repositories", m.GetMembersCanCreateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_fork_private_repositories", m.GetMembersCanForkPrivateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("owned_private_repos", m.GetOwnedPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_gists", m.GetPrivateGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_private_repos", m.GetTotalPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("twitter_username", m.GetTwitterUsername()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("two_factor_requirement_enabled", m.GetTwoFactorRequirementEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *TeamOrganization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchivedAt sets the archived_at property value. The archived_at property +func (m *TeamOrganization) SetArchivedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.archived_at = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *TeamOrganization) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetBillingEmail sets the billing_email property value. The billing_email property +func (m *TeamOrganization) SetBillingEmail(value *string)() { + m.billing_email = value +} +// SetBlog sets the blog property value. The blog property +func (m *TeamOrganization) SetBlog(value *string)() { + m.blog = value +} +// SetCollaborators sets the collaborators property value. The collaborators property +func (m *TeamOrganization) SetCollaborators(value *int32)() { + m.collaborators = value +} +// SetCompany sets the company property value. The company property +func (m *TeamOrganization) SetCompany(value *string)() { + m.company = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TeamOrganization) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultRepositoryPermission sets the default_repository_permission property value. The default_repository_permission property +func (m *TeamOrganization) SetDefaultRepositoryPermission(value *string)() { + m.default_repository_permission = value +} +// SetDescription sets the description property value. The description property +func (m *TeamOrganization) SetDescription(value *string)() { + m.description = value +} +// SetDiskUsage sets the disk_usage property value. The disk_usage property +func (m *TeamOrganization) SetDiskUsage(value *int32)() { + m.disk_usage = value +} +// SetEmail sets the email property value. The email property +func (m *TeamOrganization) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *TeamOrganization) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowers sets the followers property value. The followers property +func (m *TeamOrganization) SetFollowers(value *int32)() { + m.followers = value +} +// SetFollowing sets the following property value. The following property +func (m *TeamOrganization) SetFollowing(value *int32)() { + m.following = value +} +// SetHasOrganizationProjects sets the has_organization_projects property value. The has_organization_projects property +func (m *TeamOrganization) SetHasOrganizationProjects(value *bool)() { + m.has_organization_projects = value +} +// SetHasRepositoryProjects sets the has_repository_projects property value. The has_repository_projects property +func (m *TeamOrganization) SetHasRepositoryProjects(value *bool)() { + m.has_repository_projects = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *TeamOrganization) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamOrganization) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *TeamOrganization) SetId(value *int32)() { + m.id = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *TeamOrganization) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsVerified sets the is_verified property value. The is_verified property +func (m *TeamOrganization) SetIsVerified(value *bool)() { + m.is_verified = value +} +// SetLocation sets the location property value. The location property +func (m *TeamOrganization) SetLocation(value *string)() { + m.location = value +} +// SetLogin sets the login property value. The login property +func (m *TeamOrganization) SetLogin(value *string)() { + m.login = value +} +// SetMembersAllowedRepositoryCreationType sets the members_allowed_repository_creation_type property value. The members_allowed_repository_creation_type property +func (m *TeamOrganization) SetMembersAllowedRepositoryCreationType(value *string)() { + m.members_allowed_repository_creation_type = value +} +// SetMembersCanCreateInternalRepositories sets the members_can_create_internal_repositories property value. The members_can_create_internal_repositories property +func (m *TeamOrganization) SetMembersCanCreateInternalRepositories(value *bool)() { + m.members_can_create_internal_repositories = value +} +// SetMembersCanCreatePages sets the members_can_create_pages property value. The members_can_create_pages property +func (m *TeamOrganization) SetMembersCanCreatePages(value *bool)() { + m.members_can_create_pages = value +} +// SetMembersCanCreatePrivatePages sets the members_can_create_private_pages property value. The members_can_create_private_pages property +func (m *TeamOrganization) SetMembersCanCreatePrivatePages(value *bool)() { + m.members_can_create_private_pages = value +} +// SetMembersCanCreatePrivateRepositories sets the members_can_create_private_repositories property value. The members_can_create_private_repositories property +func (m *TeamOrganization) SetMembersCanCreatePrivateRepositories(value *bool)() { + m.members_can_create_private_repositories = value +} +// SetMembersCanCreatePublicPages sets the members_can_create_public_pages property value. The members_can_create_public_pages property +func (m *TeamOrganization) SetMembersCanCreatePublicPages(value *bool)() { + m.members_can_create_public_pages = value +} +// SetMembersCanCreatePublicRepositories sets the members_can_create_public_repositories property value. The members_can_create_public_repositories property +func (m *TeamOrganization) SetMembersCanCreatePublicRepositories(value *bool)() { + m.members_can_create_public_repositories = value +} +// SetMembersCanCreateRepositories sets the members_can_create_repositories property value. The members_can_create_repositories property +func (m *TeamOrganization) SetMembersCanCreateRepositories(value *bool)() { + m.members_can_create_repositories = value +} +// SetMembersCanForkPrivateRepositories sets the members_can_fork_private_repositories property value. The members_can_fork_private_repositories property +func (m *TeamOrganization) SetMembersCanForkPrivateRepositories(value *bool)() { + m.members_can_fork_private_repositories = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *TeamOrganization) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *TeamOrganization) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamOrganization) SetNodeId(value *string)() { + m.node_id = value +} +// SetOwnedPrivateRepos sets the owned_private_repos property value. The owned_private_repos property +func (m *TeamOrganization) SetOwnedPrivateRepos(value *int32)() { + m.owned_private_repos = value +} +// SetPlan sets the plan property value. The plan property +func (m *TeamOrganization) SetPlan(value TeamOrganization_planable)() { + m.plan = value +} +// SetPrivateGists sets the private_gists property value. The private_gists property +func (m *TeamOrganization) SetPrivateGists(value *int32)() { + m.private_gists = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *TeamOrganization) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property +func (m *TeamOrganization) SetPublicMembersUrl(value *string)() { + m.public_members_url = value +} +// SetPublicRepos sets the public_repos property value. The public_repos property +func (m *TeamOrganization) SetPublicRepos(value *int32)() { + m.public_repos = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *TeamOrganization) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetTotalPrivateRepos sets the total_private_repos property value. The total_private_repos property +func (m *TeamOrganization) SetTotalPrivateRepos(value *int32)() { + m.total_private_repos = value +} +// SetTwitterUsername sets the twitter_username property value. The twitter_username property +func (m *TeamOrganization) SetTwitterUsername(value *string)() { + m.twitter_username = value +} +// SetTwoFactorRequirementEnabled sets the two_factor_requirement_enabled property value. The two_factor_requirement_enabled property +func (m *TeamOrganization) SetTwoFactorRequirementEnabled(value *bool)() { + m.two_factor_requirement_enabled = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *TeamOrganization) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TeamOrganization) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *TeamOrganization) SetUrl(value *string)() { + m.url = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property +func (m *TeamOrganization) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type TeamOrganizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchivedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAvatarUrl()(*string) + GetBillingEmail()(*string) + GetBlog()(*string) + GetCollaborators()(*int32) + GetCompany()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultRepositoryPermission()(*string) + GetDescription()(*string) + GetDiskUsage()(*int32) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowers()(*int32) + GetFollowing()(*int32) + GetHasOrganizationProjects()(*bool) + GetHasRepositoryProjects()(*bool) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssuesUrl()(*string) + GetIsVerified()(*bool) + GetLocation()(*string) + GetLogin()(*string) + GetMembersAllowedRepositoryCreationType()(*string) + GetMembersCanCreateInternalRepositories()(*bool) + GetMembersCanCreatePages()(*bool) + GetMembersCanCreatePrivatePages()(*bool) + GetMembersCanCreatePrivateRepositories()(*bool) + GetMembersCanCreatePublicPages()(*bool) + GetMembersCanCreatePublicRepositories()(*bool) + GetMembersCanCreateRepositories()(*bool) + GetMembersCanForkPrivateRepositories()(*bool) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOwnedPrivateRepos()(*int32) + GetPlan()(TeamOrganization_planable) + GetPrivateGists()(*int32) + GetPublicGists()(*int32) + GetPublicMembersUrl()(*string) + GetPublicRepos()(*int32) + GetReposUrl()(*string) + GetTotalPrivateRepos()(*int32) + GetTwitterUsername()(*string) + GetTwoFactorRequirementEnabled()(*bool) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetWebCommitSignoffRequired()(*bool) + SetArchivedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAvatarUrl(value *string)() + SetBillingEmail(value *string)() + SetBlog(value *string)() + SetCollaborators(value *int32)() + SetCompany(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultRepositoryPermission(value *string)() + SetDescription(value *string)() + SetDiskUsage(value *int32)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowers(value *int32)() + SetFollowing(value *int32)() + SetHasOrganizationProjects(value *bool)() + SetHasRepositoryProjects(value *bool)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssuesUrl(value *string)() + SetIsVerified(value *bool)() + SetLocation(value *string)() + SetLogin(value *string)() + SetMembersAllowedRepositoryCreationType(value *string)() + SetMembersCanCreateInternalRepositories(value *bool)() + SetMembersCanCreatePages(value *bool)() + SetMembersCanCreatePrivatePages(value *bool)() + SetMembersCanCreatePrivateRepositories(value *bool)() + SetMembersCanCreatePublicPages(value *bool)() + SetMembersCanCreatePublicRepositories(value *bool)() + SetMembersCanCreateRepositories(value *bool)() + SetMembersCanForkPrivateRepositories(value *bool)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOwnedPrivateRepos(value *int32)() + SetPlan(value TeamOrganization_planable)() + SetPrivateGists(value *int32)() + SetPublicGists(value *int32)() + SetPublicMembersUrl(value *string)() + SetPublicRepos(value *int32)() + SetReposUrl(value *string)() + SetTotalPrivateRepos(value *int32)() + SetTwitterUsername(value *string)() + SetTwoFactorRequirementEnabled(value *bool)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/team_organization_plan.go b/pkg/github/models/team_organization_plan.go new file mode 100644 index 0000000..774360a --- /dev/null +++ b/pkg/github/models/team_organization_plan.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TeamOrganization_plan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The filled_seats property + filled_seats *int32 + // The name property + name *string + // The private_repos property + private_repos *int32 + // The seats property + seats *int32 + // The space property + space *int32 +} +// NewTeamOrganization_plan instantiates a new TeamOrganization_plan and sets the default values. +func NewTeamOrganization_plan()(*TeamOrganization_plan) { + m := &TeamOrganization_plan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamOrganization_planFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamOrganization_planFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamOrganization_plan(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamOrganization_plan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamOrganization_plan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["filled_seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFilledSeats(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPrivateRepos(val) + } + return nil + } + res["seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeats(val) + } + return nil + } + res["space"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSpace(val) + } + return nil + } + return res +} +// GetFilledSeats gets the filled_seats property value. The filled_seats property +// returns a *int32 when successful +func (m *TeamOrganization_plan) GetFilledSeats()(*int32) { + return m.filled_seats +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TeamOrganization_plan) GetName()(*string) { + return m.name +} +// GetPrivateRepos gets the private_repos property value. The private_repos property +// returns a *int32 when successful +func (m *TeamOrganization_plan) GetPrivateRepos()(*int32) { + return m.private_repos +} +// GetSeats gets the seats property value. The seats property +// returns a *int32 when successful +func (m *TeamOrganization_plan) GetSeats()(*int32) { + return m.seats +} +// GetSpace gets the space property value. The space property +// returns a *int32 when successful +func (m *TeamOrganization_plan) GetSpace()(*int32) { + return m.space +} +// Serialize serializes information the current object +func (m *TeamOrganization_plan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("filled_seats", m.GetFilledSeats()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("private_repos", m.GetPrivateRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("seats", m.GetSeats()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("space", m.GetSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamOrganization_plan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFilledSeats sets the filled_seats property value. The filled_seats property +func (m *TeamOrganization_plan) SetFilledSeats(value *int32)() { + m.filled_seats = value +} +// SetName sets the name property value. The name property +func (m *TeamOrganization_plan) SetName(value *string)() { + m.name = value +} +// SetPrivateRepos sets the private_repos property value. The private_repos property +func (m *TeamOrganization_plan) SetPrivateRepos(value *int32)() { + m.private_repos = value +} +// SetSeats sets the seats property value. The seats property +func (m *TeamOrganization_plan) SetSeats(value *int32)() { + m.seats = value +} +// SetSpace sets the space property value. The space property +func (m *TeamOrganization_plan) SetSpace(value *int32)() { + m.space = value +} +type TeamOrganization_planable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFilledSeats()(*int32) + GetName()(*string) + GetPrivateRepos()(*int32) + GetSeats()(*int32) + GetSpace()(*int32) + SetFilledSeats(value *int32)() + SetName(value *string)() + SetPrivateRepos(value *int32)() + SetSeats(value *int32)() + SetSpace(value *int32)() +} diff --git a/pkg/github/models/team_permissions.go b/pkg/github/models/team_permissions.go new file mode 100644 index 0000000..22127e9 --- /dev/null +++ b/pkg/github/models/team_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Team_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewTeam_permissions instantiates a new Team_permissions and sets the default values. +func NewTeam_permissions()(*Team_permissions) { + m := &Team_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeam_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeam_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeam_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Team_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *Team_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Team_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *Team_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *Team_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *Team_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *Team_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *Team_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Team_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *Team_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *Team_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *Team_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *Team_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *Team_permissions) SetTriage(value *bool)() { + m.triage = value +} +type Team_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/team_project.go b/pkg/github/models/team_project.go new file mode 100644 index 0000000..df9e788 --- /dev/null +++ b/pkg/github/models/team_project.go @@ -0,0 +1,516 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamProject a team's access to a project. +type TeamProject struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The body property + body *string + // The columns_url property + columns_url *string + // The created_at property + created_at *string + // A GitHub user. + creator SimpleUserable + // The html_url property + html_url *string + // The id property + id *int32 + // The name property + name *string + // The node_id property + node_id *string + // The number property + number *int32 + // The organization permission for this project. Only present when owner is an organization. + organization_permission *string + // The owner_url property + owner_url *string + // The permissions property + permissions TeamProject_permissionsable + // Whether the project is private or not. Only present when owner is an organization. + private *bool + // The state property + state *string + // The updated_at property + updated_at *string + // The url property + url *string +} +// NewTeamProject instantiates a new TeamProject and sets the default values. +func NewTeamProject()(*TeamProject) { + m := &TeamProject{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamProjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamProjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamProject(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamProject) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The body property +// returns a *string when successful +func (m *TeamProject) GetBody()(*string) { + return m.body +} +// GetColumnsUrl gets the columns_url property value. The columns_url property +// returns a *string when successful +func (m *TeamProject) GetColumnsUrl()(*string) { + return m.columns_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *TeamProject) GetCreatedAt()(*string) { + return m.created_at +} +// GetCreator gets the creator property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TeamProject) GetCreator()(SimpleUserable) { + return m.creator +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamProject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["columns_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreator(val.(SimpleUserable)) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["organization_permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationPermission(val) + } + return nil + } + res["owner_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerUrl(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamProject_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(TeamProject_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamProject) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TeamProject) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TeamProject) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamProject) GetNodeId()(*string) { + return m.node_id +} +// GetNumber gets the number property value. The number property +// returns a *int32 when successful +func (m *TeamProject) GetNumber()(*int32) { + return m.number +} +// GetOrganizationPermission gets the organization_permission property value. The organization permission for this project. Only present when owner is an organization. +// returns a *string when successful +func (m *TeamProject) GetOrganizationPermission()(*string) { + return m.organization_permission +} +// GetOwnerUrl gets the owner_url property value. The owner_url property +// returns a *string when successful +func (m *TeamProject) GetOwnerUrl()(*string) { + return m.owner_url +} +// GetPermissions gets the permissions property value. The permissions property +// returns a TeamProject_permissionsable when successful +func (m *TeamProject) GetPermissions()(TeamProject_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. Whether the project is private or not. Only present when owner is an organization. +// returns a *bool when successful +func (m *TeamProject) GetPrivate()(*bool) { + return m.private +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *TeamProject) GetState()(*string) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *TeamProject) GetUpdatedAt()(*string) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamProject) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamProject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("columns_url", m.GetColumnsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization_permission", m.GetOrganizationPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("owner_url", m.GetOwnerUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamProject) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The body property +func (m *TeamProject) SetBody(value *string)() { + m.body = value +} +// SetColumnsUrl sets the columns_url property value. The columns_url property +func (m *TeamProject) SetColumnsUrl(value *string)() { + m.columns_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TeamProject) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetCreator sets the creator property value. A GitHub user. +func (m *TeamProject) SetCreator(value SimpleUserable)() { + m.creator = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamProject) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *TeamProject) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *TeamProject) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamProject) SetNodeId(value *string)() { + m.node_id = value +} +// SetNumber sets the number property value. The number property +func (m *TeamProject) SetNumber(value *int32)() { + m.number = value +} +// SetOrganizationPermission sets the organization_permission property value. The organization permission for this project. Only present when owner is an organization. +func (m *TeamProject) SetOrganizationPermission(value *string)() { + m.organization_permission = value +} +// SetOwnerUrl sets the owner_url property value. The owner_url property +func (m *TeamProject) SetOwnerUrl(value *string)() { + m.owner_url = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *TeamProject) SetPermissions(value TeamProject_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. Whether the project is private or not. Only present when owner is an organization. +func (m *TeamProject) SetPrivate(value *bool)() { + m.private = value +} +// SetState sets the state property value. The state property +func (m *TeamProject) SetState(value *string)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TeamProject) SetUpdatedAt(value *string)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *TeamProject) SetUrl(value *string)() { + m.url = value +} +type TeamProjectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetColumnsUrl()(*string) + GetCreatedAt()(*string) + GetCreator()(SimpleUserable) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetNumber()(*int32) + GetOrganizationPermission()(*string) + GetOwnerUrl()(*string) + GetPermissions()(TeamProject_permissionsable) + GetPrivate()(*bool) + GetState()(*string) + GetUpdatedAt()(*string) + GetUrl()(*string) + SetBody(value *string)() + SetColumnsUrl(value *string)() + SetCreatedAt(value *string)() + SetCreator(value SimpleUserable)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetNumber(value *int32)() + SetOrganizationPermission(value *string)() + SetOwnerUrl(value *string)() + SetPermissions(value TeamProject_permissionsable)() + SetPrivate(value *bool)() + SetState(value *string)() + SetUpdatedAt(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_project_permissions.go b/pkg/github/models/team_project_permissions.go new file mode 100644 index 0000000..bdaed3c --- /dev/null +++ b/pkg/github/models/team_project_permissions.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TeamProject_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The read property + read *bool + // The write property + write *bool +} +// NewTeamProject_permissions instantiates a new TeamProject_permissions and sets the default values. +func NewTeamProject_permissions()(*TeamProject_permissions) { + m := &TeamProject_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamProject_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamProject_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamProject_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamProject_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *TeamProject_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamProject_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["read"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRead(val) + } + return nil + } + res["write"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWrite(val) + } + return nil + } + return res +} +// GetRead gets the read property value. The read property +// returns a *bool when successful +func (m *TeamProject_permissions) GetRead()(*bool) { + return m.read +} +// GetWrite gets the write property value. The write property +// returns a *bool when successful +func (m *TeamProject_permissions) GetWrite()(*bool) { + return m.write +} +// Serialize serializes information the current object +func (m *TeamProject_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("read", m.GetRead()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("write", m.GetWrite()) + 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 *TeamProject_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *TeamProject_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetRead sets the read property value. The read property +func (m *TeamProject_permissions) SetRead(value *bool)() { + m.read = value +} +// SetWrite sets the write property value. The write property +func (m *TeamProject_permissions) SetWrite(value *bool)() { + m.write = value +} +type TeamProject_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetRead()(*bool) + GetWrite()(*bool) + SetAdmin(value *bool)() + SetRead(value *bool)() + SetWrite(value *bool)() +} diff --git a/pkg/github/models/team_repository.go b/pkg/github/models/team_repository.go new file mode 100644 index 0000000..c50f114 --- /dev/null +++ b/pkg/github/models/team_repository.go @@ -0,0 +1,2642 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamRepository a team's access to a repository. +type TeamRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to allow Auto-merge to be used on pull requests. + allow_auto_merge *bool + // Whether to allow forking this repo + allow_forking *bool + // Whether to allow merge commits for pull requests. + allow_merge_commit *bool + // Whether to allow rebase merges for pull requests. + allow_rebase_merge *bool + // Whether to allow squash merges for pull requests. + allow_squash_merge *bool + // The archive_url property + archive_url *string + // Whether the repository is archived. + archived *bool + // The assignees_url property + assignees_url *string + // The blobs_url property + blobs_url *string + // The branches_url property + branches_url *string + // The clone_url property + clone_url *string + // The collaborators_url property + collaborators_url *string + // The comments_url property + comments_url *string + // The commits_url property + commits_url *string + // The compare_url property + compare_url *string + // The contents_url property + contents_url *string + // The contributors_url property + contributors_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The default branch of the repository. + default_branch *string + // Whether to delete head branches when pull requests are merged + delete_branch_on_merge *bool + // The deployments_url property + deployments_url *string + // The description property + description *string + // Returns whether or not this repository disabled. + disabled *bool + // The downloads_url property + downloads_url *string + // The events_url property + events_url *string + // The fork property + fork *bool + // The forks property + forks *int32 + // The forks_count property + forks_count *int32 + // The forks_url property + forks_url *string + // The full_name property + full_name *string + // The git_commits_url property + git_commits_url *string + // The git_refs_url property + git_refs_url *string + // The git_tags_url property + git_tags_url *string + // The git_url property + git_url *string + // Whether downloads are enabled. + has_downloads *bool + // Whether issues are enabled. + has_issues *bool + // The has_pages property + has_pages *bool + // Whether projects are enabled. + has_projects *bool + // Whether the wiki is enabled. + has_wiki *bool + // The homepage property + homepage *string + // The hooks_url property + hooks_url *string + // The html_url property + html_url *string + // Unique identifier of the repository + id *int32 + // Whether this repository acts as a template that can be used to generate new repositories. + is_template *bool + // The issue_comment_url property + issue_comment_url *string + // The issue_events_url property + issue_events_url *string + // The issues_url property + issues_url *string + // The keys_url property + keys_url *string + // The labels_url property + labels_url *string + // The language property + language *string + // The languages_url property + languages_url *string + // License Simple + license NullableLicenseSimpleable + // The master_branch property + master_branch *string + // The merges_url property + merges_url *string + // The milestones_url property + milestones_url *string + // The mirror_url property + mirror_url *string + // The name of the repository. + name *string + // The network_count property + network_count *int32 + // The node_id property + node_id *string + // The notifications_url property + notifications_url *string + // The open_issues property + open_issues *int32 + // The open_issues_count property + open_issues_count *int32 + // A GitHub user. + owner NullableSimpleUserable + // The permissions property + permissions TeamRepository_permissionsable + // Whether the repository is private or public. + private *bool + // The pulls_url property + pulls_url *string + // The pushed_at property + pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The releases_url property + releases_url *string + // The role_name property + role_name *string + // The size property + size *int32 + // The ssh_url property + ssh_url *string + // The stargazers_count property + stargazers_count *int32 + // The stargazers_url property + stargazers_url *string + // The statuses_url property + statuses_url *string + // The subscribers_count property + subscribers_count *int32 + // The subscribers_url property + subscribers_url *string + // The subscription_url property + subscription_url *string + // The svn_url property + svn_url *string + // The tags_url property + tags_url *string + // The teams_url property + teams_url *string + // The temp_clone_token property + temp_clone_token *string + // The topics property + topics []string + // The trees_url property + trees_url *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string + // The repository visibility: public, private, or internal. + visibility *string + // The watchers property + watchers *int32 + // The watchers_count property + watchers_count *int32 + // Whether to require contributors to sign off on web-based commits + web_commit_signoff_required *bool +} +// NewTeamRepository instantiates a new TeamRepository and sets the default values. +func NewTeamRepository()(*TeamRepository) { + m := &TeamRepository{ + } + m.SetAdditionalData(make(map[string]any)) + visibilityValue := "public" + m.SetVisibility(&visibilityValue) + return m +} +// CreateTeamRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +// returns a *bool when successful +func (m *TeamRepository) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowForking gets the allow_forking property value. Whether to allow forking this repo +// returns a *bool when successful +func (m *TeamRepository) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +// returns a *bool when successful +func (m *TeamRepository) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +// returns a *bool when successful +func (m *TeamRepository) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +// returns a *bool when successful +func (m *TeamRepository) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetArchived gets the archived property value. Whether the repository is archived. +// returns a *bool when successful +func (m *TeamRepository) GetArchived()(*bool) { + return m.archived +} +// GetArchiveUrl gets the archive_url property value. The archive_url property +// returns a *string when successful +func (m *TeamRepository) GetArchiveUrl()(*string) { + return m.archive_url +} +// GetAssigneesUrl gets the assignees_url property value. The assignees_url property +// returns a *string when successful +func (m *TeamRepository) GetAssigneesUrl()(*string) { + return m.assignees_url +} +// GetBlobsUrl gets the blobs_url property value. The blobs_url property +// returns a *string when successful +func (m *TeamRepository) GetBlobsUrl()(*string) { + return m.blobs_url +} +// GetBranchesUrl gets the branches_url property value. The branches_url property +// returns a *string when successful +func (m *TeamRepository) GetBranchesUrl()(*string) { + return m.branches_url +} +// GetCloneUrl gets the clone_url property value. The clone_url property +// returns a *string when successful +func (m *TeamRepository) GetCloneUrl()(*string) { + return m.clone_url +} +// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property +// returns a *string when successful +func (m *TeamRepository) GetCollaboratorsUrl()(*string) { + return m.collaborators_url +} +// GetCommentsUrl gets the comments_url property value. The comments_url property +// returns a *string when successful +func (m *TeamRepository) GetCommentsUrl()(*string) { + return m.comments_url +} +// GetCommitsUrl gets the commits_url property value. The commits_url property +// returns a *string when successful +func (m *TeamRepository) GetCommitsUrl()(*string) { + return m.commits_url +} +// GetCompareUrl gets the compare_url property value. The compare_url property +// returns a *string when successful +func (m *TeamRepository) GetCompareUrl()(*string) { + return m.compare_url +} +// GetContentsUrl gets the contents_url property value. The contents_url property +// returns a *string when successful +func (m *TeamRepository) GetContentsUrl()(*string) { + return m.contents_url +} +// GetContributorsUrl gets the contributors_url property value. The contributors_url property +// returns a *string when successful +func (m *TeamRepository) GetContributorsUrl()(*string) { + return m.contributors_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TeamRepository) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDefaultBranch gets the default_branch property value. The default branch of the repository. +// returns a *string when successful +func (m *TeamRepository) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +// returns a *bool when successful +func (m *TeamRepository) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property +// returns a *string when successful +func (m *TeamRepository) GetDeploymentsUrl()(*string) { + return m.deployments_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *TeamRepository) GetDescription()(*string) { + return m.description +} +// GetDisabled gets the disabled property value. Returns whether or not this repository disabled. +// returns a *bool when successful +func (m *TeamRepository) GetDisabled()(*bool) { + return m.disabled +} +// GetDownloadsUrl gets the downloads_url property value. The downloads_url property +// returns a *string when successful +func (m *TeamRepository) GetDownloadsUrl()(*string) { + return m.downloads_url +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *TeamRepository) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamRepository) 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["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveUrl(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneesUrl(val) + } + return nil + } + res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlobsUrl(val) + } + return nil + } + res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranchesUrl(val) + } + return nil + } + res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloneUrl(val) + } + return nil + } + res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollaboratorsUrl(val) + } + return nil + } + res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsUrl(val) + } + return nil + } + res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitsUrl(val) + } + return nil + } + res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompareUrl(val) + } + return nil + } + res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentsUrl(val) + } + return nil + } + res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContributorsUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["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["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentsUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabled(val) + } + return nil + } + res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadsUrl(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFork(val) + } + return nil + } + res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForks(val) + } + return nil + } + res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetForksCount(val) + } + return nil + } + res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetForksUrl(val) + } + return nil + } + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitCommitsUrl(val) + } + return nil + } + res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitRefsUrl(val) + } + return nil + } + res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitTagsUrl(val) + } + return nil + } + res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitUrl(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPages(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueCommentUrl(val) + } + return nil + } + res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueEventsUrl(val) + } + return nil + } + res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeysUrl(val) + } + return nil + } + res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelsUrl(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguagesUrl(val) + } + return nil + } + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicense(val.(NullableLicenseSimpleable)) + } + return nil + } + res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMasterBranch(val) + } + return nil + } + res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMergesUrl(val) + } + return nil + } + res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMilestonesUrl(val) + } + return nil + } + res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMirrorUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNetworkCount(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsUrl(val) + } + return nil + } + res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssues(val) + } + return nil + } + res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenIssuesCount(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(NullableSimpleUserable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamRepository_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(TeamRepository_permissionsable)) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullsUrl(val) + } + return nil + } + res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPushedAt(val) + } + return nil + } + res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasesUrl(val) + } + return nil + } + res["role_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSshUrl(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStargazersUrl(val) + } + return nil + } + res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusesUrl(val) + } + return nil + } + res["subscribers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersCount(val) + } + return nil + } + res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribersUrl(val) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSvnUrl(val) + } + return nil + } + res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagsUrl(val) + } + return nil + } + res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsUrl(val) + } + return nil + } + res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTempCloneToken(val) + } + return nil + } + res["topics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTopics(res) + } + return nil + } + res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTreesUrl(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchers(val) + } + return nil + } + res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWatchersCount(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetFork gets the fork property value. The fork property +// returns a *bool when successful +func (m *TeamRepository) GetFork()(*bool) { + return m.fork +} +// GetForks gets the forks property value. The forks property +// returns a *int32 when successful +func (m *TeamRepository) GetForks()(*int32) { + return m.forks +} +// GetForksCount gets the forks_count property value. The forks_count property +// returns a *int32 when successful +func (m *TeamRepository) GetForksCount()(*int32) { + return m.forks_count +} +// GetForksUrl gets the forks_url property value. The forks_url property +// returns a *string when successful +func (m *TeamRepository) GetForksUrl()(*string) { + return m.forks_url +} +// GetFullName gets the full_name property value. The full_name property +// returns a *string when successful +func (m *TeamRepository) GetFullName()(*string) { + return m.full_name +} +// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property +// returns a *string when successful +func (m *TeamRepository) GetGitCommitsUrl()(*string) { + return m.git_commits_url +} +// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property +// returns a *string when successful +func (m *TeamRepository) GetGitRefsUrl()(*string) { + return m.git_refs_url +} +// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property +// returns a *string when successful +func (m *TeamRepository) GetGitTagsUrl()(*string) { + return m.git_tags_url +} +// GetGitUrl gets the git_url property value. The git_url property +// returns a *string when successful +func (m *TeamRepository) GetGitUrl()(*string) { + return m.git_url +} +// GetHasDownloads gets the has_downloads property value. Whether downloads are enabled. +// returns a *bool when successful +func (m *TeamRepository) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. Whether issues are enabled. +// returns a *bool when successful +func (m *TeamRepository) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasPages gets the has_pages property value. The has_pages property +// returns a *bool when successful +func (m *TeamRepository) GetHasPages()(*bool) { + return m.has_pages +} +// GetHasProjects gets the has_projects property value. Whether projects are enabled. +// returns a *bool when successful +func (m *TeamRepository) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. Whether the wiki is enabled. +// returns a *bool when successful +func (m *TeamRepository) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. The homepage property +// returns a *string when successful +func (m *TeamRepository) GetHomepage()(*string) { + return m.homepage +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *TeamRepository) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamRepository) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the repository +// returns a *int32 when successful +func (m *TeamRepository) GetId()(*int32) { + return m.id +} +// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property +// returns a *string when successful +func (m *TeamRepository) GetIssueCommentUrl()(*string) { + return m.issue_comment_url +} +// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property +// returns a *string when successful +func (m *TeamRepository) GetIssueEventsUrl()(*string) { + return m.issue_events_url +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *TeamRepository) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetIsTemplate gets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +// returns a *bool when successful +func (m *TeamRepository) GetIsTemplate()(*bool) { + return m.is_template +} +// GetKeysUrl gets the keys_url property value. The keys_url property +// returns a *string when successful +func (m *TeamRepository) GetKeysUrl()(*string) { + return m.keys_url +} +// GetLabelsUrl gets the labels_url property value. The labels_url property +// returns a *string when successful +func (m *TeamRepository) GetLabelsUrl()(*string) { + return m.labels_url +} +// GetLanguage gets the language property value. The language property +// returns a *string when successful +func (m *TeamRepository) GetLanguage()(*string) { + return m.language +} +// GetLanguagesUrl gets the languages_url property value. The languages_url property +// returns a *string when successful +func (m *TeamRepository) GetLanguagesUrl()(*string) { + return m.languages_url +} +// GetLicense gets the license property value. License Simple +// returns a NullableLicenseSimpleable when successful +func (m *TeamRepository) GetLicense()(NullableLicenseSimpleable) { + return m.license +} +// GetMasterBranch gets the master_branch property value. The master_branch property +// returns a *string when successful +func (m *TeamRepository) GetMasterBranch()(*string) { + return m.master_branch +} +// GetMergesUrl gets the merges_url property value. The merges_url property +// returns a *string when successful +func (m *TeamRepository) GetMergesUrl()(*string) { + return m.merges_url +} +// GetMilestonesUrl gets the milestones_url property value. The milestones_url property +// returns a *string when successful +func (m *TeamRepository) GetMilestonesUrl()(*string) { + return m.milestones_url +} +// GetMirrorUrl gets the mirror_url property value. The mirror_url property +// returns a *string when successful +func (m *TeamRepository) GetMirrorUrl()(*string) { + return m.mirror_url +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *TeamRepository) GetName()(*string) { + return m.name +} +// GetNetworkCount gets the network_count property value. The network_count property +// returns a *int32 when successful +func (m *TeamRepository) GetNetworkCount()(*int32) { + return m.network_count +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamRepository) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationsUrl gets the notifications_url property value. The notifications_url property +// returns a *string when successful +func (m *TeamRepository) GetNotificationsUrl()(*string) { + return m.notifications_url +} +// GetOpenIssues gets the open_issues property value. The open_issues property +// returns a *int32 when successful +func (m *TeamRepository) GetOpenIssues()(*int32) { + return m.open_issues +} +// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property +// returns a *int32 when successful +func (m *TeamRepository) GetOpenIssuesCount()(*int32) { + return m.open_issues_count +} +// GetOwner gets the owner property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *TeamRepository) GetOwner()(NullableSimpleUserable) { + return m.owner +} +// GetPermissions gets the permissions property value. The permissions property +// returns a TeamRepository_permissionsable when successful +func (m *TeamRepository) GetPermissions()(TeamRepository_permissionsable) { + return m.permissions +} +// GetPrivate gets the private property value. Whether the repository is private or public. +// returns a *bool when successful +func (m *TeamRepository) GetPrivate()(*bool) { + return m.private +} +// GetPullsUrl gets the pulls_url property value. The pulls_url property +// returns a *string when successful +func (m *TeamRepository) GetPullsUrl()(*string) { + return m.pulls_url +} +// GetPushedAt gets the pushed_at property value. The pushed_at property +// returns a *Time when successful +func (m *TeamRepository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.pushed_at +} +// GetReleasesUrl gets the releases_url property value. The releases_url property +// returns a *string when successful +func (m *TeamRepository) GetReleasesUrl()(*string) { + return m.releases_url +} +// GetRoleName gets the role_name property value. The role_name property +// returns a *string when successful +func (m *TeamRepository) GetRoleName()(*string) { + return m.role_name +} +// GetSize gets the size property value. The size property +// returns a *int32 when successful +func (m *TeamRepository) GetSize()(*int32) { + return m.size +} +// GetSshUrl gets the ssh_url property value. The ssh_url property +// returns a *string when successful +func (m *TeamRepository) GetSshUrl()(*string) { + return m.ssh_url +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *TeamRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property +// returns a *string when successful +func (m *TeamRepository) GetStargazersUrl()(*string) { + return m.stargazers_url +} +// GetStatusesUrl gets the statuses_url property value. The statuses_url property +// returns a *string when successful +func (m *TeamRepository) GetStatusesUrl()(*string) { + return m.statuses_url +} +// GetSubscribersCount gets the subscribers_count property value. The subscribers_count property +// returns a *int32 when successful +func (m *TeamRepository) GetSubscribersCount()(*int32) { + return m.subscribers_count +} +// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property +// returns a *string when successful +func (m *TeamRepository) GetSubscribersUrl()(*string) { + return m.subscribers_url +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *TeamRepository) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetSvnUrl gets the svn_url property value. The svn_url property +// returns a *string when successful +func (m *TeamRepository) GetSvnUrl()(*string) { + return m.svn_url +} +// GetTagsUrl gets the tags_url property value. The tags_url property +// returns a *string when successful +func (m *TeamRepository) GetTagsUrl()(*string) { + return m.tags_url +} +// GetTeamsUrl gets the teams_url property value. The teams_url property +// returns a *string when successful +func (m *TeamRepository) GetTeamsUrl()(*string) { + return m.teams_url +} +// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property +// returns a *string when successful +func (m *TeamRepository) GetTempCloneToken()(*string) { + return m.temp_clone_token +} +// GetTopics gets the topics property value. The topics property +// returns a []string when successful +func (m *TeamRepository) GetTopics()([]string) { + return m.topics +} +// GetTreesUrl gets the trees_url property value. The trees_url property +// returns a *string when successful +func (m *TeamRepository) GetTreesUrl()(*string) { + return m.trees_url +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TeamRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamRepository) GetUrl()(*string) { + return m.url +} +// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. +// returns a *string when successful +func (m *TeamRepository) GetVisibility()(*string) { + return m.visibility +} +// GetWatchers gets the watchers property value. The watchers property +// returns a *int32 when successful +func (m *TeamRepository) GetWatchers()(*int32) { + return m.watchers +} +// GetWatchersCount gets the watchers_count property value. The watchers_count property +// returns a *int32 when successful +func (m *TeamRepository) GetWatchersCount()(*int32) { + return m.watchers_count +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. Whether to require contributors to sign off on web-based commits +// returns a *bool when successful +func (m *TeamRepository) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *TeamRepository) 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("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disabled", m.GetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fork", m.GetFork()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks", m.GetForks()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("forks_count", m.GetForksCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("forks_url", m.GetForksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("git_url", m.GetGitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_pages", m.GetHasPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("license", m.GetLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("network_count", m.GetNetworkCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notifications_url", m.GetNotificationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role_name", m.GetRoleName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("subscribers_count", m.GetSubscribersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) + if err != nil { + return err + } + } + if m.GetTopics() != nil { + err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers", m.GetWatchers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +func (m *TeamRepository) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowForking sets the allow_forking property value. Whether to allow forking this repo +func (m *TeamRepository) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +func (m *TeamRepository) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +func (m *TeamRepository) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +func (m *TeamRepository) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetArchived sets the archived property value. Whether the repository is archived. +func (m *TeamRepository) SetArchived(value *bool)() { + m.archived = value +} +// SetArchiveUrl sets the archive_url property value. The archive_url property +func (m *TeamRepository) SetArchiveUrl(value *string)() { + m.archive_url = value +} +// SetAssigneesUrl sets the assignees_url property value. The assignees_url property +func (m *TeamRepository) SetAssigneesUrl(value *string)() { + m.assignees_url = value +} +// SetBlobsUrl sets the blobs_url property value. The blobs_url property +func (m *TeamRepository) SetBlobsUrl(value *string)() { + m.blobs_url = value +} +// SetBranchesUrl sets the branches_url property value. The branches_url property +func (m *TeamRepository) SetBranchesUrl(value *string)() { + m.branches_url = value +} +// SetCloneUrl sets the clone_url property value. The clone_url property +func (m *TeamRepository) SetCloneUrl(value *string)() { + m.clone_url = value +} +// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property +func (m *TeamRepository) SetCollaboratorsUrl(value *string)() { + m.collaborators_url = value +} +// SetCommentsUrl sets the comments_url property value. The comments_url property +func (m *TeamRepository) SetCommentsUrl(value *string)() { + m.comments_url = value +} +// SetCommitsUrl sets the commits_url property value. The commits_url property +func (m *TeamRepository) SetCommitsUrl(value *string)() { + m.commits_url = value +} +// SetCompareUrl sets the compare_url property value. The compare_url property +func (m *TeamRepository) SetCompareUrl(value *string)() { + m.compare_url = value +} +// SetContentsUrl sets the contents_url property value. The contents_url property +func (m *TeamRepository) SetContentsUrl(value *string)() { + m.contents_url = value +} +// SetContributorsUrl sets the contributors_url property value. The contributors_url property +func (m *TeamRepository) SetContributorsUrl(value *string)() { + m.contributors_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TeamRepository) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDefaultBranch sets the default_branch property value. The default branch of the repository. +func (m *TeamRepository) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +func (m *TeamRepository) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property +func (m *TeamRepository) SetDeploymentsUrl(value *string)() { + m.deployments_url = value +} +// SetDescription sets the description property value. The description property +func (m *TeamRepository) SetDescription(value *string)() { + m.description = value +} +// SetDisabled sets the disabled property value. Returns whether or not this repository disabled. +func (m *TeamRepository) SetDisabled(value *bool)() { + m.disabled = value +} +// SetDownloadsUrl sets the downloads_url property value. The downloads_url property +func (m *TeamRepository) SetDownloadsUrl(value *string)() { + m.downloads_url = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *TeamRepository) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFork sets the fork property value. The fork property +func (m *TeamRepository) SetFork(value *bool)() { + m.fork = value +} +// SetForks sets the forks property value. The forks property +func (m *TeamRepository) SetForks(value *int32)() { + m.forks = value +} +// SetForksCount sets the forks_count property value. The forks_count property +func (m *TeamRepository) SetForksCount(value *int32)() { + m.forks_count = value +} +// SetForksUrl sets the forks_url property value. The forks_url property +func (m *TeamRepository) SetForksUrl(value *string)() { + m.forks_url = value +} +// SetFullName sets the full_name property value. The full_name property +func (m *TeamRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property +func (m *TeamRepository) SetGitCommitsUrl(value *string)() { + m.git_commits_url = value +} +// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property +func (m *TeamRepository) SetGitRefsUrl(value *string)() { + m.git_refs_url = value +} +// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property +func (m *TeamRepository) SetGitTagsUrl(value *string)() { + m.git_tags_url = value +} +// SetGitUrl sets the git_url property value. The git_url property +func (m *TeamRepository) SetGitUrl(value *string)() { + m.git_url = value +} +// SetHasDownloads sets the has_downloads property value. Whether downloads are enabled. +func (m *TeamRepository) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. Whether issues are enabled. +func (m *TeamRepository) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasPages sets the has_pages property value. The has_pages property +func (m *TeamRepository) SetHasPages(value *bool)() { + m.has_pages = value +} +// SetHasProjects sets the has_projects property value. Whether projects are enabled. +func (m *TeamRepository) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. Whether the wiki is enabled. +func (m *TeamRepository) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. The homepage property +func (m *TeamRepository) SetHomepage(value *string)() { + m.homepage = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *TeamRepository) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamRepository) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the repository +func (m *TeamRepository) SetId(value *int32)() { + m.id = value +} +// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property +func (m *TeamRepository) SetIssueCommentUrl(value *string)() { + m.issue_comment_url = value +} +// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property +func (m *TeamRepository) SetIssueEventsUrl(value *string)() { + m.issue_events_url = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *TeamRepository) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetIsTemplate sets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +func (m *TeamRepository) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetKeysUrl sets the keys_url property value. The keys_url property +func (m *TeamRepository) SetKeysUrl(value *string)() { + m.keys_url = value +} +// SetLabelsUrl sets the labels_url property value. The labels_url property +func (m *TeamRepository) SetLabelsUrl(value *string)() { + m.labels_url = value +} +// SetLanguage sets the language property value. The language property +func (m *TeamRepository) SetLanguage(value *string)() { + m.language = value +} +// SetLanguagesUrl sets the languages_url property value. The languages_url property +func (m *TeamRepository) SetLanguagesUrl(value *string)() { + m.languages_url = value +} +// SetLicense sets the license property value. License Simple +func (m *TeamRepository) SetLicense(value NullableLicenseSimpleable)() { + m.license = value +} +// SetMasterBranch sets the master_branch property value. The master_branch property +func (m *TeamRepository) SetMasterBranch(value *string)() { + m.master_branch = value +} +// SetMergesUrl sets the merges_url property value. The merges_url property +func (m *TeamRepository) SetMergesUrl(value *string)() { + m.merges_url = value +} +// SetMilestonesUrl sets the milestones_url property value. The milestones_url property +func (m *TeamRepository) SetMilestonesUrl(value *string)() { + m.milestones_url = value +} +// SetMirrorUrl sets the mirror_url property value. The mirror_url property +func (m *TeamRepository) SetMirrorUrl(value *string)() { + m.mirror_url = value +} +// SetName sets the name property value. The name of the repository. +func (m *TeamRepository) SetName(value *string)() { + m.name = value +} +// SetNetworkCount sets the network_count property value. The network_count property +func (m *TeamRepository) SetNetworkCount(value *int32)() { + m.network_count = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamRepository) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationsUrl sets the notifications_url property value. The notifications_url property +func (m *TeamRepository) SetNotificationsUrl(value *string)() { + m.notifications_url = value +} +// SetOpenIssues sets the open_issues property value. The open_issues property +func (m *TeamRepository) SetOpenIssues(value *int32)() { + m.open_issues = value +} +// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property +func (m *TeamRepository) SetOpenIssuesCount(value *int32)() { + m.open_issues_count = value +} +// SetOwner sets the owner property value. A GitHub user. +func (m *TeamRepository) SetOwner(value NullableSimpleUserable)() { + m.owner = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *TeamRepository) SetPermissions(value TeamRepository_permissionsable)() { + m.permissions = value +} +// SetPrivate sets the private property value. Whether the repository is private or public. +func (m *TeamRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetPullsUrl sets the pulls_url property value. The pulls_url property +func (m *TeamRepository) SetPullsUrl(value *string)() { + m.pulls_url = value +} +// SetPushedAt sets the pushed_at property value. The pushed_at property +func (m *TeamRepository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.pushed_at = value +} +// SetReleasesUrl sets the releases_url property value. The releases_url property +func (m *TeamRepository) SetReleasesUrl(value *string)() { + m.releases_url = value +} +// SetRoleName sets the role_name property value. The role_name property +func (m *TeamRepository) SetRoleName(value *string)() { + m.role_name = value +} +// SetSize sets the size property value. The size property +func (m *TeamRepository) SetSize(value *int32)() { + m.size = value +} +// SetSshUrl sets the ssh_url property value. The ssh_url property +func (m *TeamRepository) SetSshUrl(value *string)() { + m.ssh_url = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *TeamRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property +func (m *TeamRepository) SetStargazersUrl(value *string)() { + m.stargazers_url = value +} +// SetStatusesUrl sets the statuses_url property value. The statuses_url property +func (m *TeamRepository) SetStatusesUrl(value *string)() { + m.statuses_url = value +} +// SetSubscribersCount sets the subscribers_count property value. The subscribers_count property +func (m *TeamRepository) SetSubscribersCount(value *int32)() { + m.subscribers_count = value +} +// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property +func (m *TeamRepository) SetSubscribersUrl(value *string)() { + m.subscribers_url = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *TeamRepository) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetSvnUrl sets the svn_url property value. The svn_url property +func (m *TeamRepository) SetSvnUrl(value *string)() { + m.svn_url = value +} +// SetTagsUrl sets the tags_url property value. The tags_url property +func (m *TeamRepository) SetTagsUrl(value *string)() { + m.tags_url = value +} +// SetTeamsUrl sets the teams_url property value. The teams_url property +func (m *TeamRepository) SetTeamsUrl(value *string)() { + m.teams_url = value +} +// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property +func (m *TeamRepository) SetTempCloneToken(value *string)() { + m.temp_clone_token = value +} +// SetTopics sets the topics property value. The topics property +func (m *TeamRepository) SetTopics(value []string)() { + m.topics = value +} +// SetTreesUrl sets the trees_url property value. The trees_url property +func (m *TeamRepository) SetTreesUrl(value *string)() { + m.trees_url = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TeamRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *TeamRepository) SetUrl(value *string)() { + m.url = value +} +// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. +func (m *TeamRepository) SetVisibility(value *string)() { + m.visibility = value +} +// SetWatchers sets the watchers property value. The watchers property +func (m *TeamRepository) SetWatchers(value *int32)() { + m.watchers = value +} +// SetWatchersCount sets the watchers_count property value. The watchers_count property +func (m *TeamRepository) SetWatchersCount(value *int32)() { + m.watchers_count = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. Whether to require contributors to sign off on web-based commits +func (m *TeamRepository) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type TeamRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetArchived()(*bool) + GetArchiveUrl()(*string) + GetAssigneesUrl()(*string) + GetBlobsUrl()(*string) + GetBranchesUrl()(*string) + GetCloneUrl()(*string) + GetCollaboratorsUrl()(*string) + GetCommentsUrl()(*string) + GetCommitsUrl()(*string) + GetCompareUrl()(*string) + GetContentsUrl()(*string) + GetContributorsUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDeploymentsUrl()(*string) + GetDescription()(*string) + GetDisabled()(*bool) + GetDownloadsUrl()(*string) + GetEventsUrl()(*string) + GetFork()(*bool) + GetForks()(*int32) + GetForksCount()(*int32) + GetForksUrl()(*string) + GetFullName()(*string) + GetGitCommitsUrl()(*string) + GetGitRefsUrl()(*string) + GetGitTagsUrl()(*string) + GetGitUrl()(*string) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasPages()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetHooksUrl()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssueCommentUrl()(*string) + GetIssueEventsUrl()(*string) + GetIssuesUrl()(*string) + GetIsTemplate()(*bool) + GetKeysUrl()(*string) + GetLabelsUrl()(*string) + GetLanguage()(*string) + GetLanguagesUrl()(*string) + GetLicense()(NullableLicenseSimpleable) + GetMasterBranch()(*string) + GetMergesUrl()(*string) + GetMilestonesUrl()(*string) + GetMirrorUrl()(*string) + GetName()(*string) + GetNetworkCount()(*int32) + GetNodeId()(*string) + GetNotificationsUrl()(*string) + GetOpenIssues()(*int32) + GetOpenIssuesCount()(*int32) + GetOwner()(NullableSimpleUserable) + GetPermissions()(TeamRepository_permissionsable) + GetPrivate()(*bool) + GetPullsUrl()(*string) + GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasesUrl()(*string) + GetRoleName()(*string) + GetSize()(*int32) + GetSshUrl()(*string) + GetStargazersCount()(*int32) + GetStargazersUrl()(*string) + GetStatusesUrl()(*string) + GetSubscribersCount()(*int32) + GetSubscribersUrl()(*string) + GetSubscriptionUrl()(*string) + GetSvnUrl()(*string) + GetTagsUrl()(*string) + GetTeamsUrl()(*string) + GetTempCloneToken()(*string) + GetTopics()([]string) + GetTreesUrl()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetVisibility()(*string) + GetWatchers()(*int32) + GetWatchersCount()(*int32) + GetWebCommitSignoffRequired()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetArchived(value *bool)() + SetArchiveUrl(value *string)() + SetAssigneesUrl(value *string)() + SetBlobsUrl(value *string)() + SetBranchesUrl(value *string)() + SetCloneUrl(value *string)() + SetCollaboratorsUrl(value *string)() + SetCommentsUrl(value *string)() + SetCommitsUrl(value *string)() + SetCompareUrl(value *string)() + SetContentsUrl(value *string)() + SetContributorsUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDeploymentsUrl(value *string)() + SetDescription(value *string)() + SetDisabled(value *bool)() + SetDownloadsUrl(value *string)() + SetEventsUrl(value *string)() + SetFork(value *bool)() + SetForks(value *int32)() + SetForksCount(value *int32)() + SetForksUrl(value *string)() + SetFullName(value *string)() + SetGitCommitsUrl(value *string)() + SetGitRefsUrl(value *string)() + SetGitTagsUrl(value *string)() + SetGitUrl(value *string)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasPages(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetHooksUrl(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssueCommentUrl(value *string)() + SetIssueEventsUrl(value *string)() + SetIssuesUrl(value *string)() + SetIsTemplate(value *bool)() + SetKeysUrl(value *string)() + SetLabelsUrl(value *string)() + SetLanguage(value *string)() + SetLanguagesUrl(value *string)() + SetLicense(value NullableLicenseSimpleable)() + SetMasterBranch(value *string)() + SetMergesUrl(value *string)() + SetMilestonesUrl(value *string)() + SetMirrorUrl(value *string)() + SetName(value *string)() + SetNetworkCount(value *int32)() + SetNodeId(value *string)() + SetNotificationsUrl(value *string)() + SetOpenIssues(value *int32)() + SetOpenIssuesCount(value *int32)() + SetOwner(value NullableSimpleUserable)() + SetPermissions(value TeamRepository_permissionsable)() + SetPrivate(value *bool)() + SetPullsUrl(value *string)() + SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasesUrl(value *string)() + SetRoleName(value *string)() + SetSize(value *int32)() + SetSshUrl(value *string)() + SetStargazersCount(value *int32)() + SetStargazersUrl(value *string)() + SetStatusesUrl(value *string)() + SetSubscribersCount(value *int32)() + SetSubscribersUrl(value *string)() + SetSubscriptionUrl(value *string)() + SetSvnUrl(value *string)() + SetTagsUrl(value *string)() + SetTeamsUrl(value *string)() + SetTempCloneToken(value *string)() + SetTopics(value []string)() + SetTreesUrl(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetVisibility(value *string)() + SetWatchers(value *int32)() + SetWatchersCount(value *int32)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/models/team_repository_permissions.go b/pkg/github/models/team_repository_permissions.go new file mode 100644 index 0000000..5546c28 --- /dev/null +++ b/pkg/github/models/team_repository_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TeamRepository_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewTeamRepository_permissions instantiates a new TeamRepository_permissions and sets the default values. +func NewTeamRepository_permissions()(*TeamRepository_permissions) { + m := &TeamRepository_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamRepository_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamRepository_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamRepository_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamRepository_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *TeamRepository_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamRepository_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *TeamRepository_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *TeamRepository_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *TeamRepository_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *TeamRepository_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *TeamRepository_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamRepository_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *TeamRepository_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *TeamRepository_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *TeamRepository_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *TeamRepository_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *TeamRepository_permissions) SetTriage(value *bool)() { + m.triage = value +} +type TeamRepository_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/team_role_assignment.go b/pkg/github/models/team_role_assignment.go new file mode 100644 index 0000000..e51c85f --- /dev/null +++ b/pkg/github/models/team_role_assignment.go @@ -0,0 +1,458 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamRoleAssignment the Relationship a Team has with a role. +type TeamRoleAssignment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // The html_url property + html_url *string + // The id property + id *int32 + // The members_url property + members_url *string + // The name property + name *string + // The node_id property + node_id *string + // The notification_setting property + notification_setting *string + // Groups of organization members that gives permissions on specified repositories. + parent NullableTeamSimpleable + // The permission property + permission *string + // The permissions property + permissions TeamRoleAssignment_permissionsable + // The privacy property + privacy *string + // The repositories_url property + repositories_url *string + // The slug property + slug *string + // The url property + url *string +} +// NewTeamRoleAssignment instantiates a new TeamRoleAssignment and sets the default values. +func NewTeamRoleAssignment()(*TeamRoleAssignment) { + m := &TeamRoleAssignment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamRoleAssignment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamRoleAssignment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *TeamRoleAssignment) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationSetting(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableTeamSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(NullableTeamSimpleable)) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamRoleAssignment_permissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermissions(val.(TeamRoleAssignment_permissionsable)) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamRoleAssignment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TeamRoleAssignment) GetId()(*int32) { + return m.id +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *TeamRoleAssignment) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TeamRoleAssignment) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamRoleAssignment) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationSetting gets the notification_setting property value. The notification_setting property +// returns a *string when successful +func (m *TeamRoleAssignment) GetNotificationSetting()(*string) { + return m.notification_setting +} +// GetParent gets the parent property value. Groups of organization members that gives permissions on specified repositories. +// returns a NullableTeamSimpleable when successful +func (m *TeamRoleAssignment) GetParent()(NullableTeamSimpleable) { + return m.parent +} +// GetPermission gets the permission property value. The permission property +// returns a *string when successful +func (m *TeamRoleAssignment) GetPermission()(*string) { + return m.permission +} +// GetPermissions gets the permissions property value. The permissions property +// returns a TeamRoleAssignment_permissionsable when successful +func (m *TeamRoleAssignment) GetPermissions()(TeamRoleAssignment_permissionsable) { + return m.permissions +} +// GetPrivacy gets the privacy property value. The privacy property +// returns a *string when successful +func (m *TeamRoleAssignment) GetPrivacy()(*string) { + return m.privacy +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *TeamRoleAssignment) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *TeamRoleAssignment) GetSlug()(*string) { + return m.slug +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TeamRoleAssignment) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_setting", m.GetNotificationSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacy", m.GetPrivacy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamRoleAssignment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *TeamRoleAssignment) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamRoleAssignment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *TeamRoleAssignment) SetId(value *int32)() { + m.id = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *TeamRoleAssignment) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *TeamRoleAssignment) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamRoleAssignment) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationSetting sets the notification_setting property value. The notification_setting property +func (m *TeamRoleAssignment) SetNotificationSetting(value *string)() { + m.notification_setting = value +} +// SetParent sets the parent property value. Groups of organization members that gives permissions on specified repositories. +func (m *TeamRoleAssignment) SetParent(value NullableTeamSimpleable)() { + m.parent = value +} +// SetPermission sets the permission property value. The permission property +func (m *TeamRoleAssignment) SetPermission(value *string)() { + m.permission = value +} +// SetPermissions sets the permissions property value. The permissions property +func (m *TeamRoleAssignment) SetPermissions(value TeamRoleAssignment_permissionsable)() { + m.permissions = value +} +// SetPrivacy sets the privacy property value. The privacy property +func (m *TeamRoleAssignment) SetPrivacy(value *string)() { + m.privacy = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *TeamRoleAssignment) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetSlug sets the slug property value. The slug property +func (m *TeamRoleAssignment) SetSlug(value *string)() { + m.slug = value +} +// SetUrl sets the url property value. The url property +func (m *TeamRoleAssignment) SetUrl(value *string)() { + m.url = value +} +type TeamRoleAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationSetting()(*string) + GetParent()(NullableTeamSimpleable) + GetPermission()(*string) + GetPermissions()(TeamRoleAssignment_permissionsable) + GetPrivacy()(*string) + GetRepositoriesUrl()(*string) + GetSlug()(*string) + GetUrl()(*string) + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationSetting(value *string)() + SetParent(value NullableTeamSimpleable)() + SetPermission(value *string)() + SetPermissions(value TeamRoleAssignment_permissionsable)() + SetPrivacy(value *string)() + SetRepositoriesUrl(value *string)() + SetSlug(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/team_role_assignment_permissions.go b/pkg/github/models/team_role_assignment_permissions.go new file mode 100644 index 0000000..295a858 --- /dev/null +++ b/pkg/github/models/team_role_assignment_permissions.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TeamRoleAssignment_permissions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The admin property + admin *bool + // The maintain property + maintain *bool + // The pull property + pull *bool + // The push property + push *bool + // The triage property + triage *bool +} +// NewTeamRoleAssignment_permissions instantiates a new TeamRoleAssignment_permissions and sets the default values. +func NewTeamRoleAssignment_permissions()(*TeamRoleAssignment_permissions) { + m := &TeamRoleAssignment_permissions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamRoleAssignment_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamRoleAssignment_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamRoleAssignment_permissions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamRoleAssignment_permissions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdmin gets the admin property value. The admin property +// returns a *bool when successful +func (m *TeamRoleAssignment_permissions) GetAdmin()(*bool) { + return m.admin +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamRoleAssignment_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmin(val) + } + return nil + } + res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintain(val) + } + return nil + } + res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPull(val) + } + return nil + } + res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPush(val) + } + return nil + } + res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTriage(val) + } + return nil + } + return res +} +// GetMaintain gets the maintain property value. The maintain property +// returns a *bool when successful +func (m *TeamRoleAssignment_permissions) GetMaintain()(*bool) { + return m.maintain +} +// GetPull gets the pull property value. The pull property +// returns a *bool when successful +func (m *TeamRoleAssignment_permissions) GetPull()(*bool) { + return m.pull +} +// GetPush gets the push property value. The push property +// returns a *bool when successful +func (m *TeamRoleAssignment_permissions) GetPush()(*bool) { + return m.push +} +// GetTriage gets the triage property value. The triage property +// returns a *bool when successful +func (m *TeamRoleAssignment_permissions) GetTriage()(*bool) { + return m.triage +} +// Serialize serializes information the current object +func (m *TeamRoleAssignment_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("admin", m.GetAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintain", m.GetMaintain()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pull", m.GetPull()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("push", m.GetPush()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("triage", m.GetTriage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamRoleAssignment_permissions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdmin sets the admin property value. The admin property +func (m *TeamRoleAssignment_permissions) SetAdmin(value *bool)() { + m.admin = value +} +// SetMaintain sets the maintain property value. The maintain property +func (m *TeamRoleAssignment_permissions) SetMaintain(value *bool)() { + m.maintain = value +} +// SetPull sets the pull property value. The pull property +func (m *TeamRoleAssignment_permissions) SetPull(value *bool)() { + m.pull = value +} +// SetPush sets the push property value. The push property +func (m *TeamRoleAssignment_permissions) SetPush(value *bool)() { + m.push = value +} +// SetTriage sets the triage property value. The triage property +func (m *TeamRoleAssignment_permissions) SetTriage(value *bool)() { + m.triage = value +} +type TeamRoleAssignment_permissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmin()(*bool) + GetMaintain()(*bool) + GetPull()(*bool) + GetPush()(*bool) + GetTriage()(*bool) + SetAdmin(value *bool)() + SetMaintain(value *bool)() + SetPull(value *bool)() + SetPush(value *bool)() + SetTriage(value *bool)() +} diff --git a/pkg/github/models/team_simple.go b/pkg/github/models/team_simple.go new file mode 100644 index 0000000..b71d3cc --- /dev/null +++ b/pkg/github/models/team_simple.go @@ -0,0 +1,429 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamSimple groups of organization members that gives permissions on specified repositories. +type TeamSimple struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Description of the team + description *string + // The html_url property + html_url *string + // Unique identifier of the team + id *int32 + // Distinguished Name (DN) that team maps to within LDAP environment + ldap_dn *string + // The members_url property + members_url *string + // Name of the team + name *string + // The node_id property + node_id *string + // The notification setting the team has set + notification_setting *string + // Permission that the team will have for its repositories + permission *string + // The level of privacy this team should have + privacy *string + // The repositories_url property + repositories_url *string + // The slug property + slug *string + // URL for the team + url *string +} +// NewTeamSimple instantiates a new TeamSimple and sets the default values. +func NewTeamSimple()(*TeamSimple) { + m := &TeamSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamSimple(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TeamSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. Description of the team +// returns a *string when successful +func (m *TeamSimple) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["ldap_dn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLdapDn(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["notification_setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationSetting(val) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val) + } + return nil + } + res["repositories_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoriesUrl(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TeamSimple) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the team +// returns a *int32 when successful +func (m *TeamSimple) GetId()(*int32) { + return m.id +} +// GetLdapDn gets the ldap_dn property value. Distinguished Name (DN) that team maps to within LDAP environment +// returns a *string when successful +func (m *TeamSimple) GetLdapDn()(*string) { + return m.ldap_dn +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *TeamSimple) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. Name of the team +// returns a *string when successful +func (m *TeamSimple) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TeamSimple) GetNodeId()(*string) { + return m.node_id +} +// GetNotificationSetting gets the notification_setting property value. The notification setting the team has set +// returns a *string when successful +func (m *TeamSimple) GetNotificationSetting()(*string) { + return m.notification_setting +} +// GetPermission gets the permission property value. Permission that the team will have for its repositories +// returns a *string when successful +func (m *TeamSimple) GetPermission()(*string) { + return m.permission +} +// GetPrivacy gets the privacy property value. The level of privacy this team should have +// returns a *string when successful +func (m *TeamSimple) GetPrivacy()(*string) { + return m.privacy +} +// GetRepositoriesUrl gets the repositories_url property value. The repositories_url property +// returns a *string when successful +func (m *TeamSimple) GetRepositoriesUrl()(*string) { + return m.repositories_url +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *TeamSimple) GetSlug()(*string) { + return m.slug +} +// GetUrl gets the url property value. URL for the team +// returns a *string when successful +func (m *TeamSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TeamSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ldap_dn", m.GetLdapDn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notification_setting", m.GetNotificationSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacy", m.GetPrivacy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositories_url", m.GetRepositoriesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. Description of the team +func (m *TeamSimple) SetDescription(value *string)() { + m.description = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TeamSimple) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the team +func (m *TeamSimple) SetId(value *int32)() { + m.id = value +} +// SetLdapDn sets the ldap_dn property value. Distinguished Name (DN) that team maps to within LDAP environment +func (m *TeamSimple) SetLdapDn(value *string)() { + m.ldap_dn = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *TeamSimple) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. Name of the team +func (m *TeamSimple) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TeamSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetNotificationSetting sets the notification_setting property value. The notification setting the team has set +func (m *TeamSimple) SetNotificationSetting(value *string)() { + m.notification_setting = value +} +// SetPermission sets the permission property value. Permission that the team will have for its repositories +func (m *TeamSimple) SetPermission(value *string)() { + m.permission = value +} +// SetPrivacy sets the privacy property value. The level of privacy this team should have +func (m *TeamSimple) SetPrivacy(value *string)() { + m.privacy = value +} +// SetRepositoriesUrl sets the repositories_url property value. The repositories_url property +func (m *TeamSimple) SetRepositoriesUrl(value *string)() { + m.repositories_url = value +} +// SetSlug sets the slug property value. The slug property +func (m *TeamSimple) SetSlug(value *string)() { + m.slug = value +} +// SetUrl sets the url property value. URL for the team +func (m *TeamSimple) SetUrl(value *string)() { + m.url = value +} +type TeamSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLdapDn()(*string) + GetMembersUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetNotificationSetting()(*string) + GetPermission()(*string) + GetPrivacy()(*string) + GetRepositoriesUrl()(*string) + GetSlug()(*string) + GetUrl()(*string) + SetDescription(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLdapDn(value *string)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetNotificationSetting(value *string)() + SetPermission(value *string)() + SetPrivacy(value *string)() + SetRepositoriesUrl(value *string)() + SetSlug(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/thread.go b/pkg/github/models/thread.go new file mode 100644 index 0000000..094b07a --- /dev/null +++ b/pkg/github/models/thread.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Thread thread +type Thread struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *string + // The last_read_at property + last_read_at *string + // The reason property + reason *string + // Minimal Repository + repository MinimalRepositoryable + // The subject property + subject Thread_subjectable + // The subscription_url property + subscription_url *string + // The unread property + unread *bool + // The updated_at property + updated_at *string + // The url property + url *string +} +// NewThread instantiates a new Thread and sets the default values. +func NewThread()(*Thread) { + m := &Thread{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateThreadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateThreadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThread(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Thread) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Thread) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["last_read_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReadAt(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateThread_subjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubject(val.(Thread_subjectable)) + } + return nil + } + res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionUrl(val) + } + return nil + } + res["unread"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUnread(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *Thread) GetId()(*string) { + return m.id +} +// GetLastReadAt gets the last_read_at property value. The last_read_at property +// returns a *string when successful +func (m *Thread) GetLastReadAt()(*string) { + return m.last_read_at +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *Thread) GetReason()(*string) { + return m.reason +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *Thread) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetSubject gets the subject property value. The subject property +// returns a Thread_subjectable when successful +func (m *Thread) GetSubject()(Thread_subjectable) { + return m.subject +} +// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property +// returns a *string when successful +func (m *Thread) GetSubscriptionUrl()(*string) { + return m.subscription_url +} +// GetUnread gets the unread property value. The unread property +// returns a *bool when successful +func (m *Thread) GetUnread()(*bool) { + return m.unread +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *string when successful +func (m *Thread) GetUpdatedAt()(*string) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Thread) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Thread) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_read_at", m.GetLastReadAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("unread", m.GetUnread()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Thread) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *Thread) SetId(value *string)() { + m.id = value +} +// SetLastReadAt sets the last_read_at property value. The last_read_at property +func (m *Thread) SetLastReadAt(value *string)() { + m.last_read_at = value +} +// SetReason sets the reason property value. The reason property +func (m *Thread) SetReason(value *string)() { + m.reason = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *Thread) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetSubject sets the subject property value. The subject property +func (m *Thread) SetSubject(value Thread_subjectable)() { + m.subject = value +} +// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property +func (m *Thread) SetSubscriptionUrl(value *string)() { + m.subscription_url = value +} +// SetUnread sets the unread property value. The unread property +func (m *Thread) SetUnread(value *bool)() { + m.unread = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Thread) SetUpdatedAt(value *string)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Thread) SetUrl(value *string)() { + m.url = value +} +type Threadable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetLastReadAt()(*string) + GetReason()(*string) + GetRepository()(MinimalRepositoryable) + GetSubject()(Thread_subjectable) + GetSubscriptionUrl()(*string) + GetUnread()(*bool) + GetUpdatedAt()(*string) + GetUrl()(*string) + SetId(value *string)() + SetLastReadAt(value *string)() + SetReason(value *string)() + SetRepository(value MinimalRepositoryable)() + SetSubject(value Thread_subjectable)() + SetSubscriptionUrl(value *string)() + SetUnread(value *bool)() + SetUpdatedAt(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/thread_subject.go b/pkg/github/models/thread_subject.go new file mode 100644 index 0000000..252b430 --- /dev/null +++ b/pkg/github/models/thread_subject.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Thread_subject struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The latest_comment_url property + latest_comment_url *string + // The title property + title *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewThread_subject instantiates a new Thread_subject and sets the default values. +func NewThread_subject()(*Thread_subject) { + m := &Thread_subject{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateThread_subjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateThread_subjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThread_subject(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Thread_subject) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Thread_subject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["latest_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLatestCommentUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetLatestCommentUrl gets the latest_comment_url property value. The latest_comment_url property +// returns a *string when successful +func (m *Thread_subject) GetLatestCommentUrl()(*string) { + return m.latest_comment_url +} +// GetTitle gets the title property value. The title property +// returns a *string when successful +func (m *Thread_subject) GetTitle()(*string) { + return m.title +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *Thread_subject) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Thread_subject) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Thread_subject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("latest_comment_url", m.GetLatestCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *Thread_subject) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLatestCommentUrl sets the latest_comment_url property value. The latest_comment_url property +func (m *Thread_subject) SetLatestCommentUrl(value *string)() { + m.latest_comment_url = value +} +// SetTitle sets the title property value. The title property +func (m *Thread_subject) SetTitle(value *string)() { + m.title = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Thread_subject) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *Thread_subject) SetUrl(value *string)() { + m.url = value +} +type Thread_subjectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLatestCommentUrl()(*string) + GetTitle()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetLatestCommentUrl(value *string)() + SetTitle(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/thread_subscription.go b/pkg/github/models/thread_subscription.go new file mode 100644 index 0000000..2c473ff --- /dev/null +++ b/pkg/github/models/thread_subscription.go @@ -0,0 +1,256 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ThreadSubscription thread Subscription +type ThreadSubscription struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ignored property + ignored *bool + // The reason property + reason *string + // The repository_url property + repository_url *string + // The subscribed property + subscribed *bool + // The thread_url property + thread_url *string + // The url property + url *string +} +// NewThreadSubscription instantiates a new ThreadSubscription and sets the default values. +func NewThreadSubscription()(*ThreadSubscription) { + m := &ThreadSubscription{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateThreadSubscriptionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateThreadSubscriptionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThreadSubscription(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ThreadSubscription) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *ThreadSubscription) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ThreadSubscription) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["ignored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnored(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["repository_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryUrl(val) + } + return nil + } + res["subscribed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribed(val) + } + return nil + } + res["thread_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThreadUrl(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetIgnored gets the ignored property value. The ignored property +// returns a *bool when successful +func (m *ThreadSubscription) GetIgnored()(*bool) { + return m.ignored +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *ThreadSubscription) GetReason()(*string) { + return m.reason +} +// GetRepositoryUrl gets the repository_url property value. The repository_url property +// returns a *string when successful +func (m *ThreadSubscription) GetRepositoryUrl()(*string) { + return m.repository_url +} +// GetSubscribed gets the subscribed property value. The subscribed property +// returns a *bool when successful +func (m *ThreadSubscription) GetSubscribed()(*bool) { + return m.subscribed +} +// GetThreadUrl gets the thread_url property value. The thread_url property +// returns a *string when successful +func (m *ThreadSubscription) GetThreadUrl()(*string) { + return m.thread_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ThreadSubscription) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ThreadSubscription) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("ignored", m.GetIgnored()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_url", m.GetRepositoryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("subscribed", m.GetSubscribed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("thread_url", m.GetThreadUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ThreadSubscription) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *ThreadSubscription) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetIgnored sets the ignored property value. The ignored property +func (m *ThreadSubscription) SetIgnored(value *bool)() { + m.ignored = value +} +// SetReason sets the reason property value. The reason property +func (m *ThreadSubscription) SetReason(value *string)() { + m.reason = value +} +// SetRepositoryUrl sets the repository_url property value. The repository_url property +func (m *ThreadSubscription) SetRepositoryUrl(value *string)() { + m.repository_url = value +} +// SetSubscribed sets the subscribed property value. The subscribed property +func (m *ThreadSubscription) SetSubscribed(value *bool)() { + m.subscribed = value +} +// SetThreadUrl sets the thread_url property value. The thread_url property +func (m *ThreadSubscription) SetThreadUrl(value *string)() { + m.thread_url = value +} +// SetUrl sets the url property value. The url property +func (m *ThreadSubscription) SetUrl(value *string)() { + m.url = value +} +type ThreadSubscriptionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIgnored()(*bool) + GetReason()(*string) + GetRepositoryUrl()(*string) + GetSubscribed()(*bool) + GetThreadUrl()(*string) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIgnored(value *bool)() + SetReason(value *string)() + SetRepositoryUrl(value *string)() + SetSubscribed(value *bool)() + SetThreadUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/timeline_assigned_issue_event.go b/pkg/github/models/timeline_assigned_issue_event.go new file mode 100644 index 0000000..4a9d802 --- /dev/null +++ b/pkg/github/models/timeline_assigned_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineAssignedIssueEvent timeline Assigned Issue Event +type TimelineAssignedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee SimpleUserable + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewTimelineAssignedIssueEvent instantiates a new TimelineAssignedIssueEvent and sets the default values. +func NewTimelineAssignedIssueEvent()(*TimelineAssignedIssueEvent) { + m := &TimelineAssignedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineAssignedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineAssignedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineAssignedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineAssignedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineAssignedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineAssignedIssueEvent) GetAssignee()(SimpleUserable) { + return m.assignee +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *TimelineAssignedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *TimelineAssignedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *TimelineAssignedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineAssignedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineAssignedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TimelineAssignedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineAssignedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *TimelineAssignedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TimelineAssignedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TimelineAssignedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *TimelineAssignedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TimelineAssignedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *TimelineAssignedIssueEvent) SetAssignee(value SimpleUserable)() { + m.assignee = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *TimelineAssignedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *TimelineAssignedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TimelineAssignedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineAssignedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *TimelineAssignedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineAssignedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *TimelineAssignedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *TimelineAssignedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type TimelineAssignedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetAssignee()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetAssignee(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/timeline_comment_event.go b/pkg/github/models/timeline_comment_event.go new file mode 100644 index 0000000..129e61b --- /dev/null +++ b/pkg/github/models/timeline_comment_event.go @@ -0,0 +1,518 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineCommentEvent timeline Comment Event +type TimelineCommentEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // Contents of the issue comment + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The event property + event *string + // The html_url property + html_url *string + // Unique identifier of the issue comment + id *int32 + // The issue_url property + issue_url *string + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The reactions property + reactions ReactionRollupable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URL for the issue comment + url *string + // A GitHub user. + user SimpleUserable +} +// NewTimelineCommentEvent instantiates a new TimelineCommentEvent and sets the default values. +func NewTimelineCommentEvent()(*TimelineCommentEvent) { + m := &TimelineCommentEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommentEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommentEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommentEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineCommentEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommentEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *TimelineCommentEvent) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. Contents of the issue comment +// returns a *string when successful +func (m *TimelineCommentEvent) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *TimelineCommentEvent) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *TimelineCommentEvent) GetBodyText()(*string) { + return m.body_text +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TimelineCommentEvent) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineCommentEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommentEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["issue_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueUrl(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionRollupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionRollupable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TimelineCommentEvent) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the issue comment +// returns a *int32 when successful +func (m *TimelineCommentEvent) GetId()(*int32) { + return m.id +} +// GetIssueUrl gets the issue_url property value. The issue_url property +// returns a *string when successful +func (m *TimelineCommentEvent) GetIssueUrl()(*string) { + return m.issue_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineCommentEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *TimelineCommentEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetReactions gets the reactions property value. The reactions property +// returns a ReactionRollupable when successful +func (m *TimelineCommentEvent) GetReactions()(ReactionRollupable) { + return m.reactions +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TimelineCommentEvent) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. URL for the issue comment +// returns a *string when successful +func (m *TimelineCommentEvent) GetUrl()(*string) { + return m.url +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineCommentEvent) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *TimelineCommentEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issue_url", m.GetIssueUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *TimelineCommentEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TimelineCommentEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *TimelineCommentEvent) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. Contents of the issue comment +func (m *TimelineCommentEvent) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *TimelineCommentEvent) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *TimelineCommentEvent) SetBodyText(value *string)() { + m.body_text = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TimelineCommentEvent) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineCommentEvent) SetEvent(value *string)() { + m.event = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TimelineCommentEvent) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the issue comment +func (m *TimelineCommentEvent) SetId(value *int32)() { + m.id = value +} +// SetIssueUrl sets the issue_url property value. The issue_url property +func (m *TimelineCommentEvent) SetIssueUrl(value *string)() { + m.issue_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineCommentEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *TimelineCommentEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetReactions sets the reactions property value. The reactions property +func (m *TimelineCommentEvent) SetReactions(value ReactionRollupable)() { + m.reactions = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TimelineCommentEvent) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. URL for the issue comment +func (m *TimelineCommentEvent) SetUrl(value *string)() { + m.url = value +} +// SetUser sets the user property value. A GitHub user. +func (m *TimelineCommentEvent) SetUser(value SimpleUserable)() { + m.user = value +} +type TimelineCommentEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEvent()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetIssueUrl()(*string) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetReactions()(ReactionRollupable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetUser()(SimpleUserable) + SetActor(value SimpleUserable)() + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEvent(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetIssueUrl(value *string)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetReactions(value ReactionRollupable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/timeline_commit_commented_event.go b/pkg/github/models/timeline_commit_commented_event.go new file mode 100644 index 0000000..c5a9284 --- /dev/null +++ b/pkg/github/models/timeline_commit_commented_event.go @@ -0,0 +1,180 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineCommitCommentedEvent timeline Commit Commented Event +type TimelineCommitCommentedEvent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comments property + comments []CommitCommentable + // The commit_id property + commit_id *string + // The event property + event *string + // The node_id property + node_id *string +} +// NewTimelineCommitCommentedEvent instantiates a new TimelineCommitCommentedEvent and sets the default values. +func NewTimelineCommitCommentedEvent()(*TimelineCommitCommentedEvent) { + m := &TimelineCommitCommentedEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommitCommentedEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommitCommentedEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommitCommentedEvent(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommitCommentedEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. The comments property +// returns a []CommitCommentable when successful +func (m *TimelineCommitCommentedEvent) GetComments()([]CommitCommentable) { + return m.comments +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *TimelineCommitCommentedEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineCommitCommentedEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommitCommentedEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommitCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CommitCommentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CommitCommentable) + } + } + m.SetComments(res) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + return res +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineCommitCommentedEvent) GetNodeId()(*string) { + return m.node_id +} +// Serialize serializes information the current object +func (m *TimelineCommitCommentedEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + 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 *TimelineCommitCommentedEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. The comments property +func (m *TimelineCommitCommentedEvent) SetComments(value []CommitCommentable)() { + m.comments = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *TimelineCommitCommentedEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineCommitCommentedEvent) SetEvent(value *string)() { + m.event = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineCommitCommentedEvent) SetNodeId(value *string)() { + m.node_id = value +} +type TimelineCommitCommentedEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()([]CommitCommentable) + GetCommitId()(*string) + GetEvent()(*string) + GetNodeId()(*string) + SetComments(value []CommitCommentable)() + SetCommitId(value *string)() + SetEvent(value *string)() + SetNodeId(value *string)() +} diff --git a/pkg/github/models/timeline_committed_event.go b/pkg/github/models/timeline_committed_event.go new file mode 100644 index 0000000..e9ed04b --- /dev/null +++ b/pkg/github/models/timeline_committed_event.go @@ -0,0 +1,383 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineCommittedEvent timeline Committed Event +type TimelineCommittedEvent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Identifying information for the git-user + author TimelineCommittedEvent_authorable + // Identifying information for the git-user + committer TimelineCommittedEvent_committerable + // The event property + event *string + // The html_url property + html_url *string + // Message describing the purpose of the commit + message *string + // The node_id property + node_id *string + // The parents property + parents []TimelineCommittedEvent_parentsable + // SHA for the commit + sha *string + // The tree property + tree TimelineCommittedEvent_treeable + // The url property + url *string + // The verification property + verification TimelineCommittedEvent_verificationable +} +// NewTimelineCommittedEvent instantiates a new TimelineCommittedEvent and sets the default values. +func NewTimelineCommittedEvent()(*TimelineCommittedEvent) { + m := &TimelineCommittedEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommittedEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommittedEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommittedEvent(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommittedEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. Identifying information for the git-user +// returns a TimelineCommittedEvent_authorable when successful +func (m *TimelineCommittedEvent) GetAuthor()(TimelineCommittedEvent_authorable) { + return m.author +} +// GetCommitter gets the committer property value. Identifying information for the git-user +// returns a TimelineCommittedEvent_committerable when successful +func (m *TimelineCommittedEvent) GetCommitter()(TimelineCommittedEvent_committerable) { + return m.committer +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineCommittedEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommittedEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineCommittedEvent_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(TimelineCommittedEvent_authorable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineCommittedEvent_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(TimelineCommittedEvent_committerable)) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["parents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTimelineCommittedEvent_parentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TimelineCommittedEvent_parentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TimelineCommittedEvent_parentsable) + } + } + m.SetParents(res) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineCommittedEvent_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTree(val.(TimelineCommittedEvent_treeable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["verification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineCommittedEvent_verificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerification(val.(TimelineCommittedEvent_verificationable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TimelineCommittedEvent) GetHtmlUrl()(*string) { + return m.html_url +} +// GetMessage gets the message property value. Message describing the purpose of the commit +// returns a *string when successful +func (m *TimelineCommittedEvent) GetMessage()(*string) { + return m.message +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineCommittedEvent) GetNodeId()(*string) { + return m.node_id +} +// GetParents gets the parents property value. The parents property +// returns a []TimelineCommittedEvent_parentsable when successful +func (m *TimelineCommittedEvent) GetParents()([]TimelineCommittedEvent_parentsable) { + return m.parents +} +// GetSha gets the sha property value. SHA for the commit +// returns a *string when successful +func (m *TimelineCommittedEvent) GetSha()(*string) { + return m.sha +} +// GetTree gets the tree property value. The tree property +// returns a TimelineCommittedEvent_treeable when successful +func (m *TimelineCommittedEvent) GetTree()(TimelineCommittedEvent_treeable) { + return m.tree +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TimelineCommittedEvent) GetUrl()(*string) { + return m.url +} +// GetVerification gets the verification property value. The verification property +// returns a TimelineCommittedEvent_verificationable when successful +func (m *TimelineCommittedEvent) GetVerification()(TimelineCommittedEvent_verificationable) { + return m.verification +} +// Serialize serializes information the current object +func (m *TimelineCommittedEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + if m.GetParents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParents())) + for i, v := range m.GetParents() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("parents", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tree", m.GetTree()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verification", m.GetVerification()) + 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 *TimelineCommittedEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. Identifying information for the git-user +func (m *TimelineCommittedEvent) SetAuthor(value TimelineCommittedEvent_authorable)() { + m.author = value +} +// SetCommitter sets the committer property value. Identifying information for the git-user +func (m *TimelineCommittedEvent) SetCommitter(value TimelineCommittedEvent_committerable)() { + m.committer = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineCommittedEvent) SetEvent(value *string)() { + m.event = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TimelineCommittedEvent) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetMessage sets the message property value. Message describing the purpose of the commit +func (m *TimelineCommittedEvent) SetMessage(value *string)() { + m.message = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineCommittedEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetParents sets the parents property value. The parents property +func (m *TimelineCommittedEvent) SetParents(value []TimelineCommittedEvent_parentsable)() { + m.parents = value +} +// SetSha sets the sha property value. SHA for the commit +func (m *TimelineCommittedEvent) SetSha(value *string)() { + m.sha = value +} +// SetTree sets the tree property value. The tree property +func (m *TimelineCommittedEvent) SetTree(value TimelineCommittedEvent_treeable)() { + m.tree = value +} +// SetUrl sets the url property value. The url property +func (m *TimelineCommittedEvent) SetUrl(value *string)() { + m.url = value +} +// SetVerification sets the verification property value. The verification property +func (m *TimelineCommittedEvent) SetVerification(value TimelineCommittedEvent_verificationable)() { + m.verification = value +} +type TimelineCommittedEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(TimelineCommittedEvent_authorable) + GetCommitter()(TimelineCommittedEvent_committerable) + GetEvent()(*string) + GetHtmlUrl()(*string) + GetMessage()(*string) + GetNodeId()(*string) + GetParents()([]TimelineCommittedEvent_parentsable) + GetSha()(*string) + GetTree()(TimelineCommittedEvent_treeable) + GetUrl()(*string) + GetVerification()(TimelineCommittedEvent_verificationable) + SetAuthor(value TimelineCommittedEvent_authorable)() + SetCommitter(value TimelineCommittedEvent_committerable)() + SetEvent(value *string)() + SetHtmlUrl(value *string)() + SetMessage(value *string)() + SetNodeId(value *string)() + SetParents(value []TimelineCommittedEvent_parentsable)() + SetSha(value *string)() + SetTree(value TimelineCommittedEvent_treeable)() + SetUrl(value *string)() + SetVerification(value TimelineCommittedEvent_verificationable)() +} diff --git a/pkg/github/models/timeline_committed_event_author.go b/pkg/github/models/timeline_committed_event_author.go new file mode 100644 index 0000000..8e7fa09 --- /dev/null +++ b/pkg/github/models/timeline_committed_event_author.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineCommittedEvent_author identifying information for the git-user +type TimelineCommittedEvent_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Timestamp of the commit + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Git email address of the user + email *string + // Name of the git user + name *string +} +// NewTimelineCommittedEvent_author instantiates a new TimelineCommittedEvent_author and sets the default values. +func NewTimelineCommittedEvent_author()(*TimelineCommittedEvent_author) { + m := &TimelineCommittedEvent_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommittedEvent_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommittedEvent_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommittedEvent_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommittedEvent_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Timestamp of the commit +// returns a *Time when successful +func (m *TimelineCommittedEvent_author) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. Git email address of the user +// returns a *string when successful +func (m *TimelineCommittedEvent_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommittedEvent_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the git user +// returns a *string when successful +func (m *TimelineCommittedEvent_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *TimelineCommittedEvent_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *TimelineCommittedEvent_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Timestamp of the commit +func (m *TimelineCommittedEvent_author) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. Git email address of the user +func (m *TimelineCommittedEvent_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the git user +func (m *TimelineCommittedEvent_author) SetName(value *string)() { + m.name = value +} +type TimelineCommittedEvent_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/timeline_committed_event_committer.go b/pkg/github/models/timeline_committed_event_committer.go new file mode 100644 index 0000000..bf58248 --- /dev/null +++ b/pkg/github/models/timeline_committed_event_committer.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineCommittedEvent_committer identifying information for the git-user +type TimelineCommittedEvent_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Timestamp of the commit + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Git email address of the user + email *string + // Name of the git user + name *string +} +// NewTimelineCommittedEvent_committer instantiates a new TimelineCommittedEvent_committer and sets the default values. +func NewTimelineCommittedEvent_committer()(*TimelineCommittedEvent_committer) { + m := &TimelineCommittedEvent_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommittedEvent_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommittedEvent_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommittedEvent_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommittedEvent_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Timestamp of the commit +// returns a *Time when successful +func (m *TimelineCommittedEvent_committer) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. Git email address of the user +// returns a *string when successful +func (m *TimelineCommittedEvent_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommittedEvent_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the git user +// returns a *string when successful +func (m *TimelineCommittedEvent_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *TimelineCommittedEvent_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *TimelineCommittedEvent_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Timestamp of the commit +func (m *TimelineCommittedEvent_committer) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. Git email address of the user +func (m *TimelineCommittedEvent_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. Name of the git user +func (m *TimelineCommittedEvent_committer) SetName(value *string)() { + m.name = value +} +type TimelineCommittedEvent_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/timeline_committed_event_parents.go b/pkg/github/models/timeline_committed_event_parents.go new file mode 100644 index 0000000..f6c79c3 --- /dev/null +++ b/pkg/github/models/timeline_committed_event_parents.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineCommittedEvent_parents struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html_url property + html_url *string + // SHA for the commit + sha *string + // The url property + url *string +} +// NewTimelineCommittedEvent_parents instantiates a new TimelineCommittedEvent_parents and sets the default values. +func NewTimelineCommittedEvent_parents()(*TimelineCommittedEvent_parents) { + m := &TimelineCommittedEvent_parents{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommittedEvent_parentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommittedEvent_parentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommittedEvent_parents(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommittedEvent_parents) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommittedEvent_parents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TimelineCommittedEvent_parents) GetHtmlUrl()(*string) { + return m.html_url +} +// GetSha gets the sha property value. SHA for the commit +// returns a *string when successful +func (m *TimelineCommittedEvent_parents) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TimelineCommittedEvent_parents) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TimelineCommittedEvent_parents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TimelineCommittedEvent_parents) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TimelineCommittedEvent_parents) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetSha sets the sha property value. SHA for the commit +func (m *TimelineCommittedEvent_parents) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *TimelineCommittedEvent_parents) SetUrl(value *string)() { + m.url = value +} +type TimelineCommittedEvent_parentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtmlUrl()(*string) + GetSha()(*string) + GetUrl()(*string) + SetHtmlUrl(value *string)() + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/timeline_committed_event_tree.go b/pkg/github/models/timeline_committed_event_tree.go new file mode 100644 index 0000000..7286cc6 --- /dev/null +++ b/pkg/github/models/timeline_committed_event_tree.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineCommittedEvent_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // SHA for the commit + sha *string + // The url property + url *string +} +// NewTimelineCommittedEvent_tree instantiates a new TimelineCommittedEvent_tree and sets the default values. +func NewTimelineCommittedEvent_tree()(*TimelineCommittedEvent_tree) { + m := &TimelineCommittedEvent_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommittedEvent_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommittedEvent_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommittedEvent_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommittedEvent_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommittedEvent_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. SHA for the commit +// returns a *string when successful +func (m *TimelineCommittedEvent_tree) GetSha()(*string) { + return m.sha +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TimelineCommittedEvent_tree) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TimelineCommittedEvent_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("sha", m.GetSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TimelineCommittedEvent_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSha sets the sha property value. SHA for the commit +func (m *TimelineCommittedEvent_tree) SetSha(value *string)() { + m.sha = value +} +// SetUrl sets the url property value. The url property +func (m *TimelineCommittedEvent_tree) SetUrl(value *string)() { + m.url = value +} +type TimelineCommittedEvent_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSha()(*string) + GetUrl()(*string) + SetSha(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/timeline_committed_event_verification.go b/pkg/github/models/timeline_committed_event_verification.go new file mode 100644 index 0000000..8d14cad --- /dev/null +++ b/pkg/github/models/timeline_committed_event_verification.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineCommittedEvent_verification struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The payload property + payload *string + // The reason property + reason *string + // The signature property + signature *string + // The verified property + verified *bool +} +// NewTimelineCommittedEvent_verification instantiates a new TimelineCommittedEvent_verification and sets the default values. +func NewTimelineCommittedEvent_verification()(*TimelineCommittedEvent_verification) { + m := &TimelineCommittedEvent_verification{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCommittedEvent_verificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCommittedEvent_verificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCommittedEvent_verification(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCommittedEvent_verification) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCommittedEvent_verification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["signature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignature(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *TimelineCommittedEvent_verification) GetPayload()(*string) { + return m.payload +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *TimelineCommittedEvent_verification) GetReason()(*string) { + return m.reason +} +// GetSignature gets the signature property value. The signature property +// returns a *string when successful +func (m *TimelineCommittedEvent_verification) GetSignature()(*string) { + return m.signature +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *TimelineCommittedEvent_verification) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *TimelineCommittedEvent_verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signature", m.GetSignature()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *TimelineCommittedEvent_verification) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPayload sets the payload property value. The payload property +func (m *TimelineCommittedEvent_verification) SetPayload(value *string)() { + m.payload = value +} +// SetReason sets the reason property value. The reason property +func (m *TimelineCommittedEvent_verification) SetReason(value *string)() { + m.reason = value +} +// SetSignature sets the signature property value. The signature property +func (m *TimelineCommittedEvent_verification) SetSignature(value *string)() { + m.signature = value +} +// SetVerified sets the verified property value. The verified property +func (m *TimelineCommittedEvent_verification) SetVerified(value *bool)() { + m.verified = value +} +type TimelineCommittedEvent_verificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()(*string) + GetReason()(*string) + GetSignature()(*string) + GetVerified()(*bool) + SetPayload(value *string)() + SetReason(value *string)() + SetSignature(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/timeline_cross_referenced_event.go b/pkg/github/models/timeline_cross_referenced_event.go new file mode 100644 index 0000000..3044586 --- /dev/null +++ b/pkg/github/models/timeline_cross_referenced_event.go @@ -0,0 +1,198 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineCrossReferencedEvent timeline Cross Referenced Event +type TimelineCrossReferencedEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The event property + event *string + // The source property + source TimelineCrossReferencedEvent_sourceable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewTimelineCrossReferencedEvent instantiates a new TimelineCrossReferencedEvent and sets the default values. +func NewTimelineCrossReferencedEvent()(*TimelineCrossReferencedEvent) { + m := &TimelineCrossReferencedEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCrossReferencedEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCrossReferencedEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCrossReferencedEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineCrossReferencedEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCrossReferencedEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TimelineCrossReferencedEvent) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineCrossReferencedEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCrossReferencedEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineCrossReferencedEvent_sourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(TimelineCrossReferencedEvent_sourceable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetSource gets the source property value. The source property +// returns a TimelineCrossReferencedEvent_sourceable when successful +func (m *TimelineCrossReferencedEvent) GetSource()(TimelineCrossReferencedEvent_sourceable) { + return m.source +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TimelineCrossReferencedEvent) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *TimelineCrossReferencedEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *TimelineCrossReferencedEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TimelineCrossReferencedEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TimelineCrossReferencedEvent) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineCrossReferencedEvent) SetEvent(value *string)() { + m.event = value +} +// SetSource sets the source property value. The source property +func (m *TimelineCrossReferencedEvent) SetSource(value TimelineCrossReferencedEvent_sourceable)() { + m.source = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TimelineCrossReferencedEvent) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type TimelineCrossReferencedEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEvent()(*string) + GetSource()(TimelineCrossReferencedEvent_sourceable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActor(value SimpleUserable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEvent(value *string)() + SetSource(value TimelineCrossReferencedEvent_sourceable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/timeline_cross_referenced_event_source.go b/pkg/github/models/timeline_cross_referenced_event_source.go new file mode 100644 index 0000000..e0dbbd8 --- /dev/null +++ b/pkg/github/models/timeline_cross_referenced_event_source.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineCrossReferencedEvent_source struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + issue Issueable + // The type property + typeEscaped *string +} +// NewTimelineCrossReferencedEvent_source instantiates a new TimelineCrossReferencedEvent_source and sets the default values. +func NewTimelineCrossReferencedEvent_source()(*TimelineCrossReferencedEvent_source) { + m := &TimelineCrossReferencedEvent_source{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineCrossReferencedEvent_sourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineCrossReferencedEvent_sourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineCrossReferencedEvent_source(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineCrossReferencedEvent_source) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineCrossReferencedEvent_source) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["issue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssue(val.(Issueable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetIssue gets the issue property value. Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +// returns a Issueable when successful +func (m *TimelineCrossReferencedEvent_source) GetIssue()(Issueable) { + return m.issue +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *TimelineCrossReferencedEvent_source) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *TimelineCrossReferencedEvent_source) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("issue", m.GetIssue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *TimelineCrossReferencedEvent_source) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIssue sets the issue property value. Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +func (m *TimelineCrossReferencedEvent_source) SetIssue(value Issueable)() { + m.issue = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *TimelineCrossReferencedEvent_source) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type TimelineCrossReferencedEvent_sourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssue()(Issueable) + GetTypeEscaped()(*string) + SetIssue(value Issueable)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/timeline_issue_events.go b/pkg/github/models/timeline_issue_events.go new file mode 100644 index 0000000..f48fc55 --- /dev/null +++ b/pkg/github/models/timeline_issue_events.go @@ -0,0 +1,592 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineIssueEvents composed type wrapper for classes AddedToProjectIssueEventable, ConvertedNoteToIssueIssueEventable, DemilestonedIssueEventable, LabeledIssueEventable, LockedIssueEventable, MilestonedIssueEventable, MovedColumnInProjectIssueEventable, RemovedFromProjectIssueEventable, RenamedIssueEventable, ReviewDismissedIssueEventable, ReviewRequestedIssueEventable, ReviewRequestRemovedIssueEventable, StateChangeIssueEventable, TimelineAssignedIssueEventable, TimelineCommentEventable, TimelineCommitCommentedEventable, TimelineCommittedEventable, TimelineCrossReferencedEventable, TimelineLineCommentedEventable, TimelineReviewedEventable, TimelineUnassignedIssueEventable, UnlabeledIssueEventable +type TimelineIssueEvents struct { + // Composed type representation for type AddedToProjectIssueEventable + addedToProjectIssueEvent AddedToProjectIssueEventable + // Composed type representation for type ConvertedNoteToIssueIssueEventable + convertedNoteToIssueIssueEvent ConvertedNoteToIssueIssueEventable + // Composed type representation for type DemilestonedIssueEventable + demilestonedIssueEvent DemilestonedIssueEventable + // Composed type representation for type LabeledIssueEventable + labeledIssueEvent LabeledIssueEventable + // Composed type representation for type LockedIssueEventable + lockedIssueEvent LockedIssueEventable + // Composed type representation for type MilestonedIssueEventable + milestonedIssueEvent MilestonedIssueEventable + // Composed type representation for type MovedColumnInProjectIssueEventable + movedColumnInProjectIssueEvent MovedColumnInProjectIssueEventable + // Composed type representation for type RemovedFromProjectIssueEventable + removedFromProjectIssueEvent RemovedFromProjectIssueEventable + // Composed type representation for type RenamedIssueEventable + renamedIssueEvent RenamedIssueEventable + // Composed type representation for type ReviewDismissedIssueEventable + reviewDismissedIssueEvent ReviewDismissedIssueEventable + // Composed type representation for type ReviewRequestedIssueEventable + reviewRequestedIssueEvent ReviewRequestedIssueEventable + // Composed type representation for type ReviewRequestRemovedIssueEventable + reviewRequestRemovedIssueEvent ReviewRequestRemovedIssueEventable + // Composed type representation for type StateChangeIssueEventable + stateChangeIssueEvent StateChangeIssueEventable + // Composed type representation for type TimelineAssignedIssueEventable + timelineAssignedIssueEvent TimelineAssignedIssueEventable + // Composed type representation for type TimelineCommentEventable + timelineCommentEvent TimelineCommentEventable + // Composed type representation for type TimelineCommitCommentedEventable + timelineCommitCommentedEvent TimelineCommitCommentedEventable + // Composed type representation for type TimelineCommittedEventable + timelineCommittedEvent TimelineCommittedEventable + // Composed type representation for type TimelineCrossReferencedEventable + timelineCrossReferencedEvent TimelineCrossReferencedEventable + // Composed type representation for type TimelineLineCommentedEventable + timelineLineCommentedEvent TimelineLineCommentedEventable + // Composed type representation for type TimelineReviewedEventable + timelineReviewedEvent TimelineReviewedEventable + // Composed type representation for type TimelineUnassignedIssueEventable + timelineUnassignedIssueEvent TimelineUnassignedIssueEventable + // Composed type representation for type UnlabeledIssueEventable + unlabeledIssueEvent UnlabeledIssueEventable +} +// NewTimelineIssueEvents instantiates a new TimelineIssueEvents and sets the default values. +func NewTimelineIssueEvents()(*TimelineIssueEvents) { + m := &TimelineIssueEvents{ + } + return m +} +// CreateTimelineIssueEventsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineIssueEventsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTimelineIssueEvents() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateAddedToProjectIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(AddedToProjectIssueEventable); ok { + result.SetAddedToProjectIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateConvertedNoteToIssueIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ConvertedNoteToIssueIssueEventable); ok { + result.SetConvertedNoteToIssueIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateDemilestonedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(DemilestonedIssueEventable); ok { + result.SetDemilestonedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateLabeledIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(LabeledIssueEventable); ok { + result.SetLabeledIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateLockedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(LockedIssueEventable); ok { + result.SetLockedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateMilestonedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(MilestonedIssueEventable); ok { + result.SetMilestonedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateMovedColumnInProjectIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(MovedColumnInProjectIssueEventable); ok { + result.SetMovedColumnInProjectIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateRemovedFromProjectIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(RemovedFromProjectIssueEventable); ok { + result.SetRemovedFromProjectIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateRenamedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(RenamedIssueEventable); ok { + result.SetRenamedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateReviewDismissedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ReviewDismissedIssueEventable); ok { + result.SetReviewDismissedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateReviewRequestedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ReviewRequestedIssueEventable); ok { + result.SetReviewRequestedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateReviewRequestRemovedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ReviewRequestRemovedIssueEventable); ok { + result.SetReviewRequestRemovedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateStateChangeIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(StateChangeIssueEventable); ok { + result.SetStateChangeIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineAssignedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineAssignedIssueEventable); ok { + result.SetTimelineAssignedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineCommentEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineCommentEventable); ok { + result.SetTimelineCommentEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineCommitCommentedEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineCommitCommentedEventable); ok { + result.SetTimelineCommitCommentedEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineCommittedEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineCommittedEventable); ok { + result.SetTimelineCommittedEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineCrossReferencedEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineCrossReferencedEventable); ok { + result.SetTimelineCrossReferencedEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineLineCommentedEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineLineCommentedEventable); ok { + result.SetTimelineLineCommentedEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineReviewedEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineReviewedEventable); ok { + result.SetTimelineReviewedEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateTimelineUnassignedIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(TimelineUnassignedIssueEventable); ok { + result.SetTimelineUnassignedIssueEvent(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateUnlabeledIssueEventFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(UnlabeledIssueEventable); ok { + result.SetUnlabeledIssueEvent(cast) + } + } + } + return result, nil +} +// GetAddedToProjectIssueEvent gets the addedToProjectIssueEvent property value. Composed type representation for type AddedToProjectIssueEventable +// returns a AddedToProjectIssueEventable when successful +func (m *TimelineIssueEvents) GetAddedToProjectIssueEvent()(AddedToProjectIssueEventable) { + return m.addedToProjectIssueEvent +} +// GetConvertedNoteToIssueIssueEvent gets the convertedNoteToIssueIssueEvent property value. Composed type representation for type ConvertedNoteToIssueIssueEventable +// returns a ConvertedNoteToIssueIssueEventable when successful +func (m *TimelineIssueEvents) GetConvertedNoteToIssueIssueEvent()(ConvertedNoteToIssueIssueEventable) { + return m.convertedNoteToIssueIssueEvent +} +// GetDemilestonedIssueEvent gets the demilestonedIssueEvent property value. Composed type representation for type DemilestonedIssueEventable +// returns a DemilestonedIssueEventable when successful +func (m *TimelineIssueEvents) GetDemilestonedIssueEvent()(DemilestonedIssueEventable) { + return m.demilestonedIssueEvent +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineIssueEvents) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TimelineIssueEvents) GetIsComposedType()(bool) { + return true +} +// GetLabeledIssueEvent gets the labeledIssueEvent property value. Composed type representation for type LabeledIssueEventable +// returns a LabeledIssueEventable when successful +func (m *TimelineIssueEvents) GetLabeledIssueEvent()(LabeledIssueEventable) { + return m.labeledIssueEvent +} +// GetLockedIssueEvent gets the lockedIssueEvent property value. Composed type representation for type LockedIssueEventable +// returns a LockedIssueEventable when successful +func (m *TimelineIssueEvents) GetLockedIssueEvent()(LockedIssueEventable) { + return m.lockedIssueEvent +} +// GetMilestonedIssueEvent gets the milestonedIssueEvent property value. Composed type representation for type MilestonedIssueEventable +// returns a MilestonedIssueEventable when successful +func (m *TimelineIssueEvents) GetMilestonedIssueEvent()(MilestonedIssueEventable) { + return m.milestonedIssueEvent +} +// GetMovedColumnInProjectIssueEvent gets the movedColumnInProjectIssueEvent property value. Composed type representation for type MovedColumnInProjectIssueEventable +// returns a MovedColumnInProjectIssueEventable when successful +func (m *TimelineIssueEvents) GetMovedColumnInProjectIssueEvent()(MovedColumnInProjectIssueEventable) { + return m.movedColumnInProjectIssueEvent +} +// GetRemovedFromProjectIssueEvent gets the removedFromProjectIssueEvent property value. Composed type representation for type RemovedFromProjectIssueEventable +// returns a RemovedFromProjectIssueEventable when successful +func (m *TimelineIssueEvents) GetRemovedFromProjectIssueEvent()(RemovedFromProjectIssueEventable) { + return m.removedFromProjectIssueEvent +} +// GetRenamedIssueEvent gets the renamedIssueEvent property value. Composed type representation for type RenamedIssueEventable +// returns a RenamedIssueEventable when successful +func (m *TimelineIssueEvents) GetRenamedIssueEvent()(RenamedIssueEventable) { + return m.renamedIssueEvent +} +// GetReviewDismissedIssueEvent gets the reviewDismissedIssueEvent property value. Composed type representation for type ReviewDismissedIssueEventable +// returns a ReviewDismissedIssueEventable when successful +func (m *TimelineIssueEvents) GetReviewDismissedIssueEvent()(ReviewDismissedIssueEventable) { + return m.reviewDismissedIssueEvent +} +// GetReviewRequestedIssueEvent gets the reviewRequestedIssueEvent property value. Composed type representation for type ReviewRequestedIssueEventable +// returns a ReviewRequestedIssueEventable when successful +func (m *TimelineIssueEvents) GetReviewRequestedIssueEvent()(ReviewRequestedIssueEventable) { + return m.reviewRequestedIssueEvent +} +// GetReviewRequestRemovedIssueEvent gets the reviewRequestRemovedIssueEvent property value. Composed type representation for type ReviewRequestRemovedIssueEventable +// returns a ReviewRequestRemovedIssueEventable when successful +func (m *TimelineIssueEvents) GetReviewRequestRemovedIssueEvent()(ReviewRequestRemovedIssueEventable) { + return m.reviewRequestRemovedIssueEvent +} +// GetStateChangeIssueEvent gets the stateChangeIssueEvent property value. Composed type representation for type StateChangeIssueEventable +// returns a StateChangeIssueEventable when successful +func (m *TimelineIssueEvents) GetStateChangeIssueEvent()(StateChangeIssueEventable) { + return m.stateChangeIssueEvent +} +// GetTimelineAssignedIssueEvent gets the timelineAssignedIssueEvent property value. Composed type representation for type TimelineAssignedIssueEventable +// returns a TimelineAssignedIssueEventable when successful +func (m *TimelineIssueEvents) GetTimelineAssignedIssueEvent()(TimelineAssignedIssueEventable) { + return m.timelineAssignedIssueEvent +} +// GetTimelineCommentEvent gets the timelineCommentEvent property value. Composed type representation for type TimelineCommentEventable +// returns a TimelineCommentEventable when successful +func (m *TimelineIssueEvents) GetTimelineCommentEvent()(TimelineCommentEventable) { + return m.timelineCommentEvent +} +// GetTimelineCommitCommentedEvent gets the timelineCommitCommentedEvent property value. Composed type representation for type TimelineCommitCommentedEventable +// returns a TimelineCommitCommentedEventable when successful +func (m *TimelineIssueEvents) GetTimelineCommitCommentedEvent()(TimelineCommitCommentedEventable) { + return m.timelineCommitCommentedEvent +} +// GetTimelineCommittedEvent gets the timelineCommittedEvent property value. Composed type representation for type TimelineCommittedEventable +// returns a TimelineCommittedEventable when successful +func (m *TimelineIssueEvents) GetTimelineCommittedEvent()(TimelineCommittedEventable) { + return m.timelineCommittedEvent +} +// GetTimelineCrossReferencedEvent gets the timelineCrossReferencedEvent property value. Composed type representation for type TimelineCrossReferencedEventable +// returns a TimelineCrossReferencedEventable when successful +func (m *TimelineIssueEvents) GetTimelineCrossReferencedEvent()(TimelineCrossReferencedEventable) { + return m.timelineCrossReferencedEvent +} +// GetTimelineLineCommentedEvent gets the timelineLineCommentedEvent property value. Composed type representation for type TimelineLineCommentedEventable +// returns a TimelineLineCommentedEventable when successful +func (m *TimelineIssueEvents) GetTimelineLineCommentedEvent()(TimelineLineCommentedEventable) { + return m.timelineLineCommentedEvent +} +// GetTimelineReviewedEvent gets the timelineReviewedEvent property value. Composed type representation for type TimelineReviewedEventable +// returns a TimelineReviewedEventable when successful +func (m *TimelineIssueEvents) GetTimelineReviewedEvent()(TimelineReviewedEventable) { + return m.timelineReviewedEvent +} +// GetTimelineUnassignedIssueEvent gets the timelineUnassignedIssueEvent property value. Composed type representation for type TimelineUnassignedIssueEventable +// returns a TimelineUnassignedIssueEventable when successful +func (m *TimelineIssueEvents) GetTimelineUnassignedIssueEvent()(TimelineUnassignedIssueEventable) { + return m.timelineUnassignedIssueEvent +} +// GetUnlabeledIssueEvent gets the unlabeledIssueEvent property value. Composed type representation for type UnlabeledIssueEventable +// returns a UnlabeledIssueEventable when successful +func (m *TimelineIssueEvents) GetUnlabeledIssueEvent()(UnlabeledIssueEventable) { + return m.unlabeledIssueEvent +} +// Serialize serializes information the current object +func (m *TimelineIssueEvents) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAddedToProjectIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetAddedToProjectIssueEvent()) + if err != nil { + return err + } + } else if m.GetConvertedNoteToIssueIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetConvertedNoteToIssueIssueEvent()) + if err != nil { + return err + } + } else if m.GetDemilestonedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetDemilestonedIssueEvent()) + if err != nil { + return err + } + } else if m.GetLabeledIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetLabeledIssueEvent()) + if err != nil { + return err + } + } else if m.GetLockedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetLockedIssueEvent()) + if err != nil { + return err + } + } else if m.GetMilestonedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetMilestonedIssueEvent()) + if err != nil { + return err + } + } else if m.GetMovedColumnInProjectIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetMovedColumnInProjectIssueEvent()) + if err != nil { + return err + } + } else if m.GetRemovedFromProjectIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetRemovedFromProjectIssueEvent()) + if err != nil { + return err + } + } else if m.GetRenamedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetRenamedIssueEvent()) + if err != nil { + return err + } + } else if m.GetReviewDismissedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetReviewDismissedIssueEvent()) + if err != nil { + return err + } + } else if m.GetReviewRequestedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetReviewRequestedIssueEvent()) + if err != nil { + return err + } + } else if m.GetReviewRequestRemovedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetReviewRequestRemovedIssueEvent()) + if err != nil { + return err + } + } else if m.GetStateChangeIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetStateChangeIssueEvent()) + if err != nil { + return err + } + } else if m.GetTimelineAssignedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineAssignedIssueEvent()) + if err != nil { + return err + } + } else if m.GetTimelineCommentEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineCommentEvent()) + if err != nil { + return err + } + } else if m.GetTimelineCommitCommentedEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineCommitCommentedEvent()) + if err != nil { + return err + } + } else if m.GetTimelineCommittedEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineCommittedEvent()) + if err != nil { + return err + } + } else if m.GetTimelineCrossReferencedEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineCrossReferencedEvent()) + if err != nil { + return err + } + } else if m.GetTimelineLineCommentedEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineLineCommentedEvent()) + if err != nil { + return err + } + } else if m.GetTimelineReviewedEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineReviewedEvent()) + if err != nil { + return err + } + } else if m.GetTimelineUnassignedIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetTimelineUnassignedIssueEvent()) + if err != nil { + return err + } + } else if m.GetUnlabeledIssueEvent() != nil { + err := writer.WriteObjectValue("", m.GetUnlabeledIssueEvent()) + if err != nil { + return err + } + } + return nil +} +// SetAddedToProjectIssueEvent sets the addedToProjectIssueEvent property value. Composed type representation for type AddedToProjectIssueEventable +func (m *TimelineIssueEvents) SetAddedToProjectIssueEvent(value AddedToProjectIssueEventable)() { + m.addedToProjectIssueEvent = value +} +// SetConvertedNoteToIssueIssueEvent sets the convertedNoteToIssueIssueEvent property value. Composed type representation for type ConvertedNoteToIssueIssueEventable +func (m *TimelineIssueEvents) SetConvertedNoteToIssueIssueEvent(value ConvertedNoteToIssueIssueEventable)() { + m.convertedNoteToIssueIssueEvent = value +} +// SetDemilestonedIssueEvent sets the demilestonedIssueEvent property value. Composed type representation for type DemilestonedIssueEventable +func (m *TimelineIssueEvents) SetDemilestonedIssueEvent(value DemilestonedIssueEventable)() { + m.demilestonedIssueEvent = value +} +// SetLabeledIssueEvent sets the labeledIssueEvent property value. Composed type representation for type LabeledIssueEventable +func (m *TimelineIssueEvents) SetLabeledIssueEvent(value LabeledIssueEventable)() { + m.labeledIssueEvent = value +} +// SetLockedIssueEvent sets the lockedIssueEvent property value. Composed type representation for type LockedIssueEventable +func (m *TimelineIssueEvents) SetLockedIssueEvent(value LockedIssueEventable)() { + m.lockedIssueEvent = value +} +// SetMilestonedIssueEvent sets the milestonedIssueEvent property value. Composed type representation for type MilestonedIssueEventable +func (m *TimelineIssueEvents) SetMilestonedIssueEvent(value MilestonedIssueEventable)() { + m.milestonedIssueEvent = value +} +// SetMovedColumnInProjectIssueEvent sets the movedColumnInProjectIssueEvent property value. Composed type representation for type MovedColumnInProjectIssueEventable +func (m *TimelineIssueEvents) SetMovedColumnInProjectIssueEvent(value MovedColumnInProjectIssueEventable)() { + m.movedColumnInProjectIssueEvent = value +} +// SetRemovedFromProjectIssueEvent sets the removedFromProjectIssueEvent property value. Composed type representation for type RemovedFromProjectIssueEventable +func (m *TimelineIssueEvents) SetRemovedFromProjectIssueEvent(value RemovedFromProjectIssueEventable)() { + m.removedFromProjectIssueEvent = value +} +// SetRenamedIssueEvent sets the renamedIssueEvent property value. Composed type representation for type RenamedIssueEventable +func (m *TimelineIssueEvents) SetRenamedIssueEvent(value RenamedIssueEventable)() { + m.renamedIssueEvent = value +} +// SetReviewDismissedIssueEvent sets the reviewDismissedIssueEvent property value. Composed type representation for type ReviewDismissedIssueEventable +func (m *TimelineIssueEvents) SetReviewDismissedIssueEvent(value ReviewDismissedIssueEventable)() { + m.reviewDismissedIssueEvent = value +} +// SetReviewRequestedIssueEvent sets the reviewRequestedIssueEvent property value. Composed type representation for type ReviewRequestedIssueEventable +func (m *TimelineIssueEvents) SetReviewRequestedIssueEvent(value ReviewRequestedIssueEventable)() { + m.reviewRequestedIssueEvent = value +} +// SetReviewRequestRemovedIssueEvent sets the reviewRequestRemovedIssueEvent property value. Composed type representation for type ReviewRequestRemovedIssueEventable +func (m *TimelineIssueEvents) SetReviewRequestRemovedIssueEvent(value ReviewRequestRemovedIssueEventable)() { + m.reviewRequestRemovedIssueEvent = value +} +// SetStateChangeIssueEvent sets the stateChangeIssueEvent property value. Composed type representation for type StateChangeIssueEventable +func (m *TimelineIssueEvents) SetStateChangeIssueEvent(value StateChangeIssueEventable)() { + m.stateChangeIssueEvent = value +} +// SetTimelineAssignedIssueEvent sets the timelineAssignedIssueEvent property value. Composed type representation for type TimelineAssignedIssueEventable +func (m *TimelineIssueEvents) SetTimelineAssignedIssueEvent(value TimelineAssignedIssueEventable)() { + m.timelineAssignedIssueEvent = value +} +// SetTimelineCommentEvent sets the timelineCommentEvent property value. Composed type representation for type TimelineCommentEventable +func (m *TimelineIssueEvents) SetTimelineCommentEvent(value TimelineCommentEventable)() { + m.timelineCommentEvent = value +} +// SetTimelineCommitCommentedEvent sets the timelineCommitCommentedEvent property value. Composed type representation for type TimelineCommitCommentedEventable +func (m *TimelineIssueEvents) SetTimelineCommitCommentedEvent(value TimelineCommitCommentedEventable)() { + m.timelineCommitCommentedEvent = value +} +// SetTimelineCommittedEvent sets the timelineCommittedEvent property value. Composed type representation for type TimelineCommittedEventable +func (m *TimelineIssueEvents) SetTimelineCommittedEvent(value TimelineCommittedEventable)() { + m.timelineCommittedEvent = value +} +// SetTimelineCrossReferencedEvent sets the timelineCrossReferencedEvent property value. Composed type representation for type TimelineCrossReferencedEventable +func (m *TimelineIssueEvents) SetTimelineCrossReferencedEvent(value TimelineCrossReferencedEventable)() { + m.timelineCrossReferencedEvent = value +} +// SetTimelineLineCommentedEvent sets the timelineLineCommentedEvent property value. Composed type representation for type TimelineLineCommentedEventable +func (m *TimelineIssueEvents) SetTimelineLineCommentedEvent(value TimelineLineCommentedEventable)() { + m.timelineLineCommentedEvent = value +} +// SetTimelineReviewedEvent sets the timelineReviewedEvent property value. Composed type representation for type TimelineReviewedEventable +func (m *TimelineIssueEvents) SetTimelineReviewedEvent(value TimelineReviewedEventable)() { + m.timelineReviewedEvent = value +} +// SetTimelineUnassignedIssueEvent sets the timelineUnassignedIssueEvent property value. Composed type representation for type TimelineUnassignedIssueEventable +func (m *TimelineIssueEvents) SetTimelineUnassignedIssueEvent(value TimelineUnassignedIssueEventable)() { + m.timelineUnassignedIssueEvent = value +} +// SetUnlabeledIssueEvent sets the unlabeledIssueEvent property value. Composed type representation for type UnlabeledIssueEventable +func (m *TimelineIssueEvents) SetUnlabeledIssueEvent(value UnlabeledIssueEventable)() { + m.unlabeledIssueEvent = value +} +type TimelineIssueEventsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedToProjectIssueEvent()(AddedToProjectIssueEventable) + GetConvertedNoteToIssueIssueEvent()(ConvertedNoteToIssueIssueEventable) + GetDemilestonedIssueEvent()(DemilestonedIssueEventable) + GetLabeledIssueEvent()(LabeledIssueEventable) + GetLockedIssueEvent()(LockedIssueEventable) + GetMilestonedIssueEvent()(MilestonedIssueEventable) + GetMovedColumnInProjectIssueEvent()(MovedColumnInProjectIssueEventable) + GetRemovedFromProjectIssueEvent()(RemovedFromProjectIssueEventable) + GetRenamedIssueEvent()(RenamedIssueEventable) + GetReviewDismissedIssueEvent()(ReviewDismissedIssueEventable) + GetReviewRequestedIssueEvent()(ReviewRequestedIssueEventable) + GetReviewRequestRemovedIssueEvent()(ReviewRequestRemovedIssueEventable) + GetStateChangeIssueEvent()(StateChangeIssueEventable) + GetTimelineAssignedIssueEvent()(TimelineAssignedIssueEventable) + GetTimelineCommentEvent()(TimelineCommentEventable) + GetTimelineCommitCommentedEvent()(TimelineCommitCommentedEventable) + GetTimelineCommittedEvent()(TimelineCommittedEventable) + GetTimelineCrossReferencedEvent()(TimelineCrossReferencedEventable) + GetTimelineLineCommentedEvent()(TimelineLineCommentedEventable) + GetTimelineReviewedEvent()(TimelineReviewedEventable) + GetTimelineUnassignedIssueEvent()(TimelineUnassignedIssueEventable) + GetUnlabeledIssueEvent()(UnlabeledIssueEventable) + SetAddedToProjectIssueEvent(value AddedToProjectIssueEventable)() + SetConvertedNoteToIssueIssueEvent(value ConvertedNoteToIssueIssueEventable)() + SetDemilestonedIssueEvent(value DemilestonedIssueEventable)() + SetLabeledIssueEvent(value LabeledIssueEventable)() + SetLockedIssueEvent(value LockedIssueEventable)() + SetMilestonedIssueEvent(value MilestonedIssueEventable)() + SetMovedColumnInProjectIssueEvent(value MovedColumnInProjectIssueEventable)() + SetRemovedFromProjectIssueEvent(value RemovedFromProjectIssueEventable)() + SetRenamedIssueEvent(value RenamedIssueEventable)() + SetReviewDismissedIssueEvent(value ReviewDismissedIssueEventable)() + SetReviewRequestedIssueEvent(value ReviewRequestedIssueEventable)() + SetReviewRequestRemovedIssueEvent(value ReviewRequestRemovedIssueEventable)() + SetStateChangeIssueEvent(value StateChangeIssueEventable)() + SetTimelineAssignedIssueEvent(value TimelineAssignedIssueEventable)() + SetTimelineCommentEvent(value TimelineCommentEventable)() + SetTimelineCommitCommentedEvent(value TimelineCommitCommentedEventable)() + SetTimelineCommittedEvent(value TimelineCommittedEventable)() + SetTimelineCrossReferencedEvent(value TimelineCrossReferencedEventable)() + SetTimelineLineCommentedEvent(value TimelineLineCommentedEventable)() + SetTimelineReviewedEvent(value TimelineReviewedEventable)() + SetTimelineUnassignedIssueEvent(value TimelineUnassignedIssueEventable)() + SetUnlabeledIssueEvent(value UnlabeledIssueEventable)() +} diff --git a/pkg/github/models/timeline_line_commented_event.go b/pkg/github/models/timeline_line_commented_event.go new file mode 100644 index 0000000..998052a --- /dev/null +++ b/pkg/github/models/timeline_line_commented_event.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineLineCommentedEvent timeline Line Commented Event +type TimelineLineCommentedEvent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The comments property + comments []PullRequestReviewCommentable + // The event property + event *string + // The node_id property + node_id *string +} +// NewTimelineLineCommentedEvent instantiates a new TimelineLineCommentedEvent and sets the default values. +func NewTimelineLineCommentedEvent()(*TimelineLineCommentedEvent) { + m := &TimelineLineCommentedEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineLineCommentedEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineLineCommentedEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineLineCommentedEvent(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineLineCommentedEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComments gets the comments property value. The comments property +// returns a []PullRequestReviewCommentable when successful +func (m *TimelineLineCommentedEvent) GetComments()([]PullRequestReviewCommentable) { + return m.comments +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineLineCommentedEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineLineCommentedEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePullRequestReviewCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PullRequestReviewCommentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PullRequestReviewCommentable) + } + } + m.SetComments(res) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + return res +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineLineCommentedEvent) GetNodeId()(*string) { + return m.node_id +} +// Serialize serializes information the current object +func (m *TimelineLineCommentedEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + 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 *TimelineLineCommentedEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComments sets the comments property value. The comments property +func (m *TimelineLineCommentedEvent) SetComments(value []PullRequestReviewCommentable)() { + m.comments = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineLineCommentedEvent) SetEvent(value *string)() { + m.event = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineLineCommentedEvent) SetNodeId(value *string)() { + m.node_id = value +} +type TimelineLineCommentedEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()([]PullRequestReviewCommentable) + GetEvent()(*string) + GetNodeId()(*string) + SetComments(value []PullRequestReviewCommentable)() + SetEvent(value *string)() + SetNodeId(value *string)() +} diff --git a/pkg/github/models/timeline_reviewed_event.go b/pkg/github/models/timeline_reviewed_event.go new file mode 100644 index 0000000..fbd7505 --- /dev/null +++ b/pkg/github/models/timeline_reviewed_event.go @@ -0,0 +1,460 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineReviewedEvent timeline Reviewed Event +type TimelineReviewedEvent struct { + // The _links property + _links TimelineReviewedEvent__linksable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // How the author is associated with the repository. + author_association *AuthorAssociation + // The text of the review. + body *string + // The body_html property + body_html *string + // The body_text property + body_text *string + // A commit SHA for the review. + commit_id *string + // The event property + event *string + // The html_url property + html_url *string + // Unique identifier of the review + id *int32 + // The node_id property + node_id *string + // The pull_request_url property + pull_request_url *string + // The state property + state *string + // The submitted_at property + submitted_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + user SimpleUserable +} +// NewTimelineReviewedEvent instantiates a new TimelineReviewedEvent and sets the default values. +func NewTimelineReviewedEvent()(*TimelineReviewedEvent) { + m := &TimelineReviewedEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineReviewedEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineReviewedEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineReviewedEvent(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineReviewedEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthorAssociation gets the author_association property value. How the author is associated with the repository. +// returns a *AuthorAssociation when successful +func (m *TimelineReviewedEvent) GetAuthorAssociation()(*AuthorAssociation) { + return m.author_association +} +// GetBody gets the body property value. The text of the review. +// returns a *string when successful +func (m *TimelineReviewedEvent) GetBody()(*string) { + return m.body +} +// GetBodyHtml gets the body_html property value. The body_html property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetBodyHtml()(*string) { + return m.body_html +} +// GetBodyText gets the body_text property value. The body_text property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetBodyText()(*string) { + return m.body_text +} +// GetCommitId gets the commit_id property value. A commit SHA for the review. +// returns a *string when successful +func (m *TimelineReviewedEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineReviewedEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineReviewedEvent__linksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(TimelineReviewedEvent__linksable)) + } + return nil + } + res["author_association"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthorAssociation) + if err != nil { + return err + } + if val != nil { + m.SetAuthorAssociation(val.(*AuthorAssociation)) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["body_html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyHtml(val) + } + return nil + } + res["body_text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyText(val) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["pull_request_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestUrl(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["submitted_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmittedAt(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(SimpleUserable)) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. Unique identifier of the review +// returns a *int32 when successful +func (m *TimelineReviewedEvent) GetId()(*int32) { + return m.id +} +// GetLinks gets the _links property value. The _links property +// returns a TimelineReviewedEvent__linksable when successful +func (m *TimelineReviewedEvent) GetLinks()(TimelineReviewedEvent__linksable) { + return m._links +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPullRequestUrl gets the pull_request_url property value. The pull_request_url property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetPullRequestUrl()(*string) { + return m.pull_request_url +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *TimelineReviewedEvent) GetState()(*string) { + return m.state +} +// GetSubmittedAt gets the submitted_at property value. The submitted_at property +// returns a *Time when successful +func (m *TimelineReviewedEvent) GetSubmittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.submitted_at +} +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineReviewedEvent) GetUser()(SimpleUserable) { + return m.user +} +// Serialize serializes information the current object +func (m *TimelineReviewedEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorAssociation() != nil { + cast := (*m.GetAuthorAssociation()).String() + err := writer.WriteStringValue("author_association", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_html", m.GetBodyHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body_text", m.GetBodyText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pull_request_url", m.GetPullRequestUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("submitted_at", m.GetSubmittedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_links", m.GetLinks()) + 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 *TimelineReviewedEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthorAssociation sets the author_association property value. How the author is associated with the repository. +func (m *TimelineReviewedEvent) SetAuthorAssociation(value *AuthorAssociation)() { + m.author_association = value +} +// SetBody sets the body property value. The text of the review. +func (m *TimelineReviewedEvent) SetBody(value *string)() { + m.body = value +} +// SetBodyHtml sets the body_html property value. The body_html property +func (m *TimelineReviewedEvent) SetBodyHtml(value *string)() { + m.body_html = value +} +// SetBodyText sets the body_text property value. The body_text property +func (m *TimelineReviewedEvent) SetBodyText(value *string)() { + m.body_text = value +} +// SetCommitId sets the commit_id property value. A commit SHA for the review. +func (m *TimelineReviewedEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineReviewedEvent) SetEvent(value *string)() { + m.event = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *TimelineReviewedEvent) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. Unique identifier of the review +func (m *TimelineReviewedEvent) SetId(value *int32)() { + m.id = value +} +// SetLinks sets the _links property value. The _links property +func (m *TimelineReviewedEvent) SetLinks(value TimelineReviewedEvent__linksable)() { + m._links = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineReviewedEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPullRequestUrl sets the pull_request_url property value. The pull_request_url property +func (m *TimelineReviewedEvent) SetPullRequestUrl(value *string)() { + m.pull_request_url = value +} +// SetState sets the state property value. The state property +func (m *TimelineReviewedEvent) SetState(value *string)() { + m.state = value +} +// SetSubmittedAt sets the submitted_at property value. The submitted_at property +func (m *TimelineReviewedEvent) SetSubmittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.submitted_at = value +} +// SetUser sets the user property value. A GitHub user. +func (m *TimelineReviewedEvent) SetUser(value SimpleUserable)() { + m.user = value +} +type TimelineReviewedEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorAssociation()(*AuthorAssociation) + GetBody()(*string) + GetBodyHtml()(*string) + GetBodyText()(*string) + GetCommitId()(*string) + GetEvent()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLinks()(TimelineReviewedEvent__linksable) + GetNodeId()(*string) + GetPullRequestUrl()(*string) + GetState()(*string) + GetSubmittedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUser()(SimpleUserable) + SetAuthorAssociation(value *AuthorAssociation)() + SetBody(value *string)() + SetBodyHtml(value *string)() + SetBodyText(value *string)() + SetCommitId(value *string)() + SetEvent(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLinks(value TimelineReviewedEvent__linksable)() + SetNodeId(value *string)() + SetPullRequestUrl(value *string)() + SetState(value *string)() + SetSubmittedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUser(value SimpleUserable)() +} diff --git a/pkg/github/models/timeline_reviewed_event__links.go b/pkg/github/models/timeline_reviewed_event__links.go new file mode 100644 index 0000000..74e93dd --- /dev/null +++ b/pkg/github/models/timeline_reviewed_event__links.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineReviewedEvent__links struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The html property + html TimelineReviewedEvent__links_htmlable + // The pull_request property + pull_request TimelineReviewedEvent__links_pull_requestable +} +// NewTimelineReviewedEvent__links instantiates a new TimelineReviewedEvent__links and sets the default values. +func NewTimelineReviewedEvent__links()(*TimelineReviewedEvent__links) { + m := &TimelineReviewedEvent__links{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineReviewedEvent__linksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineReviewedEvent__linksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineReviewedEvent__links(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineReviewedEvent__links) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineReviewedEvent__links) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["html"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineReviewedEvent__links_htmlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHtml(val.(TimelineReviewedEvent__links_htmlable)) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimelineReviewedEvent__links_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(TimelineReviewedEvent__links_pull_requestable)) + } + return nil + } + return res +} +// GetHtml gets the html property value. The html property +// returns a TimelineReviewedEvent__links_htmlable when successful +func (m *TimelineReviewedEvent__links) GetHtml()(TimelineReviewedEvent__links_htmlable) { + return m.html +} +// GetPullRequest gets the pull_request property value. The pull_request property +// returns a TimelineReviewedEvent__links_pull_requestable when successful +func (m *TimelineReviewedEvent__links) GetPullRequest()(TimelineReviewedEvent__links_pull_requestable) { + return m.pull_request +} +// Serialize serializes information the current object +func (m *TimelineReviewedEvent__links) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("html", m.GetHtml()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + 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 *TimelineReviewedEvent__links) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHtml sets the html property value. The html property +func (m *TimelineReviewedEvent__links) SetHtml(value TimelineReviewedEvent__links_htmlable)() { + m.html = value +} +// SetPullRequest sets the pull_request property value. The pull_request property +func (m *TimelineReviewedEvent__links) SetPullRequest(value TimelineReviewedEvent__links_pull_requestable)() { + m.pull_request = value +} +type TimelineReviewedEvent__linksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHtml()(TimelineReviewedEvent__links_htmlable) + GetPullRequest()(TimelineReviewedEvent__links_pull_requestable) + SetHtml(value TimelineReviewedEvent__links_htmlable)() + SetPullRequest(value TimelineReviewedEvent__links_pull_requestable)() +} diff --git a/pkg/github/models/timeline_reviewed_event__links_html.go b/pkg/github/models/timeline_reviewed_event__links_html.go new file mode 100644 index 0000000..c886137 --- /dev/null +++ b/pkg/github/models/timeline_reviewed_event__links_html.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineReviewedEvent__links_html struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewTimelineReviewedEvent__links_html instantiates a new TimelineReviewedEvent__links_html and sets the default values. +func NewTimelineReviewedEvent__links_html()(*TimelineReviewedEvent__links_html) { + m := &TimelineReviewedEvent__links_html{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineReviewedEvent__links_htmlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineReviewedEvent__links_htmlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineReviewedEvent__links_html(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineReviewedEvent__links_html) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineReviewedEvent__links_html) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *TimelineReviewedEvent__links_html) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *TimelineReviewedEvent__links_html) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *TimelineReviewedEvent__links_html) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *TimelineReviewedEvent__links_html) SetHref(value *string)() { + m.href = value +} +type TimelineReviewedEvent__links_htmlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/timeline_reviewed_event__links_pull_request.go b/pkg/github/models/timeline_reviewed_event__links_pull_request.go new file mode 100644 index 0000000..d8d35c2 --- /dev/null +++ b/pkg/github/models/timeline_reviewed_event__links_pull_request.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TimelineReviewedEvent__links_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The href property + href *string +} +// NewTimelineReviewedEvent__links_pull_request instantiates a new TimelineReviewedEvent__links_pull_request and sets the default values. +func NewTimelineReviewedEvent__links_pull_request()(*TimelineReviewedEvent__links_pull_request) { + m := &TimelineReviewedEvent__links_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineReviewedEvent__links_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineReviewedEvent__links_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineReviewedEvent__links_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineReviewedEvent__links_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineReviewedEvent__links_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(val) + } + return nil + } + return res +} +// GetHref gets the href property value. The href property +// returns a *string when successful +func (m *TimelineReviewedEvent__links_pull_request) GetHref()(*string) { + return m.href +} +// Serialize serializes information the current object +func (m *TimelineReviewedEvent__links_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + 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 *TimelineReviewedEvent__links_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHref sets the href property value. The href property +func (m *TimelineReviewedEvent__links_pull_request) SetHref(value *string)() { + m.href = value +} +type TimelineReviewedEvent__links_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + SetHref(value *string)() +} diff --git a/pkg/github/models/timeline_unassigned_issue_event.go b/pkg/github/models/timeline_unassigned_issue_event.go new file mode 100644 index 0000000..228839d --- /dev/null +++ b/pkg/github/models/timeline_unassigned_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimelineUnassignedIssueEvent timeline Unassigned Issue Event +type TimelineUnassignedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee SimpleUserable + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewTimelineUnassignedIssueEvent instantiates a new TimelineUnassignedIssueEvent and sets the default values. +func NewTimelineUnassignedIssueEvent()(*TimelineUnassignedIssueEvent) { + m := &TimelineUnassignedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTimelineUnassignedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTimelineUnassignedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimelineUnassignedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineUnassignedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TimelineUnassignedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *TimelineUnassignedIssueEvent) GetAssignee()(SimpleUserable) { + return m.assignee +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *TimelineUnassignedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *TimelineUnassignedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *TimelineUnassignedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *TimelineUnassignedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TimelineUnassignedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TimelineUnassignedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *TimelineUnassignedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *TimelineUnassignedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *TimelineUnassignedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *TimelineUnassignedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *TimelineUnassignedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TimelineUnassignedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *TimelineUnassignedIssueEvent) SetAssignee(value SimpleUserable)() { + m.assignee = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *TimelineUnassignedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *TimelineUnassignedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TimelineUnassignedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *TimelineUnassignedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *TimelineUnassignedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *TimelineUnassignedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *TimelineUnassignedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *TimelineUnassignedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type TimelineUnassignedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetAssignee()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetAssignee(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/topic.go b/pkg/github/models/topic.go new file mode 100644 index 0000000..86b2eba --- /dev/null +++ b/pkg/github/models/topic.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Topic a topic aggregates entities that are related to a subject. +type Topic struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names property + names []string +} +// NewTopic instantiates a new Topic and sets the default values. +func NewTopic()(*Topic) { + m := &Topic{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopic(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Topic) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Topic) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetNames(res) + } + return nil + } + return res +} +// GetNames gets the names property value. The names property +// returns a []string when successful +func (m *Topic) GetNames()([]string) { + return m.names +} +// Serialize serializes information the current object +func (m *Topic) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetNames() != nil { + err := writer.WriteCollectionOfStringValues("names", m.GetNames()) + 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 *Topic) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNames sets the names property value. The names property +func (m *Topic) SetNames(value []string)() { + m.names = value +} +type Topicable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNames()([]string) + SetNames(value []string)() +} diff --git a/pkg/github/models/topic_search_result_item.go b/pkg/github/models/topic_search_result_item.go new file mode 100644 index 0000000..909ee43 --- /dev/null +++ b/pkg/github/models/topic_search_result_item.go @@ -0,0 +1,553 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TopicSearchResultItem topic Search Result Item +type TopicSearchResultItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The aliases property + aliases []TopicSearchResultItem_aliasesable + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The created_by property + created_by *string + // The curated property + curated *bool + // The description property + description *string + // The display_name property + display_name *string + // The featured property + featured *bool + // The logo_url property + logo_url *string + // The name property + name *string + // The related property + related []TopicSearchResultItem_relatedable + // The released property + released *string + // The repository_count property + repository_count *int32 + // The score property + score *float64 + // The short_description property + short_description *string + // The text_matches property + text_matches []Topicsable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewTopicSearchResultItem instantiates a new TopicSearchResultItem and sets the default values. +func NewTopicSearchResultItem()(*TopicSearchResultItem) { + m := &TopicSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicSearchResultItem(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TopicSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAliases gets the aliases property value. The aliases property +// returns a []TopicSearchResultItem_aliasesable when successful +func (m *TopicSearchResultItem) GetAliases()([]TopicSearchResultItem_aliasesable) { + return m.aliases +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *TopicSearchResultItem) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetCreatedBy gets the created_by property value. The created_by property +// returns a *string when successful +func (m *TopicSearchResultItem) GetCreatedBy()(*string) { + return m.created_by +} +// GetCurated gets the curated property value. The curated property +// returns a *bool when successful +func (m *TopicSearchResultItem) GetCurated()(*bool) { + return m.curated +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *TopicSearchResultItem) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the display_name property value. The display_name property +// returns a *string when successful +func (m *TopicSearchResultItem) GetDisplayName()(*string) { + return m.display_name +} +// GetFeatured gets the featured property value. The featured property +// returns a *bool when successful +func (m *TopicSearchResultItem) GetFeatured()(*bool) { + return m.featured +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TopicSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aliases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTopicSearchResultItem_aliasesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TopicSearchResultItem_aliasesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TopicSearchResultItem_aliasesable) + } + } + m.SetAliases(res) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["created_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["curated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCurated(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["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["featured"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFeatured(val) + } + return nil + } + res["logo_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogoUrl(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["related"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTopicSearchResultItem_relatedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TopicSearchResultItem_relatedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TopicSearchResultItem_relatedable) + } + } + m.SetRelated(res) + } + return nil + } + res["released"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReleased(val) + } + return nil + } + res["repository_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCount(val) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["short_description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShortDescription(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTopicsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Topicsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Topicsable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetLogoUrl gets the logo_url property value. The logo_url property +// returns a *string when successful +func (m *TopicSearchResultItem) GetLogoUrl()(*string) { + return m.logo_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TopicSearchResultItem) GetName()(*string) { + return m.name +} +// GetRelated gets the related property value. The related property +// returns a []TopicSearchResultItem_relatedable when successful +func (m *TopicSearchResultItem) GetRelated()([]TopicSearchResultItem_relatedable) { + return m.related +} +// GetReleased gets the released property value. The released property +// returns a *string when successful +func (m *TopicSearchResultItem) GetReleased()(*string) { + return m.released +} +// GetRepositoryCount gets the repository_count property value. The repository_count property +// returns a *int32 when successful +func (m *TopicSearchResultItem) GetRepositoryCount()(*int32) { + return m.repository_count +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *TopicSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetShortDescription gets the short_description property value. The short_description property +// returns a *string when successful +func (m *TopicSearchResultItem) GetShortDescription()(*string) { + return m.short_description +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Topicsable when successful +func (m *TopicSearchResultItem) GetTextMatches()([]Topicsable) { + return m.text_matches +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *TopicSearchResultItem) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *TopicSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAliases() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAliases())) + for i, v := range m.GetAliases() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("aliases", cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_by", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("curated", m.GetCurated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("featured", m.GetFeatured()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("logo_url", m.GetLogoUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRelated() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelated())) + for i, v := range m.GetRelated() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("related", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("released", m.GetReleased()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_count", m.GetRepositoryCount()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("short_description", m.GetShortDescription()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// 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 *TopicSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAliases sets the aliases property value. The aliases property +func (m *TopicSearchResultItem) SetAliases(value []TopicSearchResultItem_aliasesable)() { + m.aliases = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *TopicSearchResultItem) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetCreatedBy sets the created_by property value. The created_by property +func (m *TopicSearchResultItem) SetCreatedBy(value *string)() { + m.created_by = value +} +// SetCurated sets the curated property value. The curated property +func (m *TopicSearchResultItem) SetCurated(value *bool)() { + m.curated = value +} +// SetDescription sets the description property value. The description property +func (m *TopicSearchResultItem) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the display_name property value. The display_name property +func (m *TopicSearchResultItem) SetDisplayName(value *string)() { + m.display_name = value +} +// SetFeatured sets the featured property value. The featured property +func (m *TopicSearchResultItem) SetFeatured(value *bool)() { + m.featured = value +} +// SetLogoUrl sets the logo_url property value. The logo_url property +func (m *TopicSearchResultItem) SetLogoUrl(value *string)() { + m.logo_url = value +} +// SetName sets the name property value. The name property +func (m *TopicSearchResultItem) SetName(value *string)() { + m.name = value +} +// SetRelated sets the related property value. The related property +func (m *TopicSearchResultItem) SetRelated(value []TopicSearchResultItem_relatedable)() { + m.related = value +} +// SetReleased sets the released property value. The released property +func (m *TopicSearchResultItem) SetReleased(value *string)() { + m.released = value +} +// SetRepositoryCount sets the repository_count property value. The repository_count property +func (m *TopicSearchResultItem) SetRepositoryCount(value *int32)() { + m.repository_count = value +} +// SetScore sets the score property value. The score property +func (m *TopicSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetShortDescription sets the short_description property value. The short_description property +func (m *TopicSearchResultItem) SetShortDescription(value *string)() { + m.short_description = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *TopicSearchResultItem) SetTextMatches(value []Topicsable)() { + m.text_matches = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *TopicSearchResultItem) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type TopicSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAliases()([]TopicSearchResultItem_aliasesable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedBy()(*string) + GetCurated()(*bool) + GetDescription()(*string) + GetDisplayName()(*string) + GetFeatured()(*bool) + GetLogoUrl()(*string) + GetName()(*string) + GetRelated()([]TopicSearchResultItem_relatedable) + GetReleased()(*string) + GetRepositoryCount()(*int32) + GetScore()(*float64) + GetShortDescription()(*string) + GetTextMatches()([]Topicsable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAliases(value []TopicSearchResultItem_aliasesable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedBy(value *string)() + SetCurated(value *bool)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetFeatured(value *bool)() + SetLogoUrl(value *string)() + SetName(value *string)() + SetRelated(value []TopicSearchResultItem_relatedable)() + SetReleased(value *string)() + SetRepositoryCount(value *int32)() + SetScore(value *float64)() + SetShortDescription(value *string)() + SetTextMatches(value []Topicsable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/topic_search_result_item_aliases.go b/pkg/github/models/topic_search_result_item_aliases.go new file mode 100644 index 0000000..8e3eabd --- /dev/null +++ b/pkg/github/models/topic_search_result_item_aliases.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TopicSearchResultItem_aliases struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The topic_relation property + topic_relation TopicSearchResultItem_aliases_topic_relationable +} +// NewTopicSearchResultItem_aliases instantiates a new TopicSearchResultItem_aliases and sets the default values. +func NewTopicSearchResultItem_aliases()(*TopicSearchResultItem_aliases) { + m := &TopicSearchResultItem_aliases{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicSearchResultItem_aliasesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicSearchResultItem_aliasesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicSearchResultItem_aliases(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TopicSearchResultItem_aliases) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TopicSearchResultItem_aliases) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["topic_relation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTopicSearchResultItem_aliases_topic_relationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTopicRelation(val.(TopicSearchResultItem_aliases_topic_relationable)) + } + return nil + } + return res +} +// GetTopicRelation gets the topic_relation property value. The topic_relation property +// returns a TopicSearchResultItem_aliases_topic_relationable when successful +func (m *TopicSearchResultItem_aliases) GetTopicRelation()(TopicSearchResultItem_aliases_topic_relationable) { + return m.topic_relation +} +// Serialize serializes information the current object +func (m *TopicSearchResultItem_aliases) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("topic_relation", m.GetTopicRelation()) + 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 *TopicSearchResultItem_aliases) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTopicRelation sets the topic_relation property value. The topic_relation property +func (m *TopicSearchResultItem_aliases) SetTopicRelation(value TopicSearchResultItem_aliases_topic_relationable)() { + m.topic_relation = value +} +type TopicSearchResultItem_aliasesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTopicRelation()(TopicSearchResultItem_aliases_topic_relationable) + SetTopicRelation(value TopicSearchResultItem_aliases_topic_relationable)() +} diff --git a/pkg/github/models/topic_search_result_item_aliases_topic_relation.go b/pkg/github/models/topic_search_result_item_aliases_topic_relation.go new file mode 100644 index 0000000..b0027c5 --- /dev/null +++ b/pkg/github/models/topic_search_result_item_aliases_topic_relation.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TopicSearchResultItem_aliases_topic_relation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The name property + name *string + // The relation_type property + relation_type *string + // The topic_id property + topic_id *int32 +} +// NewTopicSearchResultItem_aliases_topic_relation instantiates a new TopicSearchResultItem_aliases_topic_relation and sets the default values. +func NewTopicSearchResultItem_aliases_topic_relation()(*TopicSearchResultItem_aliases_topic_relation) { + m := &TopicSearchResultItem_aliases_topic_relation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicSearchResultItem_aliases_topic_relationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicSearchResultItem_aliases_topic_relationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicSearchResultItem_aliases_topic_relation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TopicSearchResultItem_aliases_topic_relation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TopicSearchResultItem_aliases_topic_relation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["relation_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelationType(val) + } + return nil + } + res["topic_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTopicId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TopicSearchResultItem_aliases_topic_relation) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TopicSearchResultItem_aliases_topic_relation) GetName()(*string) { + return m.name +} +// GetRelationType gets the relation_type property value. The relation_type property +// returns a *string when successful +func (m *TopicSearchResultItem_aliases_topic_relation) GetRelationType()(*string) { + return m.relation_type +} +// GetTopicId gets the topic_id property value. The topic_id property +// returns a *int32 when successful +func (m *TopicSearchResultItem_aliases_topic_relation) GetTopicId()(*int32) { + return m.topic_id +} +// Serialize serializes information the current object +func (m *TopicSearchResultItem_aliases_topic_relation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("relation_type", m.GetRelationType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("topic_id", m.GetTopicId()) + 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 *TopicSearchResultItem_aliases_topic_relation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *TopicSearchResultItem_aliases_topic_relation) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *TopicSearchResultItem_aliases_topic_relation) SetName(value *string)() { + m.name = value +} +// SetRelationType sets the relation_type property value. The relation_type property +func (m *TopicSearchResultItem_aliases_topic_relation) SetRelationType(value *string)() { + m.relation_type = value +} +// SetTopicId sets the topic_id property value. The topic_id property +func (m *TopicSearchResultItem_aliases_topic_relation) SetTopicId(value *int32)() { + m.topic_id = value +} +type TopicSearchResultItem_aliases_topic_relationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetName()(*string) + GetRelationType()(*string) + GetTopicId()(*int32) + SetId(value *int32)() + SetName(value *string)() + SetRelationType(value *string)() + SetTopicId(value *int32)() +} diff --git a/pkg/github/models/topic_search_result_item_related.go b/pkg/github/models/topic_search_result_item_related.go new file mode 100644 index 0000000..0eeb02d --- /dev/null +++ b/pkg/github/models/topic_search_result_item_related.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TopicSearchResultItem_related struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The topic_relation property + topic_relation TopicSearchResultItem_related_topic_relationable +} +// NewTopicSearchResultItem_related instantiates a new TopicSearchResultItem_related and sets the default values. +func NewTopicSearchResultItem_related()(*TopicSearchResultItem_related) { + m := &TopicSearchResultItem_related{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicSearchResultItem_relatedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicSearchResultItem_relatedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicSearchResultItem_related(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TopicSearchResultItem_related) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TopicSearchResultItem_related) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["topic_relation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTopicSearchResultItem_related_topic_relationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTopicRelation(val.(TopicSearchResultItem_related_topic_relationable)) + } + return nil + } + return res +} +// GetTopicRelation gets the topic_relation property value. The topic_relation property +// returns a TopicSearchResultItem_related_topic_relationable when successful +func (m *TopicSearchResultItem_related) GetTopicRelation()(TopicSearchResultItem_related_topic_relationable) { + return m.topic_relation +} +// Serialize serializes information the current object +func (m *TopicSearchResultItem_related) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("topic_relation", m.GetTopicRelation()) + 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 *TopicSearchResultItem_related) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTopicRelation sets the topic_relation property value. The topic_relation property +func (m *TopicSearchResultItem_related) SetTopicRelation(value TopicSearchResultItem_related_topic_relationable)() { + m.topic_relation = value +} +type TopicSearchResultItem_relatedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTopicRelation()(TopicSearchResultItem_related_topic_relationable) + SetTopicRelation(value TopicSearchResultItem_related_topic_relationable)() +} diff --git a/pkg/github/models/topic_search_result_item_related_topic_relation.go b/pkg/github/models/topic_search_result_item_related_topic_relation.go new file mode 100644 index 0000000..65cd1bf --- /dev/null +++ b/pkg/github/models/topic_search_result_item_related_topic_relation.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type TopicSearchResultItem_related_topic_relation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id property + id *int32 + // The name property + name *string + // The relation_type property + relation_type *string + // The topic_id property + topic_id *int32 +} +// NewTopicSearchResultItem_related_topic_relation instantiates a new TopicSearchResultItem_related_topic_relation and sets the default values. +func NewTopicSearchResultItem_related_topic_relation()(*TopicSearchResultItem_related_topic_relation) { + m := &TopicSearchResultItem_related_topic_relation{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicSearchResultItem_related_topic_relationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicSearchResultItem_related_topic_relationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicSearchResultItem_related_topic_relation(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TopicSearchResultItem_related_topic_relation) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TopicSearchResultItem_related_topic_relation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["relation_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelationType(val) + } + return nil + } + res["topic_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTopicId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *TopicSearchResultItem_related_topic_relation) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *TopicSearchResultItem_related_topic_relation) GetName()(*string) { + return m.name +} +// GetRelationType gets the relation_type property value. The relation_type property +// returns a *string when successful +func (m *TopicSearchResultItem_related_topic_relation) GetRelationType()(*string) { + return m.relation_type +} +// GetTopicId gets the topic_id property value. The topic_id property +// returns a *int32 when successful +func (m *TopicSearchResultItem_related_topic_relation) GetTopicId()(*int32) { + return m.topic_id +} +// Serialize serializes information the current object +func (m *TopicSearchResultItem_related_topic_relation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("relation_type", m.GetRelationType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("topic_id", m.GetTopicId()) + 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 *TopicSearchResultItem_related_topic_relation) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *TopicSearchResultItem_related_topic_relation) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *TopicSearchResultItem_related_topic_relation) SetName(value *string)() { + m.name = value +} +// SetRelationType sets the relation_type property value. The relation_type property +func (m *TopicSearchResultItem_related_topic_relation) SetRelationType(value *string)() { + m.relation_type = value +} +// SetTopicId sets the topic_id property value. The topic_id property +func (m *TopicSearchResultItem_related_topic_relation) SetTopicId(value *int32)() { + m.topic_id = value +} +type TopicSearchResultItem_related_topic_relationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetName()(*string) + GetRelationType()(*string) + GetTopicId()(*int32) + SetId(value *int32)() + SetName(value *string)() + SetRelationType(value *string)() + SetTopicId(value *int32)() +} diff --git a/pkg/github/models/topics.go b/pkg/github/models/topics.go new file mode 100644 index 0000000..981a379 --- /dev/null +++ b/pkg/github/models/topics.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Topics struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The fragment property + fragment *string + // The matches property + matches []Topics_matchesable + // The object_type property + object_type *string + // The object_url property + object_url *string + // The property property + property *string +} +// NewTopics instantiates a new Topics and sets the default values. +func NewTopics()(*Topics) { + m := &Topics{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopics(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Topics) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Topics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFragment(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTopics_matchesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Topics_matchesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Topics_matchesable) + } + } + m.SetMatches(res) + } + return nil + } + res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectUrl(val) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + return res +} +// GetFragment gets the fragment property value. The fragment property +// returns a *string when successful +func (m *Topics) GetFragment()(*string) { + return m.fragment +} +// GetMatches gets the matches property value. The matches property +// returns a []Topics_matchesable when successful +func (m *Topics) GetMatches()([]Topics_matchesable) { + return m.matches +} +// GetObjectType gets the object_type property value. The object_type property +// returns a *string when successful +func (m *Topics) GetObjectType()(*string) { + return m.object_type +} +// GetObjectUrl gets the object_url property value. The object_url property +// returns a *string when successful +func (m *Topics) GetObjectUrl()(*string) { + return m.object_url +} +// GetProperty gets the property property value. The property property +// returns a *string when successful +func (m *Topics) GetProperty()(*string) { + return m.property +} +// Serialize serializes information the current object +func (m *Topics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fragment", m.GetFragment()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_type", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + 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 *Topics) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFragment sets the fragment property value. The fragment property +func (m *Topics) SetFragment(value *string)() { + m.fragment = value +} +// SetMatches sets the matches property value. The matches property +func (m *Topics) SetMatches(value []Topics_matchesable)() { + m.matches = value +} +// SetObjectType sets the object_type property value. The object_type property +func (m *Topics) SetObjectType(value *string)() { + m.object_type = value +} +// SetObjectUrl sets the object_url property value. The object_url property +func (m *Topics) SetObjectUrl(value *string)() { + m.object_url = value +} +// SetProperty sets the property property value. The property property +func (m *Topics) SetProperty(value *string)() { + m.property = value +} +type Topicsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFragment()(*string) + GetMatches()([]Topics_matchesable) + GetObjectType()(*string) + GetObjectUrl()(*string) + GetProperty()(*string) + SetFragment(value *string)() + SetMatches(value []Topics_matchesable)() + SetObjectType(value *string)() + SetObjectUrl(value *string)() + SetProperty(value *string)() +} diff --git a/pkg/github/models/topics_matches.go b/pkg/github/models/topics_matches.go new file mode 100644 index 0000000..7c500d4 --- /dev/null +++ b/pkg/github/models/topics_matches.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Topics_matches struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The indices property + indices []int32 + // The text property + text *string +} +// NewTopics_matches instantiates a new Topics_matches and sets the default values. +func NewTopics_matches()(*Topics_matches) { + m := &Topics_matches{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopics_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopics_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopics_matches(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Topics_matches) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Topics_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetIndices(res) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetIndices gets the indices property value. The indices property +// returns a []int32 when successful +func (m *Topics_matches) GetIndices()([]int32) { + return m.indices +} +// GetText gets the text property value. The text property +// returns a *string when successful +func (m *Topics_matches) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *Topics_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIndices() != nil { + err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Topics_matches) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIndices sets the indices property value. The indices property +func (m *Topics_matches) SetIndices(value []int32)() { + m.indices = value +} +// SetText sets the text property value. The text property +func (m *Topics_matches) SetText(value *string)() { + m.text = value +} +type Topics_matchesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndices()([]int32) + GetText()(*string) + SetIndices(value []int32)() + SetText(value *string)() +} diff --git a/pkg/github/models/traffic.go b/pkg/github/models/traffic.go new file mode 100644 index 0000000..58e1a7c --- /dev/null +++ b/pkg/github/models/traffic.go @@ -0,0 +1,139 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Traffic struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The count property + count *int32 + // The timestamp property + timestamp *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The uniques property + uniques *int32 +} +// NewTraffic instantiates a new Traffic and sets the default values. +func NewTraffic()(*Traffic) { + m := &Traffic{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTrafficFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTrafficFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTraffic(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Traffic) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCount gets the count property value. The count property +// returns a *int32 when successful +func (m *Traffic) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Traffic) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + res["timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestamp(val) + } + return nil + } + res["uniques"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniques(val) + } + return nil + } + return res +} +// GetTimestamp gets the timestamp property value. The timestamp property +// returns a *Time when successful +func (m *Traffic) GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.timestamp +} +// GetUniques gets the uniques property value. The uniques property +// returns a *int32 when successful +func (m *Traffic) GetUniques()(*int32) { + return m.uniques +} +// Serialize serializes information the current object +func (m *Traffic) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("timestamp", m.GetTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniques", m.GetUniques()) + 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 *Traffic) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCount sets the count property value. The count property +func (m *Traffic) SetCount(value *int32)() { + m.count = value +} +// SetTimestamp sets the timestamp property value. The timestamp property +func (m *Traffic) SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.timestamp = value +} +// SetUniques sets the uniques property value. The uniques property +func (m *Traffic) SetUniques(value *int32)() { + m.uniques = value +} +type Trafficable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCount()(*int32) + GetTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUniques()(*int32) + SetCount(value *int32)() + SetTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUniques(value *int32)() +} diff --git a/pkg/github/models/unassigned_issue_event.go b/pkg/github/models/unassigned_issue_event.go new file mode 100644 index 0000000..2a1ea94 --- /dev/null +++ b/pkg/github/models/unassigned_issue_event.go @@ -0,0 +1,371 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UnassignedIssueEvent unassigned Issue Event +type UnassignedIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + assignee SimpleUserable + // A GitHub user. + assigner SimpleUserable + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewUnassignedIssueEvent instantiates a new UnassignedIssueEvent and sets the default values. +func NewUnassignedIssueEvent()(*UnassignedIssueEvent) { + m := &UnassignedIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUnassignedIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUnassignedIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnassignedIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *UnassignedIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UnassignedIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *UnassignedIssueEvent) GetAssignee()(SimpleUserable) { + return m.assignee +} +// GetAssigner gets the assigner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *UnassignedIssueEvent) GetAssigner()(SimpleUserable) { + return m.assigner +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *UnassignedIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *UnassignedIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *UnassignedIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *UnassignedIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UnassignedIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val.(SimpleUserable)) + } + return nil + } + res["assigner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssigner(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *UnassignedIssueEvent) GetId()(*int32) { + return m.id +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *UnassignedIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *UnassignedIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *UnassignedIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *UnassignedIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("assigner", m.GetAssigner()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *UnassignedIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UnassignedIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. A GitHub user. +func (m *UnassignedIssueEvent) SetAssignee(value SimpleUserable)() { + m.assignee = value +} +// SetAssigner sets the assigner property value. A GitHub user. +func (m *UnassignedIssueEvent) SetAssigner(value SimpleUserable)() { + m.assigner = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *UnassignedIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *UnassignedIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *UnassignedIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *UnassignedIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *UnassignedIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *UnassignedIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *UnassignedIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *UnassignedIssueEvent) SetUrl(value *string)() { + m.url = value +} +type UnassignedIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetAssignee()(SimpleUserable) + GetAssigner()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetAssignee(value SimpleUserable)() + SetAssigner(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/unlabeled_issue_event.go b/pkg/github/models/unlabeled_issue_event.go new file mode 100644 index 0000000..85e560c --- /dev/null +++ b/pkg/github/models/unlabeled_issue_event.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UnlabeledIssueEvent unlabeled Issue Event +type UnlabeledIssueEvent struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The commit_id property + commit_id *string + // The commit_url property + commit_url *string + // The created_at property + created_at *string + // The event property + event *string + // The id property + id *int32 + // The label property + label UnlabeledIssueEvent_labelable + // The node_id property + node_id *string + // GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + performed_via_github_app NullableIntegrationable + // The url property + url *string +} +// NewUnlabeledIssueEvent instantiates a new UnlabeledIssueEvent and sets the default values. +func NewUnlabeledIssueEvent()(*UnlabeledIssueEvent) { + m := &UnlabeledIssueEvent{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUnlabeledIssueEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUnlabeledIssueEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnlabeledIssueEvent(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *UnlabeledIssueEvent) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UnlabeledIssueEvent) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitId gets the commit_id property value. The commit_id property +// returns a *string when successful +func (m *UnlabeledIssueEvent) GetCommitId()(*string) { + return m.commit_id +} +// GetCommitUrl gets the commit_url property value. The commit_url property +// returns a *string when successful +func (m *UnlabeledIssueEvent) GetCommitUrl()(*string) { + return m.commit_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *string when successful +func (m *UnlabeledIssueEvent) GetCreatedAt()(*string) { + return m.created_at +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *UnlabeledIssueEvent) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UnlabeledIssueEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["commit_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUnlabeledIssueEvent_labelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabel(val.(UnlabeledIssueEvent_labelable)) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["performed_via_github_app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableIntegrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedViaGithubApp(val.(NullableIntegrationable)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *UnlabeledIssueEvent) GetId()(*int32) { + return m.id +} +// GetLabel gets the label property value. The label property +// returns a UnlabeledIssueEvent_labelable when successful +func (m *UnlabeledIssueEvent) GetLabel()(UnlabeledIssueEvent_labelable) { + return m.label +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *UnlabeledIssueEvent) GetNodeId()(*string) { + return m.node_id +} +// GetPerformedViaGithubApp gets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +// returns a NullableIntegrationable when successful +func (m *UnlabeledIssueEvent) GetPerformedViaGithubApp()(NullableIntegrationable) { + return m.performed_via_github_app +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *UnlabeledIssueEvent) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *UnlabeledIssueEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_url", m.GetCommitUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("performed_via_github_app", m.GetPerformedViaGithubApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *UnlabeledIssueEvent) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UnlabeledIssueEvent) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitId sets the commit_id property value. The commit_id property +func (m *UnlabeledIssueEvent) SetCommitId(value *string)() { + m.commit_id = value +} +// SetCommitUrl sets the commit_url property value. The commit_url property +func (m *UnlabeledIssueEvent) SetCommitUrl(value *string)() { + m.commit_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *UnlabeledIssueEvent) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetEvent sets the event property value. The event property +func (m *UnlabeledIssueEvent) SetEvent(value *string)() { + m.event = value +} +// SetId sets the id property value. The id property +func (m *UnlabeledIssueEvent) SetId(value *int32)() { + m.id = value +} +// SetLabel sets the label property value. The label property +func (m *UnlabeledIssueEvent) SetLabel(value UnlabeledIssueEvent_labelable)() { + m.label = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *UnlabeledIssueEvent) SetNodeId(value *string)() { + m.node_id = value +} +// SetPerformedViaGithubApp sets the performed_via_github_app property value. GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. +func (m *UnlabeledIssueEvent) SetPerformedViaGithubApp(value NullableIntegrationable)() { + m.performed_via_github_app = value +} +// SetUrl sets the url property value. The url property +func (m *UnlabeledIssueEvent) SetUrl(value *string)() { + m.url = value +} +type UnlabeledIssueEventable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetCommitId()(*string) + GetCommitUrl()(*string) + GetCreatedAt()(*string) + GetEvent()(*string) + GetId()(*int32) + GetLabel()(UnlabeledIssueEvent_labelable) + GetNodeId()(*string) + GetPerformedViaGithubApp()(NullableIntegrationable) + GetUrl()(*string) + SetActor(value SimpleUserable)() + SetCommitId(value *string)() + SetCommitUrl(value *string)() + SetCreatedAt(value *string)() + SetEvent(value *string)() + SetId(value *int32)() + SetLabel(value UnlabeledIssueEvent_labelable)() + SetNodeId(value *string)() + SetPerformedViaGithubApp(value NullableIntegrationable)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/unlabeled_issue_event_label.go b/pkg/github/models/unlabeled_issue_event_label.go new file mode 100644 index 0000000..36e77e8 --- /dev/null +++ b/pkg/github/models/unlabeled_issue_event_label.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type UnlabeledIssueEvent_label struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The color property + color *string + // The name property + name *string +} +// NewUnlabeledIssueEvent_label instantiates a new UnlabeledIssueEvent_label and sets the default values. +func NewUnlabeledIssueEvent_label()(*UnlabeledIssueEvent_label) { + m := &UnlabeledIssueEvent_label{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUnlabeledIssueEvent_labelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUnlabeledIssueEvent_labelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnlabeledIssueEvent_label(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UnlabeledIssueEvent_label) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The color property +// returns a *string when successful +func (m *UnlabeledIssueEvent_label) GetColor()(*string) { + return m.color +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UnlabeledIssueEvent_label) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(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 + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *UnlabeledIssueEvent_label) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *UnlabeledIssueEvent_label) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *UnlabeledIssueEvent_label) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The color property +func (m *UnlabeledIssueEvent_label) SetColor(value *string)() { + m.color = value +} +// SetName sets the name property value. The name property +func (m *UnlabeledIssueEvent_label) SetName(value *string)() { + m.name = value +} +type UnlabeledIssueEvent_labelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetName()(*string) + SetColor(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/models/user.go b/pkg/github/models/user.go new file mode 100644 index 0000000..1b5ebb5 --- /dev/null +++ b/pkg/github/models/user.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type User struct { + // Whether the user active in the IdP. + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A human-readable name for the user. + displayName *string + // The emails for the user. + emails []Usersable + // A unique identifier for the resource as defined by the provisioning client. + externalId *string + // The name property + name UserNameable + // The roles assigned to the user. + roles []Usersable + // The URIs that are used to indicate the namespaces of the SCIM schemas. + schemas []User_schemas + // The username for the user. + userName *string +} +// NewUser instantiates a new User and sets the default values. +func NewUser()(*User) { + m := &User{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUser(), nil +} +// GetActive gets the active property value. Whether the user active in the IdP. +// returns a *bool when successful +func (m *User) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *User) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. A human-readable name for the user. +// returns a *string when successful +func (m *User) GetDisplayName()(*string) { + return m.displayName +} +// GetEmails gets the emails property value. The emails for the user. +// returns a []Usersable when successful +func (m *User) GetEmails()([]Usersable) { + return m.emails +} +// GetExternalId gets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +// returns a *string when successful +func (m *User) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *User) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Usersable) + } + } + m.SetEmails(res) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetName(val.(UserNameable)) + } + return nil + } + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Usersable) + } + } + m.SetRoles(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseUser_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]User_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*User_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a UserNameable when successful +func (m *User) GetName()(UserNameable) { + return m.name +} +// GetRoles gets the roles property value. The roles assigned to the user. +// returns a []Usersable when successful +func (m *User) GetRoles()([]Usersable) { + return m.roles +} +// GetSchemas gets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +// returns a []User_schemas when successful +func (m *User) GetSchemas()([]User_schemas) { + return m.schemas +} +// GetUserName gets the userName property value. The username for the user. +// returns a *string when successful +func (m *User) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *User) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoles())) + for i, v := range m.GetRoles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("roles", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializeUser_schemas(m.GetSchemas())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Whether the user active in the IdP. +func (m *User) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *User) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. A human-readable name for the user. +func (m *User) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmails sets the emails property value. The emails for the user. +func (m *User) SetEmails(value []Usersable)() { + m.emails = value +} +// SetExternalId sets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +func (m *User) SetExternalId(value *string)() { + m.externalId = value +} +// SetName sets the name property value. The name property +func (m *User) SetName(value UserNameable)() { + m.name = value +} +// SetRoles sets the roles property value. The roles assigned to the user. +func (m *User) SetRoles(value []Usersable)() { + m.roles = value +} +// SetSchemas sets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +func (m *User) SetSchemas(value []User_schemas)() { + m.schemas = value +} +// SetUserName sets the userName property value. The username for the user. +func (m *User) SetUserName(value *string)() { + m.userName = value +} +type Userable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetDisplayName()(*string) + GetEmails()([]Usersable) + GetExternalId()(*string) + GetName()(UserNameable) + GetRoles()([]Usersable) + GetSchemas()([]User_schemas) + GetUserName()(*string) + SetActive(value *bool)() + SetDisplayName(value *string)() + SetEmails(value []Usersable)() + SetExternalId(value *string)() + SetName(value UserNameable)() + SetRoles(value []Usersable)() + SetSchemas(value []User_schemas)() + SetUserName(value *string)() +} diff --git a/pkg/github/models/user_marketplace_purchase.go b/pkg/github/models/user_marketplace_purchase.go new file mode 100644 index 0000000..f889d32 --- /dev/null +++ b/pkg/github/models/user_marketplace_purchase.go @@ -0,0 +1,285 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserMarketplacePurchase user Marketplace Purchase +type UserMarketplacePurchase struct { + // The account property + account MarketplaceAccountable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The billing_cycle property + billing_cycle *string + // The free_trial_ends_on property + free_trial_ends_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The next_billing_date property + next_billing_date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The on_free_trial property + on_free_trial *bool + // Marketplace Listing Plan + plan MarketplaceListingPlanable + // The unit_count property + unit_count *int32 + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewUserMarketplacePurchase instantiates a new UserMarketplacePurchase and sets the default values. +func NewUserMarketplacePurchase()(*UserMarketplacePurchase) { + m := &UserMarketplacePurchase{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserMarketplacePurchaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserMarketplacePurchaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserMarketplacePurchase(), nil +} +// GetAccount gets the account property value. The account property +// returns a MarketplaceAccountable when successful +func (m *UserMarketplacePurchase) GetAccount()(MarketplaceAccountable) { + return m.account +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserMarketplacePurchase) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillingCycle gets the billing_cycle property value. The billing_cycle property +// returns a *string when successful +func (m *UserMarketplacePurchase) GetBillingCycle()(*string) { + return m.billing_cycle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserMarketplacePurchase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMarketplaceAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(MarketplaceAccountable)) + } + return nil + } + res["billing_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillingCycle(val) + } + return nil + } + res["free_trial_ends_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFreeTrialEndsOn(val) + } + return nil + } + res["next_billing_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetNextBillingDate(val) + } + return nil + } + res["on_free_trial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnFreeTrial(val) + } + return nil + } + res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMarketplaceListingPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlan(val.(MarketplaceListingPlanable)) + } + return nil + } + res["unit_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitCount(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetFreeTrialEndsOn gets the free_trial_ends_on property value. The free_trial_ends_on property +// returns a *Time when successful +func (m *UserMarketplacePurchase) GetFreeTrialEndsOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.free_trial_ends_on +} +// GetNextBillingDate gets the next_billing_date property value. The next_billing_date property +// returns a *Time when successful +func (m *UserMarketplacePurchase) GetNextBillingDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.next_billing_date +} +// GetOnFreeTrial gets the on_free_trial property value. The on_free_trial property +// returns a *bool when successful +func (m *UserMarketplacePurchase) GetOnFreeTrial()(*bool) { + return m.on_free_trial +} +// GetPlan gets the plan property value. Marketplace Listing Plan +// returns a MarketplaceListingPlanable when successful +func (m *UserMarketplacePurchase) GetPlan()(MarketplaceListingPlanable) { + return m.plan +} +// GetUnitCount gets the unit_count property value. The unit_count property +// returns a *int32 when successful +func (m *UserMarketplacePurchase) GetUnitCount()(*int32) { + return m.unit_count +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *UserMarketplacePurchase) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *UserMarketplacePurchase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("billing_cycle", m.GetBillingCycle()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("free_trial_ends_on", m.GetFreeTrialEndsOn()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("next_billing_date", m.GetNextBillingDate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("on_free_trial", m.GetOnFreeTrial()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("plan", m.GetPlan()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unit_count", m.GetUnitCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *UserMarketplacePurchase) SetAccount(value MarketplaceAccountable)() { + m.account = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserMarketplacePurchase) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillingCycle sets the billing_cycle property value. The billing_cycle property +func (m *UserMarketplacePurchase) SetBillingCycle(value *string)() { + m.billing_cycle = value +} +// SetFreeTrialEndsOn sets the free_trial_ends_on property value. The free_trial_ends_on property +func (m *UserMarketplacePurchase) SetFreeTrialEndsOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.free_trial_ends_on = value +} +// SetNextBillingDate sets the next_billing_date property value. The next_billing_date property +func (m *UserMarketplacePurchase) SetNextBillingDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.next_billing_date = value +} +// SetOnFreeTrial sets the on_free_trial property value. The on_free_trial property +func (m *UserMarketplacePurchase) SetOnFreeTrial(value *bool)() { + m.on_free_trial = value +} +// SetPlan sets the plan property value. Marketplace Listing Plan +func (m *UserMarketplacePurchase) SetPlan(value MarketplaceListingPlanable)() { + m.plan = value +} +// SetUnitCount sets the unit_count property value. The unit_count property +func (m *UserMarketplacePurchase) SetUnitCount(value *int32)() { + m.unit_count = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *UserMarketplacePurchase) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type UserMarketplacePurchaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(MarketplaceAccountable) + GetBillingCycle()(*string) + GetFreeTrialEndsOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNextBillingDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnFreeTrial()(*bool) + GetPlan()(MarketplaceListingPlanable) + GetUnitCount()(*int32) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccount(value MarketplaceAccountable)() + SetBillingCycle(value *string)() + SetFreeTrialEndsOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNextBillingDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnFreeTrial(value *bool)() + SetPlan(value MarketplaceListingPlanable)() + SetUnitCount(value *int32)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/user_name.go b/pkg/github/models/user_name.go new file mode 100644 index 0000000..9eaabfa --- /dev/null +++ b/pkg/github/models/user_name.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type UserName struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The family name of the user. + familyName *string + // The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. + formatted *string + // The given name of the user. + givenName *string + // The middle name(s) of the user. + middleName *string +} +// NewUserName instantiates a new UserName and sets the default values. +func NewUserName()(*UserName) { + m := &UserName{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserNameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserNameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserName(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserName) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFamilyName gets the familyName property value. The family name of the user. +// returns a *string when successful +func (m *UserName) GetFamilyName()(*string) { + return m.familyName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserName) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["familyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamilyName(val) + } + return nil + } + res["formatted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormatted(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["middleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddleName(val) + } + return nil + } + return res +} +// GetFormatted gets the formatted property value. The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. +// returns a *string when successful +func (m *UserName) GetFormatted()(*string) { + return m.formatted +} +// GetGivenName gets the givenName property value. The given name of the user. +// returns a *string when successful +func (m *UserName) GetGivenName()(*string) { + return m.givenName +} +// GetMiddleName gets the middleName property value. The middle name(s) of the user. +// returns a *string when successful +func (m *UserName) GetMiddleName()(*string) { + return m.middleName +} +// Serialize serializes information the current object +func (m *UserName) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("familyName", m.GetFamilyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formatted", m.GetFormatted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("middleName", m.GetMiddleName()) + 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 *UserName) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFamilyName sets the familyName property value. The family name of the user. +func (m *UserName) SetFamilyName(value *string)() { + m.familyName = value +} +// SetFormatted sets the formatted property value. The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. +func (m *UserName) SetFormatted(value *string)() { + m.formatted = value +} +// SetGivenName sets the givenName property value. The given name of the user. +func (m *UserName) SetGivenName(value *string)() { + m.givenName = value +} +// SetMiddleName sets the middleName property value. The middle name(s) of the user. +func (m *UserName) SetMiddleName(value *string)() { + m.middleName = value +} +type UserNameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFamilyName()(*string) + GetFormatted()(*string) + GetGivenName()(*string) + GetMiddleName()(*string) + SetFamilyName(value *string)() + SetFormatted(value *string)() + SetGivenName(value *string)() + SetMiddleName(value *string)() +} diff --git a/pkg/github/models/user_name_response.go b/pkg/github/models/user_name_response.go new file mode 100644 index 0000000..d72fe61 --- /dev/null +++ b/pkg/github/models/user_name_response.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type UserNameResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The family name of the user. + familyName *string + // The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. + formatted *string + // The given name of the user. + givenName *string + // The middle name(s) of the user. + middleName *string +} +// NewUserNameResponse instantiates a new UserNameResponse and sets the default values. +func NewUserNameResponse()(*UserNameResponse) { + m := &UserNameResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserNameResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserNameResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserNameResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserNameResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFamilyName gets the familyName property value. The family name of the user. +// returns a *string when successful +func (m *UserNameResponse) GetFamilyName()(*string) { + return m.familyName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserNameResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["familyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamilyName(val) + } + return nil + } + res["formatted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormatted(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["middleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddleName(val) + } + return nil + } + return res +} +// GetFormatted gets the formatted property value. The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. +// returns a *string when successful +func (m *UserNameResponse) GetFormatted()(*string) { + return m.formatted +} +// GetGivenName gets the givenName property value. The given name of the user. +// returns a *string when successful +func (m *UserNameResponse) GetGivenName()(*string) { + return m.givenName +} +// GetMiddleName gets the middleName property value. The middle name(s) of the user. +// returns a *string when successful +func (m *UserNameResponse) GetMiddleName()(*string) { + return m.middleName +} +// Serialize serializes information the current object +func (m *UserNameResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("familyName", m.GetFamilyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formatted", m.GetFormatted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("middleName", m.GetMiddleName()) + 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 *UserNameResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFamilyName sets the familyName property value. The family name of the user. +func (m *UserNameResponse) SetFamilyName(value *string)() { + m.familyName = value +} +// SetFormatted sets the formatted property value. The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. +func (m *UserNameResponse) SetFormatted(value *string)() { + m.formatted = value +} +// SetGivenName sets the givenName property value. The given name of the user. +func (m *UserNameResponse) SetGivenName(value *string)() { + m.givenName = value +} +// SetMiddleName sets the middleName property value. The middle name(s) of the user. +func (m *UserNameResponse) SetMiddleName(value *string)() { + m.middleName = value +} +type UserNameResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFamilyName()(*string) + GetFormatted()(*string) + GetGivenName()(*string) + GetMiddleName()(*string) + SetFamilyName(value *string)() + SetFormatted(value *string)() + SetGivenName(value *string)() + SetMiddleName(value *string)() +} diff --git a/pkg/github/models/user_response.go b/pkg/github/models/user_response.go new file mode 100644 index 0000000..ec8e7d8 --- /dev/null +++ b/pkg/github/models/user_response.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type UserResponse struct { + // Whether the user active in the IdP. + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A human-readable name for the user. + displayName *string + // The emails for the user. + emails []Usersable + // A unique identifier for the resource as defined by the provisioning client. + externalId *string + // The name property + name UserNameResponseable + // The roles assigned to the user. + roles []Usersable + // The URIs that are used to indicate the namespaces of the SCIM schemas. + schemas []UserResponse_schemas + // The username for the user. + userName *string +} +// NewUserResponse instantiates a new UserResponse and sets the default values. +func NewUserResponse()(*UserResponse) { + m := &UserResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserResponse(), nil +} +// GetActive gets the active property value. Whether the user active in the IdP. +// returns a *bool when successful +func (m *UserResponse) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. A human-readable name for the user. +// returns a *string when successful +func (m *UserResponse) GetDisplayName()(*string) { + return m.displayName +} +// GetEmails gets the emails property value. The emails for the user. +// returns a []Usersable when successful +func (m *UserResponse) GetEmails()([]Usersable) { + return m.emails +} +// GetExternalId gets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +// returns a *string when successful +func (m *UserResponse) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Usersable) + } + } + m.SetEmails(res) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserNameResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetName(val.(UserNameResponseable)) + } + return nil + } + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Usersable) + } + } + m.SetRoles(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseUserResponse_schemas) + if err != nil { + return err + } + if val != nil { + res := make([]UserResponse_schemas, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*UserResponse_schemas)) + } + } + m.SetSchemas(res) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a UserNameResponseable when successful +func (m *UserResponse) GetName()(UserNameResponseable) { + return m.name +} +// GetRoles gets the roles property value. The roles assigned to the user. +// returns a []Usersable when successful +func (m *UserResponse) GetRoles()([]Usersable) { + return m.roles +} +// GetSchemas gets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +// returns a []UserResponse_schemas when successful +func (m *UserResponse) GetSchemas()([]UserResponse_schemas) { + return m.schemas +} +// GetUserName gets the userName property value. The username for the user. +// returns a *string when successful +func (m *UserResponse) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *UserResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoles())) + for i, v := range m.GetRoles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("roles", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", SerializeUserResponse_schemas(m.GetSchemas())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Whether the user active in the IdP. +func (m *UserResponse) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. A human-readable name for the user. +func (m *UserResponse) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmails sets the emails property value. The emails for the user. +func (m *UserResponse) SetEmails(value []Usersable)() { + m.emails = value +} +// SetExternalId sets the externalId property value. A unique identifier for the resource as defined by the provisioning client. +func (m *UserResponse) SetExternalId(value *string)() { + m.externalId = value +} +// SetName sets the name property value. The name property +func (m *UserResponse) SetName(value UserNameResponseable)() { + m.name = value +} +// SetRoles sets the roles property value. The roles assigned to the user. +func (m *UserResponse) SetRoles(value []Usersable)() { + m.roles = value +} +// SetSchemas sets the schemas property value. The URIs that are used to indicate the namespaces of the SCIM schemas. +func (m *UserResponse) SetSchemas(value []UserResponse_schemas)() { + m.schemas = value +} +// SetUserName sets the userName property value. The username for the user. +func (m *UserResponse) SetUserName(value *string)() { + m.userName = value +} +type UserResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetDisplayName()(*string) + GetEmails()([]Usersable) + GetExternalId()(*string) + GetName()(UserNameResponseable) + GetRoles()([]Usersable) + GetSchemas()([]UserResponse_schemas) + GetUserName()(*string) + SetActive(value *bool)() + SetDisplayName(value *string)() + SetEmails(value []Usersable)() + SetExternalId(value *string)() + SetName(value UserNameResponseable)() + SetRoles(value []Usersable)() + SetSchemas(value []UserResponse_schemas)() + SetUserName(value *string)() +} diff --git a/pkg/github/models/user_response_schemas.go b/pkg/github/models/user_response_schemas.go new file mode 100644 index 0000000..78ead0d --- /dev/null +++ b/pkg/github/models/user_response_schemas.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type UserResponse_schemas int + +const ( + URNIETFPARAMSSCIMSCHEMASCORE20USER_USERRESPONSE_SCHEMAS UserResponse_schemas = iota +) + +func (i UserResponse_schemas) String() string { + return []string{"urn:ietf:params:scim:schemas:core:2.0:User"}[i] +} +func ParseUserResponse_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMSCHEMASCORE20USER_USERRESPONSE_SCHEMAS + switch v { + case "urn:ietf:params:scim:schemas:core:2.0:User": + result = URNIETFPARAMSSCIMSCHEMASCORE20USER_USERRESPONSE_SCHEMAS + default: + return 0, errors.New("Unknown UserResponse_schemas value: " + v) + } + return &result, nil +} +func SerializeUserResponse_schemas(values []UserResponse_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i UserResponse_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/user_role_assignment.go b/pkg/github/models/user_role_assignment.go new file mode 100644 index 0000000..245e345 --- /dev/null +++ b/pkg/github/models/user_role_assignment.go @@ -0,0 +1,661 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserRoleAssignment the Relationship a User has with a role. +type UserRoleAssignment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The email property + email *string + // The events_url property + events_url *string + // The followers_url property + followers_url *string + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The html_url property + html_url *string + // The id property + id *int32 + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The site_admin property + site_admin *bool + // The starred_at property + starred_at *string + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The type property + typeEscaped *string + // The url property + url *string +} +// NewUserRoleAssignment instantiates a new UserRoleAssignment and sets the default values. +func NewUserRoleAssignment()(*UserRoleAssignment) { + m := &UserRoleAssignment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserRoleAssignment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserRoleAssignment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *UserRoleAssignment) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredAt(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *UserRoleAssignment) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *UserRoleAssignment) GetId()(*int32) { + return m.id +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *UserRoleAssignment) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *UserRoleAssignment) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *UserRoleAssignment) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetReposUrl()(*string) { + return m.repos_url +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *UserRoleAssignment) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredAt gets the starred_at property value. The starred_at property +// returns a *string when successful +func (m *UserRoleAssignment) GetStarredAt()(*string) { + return m.starred_at +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *UserRoleAssignment) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *UserRoleAssignment) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *UserRoleAssignment) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_at", m.GetStarredAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.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 *UserRoleAssignment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *UserRoleAssignment) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetEmail sets the email property value. The email property +func (m *UserRoleAssignment) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *UserRoleAssignment) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *UserRoleAssignment) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *UserRoleAssignment) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *UserRoleAssignment) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *UserRoleAssignment) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *UserRoleAssignment) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *UserRoleAssignment) SetId(value *int32)() { + m.id = value +} +// SetLogin sets the login property value. The login property +func (m *UserRoleAssignment) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *UserRoleAssignment) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *UserRoleAssignment) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *UserRoleAssignment) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *UserRoleAssignment) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *UserRoleAssignment) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *UserRoleAssignment) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredAt sets the starred_at property value. The starred_at property +func (m *UserRoleAssignment) SetStarredAt(value *string)() { + m.starred_at = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *UserRoleAssignment) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *UserRoleAssignment) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *UserRoleAssignment) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUrl sets the url property value. The url property +func (m *UserRoleAssignment) SetUrl(value *string)() { + m.url = value +} +type UserRoleAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowersUrl()(*string) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetSiteAdmin()(*bool) + GetStarredAt()(*string) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetTypeEscaped()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowersUrl(value *string)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetSiteAdmin(value *bool)() + SetStarredAt(value *string)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetTypeEscaped(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/user_schemas.go b/pkg/github/models/user_schemas.go new file mode 100644 index 0000000..c1ea578 --- /dev/null +++ b/pkg/github/models/user_schemas.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type User_schemas int + +const ( + URNIETFPARAMSSCIMSCHEMASCORE20USER_USER_SCHEMAS User_schemas = iota +) + +func (i User_schemas) String() string { + return []string{"urn:ietf:params:scim:schemas:core:2.0:User"}[i] +} +func ParseUser_schemas(v string) (any, error) { + result := URNIETFPARAMSSCIMSCHEMASCORE20USER_USER_SCHEMAS + switch v { + case "urn:ietf:params:scim:schemas:core:2.0:User": + result = URNIETFPARAMSSCIMSCHEMASCORE20USER_USER_SCHEMAS + default: + return 0, errors.New("Unknown User_schemas value: " + v) + } + return &result, nil +} +func SerializeUser_schemas(values []User_schemas) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i User_schemas) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/user_search_result_item.go b/pkg/github/models/user_search_result_item.go new file mode 100644 index 0000000..3e393cb --- /dev/null +++ b/pkg/github/models/user_search_result_item.go @@ -0,0 +1,1051 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserSearchResultItem user Search Result Item +type UserSearchResultItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The avatar_url property + avatar_url *string + // The bio property + bio *string + // The blog property + blog *string + // The company property + company *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The email property + email *string + // The events_url property + events_url *string + // The followers property + followers *int32 + // The followers_url property + followers_url *string + // The following property + following *int32 + // The following_url property + following_url *string + // The gists_url property + gists_url *string + // The gravatar_id property + gravatar_id *string + // The hireable property + hireable *bool + // The html_url property + html_url *string + // The id property + id *int64 + // The location property + location *string + // The login property + login *string + // The name property + name *string + // The node_id property + node_id *string + // The organizations_url property + organizations_url *string + // The public_gists property + public_gists *int32 + // The public_repos property + public_repos *int32 + // The received_events_url property + received_events_url *string + // The repos_url property + repos_url *string + // The score property + score *float64 + // The site_admin property + site_admin *bool + // The starred_url property + starred_url *string + // The subscriptions_url property + subscriptions_url *string + // The suspended_at property + suspended_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The text_matches property + text_matches []Usersable + // The type property + typeEscaped *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewUserSearchResultItem instantiates a new UserSearchResultItem and sets the default values. +func NewUserSearchResultItem()(*UserSearchResultItem) { + m := &UserSearchResultItem{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserSearchResultItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserSearchResultItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserSearchResultItem(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserSearchResultItem) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetBio gets the bio property value. The bio property +// returns a *string when successful +func (m *UserSearchResultItem) GetBio()(*string) { + return m.bio +} +// GetBlog gets the blog property value. The blog property +// returns a *string when successful +func (m *UserSearchResultItem) GetBlog()(*string) { + return m.blog +} +// GetCompany gets the company property value. The company property +// returns a *string when successful +func (m *UserSearchResultItem) GetCompany()(*string) { + return m.company +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *UserSearchResultItem) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetEmail gets the email property value. The email property +// returns a *string when successful +func (m *UserSearchResultItem) GetEmail()(*string) { + return m.email +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["bio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBio(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowers(val) + } + return nil + } + res["followers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowersUrl(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFollowing(val) + } + return nil + } + res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFollowingUrl(val) + } + return nil + } + res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGistsUrl(val) + } + return nil + } + res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGravatarId(val) + } + return nil + } + res["hireable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHireable(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationsUrl(val) + } + return nil + } + res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicGists(val) + } + return nil + } + res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPublicRepos(val) + } + return nil + } + res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedEventsUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(val) + } + return nil + } + res["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + res["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteAdmin(val) + } + return nil + } + res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStarredUrl(val) + } + return nil + } + res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionsUrl(val) + } + return nil + } + res["suspended_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSuspendedAt(val) + } + return nil + } + res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Usersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Usersable) + } + } + m.SetTextMatches(res) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFollowers gets the followers property value. The followers property +// returns a *int32 when successful +func (m *UserSearchResultItem) GetFollowers()(*int32) { + return m.followers +} +// GetFollowersUrl gets the followers_url property value. The followers_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetFollowersUrl()(*string) { + return m.followers_url +} +// GetFollowing gets the following property value. The following property +// returns a *int32 when successful +func (m *UserSearchResultItem) GetFollowing()(*int32) { + return m.following +} +// GetFollowingUrl gets the following_url property value. The following_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetFollowingUrl()(*string) { + return m.following_url +} +// GetGistsUrl gets the gists_url property value. The gists_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetGistsUrl()(*string) { + return m.gists_url +} +// GetGravatarId gets the gravatar_id property value. The gravatar_id property +// returns a *string when successful +func (m *UserSearchResultItem) GetGravatarId()(*string) { + return m.gravatar_id +} +// GetHireable gets the hireable property value. The hireable property +// returns a *bool when successful +func (m *UserSearchResultItem) GetHireable()(*bool) { + return m.hireable +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int64 when successful +func (m *UserSearchResultItem) GetId()(*int64) { + return m.id +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *UserSearchResultItem) GetLocation()(*string) { + return m.location +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *UserSearchResultItem) GetLogin()(*string) { + return m.login +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *UserSearchResultItem) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *UserSearchResultItem) GetNodeId()(*string) { + return m.node_id +} +// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetOrganizationsUrl()(*string) { + return m.organizations_url +} +// GetPublicGists gets the public_gists property value. The public_gists property +// returns a *int32 when successful +func (m *UserSearchResultItem) GetPublicGists()(*int32) { + return m.public_gists +} +// GetPublicRepos gets the public_repos property value. The public_repos property +// returns a *int32 when successful +func (m *UserSearchResultItem) GetPublicRepos()(*int32) { + return m.public_repos +} +// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetReceivedEventsUrl()(*string) { + return m.received_events_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetReposUrl()(*string) { + return m.repos_url +} +// GetScore gets the score property value. The score property +// returns a *float64 when successful +func (m *UserSearchResultItem) GetScore()(*float64) { + return m.score +} +// GetSiteAdmin gets the site_admin property value. The site_admin property +// returns a *bool when successful +func (m *UserSearchResultItem) GetSiteAdmin()(*bool) { + return m.site_admin +} +// GetStarredUrl gets the starred_url property value. The starred_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetStarredUrl()(*string) { + return m.starred_url +} +// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property +// returns a *string when successful +func (m *UserSearchResultItem) GetSubscriptionsUrl()(*string) { + return m.subscriptions_url +} +// GetSuspendedAt gets the suspended_at property value. The suspended_at property +// returns a *Time when successful +func (m *UserSearchResultItem) GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.suspended_at +} +// GetTextMatches gets the text_matches property value. The text_matches property +// returns a []Usersable when successful +func (m *UserSearchResultItem) GetTextMatches()([]Usersable) { + return m.text_matches +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *UserSearchResultItem) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *UserSearchResultItem) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *UserSearchResultItem) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *UserSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bio", m.GetBio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("followers", m.GetFollowers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("following", m.GetFollowing()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hireable", m.GetHireable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("suspended_at", m.GetSuspendedAt()) + if err != nil { + return err + } + } + if m.GetTextMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) + for i, v := range m.GetTextMatches() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("text_matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserSearchResultItem) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *UserSearchResultItem) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetBio sets the bio property value. The bio property +func (m *UserSearchResultItem) SetBio(value *string)() { + m.bio = value +} +// SetBlog sets the blog property value. The blog property +func (m *UserSearchResultItem) SetBlog(value *string)() { + m.blog = value +} +// SetCompany sets the company property value. The company property +func (m *UserSearchResultItem) SetCompany(value *string)() { + m.company = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *UserSearchResultItem) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetEmail sets the email property value. The email property +func (m *UserSearchResultItem) SetEmail(value *string)() { + m.email = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *UserSearchResultItem) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetFollowers sets the followers property value. The followers property +func (m *UserSearchResultItem) SetFollowers(value *int32)() { + m.followers = value +} +// SetFollowersUrl sets the followers_url property value. The followers_url property +func (m *UserSearchResultItem) SetFollowersUrl(value *string)() { + m.followers_url = value +} +// SetFollowing sets the following property value. The following property +func (m *UserSearchResultItem) SetFollowing(value *int32)() { + m.following = value +} +// SetFollowingUrl sets the following_url property value. The following_url property +func (m *UserSearchResultItem) SetFollowingUrl(value *string)() { + m.following_url = value +} +// SetGistsUrl sets the gists_url property value. The gists_url property +func (m *UserSearchResultItem) SetGistsUrl(value *string)() { + m.gists_url = value +} +// SetGravatarId sets the gravatar_id property value. The gravatar_id property +func (m *UserSearchResultItem) SetGravatarId(value *string)() { + m.gravatar_id = value +} +// SetHireable sets the hireable property value. The hireable property +func (m *UserSearchResultItem) SetHireable(value *bool)() { + m.hireable = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *UserSearchResultItem) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *UserSearchResultItem) SetId(value *int64)() { + m.id = value +} +// SetLocation sets the location property value. The location property +func (m *UserSearchResultItem) SetLocation(value *string)() { + m.location = value +} +// SetLogin sets the login property value. The login property +func (m *UserSearchResultItem) SetLogin(value *string)() { + m.login = value +} +// SetName sets the name property value. The name property +func (m *UserSearchResultItem) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *UserSearchResultItem) SetNodeId(value *string)() { + m.node_id = value +} +// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property +func (m *UserSearchResultItem) SetOrganizationsUrl(value *string)() { + m.organizations_url = value +} +// SetPublicGists sets the public_gists property value. The public_gists property +func (m *UserSearchResultItem) SetPublicGists(value *int32)() { + m.public_gists = value +} +// SetPublicRepos sets the public_repos property value. The public_repos property +func (m *UserSearchResultItem) SetPublicRepos(value *int32)() { + m.public_repos = value +} +// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property +func (m *UserSearchResultItem) SetReceivedEventsUrl(value *string)() { + m.received_events_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *UserSearchResultItem) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetScore sets the score property value. The score property +func (m *UserSearchResultItem) SetScore(value *float64)() { + m.score = value +} +// SetSiteAdmin sets the site_admin property value. The site_admin property +func (m *UserSearchResultItem) SetSiteAdmin(value *bool)() { + m.site_admin = value +} +// SetStarredUrl sets the starred_url property value. The starred_url property +func (m *UserSearchResultItem) SetStarredUrl(value *string)() { + m.starred_url = value +} +// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property +func (m *UserSearchResultItem) SetSubscriptionsUrl(value *string)() { + m.subscriptions_url = value +} +// SetSuspendedAt sets the suspended_at property value. The suspended_at property +func (m *UserSearchResultItem) SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.suspended_at = value +} +// SetTextMatches sets the text_matches property value. The text_matches property +func (m *UserSearchResultItem) SetTextMatches(value []Usersable)() { + m.text_matches = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *UserSearchResultItem) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *UserSearchResultItem) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *UserSearchResultItem) SetUrl(value *string)() { + m.url = value +} +type UserSearchResultItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetBio()(*string) + GetBlog()(*string) + GetCompany()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetEventsUrl()(*string) + GetFollowers()(*int32) + GetFollowersUrl()(*string) + GetFollowing()(*int32) + GetFollowingUrl()(*string) + GetGistsUrl()(*string) + GetGravatarId()(*string) + GetHireable()(*bool) + GetHtmlUrl()(*string) + GetId()(*int64) + GetLocation()(*string) + GetLogin()(*string) + GetName()(*string) + GetNodeId()(*string) + GetOrganizationsUrl()(*string) + GetPublicGists()(*int32) + GetPublicRepos()(*int32) + GetReceivedEventsUrl()(*string) + GetReposUrl()(*string) + GetScore()(*float64) + GetSiteAdmin()(*bool) + GetStarredUrl()(*string) + GetSubscriptionsUrl()(*string) + GetSuspendedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTextMatches()([]Usersable) + GetTypeEscaped()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetBio(value *string)() + SetBlog(value *string)() + SetCompany(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetEventsUrl(value *string)() + SetFollowers(value *int32)() + SetFollowersUrl(value *string)() + SetFollowing(value *int32)() + SetFollowingUrl(value *string)() + SetGistsUrl(value *string)() + SetGravatarId(value *string)() + SetHireable(value *bool)() + SetHtmlUrl(value *string)() + SetId(value *int64)() + SetLocation(value *string)() + SetLogin(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetOrganizationsUrl(value *string)() + SetPublicGists(value *int32)() + SetPublicRepos(value *int32)() + SetReceivedEventsUrl(value *string)() + SetReposUrl(value *string)() + SetScore(value *float64)() + SetSiteAdmin(value *bool)() + SetStarredUrl(value *string)() + SetSubscriptionsUrl(value *string)() + SetSuspendedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTextMatches(value []Usersable)() + SetTypeEscaped(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/users.go b/pkg/github/models/users.go new file mode 100644 index 0000000..cf42c03 --- /dev/null +++ b/pkg/github/models/users.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Users struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether this email address is the primary address. + primary *bool + // The type of email address. + typeEscaped *string + // The email address. + value *string +} +// NewUsers instantiates a new Users and sets the default values. +func NewUsers()(*Users) { + m := &Users{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUsersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUsersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUsers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Users) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetPrimary gets the primary property value. Whether this email address is the primary address. +// returns a *bool when successful +func (m *Users) GetPrimary()(*bool) { + return m.primary +} +// GetTypeEscaped gets the type property value. The type of email address. +// returns a *string when successful +func (m *Users) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetValue gets the value property value. The email address. +// returns a *string when successful +func (m *Users) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("primary", m.GetPrimary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Users) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPrimary sets the primary property value. Whether this email address is the primary address. +func (m *Users) SetPrimary(value *bool)() { + m.primary = value +} +// SetTypeEscaped sets the type property value. The type of email address. +func (m *Users) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The email address. +func (m *Users) SetValue(value *string)() { + m.value = value +} +type Usersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrimary()(*bool) + GetTypeEscaped()(*string) + GetValue()(*string) + SetPrimary(value *bool)() + SetTypeEscaped(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/models/users503_error.go b/pkg/github/models/users503_error.go new file mode 100644 index 0000000..02d5fad --- /dev/null +++ b/pkg/github/models/users503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Users503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewUsers503Error instantiates a new Users503Error and sets the default values. +func NewUsers503Error()(*Users503Error) { + m := &Users503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUsers503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUsers503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUsers503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *Users503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Users503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *Users503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *Users503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Users503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *Users503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *Users503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Users503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *Users503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *Users503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *Users503Error) SetMessage(value *string)() { + m.message = value +} +type Users503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/validation_error.go b/pkg/github/models/validation_error.go new file mode 100644 index 0000000..1c94877 --- /dev/null +++ b/pkg/github/models/validation_error.go @@ -0,0 +1,159 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ValidationError validation Error +type ValidationError 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 errors property + errors []ValidationError_errorsable + // The message property + message *string +} +// NewValidationError instantiates a new ValidationError and sets the default values. +func NewValidationError()(*ValidationError) { + m := &ValidationError{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateValidationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateValidationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewValidationError(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ValidationError) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ValidationError) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ValidationError) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []ValidationError_errorsable when successful +func (m *ValidationError) GetErrors()([]ValidationError_errorsable) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ValidationError) 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["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateValidationError_errorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ValidationError_errorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ValidationError_errorsable) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ValidationError) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ValidationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("errors", cast) + 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 *ValidationError) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ValidationError) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ValidationError) SetErrors(value []ValidationError_errorsable)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ValidationError) SetMessage(value *string)() { + m.message = value +} +type ValidationErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetErrors()([]ValidationError_errorsable) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetErrors(value []ValidationError_errorsable)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/validation_error_errors.go b/pkg/github/models/validation_error_errors.go new file mode 100644 index 0000000..25a901d --- /dev/null +++ b/pkg/github/models/validation_error_errors.go @@ -0,0 +1,319 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ValidationError_errors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The field property + field *string + // The index property + index *int32 + // The message property + message *string + // The resource property + resource *string + // The value property + value ValidationError_errors_ValidationError_errors_valueable +} +// ValidationError_errors_ValidationError_errors_value composed type wrapper for classes int32, string +type ValidationError_errors_ValidationError_errors_value struct { + // Composed type representation for type int32 + integer *int32 + // Composed type representation for type string + string *string +} +// NewValidationError_errors_ValidationError_errors_value instantiates a new ValidationError_errors_ValidationError_errors_value and sets the default values. +func NewValidationError_errors_ValidationError_errors_value()(*ValidationError_errors_ValidationError_errors_value) { + m := &ValidationError_errors_ValidationError_errors_value{ + } + return m +} +// CreateValidationError_errors_ValidationError_errors_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateValidationError_errors_ValidationError_errors_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewValidationError_errors_ValidationError_errors_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetInt32Value(); val != nil { + if err != nil { + return nil, err + } + result.SetInteger(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ValidationError_errors_ValidationError_errors_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetInteger gets the integer property value. Composed type representation for type int32 +// returns a *int32 when successful +func (m *ValidationError_errors_ValidationError_errors_value) GetInteger()(*int32) { + return m.integer +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ValidationError_errors_ValidationError_errors_value) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ValidationError_errors_ValidationError_errors_value) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ValidationError_errors_ValidationError_errors_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInteger() != nil { + err := writer.WriteInt32Value("", m.GetInteger()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetInteger sets the integer property value. Composed type representation for type int32 +func (m *ValidationError_errors_ValidationError_errors_value) SetInteger(value *int32)() { + m.integer = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ValidationError_errors_ValidationError_errors_value) SetString(value *string)() { + m.string = value +} +type ValidationError_errors_ValidationError_errors_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInteger()(*int32) + GetString()(*string) + SetInteger(value *int32)() + SetString(value *string)() +} +// NewValidationError_errors instantiates a new ValidationError_errors and sets the default values. +func NewValidationError_errors()(*ValidationError_errors) { + m := &ValidationError_errors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateValidationError_errorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateValidationError_errorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewValidationError_errors(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ValidationError_errors) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *ValidationError_errors) GetCode()(*string) { + return m.code +} +// GetField gets the field property value. The field property +// returns a *string when successful +func (m *ValidationError_errors) GetField()(*string) { + return m.field +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ValidationError_errors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["field"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetField(val) + } + return nil + } + res["index"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIndex(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 + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateValidationError_errors_ValidationError_errors_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(ValidationError_errors_ValidationError_errors_valueable)) + } + return nil + } + return res +} +// GetIndex gets the index property value. The index property +// returns a *int32 when successful +func (m *ValidationError_errors) GetIndex()(*int32) { + return m.index +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ValidationError_errors) GetMessage()(*string) { + return m.message +} +// GetResource gets the resource property value. The resource property +// returns a *string when successful +func (m *ValidationError_errors) GetResource()(*string) { + return m.resource +} +// GetValue gets the value property value. The value property +// returns a ValidationError_errors_ValidationError_errors_valueable when successful +func (m *ValidationError_errors) GetValue()(ValidationError_errors_ValidationError_errors_valueable) { + return m.value +} +// Serialize serializes information the current object +func (m *ValidationError_errors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("field", m.GetField()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("index", m.GetIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("value", m.GetValue()) + 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 *ValidationError_errors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ValidationError_errors) SetCode(value *string)() { + m.code = value +} +// SetField sets the field property value. The field property +func (m *ValidationError_errors) SetField(value *string)() { + m.field = value +} +// SetIndex sets the index property value. The index property +func (m *ValidationError_errors) SetIndex(value *int32)() { + m.index = value +} +// SetMessage sets the message property value. The message property +func (m *ValidationError_errors) SetMessage(value *string)() { + m.message = value +} +// SetResource sets the resource property value. The resource property +func (m *ValidationError_errors) SetResource(value *string)() { + m.resource = value +} +// SetValue sets the value property value. The value property +func (m *ValidationError_errors) SetValue(value ValidationError_errors_ValidationError_errors_valueable)() { + m.value = value +} +type ValidationError_errorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetField()(*string) + GetIndex()(*int32) + GetMessage()(*string) + GetResource()(*string) + GetValue()(ValidationError_errors_ValidationError_errors_valueable) + SetCode(value *string)() + SetField(value *string)() + SetIndex(value *int32)() + SetMessage(value *string)() + SetResource(value *string)() + SetValue(value ValidationError_errors_ValidationError_errors_valueable)() +} diff --git a/pkg/github/models/validation_error_simple.go b/pkg/github/models/validation_error_simple.go new file mode 100644 index 0000000..dbe7ed2 --- /dev/null +++ b/pkg/github/models/validation_error_simple.go @@ -0,0 +1,153 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ValidationErrorSimple validation Error Simple +type ValidationErrorSimple 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 errors property + errors []string + // The message property + message *string +} +// NewValidationErrorSimple instantiates a new ValidationErrorSimple and sets the default values. +func NewValidationErrorSimple()(*ValidationErrorSimple) { + m := &ValidationErrorSimple{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateValidationErrorSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateValidationErrorSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewValidationErrorSimple(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ValidationErrorSimple) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ValidationErrorSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ValidationErrorSimple) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []string when successful +func (m *ValidationErrorSimple) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ValidationErrorSimple) 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["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ValidationErrorSimple) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ValidationErrorSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + err := writer.WriteCollectionOfStringValues("errors", m.GetErrors()) + 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 *ValidationErrorSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ValidationErrorSimple) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ValidationErrorSimple) SetErrors(value []string)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ValidationErrorSimple) SetMessage(value *string)() { + m.message = value +} +type ValidationErrorSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetErrors()([]string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetErrors(value []string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/verification.go b/pkg/github/models/verification.go new file mode 100644 index 0000000..8ee7f11 --- /dev/null +++ b/pkg/github/models/verification.go @@ -0,0 +1,167 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Verification struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The payload property + payload *string + // The reason property + reason *string + // The signature property + signature *string + // The verified property + verified *bool +} +// NewVerification instantiates a new Verification and sets the default values. +func NewVerification()(*Verification) { + m := &Verification{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateVerificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateVerificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVerification(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Verification) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Verification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["signature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignature(val) + } + return nil + } + res["verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVerified(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *Verification) GetPayload()(*string) { + return m.payload +} +// GetReason gets the reason property value. The reason property +// returns a *string when successful +func (m *Verification) GetReason()(*string) { + return m.reason +} +// GetSignature gets the signature property value. The signature property +// returns a *string when successful +func (m *Verification) GetSignature()(*string) { + return m.signature +} +// GetVerified gets the verified property value. The verified property +// returns a *bool when successful +func (m *Verification) GetVerified()(*bool) { + return m.verified +} +// Serialize serializes information the current object +func (m *Verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signature", m.GetSignature()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("verified", m.GetVerified()) + 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 *Verification) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPayload sets the payload property value. The payload property +func (m *Verification) SetPayload(value *string)() { + m.payload = value +} +// SetReason sets the reason property value. The reason property +func (m *Verification) SetReason(value *string)() { + m.reason = value +} +// SetSignature sets the signature property value. The signature property +func (m *Verification) SetSignature(value *string)() { + m.signature = value +} +// SetVerified sets the verified property value. The verified property +func (m *Verification) SetVerified(value *bool)() { + m.verified = value +} +type Verificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()(*string) + GetReason()(*string) + GetSignature()(*string) + GetVerified()(*bool) + SetPayload(value *string)() + SetReason(value *string)() + SetSignature(value *string)() + SetVerified(value *bool)() +} diff --git a/pkg/github/models/view_traffic.go b/pkg/github/models/view_traffic.go new file mode 100644 index 0000000..c1e6d56 --- /dev/null +++ b/pkg/github/models/view_traffic.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ViewTraffic view Traffic +type ViewTraffic struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The count property + count *int32 + // The uniques property + uniques *int32 + // The views property + views []Trafficable +} +// NewViewTraffic instantiates a new ViewTraffic and sets the default values. +func NewViewTraffic()(*ViewTraffic) { + m := &ViewTraffic{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateViewTrafficFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateViewTrafficFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewViewTraffic(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ViewTraffic) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCount gets the count property value. The count property +// returns a *int32 when successful +func (m *ViewTraffic) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ViewTraffic) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + res["uniques"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniques(val) + } + return nil + } + res["views"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTrafficFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Trafficable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Trafficable) + } + } + m.SetViews(res) + } + return nil + } + return res +} +// GetUniques gets the uniques property value. The uniques property +// returns a *int32 when successful +func (m *ViewTraffic) GetUniques()(*int32) { + return m.uniques +} +// GetViews gets the views property value. The views property +// returns a []Trafficable when successful +func (m *ViewTraffic) GetViews()([]Trafficable) { + return m.views +} +// Serialize serializes information the current object +func (m *ViewTraffic) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniques", m.GetUniques()) + if err != nil { + return err + } + } + if m.GetViews() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetViews())) + for i, v := range m.GetViews() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("views", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ViewTraffic) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCount sets the count property value. The count property +func (m *ViewTraffic) SetCount(value *int32)() { + m.count = value +} +// SetUniques sets the uniques property value. The uniques property +func (m *ViewTraffic) SetUniques(value *int32)() { + m.uniques = value +} +// SetViews sets the views property value. The views property +func (m *ViewTraffic) SetViews(value []Trafficable)() { + m.views = value +} +type ViewTrafficable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCount()(*int32) + GetUniques()(*int32) + GetViews()([]Trafficable) + SetCount(value *int32)() + SetUniques(value *int32)() + SetViews(value []Trafficable)() +} diff --git a/pkg/github/models/vulnerability.go b/pkg/github/models/vulnerability.go new file mode 100644 index 0000000..5d1c49b --- /dev/null +++ b/pkg/github/models/vulnerability.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Vulnerability a vulnerability describing the product and its affected versions within a GitHub Security Advisory. +type Vulnerability struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The package version that resolves the vulnerability. + first_patched_version *string + // The name of the package affected by the vulnerability. + packageEscaped Vulnerability_packageable + // The functions in the package that are affected by the vulnerability. + vulnerable_functions []string + // The range of the package versions affected by the vulnerability. + vulnerable_version_range *string +} +// NewVulnerability instantiates a new Vulnerability and sets the default values. +func NewVulnerability()(*Vulnerability) { + m := &Vulnerability{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateVulnerabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateVulnerabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVulnerability(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Vulnerability) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Vulnerability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["first_patched_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstPatchedVersion(val) + } + return nil + } + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVulnerability_packageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackageEscaped(val.(Vulnerability_packageable)) + } + return nil + } + res["vulnerable_functions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetVulnerableFunctions(res) + } + return nil + } + res["vulnerable_version_range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVulnerableVersionRange(val) + } + return nil + } + return res +} +// GetFirstPatchedVersion gets the first_patched_version property value. The package version that resolves the vulnerability. +// returns a *string when successful +func (m *Vulnerability) GetFirstPatchedVersion()(*string) { + return m.first_patched_version +} +// GetPackageEscaped gets the package property value. The name of the package affected by the vulnerability. +// returns a Vulnerability_packageable when successful +func (m *Vulnerability) GetPackageEscaped()(Vulnerability_packageable) { + return m.packageEscaped +} +// GetVulnerableFunctions gets the vulnerable_functions property value. The functions in the package that are affected by the vulnerability. +// returns a []string when successful +func (m *Vulnerability) GetVulnerableFunctions()([]string) { + return m.vulnerable_functions +} +// GetVulnerableVersionRange gets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +// returns a *string when successful +func (m *Vulnerability) GetVulnerableVersionRange()(*string) { + return m.vulnerable_version_range +} +// Serialize serializes information the current object +func (m *Vulnerability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("first_patched_version", m.GetFirstPatchedVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("package", m.GetPackageEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vulnerable_version_range", m.GetVulnerableVersionRange()) + 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 *Vulnerability) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFirstPatchedVersion sets the first_patched_version property value. The package version that resolves the vulnerability. +func (m *Vulnerability) SetFirstPatchedVersion(value *string)() { + m.first_patched_version = value +} +// SetPackageEscaped sets the package property value. The name of the package affected by the vulnerability. +func (m *Vulnerability) SetPackageEscaped(value Vulnerability_packageable)() { + m.packageEscaped = value +} +// SetVulnerableFunctions sets the vulnerable_functions property value. The functions in the package that are affected by the vulnerability. +func (m *Vulnerability) SetVulnerableFunctions(value []string)() { + m.vulnerable_functions = value +} +// SetVulnerableVersionRange sets the vulnerable_version_range property value. The range of the package versions affected by the vulnerability. +func (m *Vulnerability) SetVulnerableVersionRange(value *string)() { + m.vulnerable_version_range = value +} +type Vulnerabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFirstPatchedVersion()(*string) + GetPackageEscaped()(Vulnerability_packageable) + GetVulnerableFunctions()([]string) + GetVulnerableVersionRange()(*string) + SetFirstPatchedVersion(value *string)() + SetPackageEscaped(value Vulnerability_packageable)() + SetVulnerableFunctions(value []string)() + SetVulnerableVersionRange(value *string)() +} diff --git a/pkg/github/models/vulnerability_package.go b/pkg/github/models/vulnerability_package.go new file mode 100644 index 0000000..e111b4c --- /dev/null +++ b/pkg/github/models/vulnerability_package.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Vulnerability_package the name of the package affected by the vulnerability. +type Vulnerability_package struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The package's language or package management ecosystem. + ecosystem *SecurityAdvisoryEcosystems + // The unique package name within its ecosystem. + name *string +} +// NewVulnerability_package instantiates a new Vulnerability_package and sets the default values. +func NewVulnerability_package()(*Vulnerability_package) { + m := &Vulnerability_package{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateVulnerability_packageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateVulnerability_packageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVulnerability_package(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Vulnerability_package) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEcosystem gets the ecosystem property value. The package's language or package management ecosystem. +// returns a *SecurityAdvisoryEcosystems when successful +func (m *Vulnerability_package) GetEcosystem()(*SecurityAdvisoryEcosystems) { + return m.ecosystem +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Vulnerability_package) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ecosystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityAdvisoryEcosystems) + if err != nil { + return err + } + if val != nil { + m.SetEcosystem(val.(*SecurityAdvisoryEcosystems)) + } + 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 + } + return res +} +// GetName gets the name property value. The unique package name within its ecosystem. +// returns a *string when successful +func (m *Vulnerability_package) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *Vulnerability_package) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEcosystem() != nil { + cast := (*m.GetEcosystem()).String() + err := writer.WriteStringValue("ecosystem", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *Vulnerability_package) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEcosystem sets the ecosystem property value. The package's language or package management ecosystem. +func (m *Vulnerability_package) SetEcosystem(value *SecurityAdvisoryEcosystems)() { + m.ecosystem = value +} +// SetName sets the name property value. The unique package name within its ecosystem. +func (m *Vulnerability_package) SetName(value *string)() { + m.name = value +} +type Vulnerability_packageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEcosystem()(*SecurityAdvisoryEcosystems) + GetName()(*string) + SetEcosystem(value *SecurityAdvisoryEcosystems)() + SetName(value *string)() +} diff --git a/pkg/github/models/webhook_config.go b/pkg/github/models/webhook_config.go new file mode 100644 index 0000000..50b57fb --- /dev/null +++ b/pkg/github/models/webhook_config.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WebhookConfig configuration object of the webhook +type WebhookConfig struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl WebhookConfigInsecureSslable + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string +} +// NewWebhookConfig instantiates a new WebhookConfig and sets the default values. +func NewWebhookConfig()(*WebhookConfig) { + m := &WebhookConfig{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWebhookConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWebhookConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWebhookConfig(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WebhookConfig) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *WebhookConfig) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WebhookConfig) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(WebhookConfigInsecureSslable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *WebhookConfig) GetInsecureSsl()(WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *WebhookConfig) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *WebhookConfig) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *WebhookConfig) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *WebhookConfig) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *WebhookConfig) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *WebhookConfig) SetInsecureSsl(value WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *WebhookConfig) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *WebhookConfig) SetUrl(value *string)() { + m.url = value +} +type WebhookConfigable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(WebhookConfigInsecureSslable) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value WebhookConfigInsecureSslable)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/webhook_config_insecure_ssl.go b/pkg/github/models/webhook_config_insecure_ssl.go new file mode 100644 index 0000000..7f27dd9 --- /dev/null +++ b/pkg/github/models/webhook_config_insecure_ssl.go @@ -0,0 +1,376 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WebhookConfigInsecureSsl composed type wrapper for classes float64, string +type WebhookConfigInsecureSsl struct { + // Composed type representation for type float64 + double *float64 + // Composed type representation for type string + string *string + // Composed type representation for type float64 + webhookConfigInsecureSslDouble *float64 + // Composed type representation for type float64 + webhookConfigInsecureSslDouble0 *float64 + // Composed type representation for type float64 + webhookConfigInsecureSslDouble1 *float64 + // Composed type representation for type float64 + webhookConfigInsecureSslDouble2 *float64 + // Composed type representation for type float64 + webhookConfigInsecureSslDouble3 *float64 + // Composed type representation for type float64 + webhookConfigInsecureSslDouble4 *float64 + // Composed type representation for type string + webhookConfigInsecureSslString *string + // Composed type representation for type string + webhookConfigInsecureSslString0 *string + // Composed type representation for type string + webhookConfigInsecureSslString1 *string + // Composed type representation for type string + webhookConfigInsecureSslString2 *string + // Composed type representation for type string + webhookConfigInsecureSslString3 *string + // Composed type representation for type string + webhookConfigInsecureSslString4 *string +} +// NewWebhookConfigInsecureSsl instantiates a new WebhookConfigInsecureSsl and sets the default values. +func NewWebhookConfigInsecureSsl()(*WebhookConfigInsecureSsl) { + m := &WebhookConfigInsecureSsl{ + } + return m +} +// CreateWebhookConfigInsecureSslFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWebhookConfigInsecureSslFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWebhookConfigInsecureSsl() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetDouble(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslDouble(val) + } else if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslDouble0(val) + } else if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslDouble1(val) + } else if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslDouble2(val) + } else if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslDouble3(val) + } else if val, err := parseNode.GetFloat64Value(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslDouble4(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslString0(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslString1(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslString2(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslString3(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetWebhookConfigInsecureSslString4(val) + } + return result, nil +} +// GetDouble gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetDouble()(*float64) { + return m.double +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WebhookConfigInsecureSsl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WebhookConfigInsecureSsl) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetString()(*string) { + return m.string +} +// GetWebhookConfigInsecureSslDouble gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslDouble()(*float64) { + return m.webhookConfigInsecureSslDouble +} +// GetWebhookConfigInsecureSslDouble0 gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslDouble0()(*float64) { + return m.webhookConfigInsecureSslDouble0 +} +// GetWebhookConfigInsecureSslDouble1 gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslDouble1()(*float64) { + return m.webhookConfigInsecureSslDouble1 +} +// GetWebhookConfigInsecureSslDouble2 gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslDouble2()(*float64) { + return m.webhookConfigInsecureSslDouble2 +} +// GetWebhookConfigInsecureSslDouble3 gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslDouble3()(*float64) { + return m.webhookConfigInsecureSslDouble3 +} +// GetWebhookConfigInsecureSslDouble4 gets the double property value. Composed type representation for type float64 +// returns a *float64 when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslDouble4()(*float64) { + return m.webhookConfigInsecureSslDouble4 +} +// GetWebhookConfigInsecureSslString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslString()(*string) { + return m.webhookConfigInsecureSslString +} +// GetWebhookConfigInsecureSslString0 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslString0()(*string) { + return m.webhookConfigInsecureSslString0 +} +// GetWebhookConfigInsecureSslString1 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslString1()(*string) { + return m.webhookConfigInsecureSslString1 +} +// GetWebhookConfigInsecureSslString2 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslString2()(*string) { + return m.webhookConfigInsecureSslString2 +} +// GetWebhookConfigInsecureSslString3 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslString3()(*string) { + return m.webhookConfigInsecureSslString3 +} +// GetWebhookConfigInsecureSslString4 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *WebhookConfigInsecureSsl) GetWebhookConfigInsecureSslString4()(*string) { + return m.webhookConfigInsecureSslString4 +} +// Serialize serializes information the current object +func (m *WebhookConfigInsecureSsl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDouble() != nil { + err := writer.WriteFloat64Value("", m.GetDouble()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslDouble() != nil { + err := writer.WriteFloat64Value("", m.GetWebhookConfigInsecureSslDouble()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslDouble0() != nil { + err := writer.WriteFloat64Value("", m.GetWebhookConfigInsecureSslDouble0()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslDouble1() != nil { + err := writer.WriteFloat64Value("", m.GetWebhookConfigInsecureSslDouble1()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslDouble2() != nil { + err := writer.WriteFloat64Value("", m.GetWebhookConfigInsecureSslDouble2()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslDouble3() != nil { + err := writer.WriteFloat64Value("", m.GetWebhookConfigInsecureSslDouble3()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslDouble4() != nil { + err := writer.WriteFloat64Value("", m.GetWebhookConfigInsecureSslDouble4()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslString() != nil { + err := writer.WriteStringValue("", m.GetWebhookConfigInsecureSslString()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslString0() != nil { + err := writer.WriteStringValue("", m.GetWebhookConfigInsecureSslString0()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslString1() != nil { + err := writer.WriteStringValue("", m.GetWebhookConfigInsecureSslString1()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslString2() != nil { + err := writer.WriteStringValue("", m.GetWebhookConfigInsecureSslString2()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslString3() != nil { + err := writer.WriteStringValue("", m.GetWebhookConfigInsecureSslString3()) + if err != nil { + return err + } + } else if m.GetWebhookConfigInsecureSslString4() != nil { + err := writer.WriteStringValue("", m.GetWebhookConfigInsecureSslString4()) + if err != nil { + return err + } + } + return nil +} +// SetDouble sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetDouble(value *float64)() { + m.double = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetString(value *string)() { + m.string = value +} +// SetWebhookConfigInsecureSslDouble sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslDouble(value *float64)() { + m.webhookConfigInsecureSslDouble = value +} +// SetWebhookConfigInsecureSslDouble0 sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslDouble0(value *float64)() { + m.webhookConfigInsecureSslDouble0 = value +} +// SetWebhookConfigInsecureSslDouble1 sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslDouble1(value *float64)() { + m.webhookConfigInsecureSslDouble1 = value +} +// SetWebhookConfigInsecureSslDouble2 sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslDouble2(value *float64)() { + m.webhookConfigInsecureSslDouble2 = value +} +// SetWebhookConfigInsecureSslDouble3 sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslDouble3(value *float64)() { + m.webhookConfigInsecureSslDouble3 = value +} +// SetWebhookConfigInsecureSslDouble4 sets the double property value. Composed type representation for type float64 +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslDouble4(value *float64)() { + m.webhookConfigInsecureSslDouble4 = value +} +// SetWebhookConfigInsecureSslString sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslString(value *string)() { + m.webhookConfigInsecureSslString = value +} +// SetWebhookConfigInsecureSslString0 sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslString0(value *string)() { + m.webhookConfigInsecureSslString0 = value +} +// SetWebhookConfigInsecureSslString1 sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslString1(value *string)() { + m.webhookConfigInsecureSslString1 = value +} +// SetWebhookConfigInsecureSslString2 sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslString2(value *string)() { + m.webhookConfigInsecureSslString2 = value +} +// SetWebhookConfigInsecureSslString3 sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslString3(value *string)() { + m.webhookConfigInsecureSslString3 = value +} +// SetWebhookConfigInsecureSslString4 sets the string property value. Composed type representation for type string +func (m *WebhookConfigInsecureSsl) SetWebhookConfigInsecureSslString4(value *string)() { + m.webhookConfigInsecureSslString4 = value +} +type WebhookConfigInsecureSslable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDouble()(*float64) + GetString()(*string) + GetWebhookConfigInsecureSslDouble()(*float64) + GetWebhookConfigInsecureSslDouble0()(*float64) + GetWebhookConfigInsecureSslDouble1()(*float64) + GetWebhookConfigInsecureSslDouble2()(*float64) + GetWebhookConfigInsecureSslDouble3()(*float64) + GetWebhookConfigInsecureSslDouble4()(*float64) + GetWebhookConfigInsecureSslString()(*string) + GetWebhookConfigInsecureSslString0()(*string) + GetWebhookConfigInsecureSslString1()(*string) + GetWebhookConfigInsecureSslString2()(*string) + GetWebhookConfigInsecureSslString3()(*string) + GetWebhookConfigInsecureSslString4()(*string) + SetDouble(value *float64)() + SetString(value *string)() + SetWebhookConfigInsecureSslDouble(value *float64)() + SetWebhookConfigInsecureSslDouble0(value *float64)() + SetWebhookConfigInsecureSslDouble1(value *float64)() + SetWebhookConfigInsecureSslDouble2(value *float64)() + SetWebhookConfigInsecureSslDouble3(value *float64)() + SetWebhookConfigInsecureSslDouble4(value *float64)() + SetWebhookConfigInsecureSslString(value *string)() + SetWebhookConfigInsecureSslString0(value *string)() + SetWebhookConfigInsecureSslString1(value *string)() + SetWebhookConfigInsecureSslString2(value *string)() + SetWebhookConfigInsecureSslString3(value *string)() + SetWebhookConfigInsecureSslString4(value *string)() +} diff --git a/pkg/github/models/with_path_get_response_member1.go b/pkg/github/models/with_path_get_response_member1.go new file mode 100644 index 0000000..8d44ff8 --- /dev/null +++ b/pkg/github/models/with_path_get_response_member1.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WithPathGetResponseMember1 a list of directory items +type WithPathGetResponseMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewWithPathGetResponseMember1 instantiates a new WithPathGetResponseMember1 and sets the default values. +func NewWithPathGetResponseMember1()(*WithPathGetResponseMember1) { + m := &WithPathGetResponseMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWithPathGetResponseMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWithPathGetResponseMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWithPathGetResponseMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WithPathGetResponseMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WithPathGetResponseMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *WithPathGetResponseMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *WithPathGetResponseMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type WithPathGetResponseMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/workflow.go b/pkg/github/models/workflow.go new file mode 100644 index 0000000..4d0fb6b --- /dev/null +++ b/pkg/github/models/workflow.go @@ -0,0 +1,373 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Workflow a GitHub Actions workflow +type Workflow struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The badge_url property + badge_url *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deleted_at property + deleted_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The html_url property + html_url *string + // The id property + id *int32 + // The name property + name *string + // The node_id property + node_id *string + // The path property + path *string + // The state property + state *Workflow_state + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewWorkflow instantiates a new Workflow and sets the default values. +func NewWorkflow()(*Workflow) { + m := &Workflow{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflow(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Workflow) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBadgeUrl gets the badge_url property value. The badge_url property +// returns a *string when successful +func (m *Workflow) GetBadgeUrl()(*string) { + return m.badge_url +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *Workflow) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDeletedAt gets the deleted_at property value. The deleted_at property +// returns a *Time when successful +func (m *Workflow) GetDeletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deleted_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Workflow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["badge_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBadgeUrl(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["deleted_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedAt(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkflow_state) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*Workflow_state)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *Workflow) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *Workflow) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *Workflow) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *Workflow) GetNodeId()(*string) { + return m.node_id +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *Workflow) GetPath()(*string) { + return m.path +} +// GetState gets the state property value. The state property +// returns a *Workflow_state when successful +func (m *Workflow) GetState()(*Workflow_state) { + return m.state +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *Workflow) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *Workflow) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *Workflow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("badge_url", m.GetBadgeUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("deleted_at", m.GetDeletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Workflow) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBadgeUrl sets the badge_url property value. The badge_url property +func (m *Workflow) SetBadgeUrl(value *string)() { + m.badge_url = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *Workflow) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDeletedAt sets the deleted_at property value. The deleted_at property +func (m *Workflow) SetDeletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deleted_at = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *Workflow) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *Workflow) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *Workflow) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *Workflow) SetNodeId(value *string)() { + m.node_id = value +} +// SetPath sets the path property value. The path property +func (m *Workflow) SetPath(value *string)() { + m.path = value +} +// SetState sets the state property value. The state property +func (m *Workflow) SetState(value *Workflow_state)() { + m.state = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *Workflow) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *Workflow) SetUrl(value *string)() { + m.url = value +} +type Workflowable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBadgeUrl()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHtmlUrl()(*string) + GetId()(*int32) + GetName()(*string) + GetNodeId()(*string) + GetPath()(*string) + GetState()(*Workflow_state) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetBadgeUrl(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetNodeId(value *string)() + SetPath(value *string)() + SetState(value *Workflow_state)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/workflow_run.go b/pkg/github/models/workflow_run.go new file mode 100644 index 0000000..f9555ee --- /dev/null +++ b/pkg/github/models/workflow_run.go @@ -0,0 +1,1121 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowRun an invocation of a workflow +type WorkflowRun struct { + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The URL to the artifacts for the workflow run. + artifacts_url *string + // The URL to cancel the workflow run. + cancel_url *string + // The ID of the associated check suite. + check_suite_id *int32 + // The node ID of the associated check suite. + check_suite_node_id *string + // The URL to the associated check suite. + check_suite_url *string + // The conclusion property + conclusion *string + // The created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + display_title *string + // The event property + event *string + // The head_branch property + head_branch *string + // A commit. + head_commit NullableSimpleCommitable + // Minimal Repository + head_repository MinimalRepositoryable + // The head_repository_id property + head_repository_id *int32 + // The SHA of the head commit that points to the version of the workflow being run. + head_sha *string + // The html_url property + html_url *string + // The ID of the workflow run. + id *int32 + // The URL to the jobs for the workflow run. + jobs_url *string + // The URL to download the logs for the workflow run. + logs_url *string + // The name of the workflow run. + name *string + // The node_id property + node_id *string + // The full path of the workflow + path *string + // The URL to the previous attempted run of this workflow, if one exists. + previous_attempt_url *string + // Pull requests that are open with a `head_sha` or `head_branch` that matches the workflow run. The returned pull requests do not necessarily indicate pull requests that triggered the run. + pull_requests []PullRequestMinimalable + // The referenced_workflows property + referenced_workflows []ReferencedWorkflowable + // Minimal Repository + repository MinimalRepositoryable + // The URL to rerun the workflow run. + rerun_url *string + // Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + run_attempt *int32 + // The auto incrementing run number for the workflow run. + run_number *int32 + // The start time of the latest run. Resets on re-run. + run_started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *string + // A GitHub user. + triggering_actor SimpleUserable + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The URL to the workflow run. + url *string + // The ID of the parent workflow. + workflow_id *int32 + // The URL to the workflow. + workflow_url *string +} +// NewWorkflowRun instantiates a new WorkflowRun and sets the default values. +func NewWorkflowRun()(*WorkflowRun) { + m := &WorkflowRun{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRun(), nil +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *WorkflowRun) GetActor()(SimpleUserable) { + return m.actor +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRun) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArtifactsUrl gets the artifacts_url property value. The URL to the artifacts for the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetArtifactsUrl()(*string) { + return m.artifacts_url +} +// GetCancelUrl gets the cancel_url property value. The URL to cancel the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetCancelUrl()(*string) { + return m.cancel_url +} +// GetCheckSuiteId gets the check_suite_id property value. The ID of the associated check suite. +// returns a *int32 when successful +func (m *WorkflowRun) GetCheckSuiteId()(*int32) { + return m.check_suite_id +} +// GetCheckSuiteNodeId gets the check_suite_node_id property value. The node ID of the associated check suite. +// returns a *string when successful +func (m *WorkflowRun) GetCheckSuiteNodeId()(*string) { + return m.check_suite_node_id +} +// GetCheckSuiteUrl gets the check_suite_url property value. The URL to the associated check suite. +// returns a *string when successful +func (m *WorkflowRun) GetCheckSuiteUrl()(*string) { + return m.check_suite_url +} +// GetConclusion gets the conclusion property value. The conclusion property +// returns a *string when successful +func (m *WorkflowRun) GetConclusion()(*string) { + return m.conclusion +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *WorkflowRun) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetDisplayTitle gets the display_title property value. The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. +// returns a *string when successful +func (m *WorkflowRun) GetDisplayTitle()(*string) { + return m.display_title +} +// GetEvent gets the event property value. The event property +// returns a *string when successful +func (m *WorkflowRun) GetEvent()(*string) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRun) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["artifacts_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArtifactsUrl(val) + } + return nil + } + res["cancel_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCancelUrl(val) + } + return nil + } + res["check_suite_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCheckSuiteId(val) + } + return nil + } + res["check_suite_node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckSuiteNodeId(val) + } + return nil + } + res["check_suite_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckSuiteUrl(val) + } + return nil + } + res["conclusion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConclusion(val) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["display_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayTitle(val) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEvent(val) + } + return nil + } + res["head_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadBranch(val) + } + return nil + } + res["head_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleCommitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHeadCommit(val.(NullableSimpleCommitable)) + } + return nil + } + res["head_repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHeadRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["head_repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHeadRepositoryId(val) + } + return nil + } + res["head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadSha(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["jobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJobsUrl(val) + } + return nil + } + res["logs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogsUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["previous_attempt_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousAttemptUrl(val) + } + return nil + } + res["pull_requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePullRequestMinimalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PullRequestMinimalable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PullRequestMinimalable) + } + } + m.SetPullRequests(res) + } + return nil + } + res["referenced_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReferencedWorkflowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReferencedWorkflowable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ReferencedWorkflowable) + } + } + m.SetReferencedWorkflows(res) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(MinimalRepositoryable)) + } + return nil + } + res["rerun_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRerunUrl(val) + } + return nil + } + res["run_attempt"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunAttempt(val) + } + return nil + } + res["run_number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunNumber(val) + } + return nil + } + res["run_started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRunStartedAt(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["triggering_actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTriggeringActor(val.(SimpleUserable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["workflow_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowId(val) + } + return nil + } + res["workflow_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowUrl(val) + } + return nil + } + return res +} +// GetHeadBranch gets the head_branch property value. The head_branch property +// returns a *string when successful +func (m *WorkflowRun) GetHeadBranch()(*string) { + return m.head_branch +} +// GetHeadCommit gets the head_commit property value. A commit. +// returns a NullableSimpleCommitable when successful +func (m *WorkflowRun) GetHeadCommit()(NullableSimpleCommitable) { + return m.head_commit +} +// GetHeadRepository gets the head_repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *WorkflowRun) GetHeadRepository()(MinimalRepositoryable) { + return m.head_repository +} +// GetHeadRepositoryId gets the head_repository_id property value. The head_repository_id property +// returns a *int32 when successful +func (m *WorkflowRun) GetHeadRepositoryId()(*int32) { + return m.head_repository_id +} +// GetHeadSha gets the head_sha property value. The SHA of the head commit that points to the version of the workflow being run. +// returns a *string when successful +func (m *WorkflowRun) GetHeadSha()(*string) { + return m.head_sha +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *WorkflowRun) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The ID of the workflow run. +// returns a *int32 when successful +func (m *WorkflowRun) GetId()(*int32) { + return m.id +} +// GetJobsUrl gets the jobs_url property value. The URL to the jobs for the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetJobsUrl()(*string) { + return m.jobs_url +} +// GetLogsUrl gets the logs_url property value. The URL to download the logs for the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetLogsUrl()(*string) { + return m.logs_url +} +// GetName gets the name property value. The name of the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetName()(*string) { + return m.name +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *WorkflowRun) GetNodeId()(*string) { + return m.node_id +} +// GetPath gets the path property value. The full path of the workflow +// returns a *string when successful +func (m *WorkflowRun) GetPath()(*string) { + return m.path +} +// GetPreviousAttemptUrl gets the previous_attempt_url property value. The URL to the previous attempted run of this workflow, if one exists. +// returns a *string when successful +func (m *WorkflowRun) GetPreviousAttemptUrl()(*string) { + return m.previous_attempt_url +} +// GetPullRequests gets the pull_requests property value. Pull requests that are open with a `head_sha` or `head_branch` that matches the workflow run. The returned pull requests do not necessarily indicate pull requests that triggered the run. +// returns a []PullRequestMinimalable when successful +func (m *WorkflowRun) GetPullRequests()([]PullRequestMinimalable) { + return m.pull_requests +} +// GetReferencedWorkflows gets the referenced_workflows property value. The referenced_workflows property +// returns a []ReferencedWorkflowable when successful +func (m *WorkflowRun) GetReferencedWorkflows()([]ReferencedWorkflowable) { + return m.referenced_workflows +} +// GetRepository gets the repository property value. Minimal Repository +// returns a MinimalRepositoryable when successful +func (m *WorkflowRun) GetRepository()(MinimalRepositoryable) { + return m.repository +} +// GetRerunUrl gets the rerun_url property value. The URL to rerun the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetRerunUrl()(*string) { + return m.rerun_url +} +// GetRunAttempt gets the run_attempt property value. Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. +// returns a *int32 when successful +func (m *WorkflowRun) GetRunAttempt()(*int32) { + return m.run_attempt +} +// GetRunNumber gets the run_number property value. The auto incrementing run number for the workflow run. +// returns a *int32 when successful +func (m *WorkflowRun) GetRunNumber()(*int32) { + return m.run_number +} +// GetRunStartedAt gets the run_started_at property value. The start time of the latest run. Resets on re-run. +// returns a *Time when successful +func (m *WorkflowRun) GetRunStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.run_started_at +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *WorkflowRun) GetStatus()(*string) { + return m.status +} +// GetTriggeringActor gets the triggering_actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *WorkflowRun) GetTriggeringActor()(SimpleUserable) { + return m.triggering_actor +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *WorkflowRun) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The URL to the workflow run. +// returns a *string when successful +func (m *WorkflowRun) GetUrl()(*string) { + return m.url +} +// GetWorkflowId gets the workflow_id property value. The ID of the parent workflow. +// returns a *int32 when successful +func (m *WorkflowRun) GetWorkflowId()(*int32) { + return m.workflow_id +} +// GetWorkflowUrl gets the workflow_url property value. The URL to the workflow. +// returns a *string when successful +func (m *WorkflowRun) GetWorkflowUrl()(*string) { + return m.workflow_url +} +// Serialize serializes information the current object +func (m *WorkflowRun) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("artifacts_url", m.GetArtifactsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cancel_url", m.GetCancelUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("check_suite_id", m.GetCheckSuiteId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("check_suite_node_id", m.GetCheckSuiteNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("check_suite_url", m.GetCheckSuiteUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("conclusion", m.GetConclusion()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_title", m.GetDisplayTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_branch", m.GetHeadBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("head_commit", m.GetHeadCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("head_repository", m.GetHeadRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("head_repository_id", m.GetHeadRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_sha", m.GetHeadSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("jobs_url", m.GetJobsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("logs_url", m.GetLogsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_attempt_url", m.GetPreviousAttemptUrl()) + if err != nil { + return err + } + } + if m.GetPullRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPullRequests())) + for i, v := range m.GetPullRequests() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("pull_requests", cast) + if err != nil { + return err + } + } + if m.GetReferencedWorkflows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReferencedWorkflows())) + for i, v := range m.GetReferencedWorkflows() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("referenced_workflows", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rerun_url", m.GetRerunUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("run_attempt", m.GetRunAttempt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("run_number", m.GetRunNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("run_started_at", m.GetRunStartedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("triggering_actor", m.GetTriggeringActor()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("workflow_id", m.GetWorkflowId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("workflow_url", m.GetWorkflowUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. A GitHub user. +func (m *WorkflowRun) SetActor(value SimpleUserable)() { + m.actor = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *WorkflowRun) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArtifactsUrl sets the artifacts_url property value. The URL to the artifacts for the workflow run. +func (m *WorkflowRun) SetArtifactsUrl(value *string)() { + m.artifacts_url = value +} +// SetCancelUrl sets the cancel_url property value. The URL to cancel the workflow run. +func (m *WorkflowRun) SetCancelUrl(value *string)() { + m.cancel_url = value +} +// SetCheckSuiteId sets the check_suite_id property value. The ID of the associated check suite. +func (m *WorkflowRun) SetCheckSuiteId(value *int32)() { + m.check_suite_id = value +} +// SetCheckSuiteNodeId sets the check_suite_node_id property value. The node ID of the associated check suite. +func (m *WorkflowRun) SetCheckSuiteNodeId(value *string)() { + m.check_suite_node_id = value +} +// SetCheckSuiteUrl sets the check_suite_url property value. The URL to the associated check suite. +func (m *WorkflowRun) SetCheckSuiteUrl(value *string)() { + m.check_suite_url = value +} +// SetConclusion sets the conclusion property value. The conclusion property +func (m *WorkflowRun) SetConclusion(value *string)() { + m.conclusion = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *WorkflowRun) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetDisplayTitle sets the display_title property value. The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. +func (m *WorkflowRun) SetDisplayTitle(value *string)() { + m.display_title = value +} +// SetEvent sets the event property value. The event property +func (m *WorkflowRun) SetEvent(value *string)() { + m.event = value +} +// SetHeadBranch sets the head_branch property value. The head_branch property +func (m *WorkflowRun) SetHeadBranch(value *string)() { + m.head_branch = value +} +// SetHeadCommit sets the head_commit property value. A commit. +func (m *WorkflowRun) SetHeadCommit(value NullableSimpleCommitable)() { + m.head_commit = value +} +// SetHeadRepository sets the head_repository property value. Minimal Repository +func (m *WorkflowRun) SetHeadRepository(value MinimalRepositoryable)() { + m.head_repository = value +} +// SetHeadRepositoryId sets the head_repository_id property value. The head_repository_id property +func (m *WorkflowRun) SetHeadRepositoryId(value *int32)() { + m.head_repository_id = value +} +// SetHeadSha sets the head_sha property value. The SHA of the head commit that points to the version of the workflow being run. +func (m *WorkflowRun) SetHeadSha(value *string)() { + m.head_sha = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *WorkflowRun) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The ID of the workflow run. +func (m *WorkflowRun) SetId(value *int32)() { + m.id = value +} +// SetJobsUrl sets the jobs_url property value. The URL to the jobs for the workflow run. +func (m *WorkflowRun) SetJobsUrl(value *string)() { + m.jobs_url = value +} +// SetLogsUrl sets the logs_url property value. The URL to download the logs for the workflow run. +func (m *WorkflowRun) SetLogsUrl(value *string)() { + m.logs_url = value +} +// SetName sets the name property value. The name of the workflow run. +func (m *WorkflowRun) SetName(value *string)() { + m.name = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *WorkflowRun) SetNodeId(value *string)() { + m.node_id = value +} +// SetPath sets the path property value. The full path of the workflow +func (m *WorkflowRun) SetPath(value *string)() { + m.path = value +} +// SetPreviousAttemptUrl sets the previous_attempt_url property value. The URL to the previous attempted run of this workflow, if one exists. +func (m *WorkflowRun) SetPreviousAttemptUrl(value *string)() { + m.previous_attempt_url = value +} +// SetPullRequests sets the pull_requests property value. Pull requests that are open with a `head_sha` or `head_branch` that matches the workflow run. The returned pull requests do not necessarily indicate pull requests that triggered the run. +func (m *WorkflowRun) SetPullRequests(value []PullRequestMinimalable)() { + m.pull_requests = value +} +// SetReferencedWorkflows sets the referenced_workflows property value. The referenced_workflows property +func (m *WorkflowRun) SetReferencedWorkflows(value []ReferencedWorkflowable)() { + m.referenced_workflows = value +} +// SetRepository sets the repository property value. Minimal Repository +func (m *WorkflowRun) SetRepository(value MinimalRepositoryable)() { + m.repository = value +} +// SetRerunUrl sets the rerun_url property value. The URL to rerun the workflow run. +func (m *WorkflowRun) SetRerunUrl(value *string)() { + m.rerun_url = value +} +// SetRunAttempt sets the run_attempt property value. Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. +func (m *WorkflowRun) SetRunAttempt(value *int32)() { + m.run_attempt = value +} +// SetRunNumber sets the run_number property value. The auto incrementing run number for the workflow run. +func (m *WorkflowRun) SetRunNumber(value *int32)() { + m.run_number = value +} +// SetRunStartedAt sets the run_started_at property value. The start time of the latest run. Resets on re-run. +func (m *WorkflowRun) SetRunStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.run_started_at = value +} +// SetStatus sets the status property value. The status property +func (m *WorkflowRun) SetStatus(value *string)() { + m.status = value +} +// SetTriggeringActor sets the triggering_actor property value. A GitHub user. +func (m *WorkflowRun) SetTriggeringActor(value SimpleUserable)() { + m.triggering_actor = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *WorkflowRun) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The URL to the workflow run. +func (m *WorkflowRun) SetUrl(value *string)() { + m.url = value +} +// SetWorkflowId sets the workflow_id property value. The ID of the parent workflow. +func (m *WorkflowRun) SetWorkflowId(value *int32)() { + m.workflow_id = value +} +// SetWorkflowUrl sets the workflow_url property value. The URL to the workflow. +func (m *WorkflowRun) SetWorkflowUrl(value *string)() { + m.workflow_url = value +} +type WorkflowRunable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(SimpleUserable) + GetArtifactsUrl()(*string) + GetCancelUrl()(*string) + GetCheckSuiteId()(*int32) + GetCheckSuiteNodeId()(*string) + GetCheckSuiteUrl()(*string) + GetConclusion()(*string) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayTitle()(*string) + GetEvent()(*string) + GetHeadBranch()(*string) + GetHeadCommit()(NullableSimpleCommitable) + GetHeadRepository()(MinimalRepositoryable) + GetHeadRepositoryId()(*int32) + GetHeadSha()(*string) + GetHtmlUrl()(*string) + GetId()(*int32) + GetJobsUrl()(*string) + GetLogsUrl()(*string) + GetName()(*string) + GetNodeId()(*string) + GetPath()(*string) + GetPreviousAttemptUrl()(*string) + GetPullRequests()([]PullRequestMinimalable) + GetReferencedWorkflows()([]ReferencedWorkflowable) + GetRepository()(MinimalRepositoryable) + GetRerunUrl()(*string) + GetRunAttempt()(*int32) + GetRunNumber()(*int32) + GetRunStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + GetTriggeringActor()(SimpleUserable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + GetWorkflowId()(*int32) + GetWorkflowUrl()(*string) + SetActor(value SimpleUserable)() + SetArtifactsUrl(value *string)() + SetCancelUrl(value *string)() + SetCheckSuiteId(value *int32)() + SetCheckSuiteNodeId(value *string)() + SetCheckSuiteUrl(value *string)() + SetConclusion(value *string)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayTitle(value *string)() + SetEvent(value *string)() + SetHeadBranch(value *string)() + SetHeadCommit(value NullableSimpleCommitable)() + SetHeadRepository(value MinimalRepositoryable)() + SetHeadRepositoryId(value *int32)() + SetHeadSha(value *string)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetJobsUrl(value *string)() + SetLogsUrl(value *string)() + SetName(value *string)() + SetNodeId(value *string)() + SetPath(value *string)() + SetPreviousAttemptUrl(value *string)() + SetPullRequests(value []PullRequestMinimalable)() + SetReferencedWorkflows(value []ReferencedWorkflowable)() + SetRepository(value MinimalRepositoryable)() + SetRerunUrl(value *string)() + SetRunAttempt(value *int32)() + SetRunNumber(value *int32)() + SetRunStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() + SetTriggeringActor(value SimpleUserable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() + SetWorkflowId(value *int32)() + SetWorkflowUrl(value *string)() +} diff --git a/pkg/github/models/workflow_run_usage.go b/pkg/github/models/workflow_run_usage.go new file mode 100644 index 0000000..2814c3c --- /dev/null +++ b/pkg/github/models/workflow_run_usage.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowRunUsage workflow Run Usage +type WorkflowRunUsage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The billable property + billable WorkflowRunUsage_billableable + // The run_duration_ms property + run_duration_ms *int32 +} +// NewWorkflowRunUsage instantiates a new WorkflowRunUsage and sets the default values. +func NewWorkflowRunUsage()(*WorkflowRunUsage) { + m := &WorkflowRunUsage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillable gets the billable property value. The billable property +// returns a WorkflowRunUsage_billableable when successful +func (m *WorkflowRunUsage) GetBillable()(WorkflowRunUsage_billableable) { + return m.billable +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["billable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowRunUsage_billableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillable(val.(WorkflowRunUsage_billableable)) + } + return nil + } + res["run_duration_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunDurationMs(val) + } + return nil + } + return res +} +// GetRunDurationMs gets the run_duration_ms property value. The run_duration_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage) GetRunDurationMs()(*int32) { + return m.run_duration_ms +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("billable", m.GetBillable()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("run_duration_ms", m.GetRunDurationMs()) + 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 *WorkflowRunUsage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillable sets the billable property value. The billable property +func (m *WorkflowRunUsage) SetBillable(value WorkflowRunUsage_billableable)() { + m.billable = value +} +// SetRunDurationMs sets the run_duration_ms property value. The run_duration_ms property +func (m *WorkflowRunUsage) SetRunDurationMs(value *int32)() { + m.run_duration_ms = value +} +type WorkflowRunUsageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillable()(WorkflowRunUsage_billableable) + GetRunDurationMs()(*int32) + SetBillable(value WorkflowRunUsage_billableable)() + SetRunDurationMs(value *int32)() +} diff --git a/pkg/github/models/workflow_run_usage_billable.go b/pkg/github/models/workflow_run_usage_billable.go new file mode 100644 index 0000000..f1358d6 --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The MACOS property + mACOS WorkflowRunUsage_billable_MACOSable + // The UBUNTU property + uBUNTU WorkflowRunUsage_billable_UBUNTUable + // The WINDOWS property + wINDOWS WorkflowRunUsage_billable_WINDOWSable +} +// NewWorkflowRunUsage_billable instantiates a new WorkflowRunUsage_billable and sets the default values. +func NewWorkflowRunUsage_billable()(*WorkflowRunUsage_billable) { + m := &WorkflowRunUsage_billable{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billableFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billableFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["MACOS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowRunUsage_billable_MACOSFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMACOS(val.(WorkflowRunUsage_billable_MACOSable)) + } + return nil + } + res["UBUNTU"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowRunUsage_billable_UBUNTUFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUBUNTU(val.(WorkflowRunUsage_billable_UBUNTUable)) + } + return nil + } + res["WINDOWS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowRunUsage_billable_WINDOWSFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWINDOWS(val.(WorkflowRunUsage_billable_WINDOWSable)) + } + return nil + } + return res +} +// GetMACOS gets the MACOS property value. The MACOS property +// returns a WorkflowRunUsage_billable_MACOSable when successful +func (m *WorkflowRunUsage_billable) GetMACOS()(WorkflowRunUsage_billable_MACOSable) { + return m.mACOS +} +// GetUBUNTU gets the UBUNTU property value. The UBUNTU property +// returns a WorkflowRunUsage_billable_UBUNTUable when successful +func (m *WorkflowRunUsage_billable) GetUBUNTU()(WorkflowRunUsage_billable_UBUNTUable) { + return m.uBUNTU +} +// GetWINDOWS gets the WINDOWS property value. The WINDOWS property +// returns a WorkflowRunUsage_billable_WINDOWSable when successful +func (m *WorkflowRunUsage_billable) GetWINDOWS()(WorkflowRunUsage_billable_WINDOWSable) { + return m.wINDOWS +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("MACOS", m.GetMACOS()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("UBUNTU", m.GetUBUNTU()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("WINDOWS", m.GetWINDOWS()) + 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 *WorkflowRunUsage_billable) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMACOS sets the MACOS property value. The MACOS property +func (m *WorkflowRunUsage_billable) SetMACOS(value WorkflowRunUsage_billable_MACOSable)() { + m.mACOS = value +} +// SetUBUNTU sets the UBUNTU property value. The UBUNTU property +func (m *WorkflowRunUsage_billable) SetUBUNTU(value WorkflowRunUsage_billable_UBUNTUable)() { + m.uBUNTU = value +} +// SetWINDOWS sets the WINDOWS property value. The WINDOWS property +func (m *WorkflowRunUsage_billable) SetWINDOWS(value WorkflowRunUsage_billable_WINDOWSable)() { + m.wINDOWS = value +} +type WorkflowRunUsage_billableable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMACOS()(WorkflowRunUsage_billable_MACOSable) + GetUBUNTU()(WorkflowRunUsage_billable_UBUNTUable) + GetWINDOWS()(WorkflowRunUsage_billable_WINDOWSable) + SetMACOS(value WorkflowRunUsage_billable_MACOSable)() + SetUBUNTU(value WorkflowRunUsage_billable_UBUNTUable)() + SetWINDOWS(value WorkflowRunUsage_billable_WINDOWSable)() +} diff --git a/pkg/github/models/workflow_run_usage_billable_m_a_c_o_s.go b/pkg/github/models/workflow_run_usage_billable_m_a_c_o_s.go new file mode 100644 index 0000000..d2786c1 --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable_m_a_c_o_s.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable_MACOS struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The job_runs property + job_runs []WorkflowRunUsage_billable_MACOS_job_runsable + // The jobs property + jobs *int32 + // The total_ms property + total_ms *int32 +} +// NewWorkflowRunUsage_billable_MACOS instantiates a new WorkflowRunUsage_billable_MACOS and sets the default values. +func NewWorkflowRunUsage_billable_MACOS()(*WorkflowRunUsage_billable_MACOS) { + m := &WorkflowRunUsage_billable_MACOS{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billable_MACOSFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billable_MACOSFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable_MACOS(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable_MACOS) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable_MACOS) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["job_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowRunUsage_billable_MACOS_job_runsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowRunUsage_billable_MACOS_job_runsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(WorkflowRunUsage_billable_MACOS_job_runsable) + } + } + m.SetJobRuns(res) + } + return nil + } + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetJobs(val) + } + return nil + } + res["total_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMs(val) + } + return nil + } + return res +} +// GetJobRuns gets the job_runs property value. The job_runs property +// returns a []WorkflowRunUsage_billable_MACOS_job_runsable when successful +func (m *WorkflowRunUsage_billable_MACOS) GetJobRuns()([]WorkflowRunUsage_billable_MACOS_job_runsable) { + return m.job_runs +} +// GetJobs gets the jobs property value. The jobs property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_MACOS) GetJobs()(*int32) { + return m.jobs +} +// GetTotalMs gets the total_ms property value. The total_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_MACOS) GetTotalMs()(*int32) { + return m.total_ms +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable_MACOS) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("jobs", m.GetJobs()) + if err != nil { + return err + } + } + if m.GetJobRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobRuns())) + for i, v := range m.GetJobRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("job_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_ms", m.GetTotalMs()) + 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 *WorkflowRunUsage_billable_MACOS) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetJobRuns sets the job_runs property value. The job_runs property +func (m *WorkflowRunUsage_billable_MACOS) SetJobRuns(value []WorkflowRunUsage_billable_MACOS_job_runsable)() { + m.job_runs = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *WorkflowRunUsage_billable_MACOS) SetJobs(value *int32)() { + m.jobs = value +} +// SetTotalMs sets the total_ms property value. The total_ms property +func (m *WorkflowRunUsage_billable_MACOS) SetTotalMs(value *int32)() { + m.total_ms = value +} +type WorkflowRunUsage_billable_MACOSable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJobRuns()([]WorkflowRunUsage_billable_MACOS_job_runsable) + GetJobs()(*int32) + GetTotalMs()(*int32) + SetJobRuns(value []WorkflowRunUsage_billable_MACOS_job_runsable)() + SetJobs(value *int32)() + SetTotalMs(value *int32)() +} diff --git a/pkg/github/models/workflow_run_usage_billable_m_a_c_o_s_job_runs.go b/pkg/github/models/workflow_run_usage_billable_m_a_c_o_s_job_runs.go new file mode 100644 index 0000000..2189134 --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable_m_a_c_o_s_job_runs.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable_MACOS_job_runs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The duration_ms property + duration_ms *int32 + // The job_id property + job_id *int32 +} +// NewWorkflowRunUsage_billable_MACOS_job_runs instantiates a new WorkflowRunUsage_billable_MACOS_job_runs and sets the default values. +func NewWorkflowRunUsage_billable_MACOS_job_runs()(*WorkflowRunUsage_billable_MACOS_job_runs) { + m := &WorkflowRunUsage_billable_MACOS_job_runs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billable_MACOS_job_runsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billable_MACOS_job_runsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable_MACOS_job_runs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable_MACOS_job_runs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDurationMs gets the duration_ms property value. The duration_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_MACOS_job_runs) GetDurationMs()(*int32) { + return m.duration_ms +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable_MACOS_job_runs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["duration_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationMs(val) + } + return nil + } + res["job_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetJobId(val) + } + return nil + } + return res +} +// GetJobId gets the job_id property value. The job_id property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_MACOS_job_runs) GetJobId()(*int32) { + return m.job_id +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable_MACOS_job_runs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("duration_ms", m.GetDurationMs()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("job_id", m.GetJobId()) + 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 *WorkflowRunUsage_billable_MACOS_job_runs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDurationMs sets the duration_ms property value. The duration_ms property +func (m *WorkflowRunUsage_billable_MACOS_job_runs) SetDurationMs(value *int32)() { + m.duration_ms = value +} +// SetJobId sets the job_id property value. The job_id property +func (m *WorkflowRunUsage_billable_MACOS_job_runs) SetJobId(value *int32)() { + m.job_id = value +} +type WorkflowRunUsage_billable_MACOS_job_runsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDurationMs()(*int32) + GetJobId()(*int32) + SetDurationMs(value *int32)() + SetJobId(value *int32)() +} diff --git a/pkg/github/models/workflow_run_usage_billable_u_b_u_n_t_u.go b/pkg/github/models/workflow_run_usage_billable_u_b_u_n_t_u.go new file mode 100644 index 0000000..8b0255b --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable_u_b_u_n_t_u.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable_UBUNTU struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The job_runs property + job_runs []WorkflowRunUsage_billable_UBUNTU_job_runsable + // The jobs property + jobs *int32 + // The total_ms property + total_ms *int32 +} +// NewWorkflowRunUsage_billable_UBUNTU instantiates a new WorkflowRunUsage_billable_UBUNTU and sets the default values. +func NewWorkflowRunUsage_billable_UBUNTU()(*WorkflowRunUsage_billable_UBUNTU) { + m := &WorkflowRunUsage_billable_UBUNTU{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billable_UBUNTUFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billable_UBUNTUFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable_UBUNTU(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable_UBUNTU) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable_UBUNTU) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["job_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowRunUsage_billable_UBUNTU_job_runsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowRunUsage_billable_UBUNTU_job_runsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(WorkflowRunUsage_billable_UBUNTU_job_runsable) + } + } + m.SetJobRuns(res) + } + return nil + } + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetJobs(val) + } + return nil + } + res["total_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMs(val) + } + return nil + } + return res +} +// GetJobRuns gets the job_runs property value. The job_runs property +// returns a []WorkflowRunUsage_billable_UBUNTU_job_runsable when successful +func (m *WorkflowRunUsage_billable_UBUNTU) GetJobRuns()([]WorkflowRunUsage_billable_UBUNTU_job_runsable) { + return m.job_runs +} +// GetJobs gets the jobs property value. The jobs property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_UBUNTU) GetJobs()(*int32) { + return m.jobs +} +// GetTotalMs gets the total_ms property value. The total_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_UBUNTU) GetTotalMs()(*int32) { + return m.total_ms +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable_UBUNTU) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("jobs", m.GetJobs()) + if err != nil { + return err + } + } + if m.GetJobRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobRuns())) + for i, v := range m.GetJobRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("job_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_ms", m.GetTotalMs()) + 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 *WorkflowRunUsage_billable_UBUNTU) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetJobRuns sets the job_runs property value. The job_runs property +func (m *WorkflowRunUsage_billable_UBUNTU) SetJobRuns(value []WorkflowRunUsage_billable_UBUNTU_job_runsable)() { + m.job_runs = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *WorkflowRunUsage_billable_UBUNTU) SetJobs(value *int32)() { + m.jobs = value +} +// SetTotalMs sets the total_ms property value. The total_ms property +func (m *WorkflowRunUsage_billable_UBUNTU) SetTotalMs(value *int32)() { + m.total_ms = value +} +type WorkflowRunUsage_billable_UBUNTUable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJobRuns()([]WorkflowRunUsage_billable_UBUNTU_job_runsable) + GetJobs()(*int32) + GetTotalMs()(*int32) + SetJobRuns(value []WorkflowRunUsage_billable_UBUNTU_job_runsable)() + SetJobs(value *int32)() + SetTotalMs(value *int32)() +} diff --git a/pkg/github/models/workflow_run_usage_billable_u_b_u_n_t_u_job_runs.go b/pkg/github/models/workflow_run_usage_billable_u_b_u_n_t_u_job_runs.go new file mode 100644 index 0000000..539a076 --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable_u_b_u_n_t_u_job_runs.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable_UBUNTU_job_runs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The duration_ms property + duration_ms *int32 + // The job_id property + job_id *int32 +} +// NewWorkflowRunUsage_billable_UBUNTU_job_runs instantiates a new WorkflowRunUsage_billable_UBUNTU_job_runs and sets the default values. +func NewWorkflowRunUsage_billable_UBUNTU_job_runs()(*WorkflowRunUsage_billable_UBUNTU_job_runs) { + m := &WorkflowRunUsage_billable_UBUNTU_job_runs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billable_UBUNTU_job_runsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billable_UBUNTU_job_runsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable_UBUNTU_job_runs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDurationMs gets the duration_ms property value. The duration_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) GetDurationMs()(*int32) { + return m.duration_ms +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["duration_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationMs(val) + } + return nil + } + res["job_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetJobId(val) + } + return nil + } + return res +} +// GetJobId gets the job_id property value. The job_id property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) GetJobId()(*int32) { + return m.job_id +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("duration_ms", m.GetDurationMs()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("job_id", m.GetJobId()) + 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 *WorkflowRunUsage_billable_UBUNTU_job_runs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDurationMs sets the duration_ms property value. The duration_ms property +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) SetDurationMs(value *int32)() { + m.duration_ms = value +} +// SetJobId sets the job_id property value. The job_id property +func (m *WorkflowRunUsage_billable_UBUNTU_job_runs) SetJobId(value *int32)() { + m.job_id = value +} +type WorkflowRunUsage_billable_UBUNTU_job_runsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDurationMs()(*int32) + GetJobId()(*int32) + SetDurationMs(value *int32)() + SetJobId(value *int32)() +} diff --git a/pkg/github/models/workflow_run_usage_billable_w_i_n_d_o_w_s.go b/pkg/github/models/workflow_run_usage_billable_w_i_n_d_o_w_s.go new file mode 100644 index 0000000..abe0685 --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable_w_i_n_d_o_w_s.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable_WINDOWS struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The job_runs property + job_runs []WorkflowRunUsage_billable_WINDOWS_job_runsable + // The jobs property + jobs *int32 + // The total_ms property + total_ms *int32 +} +// NewWorkflowRunUsage_billable_WINDOWS instantiates a new WorkflowRunUsage_billable_WINDOWS and sets the default values. +func NewWorkflowRunUsage_billable_WINDOWS()(*WorkflowRunUsage_billable_WINDOWS) { + m := &WorkflowRunUsage_billable_WINDOWS{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billable_WINDOWSFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billable_WINDOWSFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable_WINDOWS(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable_WINDOWS) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable_WINDOWS) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["job_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowRunUsage_billable_WINDOWS_job_runsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowRunUsage_billable_WINDOWS_job_runsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(WorkflowRunUsage_billable_WINDOWS_job_runsable) + } + } + m.SetJobRuns(res) + } + return nil + } + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetJobs(val) + } + return nil + } + res["total_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMs(val) + } + return nil + } + return res +} +// GetJobRuns gets the job_runs property value. The job_runs property +// returns a []WorkflowRunUsage_billable_WINDOWS_job_runsable when successful +func (m *WorkflowRunUsage_billable_WINDOWS) GetJobRuns()([]WorkflowRunUsage_billable_WINDOWS_job_runsable) { + return m.job_runs +} +// GetJobs gets the jobs property value. The jobs property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_WINDOWS) GetJobs()(*int32) { + return m.jobs +} +// GetTotalMs gets the total_ms property value. The total_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_WINDOWS) GetTotalMs()(*int32) { + return m.total_ms +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable_WINDOWS) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("jobs", m.GetJobs()) + if err != nil { + return err + } + } + if m.GetJobRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobRuns())) + for i, v := range m.GetJobRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("job_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_ms", m.GetTotalMs()) + 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 *WorkflowRunUsage_billable_WINDOWS) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetJobRuns sets the job_runs property value. The job_runs property +func (m *WorkflowRunUsage_billable_WINDOWS) SetJobRuns(value []WorkflowRunUsage_billable_WINDOWS_job_runsable)() { + m.job_runs = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *WorkflowRunUsage_billable_WINDOWS) SetJobs(value *int32)() { + m.jobs = value +} +// SetTotalMs sets the total_ms property value. The total_ms property +func (m *WorkflowRunUsage_billable_WINDOWS) SetTotalMs(value *int32)() { + m.total_ms = value +} +type WorkflowRunUsage_billable_WINDOWSable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJobRuns()([]WorkflowRunUsage_billable_WINDOWS_job_runsable) + GetJobs()(*int32) + GetTotalMs()(*int32) + SetJobRuns(value []WorkflowRunUsage_billable_WINDOWS_job_runsable)() + SetJobs(value *int32)() + SetTotalMs(value *int32)() +} diff --git a/pkg/github/models/workflow_run_usage_billable_w_i_n_d_o_w_s_job_runs.go b/pkg/github/models/workflow_run_usage_billable_w_i_n_d_o_w_s_job_runs.go new file mode 100644 index 0000000..74ced2b --- /dev/null +++ b/pkg/github/models/workflow_run_usage_billable_w_i_n_d_o_w_s_job_runs.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowRunUsage_billable_WINDOWS_job_runs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The duration_ms property + duration_ms *int32 + // The job_id property + job_id *int32 +} +// NewWorkflowRunUsage_billable_WINDOWS_job_runs instantiates a new WorkflowRunUsage_billable_WINDOWS_job_runs and sets the default values. +func NewWorkflowRunUsage_billable_WINDOWS_job_runs()(*WorkflowRunUsage_billable_WINDOWS_job_runs) { + m := &WorkflowRunUsage_billable_WINDOWS_job_runs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowRunUsage_billable_WINDOWS_job_runsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowRunUsage_billable_WINDOWS_job_runsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowRunUsage_billable_WINDOWS_job_runs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDurationMs gets the duration_ms property value. The duration_ms property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) GetDurationMs()(*int32) { + return m.duration_ms +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["duration_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationMs(val) + } + return nil + } + res["job_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetJobId(val) + } + return nil + } + return res +} +// GetJobId gets the job_id property value. The job_id property +// returns a *int32 when successful +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) GetJobId()(*int32) { + return m.job_id +} +// Serialize serializes information the current object +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("duration_ms", m.GetDurationMs()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("job_id", m.GetJobId()) + 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 *WorkflowRunUsage_billable_WINDOWS_job_runs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDurationMs sets the duration_ms property value. The duration_ms property +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) SetDurationMs(value *int32)() { + m.duration_ms = value +} +// SetJobId sets the job_id property value. The job_id property +func (m *WorkflowRunUsage_billable_WINDOWS_job_runs) SetJobId(value *int32)() { + m.job_id = value +} +type WorkflowRunUsage_billable_WINDOWS_job_runsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDurationMs()(*int32) + GetJobId()(*int32) + SetDurationMs(value *int32)() + SetJobId(value *int32)() +} diff --git a/pkg/github/models/workflow_state.go b/pkg/github/models/workflow_state.go new file mode 100644 index 0000000..9078846 --- /dev/null +++ b/pkg/github/models/workflow_state.go @@ -0,0 +1,45 @@ +package models +import ( + "errors" +) +type Workflow_state int + +const ( + ACTIVE_WORKFLOW_STATE Workflow_state = iota + DELETED_WORKFLOW_STATE + DISABLED_FORK_WORKFLOW_STATE + DISABLED_INACTIVITY_WORKFLOW_STATE + DISABLED_MANUALLY_WORKFLOW_STATE +) + +func (i Workflow_state) String() string { + return []string{"active", "deleted", "disabled_fork", "disabled_inactivity", "disabled_manually"}[i] +} +func ParseWorkflow_state(v string) (any, error) { + result := ACTIVE_WORKFLOW_STATE + switch v { + case "active": + result = ACTIVE_WORKFLOW_STATE + case "deleted": + result = DELETED_WORKFLOW_STATE + case "disabled_fork": + result = DISABLED_FORK_WORKFLOW_STATE + case "disabled_inactivity": + result = DISABLED_INACTIVITY_WORKFLOW_STATE + case "disabled_manually": + result = DISABLED_MANUALLY_WORKFLOW_STATE + default: + return 0, errors.New("Unknown Workflow_state value: " + v) + } + return &result, nil +} +func SerializeWorkflow_state(values []Workflow_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Workflow_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/workflow_usage.go b/pkg/github/models/workflow_usage.go new file mode 100644 index 0000000..2244755 --- /dev/null +++ b/pkg/github/models/workflow_usage.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowUsage workflow Usage +type WorkflowUsage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The billable property + billable WorkflowUsage_billableable +} +// NewWorkflowUsage instantiates a new WorkflowUsage and sets the default values. +func NewWorkflowUsage()(*WorkflowUsage) { + m := &WorkflowUsage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowUsage(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowUsage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillable gets the billable property value. The billable property +// returns a WorkflowUsage_billableable when successful +func (m *WorkflowUsage) GetBillable()(WorkflowUsage_billableable) { + return m.billable +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["billable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowUsage_billableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillable(val.(WorkflowUsage_billableable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *WorkflowUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("billable", m.GetBillable()) + 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 *WorkflowUsage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillable sets the billable property value. The billable property +func (m *WorkflowUsage) SetBillable(value WorkflowUsage_billableable)() { + m.billable = value +} +type WorkflowUsageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillable()(WorkflowUsage_billableable) + SetBillable(value WorkflowUsage_billableable)() +} diff --git a/pkg/github/models/workflow_usage_billable.go b/pkg/github/models/workflow_usage_billable.go new file mode 100644 index 0000000..ed37145 --- /dev/null +++ b/pkg/github/models/workflow_usage_billable.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowUsage_billable struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The MACOS property + mACOS WorkflowUsage_billable_MACOSable + // The UBUNTU property + uBUNTU WorkflowUsage_billable_UBUNTUable + // The WINDOWS property + wINDOWS WorkflowUsage_billable_WINDOWSable +} +// NewWorkflowUsage_billable instantiates a new WorkflowUsage_billable and sets the default values. +func NewWorkflowUsage_billable()(*WorkflowUsage_billable) { + m := &WorkflowUsage_billable{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowUsage_billableFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowUsage_billableFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowUsage_billable(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowUsage_billable) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowUsage_billable) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["MACOS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowUsage_billable_MACOSFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMACOS(val.(WorkflowUsage_billable_MACOSable)) + } + return nil + } + res["UBUNTU"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowUsage_billable_UBUNTUFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUBUNTU(val.(WorkflowUsage_billable_UBUNTUable)) + } + return nil + } + res["WINDOWS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowUsage_billable_WINDOWSFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWINDOWS(val.(WorkflowUsage_billable_WINDOWSable)) + } + return nil + } + return res +} +// GetMACOS gets the MACOS property value. The MACOS property +// returns a WorkflowUsage_billable_MACOSable when successful +func (m *WorkflowUsage_billable) GetMACOS()(WorkflowUsage_billable_MACOSable) { + return m.mACOS +} +// GetUBUNTU gets the UBUNTU property value. The UBUNTU property +// returns a WorkflowUsage_billable_UBUNTUable when successful +func (m *WorkflowUsage_billable) GetUBUNTU()(WorkflowUsage_billable_UBUNTUable) { + return m.uBUNTU +} +// GetWINDOWS gets the WINDOWS property value. The WINDOWS property +// returns a WorkflowUsage_billable_WINDOWSable when successful +func (m *WorkflowUsage_billable) GetWINDOWS()(WorkflowUsage_billable_WINDOWSable) { + return m.wINDOWS +} +// Serialize serializes information the current object +func (m *WorkflowUsage_billable) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("MACOS", m.GetMACOS()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("UBUNTU", m.GetUBUNTU()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("WINDOWS", m.GetWINDOWS()) + 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 *WorkflowUsage_billable) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMACOS sets the MACOS property value. The MACOS property +func (m *WorkflowUsage_billable) SetMACOS(value WorkflowUsage_billable_MACOSable)() { + m.mACOS = value +} +// SetUBUNTU sets the UBUNTU property value. The UBUNTU property +func (m *WorkflowUsage_billable) SetUBUNTU(value WorkflowUsage_billable_UBUNTUable)() { + m.uBUNTU = value +} +// SetWINDOWS sets the WINDOWS property value. The WINDOWS property +func (m *WorkflowUsage_billable) SetWINDOWS(value WorkflowUsage_billable_WINDOWSable)() { + m.wINDOWS = value +} +type WorkflowUsage_billableable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMACOS()(WorkflowUsage_billable_MACOSable) + GetUBUNTU()(WorkflowUsage_billable_UBUNTUable) + GetWINDOWS()(WorkflowUsage_billable_WINDOWSable) + SetMACOS(value WorkflowUsage_billable_MACOSable)() + SetUBUNTU(value WorkflowUsage_billable_UBUNTUable)() + SetWINDOWS(value WorkflowUsage_billable_WINDOWSable)() +} diff --git a/pkg/github/models/workflow_usage_billable_m_a_c_o_s.go b/pkg/github/models/workflow_usage_billable_m_a_c_o_s.go new file mode 100644 index 0000000..ddce713 --- /dev/null +++ b/pkg/github/models/workflow_usage_billable_m_a_c_o_s.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowUsage_billable_MACOS struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_ms property + total_ms *int32 +} +// NewWorkflowUsage_billable_MACOS instantiates a new WorkflowUsage_billable_MACOS and sets the default values. +func NewWorkflowUsage_billable_MACOS()(*WorkflowUsage_billable_MACOS) { + m := &WorkflowUsage_billable_MACOS{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowUsage_billable_MACOSFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowUsage_billable_MACOSFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowUsage_billable_MACOS(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowUsage_billable_MACOS) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowUsage_billable_MACOS) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMs(val) + } + return nil + } + return res +} +// GetTotalMs gets the total_ms property value. The total_ms property +// returns a *int32 when successful +func (m *WorkflowUsage_billable_MACOS) GetTotalMs()(*int32) { + return m.total_ms +} +// Serialize serializes information the current object +func (m *WorkflowUsage_billable_MACOS) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_ms", m.GetTotalMs()) + 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 *WorkflowUsage_billable_MACOS) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalMs sets the total_ms property value. The total_ms property +func (m *WorkflowUsage_billable_MACOS) SetTotalMs(value *int32)() { + m.total_ms = value +} +type WorkflowUsage_billable_MACOSable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalMs()(*int32) + SetTotalMs(value *int32)() +} diff --git a/pkg/github/models/workflow_usage_billable_u_b_u_n_t_u.go b/pkg/github/models/workflow_usage_billable_u_b_u_n_t_u.go new file mode 100644 index 0000000..b8edca4 --- /dev/null +++ b/pkg/github/models/workflow_usage_billable_u_b_u_n_t_u.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowUsage_billable_UBUNTU struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_ms property + total_ms *int32 +} +// NewWorkflowUsage_billable_UBUNTU instantiates a new WorkflowUsage_billable_UBUNTU and sets the default values. +func NewWorkflowUsage_billable_UBUNTU()(*WorkflowUsage_billable_UBUNTU) { + m := &WorkflowUsage_billable_UBUNTU{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowUsage_billable_UBUNTUFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowUsage_billable_UBUNTUFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowUsage_billable_UBUNTU(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowUsage_billable_UBUNTU) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowUsage_billable_UBUNTU) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMs(val) + } + return nil + } + return res +} +// GetTotalMs gets the total_ms property value. The total_ms property +// returns a *int32 when successful +func (m *WorkflowUsage_billable_UBUNTU) GetTotalMs()(*int32) { + return m.total_ms +} +// Serialize serializes information the current object +func (m *WorkflowUsage_billable_UBUNTU) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_ms", m.GetTotalMs()) + 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 *WorkflowUsage_billable_UBUNTU) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalMs sets the total_ms property value. The total_ms property +func (m *WorkflowUsage_billable_UBUNTU) SetTotalMs(value *int32)() { + m.total_ms = value +} +type WorkflowUsage_billable_UBUNTUable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalMs()(*int32) + SetTotalMs(value *int32)() +} diff --git a/pkg/github/models/workflow_usage_billable_w_i_n_d_o_w_s.go b/pkg/github/models/workflow_usage_billable_w_i_n_d_o_w_s.go new file mode 100644 index 0000000..41a062d --- /dev/null +++ b/pkg/github/models/workflow_usage_billable_w_i_n_d_o_w_s.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkflowUsage_billable_WINDOWS struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_ms property + total_ms *int32 +} +// NewWorkflowUsage_billable_WINDOWS instantiates a new WorkflowUsage_billable_WINDOWS and sets the default values. +func NewWorkflowUsage_billable_WINDOWS()(*WorkflowUsage_billable_WINDOWS) { + m := &WorkflowUsage_billable_WINDOWS{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateWorkflowUsage_billable_WINDOWSFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkflowUsage_billable_WINDOWSFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowUsage_billable_WINDOWS(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *WorkflowUsage_billable_WINDOWS) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkflowUsage_billable_WINDOWS) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_ms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalMs(val) + } + return nil + } + return res +} +// GetTotalMs gets the total_ms property value. The total_ms property +// returns a *int32 when successful +func (m *WorkflowUsage_billable_WINDOWS) GetTotalMs()(*int32) { + return m.total_ms +} +// Serialize serializes information the current object +func (m *WorkflowUsage_billable_WINDOWS) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_ms", m.GetTotalMs()) + 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 *WorkflowUsage_billable_WINDOWS) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalMs sets the total_ms property value. The total_ms property +func (m *WorkflowUsage_billable_WINDOWS) SetTotalMs(value *int32)() { + m.total_ms = value +} +type WorkflowUsage_billable_WINDOWSable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalMs()(*int32) + SetTotalMs(value *int32)() +} diff --git a/pkg/github/networks/item_item_events_request_builder.go b/pkg/github/networks/item_item_events_request_builder.go new file mode 100644 index 0000000..974e54a --- /dev/null +++ b/pkg/github/networks/item_item_events_request_builder.go @@ -0,0 +1,72 @@ +package networks + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEventsRequestBuilder builds and executes requests for operations under \networks\{owner}\{repo}\events +type ItemItemEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEventsRequestBuilderGetQueryParameters list public events for a network of repositories +type ItemItemEventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemEventsRequestBuilderInternal instantiates a new ItemItemEventsRequestBuilder and sets the default values. +func NewItemItemEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEventsRequestBuilder) { + m := &ItemItemEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/networks/{owner}/{repo}/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEventsRequestBuilder instantiates a new ItemItemEventsRequestBuilder and sets the default values. +func NewItemItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list public events for a network of repositories +// returns a []Eventable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-public-events-for-a-network-of-repositories +func (m *ItemItemEventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEventsRequestBuilder when successful +func (m *ItemItemEventsRequestBuilder) WithUrl(rawUrl string)(*ItemItemEventsRequestBuilder) { + return NewItemItemEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/networks/item_with_repo_item_request_builder.go b/pkg/github/networks/item_with_repo_item_request_builder.go new file mode 100644 index 0000000..f02c418 --- /dev/null +++ b/pkg/github/networks/item_with_repo_item_request_builder.go @@ -0,0 +1,28 @@ +package networks + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemWithRepoItemRequestBuilder builds and executes requests for operations under \networks\{owner}\{repo} +type ItemWithRepoItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemWithRepoItemRequestBuilderInternal instantiates a new ItemWithRepoItemRequestBuilder and sets the default values. +func NewItemWithRepoItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithRepoItemRequestBuilder) { + m := &ItemWithRepoItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/networks/{owner}/{repo}", pathParameters), + } + return m +} +// NewItemWithRepoItemRequestBuilder instantiates a new ItemWithRepoItemRequestBuilder and sets the default values. +func NewItemWithRepoItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithRepoItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemWithRepoItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Events the events property +// returns a *ItemItemEventsRequestBuilder when successful +func (m *ItemWithRepoItemRequestBuilder) Events()(*ItemItemEventsRequestBuilder) { + return NewItemItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/networks/networks_request_builder.go b/pkg/github/networks/networks_request_builder.go new file mode 100644 index 0000000..989652a --- /dev/null +++ b/pkg/github/networks/networks_request_builder.go @@ -0,0 +1,35 @@ +package networks + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// NetworksRequestBuilder builds and executes requests for operations under \networks +type NetworksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByOwner gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.networks.item collection +// returns a *WithOwnerItemRequestBuilder when successful +func (m *NetworksRequestBuilder) ByOwner(owner string)(*WithOwnerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if owner != "" { + urlTplParams["owner"] = owner + } + return NewWithOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewNetworksRequestBuilderInternal instantiates a new NetworksRequestBuilder and sets the default values. +func NewNetworksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*NetworksRequestBuilder) { + m := &NetworksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/networks", pathParameters), + } + return m +} +// NewNetworksRequestBuilder instantiates a new NetworksRequestBuilder and sets the default values. +func NewNetworksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*NetworksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewNetworksRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/networks/with_owner_item_request_builder.go b/pkg/github/networks/with_owner_item_request_builder.go new file mode 100644 index 0000000..4862ce6 --- /dev/null +++ b/pkg/github/networks/with_owner_item_request_builder.go @@ -0,0 +1,35 @@ +package networks + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithOwnerItemRequestBuilder builds and executes requests for operations under \networks\{owner} +type WithOwnerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.networks.item.item collection +// returns a *ItemWithRepoItemRequestBuilder when successful +func (m *WithOwnerItemRequestBuilder) ByRepo(repo string)(*ItemWithRepoItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo != "" { + urlTplParams["repo"] = repo + } + return NewItemWithRepoItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithOwnerItemRequestBuilderInternal instantiates a new WithOwnerItemRequestBuilder and sets the default values. +func NewWithOwnerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOwnerItemRequestBuilder) { + m := &WithOwnerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/networks/{owner}", pathParameters), + } + return m +} +// NewWithOwnerItemRequestBuilder instantiates a new WithOwnerItemRequestBuilder and sets the default values. +func NewWithOwnerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOwnerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithOwnerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/notifications/notifications_put_request_body.go b/pkg/github/notifications/notifications_put_request_body.go new file mode 100644 index 0000000..f4bad88 --- /dev/null +++ b/pkg/github/notifications/notifications_put_request_body.go @@ -0,0 +1,110 @@ +package notifications + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NotificationsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + last_read_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Whether the notification has been read. + read *bool +} +// NewNotificationsPutRequestBody instantiates a new NotificationsPutRequestBody and sets the default values. +func NewNotificationsPutRequestBody()(*NotificationsPutRequestBody) { + m := &NotificationsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNotificationsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNotificationsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NotificationsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NotificationsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["last_read_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReadAt(val) + } + return nil + } + res["read"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRead(val) + } + return nil + } + return res +} +// GetLastReadAt gets the last_read_at property value. Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. +// returns a *Time when successful +func (m *NotificationsPutRequestBody) GetLastReadAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_read_at +} +// GetRead gets the read property value. Whether the notification has been read. +// returns a *bool when successful +func (m *NotificationsPutRequestBody) GetRead()(*bool) { + return m.read +} +// Serialize serializes information the current object +func (m *NotificationsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("last_read_at", m.GetLastReadAt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("read", m.GetRead()) + 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 *NotificationsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLastReadAt sets the last_read_at property value. Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. +func (m *NotificationsPutRequestBody) SetLastReadAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_read_at = value +} +// SetRead sets the read property value. Whether the notification has been read. +func (m *NotificationsPutRequestBody) SetRead(value *bool)() { + m.read = value +} +type NotificationsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastReadAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRead()(*bool) + SetLastReadAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRead(value *bool)() +} diff --git a/pkg/github/notifications/notifications_put_response.go b/pkg/github/notifications/notifications_put_response.go new file mode 100644 index 0000000..35f2fa9 --- /dev/null +++ b/pkg/github/notifications/notifications_put_response.go @@ -0,0 +1,80 @@ +package notifications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type NotificationsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string +} +// NewNotificationsPutResponse instantiates a new NotificationsPutResponse and sets the default values. +func NewNotificationsPutResponse()(*NotificationsPutResponse) { + m := &NotificationsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNotificationsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNotificationsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *NotificationsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NotificationsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *NotificationsPutResponse) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *NotificationsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *NotificationsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *NotificationsPutResponse) SetMessage(value *string)() { + m.message = value +} +type NotificationsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + SetMessage(value *string)() +} diff --git a/pkg/github/notifications/notifications_request_builder.go b/pkg/github/notifications/notifications_request_builder.go new file mode 100644 index 0000000..77609cc --- /dev/null +++ b/pkg/github/notifications/notifications_request_builder.go @@ -0,0 +1,126 @@ +package notifications + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// NotificationsRequestBuilder builds and executes requests for operations under \notifications +type NotificationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NotificationsRequestBuilderGetQueryParameters list all notifications for the current user, sorted by most recently updated. +type NotificationsRequestBuilderGetQueryParameters struct { + // If `true`, show notifications marked as read. + All *bool `uriparametername:"all"` + // Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Before *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"before"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // If `true`, only shows notifications in which the user is directly participating or mentioned. + Participating *bool `uriparametername:"participating"` + // The number of results per page (max 50). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// NewNotificationsRequestBuilderInternal instantiates a new NotificationsRequestBuilder and sets the default values. +func NewNotificationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*NotificationsRequestBuilder) { + m := &NotificationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/notifications{?all*,before*,page*,participating*,per_page*,since*}", pathParameters), + } + return m +} +// NewNotificationsRequestBuilder instantiates a new NotificationsRequestBuilder and sets the default values. +func NewNotificationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*NotificationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewNotificationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all notifications for the current user, sorted by most recently updated. +// returns a []Threadable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#list-notifications-for-the-authenticated-user +func (m *NotificationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[NotificationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateThreadFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable) + } + } + return val, nil +} +// Put marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Cloud will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. +// returns a NotificationsPutResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#mark-notifications-as-read +func (m *NotificationsRequestBuilder) Put(ctx context.Context, body NotificationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(NotificationsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateNotificationsPutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(NotificationsPutResponseable), nil +} +// Threads the threads property +// returns a *ThreadsRequestBuilder when successful +func (m *NotificationsRequestBuilder) Threads()(*ThreadsRequestBuilder) { + return NewThreadsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation list all notifications for the current user, sorted by most recently updated. +// returns a *RequestInformation when successful +func (m *NotificationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[NotificationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Cloud will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. +// returns a *RequestInformation when successful +func (m *NotificationsRequestBuilder) ToPutRequestInformation(ctx context.Context, body NotificationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *NotificationsRequestBuilder when successful +func (m *NotificationsRequestBuilder) WithUrl(rawUrl string)(*NotificationsRequestBuilder) { + return NewNotificationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/notifications/threads_item_subscription_put_request_body.go b/pkg/github/notifications/threads_item_subscription_put_request_body.go new file mode 100644 index 0000000..c4780b4 --- /dev/null +++ b/pkg/github/notifications/threads_item_subscription_put_request_body.go @@ -0,0 +1,80 @@ +package notifications + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ThreadsItemSubscriptionPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to block all notifications from a thread. + ignored *bool +} +// NewThreadsItemSubscriptionPutRequestBody instantiates a new ThreadsItemSubscriptionPutRequestBody and sets the default values. +func NewThreadsItemSubscriptionPutRequestBody()(*ThreadsItemSubscriptionPutRequestBody) { + m := &ThreadsItemSubscriptionPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateThreadsItemSubscriptionPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateThreadsItemSubscriptionPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThreadsItemSubscriptionPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ThreadsItemSubscriptionPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ThreadsItemSubscriptionPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ignored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnored(val) + } + return nil + } + return res +} +// GetIgnored gets the ignored property value. Whether to block all notifications from a thread. +// returns a *bool when successful +func (m *ThreadsItemSubscriptionPutRequestBody) GetIgnored()(*bool) { + return m.ignored +} +// Serialize serializes information the current object +func (m *ThreadsItemSubscriptionPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("ignored", m.GetIgnored()) + 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 *ThreadsItemSubscriptionPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIgnored sets the ignored property value. Whether to block all notifications from a thread. +func (m *ThreadsItemSubscriptionPutRequestBody) SetIgnored(value *bool)() { + m.ignored = value +} +type ThreadsItemSubscriptionPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIgnored()(*bool) + SetIgnored(value *bool)() +} diff --git a/pkg/github/notifications/threads_item_subscription_request_builder.go b/pkg/github/notifications/threads_item_subscription_request_builder.go new file mode 100644 index 0000000..8525406 --- /dev/null +++ b/pkg/github/notifications/threads_item_subscription_request_builder.go @@ -0,0 +1,129 @@ +package notifications + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ThreadsItemSubscriptionRequestBuilder builds and executes requests for operations under \notifications\threads\{thread_id}\subscription +type ThreadsItemSubscriptionRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewThreadsItemSubscriptionRequestBuilderInternal instantiates a new ThreadsItemSubscriptionRequestBuilder and sets the default values. +func NewThreadsItemSubscriptionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ThreadsItemSubscriptionRequestBuilder) { + m := &ThreadsItemSubscriptionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/notifications/threads/{thread_id}/subscription", pathParameters), + } + return m +} +// NewThreadsItemSubscriptionRequestBuilder instantiates a new ThreadsItemSubscriptionRequestBuilder and sets the default values. +func NewThreadsItemSubscriptionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ThreadsItemSubscriptionRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewThreadsItemSubscriptionRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#delete-a-thread-subscription +func (m *ThreadsItemSubscriptionRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get this checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#get-a-repository-subscription).Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. +// returns a ThreadSubscriptionable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#get-a-thread-subscription-for-the-authenticated-user +func (m *ThreadsItemSubscriptionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ThreadSubscriptionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateThreadSubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ThreadSubscriptionable), nil +} +// Put if you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#delete-a-thread-subscription) endpoint. +// returns a ThreadSubscriptionable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#set-a-thread-subscription +func (m *ThreadsItemSubscriptionRequestBuilder) Put(ctx context.Context, body ThreadsItemSubscriptionPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ThreadSubscriptionable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateThreadSubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ThreadSubscriptionable), nil +} +// ToDeleteRequestInformation mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. +// returns a *RequestInformation when successful +func (m *ThreadsItemSubscriptionRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation this checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#get-a-repository-subscription).Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. +// returns a *RequestInformation when successful +func (m *ThreadsItemSubscriptionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation if you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#delete-a-thread-subscription) endpoint. +// returns a *RequestInformation when successful +func (m *ThreadsItemSubscriptionRequestBuilder) ToPutRequestInformation(ctx context.Context, body ThreadsItemSubscriptionPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ThreadsItemSubscriptionRequestBuilder when successful +func (m *ThreadsItemSubscriptionRequestBuilder) WithUrl(rawUrl string)(*ThreadsItemSubscriptionRequestBuilder) { + return NewThreadsItemSubscriptionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/notifications/threads_request_builder.go b/pkg/github/notifications/threads_request_builder.go new file mode 100644 index 0000000..ea3598f --- /dev/null +++ b/pkg/github/notifications/threads_request_builder.go @@ -0,0 +1,34 @@ +package notifications + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ThreadsRequestBuilder builds and executes requests for operations under \notifications\threads +type ThreadsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByThread_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.notifications.threads.item collection +// returns a *ThreadsWithThread_ItemRequestBuilder when successful +func (m *ThreadsRequestBuilder) ByThread_id(thread_id int32)(*ThreadsWithThread_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["thread_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(thread_id), 10) + return NewThreadsWithThread_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewThreadsRequestBuilderInternal instantiates a new ThreadsRequestBuilder and sets the default values. +func NewThreadsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ThreadsRequestBuilder) { + m := &ThreadsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/notifications/threads", pathParameters), + } + return m +} +// NewThreadsRequestBuilder instantiates a new ThreadsRequestBuilder and sets the default values. +func NewThreadsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ThreadsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewThreadsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/notifications/threads_with_thread_item_request_builder.go b/pkg/github/notifications/threads_with_thread_item_request_builder.go new file mode 100644 index 0000000..498a070 --- /dev/null +++ b/pkg/github/notifications/threads_with_thread_item_request_builder.go @@ -0,0 +1,117 @@ +package notifications + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ThreadsWithThread_ItemRequestBuilder builds and executes requests for operations under \notifications\threads\{thread_id} +type ThreadsWithThread_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewThreadsWithThread_ItemRequestBuilderInternal instantiates a new ThreadsWithThread_ItemRequestBuilder and sets the default values. +func NewThreadsWithThread_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ThreadsWithThread_ItemRequestBuilder) { + m := &ThreadsWithThread_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/notifications/threads/{thread_id}", pathParameters), + } + return m +} +// NewThreadsWithThread_ItemRequestBuilder instantiates a new ThreadsWithThread_ItemRequestBuilder and sets the default values. +func NewThreadsWithThread_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ThreadsWithThread_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewThreadsWithThread_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub Enterprise Cloud as done: https://github.com/notifications. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#mark-a-thread-as-done +func (m *ThreadsWithThread_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets information about a notification thread. +// returns a Threadable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#get-a-thread +func (m *ThreadsWithThread_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateThreadFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable), nil +} +// Patch marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Cloud: https://github.com/notifications. +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#mark-a-thread-as-read +func (m *ThreadsWithThread_ItemRequestBuilder) Patch(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Subscription the subscription property +// returns a *ThreadsItemSubscriptionRequestBuilder when successful +func (m *ThreadsWithThread_ItemRequestBuilder) Subscription()(*ThreadsItemSubscriptionRequestBuilder) { + return NewThreadsItemSubscriptionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub Enterprise Cloud as done: https://github.com/notifications. +// returns a *RequestInformation when successful +func (m *ThreadsWithThread_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets information about a notification thread. +// returns a *RequestInformation when successful +func (m *ThreadsWithThread_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Cloud: https://github.com/notifications. +// returns a *RequestInformation when successful +func (m *ThreadsWithThread_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ThreadsWithThread_ItemRequestBuilder when successful +func (m *ThreadsWithThread_ItemRequestBuilder) WithUrl(rawUrl string)(*ThreadsWithThread_ItemRequestBuilder) { + return NewThreadsWithThread_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/octocat/octocat_request_builder.go b/pkg/github/octocat/octocat_request_builder.go new file mode 100644 index 0000000..ea46d51 --- /dev/null +++ b/pkg/github/octocat/octocat_request_builder.go @@ -0,0 +1,61 @@ +package octocat + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// OctocatRequestBuilder builds and executes requests for operations under \octocat +type OctocatRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// OctocatRequestBuilderGetQueryParameters get the octocat as ASCII art +type OctocatRequestBuilderGetQueryParameters struct { + // The words to show in Octocat's speech bubble + S *string `uriparametername:"s"` +} +// NewOctocatRequestBuilderInternal instantiates a new OctocatRequestBuilder and sets the default values. +func NewOctocatRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OctocatRequestBuilder) { + m := &OctocatRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/octocat{?s*}", pathParameters), + } + return m +} +// NewOctocatRequestBuilder instantiates a new OctocatRequestBuilder and sets the default values. +func NewOctocatRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OctocatRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewOctocatRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the octocat as ASCII art +// returns a []byte when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/meta/meta#get-octocat +func (m *OctocatRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OctocatRequestBuilderGetQueryParameters])([]byte, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.([]byte), nil +} +// ToGetRequestInformation get the octocat as ASCII art +// returns a *RequestInformation when successful +func (m *OctocatRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OctocatRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/octocat-stream") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *OctocatRequestBuilder when successful +func (m *OctocatRequestBuilder) WithUrl(rawUrl string)(*OctocatRequestBuilder) { + return NewOctocatRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/organizations/item_custom_roles_get_response.go b/pkg/github/organizations/item_custom_roles_get_response.go new file mode 100644 index 0000000..b5085c0 --- /dev/null +++ b/pkg/github/organizations/item_custom_roles_get_response.go @@ -0,0 +1,122 @@ +package organizations + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCustom_rolesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The custom_roles property + custom_roles []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable + // The number of custom roles in this organization + total_count *int32 +} +// NewItemCustom_rolesGetResponse instantiates a new ItemCustom_rolesGetResponse and sets the default values. +func NewItemCustom_rolesGetResponse()(*ItemCustom_rolesGetResponse) { + m := &ItemCustom_rolesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCustom_rolesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCustom_rolesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCustom_rolesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCustom_rolesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomRoles gets the custom_roles property value. The custom_roles property +// returns a []OrganizationCustomRepositoryRoleable when successful +func (m *ItemCustom_rolesGetResponse) GetCustomRoles()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable) { + return m.custom_roles +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCustom_rolesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable) + } + } + m.SetCustomRoles(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The number of custom roles in this organization +// returns a *int32 when successful +func (m *ItemCustom_rolesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemCustom_rolesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCustomRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomRoles())) + for i, v := range m.GetCustomRoles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("custom_roles", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemCustom_rolesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomRoles sets the custom_roles property value. The custom_roles property +func (m *ItemCustom_rolesGetResponse) SetCustomRoles(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable)() { + m.custom_roles = value +} +// SetTotalCount sets the total_count property value. The number of custom roles in this organization +func (m *ItemCustom_rolesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemCustom_rolesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomRoles()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable) + GetTotalCount()(*int32) + SetCustomRoles(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/organizations/item_custom_roles_request_builder.go b/pkg/github/organizations/item_custom_roles_request_builder.go new file mode 100644 index 0000000..8fc9b44 --- /dev/null +++ b/pkg/github/organizations/item_custom_roles_request_builder.go @@ -0,0 +1,59 @@ +package organizations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCustom_rolesRequestBuilder builds and executes requests for operations under \organizations\{organization_id}\custom_roles +type ItemCustom_rolesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCustom_rolesRequestBuilderInternal instantiates a new ItemCustom_rolesRequestBuilder and sets the default values. +func NewItemCustom_rolesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustom_rolesRequestBuilder) { + m := &ItemCustom_rolesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_id}/custom_roles", pathParameters), + } + return m +} +// NewItemCustom_rolesRequestBuilder instantiates a new ItemCustom_rolesRequestBuilder and sets the default values. +func NewItemCustom_rolesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustom_rolesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCustom_rolesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This operation is deprecated and will be removed in the future.Use the "[List custom repository roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization)" endpoint instead.List the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Deprecated: +// returns a ItemCustom_rolesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#deprecated---list-custom-repository-roles-in-an-organization +func (m *ItemCustom_rolesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCustom_rolesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCustom_rolesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCustom_rolesGetResponseable), nil +} +// ToGetRequestInformation **Note**: This operation is deprecated and will be removed in the future.Use the "[List custom repository roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization)" endpoint instead.List the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCustom_rolesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemCustom_rolesRequestBuilder when successful +func (m *ItemCustom_rolesRequestBuilder) WithUrl(rawUrl string)(*ItemCustom_rolesRequestBuilder) { + return NewItemCustom_rolesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/organizations/organizations_request_builder.go b/pkg/github/organizations/organizations_request_builder.go new file mode 100644 index 0000000..3f5350d --- /dev/null +++ b/pkg/github/organizations/organizations_request_builder.go @@ -0,0 +1,79 @@ +package organizations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// OrganizationsRequestBuilder builds and executes requests for operations under \organizations +type OrganizationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// OrganizationsRequestBuilderGetQueryParameters lists all organizations, in the order that they were created.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. +type OrganizationsRequestBuilderGetQueryParameters struct { + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // An organization ID. Only return organizations with an ID greater than this ID. + Since *int32 `uriparametername:"since"` +} +// ByOrganization_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.organizations.item collection +// returns a *WithOrganization_ItemRequestBuilder when successful +func (m *OrganizationsRequestBuilder) ByOrganization_id(organization_id string)(*WithOrganization_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if organization_id != "" { + urlTplParams["organization_id"] = organization_id + } + return NewWithOrganization_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewOrganizationsRequestBuilderInternal instantiates a new OrganizationsRequestBuilder and sets the default values. +func NewOrganizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrganizationsRequestBuilder) { + m := &OrganizationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations{?per_page*,since*}", pathParameters), + } + return m +} +// NewOrganizationsRequestBuilder instantiates a new OrganizationsRequestBuilder and sets the default values. +func NewOrganizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrganizationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewOrganizationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all organizations, in the order that they were created.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. +// returns a []OrganizationSimpleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-organizations +func (m *OrganizationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OrganizationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSimpleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + } + } + return val, nil +} +// ToGetRequestInformation lists all organizations, in the order that they were created.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. +// returns a *RequestInformation when successful +func (m *OrganizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OrganizationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *OrganizationsRequestBuilder when successful +func (m *OrganizationsRequestBuilder) WithUrl(rawUrl string)(*OrganizationsRequestBuilder) { + return NewOrganizationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/organizations/with_organization_item_request_builder.go b/pkg/github/organizations/with_organization_item_request_builder.go new file mode 100644 index 0000000..f91f696 --- /dev/null +++ b/pkg/github/organizations/with_organization_item_request_builder.go @@ -0,0 +1,28 @@ +package organizations + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithOrganization_ItemRequestBuilder builds and executes requests for operations under \organizations\{organization_id} +type WithOrganization_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithOrganization_ItemRequestBuilderInternal instantiates a new WithOrganization_ItemRequestBuilder and sets the default values. +func NewWithOrganization_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOrganization_ItemRequestBuilder) { + m := &WithOrganization_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{organization_id}", pathParameters), + } + return m +} +// NewWithOrganization_ItemRequestBuilder instantiates a new WithOrganization_ItemRequestBuilder and sets the default values. +func NewWithOrganization_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOrganization_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithOrganization_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Custom_roles the custom_roles property +// returns a *ItemCustom_rolesRequestBuilder when successful +func (m *WithOrganization_ItemRequestBuilder) Custom_roles()(*ItemCustom_rolesRequestBuilder) { + return NewItemCustom_rolesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item/actions/runnergroups/item/with_runner_group_patch_request_body_visibility.go b/pkg/github/orgs/item/actions/runnergroups/item/with_runner_group_patch_request_body_visibility.go new file mode 100644 index 0000000..ab769bd --- /dev/null +++ b/pkg/github/orgs/item/actions/runnergroups/item/with_runner_group_patch_request_body_visibility.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. +type WithRunner_group_PatchRequestBody_visibility int + +const ( + SELECTED_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY WithRunner_group_PatchRequestBody_visibility = iota + ALL_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + PRIVATE_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY +) + +func (i WithRunner_group_PatchRequestBody_visibility) String() string { + return []string{"selected", "all", "private"}[i] +} +func ParseWithRunner_group_PatchRequestBody_visibility(v string) (any, error) { + result := SELECTED_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + switch v { + case "selected": + result = SELECTED_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + case "all": + result = ALL_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_WITHRUNNER_GROUP_PATCHREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown WithRunner_group_PatchRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeWithRunner_group_PatchRequestBody_visibility(values []WithRunner_group_PatchRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithRunner_group_PatchRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/actions/runnergroups/runner_groups_post_request_body_visibility.go b/pkg/github/orgs/item/actions/runnergroups/runner_groups_post_request_body_visibility.go new file mode 100644 index 0000000..6cc7a4b --- /dev/null +++ b/pkg/github/orgs/item/actions/runnergroups/runner_groups_post_request_body_visibility.go @@ -0,0 +1,40 @@ +package runnergroups +import ( + "errors" +) +// Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. +type RunnerGroupsPostRequestBody_visibility int + +const ( + SELECTED_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY RunnerGroupsPostRequestBody_visibility = iota + ALL_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + PRIVATE_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY +) + +func (i RunnerGroupsPostRequestBody_visibility) String() string { + return []string{"selected", "all", "private"}[i] +} +func ParseRunnerGroupsPostRequestBody_visibility(v string) (any, error) { + result := SELECTED_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + switch v { + case "selected": + result = SELECTED_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + case "all": + result = ALL_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_RUNNERGROUPSPOSTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown RunnerGroupsPostRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeRunnerGroupsPostRequestBody_visibility(values []RunnerGroupsPostRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RunnerGroupsPostRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go b/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go new file mode 100644 index 0000000..b2b460f --- /dev/null +++ b/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. +type WithSecret_namePutRequestBody_visibility int + +const ( + ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY WithSecret_namePutRequestBody_visibility = iota + PRIVATE_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY +) + +func (i WithSecret_namePutRequestBody_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseWithSecret_namePutRequestBody_visibility(v string) (any, error) { + result := ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + switch v { + case "all": + result = ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + case "selected": + result = SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown WithSecret_namePutRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeWithSecret_namePutRequestBody_visibility(values []WithSecret_namePutRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithSecret_namePutRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go b/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go new file mode 100644 index 0000000..97d17fa --- /dev/null +++ b/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. +type WithNamePatchRequestBody_visibility int + +const ( + ALL_WITHNAMEPATCHREQUESTBODY_VISIBILITY WithNamePatchRequestBody_visibility = iota + PRIVATE_WITHNAMEPATCHREQUESTBODY_VISIBILITY + SELECTED_WITHNAMEPATCHREQUESTBODY_VISIBILITY +) + +func (i WithNamePatchRequestBody_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseWithNamePatchRequestBody_visibility(v string) (any, error) { + result := ALL_WITHNAMEPATCHREQUESTBODY_VISIBILITY + switch v { + case "all": + result = ALL_WITHNAMEPATCHREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_WITHNAMEPATCHREQUESTBODY_VISIBILITY + case "selected": + result = SELECTED_WITHNAMEPATCHREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown WithNamePatchRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeWithNamePatchRequestBody_visibility(values []WithNamePatchRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithNamePatchRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go b/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go new file mode 100644 index 0000000..8454fda --- /dev/null +++ b/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go @@ -0,0 +1,40 @@ +package variables +import ( + "errors" +) +// The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. +type VariablesPostRequestBody_visibility int + +const ( + ALL_VARIABLESPOSTREQUESTBODY_VISIBILITY VariablesPostRequestBody_visibility = iota + PRIVATE_VARIABLESPOSTREQUESTBODY_VISIBILITY + SELECTED_VARIABLESPOSTREQUESTBODY_VISIBILITY +) + +func (i VariablesPostRequestBody_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseVariablesPostRequestBody_visibility(v string) (any, error) { + result := ALL_VARIABLESPOSTREQUESTBODY_VISIBILITY + switch v { + case "all": + result = ALL_VARIABLESPOSTREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_VARIABLESPOSTREQUESTBODY_VISIBILITY + case "selected": + result = SELECTED_VARIABLESPOSTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown VariablesPostRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeVariablesPostRequestBody_visibility(values []VariablesPostRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i VariablesPostRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/auditlog/get_include_query_parameter_type.go b/pkg/github/orgs/item/auditlog/get_include_query_parameter_type.go new file mode 100644 index 0000000..6ebf915 --- /dev/null +++ b/pkg/github/orgs/item/auditlog/get_include_query_parameter_type.go @@ -0,0 +1,39 @@ +package auditlog +import ( + "errors" +) +type GetIncludeQueryParameterType int + +const ( + WEB_GETINCLUDEQUERYPARAMETERTYPE GetIncludeQueryParameterType = iota + GIT_GETINCLUDEQUERYPARAMETERTYPE + ALL_GETINCLUDEQUERYPARAMETERTYPE +) + +func (i GetIncludeQueryParameterType) String() string { + return []string{"web", "git", "all"}[i] +} +func ParseGetIncludeQueryParameterType(v string) (any, error) { + result := WEB_GETINCLUDEQUERYPARAMETERTYPE + switch v { + case "web": + result = WEB_GETINCLUDEQUERYPARAMETERTYPE + case "git": + result = GIT_GETINCLUDEQUERYPARAMETERTYPE + case "all": + result = ALL_GETINCLUDEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetIncludeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetIncludeQueryParameterType(values []GetIncludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetIncludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/auditlog/get_order_query_parameter_type.go b/pkg/github/orgs/item/auditlog/get_order_query_parameter_type.go new file mode 100644 index 0000000..d1c51d7 --- /dev/null +++ b/pkg/github/orgs/item/auditlog/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package auditlog +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go b/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_advanced_security.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_advanced_security.go new file mode 100644 index 0000000..cecb782 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_advanced_security.go @@ -0,0 +1,37 @@ +package configurations +import ( + "errors" +) +// The enablement status of GitHub Advanced Security +type ConfigurationsPostRequestBody_advanced_security int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY ConfigurationsPostRequestBody_advanced_security = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY +) + +func (i ConfigurationsPostRequestBody_advanced_security) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseConfigurationsPostRequestBody_advanced_security(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_advanced_security value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_advanced_security(values []ConfigurationsPostRequestBody_advanced_security) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_advanced_security) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_code_scanning_default_setup.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_code_scanning_default_setup.go new file mode 100644 index 0000000..b18aa0b --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_code_scanning_default_setup.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of code scanning default setup +type ConfigurationsPostRequestBody_code_scanning_default_setup int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP ConfigurationsPostRequestBody_code_scanning_default_setup = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP +) + +func (i ConfigurationsPostRequestBody_code_scanning_default_setup) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_code_scanning_default_setup(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_code_scanning_default_setup value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_code_scanning_default_setup(values []ConfigurationsPostRequestBody_code_scanning_default_setup) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_code_scanning_default_setup) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependabot_alerts.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependabot_alerts.go new file mode 100644 index 0000000..9a83b7c --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependabot_alerts.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of Dependabot alerts +type ConfigurationsPostRequestBody_dependabot_alerts int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS ConfigurationsPostRequestBody_dependabot_alerts = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS +) + +func (i ConfigurationsPostRequestBody_dependabot_alerts) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_dependabot_alerts(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_dependabot_alerts value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_dependabot_alerts(values []ConfigurationsPostRequestBody_dependabot_alerts) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_dependabot_alerts) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependabot_security_updates.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependabot_security_updates.go new file mode 100644 index 0000000..bb975a4 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependabot_security_updates.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of Dependabot security updates +type ConfigurationsPostRequestBody_dependabot_security_updates int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES ConfigurationsPostRequestBody_dependabot_security_updates = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES +) + +func (i ConfigurationsPostRequestBody_dependabot_security_updates) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_dependabot_security_updates(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_dependabot_security_updates value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_dependabot_security_updates(values []ConfigurationsPostRequestBody_dependabot_security_updates) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_dependabot_security_updates) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph.go new file mode 100644 index 0000000..80a486f --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of Dependency Graph +type ConfigurationsPostRequestBody_dependency_graph int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH ConfigurationsPostRequestBody_dependency_graph = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH +) + +func (i ConfigurationsPostRequestBody_dependency_graph) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_dependency_graph(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_dependency_graph value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_dependency_graph(values []ConfigurationsPostRequestBody_dependency_graph) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_dependency_graph) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_private_vulnerability_reporting.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_private_vulnerability_reporting.go new file mode 100644 index 0000000..c8b98e5 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_private_vulnerability_reporting.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of private vulnerability reporting +type ConfigurationsPostRequestBody_private_vulnerability_reporting int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING ConfigurationsPostRequestBody_private_vulnerability_reporting = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING +) + +func (i ConfigurationsPostRequestBody_private_vulnerability_reporting) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_private_vulnerability_reporting(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_private_vulnerability_reporting value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_private_vulnerability_reporting(values []ConfigurationsPostRequestBody_private_vulnerability_reporting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_private_vulnerability_reporting) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_secret_scanning.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_secret_scanning.go new file mode 100644 index 0000000..97ae2a4 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_secret_scanning.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of secret scanning +type ConfigurationsPostRequestBody_secret_scanning int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING ConfigurationsPostRequestBody_secret_scanning = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING +) + +func (i ConfigurationsPostRequestBody_secret_scanning) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_secret_scanning(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_secret_scanning value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_secret_scanning(values []ConfigurationsPostRequestBody_secret_scanning) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_secret_scanning) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_secret_scanning_push_protection.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_secret_scanning_push_protection.go new file mode 100644 index 0000000..3f411e4 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_secret_scanning_push_protection.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of secret scanning push protection +type ConfigurationsPostRequestBody_secret_scanning_push_protection int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION ConfigurationsPostRequestBody_secret_scanning_push_protection = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION +) + +func (i ConfigurationsPostRequestBody_secret_scanning_push_protection) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_secret_scanning_push_protection(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_secret_scanning_push_protection value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_secret_scanning_push_protection(values []ConfigurationsPostRequestBody_secret_scanning_push_protection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_secret_scanning_push_protection) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/get_target_type_query_parameter_type.go b/pkg/github/orgs/item/codesecurity/configurations/get_target_type_query_parameter_type.go new file mode 100644 index 0000000..2dd790b --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/get_target_type_query_parameter_type.go @@ -0,0 +1,36 @@ +package configurations +import ( + "errors" +) +type GetTarget_typeQueryParameterType int + +const ( + GLOBAL_GETTARGET_TYPEQUERYPARAMETERTYPE GetTarget_typeQueryParameterType = iota + ALL_GETTARGET_TYPEQUERYPARAMETERTYPE +) + +func (i GetTarget_typeQueryParameterType) String() string { + return []string{"global", "all"}[i] +} +func ParseGetTarget_typeQueryParameterType(v string) (any, error) { + result := GLOBAL_GETTARGET_TYPEQUERYPARAMETERTYPE + switch v { + case "global": + result = GLOBAL_GETTARGET_TYPEQUERYPARAMETERTYPE + case "all": + result = ALL_GETTARGET_TYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTarget_typeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTarget_typeQueryParameterType(values []GetTarget_typeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTarget_typeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_scope.go b/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_scope.go new file mode 100644 index 0000000..0619def --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_scope.go @@ -0,0 +1,43 @@ +package attach +import ( + "errors" +) +// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` +type AttachPostRequestBody_scope int + +const ( + ALL_ATTACHPOSTREQUESTBODY_SCOPE AttachPostRequestBody_scope = iota + PUBLIC_ATTACHPOSTREQUESTBODY_SCOPE + PRIVATE_OR_INTERNAL_ATTACHPOSTREQUESTBODY_SCOPE + SELECTED_ATTACHPOSTREQUESTBODY_SCOPE +) + +func (i AttachPostRequestBody_scope) String() string { + return []string{"all", "public", "private_or_internal", "selected"}[i] +} +func ParseAttachPostRequestBody_scope(v string) (any, error) { + result := ALL_ATTACHPOSTREQUESTBODY_SCOPE + switch v { + case "all": + result = ALL_ATTACHPOSTREQUESTBODY_SCOPE + case "public": + result = PUBLIC_ATTACHPOSTREQUESTBODY_SCOPE + case "private_or_internal": + result = PRIVATE_OR_INTERNAL_ATTACHPOSTREQUESTBODY_SCOPE + case "selected": + result = SELECTED_ATTACHPOSTREQUESTBODY_SCOPE + default: + return 0, errors.New("Unknown AttachPostRequestBody_scope value: " + v) + } + return &result, nil +} +func SerializeAttachPostRequestBody_scope(values []AttachPostRequestBody_scope) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AttachPostRequestBody_scope) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/defaults/defaults_put_request_body_default_for_new_repos.go b/pkg/github/orgs/item/codesecurity/configurations/item/defaults/defaults_put_request_body_default_for_new_repos.go new file mode 100644 index 0000000..aa6f264 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/defaults/defaults_put_request_body_default_for_new_repos.go @@ -0,0 +1,43 @@ +package defaults +import ( + "errors" +) +// Specify which types of repository this security configuration should be applied to by default. +type DefaultsPutRequestBody_default_for_new_repos int + +const ( + ALL_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS DefaultsPutRequestBody_default_for_new_repos = iota + NONE_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + PRIVATE_AND_INTERNAL_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + PUBLIC_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS +) + +func (i DefaultsPutRequestBody_default_for_new_repos) String() string { + return []string{"all", "none", "private_and_internal", "public"}[i] +} +func ParseDefaultsPutRequestBody_default_for_new_repos(v string) (any, error) { + result := ALL_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + switch v { + case "all": + result = ALL_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + case "none": + result = NONE_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + case "private_and_internal": + result = PRIVATE_AND_INTERNAL_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + case "public": + result = PUBLIC_DEFAULTSPUTREQUESTBODY_DEFAULT_FOR_NEW_REPOS + default: + return 0, errors.New("Unknown DefaultsPutRequestBody_default_for_new_repos value: " + v) + } + return &result, nil +} +func SerializeDefaultsPutRequestBody_default_for_new_repos(values []DefaultsPutRequestBody_default_for_new_repos) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DefaultsPutRequestBody_default_for_new_repos) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/defaults/defaults_put_response_default_for_new_repos.go b/pkg/github/orgs/item/codesecurity/configurations/item/defaults/defaults_put_response_default_for_new_repos.go new file mode 100644 index 0000000..decd4fc --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/defaults/defaults_put_response_default_for_new_repos.go @@ -0,0 +1,43 @@ +package defaults +import ( + "errors" +) +// Specifies which types of repository this security configuration is applied to by default. +type DefaultsPutResponse_default_for_new_repos int + +const ( + ALL_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS DefaultsPutResponse_default_for_new_repos = iota + NONE_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + PRIVATE_AND_INTERNAL_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + PUBLIC_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS +) + +func (i DefaultsPutResponse_default_for_new_repos) String() string { + return []string{"all", "none", "private_and_internal", "public"}[i] +} +func ParseDefaultsPutResponse_default_for_new_repos(v string) (any, error) { + result := ALL_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + switch v { + case "all": + result = ALL_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + case "none": + result = NONE_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + case "private_and_internal": + result = PRIVATE_AND_INTERNAL_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + case "public": + result = PUBLIC_DEFAULTSPUTRESPONSE_DEFAULT_FOR_NEW_REPOS + default: + return 0, errors.New("Unknown DefaultsPutResponse_default_for_new_repos value: " + v) + } + return &result, nil +} +func SerializeDefaultsPutResponse_default_for_new_repos(values []DefaultsPutResponse_default_for_new_repos) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DefaultsPutResponse_default_for_new_repos) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_advanced_security.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_advanced_security.go new file mode 100644 index 0000000..2bbc959 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_advanced_security.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The enablement status of GitHub Advanced Security +type WithConfiguration_PatchRequestBody_advanced_security int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_ADVANCED_SECURITY WithConfiguration_PatchRequestBody_advanced_security = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_ADVANCED_SECURITY +) + +func (i WithConfiguration_PatchRequestBody_advanced_security) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseWithConfiguration_PatchRequestBody_advanced_security(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_ADVANCED_SECURITY + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_ADVANCED_SECURITY + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_ADVANCED_SECURITY + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_advanced_security value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_advanced_security(values []WithConfiguration_PatchRequestBody_advanced_security) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_advanced_security) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_code_scanning_default_setup.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_code_scanning_default_setup.go new file mode 100644 index 0000000..a7bc394 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_code_scanning_default_setup.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of code scanning default setup +type WithConfiguration_PatchRequestBody_code_scanning_default_setup int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP WithConfiguration_PatchRequestBody_code_scanning_default_setup = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP +) + +func (i WithConfiguration_PatchRequestBody_code_scanning_default_setup) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_code_scanning_default_setup(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_code_scanning_default_setup value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_code_scanning_default_setup(values []WithConfiguration_PatchRequestBody_code_scanning_default_setup) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_code_scanning_default_setup) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependabot_alerts.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependabot_alerts.go new file mode 100644 index 0000000..888e98b --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependabot_alerts.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of Dependabot alerts +type WithConfiguration_PatchRequestBody_dependabot_alerts int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS WithConfiguration_PatchRequestBody_dependabot_alerts = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS +) + +func (i WithConfiguration_PatchRequestBody_dependabot_alerts) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_dependabot_alerts(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_ALERTS + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_dependabot_alerts value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_dependabot_alerts(values []WithConfiguration_PatchRequestBody_dependabot_alerts) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_dependabot_alerts) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependabot_security_updates.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependabot_security_updates.go new file mode 100644 index 0000000..42fc007 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependabot_security_updates.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of Dependabot security updates +type WithConfiguration_PatchRequestBody_dependabot_security_updates int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES WithConfiguration_PatchRequestBody_dependabot_security_updates = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES +) + +func (i WithConfiguration_PatchRequestBody_dependabot_security_updates) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_dependabot_security_updates(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDABOT_SECURITY_UPDATES + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_dependabot_security_updates value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_dependabot_security_updates(values []WithConfiguration_PatchRequestBody_dependabot_security_updates) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_dependabot_security_updates) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph.go new file mode 100644 index 0000000..88c6444 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of Dependency Graph +type WithConfiguration_PatchRequestBody_dependency_graph int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH WithConfiguration_PatchRequestBody_dependency_graph = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH +) + +func (i WithConfiguration_PatchRequestBody_dependency_graph) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_dependency_graph(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_dependency_graph value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_dependency_graph(values []WithConfiguration_PatchRequestBody_dependency_graph) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_dependency_graph) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_private_vulnerability_reporting.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_private_vulnerability_reporting.go new file mode 100644 index 0000000..9b65338 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_private_vulnerability_reporting.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of private vulnerability reporting +type WithConfiguration_PatchRequestBody_private_vulnerability_reporting int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING WithConfiguration_PatchRequestBody_private_vulnerability_reporting = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING +) + +func (i WithConfiguration_PatchRequestBody_private_vulnerability_reporting) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_private_vulnerability_reporting(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_PRIVATE_VULNERABILITY_REPORTING + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_private_vulnerability_reporting value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_private_vulnerability_reporting(values []WithConfiguration_PatchRequestBody_private_vulnerability_reporting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_private_vulnerability_reporting) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_secret_scanning.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_secret_scanning.go new file mode 100644 index 0000000..88a203c --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_secret_scanning.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of secret scanning +type WithConfiguration_PatchRequestBody_secret_scanning int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING WithConfiguration_PatchRequestBody_secret_scanning = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING +) + +func (i WithConfiguration_PatchRequestBody_secret_scanning) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_secret_scanning(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_secret_scanning value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_secret_scanning(values []WithConfiguration_PatchRequestBody_secret_scanning) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_secret_scanning) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_secret_scanning_push_protection.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_secret_scanning_push_protection.go new file mode 100644 index 0000000..0ae4f30 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_secret_scanning_push_protection.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of secret scanning push protection +type WithConfiguration_PatchRequestBody_secret_scanning_push_protection int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION WithConfiguration_PatchRequestBody_secret_scanning_push_protection = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION +) + +func (i WithConfiguration_PatchRequestBody_secret_scanning_push_protection) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_secret_scanning_push_protection(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_PUSH_PROTECTION + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_secret_scanning_push_protection value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_secret_scanning_push_protection(values []WithConfiguration_PatchRequestBody_secret_scanning_push_protection) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_secret_scanning_push_protection) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go b/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go new file mode 100644 index 0000000..0d37410 --- /dev/null +++ b/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go @@ -0,0 +1,43 @@ +package access +import ( + "errors" +) +// Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. +type AccessPutRequestBody_visibility int + +const ( + DISABLED_ACCESSPUTREQUESTBODY_VISIBILITY AccessPutRequestBody_visibility = iota + SELECTED_MEMBERS_ACCESSPUTREQUESTBODY_VISIBILITY + ALL_MEMBERS_ACCESSPUTREQUESTBODY_VISIBILITY + ALL_MEMBERS_AND_OUTSIDE_COLLABORATORS_ACCESSPUTREQUESTBODY_VISIBILITY +) + +func (i AccessPutRequestBody_visibility) String() string { + return []string{"disabled", "selected_members", "all_members", "all_members_and_outside_collaborators"}[i] +} +func ParseAccessPutRequestBody_visibility(v string) (any, error) { + result := DISABLED_ACCESSPUTREQUESTBODY_VISIBILITY + switch v { + case "disabled": + result = DISABLED_ACCESSPUTREQUESTBODY_VISIBILITY + case "selected_members": + result = SELECTED_MEMBERS_ACCESSPUTREQUESTBODY_VISIBILITY + case "all_members": + result = ALL_MEMBERS_ACCESSPUTREQUESTBODY_VISIBILITY + case "all_members_and_outside_collaborators": + result = ALL_MEMBERS_AND_OUTSIDE_COLLABORATORS_ACCESSPUTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown AccessPutRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeAccessPutRequestBody_visibility(values []AccessPutRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AccessPutRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go b/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go new file mode 100644 index 0000000..b2b460f --- /dev/null +++ b/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. +type WithSecret_namePutRequestBody_visibility int + +const ( + ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY WithSecret_namePutRequestBody_visibility = iota + PRIVATE_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY +) + +func (i WithSecret_namePutRequestBody_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseWithSecret_namePutRequestBody_visibility(v string) (any, error) { + result := ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + switch v { + case "all": + result = ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + case "selected": + result = SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown WithSecret_namePutRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeWithSecret_namePutRequestBody_visibility(values []WithSecret_namePutRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithSecret_namePutRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go new file mode 100644 index 0000000..906bdb7 --- /dev/null +++ b/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetScopeQueryParameterType int + +const ( + DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE GetScopeQueryParameterType = iota + RUNTIME_GETSCOPEQUERYPARAMETERTYPE +) + +func (i GetScopeQueryParameterType) String() string { + return []string{"development", "runtime"}[i] +} +func ParseGetScopeQueryParameterType(v string) (any, error) { + result := DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE + switch v { + case "development": + result = DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE + case "runtime": + result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetScopeQueryParameterType(values []GetScopeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetScopeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go b/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go new file mode 100644 index 0000000..b2b460f --- /dev/null +++ b/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. +type WithSecret_namePutRequestBody_visibility int + +const ( + ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY WithSecret_namePutRequestBody_visibility = iota + PRIVATE_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY +) + +func (i WithSecret_namePutRequestBody_visibility) String() string { + return []string{"all", "private", "selected"}[i] +} +func ParseWithSecret_namePutRequestBody_visibility(v string) (any, error) { + result := ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + switch v { + case "all": + result = ALL_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + case "selected": + result = SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown WithSecret_namePutRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeWithSecret_namePutRequestBody_visibility(values []WithSecret_namePutRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithSecret_namePutRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go b/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go new file mode 100644 index 0000000..9048b94 --- /dev/null +++ b/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go @@ -0,0 +1,39 @@ +package invitations +import ( + "errors" +) +type GetInvitation_sourceQueryParameterType int + +const ( + ALL_GETINVITATION_SOURCEQUERYPARAMETERTYPE GetInvitation_sourceQueryParameterType = iota + MEMBER_GETINVITATION_SOURCEQUERYPARAMETERTYPE + SCIM_GETINVITATION_SOURCEQUERYPARAMETERTYPE +) + +func (i GetInvitation_sourceQueryParameterType) String() string { + return []string{"all", "member", "scim"}[i] +} +func ParseGetInvitation_sourceQueryParameterType(v string) (any, error) { + result := ALL_GETINVITATION_SOURCEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETINVITATION_SOURCEQUERYPARAMETERTYPE + case "member": + result = MEMBER_GETINVITATION_SOURCEQUERYPARAMETERTYPE + case "scim": + result = SCIM_GETINVITATION_SOURCEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetInvitation_sourceQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetInvitation_sourceQueryParameterType(values []GetInvitation_sourceQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetInvitation_sourceQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go b/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go new file mode 100644 index 0000000..afd7d40 --- /dev/null +++ b/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go @@ -0,0 +1,45 @@ +package invitations +import ( + "errors" +) +type GetRoleQueryParameterType int + +const ( + ALL_GETROLEQUERYPARAMETERTYPE GetRoleQueryParameterType = iota + ADMIN_GETROLEQUERYPARAMETERTYPE + DIRECT_MEMBER_GETROLEQUERYPARAMETERTYPE + BILLING_MANAGER_GETROLEQUERYPARAMETERTYPE + HIRING_MANAGER_GETROLEQUERYPARAMETERTYPE +) + +func (i GetRoleQueryParameterType) String() string { + return []string{"all", "admin", "direct_member", "billing_manager", "hiring_manager"}[i] +} +func ParseGetRoleQueryParameterType(v string) (any, error) { + result := ALL_GETROLEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETROLEQUERYPARAMETERTYPE + case "admin": + result = ADMIN_GETROLEQUERYPARAMETERTYPE + case "direct_member": + result = DIRECT_MEMBER_GETROLEQUERYPARAMETERTYPE + case "billing_manager": + result = BILLING_MANAGER_GETROLEQUERYPARAMETERTYPE + case "hiring_manager": + result = HIRING_MANAGER_GETROLEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetRoleQueryParameterType(values []GetRoleQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetRoleQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go b/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go new file mode 100644 index 0000000..ad84647 --- /dev/null +++ b/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go @@ -0,0 +1,43 @@ +package invitations +import ( + "errors" +) +// The role for the new member. * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. * `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization. +type InvitationsPostRequestBody_role int + +const ( + ADMIN_INVITATIONSPOSTREQUESTBODY_ROLE InvitationsPostRequestBody_role = iota + DIRECT_MEMBER_INVITATIONSPOSTREQUESTBODY_ROLE + BILLING_MANAGER_INVITATIONSPOSTREQUESTBODY_ROLE + REINSTATE_INVITATIONSPOSTREQUESTBODY_ROLE +) + +func (i InvitationsPostRequestBody_role) String() string { + return []string{"admin", "direct_member", "billing_manager", "reinstate"}[i] +} +func ParseInvitationsPostRequestBody_role(v string) (any, error) { + result := ADMIN_INVITATIONSPOSTREQUESTBODY_ROLE + switch v { + case "admin": + result = ADMIN_INVITATIONSPOSTREQUESTBODY_ROLE + case "direct_member": + result = DIRECT_MEMBER_INVITATIONSPOSTREQUESTBODY_ROLE + case "billing_manager": + result = BILLING_MANAGER_INVITATIONSPOSTREQUESTBODY_ROLE + case "reinstate": + result = REINSTATE_INVITATIONSPOSTREQUESTBODY_ROLE + default: + return 0, errors.New("Unknown InvitationsPostRequestBody_role value: " + v) + } + return &result, nil +} +func SerializeInvitationsPostRequestBody_role(values []InvitationsPostRequestBody_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i InvitationsPostRequestBody_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go b/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go new file mode 100644 index 0000000..6aca6ec --- /dev/null +++ b/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package issues +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go b/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go new file mode 100644 index 0000000..bd35fa0 --- /dev/null +++ b/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go @@ -0,0 +1,48 @@ +package issues +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + ASSIGNED_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + CREATED_GETFILTERQUERYPARAMETERTYPE + MENTIONED_GETFILTERQUERYPARAMETERTYPE + SUBSCRIBED_GETFILTERQUERYPARAMETERTYPE + REPOS_GETFILTERQUERYPARAMETERTYPE + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"assigned", "created", "mentioned", "subscribed", "repos", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := ASSIGNED_GETFILTERQUERYPARAMETERTYPE + switch v { + case "assigned": + result = ASSIGNED_GETFILTERQUERYPARAMETERTYPE + case "created": + result = CREATED_GETFILTERQUERYPARAMETERTYPE + case "mentioned": + result = MENTIONED_GETFILTERQUERYPARAMETERTYPE + case "subscribed": + result = SUBSCRIBED_GETFILTERQUERYPARAMETERTYPE + case "repos": + result = REPOS_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go b/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go new file mode 100644 index 0000000..ba962ac --- /dev/null +++ b/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + COMMENTS_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "comments"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "comments": + result = COMMENTS_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/issues/get_state_query_parameter_type.go b/pkg/github/orgs/item/issues/get_state_query_parameter_type.go new file mode 100644 index 0000000..5541510 --- /dev/null +++ b/pkg/github/orgs/item/issues/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go b/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go new file mode 100644 index 0000000..ca6be46 --- /dev/null +++ b/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// CodeQL query suite to be used. If you specify the `query_suite` parameter, the default setup will be configured with this query suite only on all repositories that didn't have default setup already configured. It will not change the query suite on repositories that already have default setup configured.If you don't specify any `query_suite` in your request, the preferred query suite of the organization will be applied. +type WithEnablementPostRequestBody_query_suite int + +const ( + DEFAULT_WITHENABLEMENTPOSTREQUESTBODY_QUERY_SUITE WithEnablementPostRequestBody_query_suite = iota + EXTENDED_WITHENABLEMENTPOSTREQUESTBODY_QUERY_SUITE +) + +func (i WithEnablementPostRequestBody_query_suite) String() string { + return []string{"default", "extended"}[i] +} +func ParseWithEnablementPostRequestBody_query_suite(v string) (any, error) { + result := DEFAULT_WITHENABLEMENTPOSTREQUESTBODY_QUERY_SUITE + switch v { + case "default": + result = DEFAULT_WITHENABLEMENTPOSTREQUESTBODY_QUERY_SUITE + case "extended": + result = EXTENDED_WITHENABLEMENTPOSTREQUESTBODY_QUERY_SUITE + default: + return 0, errors.New("Unknown WithEnablementPostRequestBody_query_suite value: " + v) + } + return &result, nil +} +func SerializeWithEnablementPostRequestBody_query_suite(values []WithEnablementPostRequestBody_query_suite) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithEnablementPostRequestBody_query_suite) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/members/get_filter_query_parameter_type.go b/pkg/github/orgs/item/members/get_filter_query_parameter_type.go new file mode 100644 index 0000000..fcf97ec --- /dev/null +++ b/pkg/github/orgs/item/members/get_filter_query_parameter_type.go @@ -0,0 +1,36 @@ +package members +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + TWOFA_DISABLED_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"2fa_disabled", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := TWOFA_DISABLED_GETFILTERQUERYPARAMETERTYPE + switch v { + case "2fa_disabled": + result = TWOFA_DISABLED_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/members/get_role_query_parameter_type.go b/pkg/github/orgs/item/members/get_role_query_parameter_type.go new file mode 100644 index 0000000..b8a87b1 --- /dev/null +++ b/pkg/github/orgs/item/members/get_role_query_parameter_type.go @@ -0,0 +1,39 @@ +package members +import ( + "errors" +) +type GetRoleQueryParameterType int + +const ( + ALL_GETROLEQUERYPARAMETERTYPE GetRoleQueryParameterType = iota + ADMIN_GETROLEQUERYPARAMETERTYPE + MEMBER_GETROLEQUERYPARAMETERTYPE +) + +func (i GetRoleQueryParameterType) String() string { + return []string{"all", "admin", "member"}[i] +} +func ParseGetRoleQueryParameterType(v string) (any, error) { + result := ALL_GETROLEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETROLEQUERYPARAMETERTYPE + case "admin": + result = ADMIN_GETROLEQUERYPARAMETERTYPE + case "member": + result = MEMBER_GETROLEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetRoleQueryParameterType(values []GetRoleQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetRoleQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go b/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go new file mode 100644 index 0000000..8425219 --- /dev/null +++ b/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The role to give the user in the organization. Can be one of: * `admin` - The user will become an owner of the organization. * `member` - The user will become a non-owner member of the organization. +type WithUsernamePutRequestBody_role int + +const ( + ADMIN_WITHUSERNAMEPUTREQUESTBODY_ROLE WithUsernamePutRequestBody_role = iota + MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE +) + +func (i WithUsernamePutRequestBody_role) String() string { + return []string{"admin", "member"}[i] +} +func ParseWithUsernamePutRequestBody_role(v string) (any, error) { + result := ADMIN_WITHUSERNAMEPUTREQUESTBODY_ROLE + switch v { + case "admin": + result = ADMIN_WITHUSERNAMEPUTREQUESTBODY_ROLE + case "member": + result = MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE + default: + return 0, errors.New("Unknown WithUsernamePutRequestBody_role value: " + v) + } + return &result, nil +} +func SerializeWithUsernamePutRequestBody_role(values []WithUsernamePutRequestBody_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithUsernamePutRequestBody_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go b/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go new file mode 100644 index 0000000..2f48bb7 --- /dev/null +++ b/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go @@ -0,0 +1,34 @@ +package migrations +import ( + "errors" +) +// Allowed values that can be passed to the exclude param. +type GetExcludeQueryParameterType int + +const ( + REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE GetExcludeQueryParameterType = iota +) + +func (i GetExcludeQueryParameterType) String() string { + return []string{"repositories"}[i] +} +func ParseGetExcludeQueryParameterType(v string) (any, error) { + result := REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE + switch v { + case "repositories": + result = REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetExcludeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetExcludeQueryParameterType(values []GetExcludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetExcludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go b/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go new file mode 100644 index 0000000..a67821d --- /dev/null +++ b/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go @@ -0,0 +1,34 @@ +package item +import ( + "errors" +) +// Allowed values that can be passed to the exclude param. +type GetExcludeQueryParameterType int + +const ( + REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE GetExcludeQueryParameterType = iota +) + +func (i GetExcludeQueryParameterType) String() string { + return []string{"repositories"}[i] +} +func ParseGetExcludeQueryParameterType(v string) (any, error) { + result := REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE + switch v { + case "repositories": + result = REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetExcludeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetExcludeQueryParameterType(values []GetExcludeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetExcludeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go b/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go new file mode 100644 index 0000000..522a8b5 --- /dev/null +++ b/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go @@ -0,0 +1,33 @@ +package migrations +import ( + "errors" +) +type MigrationsPostRequestBody_exclude int + +const ( + REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE MigrationsPostRequestBody_exclude = iota +) + +func (i MigrationsPostRequestBody_exclude) String() string { + return []string{"repositories"}[i] +} +func ParseMigrationsPostRequestBody_exclude(v string) (any, error) { + result := REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE + switch v { + case "repositories": + result = REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE + default: + return 0, errors.New("Unknown MigrationsPostRequestBody_exclude value: " + v) + } + return &result, nil +} +func SerializeMigrationsPostRequestBody_exclude(values []MigrationsPostRequestBody_exclude) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MigrationsPostRequestBody_exclude) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go b/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go new file mode 100644 index 0000000..b56cab1 --- /dev/null +++ b/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go @@ -0,0 +1,36 @@ +package outside_collaborators +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + TWOFA_DISABLED_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"2fa_disabled", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := TWOFA_DISABLED_GETFILTERQUERYPARAMETERTYPE + switch v { + case "2fa_disabled": + result = TWOFA_DISABLED_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go b/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go new file mode 100644 index 0000000..ae4025d --- /dev/null +++ b/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go @@ -0,0 +1,48 @@ +package packages +import ( + "errors" +) +type GetPackage_typeQueryParameterType int + +const ( + NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE GetPackage_typeQueryParameterType = iota + MAVEN_GETPACKAGE_TYPEQUERYPARAMETERTYPE + RUBYGEMS_GETPACKAGE_TYPEQUERYPARAMETERTYPE + DOCKER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + NUGET_GETPACKAGE_TYPEQUERYPARAMETERTYPE + CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE +) + +func (i GetPackage_typeQueryParameterType) String() string { + return []string{"npm", "maven", "rubygems", "docker", "nuget", "container"}[i] +} +func ParseGetPackage_typeQueryParameterType(v string) (any, error) { + result := NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE + switch v { + case "npm": + result = NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "maven": + result = MAVEN_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "rubygems": + result = RUBYGEMS_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "docker": + result = DOCKER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "nuget": + result = NUGET_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "container": + result = CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetPackage_typeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetPackage_typeQueryParameterType(values []GetPackage_typeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetPackage_typeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go b/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go new file mode 100644 index 0000000..daf1c43 --- /dev/null +++ b/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go @@ -0,0 +1,39 @@ +package packages +import ( + "errors" +) +type GetVisibilityQueryParameterType int + +const ( + PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE GetVisibilityQueryParameterType = iota + PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE +) + +func (i GetVisibilityQueryParameterType) String() string { + return []string{"public", "private", "internal"}[i] +} +func ParseGetVisibilityQueryParameterType(v string) (any, error) { + result := PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + switch v { + case "public": + result = PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + case "private": + result = PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + case "internal": + result = INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetVisibilityQueryParameterType(values []GetVisibilityQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetVisibilityQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go b/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go new file mode 100644 index 0000000..cf4ef3c --- /dev/null +++ b/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go @@ -0,0 +1,36 @@ +package versions +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + ACTIVE_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + DELETED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"active", "deleted"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := ACTIVE_GETSTATEQUERYPARAMETERTYPE + switch v { + case "active": + result = ACTIVE_GETSTATEQUERYPARAMETERTYPE + case "deleted": + result = DELETED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go new file mode 100644 index 0000000..af4892e --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package personalaccesstokenrequests +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go new file mode 100644 index 0000000..cf8d1a8 --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go @@ -0,0 +1,33 @@ +package personalaccesstokenrequests +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_AT_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created_at"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_AT_GETSORTQUERYPARAMETERTYPE + switch v { + case "created_at": + result = CREATED_AT_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go new file mode 100644 index 0000000..037ab7e --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// Action to apply to the request. +type WithPat_request_PostRequestBody_action int + +const ( + APPROVE_WITHPAT_REQUEST_POSTREQUESTBODY_ACTION WithPat_request_PostRequestBody_action = iota + DENY_WITHPAT_REQUEST_POSTREQUESTBODY_ACTION +) + +func (i WithPat_request_PostRequestBody_action) String() string { + return []string{"approve", "deny"}[i] +} +func ParseWithPat_request_PostRequestBody_action(v string) (any, error) { + result := APPROVE_WITHPAT_REQUEST_POSTREQUESTBODY_ACTION + switch v { + case "approve": + result = APPROVE_WITHPAT_REQUEST_POSTREQUESTBODY_ACTION + case "deny": + result = DENY_WITHPAT_REQUEST_POSTREQUESTBODY_ACTION + default: + return 0, errors.New("Unknown WithPat_request_PostRequestBody_action value: " + v) + } + return &result, nil +} +func SerializeWithPat_request_PostRequestBody_action(values []WithPat_request_PostRequestBody_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithPat_request_PostRequestBody_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go new file mode 100644 index 0000000..6c75c9a --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go @@ -0,0 +1,37 @@ +package personalaccesstokenrequests +import ( + "errors" +) +// Action to apply to the requests. +type PersonalAccessTokenRequestsPostRequestBody_action int + +const ( + APPROVE_PERSONALACCESSTOKENREQUESTSPOSTREQUESTBODY_ACTION PersonalAccessTokenRequestsPostRequestBody_action = iota + DENY_PERSONALACCESSTOKENREQUESTSPOSTREQUESTBODY_ACTION +) + +func (i PersonalAccessTokenRequestsPostRequestBody_action) String() string { + return []string{"approve", "deny"}[i] +} +func ParsePersonalAccessTokenRequestsPostRequestBody_action(v string) (any, error) { + result := APPROVE_PERSONALACCESSTOKENREQUESTSPOSTREQUESTBODY_ACTION + switch v { + case "approve": + result = APPROVE_PERSONALACCESSTOKENREQUESTSPOSTREQUESTBODY_ACTION + case "deny": + result = DENY_PERSONALACCESSTOKENREQUESTSPOSTREQUESTBODY_ACTION + default: + return 0, errors.New("Unknown PersonalAccessTokenRequestsPostRequestBody_action value: " + v) + } + return &result, nil +} +func SerializePersonalAccessTokenRequestsPostRequestBody_action(values []PersonalAccessTokenRequestsPostRequestBody_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PersonalAccessTokenRequestsPostRequestBody_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go new file mode 100644 index 0000000..aa02e9d --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package personalaccesstokens +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go new file mode 100644 index 0000000..ad59d82 --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go @@ -0,0 +1,33 @@ +package personalaccesstokens +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_AT_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created_at"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_AT_GETSORTQUERYPARAMETERTYPE + switch v { + case "created_at": + result = CREATED_AT_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go new file mode 100644 index 0000000..8e562bc --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go @@ -0,0 +1,34 @@ +package item +import ( + "errors" +) +// Action to apply to the fine-grained personal access token. +type WithPat_PostRequestBody_action int + +const ( + REVOKE_WITHPAT_POSTREQUESTBODY_ACTION WithPat_PostRequestBody_action = iota +) + +func (i WithPat_PostRequestBody_action) String() string { + return []string{"revoke"}[i] +} +func ParseWithPat_PostRequestBody_action(v string) (any, error) { + result := REVOKE_WITHPAT_POSTREQUESTBODY_ACTION + switch v { + case "revoke": + result = REVOKE_WITHPAT_POSTREQUESTBODY_ACTION + default: + return 0, errors.New("Unknown WithPat_PostRequestBody_action value: " + v) + } + return &result, nil +} +func SerializeWithPat_PostRequestBody_action(values []WithPat_PostRequestBody_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithPat_PostRequestBody_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go new file mode 100644 index 0000000..4bafd56 --- /dev/null +++ b/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go @@ -0,0 +1,34 @@ +package personalaccesstokens +import ( + "errors" +) +// Action to apply to the fine-grained personal access token. +type PersonalAccessTokensPostRequestBody_action int + +const ( + REVOKE_PERSONALACCESSTOKENSPOSTREQUESTBODY_ACTION PersonalAccessTokensPostRequestBody_action = iota +) + +func (i PersonalAccessTokensPostRequestBody_action) String() string { + return []string{"revoke"}[i] +} +func ParsePersonalAccessTokensPostRequestBody_action(v string) (any, error) { + result := REVOKE_PERSONALACCESSTOKENSPOSTREQUESTBODY_ACTION + switch v { + case "revoke": + result = REVOKE_PERSONALACCESSTOKENSPOSTREQUESTBODY_ACTION + default: + return 0, errors.New("Unknown PersonalAccessTokensPostRequestBody_action value: " + v) + } + return &result, nil +} +func SerializePersonalAccessTokensPostRequestBody_action(values []PersonalAccessTokensPostRequestBody_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PersonalAccessTokensPostRequestBody_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/projects/get_state_query_parameter_type.go b/pkg/github/orgs/item/projects/get_state_query_parameter_type.go new file mode 100644 index 0000000..985374b --- /dev/null +++ b/pkg/github/orgs/item/projects/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package projects +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go b/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go new file mode 100644 index 0000000..ab3ed2c --- /dev/null +++ b/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go @@ -0,0 +1,43 @@ +package item +import ( + "errors" +) +// The type of the value for the property +type WithCustom_property_namePutRequestBody_value_type int + +const ( + STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE WithCustom_property_namePutRequestBody_value_type = iota + SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + MULTI_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + TRUE_FALSE_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE +) + +func (i WithCustom_property_namePutRequestBody_value_type) String() string { + return []string{"string", "single_select", "multi_select", "true_false"}[i] +} +func ParseWithCustom_property_namePutRequestBody_value_type(v string) (any, error) { + result := STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + switch v { + case "string": + result = STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + case "single_select": + result = SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + case "multi_select": + result = MULTI_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + case "true_false": + result = TRUE_FALSE_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + default: + return 0, errors.New("Unknown WithCustom_property_namePutRequestBody_value_type value: " + v) + } + return &result, nil +} +func SerializeWithCustom_property_namePutRequestBody_value_type(values []WithCustom_property_namePutRequestBody_value_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithCustom_property_namePutRequestBody_value_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go b/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go new file mode 100644 index 0000000..afa5d0f --- /dev/null +++ b/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package repos +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go b/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go new file mode 100644 index 0000000..8dee1bb --- /dev/null +++ b/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package repos +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + PUSHED_GETSORTQUERYPARAMETERTYPE + FULL_NAME_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "pushed", "full_name"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "pushed": + result = PUSHED_GETSORTQUERYPARAMETERTYPE + case "full_name": + result = FULL_NAME_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/get_type_query_parameter_type.go b/pkg/github/orgs/item/repos/get_type_query_parameter_type.go new file mode 100644 index 0000000..a33d96b --- /dev/null +++ b/pkg/github/orgs/item/repos/get_type_query_parameter_type.go @@ -0,0 +1,48 @@ +package repos +import ( + "errors" +) +type GetTypeQueryParameterType int + +const ( + ALL_GETTYPEQUERYPARAMETERTYPE GetTypeQueryParameterType = iota + PRIVATE_GETTYPEQUERYPARAMETERTYPE + FORKS_GETTYPEQUERYPARAMETERTYPE + SOURCES_GETTYPEQUERYPARAMETERTYPE + MEMBER_GETTYPEQUERYPARAMETERTYPE + INTERNAL_GETTYPEQUERYPARAMETERTYPE +) + +func (i GetTypeQueryParameterType) String() string { + return []string{"all", "private", "forks", "sources", "member", "internal"}[i] +} +func ParseGetTypeQueryParameterType(v string) (any, error) { + result := ALL_GETTYPEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETTYPEQUERYPARAMETERTYPE + case "private": + result = PRIVATE_GETTYPEQUERYPARAMETERTYPE + case "forks": + result = FORKS_GETTYPEQUERYPARAMETERTYPE + case "sources": + result = SOURCES_GETTYPEQUERYPARAMETERTYPE + case "member": + result = MEMBER_GETTYPEQUERYPARAMETERTYPE + case "internal": + result = INTERNAL_GETTYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTypeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go new file mode 100644 index 0000000..50a0ccf --- /dev/null +++ b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go @@ -0,0 +1,40 @@ +package repos +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type ReposPostRequestBody_merge_commit_message int + +const ( + PR_BODY_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE ReposPostRequestBody_merge_commit_message = iota + PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + BLANK_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE +) + +func (i ReposPostRequestBody_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseReposPostRequestBody_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_merge_commit_message(values []ReposPostRequestBody_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go new file mode 100644 index 0000000..dd1e4b9 --- /dev/null +++ b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go @@ -0,0 +1,37 @@ +package repos +import ( + "errors" +) +// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +type ReposPostRequestBody_merge_commit_title int + +const ( + PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE ReposPostRequestBody_merge_commit_title = iota + MERGE_MESSAGE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE +) + +func (i ReposPostRequestBody_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseReposPostRequestBody_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_merge_commit_title(values []ReposPostRequestBody_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go new file mode 100644 index 0000000..0ecd209 --- /dev/null +++ b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package repos +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type ReposPostRequestBody_squash_merge_commit_message int + +const ( + PR_BODY_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE ReposPostRequestBody_squash_merge_commit_message = iota + COMMIT_MESSAGES_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i ReposPostRequestBody_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseReposPostRequestBody_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_squash_merge_commit_message(values []ReposPostRequestBody_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go new file mode 100644 index 0000000..51ceb4f --- /dev/null +++ b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package repos +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type ReposPostRequestBody_squash_merge_commit_title int + +const ( + PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE ReposPostRequestBody_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i ReposPostRequestBody_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseReposPostRequestBody_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_squash_merge_commit_title(values []ReposPostRequestBody_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go b/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go new file mode 100644 index 0000000..511c69c --- /dev/null +++ b/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go @@ -0,0 +1,40 @@ +package repos +import ( + "errors" +) +// The visibility of the repository. +type ReposPostRequestBody_visibility int + +const ( + PUBLIC_REPOSPOSTREQUESTBODY_VISIBILITY ReposPostRequestBody_visibility = iota + PRIVATE_REPOSPOSTREQUESTBODY_VISIBILITY + INTERNAL_REPOSPOSTREQUESTBODY_VISIBILITY +) + +func (i ReposPostRequestBody_visibility) String() string { + return []string{"public", "private", "internal"}[i] +} +func ParseReposPostRequestBody_visibility(v string) (any, error) { + result := PUBLIC_REPOSPOSTREQUESTBODY_VISIBILITY + switch v { + case "public": + result = PUBLIC_REPOSPOSTREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_REPOSPOSTREQUESTBODY_VISIBILITY + case "internal": + result = INTERNAL_REPOSPOSTREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown ReposPostRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_visibility(values []ReposPostRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go b/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go new file mode 100644 index 0000000..2e18033 --- /dev/null +++ b/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +type WithRuleset_PutRequestBody_target int + +const ( + BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET WithRuleset_PutRequestBody_target = iota + TAG_WITHRULESET_PUTREQUESTBODY_TARGET + PUSH_WITHRULESET_PUTREQUESTBODY_TARGET +) + +func (i WithRuleset_PutRequestBody_target) String() string { + return []string{"branch", "tag", "push"}[i] +} +func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { + result := BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET + switch v { + case "branch": + result = BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET + case "tag": + result = TAG_WITHRULESET_PUTREQUESTBODY_TARGET + case "push": + result = PUSH_WITHRULESET_PUTREQUESTBODY_TARGET + default: + return 0, errors.New("Unknown WithRuleset_PutRequestBody_target value: " + v) + } + return &result, nil +} +func SerializeWithRuleset_PutRequestBody_target(values []WithRuleset_PutRequestBody_target) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithRuleset_PutRequestBody_target) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go new file mode 100644 index 0000000..210257c --- /dev/null +++ b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go @@ -0,0 +1,40 @@ +package rulesets +import ( + "errors" +) +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +type RulesetsPostRequestBody_target int + +const ( + BRANCH_RULESETSPOSTREQUESTBODY_TARGET RulesetsPostRequestBody_target = iota + TAG_RULESETSPOSTREQUESTBODY_TARGET + PUSH_RULESETSPOSTREQUESTBODY_TARGET +) + +func (i RulesetsPostRequestBody_target) String() string { + return []string{"branch", "tag", "push"}[i] +} +func ParseRulesetsPostRequestBody_target(v string) (any, error) { + result := BRANCH_RULESETSPOSTREQUESTBODY_TARGET + switch v { + case "branch": + result = BRANCH_RULESETSPOSTREQUESTBODY_TARGET + case "tag": + result = TAG_RULESETSPOSTREQUESTBODY_TARGET + case "push": + result = PUSH_RULESETSPOSTREQUESTBODY_TARGET + default: + return 0, errors.New("Unknown RulesetsPostRequestBody_target value: " + v) + } + return &result, nil +} +func SerializeRulesetsPostRequestBody_target(values []RulesetsPostRequestBody_target) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RulesetsPostRequestBody_target) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go b/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go new file mode 100644 index 0000000..91a669a --- /dev/null +++ b/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go @@ -0,0 +1,42 @@ +package rulesuites +import ( + "errors" +) +type GetRule_suite_resultQueryParameterType int + +const ( + PASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE GetRule_suite_resultQueryParameterType = iota + FAIL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + BYPASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + ALL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE +) + +func (i GetRule_suite_resultQueryParameterType) String() string { + return []string{"pass", "fail", "bypass", "all"}[i] +} +func ParseGetRule_suite_resultQueryParameterType(v string) (any, error) { + result := PASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + switch v { + case "pass": + result = PASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + case "fail": + result = FAIL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + case "bypass": + result = BYPASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + case "all": + result = ALL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetRule_suite_resultQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetRule_suite_resultQueryParameterType(values []GetRule_suite_resultQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetRule_suite_resultQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go b/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go new file mode 100644 index 0000000..82dfab2 --- /dev/null +++ b/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go @@ -0,0 +1,42 @@ +package rulesuites +import ( + "errors" +) +type GetTime_periodQueryParameterType int + +const ( + HOUR_GETTIME_PERIODQUERYPARAMETERTYPE GetTime_periodQueryParameterType = iota + DAY_GETTIME_PERIODQUERYPARAMETERTYPE + WEEK_GETTIME_PERIODQUERYPARAMETERTYPE + MONTH_GETTIME_PERIODQUERYPARAMETERTYPE +) + +func (i GetTime_periodQueryParameterType) String() string { + return []string{"hour", "day", "week", "month"}[i] +} +func ParseGetTime_periodQueryParameterType(v string) (any, error) { + result := HOUR_GETTIME_PERIODQUERYPARAMETERTYPE + switch v { + case "hour": + result = HOUR_GETTIME_PERIODQUERYPARAMETERTYPE + case "day": + result = DAY_GETTIME_PERIODQUERYPARAMETERTYPE + case "week": + result = WEEK_GETTIME_PERIODQUERYPARAMETERTYPE + case "month": + result = MONTH_GETTIME_PERIODQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTime_periodQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTime_periodQueryParameterType(values []GetTime_periodQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTime_periodQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go b/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go b/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go new file mode 100644 index 0000000..382957f --- /dev/null +++ b/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + RESOLVED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "resolved"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "resolved": + result = RESOLVED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go b/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go new file mode 100644 index 0000000..41aa158 --- /dev/null +++ b/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package securityadvisories +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go b/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go new file mode 100644 index 0000000..9382245 --- /dev/null +++ b/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package securityadvisories +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + PUBLISHED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "published"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "published": + result = PUBLISHED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go b/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go new file mode 100644 index 0000000..4f106c1 --- /dev/null +++ b/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go @@ -0,0 +1,42 @@ +package securityadvisories +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + TRIAGE_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + DRAFT_GETSTATEQUERYPARAMETERTYPE + PUBLISHED_GETSTATEQUERYPARAMETERTYPE + CLOSED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"triage", "draft", "published", "closed"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := TRIAGE_GETSTATEQUERYPARAMETERTYPE + switch v { + case "triage": + result = TRIAGE_GETSTATEQUERYPARAMETERTYPE + case "draft": + result = DRAFT_GETSTATEQUERYPARAMETERTYPE + case "published": + result = PUBLISHED_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go new file mode 100644 index 0000000..9b51962 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package discussions +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go new file mode 100644 index 0000000..ac25506 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..1a5bfb1 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the team discussion comment. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go b/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..b6a7f32 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the team discussion. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go b/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go new file mode 100644 index 0000000..d4e359b --- /dev/null +++ b/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go @@ -0,0 +1,39 @@ +package members +import ( + "errors" +) +type GetRoleQueryParameterType int + +const ( + MEMBER_GETROLEQUERYPARAMETERTYPE GetRoleQueryParameterType = iota + MAINTAINER_GETROLEQUERYPARAMETERTYPE + ALL_GETROLEQUERYPARAMETERTYPE +) + +func (i GetRoleQueryParameterType) String() string { + return []string{"member", "maintainer", "all"}[i] +} +func ParseGetRoleQueryParameterType(v string) (any, error) { + result := MEMBER_GETROLEQUERYPARAMETERTYPE + switch v { + case "member": + result = MEMBER_GETROLEQUERYPARAMETERTYPE + case "maintainer": + result = MAINTAINER_GETROLEQUERYPARAMETERTYPE + case "all": + result = ALL_GETROLEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetRoleQueryParameterType(values []GetRoleQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetRoleQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go b/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go new file mode 100644 index 0000000..33df378 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The role that this user should have in the team. +type WithUsernamePutRequestBody_role int + +const ( + MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE WithUsernamePutRequestBody_role = iota + MAINTAINER_WITHUSERNAMEPUTREQUESTBODY_ROLE +) + +func (i WithUsernamePutRequestBody_role) String() string { + return []string{"member", "maintainer"}[i] +} +func ParseWithUsernamePutRequestBody_role(v string) (any, error) { + result := MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE + switch v { + case "member": + result = MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE + case "maintainer": + result = MAINTAINER_WITHUSERNAMEPUTREQUESTBODY_ROLE + default: + return 0, errors.New("Unknown WithUsernamePutRequestBody_role value: " + v) + } + return &result, nil +} +func SerializeWithUsernamePutRequestBody_role(values []WithUsernamePutRequestBody_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithUsernamePutRequestBody_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go b/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go new file mode 100644 index 0000000..2b4ef3e --- /dev/null +++ b/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +type WithProject_PutRequestBody_permission int + +const ( + READ_WITHPROJECT_PUTREQUESTBODY_PERMISSION WithProject_PutRequestBody_permission = iota + WRITE_WITHPROJECT_PUTREQUESTBODY_PERMISSION + ADMIN_WITHPROJECT_PUTREQUESTBODY_PERMISSION +) + +func (i WithProject_PutRequestBody_permission) String() string { + return []string{"read", "write", "admin"}[i] +} +func ParseWithProject_PutRequestBody_permission(v string) (any, error) { + result := READ_WITHPROJECT_PUTREQUESTBODY_PERMISSION + switch v { + case "read": + result = READ_WITHPROJECT_PUTREQUESTBODY_PERMISSION + case "write": + result = WRITE_WITHPROJECT_PUTREQUESTBODY_PERMISSION + case "admin": + result = ADMIN_WITHPROJECT_PUTREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown WithProject_PutRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeWithProject_PutRequestBody_permission(values []WithProject_PutRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithProject_PutRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go new file mode 100644 index 0000000..e8cc311 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications. +type WithTeam_slugPatchRequestBody_notification_setting int + +const ( + NOTIFICATIONS_ENABLED_WITHTEAM_SLUGPATCHREQUESTBODY_NOTIFICATION_SETTING WithTeam_slugPatchRequestBody_notification_setting = iota + NOTIFICATIONS_DISABLED_WITHTEAM_SLUGPATCHREQUESTBODY_NOTIFICATION_SETTING +) + +func (i WithTeam_slugPatchRequestBody_notification_setting) String() string { + return []string{"notifications_enabled", "notifications_disabled"}[i] +} +func ParseWithTeam_slugPatchRequestBody_notification_setting(v string) (any, error) { + result := NOTIFICATIONS_ENABLED_WITHTEAM_SLUGPATCHREQUESTBODY_NOTIFICATION_SETTING + switch v { + case "notifications_enabled": + result = NOTIFICATIONS_ENABLED_WITHTEAM_SLUGPATCHREQUESTBODY_NOTIFICATION_SETTING + case "notifications_disabled": + result = NOTIFICATIONS_DISABLED_WITHTEAM_SLUGPATCHREQUESTBODY_NOTIFICATION_SETTING + default: + return 0, errors.New("Unknown WithTeam_slugPatchRequestBody_notification_setting value: " + v) + } + return &result, nil +} +func SerializeWithTeam_slugPatchRequestBody_notification_setting(values []WithTeam_slugPatchRequestBody_notification_setting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithTeam_slugPatchRequestBody_notification_setting) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go new file mode 100644 index 0000000..565ec6a --- /dev/null +++ b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. +type WithTeam_slugPatchRequestBody_permission int + +const ( + PULL_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION WithTeam_slugPatchRequestBody_permission = iota + PUSH_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION + ADMIN_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION +) + +func (i WithTeam_slugPatchRequestBody_permission) String() string { + return []string{"pull", "push", "admin"}[i] +} +func ParseWithTeam_slugPatchRequestBody_permission(v string) (any, error) { + result := PULL_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION + switch v { + case "pull": + result = PULL_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION + case "push": + result = PUSH_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION + case "admin": + result = ADMIN_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown WithTeam_slugPatchRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeWithTeam_slugPatchRequestBody_permission(values []WithTeam_slugPatchRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithTeam_slugPatchRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go new file mode 100644 index 0000000..7a40388 --- /dev/null +++ b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. **For a parent or child team:** * `closed` - visible to all members of this organization. +type WithTeam_slugPatchRequestBody_privacy int + +const ( + SECRET_WITHTEAM_SLUGPATCHREQUESTBODY_PRIVACY WithTeam_slugPatchRequestBody_privacy = iota + CLOSED_WITHTEAM_SLUGPATCHREQUESTBODY_PRIVACY +) + +func (i WithTeam_slugPatchRequestBody_privacy) String() string { + return []string{"secret", "closed"}[i] +} +func ParseWithTeam_slugPatchRequestBody_privacy(v string) (any, error) { + result := SECRET_WITHTEAM_SLUGPATCHREQUESTBODY_PRIVACY + switch v { + case "secret": + result = SECRET_WITHTEAM_SLUGPATCHREQUESTBODY_PRIVACY + case "closed": + result = CLOSED_WITHTEAM_SLUGPATCHREQUESTBODY_PRIVACY + default: + return 0, errors.New("Unknown WithTeam_slugPatchRequestBody_privacy value: " + v) + } + return &result, nil +} +func SerializeWithTeam_slugPatchRequestBody_privacy(values []WithTeam_slugPatchRequestBody_privacy) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithTeam_slugPatchRequestBody_privacy) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go b/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go new file mode 100644 index 0000000..29e0eb2 --- /dev/null +++ b/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go @@ -0,0 +1,37 @@ +package teams +import ( + "errors" +) +// The notification setting the team has chosen. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications. Default: `notifications_enabled` +type TeamsPostRequestBody_notification_setting int + +const ( + NOTIFICATIONS_ENABLED_TEAMSPOSTREQUESTBODY_NOTIFICATION_SETTING TeamsPostRequestBody_notification_setting = iota + NOTIFICATIONS_DISABLED_TEAMSPOSTREQUESTBODY_NOTIFICATION_SETTING +) + +func (i TeamsPostRequestBody_notification_setting) String() string { + return []string{"notifications_enabled", "notifications_disabled"}[i] +} +func ParseTeamsPostRequestBody_notification_setting(v string) (any, error) { + result := NOTIFICATIONS_ENABLED_TEAMSPOSTREQUESTBODY_NOTIFICATION_SETTING + switch v { + case "notifications_enabled": + result = NOTIFICATIONS_ENABLED_TEAMSPOSTREQUESTBODY_NOTIFICATION_SETTING + case "notifications_disabled": + result = NOTIFICATIONS_DISABLED_TEAMSPOSTREQUESTBODY_NOTIFICATION_SETTING + default: + return 0, errors.New("Unknown TeamsPostRequestBody_notification_setting value: " + v) + } + return &result, nil +} +func SerializeTeamsPostRequestBody_notification_setting(values []TeamsPostRequestBody_notification_setting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamsPostRequestBody_notification_setting) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/teams_post_request_body_permission.go b/pkg/github/orgs/item/teams/teams_post_request_body_permission.go new file mode 100644 index 0000000..df15d38 --- /dev/null +++ b/pkg/github/orgs/item/teams/teams_post_request_body_permission.go @@ -0,0 +1,37 @@ +package teams +import ( + "errors" +) +// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. +type TeamsPostRequestBody_permission int + +const ( + PULL_TEAMSPOSTREQUESTBODY_PERMISSION TeamsPostRequestBody_permission = iota + PUSH_TEAMSPOSTREQUESTBODY_PERMISSION +) + +func (i TeamsPostRequestBody_permission) String() string { + return []string{"pull", "push"}[i] +} +func ParseTeamsPostRequestBody_permission(v string) (any, error) { + result := PULL_TEAMSPOSTREQUESTBODY_PERMISSION + switch v { + case "pull": + result = PULL_TEAMSPOSTREQUESTBODY_PERMISSION + case "push": + result = PUSH_TEAMSPOSTREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown TeamsPostRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeTeamsPostRequestBody_permission(values []TeamsPostRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamsPostRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go b/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go new file mode 100644 index 0000000..dbe24fd --- /dev/null +++ b/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go @@ -0,0 +1,37 @@ +package teams +import ( + "errors" +) +// The level of privacy this team should have. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. Default: `secret` **For a parent or child team:** * `closed` - visible to all members of this organization. Default for child team: `closed` +type TeamsPostRequestBody_privacy int + +const ( + SECRET_TEAMSPOSTREQUESTBODY_PRIVACY TeamsPostRequestBody_privacy = iota + CLOSED_TEAMSPOSTREQUESTBODY_PRIVACY +) + +func (i TeamsPostRequestBody_privacy) String() string { + return []string{"secret", "closed"}[i] +} +func ParseTeamsPostRequestBody_privacy(v string) (any, error) { + result := SECRET_TEAMSPOSTREQUESTBODY_PRIVACY + switch v { + case "secret": + result = SECRET_TEAMSPOSTREQUESTBODY_PRIVACY + case "closed": + result = CLOSED_TEAMSPOSTREQUESTBODY_PRIVACY + default: + return 0, errors.New("Unknown TeamsPostRequestBody_privacy value: " + v) + } + return &result, nil +} +func SerializeTeamsPostRequestBody_privacy(values []TeamsPostRequestBody_privacy) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamsPostRequestBody_privacy) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go b/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go new file mode 100644 index 0000000..f171af4 --- /dev/null +++ b/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go @@ -0,0 +1,43 @@ +package item +import ( + "errors" +) +// Default permission level members have for organization repositories. +type WithOrgPatchRequestBody_default_repository_permission int + +const ( + READ_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION WithOrgPatchRequestBody_default_repository_permission = iota + WRITE_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + ADMIN_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + NONE_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION +) + +func (i WithOrgPatchRequestBody_default_repository_permission) String() string { + return []string{"read", "write", "admin", "none"}[i] +} +func ParseWithOrgPatchRequestBody_default_repository_permission(v string) (any, error) { + result := READ_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + switch v { + case "read": + result = READ_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + case "write": + result = WRITE_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + case "admin": + result = ADMIN_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + case "none": + result = NONE_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION + default: + return 0, errors.New("Unknown WithOrgPatchRequestBody_default_repository_permission value: " + v) + } + return &result, nil +} +func SerializeWithOrgPatchRequestBody_default_repository_permission(values []WithOrgPatchRequestBody_default_repository_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithOrgPatchRequestBody_default_repository_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go b/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go new file mode 100644 index 0000000..d7c2d5c --- /dev/null +++ b/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. +type WithOrgPatchRequestBody_members_allowed_repository_creation_type int + +const ( + ALL_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE WithOrgPatchRequestBody_members_allowed_repository_creation_type = iota + PRIVATE_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE + NONE_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE +) + +func (i WithOrgPatchRequestBody_members_allowed_repository_creation_type) String() string { + return []string{"all", "private", "none"}[i] +} +func ParseWithOrgPatchRequestBody_members_allowed_repository_creation_type(v string) (any, error) { + result := ALL_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE + switch v { + case "all": + result = ALL_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE + case "private": + result = PRIVATE_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE + case "none": + result = NONE_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE + default: + return 0, errors.New("Unknown WithOrgPatchRequestBody_members_allowed_repository_creation_type value: " + v) + } + return &result, nil +} +func SerializeWithOrgPatchRequestBody_members_allowed_repository_creation_type(values []WithOrgPatchRequestBody_members_allowed_repository_creation_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithOrgPatchRequestBody_members_allowed_repository_creation_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item_actions_cache_request_builder.go b/pkg/github/orgs/item_actions_cache_request_builder.go new file mode 100644 index 0000000..3929cf9 --- /dev/null +++ b/pkg/github/orgs/item_actions_cache_request_builder.go @@ -0,0 +1,33 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsCacheRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\cache +type ItemActionsCacheRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsCacheRequestBuilderInternal instantiates a new ItemActionsCacheRequestBuilder and sets the default values. +func NewItemActionsCacheRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheRequestBuilder) { + m := &ItemActionsCacheRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache", pathParameters), + } + return m +} +// NewItemActionsCacheRequestBuilder instantiates a new ItemActionsCacheRequestBuilder and sets the default values. +func NewItemActionsCacheRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsCacheRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemActionsCacheUsageRequestBuilder when successful +func (m *ItemActionsCacheRequestBuilder) Usage()(*ItemActionsCacheUsageRequestBuilder) { + return NewItemActionsCacheUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// UsageByRepository the usageByRepository property +// returns a *ItemActionsCacheUsageByRepositoryRequestBuilder when successful +func (m *ItemActionsCacheRequestBuilder) UsageByRepository()(*ItemActionsCacheUsageByRepositoryRequestBuilder) { + return NewItemActionsCacheUsageByRepositoryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_actions_cache_usage_by_repository_get_response.go b/pkg/github/orgs/item_actions_cache_usage_by_repository_get_response.go new file mode 100644 index 0000000..88dd123 --- /dev/null +++ b/pkg/github/orgs/item_actions_cache_usage_by_repository_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsCacheUsageByRepositoryGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repository_cache_usages property + repository_cache_usages []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable + // The total_count property + total_count *int32 +} +// NewItemActionsCacheUsageByRepositoryGetResponse instantiates a new ItemActionsCacheUsageByRepositoryGetResponse and sets the default values. +func NewItemActionsCacheUsageByRepositoryGetResponse()(*ItemActionsCacheUsageByRepositoryGetResponse) { + m := &ItemActionsCacheUsageByRepositoryGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsCacheUsageByRepositoryGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsCacheUsageByRepositoryGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsCacheUsageByRepositoryGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsCacheUsageByRepositoryGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsCacheUsageByRepositoryGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repository_cache_usages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsCacheUsageByRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable) + } + } + m.SetRepositoryCacheUsages(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositoryCacheUsages gets the repository_cache_usages property value. The repository_cache_usages property +// returns a []ActionsCacheUsageByRepositoryable when successful +func (m *ItemActionsCacheUsageByRepositoryGetResponse) GetRepositoryCacheUsages()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable) { + return m.repository_cache_usages +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsCacheUsageByRepositoryGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsCacheUsageByRepositoryGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositoryCacheUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositoryCacheUsages())) + for i, v := range m.GetRepositoryCacheUsages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repository_cache_usages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsCacheUsageByRepositoryGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositoryCacheUsages sets the repository_cache_usages property value. The repository_cache_usages property +func (m *ItemActionsCacheUsageByRepositoryGetResponse) SetRepositoryCacheUsages(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable)() { + m.repository_cache_usages = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsCacheUsageByRepositoryGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsCacheUsageByRepositoryGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositoryCacheUsages()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable) + GetTotalCount()(*int32) + SetRepositoryCacheUsages(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_cache_usage_by_repository_request_builder.go b/pkg/github/orgs/item_actions_cache_usage_by_repository_request_builder.go new file mode 100644 index 0000000..095614e --- /dev/null +++ b/pkg/github/orgs/item_actions_cache_usage_by_repository_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsCacheUsageByRepositoryRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\cache\usage-by-repository +type ItemActionsCacheUsageByRepositoryRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsCacheUsageByRepositoryRequestBuilderGetQueryParameters lists repositories and their GitHub Actions cache usage for an organization.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +type ItemActionsCacheUsageByRepositoryRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemActionsCacheUsageByRepositoryRequestBuilderInternal instantiates a new ItemActionsCacheUsageByRepositoryRequestBuilder and sets the default values. +func NewItemActionsCacheUsageByRepositoryRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheUsageByRepositoryRequestBuilder) { + m := &ItemActionsCacheUsageByRepositoryRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache/usage-by-repository{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsCacheUsageByRepositoryRequestBuilder instantiates a new ItemActionsCacheUsageByRepositoryRequestBuilder and sets the default values. +func NewItemActionsCacheUsageByRepositoryRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheUsageByRepositoryRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsCacheUsageByRepositoryRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories and their GitHub Actions cache usage for an organization.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a ItemActionsCacheUsageByRepositoryGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization +func (m *ItemActionsCacheUsageByRepositoryRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsCacheUsageByRepositoryRequestBuilderGetQueryParameters])(ItemActionsCacheUsageByRepositoryGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsCacheUsageByRepositoryGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsCacheUsageByRepositoryGetResponseable), nil +} +// ToGetRequestInformation lists repositories and their GitHub Actions cache usage for an organization.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsCacheUsageByRepositoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsCacheUsageByRepositoryRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsCacheUsageByRepositoryRequestBuilder when successful +func (m *ItemActionsCacheUsageByRepositoryRequestBuilder) WithUrl(rawUrl string)(*ItemActionsCacheUsageByRepositoryRequestBuilder) { + return NewItemActionsCacheUsageByRepositoryRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_cache_usage_request_builder.go b/pkg/github/orgs/item_actions_cache_usage_request_builder.go new file mode 100644 index 0000000..dd9090a --- /dev/null +++ b/pkg/github/orgs/item_actions_cache_usage_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsCacheUsageRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\cache\usage +type ItemActionsCacheUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsCacheUsageRequestBuilderInternal instantiates a new ItemActionsCacheUsageRequestBuilder and sets the default values. +func NewItemActionsCacheUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheUsageRequestBuilder) { + m := &ItemActionsCacheUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache/usage", pathParameters), + } + return m +} +// NewItemActionsCacheUsageRequestBuilder instantiates a new ItemActionsCacheUsageRequestBuilder and sets the default values. +func NewItemActionsCacheUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsCacheUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsCacheUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the total GitHub Actions cache usage for an organization.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a ActionsCacheUsageOrgEnterpriseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#get-github-actions-cache-usage-for-an-organization +func (m *ItemActionsCacheUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageOrgEnterpriseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsCacheUsageOrgEnterpriseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageOrgEnterpriseable), nil +} +// ToGetRequestInformation gets the total GitHub Actions cache usage for an organization.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsCacheUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsCacheUsageRequestBuilder when successful +func (m *ItemActionsCacheUsageRequestBuilder) WithUrl(rawUrl string)(*ItemActionsCacheUsageRequestBuilder) { + return NewItemActionsCacheUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_oidc_customization_request_builder.go b/pkg/github/orgs/item_actions_oidc_customization_request_builder.go new file mode 100644 index 0000000..febf2cc --- /dev/null +++ b/pkg/github/orgs/item_actions_oidc_customization_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsOidcCustomizationRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\oidc\customization +type ItemActionsOidcCustomizationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsOidcCustomizationRequestBuilderInternal instantiates a new ItemActionsOidcCustomizationRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationRequestBuilder) { + m := &ItemActionsOidcCustomizationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc/customization", pathParameters), + } + return m +} +// NewItemActionsOidcCustomizationRequestBuilder instantiates a new ItemActionsOidcCustomizationRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsOidcCustomizationRequestBuilderInternal(urlParams, requestAdapter) +} +// Sub the sub property +// returns a *ItemActionsOidcCustomizationSubRequestBuilder when successful +func (m *ItemActionsOidcCustomizationRequestBuilder) Sub()(*ItemActionsOidcCustomizationSubRequestBuilder) { + return NewItemActionsOidcCustomizationSubRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_actions_oidc_customization_sub_request_builder.go b/pkg/github/orgs/item_actions_oidc_customization_sub_request_builder.go new file mode 100644 index 0000000..a10b07f --- /dev/null +++ b/pkg/github/orgs/item_actions_oidc_customization_sub_request_builder.go @@ -0,0 +1,94 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsOidcCustomizationSubRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\oidc\customization\sub +type ItemActionsOidcCustomizationSubRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsOidcCustomizationSubRequestBuilderInternal instantiates a new ItemActionsOidcCustomizationSubRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationSubRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationSubRequestBuilder) { + m := &ItemActionsOidcCustomizationSubRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc/customization/sub", pathParameters), + } + return m +} +// NewItemActionsOidcCustomizationSubRequestBuilder instantiates a new ItemActionsOidcCustomizationSubRequestBuilder and sets the default values. +func NewItemActionsOidcCustomizationSubRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcCustomizationSubRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsOidcCustomizationSubRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the customization template for an OpenID Connect (OIDC) subject claim.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a OidcCustomSubable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization +func (m *ItemActionsOidcCustomizationSubRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OidcCustomSubable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOidcCustomSubFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OidcCustomSubable), nil +} +// Put creates or updates the customization template for an OpenID Connect (OIDC) subject claim.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization +func (m *ItemActionsOidcCustomizationSubRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OidcCustomSubable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToGetRequestInformation gets the customization template for an OpenID Connect (OIDC) subject claim.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsOidcCustomizationSubRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates the customization template for an OpenID Connect (OIDC) subject claim.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsOidcCustomizationSubRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OidcCustomSubable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsOidcCustomizationSubRequestBuilder when successful +func (m *ItemActionsOidcCustomizationSubRequestBuilder) WithUrl(rawUrl string)(*ItemActionsOidcCustomizationSubRequestBuilder) { + return NewItemActionsOidcCustomizationSubRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_oidc_request_builder.go b/pkg/github/orgs/item_actions_oidc_request_builder.go new file mode 100644 index 0000000..961dff2 --- /dev/null +++ b/pkg/github/orgs/item_actions_oidc_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsOidcRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\oidc +type ItemActionsOidcRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsOidcRequestBuilderInternal instantiates a new ItemActionsOidcRequestBuilder and sets the default values. +func NewItemActionsOidcRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcRequestBuilder) { + m := &ItemActionsOidcRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc", pathParameters), + } + return m +} +// NewItemActionsOidcRequestBuilder instantiates a new ItemActionsOidcRequestBuilder and sets the default values. +func NewItemActionsOidcRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsOidcRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsOidcRequestBuilderInternal(urlParams, requestAdapter) +} +// Customization the customization property +// returns a *ItemActionsOidcCustomizationRequestBuilder when successful +func (m *ItemActionsOidcRequestBuilder) Customization()(*ItemActionsOidcCustomizationRequestBuilder) { + return NewItemActionsOidcCustomizationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_actions_permissions_put_request_body.go b/pkg/github/orgs/item_actions_permissions_put_request_body.go new file mode 100644 index 0000000..7439ebb --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_put_request_body.go @@ -0,0 +1,112 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsPermissionsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions policy that controls the actions and reusable workflows that are allowed to run. + allowed_actions *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions + // The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + enabled_repositories *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledRepositories +} +// NewItemActionsPermissionsPutRequestBody instantiates a new ItemActionsPermissionsPutRequestBody and sets the default values. +func NewItemActionsPermissionsPutRequestBody()(*ItemActionsPermissionsPutRequestBody) { + m := &ItemActionsPermissionsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsPermissionsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsPermissionsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsPermissionsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsPermissionsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedActions gets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +// returns a *AllowedActions when successful +func (m *ItemActionsPermissionsPutRequestBody) GetAllowedActions()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions) { + return m.allowed_actions +} +// GetEnabledRepositories gets the enabled_repositories property value. The policy that controls the repositories in the organization that are allowed to run GitHub Actions. +// returns a *EnabledRepositories when successful +func (m *ItemActionsPermissionsPutRequestBody) GetEnabledRepositories()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledRepositories) { + return m.enabled_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsPermissionsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseAllowedActions) + if err != nil { + return err + } + if val != nil { + m.SetAllowedActions(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)) + } + return nil + } + res["enabled_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseEnabledRepositories) + if err != nil { + return err + } + if val != nil { + m.SetEnabledRepositories(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledRepositories)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemActionsPermissionsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedActions() != nil { + cast := (*m.GetAllowedActions()).String() + err := writer.WriteStringValue("allowed_actions", &cast) + if err != nil { + return err + } + } + if m.GetEnabledRepositories() != nil { + cast := (*m.GetEnabledRepositories()).String() + err := writer.WriteStringValue("enabled_repositories", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemActionsPermissionsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedActions sets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +func (m *ItemActionsPermissionsPutRequestBody) SetAllowedActions(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)() { + m.allowed_actions = value +} +// SetEnabledRepositories sets the enabled_repositories property value. The policy that controls the repositories in the organization that are allowed to run GitHub Actions. +func (m *ItemActionsPermissionsPutRequestBody) SetEnabledRepositories(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledRepositories)() { + m.enabled_repositories = value +} +type ItemActionsPermissionsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedActions()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions) + GetEnabledRepositories()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledRepositories) + SetAllowedActions(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)() + SetEnabledRepositories(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnabledRepositories)() +} diff --git a/pkg/github/orgs/item_actions_permissions_repositories_get_response.go b/pkg/github/orgs/item_actions_permissions_repositories_get_response.go new file mode 100644 index 0000000..00cd1ab --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_repositories_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsPermissionsRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable + // The total_count property + total_count *float64 +} +// NewItemActionsPermissionsRepositoriesGetResponse instantiates a new ItemActionsPermissionsRepositoriesGetResponse and sets the default values. +func NewItemActionsPermissionsRepositoriesGetResponse()(*ItemActionsPermissionsRepositoriesGetResponse) { + m := &ItemActionsPermissionsRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsPermissionsRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsPermissionsRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsPermissionsRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsPermissionsRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsPermissionsRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []Repositoryable when successful +func (m *ItemActionsPermissionsRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsPermissionsRepositoriesGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsPermissionsRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsPermissionsRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *ItemActionsPermissionsRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsPermissionsRepositoriesGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsPermissionsRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + GetTotalCount()(*float64) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/orgs/item_actions_permissions_repositories_put_request_body.go b/pkg/github/orgs/item_actions_permissions_repositories_put_request_body.go new file mode 100644 index 0000000..4c47be7 --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsPermissionsRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of repository IDs to enable for GitHub Actions. + selected_repository_ids []int32 +} +// NewItemActionsPermissionsRepositoriesPutRequestBody instantiates a new ItemActionsPermissionsRepositoriesPutRequestBody and sets the default values. +func NewItemActionsPermissionsRepositoriesPutRequestBody()(*ItemActionsPermissionsRepositoriesPutRequestBody) { + m := &ItemActionsPermissionsRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsPermissionsRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsPermissionsRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsPermissionsRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsPermissionsRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsPermissionsRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. List of repository IDs to enable for GitHub Actions. +// returns a []int32 when successful +func (m *ItemActionsPermissionsRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemActionsPermissionsRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemActionsPermissionsRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. List of repository IDs to enable for GitHub Actions. +func (m *ItemActionsPermissionsRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemActionsPermissionsRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go b/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go new file mode 100644 index 0000000..2cd1172 --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go @@ -0,0 +1,100 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsPermissionsRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\permissions\repositories +type ItemActionsPermissionsRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsPermissionsRepositoriesRequestBuilderGetQueryParameters lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemActionsPermissionsRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.permissions.repositories.item collection +// returns a *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsPermissionsRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsPermissionsRepositoriesRequestBuilderInternal instantiates a new ItemActionsPermissionsRepositoriesRequestBuilder and sets the default values. +func NewItemActionsPermissionsRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRepositoriesRequestBuilder) { + m := &ItemActionsPermissionsRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsPermissionsRepositoriesRequestBuilder instantiates a new ItemActionsPermissionsRepositoriesRequestBuilder and sets the default values. +func NewItemActionsPermissionsRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemActionsPermissionsRepositoriesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization +func (m *ItemActionsPermissionsRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsPermissionsRepositoriesRequestBuilderGetQueryParameters])(ItemActionsPermissionsRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsPermissionsRepositoriesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsPermissionsRepositoriesGetResponseable), nil +} +// Put replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-selected-repositories-enabled-for-github-actions-in-an-organization +func (m *ItemActionsPermissionsRepositoriesRequestBuilder) Put(ctx context.Context, body ItemActionsPermissionsRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsPermissionsRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsPermissionsRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsRepositoriesRequestBuilder when successful +func (m *ItemActionsPermissionsRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsRepositoriesRequestBuilder) { + return NewItemActionsPermissionsRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_permissions_repositories_with_repository_item_request_builder.go b/pkg/github/orgs/item_actions_permissions_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..38a6bca --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_repositories_with_repository_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\permissions\repositories\{repository_id} +type ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) { + m := &ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/repositories/{repository_id}", pathParameters), + } + return m +} +// NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder instantiates a new ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#disable-a-selected-repository-for-github-actions-in-an-organization +func (m *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#enable-a-selected-repository-for-github-actions-in-an-organization +func (m *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder) { + return NewItemActionsPermissionsRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_permissions_request_builder.go b/pkg/github/orgs/item_actions_permissions_request_builder.go new file mode 100644 index 0000000..eff11f9 --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_request_builder.go @@ -0,0 +1,98 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsPermissionsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\permissions +type ItemActionsPermissionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsRequestBuilderInternal instantiates a new ItemActionsPermissionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRequestBuilder) { + m := &ItemActionsPermissionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions", pathParameters), + } + return m +} +// NewItemActionsPermissionsRequestBuilder instantiates a new ItemActionsPermissionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ActionsOrganizationPermissionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-github-actions-permissions-for-an-organization +func (m *ItemActionsPermissionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsOrganizationPermissionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsOrganizationPermissionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsOrganizationPermissionsable), nil +} +// Put sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-github-actions-permissions-for-an-organization +func (m *ItemActionsPermissionsRequestBuilder) Put(ctx context.Context, body ItemActionsPermissionsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Repositories the repositories property +// returns a *ItemActionsPermissionsRepositoriesRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) Repositories()(*ItemActionsPermissionsRepositoriesRequestBuilder) { + return NewItemActionsPermissionsRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SelectedActions the selectedActions property +// returns a *ItemActionsPermissionsSelectedActionsRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) SelectedActions()(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + return NewItemActionsPermissionsSelectedActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsPermissionsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsRequestBuilder) { + return NewItemActionsPermissionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} +// Workflow the workflow property +// returns a *ItemActionsPermissionsWorkflowRequestBuilder when successful +func (m *ItemActionsPermissionsRequestBuilder) Workflow()(*ItemActionsPermissionsWorkflowRequestBuilder) { + return NewItemActionsPermissionsWorkflowRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_actions_permissions_selected_actions_request_builder.go b/pkg/github/orgs/item_actions_permissions_selected_actions_request_builder.go new file mode 100644 index 0000000..527471f --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_selected_actions_request_builder.go @@ -0,0 +1,83 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsPermissionsSelectedActionsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\permissions\selected-actions +type ItemActionsPermissionsSelectedActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsSelectedActionsRequestBuilderInternal instantiates a new ItemActionsPermissionsSelectedActionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsSelectedActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + m := &ItemActionsPermissionsSelectedActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/selected-actions", pathParameters), + } + return m +} +// NewItemActionsPermissionsSelectedActionsRequestBuilder instantiates a new ItemActionsPermissionsSelectedActionsRequestBuilder and sets the default values. +func NewItemActionsPermissionsSelectedActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsSelectedActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a SelectedActionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSelectedActionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable), nil +} +// Put sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-organization +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."If the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsSelectedActionsRequestBuilder when successful +func (m *ItemActionsPermissionsSelectedActionsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsSelectedActionsRequestBuilder) { + return NewItemActionsPermissionsSelectedActionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_permissions_workflow_request_builder.go b/pkg/github/orgs/item_actions_permissions_workflow_request_builder.go new file mode 100644 index 0000000..f1cac6f --- /dev/null +++ b/pkg/github/orgs/item_actions_permissions_workflow_request_builder.go @@ -0,0 +1,83 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsPermissionsWorkflowRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\permissions\workflow +type ItemActionsPermissionsWorkflowRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsPermissionsWorkflowRequestBuilderInternal instantiates a new ItemActionsPermissionsWorkflowRequestBuilder and sets the default values. +func NewItemActionsPermissionsWorkflowRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsWorkflowRequestBuilder) { + m := &ItemActionsPermissionsWorkflowRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/workflow", pathParameters), + } + return m +} +// NewItemActionsPermissionsWorkflowRequestBuilder instantiates a new ItemActionsPermissionsWorkflowRequestBuilder and sets the default values. +func NewItemActionsPermissionsWorkflowRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsPermissionsWorkflowRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsPermissionsWorkflowRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,as well as whether GitHub Actions can submit approving pull request reviews. For more information, see"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ActionsGetDefaultWorkflowPermissionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-default-workflow-permissions-for-an-organization +func (m *ItemActionsPermissionsWorkflowRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsGetDefaultWorkflowPermissionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsGetDefaultWorkflowPermissionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsGetDefaultWorkflowPermissionsable), nil +} +// Put sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actionscan submit approving pull request reviews. For more information, see"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-default-workflow-permissions-for-an-organization +func (m *ItemActionsPermissionsWorkflowRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSetDefaultWorkflowPermissionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,as well as whether GitHub Actions can submit approving pull request reviews. For more information, see"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsWorkflowRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actionscan submit approving pull request reviews. For more information, see"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsPermissionsWorkflowRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSetDefaultWorkflowPermissionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsPermissionsWorkflowRequestBuilder when successful +func (m *ItemActionsPermissionsWorkflowRequestBuilder) WithUrl(rawUrl string)(*ItemActionsPermissionsWorkflowRequestBuilder) { + return NewItemActionsPermissionsWorkflowRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_request_builder.go b/pkg/github/orgs/item_actions_request_builder.go new file mode 100644 index 0000000..36a9844 --- /dev/null +++ b/pkg/github/orgs/item_actions_request_builder.go @@ -0,0 +1,58 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions +type ItemActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Cache the cache property +// returns a *ItemActionsCacheRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Cache()(*ItemActionsCacheRequestBuilder) { + return NewItemActionsCacheRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRequestBuilderInternal instantiates a new ItemActionsRequestBuilder and sets the default values. +func NewItemActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRequestBuilder) { + m := &ItemActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions", pathParameters), + } + return m +} +// NewItemActionsRequestBuilder instantiates a new ItemActionsRequestBuilder and sets the default values. +func NewItemActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Oidc the oidc property +// returns a *ItemActionsOidcRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Oidc()(*ItemActionsOidcRequestBuilder) { + return NewItemActionsOidcRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Permissions the permissions property +// returns a *ItemActionsPermissionsRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Permissions()(*ItemActionsPermissionsRequestBuilder) { + return NewItemActionsPermissionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RunnerGroups the runnerGroups property +// returns a *ItemActionsRunnerGroupsRequestBuilder when successful +func (m *ItemActionsRequestBuilder) RunnerGroups()(*ItemActionsRunnerGroupsRequestBuilder) { + return NewItemActionsRunnerGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Runners the runners property +// returns a *ItemActionsRunnersRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Runners()(*ItemActionsRunnersRequestBuilder) { + return NewItemActionsRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Secrets the secrets property +// returns a *ItemActionsSecretsRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Secrets()(*ItemActionsSecretsRequestBuilder) { + return NewItemActionsSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Variables the variables property +// returns a *ItemActionsVariablesRequestBuilder when successful +func (m *ItemActionsRequestBuilder) Variables()(*ItemActionsVariablesRequestBuilder) { + return NewItemActionsVariablesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_actions_runner_groups_get_response.go b/pkg/github/orgs/item_actions_runner_groups_get_response.go new file mode 100644 index 0000000..b3d1396 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnerGroupsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runner_groups property + runner_groups []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsGetResponse instantiates a new ItemActionsRunnerGroupsGetResponse and sets the default values. +func NewItemActionsRunnerGroupsGetResponse()(*ItemActionsRunnerGroupsGetResponse) { + m := &ItemActionsRunnerGroupsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runner_groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsOrgFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable) + } + } + m.SetRunnerGroups(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunnerGroups gets the runner_groups property value. The runner_groups property +// returns a []RunnerGroupsOrgable when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetRunnerGroups()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable) { + return m.runner_groups +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunnerGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunnerGroups())) + for i, v := range m.GetRunnerGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runner_groups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunnerGroups sets the runner_groups property value. The runner_groups property +func (m *ItemActionsRunnerGroupsGetResponse) SetRunnerGroups(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable)() { + m.runner_groups = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunnerGroups()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable) + GetTotalCount()(*float64) + SetRunnerGroups(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_repositories_get_response.go b/pkg/github/orgs/item_actions_runner_groups_item_repositories_get_response.go new file mode 100644 index 0000000..ac6a726 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_repositories_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnerGroupsItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsItemRepositoriesGetResponse instantiates a new ItemActionsRunnerGroupsItemRepositoriesGetResponse and sets the default values. +func NewItemActionsRunnerGroupsItemRepositoriesGetResponse()(*ItemActionsRunnerGroupsItemRepositoriesGetResponse) { + m := &ItemActionsRunnerGroupsItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []MinimalRepositoryable when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsItemRepositoriesGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + GetTotalCount()(*float64) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_repositories_put_request_body.go b/pkg/github/orgs/item_actions_runner_groups_item_repositories_put_request_body.go new file mode 100644 index 0000000..2a09f1a --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsItemRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of repository IDs that can access the runner group. + selected_repository_ids []int32 +} +// NewItemActionsRunnerGroupsItemRepositoriesPutRequestBody instantiates a new ItemActionsRunnerGroupsItemRepositoriesPutRequestBody and sets the default values. +func NewItemActionsRunnerGroupsItemRepositoriesPutRequestBody()(*ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) { + m := &ItemActionsRunnerGroupsItemRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. List of repository IDs that can access the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. List of repository IDs that can access the runner group. +func (m *ItemActionsRunnerGroupsItemRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemActionsRunnerGroupsItemRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_repositories_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_item_repositories_request_builder.go new file mode 100644 index 0000000..ae3185f --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_repositories_request_builder.go @@ -0,0 +1,100 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\repositories +type ItemActionsRunnerGroupsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsItemRepositoriesRequestBuilderGetQueryParameters lists the repositories with access to a self-hosted runner group configured in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemActionsRunnerGroupsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.runnerGroups.item.repositories.item collection +// returns a *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnerGroupsItemRepositoriesRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemRepositoriesRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) { + m := &ItemActionsRunnerGroupsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemRepositoriesRequestBuilder instantiates a new ItemActionsRunnerGroupsItemRepositoriesRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the repositories with access to a self-hosted runner group configured in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsItemRepositoriesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization +func (m *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemRepositoriesRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsItemRepositoriesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsItemRepositoriesGetResponseable), nil +} +// Put replaces the list of repositories that have access to a self-hosted runner group configured in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization +func (m *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) Put(ctx context.Context, body ItemActionsRunnerGroupsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists the repositories with access to a self-hosted runner group configured in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces the list of repositories that have access to a self-hosted runner group configured in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) { + return NewItemActionsRunnerGroupsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_repositories_with_repository_item_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..15c663b --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\repositories\{repository_id} +type ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization +func (m *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization +func (m *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewItemActionsRunnerGroupsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_runners_get_response.go b/pkg/github/orgs/item_actions_runner_groups_item_runners_get_response.go new file mode 100644 index 0000000..affa685 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_runners_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnerGroupsItemRunnersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runners property + runners []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsItemRunnersGetResponse instantiates a new ItemActionsRunnerGroupsItemRunnersGetResponse and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersGetResponse()(*ItemActionsRunnerGroupsItemRunnersGetResponse) { + m := &ItemActionsRunnerGroupsItemRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemRunnersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []Runnerable when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsItemRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsItemRunnersGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsItemRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + GetTotalCount()(*float64) + SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_runners_put_request_body.go b/pkg/github/orgs/item_actions_runner_groups_item_runners_put_request_body.go new file mode 100644 index 0000000..6d7ca4c --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_runners_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsItemRunnersPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of runner IDs to add to the runner group. + runners []int32 +} +// NewItemActionsRunnerGroupsItemRunnersPutRequestBody instantiates a new ItemActionsRunnerGroupsItemRunnersPutRequestBody and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersPutRequestBody()(*ItemActionsRunnerGroupsItemRunnersPutRequestBody) { + m := &ItemActionsRunnerGroupsItemRunnersPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemRunnersPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemRunnersPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemRunnersPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetRunners(res) + } + return nil + } + return res +} +// GetRunners gets the runners property value. List of runner IDs to add to the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) GetRunners()([]int32) { + return m.runners +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + err := writer.WriteCollectionOfInt32Values("runners", m.GetRunners()) + 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 *ItemActionsRunnerGroupsItemRunnersPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. List of runner IDs to add to the runner group. +func (m *ItemActionsRunnerGroupsItemRunnersPutRequestBody) SetRunners(value []int32)() { + m.runners = value +} +type ItemActionsRunnerGroupsItemRunnersPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]int32) + SetRunners(value []int32)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_runners_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_item_runners_request_builder.go new file mode 100644 index 0000000..0804133 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_runners_request_builder.go @@ -0,0 +1,100 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemRunnersRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\runners +type ItemActionsRunnerGroupsItemRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters lists self-hosted runners that are in a specific organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRunner_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.runnerGroups.item.runners.item collection +// returns a *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) ByRunner_id(runner_id int32)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_id), 10) + return NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + m := &ItemActionsRunnerGroupsItemRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/runners{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemRunnersRequestBuilder instantiates a new ItemActionsRunnerGroupsItemRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists self-hosted runners that are in a specific organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsItemRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsItemRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsItemRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsItemRunnersGetResponseable), nil +} +// Put replaces the list of self-hosted runners that are part of an organization runner group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) Put(ctx context.Context, body ItemActionsRunnerGroupsItemRunnersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists self-hosted runners that are in a specific organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces the list of self-hosted runners that are part of an organization runner group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsItemRunnersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemRunnersRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + return NewItemActionsRunnerGroupsItemRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_runners_with_runner_item_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_item_runners_with_runner_item_request_builder.go new file mode 100644 index 0000000..30e8cb5 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_runners_with_runner_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\runners\{runner_id} +type ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + m := &ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder instantiates a new ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a self-hosted runner to a runner group configured in an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a self-hosted runner to a runner group configured in an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder) { + return NewItemActionsRunnerGroupsItemRunnersWithRunner_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_with_runner_group_patch_request_body.go b/pkg/github/orgs/item_actions_runner_groups_item_with_runner_group_patch_request_body.go new file mode 100644 index 0000000..2d8bdc6 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_with_runner_group_patch_request_body.go @@ -0,0 +1,173 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the runner group can be used by `public` repositories. + allows_public_repositories *bool + // Name of the runner group. + name *string + // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + restricted_to_workflows *bool + // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + selected_workflows []string +} +// NewItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody instantiates a new ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody and sets the default values. +func NewItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody()(*ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) { + m := &ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowsPublicRepositories gets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetAllowsPublicRepositories()(*bool) { + return m.allows_public_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsPublicRepositories(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["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictedToWorkflows(val) + } + return nil + } + res["selected_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedWorkflows(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the runner group. +// returns a *string when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetRestrictedToWorkflows()(*bool) { + return m.restricted_to_workflows +} +// GetSelectedWorkflows gets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +// returns a []string when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetSelectedWorkflows()([]string) { + return m.selected_workflows +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allows_public_repositories", m.GetAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) + if err != nil { + return err + } + } + if m.GetSelectedWorkflows() != nil { + err := writer.WriteCollectionOfStringValues("selected_workflows", m.GetSelectedWorkflows()) + 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 *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowsPublicRepositories sets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetAllowsPublicRepositories(value *bool)() { + m.allows_public_repositories = value +} +// SetName sets the name property value. Name of the runner group. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetRestrictedToWorkflows(value *bool)() { + m.restricted_to_workflows = value +} +// SetSelectedWorkflows sets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetSelectedWorkflows(value []string)() { + m.selected_workflows = value +} +type ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsPublicRepositories()(*bool) + GetName()(*string) + GetRestrictedToWorkflows()(*bool) + GetSelectedWorkflows()([]string) + SetAllowsPublicRepositories(value *bool)() + SetName(value *string)() + SetRestrictedToWorkflows(value *bool)() + SetSelectedWorkflows(value []string)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_post_request_body.go b/pkg/github/orgs/item_actions_runner_groups_post_request_body.go new file mode 100644 index 0000000..08f3831 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_post_request_body.go @@ -0,0 +1,243 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnerGroupsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether the runner group can be used by `public` repositories. + allows_public_repositories *bool + // Name of the runner group. + name *string + // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + restricted_to_workflows *bool + // List of runner IDs to add to the runner group. + runners []int32 + // List of repository IDs that can access the runner group. + selected_repository_ids []int32 + // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. + selected_workflows []string +} +// NewItemActionsRunnerGroupsPostRequestBody instantiates a new ItemActionsRunnerGroupsPostRequestBody and sets the default values. +func NewItemActionsRunnerGroupsPostRequestBody()(*ItemActionsRunnerGroupsPostRequestBody) { + m := &ItemActionsRunnerGroupsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowsPublicRepositories gets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetAllowsPublicRepositories()(*bool) { + return m.allows_public_repositories +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allows_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsPublicRepositories(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["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictedToWorkflows(val) + } + return nil + } + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetRunners(res) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + res["selected_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedWorkflows(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the runner group. +// returns a *string when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetName()(*string) { + return m.name +} +// GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +// returns a *bool when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetRestrictedToWorkflows()(*bool) { + return m.restricted_to_workflows +} +// GetRunners gets the runners property value. List of runner IDs to add to the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetRunners()([]int32) { + return m.runners +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. List of repository IDs that can access the runner group. +// returns a []int32 when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// GetSelectedWorkflows gets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +// returns a []string when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetSelectedWorkflows()([]string) { + return m.selected_workflows +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allows_public_repositories", m.GetAllowsPublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) + if err != nil { + return err + } + } + if m.GetRunners() != nil { + err := writer.WriteCollectionOfInt32Values("runners", m.GetRunners()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + if err != nil { + return err + } + } + if m.GetSelectedWorkflows() != nil { + err := writer.WriteCollectionOfStringValues("selected_workflows", m.GetSelectedWorkflows()) + 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 *ItemActionsRunnerGroupsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowsPublicRepositories sets the allows_public_repositories property value. Whether the runner group can be used by `public` repositories. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetAllowsPublicRepositories(value *bool)() { + m.allows_public_repositories = value +} +// SetName sets the name property value. Name of the runner group. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetRestrictedToWorkflows(value *bool)() { + m.restricted_to_workflows = value +} +// SetRunners sets the runners property value. List of runner IDs to add to the runner group. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetRunners(value []int32)() { + m.runners = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. List of repository IDs that can access the runner group. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +// SetSelectedWorkflows sets the selected_workflows property value. List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetSelectedWorkflows(value []string)() { + m.selected_workflows = value +} +type ItemActionsRunnerGroupsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsPublicRepositories()(*bool) + GetName()(*string) + GetRestrictedToWorkflows()(*bool) + GetRunners()([]int32) + GetSelectedRepositoryIds()([]int32) + GetSelectedWorkflows()([]string) + SetAllowsPublicRepositories(value *bool)() + SetName(value *string)() + SetRestrictedToWorkflows(value *bool)() + SetRunners(value []int32)() + SetSelectedRepositoryIds(value []int32)() + SetSelectedWorkflows(value []string)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_request_builder.go new file mode 100644 index 0000000..2487c99 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_request_builder.go @@ -0,0 +1,108 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnerGroupsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups +type ItemActionsRunnerGroupsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsRequestBuilderGetQueryParameters lists all self-hosted runner groups configured in an organization and inherited from an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemActionsRunnerGroupsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only return runner groups that are allowed to be used by this repository. + Visible_to_repository *string `uriparametername:"visible_to_repository"` +} +// ByRunner_group_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.runnerGroups.item collection +// returns a *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) ByRunner_group_id(runner_group_id int32)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_group_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_group_id), 10) + return NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnerGroupsRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsRequestBuilder) { + m := &ItemActionsRunnerGroupsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups{?page*,per_page*,visible_to_repository*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsRequestBuilder instantiates a new ItemActionsRunnerGroupsRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all self-hosted runner groups configured in an organization and inherited from an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization +func (m *ItemActionsRunnerGroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsGetResponseable), nil +} +// Post creates a new self-hosted runner group for an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a RunnerGroupsOrgable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization +func (m *ItemActionsRunnerGroupsRequestBuilder) Post(ctx context.Context, body ItemActionsRunnerGroupsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsOrgFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable), nil +} +// ToGetRequestInformation lists all self-hosted runner groups configured in an organization and inherited from an enterprise.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new self-hosted runner group for an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsRequestBuilder when successful +func (m *ItemActionsRunnerGroupsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsRequestBuilder) { + return NewItemActionsRunnerGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runner_groups_with_runner_group_item_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_with_runner_group_item_request_builder.go new file mode 100644 index 0000000..f5ce9e0 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_with_runner_group_item_request_builder.go @@ -0,0 +1,120 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id} +type ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + m := &ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder instantiates a new ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a self-hosted runner group for an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific self-hosted runner group for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a RunnerGroupsOrgable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsOrgFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable), nil +} +// Patch updates the `name` and `visibility` of a self-hosted runner group in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a RunnerGroupsOrgable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Patch(ctx context.Context, body ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerGroupsOrgFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerGroupsOrgable), nil +} +// Repositories the repositories property +// returns a *ItemActionsRunnerGroupsItemRepositoriesRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Repositories()(*ItemActionsRunnerGroupsItemRepositoriesRequestBuilder) { + return NewItemActionsRunnerGroupsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Runners the runners property +// returns a *ItemActionsRunnerGroupsItemRunnersRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Runners()(*ItemActionsRunnerGroupsItemRunnersRequestBuilder) { + return NewItemActionsRunnerGroupsItemRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a self-hosted runner group for an organization.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific self-hosted runner group for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the `name` and `visibility` of a self-hosted runner group in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) { + return NewItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_downloads_request_builder.go b/pkg/github/orgs/item_actions_runners_downloads_request_builder.go new file mode 100644 index 0000000..4e62b2d --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_downloads_request_builder.go @@ -0,0 +1,60 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersDownloadsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\downloads +type ItemActionsRunnersDownloadsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersDownloadsRequestBuilderInternal instantiates a new ItemActionsRunnersDownloadsRequestBuilder and sets the default values. +func NewItemActionsRunnersDownloadsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersDownloadsRequestBuilder) { + m := &ItemActionsRunnersDownloadsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/downloads", pathParameters), + } + return m +} +// NewItemActionsRunnersDownloadsRequestBuilder instantiates a new ItemActionsRunnersDownloadsRequestBuilder and sets the default values. +func NewItemActionsRunnersDownloadsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersDownloadsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersDownloadsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists binaries for the runner application that you can download and run.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a []RunnerApplicationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-runner-applications-for-an-organization +func (m *ItemActionsRunnersDownloadsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerApplicationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable) + } + } + return val, nil +} +// ToGetRequestInformation lists binaries for the runner application that you can download and run.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersDownloadsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersDownloadsRequestBuilder when successful +func (m *ItemActionsRunnersDownloadsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersDownloadsRequestBuilder) { + return NewItemActionsRunnersDownloadsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_generate_jitconfig_post_request_body.go b/pkg/github/orgs/item_actions_runners_generate_jitconfig_post_request_body.go new file mode 100644 index 0000000..a7fec12 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_generate_jitconfig_post_request_body.go @@ -0,0 +1,175 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnersGenerateJitconfigPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. + labels []string + // The name of the new runner. + name *string + // The ID of the runner group to register the runner to. + runner_group_id *int32 + // The working directory to be used for job execution, relative to the runner install directory. + work_folder *string +} +// NewItemActionsRunnersGenerateJitconfigPostRequestBody instantiates a new ItemActionsRunnersGenerateJitconfigPostRequestBody and sets the default values. +func NewItemActionsRunnersGenerateJitconfigPostRequestBody()(*ItemActionsRunnersGenerateJitconfigPostRequestBody) { + m := &ItemActionsRunnersGenerateJitconfigPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + work_folderValue := "_work" + m.SetWorkFolder(&work_folderValue) + return m +} +// CreateItemActionsRunnersGenerateJitconfigPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersGenerateJitconfigPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersGenerateJitconfigPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + res["work_folder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkFolder(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +// returns a []string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetLabels()([]string) { + return m.labels +} +// GetName gets the name property value. The name of the new runner. +// returns a *string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetName()(*string) { + return m.name +} +// GetRunnerGroupId gets the runner_group_id property value. The ID of the runner group to register the runner to. +// returns a *int32 when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetWorkFolder gets the work_folder property value. The working directory to be used for job execution, relative to the runner install directory. +// returns a *string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) GetWorkFolder()(*string) { + return m.work_folder +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("work_folder", m.GetWorkFolder()) + 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 *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +// SetName sets the name property value. The name of the new runner. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRunnerGroupId sets the runner_group_id property value. The ID of the runner group to register the runner to. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetWorkFolder sets the work_folder property value. The working directory to be used for job execution, relative to the runner install directory. +func (m *ItemActionsRunnersGenerateJitconfigPostRequestBody) SetWorkFolder(value *string)() { + m.work_folder = value +} +type ItemActionsRunnersGenerateJitconfigPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + GetName()(*string) + GetRunnerGroupId()(*int32) + GetWorkFolder()(*string) + SetLabels(value []string)() + SetName(value *string)() + SetRunnerGroupId(value *int32)() + SetWorkFolder(value *string)() +} diff --git a/pkg/github/orgs/item_actions_runners_generate_jitconfig_post_response.go b/pkg/github/orgs/item_actions_runners_generate_jitconfig_post_response.go new file mode 100644 index 0000000..2415dcd --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_generate_jitconfig_post_response.go @@ -0,0 +1,110 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersGenerateJitconfigPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The base64 encoded runner configuration. + encoded_jit_config *string + // A self hosted runner + runner i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable +} +// NewItemActionsRunnersGenerateJitconfigPostResponse instantiates a new ItemActionsRunnersGenerateJitconfigPostResponse and sets the default values. +func NewItemActionsRunnersGenerateJitconfigPostResponse()(*ItemActionsRunnersGenerateJitconfigPostResponse) { + m := &ItemActionsRunnersGenerateJitconfigPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersGenerateJitconfigPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncodedJitConfig gets the encoded_jit_config property value. The base64 encoded runner configuration. +// returns a *string when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetEncodedJitConfig()(*string) { + return m.encoded_jit_config +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encoded_jit_config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncodedJitConfig(val) + } + return nil + } + res["runner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunner(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)) + } + return nil + } + return res +} +// GetRunner gets the runner property value. A self hosted runner +// returns a Runnerable when successful +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) GetRunner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runner +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encoded_jit_config", m.GetEncodedJitConfig()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("runner", m.GetRunner()) + 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 *ItemActionsRunnersGenerateJitconfigPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncodedJitConfig sets the encoded_jit_config property value. The base64 encoded runner configuration. +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) SetEncodedJitConfig(value *string)() { + m.encoded_jit_config = value +} +// SetRunner sets the runner property value. A self hosted runner +func (m *ItemActionsRunnersGenerateJitconfigPostResponse) SetRunner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runner = value +} +type ItemActionsRunnersGenerateJitconfigPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncodedJitConfig()(*string) + GetRunner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + SetEncodedJitConfig(value *string)() + SetRunner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() +} diff --git a/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go b/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go new file mode 100644 index 0000000..9db79f3 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersGenerateJitconfigRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\generate-jitconfig +type ItemActionsRunnersGenerateJitconfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal instantiates a new ItemActionsRunnersGenerateJitconfigRequestBuilder and sets the default values. +func NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + m := &ItemActionsRunnersGenerateJitconfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/generate-jitconfig", pathParameters), + } + return m +} +// NewItemActionsRunnersGenerateJitconfigRequestBuilder instantiates a new ItemActionsRunnersGenerateJitconfigRequestBuilder and sets the default values. +func NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal(urlParams, requestAdapter) +} +// Post generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the organization.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemActionsRunnersGenerateJitconfigPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization +func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context.Context, body ItemActionsRunnersGenerateJitconfigPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersGenerateJitconfigPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersGenerateJitconfigPostResponseable), nil +} +// ToPostRequestInformation generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the organization.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsRunnersGenerateJitconfigPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersGenerateJitconfigRequestBuilder when successful +func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + return NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_get_response.go b/pkg/github/orgs/item_actions_runners_get_response.go new file mode 100644 index 0000000..bb94266 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runners property + runners []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersGetResponse instantiates a new ItemActionsRunnersGetResponse and sets the default values. +func NewItemActionsRunnersGetResponse()(*ItemActionsRunnersGetResponse) { + m := &ItemActionsRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []Runnerable when successful +func (m *ItemActionsRunnersGetResponse) GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemActionsRunnersGetResponse) SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + GetTotalCount()(*int32) + SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_delete_response.go b/pkg/github/orgs/item_actions_runners_item_labels_delete_response.go new file mode 100644 index 0000000..d46562f --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_delete_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsDeleteResponse instantiates a new ItemActionsRunnersItemLabelsDeleteResponse and sets the default values. +func NewItemActionsRunnersItemLabelsDeleteResponse()(*ItemActionsRunnersItemLabelsDeleteResponse) { + m := &ItemActionsRunnersItemLabelsDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsDeleteResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsDeleteResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsDeleteResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_get_response.go b/pkg/github/orgs/item_actions_runners_item_labels_get_response.go new file mode 100644 index 0000000..6b9445d --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsGetResponse instantiates a new ItemActionsRunnersItemLabelsGetResponse and sets the default values. +func NewItemActionsRunnersItemLabelsGetResponse()(*ItemActionsRunnersItemLabelsGetResponse) { + m := &ItemActionsRunnersItemLabelsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsGetResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_item_with_name_delete_response.go b/pkg/github/orgs/item_actions_runners_item_labels_item_with_name_delete_response.go new file mode 100644 index 0000000..e5120c1 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_item_with_name_delete_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsItemWithNameDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsItemWithNameDeleteResponse instantiates a new ItemActionsRunnersItemLabelsItemWithNameDeleteResponse and sets the default values. +func NewItemActionsRunnersItemLabelsItemWithNameDeleteResponse()(*ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) { + m := &ItemActionsRunnersItemLabelsItemWithNameDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsItemWithNameDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_post_request_body.go b/pkg/github/orgs/item_actions_runners_item_labels_post_request_body.go new file mode 100644 index 0000000..9a05259 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_post_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnersItemLabelsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to add to the runner. + labels []string +} +// NewItemActionsRunnersItemLabelsPostRequestBody instantiates a new ItemActionsRunnersItemLabelsPostRequestBody and sets the default values. +func NewItemActionsRunnersItemLabelsPostRequestBody()(*ItemActionsRunnersItemLabelsPostRequestBody) { + m := &ItemActionsRunnersItemLabelsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to add to the runner. +// returns a []string when successful +func (m *ItemActionsRunnersItemLabelsPostRequestBody) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemActionsRunnersItemLabelsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to add to the runner. +func (m *ItemActionsRunnersItemLabelsPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +type ItemActionsRunnersItemLabelsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_post_response.go b/pkg/github/orgs/item_actions_runners_item_labels_post_response.go new file mode 100644 index 0000000..2293e66 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_post_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsPostResponse instantiates a new ItemActionsRunnersItemLabelsPostResponse and sets the default values. +func NewItemActionsRunnersItemLabelsPostResponse()(*ItemActionsRunnersItemLabelsPostResponse) { + m := &ItemActionsRunnersItemLabelsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsPostResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsPostResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsPostResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_put_request_body.go b/pkg/github/orgs/item_actions_runners_item_labels_put_request_body.go new file mode 100644 index 0000000..7ceebb5 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsRunnersItemLabelsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. + labels []string +} +// NewItemActionsRunnersItemLabelsPutRequestBody instantiates a new ItemActionsRunnersItemLabelsPutRequestBody and sets the default values. +func NewItemActionsRunnersItemLabelsPutRequestBody()(*ItemActionsRunnersItemLabelsPutRequestBody) { + m := &ItemActionsRunnersItemLabelsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +// returns a []string when successful +func (m *ItemActionsRunnersItemLabelsPutRequestBody) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemActionsRunnersItemLabelsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +func (m *ItemActionsRunnersItemLabelsPutRequestBody) SetLabels(value []string)() { + m.labels = value +} +type ItemActionsRunnersItemLabelsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_put_response.go b/pkg/github/orgs/item_actions_runners_item_labels_put_response.go new file mode 100644 index 0000000..6099197 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_put_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsRunnersItemLabelsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemActionsRunnersItemLabelsPutResponse instantiates a new ItemActionsRunnersItemLabelsPutResponse and sets the default values. +func NewItemActionsRunnersItemLabelsPutResponse()(*ItemActionsRunnersItemLabelsPutResponse) { + m := &ItemActionsRunnersItemLabelsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnersItemLabelsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsRunnersItemLabelsPutResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnersItemLabelsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnersItemLabelsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemActionsRunnersItemLabelsPutResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnersItemLabelsPutResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsRunnersItemLabelsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_request_builder.go b/pkg/github/orgs/item_actions_runners_item_labels_request_builder.go new file mode 100644 index 0000000..3733aed --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_request_builder.go @@ -0,0 +1,178 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersItemLabelsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\{runner_id}\labels +type ItemActionsRunnersItemLabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.runners.item.labels.item collection +// returns a *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ByName(name string)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnersItemLabelsRequestBuilderInternal instantiates a new ItemActionsRunnersItemLabelsRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsRequestBuilder) { + m := &ItemActionsRunnersItemLabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}/labels", pathParameters), + } + return m +} +// NewItemActionsRunnersItemLabelsRequestBuilder instantiates a new ItemActionsRunnersItemLabelsRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersItemLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove all custom labels from a self-hosted runner configured in anorganization. Returns the remaining read-only labels from the runner.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsRunnersItemLabelsDeleteResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsDeleteResponseable), nil +} +// Get lists all labels for a self-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsRunnersItemLabelsGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-an-organization +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsGetResponseable), nil +} +// Post adds custom labels to a self-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemActionsRunnersItemLabelsPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-organization +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Post(ctx context.Context, body ItemActionsRunnersItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsPostResponseable), nil +} +// Put remove all previous custom labels and set the new custom labels for a specificself-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsRunnersItemLabelsPutResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-an-organization +func (m *ItemActionsRunnersItemLabelsRequestBuilder) Put(ctx context.Context, body ItemActionsRunnersItemLabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsPutResponseable), nil +} +// ToDeleteRequestInformation remove all custom labels from a self-hosted runner configured in anorganization. Returns the remaining read-only labels from the runner.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation lists all labels for a self-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation adds custom labels to a self-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsRunnersItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation remove all previous custom labels and set the new custom labels for a specificself-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsRunnersItemLabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersItemLabelsRequestBuilder when successful +func (m *ItemActionsRunnersItemLabelsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersItemLabelsRequestBuilder) { + return NewItemActionsRunnersItemLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_item_labels_with_name_item_request_builder.go b/pkg/github/orgs/item_actions_runners_item_labels_with_name_item_request_builder.go new file mode 100644 index 0000000..7b5501a --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_item_labels_with_name_item_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersItemLabelsWithNameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\{runner_id}\labels\{name} +type ItemActionsRunnersItemLabelsWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal instantiates a new ItemActionsRunnersItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + m := &ItemActionsRunnersItemLabelsWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}/labels/{name}", pathParameters), + } + return m +} +// NewItemActionsRunnersItemLabelsWithNameItemRequestBuilder instantiates a new ItemActionsRunnersItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemActionsRunnersItemLabelsWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove a custom label from a self-hosted runner configuredin an organization. Returns the remaining labels from the runner.This endpoint returns a `404 Not Found` status if the custom label is notpresent on the runner.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization +func (m *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersItemLabelsItemWithNameDeleteResponseable), nil +} +// ToDeleteRequestInformation remove a custom label from a self-hosted runner configuredin an organization. Returns the remaining labels from the runner.This endpoint returns a `404 Not Found` status if the custom label is notpresent on the runner.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + return NewItemActionsRunnersItemLabelsWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_registration_token_request_builder.go b/pkg/github/orgs/item_actions_runners_registration_token_request_builder.go new file mode 100644 index 0000000..1c5932b --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_registration_token_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersRegistrationTokenRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\registration-token +type ItemActionsRunnersRegistrationTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersRegistrationTokenRequestBuilderInternal instantiates a new ItemActionsRunnersRegistrationTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRegistrationTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + m := &ItemActionsRunnersRegistrationTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/registration-token", pathParameters), + } + return m +} +// NewItemActionsRunnersRegistrationTokenRequestBuilder instantiates a new ItemActionsRunnersRegistrationTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRegistrationTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersRegistrationTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post returns a token that you can pass to the `config` script. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:```./config.sh --url https://github.com/octo-org --token TOKEN```Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a AuthenticationTokenable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-registration-token-for-an-organization +func (m *ItemActionsRunnersRegistrationTokenRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthenticationTokenFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable), nil +} +// ToPostRequestInformation returns a token that you can pass to the `config` script. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:```./config.sh --url https://github.com/octo-org --token TOKEN```Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersRegistrationTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersRegistrationTokenRequestBuilder when successful +func (m *ItemActionsRunnersRegistrationTokenRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + return NewItemActionsRunnersRegistrationTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_remove_token_request_builder.go b/pkg/github/orgs/item_actions_runners_remove_token_request_builder.go new file mode 100644 index 0000000..f8453f2 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_remove_token_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersRemoveTokenRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\remove-token +type ItemActionsRunnersRemoveTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersRemoveTokenRequestBuilderInternal instantiates a new ItemActionsRunnersRemoveTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRemoveTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRemoveTokenRequestBuilder) { + m := &ItemActionsRunnersRemoveTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/remove-token", pathParameters), + } + return m +} +// NewItemActionsRunnersRemoveTokenRequestBuilder instantiates a new ItemActionsRunnersRemoveTokenRequestBuilder and sets the default values. +func NewItemActionsRunnersRemoveTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRemoveTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersRemoveTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:```./config.sh remove --token TOKEN```Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a AuthenticationTokenable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-remove-token-for-an-organization +func (m *ItemActionsRunnersRemoveTokenRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthenticationTokenFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable), nil +} +// ToPostRequestInformation returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:```./config.sh remove --token TOKEN```Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersRemoveTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersRemoveTokenRequestBuilder when successful +func (m *ItemActionsRunnersRemoveTokenRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersRemoveTokenRequestBuilder) { + return NewItemActionsRunnersRemoveTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_request_builder.go b/pkg/github/orgs/item_actions_runners_request_builder.go new file mode 100644 index 0000000..0e61bea --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_request_builder.go @@ -0,0 +1,96 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnersRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners +type ItemActionsRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnersRequestBuilderGetQueryParameters lists all self-hosted runners configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +type ItemActionsRunnersRequestBuilderGetQueryParameters struct { + // The name of a self-hosted runner. + Name *string `uriparametername:"name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRunner_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.runners.item collection +// returns a *ItemActionsRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) ByRunner_id(runner_id int32)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_id), 10) + return NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsRunnersRequestBuilderInternal instantiates a new ItemActionsRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRequestBuilder) { + m := &ItemActionsRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners{?name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnersRequestBuilder instantiates a new ItemActionsRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Downloads the downloads property +// returns a *ItemActionsRunnersDownloadsRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) Downloads()(*ItemActionsRunnersDownloadsRequestBuilder) { + return NewItemActionsRunnersDownloadsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// GenerateJitconfig the generateJitconfig property +// returns a *ItemActionsRunnersGenerateJitconfigRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) GenerateJitconfig()(*ItemActionsRunnersGenerateJitconfigRequestBuilder) { + return NewItemActionsRunnersGenerateJitconfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get lists all self-hosted runners configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-organization +func (m *ItemActionsRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnersRequestBuilderGetQueryParameters])(ItemActionsRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnersGetResponseable), nil +} +// RegistrationToken the registrationToken property +// returns a *ItemActionsRunnersRegistrationTokenRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) RegistrationToken()(*ItemActionsRunnersRegistrationTokenRequestBuilder) { + return NewItemActionsRunnersRegistrationTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RemoveToken the removeToken property +// returns a *ItemActionsRunnersRemoveTokenRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) RemoveToken()(*ItemActionsRunnersRemoveTokenRequestBuilder) { + return NewItemActionsRunnersRemoveTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all self-hosted runners configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersRequestBuilder when successful +func (m *ItemActionsRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersRequestBuilder) { + return NewItemActionsRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runners_with_runner_item_request_builder.go b/pkg/github/orgs/item_actions_runners_with_runner_item_request_builder.go new file mode 100644 index 0000000..7806800 --- /dev/null +++ b/pkg/github/orgs/item_actions_runners_with_runner_item_request_builder.go @@ -0,0 +1,84 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsRunnersWithRunner_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runners\{runner_id} +type ItemActionsRunnersWithRunner_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal instantiates a new ItemActionsRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + m := &ItemActionsRunnersWithRunner_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}", pathParameters), + } + return m +} +// NewItemActionsRunnersWithRunner_ItemRequestBuilder instantiates a new ItemActionsRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemActionsRunnersWithRunner_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnersWithRunner_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-organization +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific self-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a Runnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-an-organization +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable), nil +} +// Labels the labels property +// returns a *ItemActionsRunnersItemLabelsRequestBuilder when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) Labels()(*ItemActionsRunnersItemLabelsRequestBuilder) { + return NewItemActionsRunnersItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific self-hosted runner configured in an organization.Authenticated users must have admin access to the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemActionsRunnersWithRunner_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnersWithRunner_ItemRequestBuilder) { + return NewItemActionsRunnersWithRunner_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_secrets_get_response.go b/pkg/github/orgs/item_actions_secrets_get_response.go new file mode 100644 index 0000000..e9f565b --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable + // The total_count property + total_count *int32 +} +// NewItemActionsSecretsGetResponse instantiates a new ItemActionsSecretsGetResponse and sets the default values. +func NewItemActionsSecretsGetResponse()(*ItemActionsSecretsGetResponse) { + m := &ItemActionsSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationActionsSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []OrganizationActionsSecretable when successful +func (m *ItemActionsSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemActionsSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_secrets_item_repositories_get_response.go b/pkg/github/orgs/item_actions_secrets_item_repositories_get_response.go new file mode 100644 index 0000000..4af37a4 --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_item_repositories_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsSecretsItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable + // The total_count property + total_count *int32 +} +// NewItemActionsSecretsItemRepositoriesGetResponse instantiates a new ItemActionsSecretsItemRepositoriesGetResponse and sets the default values. +func NewItemActionsSecretsItemRepositoriesGetResponse()(*ItemActionsSecretsItemRepositoriesGetResponse) { + m := &ItemActionsSecretsItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsSecretsItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsSecretsItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsSecretsItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsSecretsItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsSecretsItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []MinimalRepositoryable when successful +func (m *ItemActionsSecretsItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsSecretsItemRepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsSecretsItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsSecretsItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *ItemActionsSecretsItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsSecretsItemRepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsSecretsItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_secrets_item_repositories_put_request_body.go b/pkg/github/orgs/item_actions_secrets_item_repositories_put_request_body.go new file mode 100644 index 0000000..9e09626 --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_item_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsSecretsItemRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. + selected_repository_ids []int32 +} +// NewItemActionsSecretsItemRepositoriesPutRequestBody instantiates a new ItemActionsSecretsItemRepositoriesPutRequestBody and sets the default values. +func NewItemActionsSecretsItemRepositoriesPutRequestBody()(*ItemActionsSecretsItemRepositoriesPutRequestBody) { + m := &ItemActionsSecretsItemRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsSecretsItemRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsSecretsItemRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsSecretsItemRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +// returns a []int32 when successful +func (m *ItemActionsSecretsItemRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemActionsSecretsItemRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemActionsSecretsItemRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +func (m *ItemActionsSecretsItemRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemActionsSecretsItemRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go b/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go new file mode 100644 index 0000000..bf38686 --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go @@ -0,0 +1,100 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsSecretsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\secrets\{secret_name}\repositories +type ItemActionsSecretsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsSecretsItemRepositoriesRequestBuilderGetQueryParameters lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +type ItemActionsSecretsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.secrets.item.repositories.item collection +// returns a *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsSecretsItemRepositoriesRequestBuilderInternal instantiates a new ItemActionsSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewItemActionsSecretsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsItemRepositoriesRequestBuilder) { + m := &ItemActionsSecretsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsSecretsItemRepositoriesRequestBuilder instantiates a new ItemActionsSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewItemActionsSecretsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsSecretsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsSecretsItemRepositoriesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-selected-repositories-for-an-organization-secret +func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsSecretsItemRepositoriesRequestBuilderGetQueryParameters])(ItemActionsSecretsItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsSecretsItemRepositoriesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsSecretsItemRepositoriesGetResponseable), nil +} +// Put replaces all repositories for an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#set-selected-repositories-for-an-organization-secret +func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) Put(ctx context.Context, body ItemActionsSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsSecretsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces all repositories for an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsSecretsItemRepositoriesRequestBuilder when successful +func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemActionsSecretsItemRepositoriesRequestBuilder) { + return NewItemActionsSecretsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_secrets_item_repositories_with_repository_item_request_builder.go b/pkg/github/orgs/item_actions_secrets_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..5c1a16c --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\secrets\{secret_name}\repositories\{repository_id} +type ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret +func (m *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a repository to an organization secret when the `visibility` forrepository access is set to `selected`. For more information about setting the visibility, see [Create orupdate an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#add-selected-repository-to-an-organization-secret +func (m *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to an organization secret when the `visibility` forrepository access is set to `selected`. For more information about setting the visibility, see [Create orupdate an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewItemActionsSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_secrets_item_with_secret_name_put_request_body.go b/pkg/github/orgs/item_actions_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..a87bf6c --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-organization-public-key) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string + // An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. + selected_repository_ids []int32 +} +// NewItemActionsSecretsItemWithSecret_namePutRequestBody instantiates a new ItemActionsSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemActionsSecretsItemWithSecret_namePutRequestBody()(*ItemActionsSecretsItemWithSecret_namePutRequestBody) { + m := &ItemActionsSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-organization-public-key) endpoint. +// returns a *string when successful +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +// returns a []int32 when successful +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemActionsSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-organization-public-key) endpoint. +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +func (m *ItemActionsSecretsItemWithSecret_namePutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemActionsSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + GetSelectedRepositoryIds()([]int32) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_actions_secrets_public_key_request_builder.go b/pkg/github/orgs/item_actions_secrets_public_key_request_builder.go new file mode 100644 index 0000000..530c925 --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsSecretsPublicKeyRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\secrets\public-key +type ItemActionsSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsSecretsPublicKeyRequestBuilderInternal instantiates a new ItemActionsSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemActionsSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsPublicKeyRequestBuilder) { + m := &ItemActionsSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/public-key", pathParameters), + } + return m +} +// NewItemActionsSecretsPublicKeyRequestBuilder instantiates a new ItemActionsSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemActionsSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.The authenticated user must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-organization-public-key +func (m *ItemActionsSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsPublicKeyable), nil +} +// ToGetRequestInformation gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.The authenticated user must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsSecretsPublicKeyRequestBuilder when successful +func (m *ItemActionsSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemActionsSecretsPublicKeyRequestBuilder) { + return NewItemActionsSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_secrets_request_builder.go b/pkg/github/orgs/item_actions_secrets_request_builder.go new file mode 100644 index 0000000..facb06d --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_request_builder.go @@ -0,0 +1,80 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsSecretsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\secrets +type ItemActionsSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsSecretsRequestBuilderGetQueryParameters lists all secrets available in an organization without revealing theirencrypted values.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +type ItemActionsSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.secrets.item collection +// returns a *ItemActionsSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemActionsSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemActionsSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemActionsSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsSecretsRequestBuilderInternal instantiates a new ItemActionsSecretsRequestBuilder and sets the default values. +func NewItemActionsSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsRequestBuilder) { + m := &ItemActionsSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsSecretsRequestBuilder instantiates a new ItemActionsSecretsRequestBuilder and sets the default values. +func NewItemActionsSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all secrets available in an organization without revealing theirencrypted values.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-organization-secrets +func (m *ItemActionsSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsSecretsRequestBuilderGetQueryParameters])(ItemActionsSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemActionsSecretsPublicKeyRequestBuilder when successful +func (m *ItemActionsSecretsRequestBuilder) PublicKey()(*ItemActionsSecretsPublicKeyRequestBuilder) { + return NewItemActionsSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all secrets available in an organization without revealing theirencrypted values.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsSecretsRequestBuilder when successful +func (m *ItemActionsSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsSecretsRequestBuilder) { + return NewItemActionsSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_secrets_with_secret_name_item_request_builder.go b/pkg/github/orgs/item_actions_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..85f45bd --- /dev/null +++ b/pkg/github/orgs/item_actions_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,115 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\secrets\{secret_name} +type ItemActionsSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemActionsSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemActionsSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemActionsSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemActionsSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemActionsSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemActionsSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a secret in an organization using the secret name.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#delete-an-organization-secret +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a single organization secret without revealing its encrypted value.The authenticated user must have collaborator access to a repository to create, update, or read secretsOAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a OrganizationActionsSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-organization-secret +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationActionsSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsSecretable), nil +} +// Put creates or updates an organization secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-organization-secret +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemActionsSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// Repositories the repositories property +// returns a *ItemActionsSecretsItemRepositoriesRequestBuilder when successful +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) Repositories()(*ItemActionsSecretsItemRepositoriesRequestBuilder) { + return NewItemActionsSecretsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a secret in an organization using the secret name.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a single organization secret without revealing its encrypted value.The authenticated user must have collaborator access to a repository to create, update, or read secretsOAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates an organization secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemActionsSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsSecretsWithSecret_nameItemRequestBuilder) { + return NewItemActionsSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_variables_get_response.go b/pkg/github/orgs/item_actions_variables_get_response.go new file mode 100644 index 0000000..31f346b --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsVariablesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The variables property + variables []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable +} +// NewItemActionsVariablesGetResponse instantiates a new ItemActionsVariablesGetResponse and sets the default values. +func NewItemActionsVariablesGetResponse()(*ItemActionsVariablesGetResponse) { + m := &ItemActionsVariablesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsVariablesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsVariablesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsVariablesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsVariablesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsVariablesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["variables"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationActionsVariableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable) + } + } + m.SetVariables(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsVariablesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetVariables gets the variables property value. The variables property +// returns a []OrganizationActionsVariableable when successful +func (m *ItemActionsVariablesGetResponse) GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable) { + return m.variables +} +// Serialize serializes information the current object +func (m *ItemActionsVariablesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetVariables() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVariables())) + for i, v := range m.GetVariables() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("variables", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemActionsVariablesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsVariablesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetVariables sets the variables property value. The variables property +func (m *ItemActionsVariablesGetResponse) SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable)() { + m.variables = value +} +type ItemActionsVariablesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable) + SetTotalCount(value *int32)() + SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable)() +} diff --git a/pkg/github/orgs/item_actions_variables_item_repositories_get_response.go b/pkg/github/orgs/item_actions_variables_item_repositories_get_response.go new file mode 100644 index 0000000..a5dfebd --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_item_repositories_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemActionsVariablesItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable + // The total_count property + total_count *int32 +} +// NewItemActionsVariablesItemRepositoriesGetResponse instantiates a new ItemActionsVariablesItemRepositoriesGetResponse and sets the default values. +func NewItemActionsVariablesItemRepositoriesGetResponse()(*ItemActionsVariablesItemRepositoriesGetResponse) { + m := &ItemActionsVariablesItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsVariablesItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsVariablesItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsVariablesItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsVariablesItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsVariablesItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []MinimalRepositoryable when successful +func (m *ItemActionsVariablesItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsVariablesItemRepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsVariablesItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsVariablesItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *ItemActionsVariablesItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsVariablesItemRepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsVariablesItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_variables_item_repositories_put_request_body.go b/pkg/github/orgs/item_actions_variables_item_repositories_put_request_body.go new file mode 100644 index 0000000..98eebbe --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_item_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsVariablesItemRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The IDs of the repositories that can access the organization variable. + selected_repository_ids []int32 +} +// NewItemActionsVariablesItemRepositoriesPutRequestBody instantiates a new ItemActionsVariablesItemRepositoriesPutRequestBody and sets the default values. +func NewItemActionsVariablesItemRepositoriesPutRequestBody()(*ItemActionsVariablesItemRepositoriesPutRequestBody) { + m := &ItemActionsVariablesItemRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsVariablesItemRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsVariablesItemRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsVariablesItemRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsVariablesItemRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsVariablesItemRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. The IDs of the repositories that can access the organization variable. +// returns a []int32 when successful +func (m *ItemActionsVariablesItemRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemActionsVariablesItemRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemActionsVariablesItemRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. The IDs of the repositories that can access the organization variable. +func (m *ItemActionsVariablesItemRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemActionsVariablesItemRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go b/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go new file mode 100644 index 0000000..c411cb5 --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go @@ -0,0 +1,100 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsVariablesItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\variables\{name}\repositories +type ItemActionsVariablesItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsVariablesItemRepositoriesRequestBuilderGetQueryParameters lists all repositories that can access an organization variablethat is available to selected repositories.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +type ItemActionsVariablesItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.variables.item.repositories.item collection +// returns a *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsVariablesItemRepositoriesRequestBuilderInternal instantiates a new ItemActionsVariablesItemRepositoriesRequestBuilder and sets the default values. +func NewItemActionsVariablesItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesItemRepositoriesRequestBuilder) { + m := &ItemActionsVariablesItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsVariablesItemRepositoriesRequestBuilder instantiates a new ItemActionsVariablesItemRepositoriesRequestBuilder and sets the default values. +func NewItemActionsVariablesItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsVariablesItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all repositories that can access an organization variablethat is available to selected repositories.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsVariablesItemRepositoriesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#list-selected-repositories-for-an-organization-variable +func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsVariablesItemRepositoriesRequestBuilderGetQueryParameters])(ItemActionsVariablesItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsVariablesItemRepositoriesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsVariablesItemRepositoriesGetResponseable), nil +} +// Put replaces all repositories for an organization variable that is availableto selected repositories. Organization variables that are available to selectedrepositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#set-selected-repositories-for-an-organization-variable +func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) Put(ctx context.Context, body ItemActionsVariablesItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists all repositories that can access an organization variablethat is available to selected repositories.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsVariablesItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces all repositories for an organization variable that is availableto selected repositories. Organization variables that are available to selectedrepositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsVariablesItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsVariablesItemRepositoriesRequestBuilder when successful +func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemActionsVariablesItemRepositoriesRequestBuilder) { + return NewItemActionsVariablesItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_variables_item_repositories_with_repository_item_request_builder.go b/pkg/github/orgs/item_actions_variables_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..2883f9e --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\variables\{name}\repositories\{repository_id} +type ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from an organization variable that isavailable to selected repositories. Organization variables that are available toselected repositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#remove-selected-repository-from-an-organization-variable +func (m *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a repository to an organization variable that is available to selected repositories.Organization variables that are available to selected repositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#add-selected-repository-to-an-organization-variable +func (m *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from an organization variable that isavailable to selected repositories. Organization variables that are available toselected repositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to an organization variable that is available to selected repositories.Organization variables that are available to selected repositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewItemActionsVariablesItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_variables_item_with_name_patch_request_body.go b/pkg/github/orgs/item_actions_variables_item_with_name_patch_request_body.go new file mode 100644 index 0000000..02ae1c5 --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_item_with_name_patch_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsVariablesItemWithNamePatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the variable. + name *string + // An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. + selected_repository_ids []int32 + // The value of the variable. + value *string +} +// NewItemActionsVariablesItemWithNamePatchRequestBody instantiates a new ItemActionsVariablesItemWithNamePatchRequestBody and sets the default values. +func NewItemActionsVariablesItemWithNamePatchRequestBody()(*ItemActionsVariablesItemWithNamePatchRequestBody) { + m := &ItemActionsVariablesItemWithNamePatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsVariablesItemWithNamePatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsVariablesItemWithNamePatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsVariablesItemWithNamePatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) GetName()(*string) { + return m.name +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. +// returns a []int32 when successful +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ItemActionsVariablesItemWithNamePatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name of the variable. +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ItemActionsVariablesItemWithNamePatchRequestBody) SetValue(value *string)() { + m.value = value +} +type ItemActionsVariablesItemWithNamePatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetSelectedRepositoryIds()([]int32) + GetValue()(*string) + SetName(value *string)() + SetSelectedRepositoryIds(value []int32)() + SetValue(value *string)() +} diff --git a/pkg/github/orgs/item_actions_variables_post_request_body.go b/pkg/github/orgs/item_actions_variables_post_request_body.go new file mode 100644 index 0000000..5010641 --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_post_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsVariablesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the variable. + name *string + // An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. + selected_repository_ids []int32 + // The value of the variable. + value *string +} +// NewItemActionsVariablesPostRequestBody instantiates a new ItemActionsVariablesPostRequestBody and sets the default values. +func NewItemActionsVariablesPostRequestBody()(*ItemActionsVariablesPostRequestBody) { + m := &ItemActionsVariablesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsVariablesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsVariablesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsVariablesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemActionsVariablesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsVariablesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ItemActionsVariablesPostRequestBody) GetName()(*string) { + return m.name +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. +// returns a []int32 when successful +func (m *ItemActionsVariablesPostRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ItemActionsVariablesPostRequestBody) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemActionsVariablesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ItemActionsVariablesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name of the variable. +func (m *ItemActionsVariablesPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. +func (m *ItemActionsVariablesPostRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ItemActionsVariablesPostRequestBody) SetValue(value *string)() { + m.value = value +} +type ItemActionsVariablesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetSelectedRepositoryIds()([]int32) + GetValue()(*string) + SetName(value *string)() + SetSelectedRepositoryIds(value []int32)() + SetValue(value *string)() +} diff --git a/pkg/github/orgs/item_actions_variables_request_builder.go b/pkg/github/orgs/item_actions_variables_request_builder.go new file mode 100644 index 0000000..0b3ec6a --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_request_builder.go @@ -0,0 +1,107 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsVariablesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\variables +type ItemActionsVariablesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsVariablesRequestBuilderGetQueryParameters lists all organization variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +type ItemActionsVariablesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.actions.variables.item collection +// returns a *ItemActionsVariablesWithNameItemRequestBuilder when successful +func (m *ItemActionsVariablesRequestBuilder) ByName(name string)(*ItemActionsVariablesWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemActionsVariablesWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsVariablesRequestBuilderInternal instantiates a new ItemActionsVariablesRequestBuilder and sets the default values. +func NewItemActionsVariablesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesRequestBuilder) { + m := &ItemActionsVariablesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsVariablesRequestBuilder instantiates a new ItemActionsVariablesRequestBuilder and sets the default values. +func NewItemActionsVariablesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsVariablesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all organization variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a ItemActionsVariablesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#list-organization-variables +func (m *ItemActionsVariablesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsVariablesRequestBuilderGetQueryParameters])(ItemActionsVariablesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsVariablesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsVariablesGetResponseable), nil +} +// Post creates an organization variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#create-an-organization-variable +func (m *ItemActionsVariablesRequestBuilder) Post(ctx context.Context, body ItemActionsVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToGetRequestInformation lists all organization variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsVariablesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates an organization variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsVariablesRequestBuilder when successful +func (m *ItemActionsVariablesRequestBuilder) WithUrl(rawUrl string)(*ItemActionsVariablesRequestBuilder) { + return NewItemActionsVariablesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_variables_with_name_item_request_builder.go b/pkg/github/orgs/item_actions_variables_with_name_item_request_builder.go new file mode 100644 index 0000000..6880e2d --- /dev/null +++ b/pkg/github/orgs/item_actions_variables_with_name_item_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemActionsVariablesWithNameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\variables\{name} +type ItemActionsVariablesWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsVariablesWithNameItemRequestBuilderInternal instantiates a new ItemActionsVariablesWithNameItemRequestBuilder and sets the default values. +func NewItemActionsVariablesWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesWithNameItemRequestBuilder) { + m := &ItemActionsVariablesWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}", pathParameters), + } + return m +} +// NewItemActionsVariablesWithNameItemRequestBuilder instantiates a new ItemActionsVariablesWithNameItemRequestBuilder and sets the default values. +func NewItemActionsVariablesWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsVariablesWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsVariablesWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an organization variable using the variable name.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#delete-an-organization-variable +func (m *ItemActionsVariablesWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific variable in an organization.The authenticated user must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a OrganizationActionsVariableable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#get-an-organization-variable +func (m *ItemActionsVariablesWithNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationActionsVariableFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationActionsVariableable), nil +} +// Patch updates an organization variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#update-an-organization-variable +func (m *ItemActionsVariablesWithNameItemRequestBuilder) Patch(ctx context.Context, body ItemActionsVariablesItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Repositories the repositories property +// returns a *ItemActionsVariablesItemRepositoriesRequestBuilder when successful +func (m *ItemActionsVariablesWithNameItemRequestBuilder) Repositories()(*ItemActionsVariablesItemRepositoriesRequestBuilder) { + return NewItemActionsVariablesItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes an organization variable using the variable name.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific variable in an organization.The authenticated user must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesWithNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates an organization variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. +// returns a *RequestInformation when successful +func (m *ItemActionsVariablesWithNameItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemActionsVariablesItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsVariablesWithNameItemRequestBuilder when successful +func (m *ItemActionsVariablesWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsVariablesWithNameItemRequestBuilder) { + return NewItemActionsVariablesWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_announcement_request_builder.go b/pkg/github/orgs/item_announcement_request_builder.go new file mode 100644 index 0000000..154b2e1 --- /dev/null +++ b/pkg/github/orgs/item_announcement_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemAnnouncementRequestBuilder builds and executes requests for operations under \orgs\{org}\announcement +type ItemAnnouncementRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemAnnouncementRequestBuilderInternal instantiates a new ItemAnnouncementRequestBuilder and sets the default values. +func NewItemAnnouncementRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAnnouncementRequestBuilder) { + m := &ItemAnnouncementRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/announcement", pathParameters), + } + return m +} +// NewItemAnnouncementRequestBuilder instantiates a new ItemAnnouncementRequestBuilder and sets the default values. +func NewItemAnnouncementRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAnnouncementRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAnnouncementRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes the announcement banner currently set for the organization. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/organizations#remove-announcement-banner-from-organization +func (m *ItemAnnouncementRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets the announcement banner currently set for the organization. Only returns the announcement banner set at theorganization level. Organization members may also see an enterprise-level announcement banner. To get anannouncement banner displayed at the enterprise level, use the enterprise-level endpoint. +// returns a AnnouncementBannerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/organizations#get-announcement-banner-for-organization +func (m *ItemAnnouncementRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAnnouncementBannerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable), nil +} +// Patch sets the announcement banner to display for the organization. +// returns a AnnouncementBannerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/organizations#set-announcement-banner-for-organization +func (m *ItemAnnouncementRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Announcementable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAnnouncementBannerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AnnouncementBannerable), nil +} +// ToDeleteRequestInformation removes the announcement banner currently set for the organization. +// returns a *RequestInformation when successful +func (m *ItemAnnouncementRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets the announcement banner currently set for the organization. Only returns the announcement banner set at theorganization level. Organization members may also see an enterprise-level announcement banner. To get anannouncement banner displayed at the enterprise level, use the enterprise-level endpoint. +// returns a *RequestInformation when successful +func (m *ItemAnnouncementRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation sets the announcement banner to display for the organization. +// returns a *RequestInformation when successful +func (m *ItemAnnouncementRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Announcementable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAnnouncementRequestBuilder when successful +func (m *ItemAnnouncementRequestBuilder) WithUrl(rawUrl string)(*ItemAnnouncementRequestBuilder) { + return NewItemAnnouncementRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go new file mode 100644 index 0000000..1f5322d --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go @@ -0,0 +1,92 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attestations property + attestations []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable +} +// NewItemAttestationsItemWithSubject_digestGetResponse instantiates a new ItemAttestationsItemWithSubject_digestGetResponse and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse()(*ItemAttestationsItemWithSubject_digestGetResponse) { + m := &ItemAttestationsItemWithSubject_digestGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttestations gets the attestations property value. The attestations property +// returns a []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) { + return m.attestations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + } + } + m.SetAttestations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttestations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttestations())) + for i, v := range m.GetAttestations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attestations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemAttestationsItemWithSubject_digestGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttestations sets the attestations property value. The attestations property +func (m *ItemAttestationsItemWithSubject_digestGetResponse) SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() { + m.attestations = value +} +type ItemAttestationsItemWithSubject_digestGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go new file mode 100644 index 0000000..ab00123 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go @@ -0,0 +1,109 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable + // The repository_id property + repository_id *int32 +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() { + m.bundle = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) + GetRepositoryId()(*int32) + SetBundle(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go new file mode 100644 index 0000000..44f79a7 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go @@ -0,0 +1,139 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dsseEnvelope property + dsseEnvelope ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetDsseEnvelope()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetVerificationMaterial()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetDsseEnvelope(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetVerificationMaterial(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go new file mode 100644 index 0000000..c2d6e08 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go new file mode 100644 index 0000000..ca19f71 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_attestations_request_builder.go b/pkg/github/orgs/item_attestations_request_builder.go new file mode 100644 index 0000000..98b1826 --- /dev/null +++ b/pkg/github/orgs/item_attestations_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemAttestationsRequestBuilder builds and executes requests for operations under \orgs\{org}\attestations +type ItemAttestationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySubject_digest gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.attestations.item collection +// returns a *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsRequestBuilder) BySubject_digest(subject_digest string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if subject_digest != "" { + urlTplParams["subject_digest"] = subject_digest + } + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemAttestationsRequestBuilderInternal instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + m := &ItemAttestationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/attestations", pathParameters), + } + return m +} +// NewItemAttestationsRequestBuilder instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go b/pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go new file mode 100644 index 0000000..93adee3 --- /dev/null +++ b/pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go @@ -0,0 +1,65 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemAttestationsWithSubject_digestItemRequestBuilder builds and executes requests for operations under \orgs\{org}\attestations\{subject_digest} +type ItemAttestationsWithSubject_digestItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters list a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +type ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + m := &ItemAttestationsWithSubject_digestItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + } + return m +} +// NewItemAttestationsWithSubject_digestItemRequestBuilder instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemAttestationsItemWithSubject_digestGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-attestations +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(ItemAttestationsItemWithSubject_digestGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemAttestationsItemWithSubject_digestGetResponseable), nil +} +// ToGetRequestInformation list a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) WithUrl(rawUrl string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + return NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_audit_log_request_builder.go b/pkg/github/orgs/item_audit_log_request_builder.go new file mode 100644 index 0000000..88c0dad --- /dev/null +++ b/pkg/github/orgs/item_audit_log_request_builder.go @@ -0,0 +1,76 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + iebd9de6fcf98907d44a4a193bc9f8ab73296c4753ad0039f85171b457db4800f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/auditlog" +) + +// ItemAuditLogRequestBuilder builds and executes requests for operations under \orgs\{org}\audit-log +type ItemAuditLogRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAuditLogRequestBuilderGetQueryParameters gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)."Use pagination to retrieve fewer or more than 30 events. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint. +type ItemAuditLogRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events after this cursor. + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events before this cursor. + Before *string `uriparametername:"before"` + // The event types to include:- `web` - returns web (non-Git) events.- `git` - returns Git events.- `all` - returns both web and Git events.The default is `web`. + Include *iebd9de6fcf98907d44a4a193bc9f8ab73296c4753ad0039f85171b457db4800f.GetIncludeQueryParameterType `uriparametername:"include"` + // The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.The default is `desc`. + Order *iebd9de6fcf98907d44a4a193bc9f8ab73296c4753ad0039f85171b457db4800f.GetOrderQueryParameterType `uriparametername:"order"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). + Phrase *string `uriparametername:"phrase"` +} +// NewItemAuditLogRequestBuilderInternal instantiates a new ItemAuditLogRequestBuilder and sets the default values. +func NewItemAuditLogRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuditLogRequestBuilder) { + m := &ItemAuditLogRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/audit-log{?after*,before*,include*,order*,per_page*,phrase*}", pathParameters), + } + return m +} +// NewItemAuditLogRequestBuilder instantiates a new ItemAuditLogRequestBuilder and sets the default values. +func NewItemAuditLogRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuditLogRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAuditLogRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)."Use pagination to retrieve fewer or more than 30 events. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint. +// returns a []AuditLogEventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#get-the-audit-log-for-an-organization +func (m *ItemAuditLogRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAuditLogRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogEventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuditLogEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogEventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogEventable) + } + } + return val, nil +} +// ToGetRequestInformation gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-cloud@latest//organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)."Use pagination to retrieve fewer or more than 30 events. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemAuditLogRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAuditLogRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAuditLogRequestBuilder when successful +func (m *ItemAuditLogRequestBuilder) WithUrl(rawUrl string)(*ItemAuditLogRequestBuilder) { + return NewItemAuditLogRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_blocks_request_builder.go b/pkg/github/orgs/item_blocks_request_builder.go new file mode 100644 index 0000000..1333c64 --- /dev/null +++ b/pkg/github/orgs/item_blocks_request_builder.go @@ -0,0 +1,79 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemBlocksRequestBuilder builds and executes requests for operations under \orgs\{org}\blocks +type ItemBlocksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemBlocksRequestBuilderGetQueryParameters list the users blocked by an organization. +type ItemBlocksRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.blocks.item collection +// returns a *ItemBlocksWithUsernameItemRequestBuilder when successful +func (m *ItemBlocksRequestBuilder) ByUsername(username string)(*ItemBlocksWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemBlocksWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemBlocksRequestBuilderInternal instantiates a new ItemBlocksRequestBuilder and sets the default values. +func NewItemBlocksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemBlocksRequestBuilder) { + m := &ItemBlocksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/blocks{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemBlocksRequestBuilder instantiates a new ItemBlocksRequestBuilder and sets the default values. +func NewItemBlocksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemBlocksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemBlocksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the users blocked by an organization. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/blocking#list-users-blocked-by-an-organization +func (m *ItemBlocksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemBlocksRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation list the users blocked by an organization. +// returns a *RequestInformation when successful +func (m *ItemBlocksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemBlocksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemBlocksRequestBuilder when successful +func (m *ItemBlocksRequestBuilder) WithUrl(rawUrl string)(*ItemBlocksRequestBuilder) { + return NewItemBlocksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_blocks_with_username_item_request_builder.go b/pkg/github/orgs/item_blocks_with_username_item_request_builder.go new file mode 100644 index 0000000..242a07e --- /dev/null +++ b/pkg/github/orgs/item_blocks_with_username_item_request_builder.go @@ -0,0 +1,106 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemBlocksWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\blocks\{username} +type ItemBlocksWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemBlocksWithUsernameItemRequestBuilderInternal instantiates a new ItemBlocksWithUsernameItemRequestBuilder and sets the default values. +func NewItemBlocksWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemBlocksWithUsernameItemRequestBuilder) { + m := &ItemBlocksWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/blocks/{username}", pathParameters), + } + return m +} +// NewItemBlocksWithUsernameItemRequestBuilder instantiates a new ItemBlocksWithUsernameItemRequestBuilder and sets the default values. +func NewItemBlocksWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemBlocksWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemBlocksWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete unblocks the given user on behalf of the specified organization. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/blocking#unblock-a-user-from-an-organization +func (m *ItemBlocksWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/blocking#check-if-a-user-is-blocked-by-an-organization +func (m *ItemBlocksWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned. +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/blocking#block-a-user-from-an-organization +func (m *ItemBlocksWithUsernameItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation unblocks the given user on behalf of the specified organization. +// returns a *RequestInformation when successful +func (m *ItemBlocksWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub. +// returns a *RequestInformation when successful +func (m *ItemBlocksWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned. +// returns a *RequestInformation when successful +func (m *ItemBlocksWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemBlocksWithUsernameItemRequestBuilder when successful +func (m *ItemBlocksWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemBlocksWithUsernameItemRequestBuilder) { + return NewItemBlocksWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_scanning_alerts_request_builder.go b/pkg/github/orgs/item_code_scanning_alerts_request_builder.go new file mode 100644 index 0000000..a1f1e5e --- /dev/null +++ b/pkg/github/orgs/item_code_scanning_alerts_request_builder.go @@ -0,0 +1,90 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i89d347abb556faeba4ab9b515fc4bc1446f8f3263505181ffd587994bac7c5c0 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/codescanning/alerts" +) + +// ItemCodeScanningAlertsRequestBuilder builds and executes requests for operations under \orgs\{org}\code-scanning\alerts +type ItemCodeScanningAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodeScanningAlertsRequestBuilderGetQueryParameters lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +type ItemCodeScanningAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i89d347abb556faeba4ab9b515fc4bc1446f8f3263505181ffd587994bac7c5c0.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // If specified, only code scanning alerts with this severity will be returned. + Severity *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSeverity `uriparametername:"severity"` + // The property by which to sort the results. + Sort *i89d347abb556faeba4ab9b515fc4bc1446f8f3263505181ffd587994bac7c5c0.GetSortQueryParameterType `uriparametername:"sort"` + // If specified, only code scanning alerts with this state will be returned. + State *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertStateQuery `uriparametername:"state"` + // The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. + Tool_guid *string `uriparametername:"tool_guid"` + // The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. + Tool_name *string `uriparametername:"tool_name"` +} +// NewItemCodeScanningAlertsRequestBuilderInternal instantiates a new ItemCodeScanningAlertsRequestBuilder and sets the default values. +func NewItemCodeScanningAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningAlertsRequestBuilder) { + m := &ItemCodeScanningAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-scanning/alerts{?after*,before*,direction*,page*,per_page*,severity*,sort*,state*,tool_guid*,tool_name*}", pathParameters), + } + return m +} +// NewItemCodeScanningAlertsRequestBuilder instantiates a new ItemCodeScanningAlertsRequestBuilder and sets the default values. +func NewItemCodeScanningAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeScanningAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a []CodeScanningOrganizationAlertItemsable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a Alerts503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization +func (m *ItemCodeScanningAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeScanningAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningOrganizationAlertItemsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAlerts503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningOrganizationAlertItemsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningOrganizationAlertItemsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningOrganizationAlertItemsable) + } + } + return val, nil +} +// ToGetRequestInformation lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemCodeScanningAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeScanningAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeScanningAlertsRequestBuilder when successful +func (m *ItemCodeScanningAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemCodeScanningAlertsRequestBuilder) { + return NewItemCodeScanningAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_scanning_request_builder.go b/pkg/github/orgs/item_code_scanning_request_builder.go new file mode 100644 index 0000000..be8d742 --- /dev/null +++ b/pkg/github/orgs/item_code_scanning_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCodeScanningRequestBuilder builds and executes requests for operations under \orgs\{org}\code-scanning +type ItemCodeScanningRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemCodeScanningAlertsRequestBuilder when successful +func (m *ItemCodeScanningRequestBuilder) Alerts()(*ItemCodeScanningAlertsRequestBuilder) { + return NewItemCodeScanningAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodeScanningRequestBuilderInternal instantiates a new ItemCodeScanningRequestBuilder and sets the default values. +func NewItemCodeScanningRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningRequestBuilder) { + m := &ItemCodeScanningRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-scanning", pathParameters), + } + return m +} +// NewItemCodeScanningRequestBuilder instantiates a new ItemCodeScanningRequestBuilder and sets the default values. +func NewItemCodeScanningRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeScanningRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeScanningRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_code_security_configurations_defaults_request_builder.go b/pkg/github/orgs/item_code_security_configurations_defaults_request_builder.go new file mode 100644 index 0000000..45c2249 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_defaults_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodeSecurityConfigurationsDefaultsRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations\defaults +type ItemCodeSecurityConfigurationsDefaultsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodeSecurityConfigurationsDefaultsRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsDefaultsRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsDefaultsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsDefaultsRequestBuilder) { + m := &ItemCodeSecurityConfigurationsDefaultsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/defaults", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsDefaultsRequestBuilder instantiates a new ItemCodeSecurityConfigurationsDefaultsRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsDefaultsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsDefaultsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsDefaultsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the default code security configurations for an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a []CodeSecurityDefaultConfigurationsable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-default-code-security-configurations +func (m *ItemCodeSecurityConfigurationsDefaultsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityDefaultConfigurationsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityDefaultConfigurationsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityDefaultConfigurationsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityDefaultConfigurationsable) + } + } + return val, nil +} +// ToGetRequestInformation lists the default code security configurations for an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsDefaultsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsDefaultsRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsDefaultsRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsDefaultsRequestBuilder) { + return NewItemCodeSecurityConfigurationsDefaultsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_attach_post_request_body.go b/pkg/github/orgs/item_code_security_configurations_item_attach_post_request_body.go new file mode 100644 index 0000000..717e320 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_attach_post_request_body.go @@ -0,0 +1,67 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodeSecurityConfigurationsItemAttachPostRequestBody struct { + // An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. + selected_repository_ids []int32 +} +// NewItemCodeSecurityConfigurationsItemAttachPostRequestBody instantiates a new ItemCodeSecurityConfigurationsItemAttachPostRequestBody and sets the default values. +func NewItemCodeSecurityConfigurationsItemAttachPostRequestBody()(*ItemCodeSecurityConfigurationsItemAttachPostRequestBody) { + m := &ItemCodeSecurityConfigurationsItemAttachPostRequestBody{ + } + return m +} +// CreateItemCodeSecurityConfigurationsItemAttachPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsItemAttachPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsItemAttachPostRequestBody(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsItemAttachPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. +// returns a []int32 when successful +func (m *ItemCodeSecurityConfigurationsItemAttachPostRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsItemAttachPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + if err != nil { + return err + } + } + return nil +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`. +func (m *ItemCodeSecurityConfigurationsItemAttachPostRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemCodeSecurityConfigurationsItemAttachPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_attach_post_response.go b/pkg/github/orgs/item_code_security_configurations_item_attach_post_response.go new file mode 100644 index 0000000..1305df2 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_attach_post_response.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodeSecurityConfigurationsItemAttachPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemCodeSecurityConfigurationsItemAttachPostResponse instantiates a new ItemCodeSecurityConfigurationsItemAttachPostResponse and sets the default values. +func NewItemCodeSecurityConfigurationsItemAttachPostResponse()(*ItemCodeSecurityConfigurationsItemAttachPostResponse) { + m := &ItemCodeSecurityConfigurationsItemAttachPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodeSecurityConfigurationsItemAttachPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsItemAttachPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsItemAttachPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodeSecurityConfigurationsItemAttachPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsItemAttachPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsItemAttachPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemCodeSecurityConfigurationsItemAttachPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemCodeSecurityConfigurationsItemAttachPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_attach_request_builder.go b/pkg/github/orgs/item_code_security_configurations_item_attach_request_builder.go new file mode 100644 index 0000000..afd2748 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_attach_request_builder.go @@ -0,0 +1,60 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCodeSecurityConfigurationsItemAttachRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id}\attach +type ItemCodeSecurityConfigurationsItemAttachRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodeSecurityConfigurationsItemAttachRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsItemAttachRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsItemAttachRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsItemAttachRequestBuilder) { + m := &ItemCodeSecurityConfigurationsItemAttachRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/attach", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsItemAttachRequestBuilder instantiates a new ItemCodeSecurityConfigurationsItemAttachRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsItemAttachRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsItemAttachRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsItemAttachRequestBuilderInternal(urlParams, requestAdapter) +} +// Post attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a ItemCodeSecurityConfigurationsItemAttachPostResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#attach-a-configuration-to-repositories +func (m *ItemCodeSecurityConfigurationsItemAttachRequestBuilder) Post(ctx context.Context, body ItemCodeSecurityConfigurationsItemAttachPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCodeSecurityConfigurationsItemAttachPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCodeSecurityConfigurationsItemAttachPostResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCodeSecurityConfigurationsItemAttachPostResponseable), nil +} +// ToPostRequestInformation attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsItemAttachRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCodeSecurityConfigurationsItemAttachPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsItemAttachRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsItemAttachRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsItemAttachRequestBuilder) { + return NewItemCodeSecurityConfigurationsItemAttachRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_defaults_put_request_body.go b/pkg/github/orgs/item_code_security_configurations_item_defaults_put_request_body.go new file mode 100644 index 0000000..c08f646 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_defaults_put_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemCodeSecurityConfigurationsItemDefaultsPutRequestBody instantiates a new ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody and sets the default values. +func NewItemCodeSecurityConfigurationsItemDefaultsPutRequestBody()(*ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody) { + m := &ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodeSecurityConfigurationsItemDefaultsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsItemDefaultsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsItemDefaultsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemCodeSecurityConfigurationsItemDefaultsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_defaults_put_response.go b/pkg/github/orgs/item_code_security_configurations_item_defaults_put_response.go new file mode 100644 index 0000000..db40e16 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_defaults_put_response.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCodeSecurityConfigurationsItemDefaultsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A code security configuration + configuration i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable +} +// NewItemCodeSecurityConfigurationsItemDefaultsPutResponse instantiates a new ItemCodeSecurityConfigurationsItemDefaultsPutResponse and sets the default values. +func NewItemCodeSecurityConfigurationsItemDefaultsPutResponse()(*ItemCodeSecurityConfigurationsItemDefaultsPutResponse) { + m := &ItemCodeSecurityConfigurationsItemDefaultsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodeSecurityConfigurationsItemDefaultsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsItemDefaultsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsItemDefaultsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfiguration gets the configuration property value. A code security configuration +// returns a CodeSecurityConfigurationable when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutResponse) GetConfiguration()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable) { + return m.configuration +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("configuration", m.GetConfiguration()) + 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 *ItemCodeSecurityConfigurationsItemDefaultsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfiguration sets the configuration property value. A code security configuration +func (m *ItemCodeSecurityConfigurationsItemDefaultsPutResponse) SetConfiguration(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable)() { + m.configuration = value +} +type ItemCodeSecurityConfigurationsItemDefaultsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable) + SetConfiguration(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable)() +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_defaults_request_builder.go b/pkg/github/orgs/item_code_security_configurations_item_defaults_request_builder.go new file mode 100644 index 0000000..da07250 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_defaults_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id}\defaults +type ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) { + m := &ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/defaults", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilder instantiates a new ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilderInternal(urlParams, requestAdapter) +} +// Put sets a code security configuration as a default to be applied to new repositories in your organization.This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a ItemCodeSecurityConfigurationsItemDefaultsPutResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization +func (m *ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) Put(ctx context.Context, body ItemCodeSecurityConfigurationsItemDefaultsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCodeSecurityConfigurationsItemDefaultsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCodeSecurityConfigurationsItemDefaultsPutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCodeSecurityConfigurationsItemDefaultsPutResponseable), nil +} +// ToPutRequestInformation sets a code security configuration as a default to be applied to new repositories in your organization.This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCodeSecurityConfigurationsItemDefaultsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) { + return NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_repositories_request_builder.go b/pkg/github/orgs/item_code_security_configurations_item_repositories_request_builder.go new file mode 100644 index 0000000..fd05946 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_repositories_request_builder.go @@ -0,0 +1,77 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id}\repositories +type ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderGetQueryParameters lists the repositories associated with a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +type ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.Can be: `all`, `attached`, `attaching`, `detached`, `enforced`, `failed`, `updating` + Status *string `uriparametername:"status"` +} +// NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) { + m := &ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder instantiates a new ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the repositories associated with a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a []CodeSecurityConfigurationRepositoriesable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-repositories-associated-with-a-code-security-configuration +func (m *ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationRepositoriesable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityConfigurationRepositoriesFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationRepositoriesable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationRepositoriesable) + } + } + return val, nil +} +// ToGetRequestInformation lists the repositories associated with a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) { + return NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go new file mode 100644 index 0000000..e374085 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go @@ -0,0 +1,90 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody struct { + // A description of the code security configuration + description *string + // The name of the code security configuration. Must be unique within the organization. + name *string +} +// NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody instantiates a new ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody and sets the default values. +func NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody()(*ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) { + m := &ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody{ + } + return m +} +// CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody(), nil +} +// GetDescription gets the description property value. A description of the code security configuration +// returns a *string when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the code security configuration. Must be unique within the organization. +// returns a *string when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. A description of the code security configuration +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the code security configuration. Must be unique within the organization. +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) SetName(value *string)() { + m.name = value +} +type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + SetDescription(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/orgs/item_code_security_configurations_post_request_body.go b/pkg/github/orgs/item_code_security_configurations_post_request_body.go new file mode 100644 index 0000000..b235637 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_post_request_body.go @@ -0,0 +1,90 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodeSecurityConfigurationsPostRequestBody struct { + // A description of the code security configuration + description *string + // The name of the code security configuration. Must be unique within the organization. + name *string +} +// NewItemCodeSecurityConfigurationsPostRequestBody instantiates a new ItemCodeSecurityConfigurationsPostRequestBody and sets the default values. +func NewItemCodeSecurityConfigurationsPostRequestBody()(*ItemCodeSecurityConfigurationsPostRequestBody) { + m := &ItemCodeSecurityConfigurationsPostRequestBody{ + } + return m +} +// CreateItemCodeSecurityConfigurationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsPostRequestBody(), nil +} +// GetDescription gets the description property value. A description of the code security configuration +// returns a *string when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the code security configuration. Must be unique within the organization. +// returns a *string when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. A description of the code security configuration +func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the code security configuration. Must be unique within the organization. +func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemCodeSecurityConfigurationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + SetDescription(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/orgs/item_code_security_configurations_request_builder.go b/pkg/github/orgs/item_code_security_configurations_request_builder.go new file mode 100644 index 0000000..771355d --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_request_builder.go @@ -0,0 +1,125 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i18d6a4f15acb84822797a160ce43772fd953a37d6cd2bf772f0ee85c7bd7a917 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/codesecurity/configurations" +) + +// ItemCodeSecurityConfigurationsRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations +type ItemCodeSecurityConfigurationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodeSecurityConfigurationsRequestBuilderGetQueryParameters lists all code security configurations available in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +type ItemCodeSecurityConfigurationsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // 'The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)."' + Per_page *int32 `uriparametername:"per_page"` + // The target type of the code security configuration + Target_type *i18d6a4f15acb84822797a160ce43772fd953a37d6cd2bf772f0ee85c7bd7a917.GetTarget_typeQueryParameterType `uriparametername:"target_type"` +} +// ByConfiguration_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.codeSecurity.configurations.item collection +// returns a *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsRequestBuilder) ByConfiguration_id(configuration_id int32)(*ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["configuration_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(configuration_id), 10) + return NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodeSecurityConfigurationsRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsRequestBuilder) { + m := &ItemCodeSecurityConfigurationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations{?after*,before*,per_page*,target_type*}", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsRequestBuilder instantiates a new ItemCodeSecurityConfigurationsRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Defaults the defaults property +// returns a *ItemCodeSecurityConfigurationsDefaultsRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsRequestBuilder) Defaults()(*ItemCodeSecurityConfigurationsDefaultsRequestBuilder) { + return NewItemCodeSecurityConfigurationsDefaultsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get lists all code security configurations available in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a []CodeSecurityConfigurationable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-code-security-configurations-for-an-organization +func (m *ItemCodeSecurityConfigurationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeSecurityConfigurationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityConfigurationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable) + } + } + return val, nil +} +// Post creates a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a CodeSecurityConfigurationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#create-a-code-security-configuration +func (m *ItemCodeSecurityConfigurationsRequestBuilder) Post(ctx context.Context, body ItemCodeSecurityConfigurationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityConfigurationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable), nil +} +// ToGetRequestInformation lists all code security configurations available in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodeSecurityConfigurationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCodeSecurityConfigurationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsRequestBuilder) { + return NewItemCodeSecurityConfigurationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_configurations_with_configuration_item_request_builder.go b/pkg/github/orgs/item_code_security_configurations_with_configuration_item_request_builder.go new file mode 100644 index 0000000..f97c39f --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_with_configuration_item_request_builder.go @@ -0,0 +1,142 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id} +type ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Attach the attach property +// returns a *ItemCodeSecurityConfigurationsItemAttachRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) Attach()(*ItemCodeSecurityConfigurationsItemAttachRequestBuilder) { + return NewItemCodeSecurityConfigurationsItemAttachRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) { + m := &ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder instantiates a new ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Defaults the defaults property +// returns a *ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) Defaults()(*ItemCodeSecurityConfigurationsItemDefaultsRequestBuilder) { + return NewItemCodeSecurityConfigurationsItemDefaultsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete deletes the desired code security configuration from an organization.Repositories attached to the configuration will retain their settings but will no longer be associated withthe configuration.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#delete-a-code-security-configuration +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a code security configuration available in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a CodeSecurityConfigurationable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-a-code-security-configuration +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityConfigurationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable), nil +} +// Patch updates a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a CodeSecurityConfigurationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#update-a-code-security-configuration +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) Patch(ctx context.Context, body ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSecurityConfigurationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSecurityConfigurationable), nil +} +// Repositories the repositories property +// returns a *ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) Repositories()(*ItemCodeSecurityConfigurationsItemRepositoriesRequestBuilder) { + return NewItemCodeSecurityConfigurationsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes the desired code security configuration from an organization.Repositories attached to the configuration will retain their settings but will no longer be associated withthe configuration.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + return requestInfo, nil +} +// ToGetRequestInformation gets a code security configuration available in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a code security configuration in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder) { + return NewItemCodeSecurityConfigurationsWithConfiguration_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_request_builder.go b/pkg/github/orgs/item_code_security_request_builder.go new file mode 100644 index 0000000..3cb8c9a --- /dev/null +++ b/pkg/github/orgs/item_code_security_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCodeSecurityRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security +type ItemCodeSecurityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Configurations the configurations property +// returns a *ItemCodeSecurityConfigurationsRequestBuilder when successful +func (m *ItemCodeSecurityRequestBuilder) Configurations()(*ItemCodeSecurityConfigurationsRequestBuilder) { + return NewItemCodeSecurityConfigurationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodeSecurityRequestBuilderInternal instantiates a new ItemCodeSecurityRequestBuilder and sets the default values. +func NewItemCodeSecurityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityRequestBuilder) { + m := &ItemCodeSecurityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security", pathParameters), + } + return m +} +// NewItemCodeSecurityRequestBuilder instantiates a new ItemCodeSecurityRequestBuilder and sets the default values. +func NewItemCodeSecurityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_codespaces_access_put_request_body.go b/pkg/github/orgs/item_codespaces_access_put_request_body.go new file mode 100644 index 0000000..8c24cb0 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_access_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodespacesAccessPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. + selected_usernames []string +} +// NewItemCodespacesAccessPutRequestBody instantiates a new ItemCodespacesAccessPutRequestBody and sets the default values. +func NewItemCodespacesAccessPutRequestBody()(*ItemCodespacesAccessPutRequestBody) { + m := &ItemCodespacesAccessPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesAccessPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesAccessPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesAccessPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesAccessPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesAccessPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_usernames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedUsernames(res) + } + return nil + } + return res +} +// GetSelectedUsernames gets the selected_usernames property value. The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. +// returns a []string when successful +func (m *ItemCodespacesAccessPutRequestBody) GetSelectedUsernames()([]string) { + return m.selected_usernames +} +// Serialize serializes information the current object +func (m *ItemCodespacesAccessPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedUsernames() != nil { + err := writer.WriteCollectionOfStringValues("selected_usernames", m.GetSelectedUsernames()) + 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 *ItemCodespacesAccessPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedUsernames sets the selected_usernames property value. The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. +func (m *ItemCodespacesAccessPutRequestBody) SetSelectedUsernames(value []string)() { + m.selected_usernames = value +} +type ItemCodespacesAccessPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedUsernames()([]string) + SetSelectedUsernames(value []string)() +} diff --git a/pkg/github/orgs/item_codespaces_access_request_builder.go b/pkg/github/orgs/item_codespaces_access_request_builder.go new file mode 100644 index 0000000..4547f9d --- /dev/null +++ b/pkg/github/orgs/item_codespaces_access_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesAccessRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\access +type ItemCodespacesAccessRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodespacesAccessRequestBuilderInternal instantiates a new ItemCodespacesAccessRequestBuilder and sets the default values. +func NewItemCodespacesAccessRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesAccessRequestBuilder) { + m := &ItemCodespacesAccessRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/access", pathParameters), + } + return m +} +// NewItemCodespacesAccessRequestBuilder instantiates a new ItemCodespacesAccessRequestBuilder and sets the default values. +func NewItemCodespacesAccessRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesAccessRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesAccessRequestBuilderInternal(urlParams, requestAdapter) +} +// Put sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#manage-access-control-for-organization-codespaces +func (m *ItemCodespacesAccessRequestBuilder) Put(ctx context.Context, body ItemCodespacesAccessPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Selected_users the selected_users property +// returns a *ItemCodespacesAccessSelected_usersRequestBuilder when successful +func (m *ItemCodespacesAccessRequestBuilder) Selected_users()(*ItemCodespacesAccessSelected_usersRequestBuilder) { + return NewItemCodespacesAccessSelected_usersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToPutRequestInformation sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCodespacesAccessRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCodespacesAccessPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemCodespacesAccessRequestBuilder when successful +func (m *ItemCodespacesAccessRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesAccessRequestBuilder) { + return NewItemCodespacesAccessRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_access_selected_users_delete_request_body.go b/pkg/github/orgs/item_codespaces_access_selected_users_delete_request_body.go new file mode 100644 index 0000000..4dc0b6e --- /dev/null +++ b/pkg/github/orgs/item_codespaces_access_selected_users_delete_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodespacesAccessSelected_usersDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the organization members whose codespaces should not be billed to the organization. + selected_usernames []string +} +// NewItemCodespacesAccessSelected_usersDeleteRequestBody instantiates a new ItemCodespacesAccessSelected_usersDeleteRequestBody and sets the default values. +func NewItemCodespacesAccessSelected_usersDeleteRequestBody()(*ItemCodespacesAccessSelected_usersDeleteRequestBody) { + m := &ItemCodespacesAccessSelected_usersDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesAccessSelected_usersDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesAccessSelected_usersDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesAccessSelected_usersDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesAccessSelected_usersDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesAccessSelected_usersDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_usernames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedUsernames(res) + } + return nil + } + return res +} +// GetSelectedUsernames gets the selected_usernames property value. The usernames of the organization members whose codespaces should not be billed to the organization. +// returns a []string when successful +func (m *ItemCodespacesAccessSelected_usersDeleteRequestBody) GetSelectedUsernames()([]string) { + return m.selected_usernames +} +// Serialize serializes information the current object +func (m *ItemCodespacesAccessSelected_usersDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedUsernames() != nil { + err := writer.WriteCollectionOfStringValues("selected_usernames", m.GetSelectedUsernames()) + 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 *ItemCodespacesAccessSelected_usersDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedUsernames sets the selected_usernames property value. The usernames of the organization members whose codespaces should not be billed to the organization. +func (m *ItemCodespacesAccessSelected_usersDeleteRequestBody) SetSelectedUsernames(value []string)() { + m.selected_usernames = value +} +type ItemCodespacesAccessSelected_usersDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedUsernames()([]string) + SetSelectedUsernames(value []string)() +} diff --git a/pkg/github/orgs/item_codespaces_access_selected_users_post_request_body.go b/pkg/github/orgs/item_codespaces_access_selected_users_post_request_body.go new file mode 100644 index 0000000..b5ff0a8 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_access_selected_users_post_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodespacesAccessSelected_usersPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the organization members whose codespaces be billed to the organization. + selected_usernames []string +} +// NewItemCodespacesAccessSelected_usersPostRequestBody instantiates a new ItemCodespacesAccessSelected_usersPostRequestBody and sets the default values. +func NewItemCodespacesAccessSelected_usersPostRequestBody()(*ItemCodespacesAccessSelected_usersPostRequestBody) { + m := &ItemCodespacesAccessSelected_usersPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesAccessSelected_usersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesAccessSelected_usersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesAccessSelected_usersPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesAccessSelected_usersPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesAccessSelected_usersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_usernames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedUsernames(res) + } + return nil + } + return res +} +// GetSelectedUsernames gets the selected_usernames property value. The usernames of the organization members whose codespaces be billed to the organization. +// returns a []string when successful +func (m *ItemCodespacesAccessSelected_usersPostRequestBody) GetSelectedUsernames()([]string) { + return m.selected_usernames +} +// Serialize serializes information the current object +func (m *ItemCodespacesAccessSelected_usersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedUsernames() != nil { + err := writer.WriteCollectionOfStringValues("selected_usernames", m.GetSelectedUsernames()) + 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 *ItemCodespacesAccessSelected_usersPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedUsernames sets the selected_usernames property value. The usernames of the organization members whose codespaces be billed to the organization. +func (m *ItemCodespacesAccessSelected_usersPostRequestBody) SetSelectedUsernames(value []string)() { + m.selected_usernames = value +} +type ItemCodespacesAccessSelected_usersPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedUsernames()([]string) + SetSelectedUsernames(value []string)() +} diff --git a/pkg/github/orgs/item_codespaces_access_selected_users_request_builder.go b/pkg/github/orgs/item_codespaces_access_selected_users_request_builder.go new file mode 100644 index 0000000..b6c48a4 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_access_selected_users_request_builder.go @@ -0,0 +1,105 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesAccessSelected_usersRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\access\selected_users +type ItemCodespacesAccessSelected_usersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodespacesAccessSelected_usersRequestBuilderInternal instantiates a new ItemCodespacesAccessSelected_usersRequestBuilder and sets the default values. +func NewItemCodespacesAccessSelected_usersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesAccessSelected_usersRequestBuilder) { + m := &ItemCodespacesAccessSelected_usersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/access/selected_users", pathParameters), + } + return m +} +// NewItemCodespacesAccessSelected_usersRequestBuilder instantiates a new ItemCodespacesAccessSelected_usersRequestBuilder and sets the default values. +func NewItemCodespacesAccessSelected_usersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesAccessSelected_usersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesAccessSelected_usersRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete codespaces for the specified users will no longer be billed to the organization.To use this endpoint, the access settings for the organization must be set to `selected_members`.For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#remove-users-from-codespaces-access-for-an-organization +func (m *ItemCodespacesAccessSelected_usersRequestBuilder) Delete(ctx context.Context, body ItemCodespacesAccessSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Post codespaces for the specified users will be billed to the organization.To use this endpoint, the access settings for the organization must be set to `selected_members`.For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#add-users-to-codespaces-access-for-an-organization +func (m *ItemCodespacesAccessSelected_usersRequestBuilder) Post(ctx context.Context, body ItemCodespacesAccessSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation codespaces for the specified users will no longer be billed to the organization.To use this endpoint, the access settings for the organization must be set to `selected_members`.For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCodespacesAccessSelected_usersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCodespacesAccessSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation codespaces for the specified users will be billed to the organization.To use this endpoint, the access settings for the organization must be set to `selected_members`.For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCodespacesAccessSelected_usersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCodespacesAccessSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemCodespacesAccessSelected_usersRequestBuilder when successful +func (m *ItemCodespacesAccessSelected_usersRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesAccessSelected_usersRequestBuilder) { + return NewItemCodespacesAccessSelected_usersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_get_response.go b/pkg/github/orgs/item_codespaces_get_response.go new file mode 100644 index 0000000..32eb899 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCodespacesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The codespaces property + codespaces []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable + // The total_count property + total_count *int32 +} +// NewItemCodespacesGetResponse instantiates a new ItemCodespacesGetResponse and sets the default values. +func NewItemCodespacesGetResponse()(*ItemCodespacesGetResponse) { + m := &ItemCodespacesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodespaces gets the codespaces property value. The codespaces property +// returns a []Codespaceable when successful +func (m *ItemCodespacesGetResponse) GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) { + return m.codespaces +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + } + } + m.SetCodespaces(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemCodespacesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemCodespacesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCodespaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCodespaces())) + for i, v := range m.GetCodespaces() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("codespaces", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemCodespacesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodespaces sets the codespaces property value. The codespaces property +func (m *ItemCodespacesGetResponse) SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() { + m.codespaces = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemCodespacesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemCodespacesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + GetTotalCount()(*int32) + SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_codespaces_request_builder.go b/pkg/github/orgs/item_codespaces_request_builder.go new file mode 100644 index 0000000..321557d --- /dev/null +++ b/pkg/github/orgs/item_codespaces_request_builder.go @@ -0,0 +1,84 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces +type ItemCodespacesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodespacesRequestBuilderGetQueryParameters lists the codespaces associated to a specified organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemCodespacesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// Access the access property +// returns a *ItemCodespacesAccessRequestBuilder when successful +func (m *ItemCodespacesRequestBuilder) Access()(*ItemCodespacesAccessRequestBuilder) { + return NewItemCodespacesAccessRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodespacesRequestBuilderInternal instantiates a new ItemCodespacesRequestBuilder and sets the default values. +func NewItemCodespacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesRequestBuilder) { + m := &ItemCodespacesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCodespacesRequestBuilder instantiates a new ItemCodespacesRequestBuilder and sets the default values. +func NewItemCodespacesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the codespaces associated to a specified organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemCodespacesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#list-codespaces-for-the-organization +func (m *ItemCodespacesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodespacesRequestBuilderGetQueryParameters])(ItemCodespacesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCodespacesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCodespacesGetResponseable), nil +} +// Secrets the secrets property +// returns a *ItemCodespacesSecretsRequestBuilder when successful +func (m *ItemCodespacesRequestBuilder) Secrets()(*ItemCodespacesSecretsRequestBuilder) { + return NewItemCodespacesSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists the codespaces associated to a specified organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodespacesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodespacesRequestBuilder when successful +func (m *ItemCodespacesRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesRequestBuilder) { + return NewItemCodespacesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_secrets_get_response.go b/pkg/github/orgs/item_codespaces_secrets_get_response.go new file mode 100644 index 0000000..dba7a62 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCodespacesSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable + // The total_count property + total_count *int32 +} +// NewItemCodespacesSecretsGetResponse instantiates a new ItemCodespacesSecretsGetResponse and sets the default values. +func NewItemCodespacesSecretsGetResponse()(*ItemCodespacesSecretsGetResponse) { + m := &ItemCodespacesSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesOrgSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []CodespacesOrgSecretable when successful +func (m *ItemCodespacesSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemCodespacesSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemCodespacesSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemCodespacesSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemCodespacesSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemCodespacesSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemCodespacesSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_codespaces_secrets_item_repositories_get_response.go b/pkg/github/orgs/item_codespaces_secrets_item_repositories_get_response.go new file mode 100644 index 0000000..26f50fa --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_item_repositories_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCodespacesSecretsItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable + // The total_count property + total_count *int32 +} +// NewItemCodespacesSecretsItemRepositoriesGetResponse instantiates a new ItemCodespacesSecretsItemRepositoriesGetResponse and sets the default values. +func NewItemCodespacesSecretsItemRepositoriesGetResponse()(*ItemCodespacesSecretsItemRepositoriesGetResponse) { + m := &ItemCodespacesSecretsItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesSecretsItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesSecretsItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesSecretsItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []MinimalRepositoryable when successful +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemCodespacesSecretsItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemCodespacesSecretsItemRepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemCodespacesSecretsItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_codespaces_secrets_item_repositories_put_request_body.go b/pkg/github/orgs/item_codespaces_secrets_item_repositories_put_request_body.go new file mode 100644 index 0000000..c4ae0ad --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_item_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodespacesSecretsItemRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. + selected_repository_ids []int32 +} +// NewItemCodespacesSecretsItemRepositoriesPutRequestBody instantiates a new ItemCodespacesSecretsItemRepositoriesPutRequestBody and sets the default values. +func NewItemCodespacesSecretsItemRepositoriesPutRequestBody()(*ItemCodespacesSecretsItemRepositoriesPutRequestBody) { + m := &ItemCodespacesSecretsItemRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesSecretsItemRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesSecretsItemRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesSecretsItemRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. +// returns a []int32 when successful +func (m *ItemCodespacesSecretsItemRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemCodespacesSecretsItemRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemCodespacesSecretsItemRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. +func (m *ItemCodespacesSecretsItemRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemCodespacesSecretsItemRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go b/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go new file mode 100644 index 0000000..0f1a5a2 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesSecretsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\secrets\{secret_name}\repositories +type ItemCodespacesSecretsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodespacesSecretsItemRepositoriesRequestBuilderGetQueryParameters lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemCodespacesSecretsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.codespaces.secrets.item.repositories.item collection +// returns a *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodespacesSecretsItemRepositoriesRequestBuilderInternal instantiates a new ItemCodespacesSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewItemCodespacesSecretsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsItemRepositoriesRequestBuilder) { + m := &ItemCodespacesSecretsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCodespacesSecretsItemRepositoriesRequestBuilder instantiates a new ItemCodespacesSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewItemCodespacesSecretsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesSecretsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemCodespacesSecretsItemRepositoriesGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret +func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodespacesSecretsItemRepositoriesRequestBuilderGetQueryParameters])(ItemCodespacesSecretsItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCodespacesSecretsItemRepositoriesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCodespacesSecretsItemRepositoriesGetResponseable), nil +} +// Put replaces all repositories for an organization development environment secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret +func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) Put(ctx context.Context, body ItemCodespacesSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodespacesSecretsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces all repositories for an organization development environment secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCodespacesSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodespacesSecretsItemRepositoriesRequestBuilder when successful +func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesSecretsItemRepositoriesRequestBuilder) { + return NewItemCodespacesSecretsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_secrets_item_repositories_with_repository_item_request_builder.go b/pkg/github/orgs/item_codespaces_secrets_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..0975c0c --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,88 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\secrets\{secret_name}\repositories\{repository_id} +type ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from an organization development environment secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret +func (m *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put adds a repository to an organization development environment secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#add-selected-repository-to-an-organization-secret +func (m *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from an organization development environment secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to an organization development environment secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewItemCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_secrets_item_with_secret_name_put_request_body.go b/pkg/github/orgs/item_codespaces_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..4073933 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodespacesSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#get-an-organization-public-key) endpoint. + encrypted_value *string + // The ID of the key you used to encrypt the secret. + key_id *string + // An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. + selected_repository_ids []int32 +} +// NewItemCodespacesSecretsItemWithSecret_namePutRequestBody instantiates a new ItemCodespacesSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemCodespacesSecretsItemWithSecret_namePutRequestBody()(*ItemCodespacesSecretsItemWithSecret_namePutRequestBody) { + m := &ItemCodespacesSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodespacesSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodespacesSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodespacesSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#get-an-organization-public-key) endpoint. +// returns a *string when successful +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. The ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. +// returns a []int32 when successful +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#get-an-organization-public-key) endpoint. +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. The ID of the key you used to encrypt the secret. +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. +func (m *ItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemCodespacesSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + GetSelectedRepositoryIds()([]int32) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_codespaces_secrets_public_key_request_builder.go b/pkg/github/orgs/item_codespaces_secrets_public_key_request_builder.go new file mode 100644 index 0000000..912414a --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesSecretsPublicKeyRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\secrets\public-key +type ItemCodespacesSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodespacesSecretsPublicKeyRequestBuilderInternal instantiates a new ItemCodespacesSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemCodespacesSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsPublicKeyRequestBuilder) { + m := &ItemCodespacesSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/public-key", pathParameters), + } + return m +} +// NewItemCodespacesSecretsPublicKeyRequestBuilder instantiates a new ItemCodespacesSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemCodespacesSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a CodespacesPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#get-an-organization-public-key +func (m *ItemCodespacesSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesPublicKeyable), nil +} +// ToGetRequestInformation gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodespacesSecretsPublicKeyRequestBuilder when successful +func (m *ItemCodespacesSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesSecretsPublicKeyRequestBuilder) { + return NewItemCodespacesSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_secrets_request_builder.go b/pkg/github/orgs/item_codespaces_secrets_request_builder.go new file mode 100644 index 0000000..13dc016 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_request_builder.go @@ -0,0 +1,80 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCodespacesSecretsRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\secrets +type ItemCodespacesSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCodespacesSecretsRequestBuilderGetQueryParameters lists all Codespaces development environment secrets available at the organization-level without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemCodespacesSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.codespaces.secrets.item collection +// returns a *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemCodespacesSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCodespacesSecretsRequestBuilderInternal instantiates a new ItemCodespacesSecretsRequestBuilder and sets the default values. +func NewItemCodespacesSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsRequestBuilder) { + m := &ItemCodespacesSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCodespacesSecretsRequestBuilder instantiates a new ItemCodespacesSecretsRequestBuilder and sets the default values. +func NewItemCodespacesSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all Codespaces development environment secrets available at the organization-level without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemCodespacesSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#list-organization-secrets +func (m *ItemCodespacesSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodespacesSecretsRequestBuilderGetQueryParameters])(ItemCodespacesSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCodespacesSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCodespacesSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemCodespacesSecretsPublicKeyRequestBuilder when successful +func (m *ItemCodespacesSecretsRequestBuilder) PublicKey()(*ItemCodespacesSecretsPublicKeyRequestBuilder) { + return NewItemCodespacesSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all Codespaces development environment secrets available at the organization-level without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCodespacesSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodespacesSecretsRequestBuilder when successful +func (m *ItemCodespacesSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesSecretsRequestBuilder) { + return NewItemCodespacesSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_codespaces_secrets_with_secret_name_item_request_builder.go b/pkg/github/orgs/item_codespaces_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..1533188 --- /dev/null +++ b/pkg/github/orgs/item_codespaces_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,126 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCodespacesSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\codespaces\secrets\{secret_name} +type ItemCodespacesSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemCodespacesSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemCodespacesSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemCodespacesSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemCodespacesSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemCodespacesSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an organization development environment secret using the secret name.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#delete-an-organization-secret +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets an organization development environment secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a CodespacesOrgSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#get-an-organization-secret +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesOrgSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesOrgSecretable), nil +} +// Put creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organization-secrets#create-or-update-an-organization-secret +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemCodespacesSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// Repositories the repositories property +// returns a *ItemCodespacesSecretsItemRepositoriesRequestBuilder when successful +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Repositories()(*ItemCodespacesSecretsItemRepositoriesRequestBuilder) { + return NewItemCodespacesSecretsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes an organization development environment secret using the secret name.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets an organization development environment secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCodespacesSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + return NewItemCodespacesSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_copilot_billing_request_builder.go b/pkg/github/orgs/item_copilot_billing_request_builder.go new file mode 100644 index 0000000..853ea8e --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_request_builder.go @@ -0,0 +1,82 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotBillingRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot\billing +type ItemCopilotBillingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCopilotBillingRequestBuilderInternal instantiates a new ItemCopilotBillingRequestBuilder and sets the default values. +func NewItemCopilotBillingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingRequestBuilder) { + m := &ItemCopilotBillingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing", pathParameters), + } + return m +} +// NewItemCopilotBillingRequestBuilder instantiates a new ItemCopilotBillingRequestBuilder and sets the default values. +func NewItemCopilotBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotBillingRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This endpoint is in beta and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// returns a CopilotOrganizationDetailsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#get-copilot-seat-information-and-settings-for-an-organization +func (m *ItemCopilotBillingRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotOrganizationDetailsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCopilotOrganizationDetailsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotOrganizationDetailsable), nil +} +// Seats the seats property +// returns a *ItemCopilotBillingSeatsRequestBuilder when successful +func (m *ItemCopilotBillingRequestBuilder) Seats()(*ItemCopilotBillingSeatsRequestBuilder) { + return NewItemCopilotBillingSeatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Selected_teams the selected_teams property +// returns a *ItemCopilotBillingSelected_teamsRequestBuilder when successful +func (m *ItemCopilotBillingRequestBuilder) Selected_teams()(*ItemCopilotBillingSelected_teamsRequestBuilder) { + return NewItemCopilotBillingSelected_teamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Selected_users the selected_users property +// returns a *ItemCopilotBillingSelected_usersRequestBuilder when successful +func (m *ItemCopilotBillingRequestBuilder) Selected_users()(*ItemCopilotBillingSelected_usersRequestBuilder) { + return NewItemCopilotBillingSelected_usersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotBillingRequestBuilder when successful +func (m *ItemCopilotBillingRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotBillingRequestBuilder) { + return NewItemCopilotBillingRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_copilot_billing_seats_get_response.go b/pkg/github/orgs/item_copilot_billing_seats_get_response.go new file mode 100644 index 0000000..17668b1 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_seats_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCopilotBillingSeatsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The seats property + seats []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable + // Total number of Copilot seats for the organization currently being billed. + total_seats *int32 +} +// NewItemCopilotBillingSeatsGetResponse instantiates a new ItemCopilotBillingSeatsGetResponse and sets the default values. +func NewItemCopilotBillingSeatsGetResponse()(*ItemCopilotBillingSeatsGetResponse) { + m := &ItemCopilotBillingSeatsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSeatsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSeatsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSeatsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCopilotSeatDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable) + } + } + m.SetSeats(res) + } + return nil + } + res["total_seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSeats(val) + } + return nil + } + return res +} +// GetSeats gets the seats property value. The seats property +// returns a []CopilotSeatDetailsable when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetSeats()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable) { + return m.seats +} +// GetTotalSeats gets the total_seats property value. Total number of Copilot seats for the organization currently being billed. +// returns a *int32 when successful +func (m *ItemCopilotBillingSeatsGetResponse) GetTotalSeats()(*int32) { + return m.total_seats +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSeatsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSeats() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSeats())) + for i, v := range m.GetSeats() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("seats", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_seats", m.GetTotalSeats()) + 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 *ItemCopilotBillingSeatsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSeats sets the seats property value. The seats property +func (m *ItemCopilotBillingSeatsGetResponse) SetSeats(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable)() { + m.seats = value +} +// SetTotalSeats sets the total_seats property value. Total number of Copilot seats for the organization currently being billed. +func (m *ItemCopilotBillingSeatsGetResponse) SetTotalSeats(value *int32)() { + m.total_seats = value +} +type ItemCopilotBillingSeatsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSeats()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable) + GetTotalSeats()(*int32) + SetSeats(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable)() + SetTotalSeats(value *int32)() +} diff --git a/pkg/github/orgs/item_copilot_billing_seats_request_builder.go b/pkg/github/orgs/item_copilot_billing_seats_request_builder.go new file mode 100644 index 0000000..b1791ed --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_seats_request_builder.go @@ -0,0 +1,74 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotBillingSeatsRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot\billing\seats +type ItemCopilotBillingSeatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemCopilotBillingSeatsRequestBuilderInternal instantiates a new ItemCopilotBillingSeatsRequestBuilder and sets the default values. +func NewItemCopilotBillingSeatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSeatsRequestBuilder) { + m := &ItemCopilotBillingSeatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/seats{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemCopilotBillingSeatsRequestBuilder instantiates a new ItemCopilotBillingSeatsRequestBuilder and sets the default values. +func NewItemCopilotBillingSeatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSeatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotBillingSeatsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// returns a ItemCopilotBillingSeatsGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-organization +func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(ItemCopilotBillingSeatsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCopilotBillingSeatsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCopilotBillingSeatsGetResponseable), nil +} +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotBillingSeatsRequestBuilder when successful +func (m *ItemCopilotBillingSeatsRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotBillingSeatsRequestBuilder) { + return NewItemCopilotBillingSeatsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_teams_delete_request_body.go b/pkg/github/orgs/item_copilot_billing_selected_teams_delete_request_body.go new file mode 100644 index 0000000..0bc21a8 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_teams_delete_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCopilotBillingSelected_teamsDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of teams from which to revoke access to GitHub Copilot. + selected_teams []string +} +// NewItemCopilotBillingSelected_teamsDeleteRequestBody instantiates a new ItemCopilotBillingSelected_teamsDeleteRequestBody and sets the default values. +func NewItemCopilotBillingSelected_teamsDeleteRequestBody()(*ItemCopilotBillingSelected_teamsDeleteRequestBody) { + m := &ItemCopilotBillingSelected_teamsDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_teamsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_teamsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_teamsDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_teamsDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_teamsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedTeams(res) + } + return nil + } + return res +} +// GetSelectedTeams gets the selected_teams property value. The names of teams from which to revoke access to GitHub Copilot. +// returns a []string when successful +func (m *ItemCopilotBillingSelected_teamsDeleteRequestBody) GetSelectedTeams()([]string) { + return m.selected_teams +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_teamsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedTeams() != nil { + err := writer.WriteCollectionOfStringValues("selected_teams", m.GetSelectedTeams()) + 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 *ItemCopilotBillingSelected_teamsDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedTeams sets the selected_teams property value. The names of teams from which to revoke access to GitHub Copilot. +func (m *ItemCopilotBillingSelected_teamsDeleteRequestBody) SetSelectedTeams(value []string)() { + m.selected_teams = value +} +type ItemCopilotBillingSelected_teamsDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedTeams()([]string) + SetSelectedTeams(value []string)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_teams_delete_response.go b/pkg/github/orgs/item_copilot_billing_selected_teams_delete_response.go new file mode 100644 index 0000000..27cf7b1 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_teams_delete_response.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCopilotBillingSelected_teamsDeleteResponse the total number of seat assignments cancelled. +type ItemCopilotBillingSelected_teamsDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The seats_cancelled property + seats_cancelled *int32 +} +// NewItemCopilotBillingSelected_teamsDeleteResponse instantiates a new ItemCopilotBillingSelected_teamsDeleteResponse and sets the default values. +func NewItemCopilotBillingSelected_teamsDeleteResponse()(*ItemCopilotBillingSelected_teamsDeleteResponse) { + m := &ItemCopilotBillingSelected_teamsDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_teamsDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_teamsDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_teamsDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_teamsDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_teamsDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["seats_cancelled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeatsCancelled(val) + } + return nil + } + return res +} +// GetSeatsCancelled gets the seats_cancelled property value. The seats_cancelled property +// returns a *int32 when successful +func (m *ItemCopilotBillingSelected_teamsDeleteResponse) GetSeatsCancelled()(*int32) { + return m.seats_cancelled +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_teamsDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("seats_cancelled", m.GetSeatsCancelled()) + 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 *ItemCopilotBillingSelected_teamsDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSeatsCancelled sets the seats_cancelled property value. The seats_cancelled property +func (m *ItemCopilotBillingSelected_teamsDeleteResponse) SetSeatsCancelled(value *int32)() { + m.seats_cancelled = value +} +type ItemCopilotBillingSelected_teamsDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSeatsCancelled()(*int32) + SetSeatsCancelled(value *int32)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_teams_post_request_body.go b/pkg/github/orgs/item_copilot_billing_selected_teams_post_request_body.go new file mode 100644 index 0000000..3fb3fe5 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_teams_post_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCopilotBillingSelected_teamsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of team names within the organization to which to grant access to GitHub Copilot. + selected_teams []string +} +// NewItemCopilotBillingSelected_teamsPostRequestBody instantiates a new ItemCopilotBillingSelected_teamsPostRequestBody and sets the default values. +func NewItemCopilotBillingSelected_teamsPostRequestBody()(*ItemCopilotBillingSelected_teamsPostRequestBody) { + m := &ItemCopilotBillingSelected_teamsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_teamsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_teamsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_teamsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_teamsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_teamsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedTeams(res) + } + return nil + } + return res +} +// GetSelectedTeams gets the selected_teams property value. List of team names within the organization to which to grant access to GitHub Copilot. +// returns a []string when successful +func (m *ItemCopilotBillingSelected_teamsPostRequestBody) GetSelectedTeams()([]string) { + return m.selected_teams +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_teamsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedTeams() != nil { + err := writer.WriteCollectionOfStringValues("selected_teams", m.GetSelectedTeams()) + 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 *ItemCopilotBillingSelected_teamsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedTeams sets the selected_teams property value. List of team names within the organization to which to grant access to GitHub Copilot. +func (m *ItemCopilotBillingSelected_teamsPostRequestBody) SetSelectedTeams(value []string)() { + m.selected_teams = value +} +type ItemCopilotBillingSelected_teamsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedTeams()([]string) + SetSelectedTeams(value []string)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_teams_post_response.go b/pkg/github/orgs/item_copilot_billing_selected_teams_post_response.go new file mode 100644 index 0000000..62d2764 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_teams_post_response.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCopilotBillingSelected_teamsPostResponse the total number of seat assignments created. +type ItemCopilotBillingSelected_teamsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The seats_created property + seats_created *int32 +} +// NewItemCopilotBillingSelected_teamsPostResponse instantiates a new ItemCopilotBillingSelected_teamsPostResponse and sets the default values. +func NewItemCopilotBillingSelected_teamsPostResponse()(*ItemCopilotBillingSelected_teamsPostResponse) { + m := &ItemCopilotBillingSelected_teamsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_teamsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_teamsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_teamsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_teamsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_teamsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["seats_created"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeatsCreated(val) + } + return nil + } + return res +} +// GetSeatsCreated gets the seats_created property value. The seats_created property +// returns a *int32 when successful +func (m *ItemCopilotBillingSelected_teamsPostResponse) GetSeatsCreated()(*int32) { + return m.seats_created +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_teamsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("seats_created", m.GetSeatsCreated()) + 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 *ItemCopilotBillingSelected_teamsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSeatsCreated sets the seats_created property value. The seats_created property +func (m *ItemCopilotBillingSelected_teamsPostResponse) SetSeatsCreated(value *int32)() { + m.seats_created = value +} +type ItemCopilotBillingSelected_teamsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSeatsCreated()(*int32) + SetSeatsCreated(value *int32)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go new file mode 100644 index 0000000..cd205c1 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go @@ -0,0 +1,112 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotBillingSelected_teamsRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot\billing\selected_teams +type ItemCopilotBillingSelected_teamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCopilotBillingSelected_teamsRequestBuilderInternal instantiates a new ItemCopilotBillingSelected_teamsRequestBuilder and sets the default values. +func NewItemCopilotBillingSelected_teamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSelected_teamsRequestBuilder) { + m := &ItemCopilotBillingSelected_teamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/selected_teams", pathParameters), + } + return m +} +// NewItemCopilotBillingSelected_teamsRequestBuilder instantiates a new ItemCopilotBillingSelected_teamsRequestBuilder and sets the default values. +func NewItemCopilotBillingSelected_teamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSelected_teamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotBillingSelected_teamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a ItemCopilotBillingSelected_teamsDeleteResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#remove-teams-from-the-copilot-subscription-for-an-organization +func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Delete(ctx context.Context, body ItemCopilotBillingSelected_teamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCopilotBillingSelected_teamsDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCopilotBillingSelected_teamsDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCopilotBillingSelected_teamsDeleteResponseable), nil +} +// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a ItemCopilotBillingSelected_teamsPostResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#add-teams-to-the-copilot-subscription-for-an-organization +func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Post(ctx context.Context, body ItemCopilotBillingSelected_teamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCopilotBillingSelected_teamsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCopilotBillingSelected_teamsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCopilotBillingSelected_teamsPostResponseable), nil +} +// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotBillingSelected_teamsRequestBuilder when successful +func (m *ItemCopilotBillingSelected_teamsRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotBillingSelected_teamsRequestBuilder) { + return NewItemCopilotBillingSelected_teamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_users_delete_request_body.go b/pkg/github/orgs/item_copilot_billing_selected_users_delete_request_body.go new file mode 100644 index 0000000..63b4d02 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_users_delete_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCopilotBillingSelected_usersDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the organization members for which to revoke access to GitHub Copilot. + selected_usernames []string +} +// NewItemCopilotBillingSelected_usersDeleteRequestBody instantiates a new ItemCopilotBillingSelected_usersDeleteRequestBody and sets the default values. +func NewItemCopilotBillingSelected_usersDeleteRequestBody()(*ItemCopilotBillingSelected_usersDeleteRequestBody) { + m := &ItemCopilotBillingSelected_usersDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_usersDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_usersDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_usersDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_usersDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_usersDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_usernames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedUsernames(res) + } + return nil + } + return res +} +// GetSelectedUsernames gets the selected_usernames property value. The usernames of the organization members for which to revoke access to GitHub Copilot. +// returns a []string when successful +func (m *ItemCopilotBillingSelected_usersDeleteRequestBody) GetSelectedUsernames()([]string) { + return m.selected_usernames +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_usersDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedUsernames() != nil { + err := writer.WriteCollectionOfStringValues("selected_usernames", m.GetSelectedUsernames()) + 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 *ItemCopilotBillingSelected_usersDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedUsernames sets the selected_usernames property value. The usernames of the organization members for which to revoke access to GitHub Copilot. +func (m *ItemCopilotBillingSelected_usersDeleteRequestBody) SetSelectedUsernames(value []string)() { + m.selected_usernames = value +} +type ItemCopilotBillingSelected_usersDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedUsernames()([]string) + SetSelectedUsernames(value []string)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_users_delete_response.go b/pkg/github/orgs/item_copilot_billing_selected_users_delete_response.go new file mode 100644 index 0000000..b658f15 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_users_delete_response.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCopilotBillingSelected_usersDeleteResponse the total number of seat assignments cancelled. +type ItemCopilotBillingSelected_usersDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The seats_cancelled property + seats_cancelled *int32 +} +// NewItemCopilotBillingSelected_usersDeleteResponse instantiates a new ItemCopilotBillingSelected_usersDeleteResponse and sets the default values. +func NewItemCopilotBillingSelected_usersDeleteResponse()(*ItemCopilotBillingSelected_usersDeleteResponse) { + m := &ItemCopilotBillingSelected_usersDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_usersDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_usersDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_usersDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_usersDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_usersDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["seats_cancelled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeatsCancelled(val) + } + return nil + } + return res +} +// GetSeatsCancelled gets the seats_cancelled property value. The seats_cancelled property +// returns a *int32 when successful +func (m *ItemCopilotBillingSelected_usersDeleteResponse) GetSeatsCancelled()(*int32) { + return m.seats_cancelled +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_usersDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("seats_cancelled", m.GetSeatsCancelled()) + 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 *ItemCopilotBillingSelected_usersDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSeatsCancelled sets the seats_cancelled property value. The seats_cancelled property +func (m *ItemCopilotBillingSelected_usersDeleteResponse) SetSeatsCancelled(value *int32)() { + m.seats_cancelled = value +} +type ItemCopilotBillingSelected_usersDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSeatsCancelled()(*int32) + SetSeatsCancelled(value *int32)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_users_post_request_body.go b/pkg/github/orgs/item_copilot_billing_selected_users_post_request_body.go new file mode 100644 index 0000000..c6d9802 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_users_post_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCopilotBillingSelected_usersPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usernames of the organization members to be granted access to GitHub Copilot. + selected_usernames []string +} +// NewItemCopilotBillingSelected_usersPostRequestBody instantiates a new ItemCopilotBillingSelected_usersPostRequestBody and sets the default values. +func NewItemCopilotBillingSelected_usersPostRequestBody()(*ItemCopilotBillingSelected_usersPostRequestBody) { + m := &ItemCopilotBillingSelected_usersPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_usersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_usersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_usersPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_usersPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_usersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_usernames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedUsernames(res) + } + return nil + } + return res +} +// GetSelectedUsernames gets the selected_usernames property value. The usernames of the organization members to be granted access to GitHub Copilot. +// returns a []string when successful +func (m *ItemCopilotBillingSelected_usersPostRequestBody) GetSelectedUsernames()([]string) { + return m.selected_usernames +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_usersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedUsernames() != nil { + err := writer.WriteCollectionOfStringValues("selected_usernames", m.GetSelectedUsernames()) + 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 *ItemCopilotBillingSelected_usersPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedUsernames sets the selected_usernames property value. The usernames of the organization members to be granted access to GitHub Copilot. +func (m *ItemCopilotBillingSelected_usersPostRequestBody) SetSelectedUsernames(value []string)() { + m.selected_usernames = value +} +type ItemCopilotBillingSelected_usersPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedUsernames()([]string) + SetSelectedUsernames(value []string)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_users_post_response.go b/pkg/github/orgs/item_copilot_billing_selected_users_post_response.go new file mode 100644 index 0000000..b90bf23 --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_users_post_response.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCopilotBillingSelected_usersPostResponse the total number of seat assignments created. +type ItemCopilotBillingSelected_usersPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The seats_created property + seats_created *int32 +} +// NewItemCopilotBillingSelected_usersPostResponse instantiates a new ItemCopilotBillingSelected_usersPostResponse and sets the default values. +func NewItemCopilotBillingSelected_usersPostResponse()(*ItemCopilotBillingSelected_usersPostResponse) { + m := &ItemCopilotBillingSelected_usersPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCopilotBillingSelected_usersPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCopilotBillingSelected_usersPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCopilotBillingSelected_usersPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCopilotBillingSelected_usersPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCopilotBillingSelected_usersPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["seats_created"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSeatsCreated(val) + } + return nil + } + return res +} +// GetSeatsCreated gets the seats_created property value. The seats_created property +// returns a *int32 when successful +func (m *ItemCopilotBillingSelected_usersPostResponse) GetSeatsCreated()(*int32) { + return m.seats_created +} +// Serialize serializes information the current object +func (m *ItemCopilotBillingSelected_usersPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("seats_created", m.GetSeatsCreated()) + 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 *ItemCopilotBillingSelected_usersPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSeatsCreated sets the seats_created property value. The seats_created property +func (m *ItemCopilotBillingSelected_usersPostResponse) SetSeatsCreated(value *int32)() { + m.seats_created = value +} +type ItemCopilotBillingSelected_usersPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSeatsCreated()(*int32) + SetSeatsCreated(value *int32)() +} diff --git a/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go new file mode 100644 index 0000000..00fe29d --- /dev/null +++ b/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go @@ -0,0 +1,112 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotBillingSelected_usersRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot\billing\selected_users +type ItemCopilotBillingSelected_usersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCopilotBillingSelected_usersRequestBuilderInternal instantiates a new ItemCopilotBillingSelected_usersRequestBuilder and sets the default values. +func NewItemCopilotBillingSelected_usersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSelected_usersRequestBuilder) { + m := &ItemCopilotBillingSelected_usersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/selected_users", pathParameters), + } + return m +} +// NewItemCopilotBillingSelected_usersRequestBuilder instantiates a new ItemCopilotBillingSelected_usersRequestBuilder and sets the default values. +func NewItemCopilotBillingSelected_usersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotBillingSelected_usersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotBillingSelected_usersRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a ItemCopilotBillingSelected_usersDeleteResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#remove-users-from-the-copilot-subscription-for-an-organization +func (m *ItemCopilotBillingSelected_usersRequestBuilder) Delete(ctx context.Context, body ItemCopilotBillingSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCopilotBillingSelected_usersDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCopilotBillingSelected_usersDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCopilotBillingSelected_usersDeleteResponseable), nil +} +// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a ItemCopilotBillingSelected_usersPostResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#add-users-to-the-copilot-subscription-for-an-organization +func (m *ItemCopilotBillingSelected_usersRequestBuilder) Post(ctx context.Context, body ItemCopilotBillingSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCopilotBillingSelected_usersPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCopilotBillingSelected_usersPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCopilotBillingSelected_usersPostResponseable), nil +} +// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotBillingSelected_usersRequestBuilder when successful +func (m *ItemCopilotBillingSelected_usersRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotBillingSelected_usersRequestBuilder) { + return NewItemCopilotBillingSelected_usersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_copilot_request_builder.go b/pkg/github/orgs/item_copilot_request_builder.go new file mode 100644 index 0000000..a9a8889 --- /dev/null +++ b/pkg/github/orgs/item_copilot_request_builder.go @@ -0,0 +1,33 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemCopilotRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot +type ItemCopilotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Billing the billing property +// returns a *ItemCopilotBillingRequestBuilder when successful +func (m *ItemCopilotRequestBuilder) Billing()(*ItemCopilotBillingRequestBuilder) { + return NewItemCopilotBillingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCopilotRequestBuilderInternal instantiates a new ItemCopilotRequestBuilder and sets the default values. +func NewItemCopilotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotRequestBuilder) { + m := &ItemCopilotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot", pathParameters), + } + return m +} +// NewItemCopilotRequestBuilder instantiates a new ItemCopilotRequestBuilder and sets the default values. +func NewItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemCopilotUsageRequestBuilder when successful +func (m *ItemCopilotRequestBuilder) Usage()(*ItemCopilotUsageRequestBuilder) { + return NewItemCopilotUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_copilot_usage_request_builder.go b/pkg/github/orgs/item_copilot_usage_request_builder.go new file mode 100644 index 0000000..4683785 --- /dev/null +++ b/pkg/github/orgs/item_copilot_usage_request_builder.go @@ -0,0 +1,81 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCopilotUsageRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot\usage +type ItemCopilotUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCopilotUsageRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +type ItemCopilotUsageRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + Since *string `uriparametername:"since"` + // Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + Until *string `uriparametername:"until"` +} +// NewItemCopilotUsageRequestBuilderInternal instantiates a new ItemCopilotUsageRequestBuilder and sets the default values. +func NewItemCopilotUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotUsageRequestBuilder) { + m := &ItemCopilotUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot/usage{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemCopilotUsageRequestBuilder instantiates a new ItemCopilotUsageRequestBuilder and sets the default values. +func NewItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// returns a []CopilotUsageMetricsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-organization-members +func (m *ItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotUsageMetricsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCopilotUsageMetricsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotUsageMetricsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotUsageMetricsable) + } + } + return val, nil +} +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCopilotUsageRequestBuilder when successful +func (m *ItemCopilotUsageRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotUsageRequestBuilder) { + return NewItemCopilotUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_credential_authorizations_request_builder.go b/pkg/github/orgs/item_credential_authorizations_request_builder.go new file mode 100644 index 0000000..b9d4150 --- /dev/null +++ b/pkg/github/orgs/item_credential_authorizations_request_builder.go @@ -0,0 +1,80 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCredentialAuthorizationsRequestBuilder builds and executes requests for operations under \orgs\{org}\credential-authorizations +type ItemCredentialAuthorizationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCredentialAuthorizationsRequestBuilderGetQueryParameters lists all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/enterprise-cloud@latest//articles/about-authentication-with-saml-single-sign-on).The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +type ItemCredentialAuthorizationsRequestBuilderGetQueryParameters struct { + // Limits the list of credentials authorizations for an organization to a specific login + Login *string `uriparametername:"login"` + // Page token + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByCredential_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.credentialAuthorizations.item collection +// returns a *ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder when successful +func (m *ItemCredentialAuthorizationsRequestBuilder) ByCredential_id(credential_id int32)(*ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["credential_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(credential_id), 10) + return NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCredentialAuthorizationsRequestBuilderInternal instantiates a new ItemCredentialAuthorizationsRequestBuilder and sets the default values. +func NewItemCredentialAuthorizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCredentialAuthorizationsRequestBuilder) { + m := &ItemCredentialAuthorizationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/credential-authorizations{?login*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemCredentialAuthorizationsRequestBuilder instantiates a new ItemCredentialAuthorizationsRequestBuilder and sets the default values. +func NewItemCredentialAuthorizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCredentialAuthorizationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCredentialAuthorizationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/enterprise-cloud@latest//articles/about-authentication-with-saml-single-sign-on).The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a []CredentialAuthorizationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-saml-sso-authorizations-for-an-organization +func (m *ItemCredentialAuthorizationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCredentialAuthorizationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CredentialAuthorizationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCredentialAuthorizationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CredentialAuthorizationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CredentialAuthorizationable) + } + } + return val, nil +} +// ToGetRequestInformation lists all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/enterprise-cloud@latest//articles/about-authentication-with-saml-single-sign-on).The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCredentialAuthorizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCredentialAuthorizationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCredentialAuthorizationsRequestBuilder when successful +func (m *ItemCredentialAuthorizationsRequestBuilder) WithUrl(rawUrl string)(*ItemCredentialAuthorizationsRequestBuilder) { + return NewItemCredentialAuthorizationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_credential_authorizations_with_credential_item_request_builder.go b/pkg/github/orgs/item_credential_authorizations_with_credential_item_request_builder.go new file mode 100644 index 0000000..8d48149 --- /dev/null +++ b/pkg/github/orgs/item_credential_authorizations_with_credential_item_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\credential-authorizations\{credential_id} +type ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilderInternal instantiates a new ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder and sets the default values. +func NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) { + m := &ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/credential-authorizations/{credential_id}", pathParameters), + } + return m +} +// NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilder instantiates a new ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder and sets the default values. +func NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#remove-a-saml-sso-authorization-for-an-organization +func (m *ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder when successful +func (m *ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemCredentialAuthorizationsWithCredential_ItemRequestBuilder) { + return NewItemCredentialAuthorizationsWithCredential_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_custom_repository_roles_get_response.go b/pkg/github/orgs/item_custom_repository_roles_get_response.go new file mode 100644 index 0000000..40359dd --- /dev/null +++ b/pkg/github/orgs/item_custom_repository_roles_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemCustomRepositoryRolesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The custom_roles property + custom_roles []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable + // The number of custom roles in this organization + total_count *int32 +} +// NewItemCustomRepositoryRolesGetResponse instantiates a new ItemCustomRepositoryRolesGetResponse and sets the default values. +func NewItemCustomRepositoryRolesGetResponse()(*ItemCustomRepositoryRolesGetResponse) { + m := &ItemCustomRepositoryRolesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCustomRepositoryRolesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCustomRepositoryRolesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCustomRepositoryRolesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCustomRepositoryRolesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomRoles gets the custom_roles property value. The custom_roles property +// returns a []OrganizationCustomRepositoryRoleable when successful +func (m *ItemCustomRepositoryRolesGetResponse) GetCustomRoles()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable) { + return m.custom_roles +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCustomRepositoryRolesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable) + } + } + m.SetCustomRoles(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The number of custom roles in this organization +// returns a *int32 when successful +func (m *ItemCustomRepositoryRolesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemCustomRepositoryRolesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCustomRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomRoles())) + for i, v := range m.GetCustomRoles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("custom_roles", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemCustomRepositoryRolesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomRoles sets the custom_roles property value. The custom_roles property +func (m *ItemCustomRepositoryRolesGetResponse) SetCustomRoles(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable)() { + m.custom_roles = value +} +// SetTotalCount sets the total_count property value. The number of custom roles in this organization +func (m *ItemCustomRepositoryRolesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemCustomRepositoryRolesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomRoles()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable) + GetTotalCount()(*int32) + SetCustomRoles(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_custom_repository_roles_request_builder.go b/pkg/github/orgs/item_custom_repository_roles_request_builder.go new file mode 100644 index 0000000..9fae4db --- /dev/null +++ b/pkg/github/orgs/item_custom_repository_roles_request_builder.go @@ -0,0 +1,105 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCustomRepositoryRolesRequestBuilder builds and executes requests for operations under \orgs\{org}\custom-repository-roles +type ItemCustomRepositoryRolesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRole_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.customRepositoryRoles.item collection +// returns a *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder when successful +func (m *ItemCustomRepositoryRolesRequestBuilder) ByRole_id(role_id int32)(*ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["role_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(role_id), 10) + return NewItemCustomRepositoryRolesWithRole_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCustomRepositoryRolesRequestBuilderInternal instantiates a new ItemCustomRepositoryRolesRequestBuilder and sets the default values. +func NewItemCustomRepositoryRolesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustomRepositoryRolesRequestBuilder) { + m := &ItemCustomRepositoryRolesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/custom-repository-roles", pathParameters), + } + return m +} +// NewItemCustomRepositoryRolesRequestBuilder instantiates a new ItemCustomRepositoryRolesRequestBuilder and sets the default values. +func NewItemCustomRepositoryRolesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustomRepositoryRolesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCustomRepositoryRolesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a ItemCustomRepositoryRolesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization +func (m *ItemCustomRepositoryRolesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemCustomRepositoryRolesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemCustomRepositoryRolesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemCustomRepositoryRolesGetResponseable), nil +} +// Post creates a custom repository role that can be used by all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a OrganizationCustomRepositoryRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#create-a-custom-repository-role +func (m *ItemCustomRepositoryRolesRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleCreateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable), nil +} +// ToGetRequestInformation list the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCustomRepositoryRolesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a custom repository role that can be used by all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCustomRepositoryRolesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleCreateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCustomRepositoryRolesRequestBuilder when successful +func (m *ItemCustomRepositoryRolesRequestBuilder) WithUrl(rawUrl string)(*ItemCustomRepositoryRolesRequestBuilder) { + return NewItemCustomRepositoryRolesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_custom_repository_roles_with_role_item_request_builder.go b/pkg/github/orgs/item_custom_repository_roles_with_role_item_request_builder.go new file mode 100644 index 0000000..313e1e4 --- /dev/null +++ b/pkg/github/orgs/item_custom_repository_roles_with_role_item_request_builder.go @@ -0,0 +1,120 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCustomRepositoryRolesWithRole_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\custom-repository-roles\{role_id} +type ItemCustomRepositoryRolesWithRole_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCustomRepositoryRolesWithRole_ItemRequestBuilderInternal instantiates a new ItemCustomRepositoryRolesWithRole_ItemRequestBuilder and sets the default values. +func NewItemCustomRepositoryRolesWithRole_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) { + m := &ItemCustomRepositoryRolesWithRole_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/custom-repository-roles/{role_id}", pathParameters), + } + return m +} +// NewItemCustomRepositoryRolesWithRole_ItemRequestBuilder instantiates a new ItemCustomRepositoryRolesWithRole_ItemRequestBuilder and sets the default values. +func NewItemCustomRepositoryRolesWithRole_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCustomRepositoryRolesWithRole_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a custom role from an organization. Once the custom role has been deleted, anyuser, team, or invitation with the deleted custom role will be reassigned the inherited role. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#delete-a-custom-repository-role +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a custom repository role that is available to all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a OrganizationCustomRepositoryRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#get-a-custom-repository-role +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable), nil +} +// Patch updates a custom repository role that can be used by all repositories owned by the organization. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a OrganizationCustomRepositoryRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#update-a-custom-repository-role +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleUpdateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable), nil +} +// ToDeleteRequestInformation deletes a custom role from an organization. Once the custom role has been deleted, anyuser, team, or invitation with the deleted custom role will be reassigned the inherited role. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a custom repository role that is available to all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a custom repository role that can be used by all repositories owned by the organization. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleUpdateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder when successful +func (m *ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemCustomRepositoryRolesWithRole_ItemRequestBuilder) { + return NewItemCustomRepositoryRolesWithRole_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_custom_roles_request_builder.go b/pkg/github/orgs/item_custom_roles_request_builder.go new file mode 100644 index 0000000..212930a --- /dev/null +++ b/pkg/github/orgs/item_custom_roles_request_builder.go @@ -0,0 +1,82 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCustom_rolesRequestBuilder builds and executes requests for operations under \orgs\{org}\custom_roles +type ItemCustom_rolesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRole_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.custom_roles.item collection +// Deprecated: +// returns a *ItemCustom_rolesWithRole_ItemRequestBuilder when successful +func (m *ItemCustom_rolesRequestBuilder) ByRole_id(role_id int32)(*ItemCustom_rolesWithRole_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["role_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(role_id), 10) + return NewItemCustom_rolesWithRole_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCustom_rolesRequestBuilderInternal instantiates a new ItemCustom_rolesRequestBuilder and sets the default values. +func NewItemCustom_rolesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustom_rolesRequestBuilder) { + m := &ItemCustom_rolesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/custom_roles", pathParameters), + } + return m +} +// NewItemCustom_rolesRequestBuilder instantiates a new ItemCustom_rolesRequestBuilder and sets the default values. +func NewItemCustom_rolesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustom_rolesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCustom_rolesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Create a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#create-a-custom-repository-role)" endpoint instead.Creates a custom repository role that can be used by all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a OrganizationCustomRepositoryRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#deprecated---create-a-custom-role +func (m *ItemCustom_rolesRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleCreateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable), nil +} +// ToPostRequestInformation **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Create a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#create-a-custom-repository-role)" endpoint instead.Creates a custom repository role that can be used by all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCustom_rolesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleCreateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemCustom_rolesRequestBuilder when successful +func (m *ItemCustom_rolesRequestBuilder) WithUrl(rawUrl string)(*ItemCustom_rolesRequestBuilder) { + return NewItemCustom_rolesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_custom_roles_with_role_item_request_builder.go b/pkg/github/orgs/item_custom_roles_with_role_item_request_builder.go new file mode 100644 index 0000000..fcdeafa --- /dev/null +++ b/pkg/github/orgs/item_custom_roles_with_role_item_request_builder.go @@ -0,0 +1,127 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCustom_rolesWithRole_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\custom_roles\{role_id} +type ItemCustom_rolesWithRole_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCustom_rolesWithRole_ItemRequestBuilderInternal instantiates a new ItemCustom_rolesWithRole_ItemRequestBuilder and sets the default values. +func NewItemCustom_rolesWithRole_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustom_rolesWithRole_ItemRequestBuilder) { + m := &ItemCustom_rolesWithRole_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/custom_roles/{role_id}", pathParameters), + } + return m +} +// NewItemCustom_rolesWithRole_ItemRequestBuilder instantiates a new ItemCustom_rolesWithRole_ItemRequestBuilder and sets the default values. +func NewItemCustom_rolesWithRole_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCustom_rolesWithRole_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCustom_rolesWithRole_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Delete a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#delete-a-custom-repository-role)" endpoint instead.Deletes a custom role from an organization. Once the custom role has been deleted, anyuser, team, or invitation with the deleted custom role will be reassigned the inherited role. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#deprecated---delete-a-custom-role +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Get a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#get-a-custom-repository-role)" endpoint instead.Gets a custom repository role that is available to all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Deprecated: +// returns a OrganizationCustomRepositoryRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#deprecated---get-a-custom-role +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable), nil +} +// Patch **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Update a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#update-a-custom-repository-role)" endpoint instead.Updates a custom repository role that can be used by all repositories owned by the organization. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a OrganizationCustomRepositoryRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#deprecated---update-a-custom-role +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleUpdateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationCustomRepositoryRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleable), nil +} +// ToDeleteRequestInformation **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Delete a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#delete-a-custom-repository-role)" endpoint instead.Deletes a custom role from an organization. Once the custom role has been deleted, anyuser, team, or invitation with the deleted custom role will be reassigned the inherited role. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Get a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#get-a-custom-repository-role)" endpoint instead.Gets a custom repository role that is available to all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[Update a custom repository role](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#update-a-custom-repository-role)" endpoint instead.Updates a custom repository role that can be used by all repositories owned by the organization. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationCustomRepositoryRoleUpdateSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemCustom_rolesWithRole_ItemRequestBuilder when successful +func (m *ItemCustom_rolesWithRole_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemCustom_rolesWithRole_ItemRequestBuilder) { + return NewItemCustom_rolesWithRole_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_dependabot_alerts_request_builder.go b/pkg/github/orgs/item_dependabot_alerts_request_builder.go new file mode 100644 index 0000000..376de31 --- /dev/null +++ b/pkg/github/orgs/item_dependabot_alerts_request_builder.go @@ -0,0 +1,98 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i20f589d16f8d0164696ef3e3eef9afea821451e4f72ce270f1489b63c9587a27 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/dependabot/alerts" +) + +// ItemDependabotAlertsRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot\alerts +type ItemDependabotAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDependabotAlertsRequestBuilderGetQueryParameters lists Dependabot alerts for an organization.The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i20f589d16f8d0164696ef3e3eef9afea821451e4f72ce270f1489b63c9587a27.GetDirectionQueryParameterType `uriparametername:"direction"` + // A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + Ecosystem *string `uriparametername:"ecosystem"` + // **Deprecated**. The number of results per page (max 100), starting from the first matching result.This parameter must not be used in combination with `last`.Instead, use `per_page` in combination with `after` to fetch the first page of results. + First *int32 `uriparametername:"first"` + // **Deprecated**. The number of results per page (max 100), starting from the last matching result.This parameter must not be used in combination with `first`.Instead, use `per_page` in combination with `before` to fetch the last page of results. + Last *int32 `uriparametername:"last"` + // A comma-separated list of package names. If specified, only alerts for these packages will be returned. + Package *string `uriparametername:"package"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + Scope *i20f589d16f8d0164696ef3e3eef9afea821451e4f72ce270f1489b63c9587a27.GetScopeQueryParameterType `uriparametername:"scope"` + // A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` + Severity *string `uriparametername:"severity"` + // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed. + Sort *i20f589d16f8d0164696ef3e3eef9afea821451e4f72ce270f1489b63c9587a27.GetSortQueryParameterType `uriparametername:"sort"` + // A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` + State *string `uriparametername:"state"` +} +// NewItemDependabotAlertsRequestBuilderInternal instantiates a new ItemDependabotAlertsRequestBuilder and sets the default values. +func NewItemDependabotAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotAlertsRequestBuilder) { + m := &ItemDependabotAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/alerts{?after*,before*,direction*,ecosystem*,first*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters), + } + return m +} +// NewItemDependabotAlertsRequestBuilder instantiates a new ItemDependabotAlertsRequestBuilder and sets the default values. +func NewItemDependabotAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists Dependabot alerts for an organization.The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a []DependabotAlertWithRepositoryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts#list-dependabot-alerts-for-an-organization +func (m *ItemDependabotAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertWithRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotAlertWithRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertWithRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertWithRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists Dependabot alerts for an organization.The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemDependabotAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotAlertsRequestBuilder when successful +func (m *ItemDependabotAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotAlertsRequestBuilder) { + return NewItemDependabotAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_dependabot_request_builder.go b/pkg/github/orgs/item_dependabot_request_builder.go new file mode 100644 index 0000000..3b6682e --- /dev/null +++ b/pkg/github/orgs/item_dependabot_request_builder.go @@ -0,0 +1,33 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDependabotRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot +type ItemDependabotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemDependabotAlertsRequestBuilder when successful +func (m *ItemDependabotRequestBuilder) Alerts()(*ItemDependabotAlertsRequestBuilder) { + return NewItemDependabotAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDependabotRequestBuilderInternal instantiates a new ItemDependabotRequestBuilder and sets the default values. +func NewItemDependabotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotRequestBuilder) { + m := &ItemDependabotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot", pathParameters), + } + return m +} +// NewItemDependabotRequestBuilder instantiates a new ItemDependabotRequestBuilder and sets the default values. +func NewItemDependabotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotRequestBuilderInternal(urlParams, requestAdapter) +} +// Secrets the secrets property +// returns a *ItemDependabotSecretsRequestBuilder when successful +func (m *ItemDependabotRequestBuilder) Secrets()(*ItemDependabotSecretsRequestBuilder) { + return NewItemDependabotSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_dependabot_secrets_get_response.go b/pkg/github/orgs/item_dependabot_secrets_get_response.go new file mode 100644 index 0000000..283e6ac --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemDependabotSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable + // The total_count property + total_count *int32 +} +// NewItemDependabotSecretsGetResponse instantiates a new ItemDependabotSecretsGetResponse and sets the default values. +func NewItemDependabotSecretsGetResponse()(*ItemDependabotSecretsGetResponse) { + m := &ItemDependabotSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDependabotSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDependabotSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDependabotSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDependabotSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDependabotSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationDependabotSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []OrganizationDependabotSecretable when successful +func (m *ItemDependabotSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemDependabotSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemDependabotSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemDependabotSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemDependabotSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemDependabotSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemDependabotSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_dependabot_secrets_item_repositories_get_response.go b/pkg/github/orgs/item_dependabot_secrets_item_repositories_get_response.go new file mode 100644 index 0000000..411ce29 --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_item_repositories_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemDependabotSecretsItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable + // The total_count property + total_count *int32 +} +// NewItemDependabotSecretsItemRepositoriesGetResponse instantiates a new ItemDependabotSecretsItemRepositoriesGetResponse and sets the default values. +func NewItemDependabotSecretsItemRepositoriesGetResponse()(*ItemDependabotSecretsItemRepositoriesGetResponse) { + m := &ItemDependabotSecretsItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDependabotSecretsItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDependabotSecretsItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDependabotSecretsItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []MinimalRepositoryable when successful +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemDependabotSecretsItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemDependabotSecretsItemRepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemDependabotSecretsItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_dependabot_secrets_item_repositories_put_request_body.go b/pkg/github/orgs/item_dependabot_secrets_item_repositories_put_request_body.go new file mode 100644 index 0000000..0b25b28 --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_item_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDependabotSecretsItemRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. + selected_repository_ids []int32 +} +// NewItemDependabotSecretsItemRepositoriesPutRequestBody instantiates a new ItemDependabotSecretsItemRepositoriesPutRequestBody and sets the default values. +func NewItemDependabotSecretsItemRepositoriesPutRequestBody()(*ItemDependabotSecretsItemRepositoriesPutRequestBody) { + m := &ItemDependabotSecretsItemRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDependabotSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDependabotSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDependabotSecretsItemRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDependabotSecretsItemRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDependabotSecretsItemRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +// returns a []int32 when successful +func (m *ItemDependabotSecretsItemRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemDependabotSecretsItemRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemDependabotSecretsItemRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +func (m *ItemDependabotSecretsItemRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemDependabotSecretsItemRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go b/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go new file mode 100644 index 0000000..c6a219d --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go @@ -0,0 +1,100 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDependabotSecretsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot\secrets\{secret_name}\repositories +type ItemDependabotSecretsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDependabotSecretsItemRepositoriesRequestBuilderGetQueryParameters lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemDependabotSecretsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.dependabot.secrets.item.repositories.item collection +// returns a *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDependabotSecretsItemRepositoriesRequestBuilderInternal instantiates a new ItemDependabotSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewItemDependabotSecretsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsItemRepositoriesRequestBuilder) { + m := &ItemDependabotSecretsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemDependabotSecretsItemRepositoriesRequestBuilder instantiates a new ItemDependabotSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewItemDependabotSecretsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotSecretsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemDependabotSecretsItemRepositoriesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret +func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotSecretsItemRepositoriesRequestBuilderGetQueryParameters])(ItemDependabotSecretsItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemDependabotSecretsItemRepositoriesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemDependabotSecretsItemRepositoriesGetResponseable), nil +} +// Put replaces all repositories for an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret +func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) Put(ctx context.Context, body ItemDependabotSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists all repositories that have been selected when the `visibility`for repository access to a secret is set to `selected`.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotSecretsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation replaces all repositories for an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemDependabotSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotSecretsItemRepositoriesRequestBuilder when successful +func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotSecretsItemRepositoriesRequestBuilder) { + return NewItemDependabotSecretsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_dependabot_secrets_item_repositories_with_repository_item_request_builder.go b/pkg/github/orgs/item_dependabot_secrets_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..daff27d --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot\secrets\{secret_name}\repositories\{repository_id} +type ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret +func (m *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a repository to an organization secret when the `visibility` forrepository access is set to `selected`. The visibility is set when you [Create orupdate an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#add-selected-repository-to-an-organization-secret +func (m *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to an organization secret when the `visibility` forrepository access is set to `selected`. The visibility is set when you [Create orupdate an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewItemDependabotSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_dependabot_secrets_item_with_secret_name_put_request_body.go b/pkg/github/orgs/item_dependabot_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..eb6a0eb --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDependabotSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-an-organization-public-key) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string + // An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. + selected_repository_ids []string +} +// NewItemDependabotSecretsItemWithSecret_namePutRequestBody instantiates a new ItemDependabotSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemDependabotSecretsItemWithSecret_namePutRequestBody()(*ItemDependabotSecretsItemWithSecret_namePutRequestBody) { + m := &ItemDependabotSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDependabotSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDependabotSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDependabotSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-an-organization-public-key) endpoint. +// returns a *string when successful +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +// returns a []string when successful +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) GetSelectedRepositoryIds()([]string) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfStringValues("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *ItemDependabotSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-an-organization-public-key) endpoint. +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +func (m *ItemDependabotSecretsItemWithSecret_namePutRequestBody) SetSelectedRepositoryIds(value []string)() { + m.selected_repository_ids = value +} +type ItemDependabotSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + GetSelectedRepositoryIds()([]string) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() + SetSelectedRepositoryIds(value []string)() +} diff --git a/pkg/github/orgs/item_dependabot_secrets_public_key_request_builder.go b/pkg/github/orgs/item_dependabot_secrets_public_key_request_builder.go new file mode 100644 index 0000000..539bebf --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemDependabotSecretsPublicKeyRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot\secrets\public-key +type ItemDependabotSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemDependabotSecretsPublicKeyRequestBuilderInternal instantiates a new ItemDependabotSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemDependabotSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsPublicKeyRequestBuilder) { + m := &ItemDependabotSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/public-key", pathParameters), + } + return m +} +// NewItemDependabotSecretsPublicKeyRequestBuilder instantiates a new ItemDependabotSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemDependabotSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a DependabotPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-an-organization-public-key +func (m *ItemDependabotSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotPublicKeyable), nil +} +// ToGetRequestInformation gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotSecretsPublicKeyRequestBuilder when successful +func (m *ItemDependabotSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotSecretsPublicKeyRequestBuilder) { + return NewItemDependabotSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_dependabot_secrets_request_builder.go b/pkg/github/orgs/item_dependabot_secrets_request_builder.go new file mode 100644 index 0000000..914f6e3 --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_request_builder.go @@ -0,0 +1,80 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDependabotSecretsRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot\secrets +type ItemDependabotSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDependabotSecretsRequestBuilderGetQueryParameters lists all secrets available in an organization without revealing theirencrypted values.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemDependabotSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.dependabot.secrets.item collection +// returns a *ItemDependabotSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemDependabotSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDependabotSecretsRequestBuilderInternal instantiates a new ItemDependabotSecretsRequestBuilder and sets the default values. +func NewItemDependabotSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsRequestBuilder) { + m := &ItemDependabotSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemDependabotSecretsRequestBuilder instantiates a new ItemDependabotSecretsRequestBuilder and sets the default values. +func NewItemDependabotSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all secrets available in an organization without revealing theirencrypted values.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemDependabotSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#list-organization-secrets +func (m *ItemDependabotSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotSecretsRequestBuilderGetQueryParameters])(ItemDependabotSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemDependabotSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemDependabotSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemDependabotSecretsPublicKeyRequestBuilder when successful +func (m *ItemDependabotSecretsRequestBuilder) PublicKey()(*ItemDependabotSecretsPublicKeyRequestBuilder) { + return NewItemDependabotSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all secrets available in an organization without revealing theirencrypted values.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDependabotSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotSecretsRequestBuilder when successful +func (m *ItemDependabotSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotSecretsRequestBuilder) { + return NewItemDependabotSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_dependabot_secrets_with_secret_name_item_request_builder.go b/pkg/github/orgs/item_dependabot_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..1b7f8bf --- /dev/null +++ b/pkg/github/orgs/item_dependabot_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,115 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemDependabotSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\dependabot\secrets\{secret_name} +type ItemDependabotSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemDependabotSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemDependabotSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemDependabotSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemDependabotSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemDependabotSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a secret in an organization using the secret name.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#delete-an-organization-secret +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a single organization secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a OrganizationDependabotSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-an-organization-secret +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationDependabotSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationDependabotSecretable), nil +} +// Put creates or updates an organization secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-an-organization-secret +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemDependabotSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// Repositories the repositories property +// returns a *ItemDependabotSecretsItemRepositoriesRequestBuilder when successful +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) Repositories()(*ItemDependabotSecretsItemRepositoriesRequestBuilder) { + return NewItemDependabotSecretsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a secret in an organization using the secret name.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a single organization secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates an organization secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemDependabotSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDependabotSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemDependabotSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + return NewItemDependabotSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_docker_conflicts_request_builder.go b/pkg/github/orgs/item_docker_conflicts_request_builder.go new file mode 100644 index 0000000..7c813e4 --- /dev/null +++ b/pkg/github/orgs/item_docker_conflicts_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemDockerConflictsRequestBuilder builds and executes requests for operations under \orgs\{org}\docker\conflicts +type ItemDockerConflictsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemDockerConflictsRequestBuilderInternal instantiates a new ItemDockerConflictsRequestBuilder and sets the default values. +func NewItemDockerConflictsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerConflictsRequestBuilder) { + m := &ItemDockerConflictsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/docker/conflicts", pathParameters), + } + return m +} +// NewItemDockerConflictsRequestBuilder instantiates a new ItemDockerConflictsRequestBuilder and sets the default values. +func NewItemDockerConflictsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerConflictsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDockerConflictsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. +// returns a []PackageEscapedable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-organization +func (m *ItemDockerConflictsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable) + } + } + return val, nil +} +// ToGetRequestInformation lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDockerConflictsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDockerConflictsRequestBuilder when successful +func (m *ItemDockerConflictsRequestBuilder) WithUrl(rawUrl string)(*ItemDockerConflictsRequestBuilder) { + return NewItemDockerConflictsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_docker_request_builder.go b/pkg/github/orgs/item_docker_request_builder.go new file mode 100644 index 0000000..31f3791 --- /dev/null +++ b/pkg/github/orgs/item_docker_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDockerRequestBuilder builds and executes requests for operations under \orgs\{org}\docker +type ItemDockerRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Conflicts the conflicts property +// returns a *ItemDockerConflictsRequestBuilder when successful +func (m *ItemDockerRequestBuilder) Conflicts()(*ItemDockerConflictsRequestBuilder) { + return NewItemDockerConflictsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDockerRequestBuilderInternal instantiates a new ItemDockerRequestBuilder and sets the default values. +func NewItemDockerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerRequestBuilder) { + m := &ItemDockerRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/docker", pathParameters), + } + return m +} +// NewItemDockerRequestBuilder instantiates a new ItemDockerRequestBuilder and sets the default values. +func NewItemDockerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDockerRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_events_request_builder.go b/pkg/github/orgs/item_events_request_builder.go new file mode 100644 index 0000000..ef15cd8 --- /dev/null +++ b/pkg/github/orgs/item_events_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemEventsRequestBuilder builds and executes requests for operations under \orgs\{org}\events +type ItemEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemEventsRequestBuilderGetQueryParameters list public organization events +type ItemEventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemEventsRequestBuilderInternal instantiates a new ItemEventsRequestBuilder and sets the default values. +func NewItemEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsRequestBuilder) { + m := &ItemEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemEventsRequestBuilder instantiates a new ItemEventsRequestBuilder and sets the default values. +func NewItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list public organization events +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-public-organization-events +func (m *ItemEventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// returns a *RequestInformation when successful +func (m *ItemEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemEventsRequestBuilder when successful +func (m *ItemEventsRequestBuilder) WithUrl(rawUrl string)(*ItemEventsRequestBuilder) { + return NewItemEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_external_group_request_builder.go b/pkg/github/orgs/item_external_group_request_builder.go new file mode 100644 index 0000000..537fd69 --- /dev/null +++ b/pkg/github/orgs/item_external_group_request_builder.go @@ -0,0 +1,34 @@ +package orgs + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemExternalGroupRequestBuilder builds and executes requests for operations under \orgs\{org}\external-group +type ItemExternalGroupRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByGroup_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.externalGroup.item collection +// returns a *ItemExternalGroupWithGroup_ItemRequestBuilder when successful +func (m *ItemExternalGroupRequestBuilder) ByGroup_id(group_id int32)(*ItemExternalGroupWithGroup_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["group_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(group_id), 10) + return NewItemExternalGroupWithGroup_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemExternalGroupRequestBuilderInternal instantiates a new ItemExternalGroupRequestBuilder and sets the default values. +func NewItemExternalGroupRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemExternalGroupRequestBuilder) { + m := &ItemExternalGroupRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/external-group", pathParameters), + } + return m +} +// NewItemExternalGroupRequestBuilder instantiates a new ItemExternalGroupRequestBuilder and sets the default values. +func NewItemExternalGroupRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemExternalGroupRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemExternalGroupRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_external_group_with_group_item_request_builder.go b/pkg/github/orgs/item_external_group_with_group_item_request_builder.go new file mode 100644 index 0000000..94a82bf --- /dev/null +++ b/pkg/github/orgs/item_external_group_with_group_item_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemExternalGroupWithGroup_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\external-group\{group_id} +type ItemExternalGroupWithGroup_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemExternalGroupWithGroup_ItemRequestBuilderInternal instantiates a new ItemExternalGroupWithGroup_ItemRequestBuilder and sets the default values. +func NewItemExternalGroupWithGroup_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemExternalGroupWithGroup_ItemRequestBuilder) { + m := &ItemExternalGroupWithGroup_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/external-group/{group_id}", pathParameters), + } + return m +} +// NewItemExternalGroupWithGroup_ItemRequestBuilder instantiates a new ItemExternalGroupWithGroup_ItemRequestBuilder and sets the default values. +func NewItemExternalGroupWithGroup_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemExternalGroupWithGroup_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemExternalGroupWithGroup_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a ExternalGroupable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#get-an-external-group +func (m *ItemExternalGroupWithGroup_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateExternalGroupFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupable), nil +} +// ToGetRequestInformation displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemExternalGroupWithGroup_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemExternalGroupWithGroup_ItemRequestBuilder when successful +func (m *ItemExternalGroupWithGroup_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemExternalGroupWithGroup_ItemRequestBuilder) { + return NewItemExternalGroupWithGroup_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_external_groups_request_builder.go b/pkg/github/orgs/item_external_groups_request_builder.go new file mode 100644 index 0000000..9e28b0e --- /dev/null +++ b/pkg/github/orgs/item_external_groups_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemExternalGroupsRequestBuilder builds and executes requests for operations under \orgs\{org}\external-groups +type ItemExternalGroupsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemExternalGroupsRequestBuilderGetQueryParameters lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Cloud generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +type ItemExternalGroupsRequestBuilderGetQueryParameters struct { + // Limits the list to groups containing the text in the group name + Display_name *string `uriparametername:"display_name"` + // Page token + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemExternalGroupsRequestBuilderInternal instantiates a new ItemExternalGroupsRequestBuilder and sets the default values. +func NewItemExternalGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemExternalGroupsRequestBuilder) { + m := &ItemExternalGroupsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/external-groups{?display_name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemExternalGroupsRequestBuilder instantiates a new ItemExternalGroupsRequestBuilder and sets the default values. +func NewItemExternalGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemExternalGroupsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemExternalGroupsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Cloud generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a ExternalGroupsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#list-external-groups-in-an-organization +func (m *ItemExternalGroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemExternalGroupsRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateExternalGroupsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupsable), nil +} +// ToGetRequestInformation lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Cloud generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemExternalGroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemExternalGroupsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemExternalGroupsRequestBuilder when successful +func (m *ItemExternalGroupsRequestBuilder) WithUrl(rawUrl string)(*ItemExternalGroupsRequestBuilder) { + return NewItemExternalGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_failed_invitations_request_builder.go b/pkg/github/orgs/item_failed_invitations_request_builder.go new file mode 100644 index 0000000..61dce0b --- /dev/null +++ b/pkg/github/orgs/item_failed_invitations_request_builder.go @@ -0,0 +1,71 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemFailed_invitationsRequestBuilder builds and executes requests for operations under \orgs\{org}\failed_invitations +type ItemFailed_invitationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemFailed_invitationsRequestBuilderGetQueryParameters the return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +type ItemFailed_invitationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemFailed_invitationsRequestBuilderInternal instantiates a new ItemFailed_invitationsRequestBuilder and sets the default values. +func NewItemFailed_invitationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFailed_invitationsRequestBuilder) { + m := &ItemFailed_invitationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/failed_invitations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemFailed_invitationsRequestBuilder instantiates a new ItemFailed_invitationsRequestBuilder and sets the default values. +func NewItemFailed_invitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFailed_invitationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemFailed_invitationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +// returns a []OrganizationInvitationable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#list-failed-organization-invitations +func (m *ItemFailed_invitationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemFailed_invitationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationInvitationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable) + } + } + return val, nil +} +// ToGetRequestInformation the return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +// returns a *RequestInformation when successful +func (m *ItemFailed_invitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemFailed_invitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemFailed_invitationsRequestBuilder when successful +func (m *ItemFailed_invitationsRequestBuilder) WithUrl(rawUrl string)(*ItemFailed_invitationsRequestBuilder) { + return NewItemFailed_invitationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_fine_grained_permissions_request_builder.go b/pkg/github/orgs/item_fine_grained_permissions_request_builder.go new file mode 100644 index 0000000..484dcee --- /dev/null +++ b/pkg/github/orgs/item_fine_grained_permissions_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemFine_grained_permissionsRequestBuilder builds and executes requests for operations under \orgs\{org}\fine_grained_permissions +type ItemFine_grained_permissionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemFine_grained_permissionsRequestBuilderInternal instantiates a new ItemFine_grained_permissionsRequestBuilder and sets the default values. +func NewItemFine_grained_permissionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFine_grained_permissionsRequestBuilder) { + m := &ItemFine_grained_permissionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/fine_grained_permissions", pathParameters), + } + return m +} +// NewItemFine_grained_permissionsRequestBuilder instantiates a new ItemFine_grained_permissionsRequestBuilder and sets the default values. +func NewItemFine_grained_permissionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFine_grained_permissionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemFine_grained_permissionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[List fine-grained repository permissions](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-repository-fine-grained-permissions-for-an-organization)" endpoint instead.Lists the fine-grained permissions that can be used in custom repository roles for an organization. For more information, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."To use this endpoint the authenticated user must be an administrator of the organization or of a repository of the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Deprecated: +// returns a []RepositoryFineGrainedPermissionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#deprecated---list-fine-grained-permissions-for-an-organization +func (m *ItemFine_grained_permissionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryFineGrainedPermissionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFineGrainedPermissionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryFineGrainedPermissionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryFineGrainedPermissionable) + } + } + return val, nil +} +// ToGetRequestInformation **Note**: This operation is deprecated and will be removed after September 6th 2023.Use the "[List fine-grained repository permissions](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-repository-fine-grained-permissions-for-an-organization)" endpoint instead.Lists the fine-grained permissions that can be used in custom repository roles for an organization. For more information, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."To use this endpoint the authenticated user must be an administrator of the organization or of a repository of the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemFine_grained_permissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemFine_grained_permissionsRequestBuilder when successful +func (m *ItemFine_grained_permissionsRequestBuilder) WithUrl(rawUrl string)(*ItemFine_grained_permissionsRequestBuilder) { + return NewItemFine_grained_permissionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_item_config_patch_request_body.go b/pkg/github/orgs/item_hooks_item_config_patch_request_body.go new file mode 100644 index 0000000..26a03d3 --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_config_patch_request_body.go @@ -0,0 +1,168 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemHooksItemConfigPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string +} +// NewItemHooksItemConfigPatchRequestBody instantiates a new ItemHooksItemConfigPatchRequestBody and sets the default values. +func NewItemHooksItemConfigPatchRequestBody()(*ItemHooksItemConfigPatchRequestBody) { + m := &ItemHooksItemConfigPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemHooksItemConfigPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHooksItemConfigPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemHooksItemConfigPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemHooksItemConfigPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *ItemHooksItemConfigPatchRequestBody) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHooksItemConfigPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *ItemHooksItemConfigPatchRequestBody) GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *ItemHooksItemConfigPatchRequestBody) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *ItemHooksItemConfigPatchRequestBody) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ItemHooksItemConfigPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemHooksItemConfigPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *ItemHooksItemConfigPatchRequestBody) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *ItemHooksItemConfigPatchRequestBody) SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *ItemHooksItemConfigPatchRequestBody) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *ItemHooksItemConfigPatchRequestBody) SetUrl(value *string)() { + m.url = value +} +type ItemHooksItemConfigPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/orgs/item_hooks_item_config_request_builder.go b/pkg/github/orgs/item_hooks_item_config_request_builder.go new file mode 100644 index 0000000..7f65f71 --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_config_request_builder.go @@ -0,0 +1,88 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksItemConfigRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\config +type ItemHooksItemConfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemHooksItemConfigRequestBuilderInternal instantiates a new ItemHooksItemConfigRequestBuilder and sets the default values. +func NewItemHooksItemConfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemConfigRequestBuilder) { + m := &ItemHooksItemConfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/config", pathParameters), + } + return m +} +// NewItemHooksItemConfigRequestBuilder instantiates a new ItemHooksItemConfigRequestBuilder and sets the default values. +func NewItemHooksItemConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemConfigRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksItemConfigRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a WebhookConfigable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization +func (m *ItemHooksItemConfigRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable), nil +} +// Patch you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a WebhookConfigable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization +func (m *ItemHooksItemConfigRequestBuilder) Patch(ctx context.Context, body ItemHooksItemConfigPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable), nil +} +// ToGetRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksItemConfigRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksItemConfigRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemHooksItemConfigPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksItemConfigRequestBuilder when successful +func (m *ItemHooksItemConfigRequestBuilder) WithUrl(rawUrl string)(*ItemHooksItemConfigRequestBuilder) { + return NewItemHooksItemConfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_item_deliveries_item_attempts_post_response.go b/pkg/github/orgs/item_hooks_item_deliveries_item_attempts_post_response.go new file mode 100644 index 0000000..f828297 --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_deliveries_item_attempts_post_response.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemHooksItemDeliveriesItemAttemptsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemHooksItemDeliveriesItemAttemptsPostResponse instantiates a new ItemHooksItemDeliveriesItemAttemptsPostResponse and sets the default values. +func NewItemHooksItemDeliveriesItemAttemptsPostResponse()(*ItemHooksItemDeliveriesItemAttemptsPostResponse) { + m := &ItemHooksItemDeliveriesItemAttemptsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemHooksItemDeliveriesItemAttemptsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHooksItemDeliveriesItemAttemptsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemHooksItemDeliveriesItemAttemptsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemHooksItemDeliveriesItemAttemptsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHooksItemDeliveriesItemAttemptsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemHooksItemDeliveriesItemAttemptsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemHooksItemDeliveriesItemAttemptsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemHooksItemDeliveriesItemAttemptsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_hooks_item_deliveries_item_attempts_request_builder.go b/pkg/github/orgs/item_hooks_item_deliveries_item_attempts_request_builder.go new file mode 100644 index 0000000..72f761f --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_deliveries_item_attempts_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksItemDeliveriesItemAttemptsRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\deliveries\{delivery_id}\attempts +type ItemHooksItemDeliveriesItemAttemptsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal instantiates a new ItemHooksItemDeliveriesItemAttemptsRequestBuilder and sets the default values. +func NewItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + m := &ItemHooksItemDeliveriesItemAttemptsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", pathParameters), + } + return m +} +// NewItemHooksItemDeliveriesItemAttemptsRequestBuilder instantiates a new ItemHooksItemDeliveriesItemAttemptsRequestBuilder and sets the default values. +func NewItemHooksItemDeliveriesItemAttemptsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a ItemHooksItemDeliveriesItemAttemptsPostResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#redeliver-a-delivery-for-an-organization-webhook +func (m *ItemHooksItemDeliveriesItemAttemptsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemHooksItemDeliveriesItemAttemptsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemHooksItemDeliveriesItemAttemptsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemHooksItemDeliveriesItemAttemptsPostResponseable), nil +} +// ToPostRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksItemDeliveriesItemAttemptsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksItemDeliveriesItemAttemptsRequestBuilder when successful +func (m *ItemHooksItemDeliveriesItemAttemptsRequestBuilder) WithUrl(rawUrl string)(*ItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + return NewItemHooksItemDeliveriesItemAttemptsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go b/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go new file mode 100644 index 0000000..899d68c --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go @@ -0,0 +1,85 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksItemDeliveriesRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\deliveries +type ItemHooksItemDeliveriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemHooksItemDeliveriesRequestBuilderGetQueryParameters you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +type ItemHooksItemDeliveriesRequestBuilderGetQueryParameters struct { + // Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. + Cursor *string `uriparametername:"cursor"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + Redelivery *bool `uriparametername:"redelivery"` +} +// ByDelivery_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.hooks.item.deliveries.item collection +// returns a *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder when successful +func (m *ItemHooksItemDeliveriesRequestBuilder) ByDelivery_id(delivery_id int32)(*ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["delivery_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(delivery_id), 10) + return NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemHooksItemDeliveriesRequestBuilderInternal instantiates a new ItemHooksItemDeliveriesRequestBuilder and sets the default values. +func NewItemHooksItemDeliveriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesRequestBuilder) { + m := &ItemHooksItemDeliveriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries{?cursor*,per_page*,redelivery*}", pathParameters), + } + return m +} +// NewItemHooksItemDeliveriesRequestBuilder instantiates a new ItemHooksItemDeliveriesRequestBuilder and sets the default values. +func NewItemHooksItemDeliveriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksItemDeliveriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a []HookDeliveryItemable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#list-deliveries-for-an-organization-webhook +func (m *ItemHooksItemDeliveriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHooksItemDeliveriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookDeliveryItemFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable) + } + } + return val, nil +} +// ToGetRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksItemDeliveriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHooksItemDeliveriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksItemDeliveriesRequestBuilder when successful +func (m *ItemHooksItemDeliveriesRequestBuilder) WithUrl(rawUrl string)(*ItemHooksItemDeliveriesRequestBuilder) { + return NewItemHooksItemDeliveriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_item_deliveries_with_delivery_item_request_builder.go b/pkg/github/orgs/item_hooks_item_deliveries_with_delivery_item_request_builder.go new file mode 100644 index 0000000..1e6f17a --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_deliveries_with_delivery_item_request_builder.go @@ -0,0 +1,68 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\deliveries\{delivery_id} +type ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Attempts the attempts property +// returns a *ItemHooksItemDeliveriesItemAttemptsRequestBuilder when successful +func (m *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) Attempts()(*ItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + return NewItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal instantiates a new ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder and sets the default values. +func NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + m := &ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", pathParameters), + } + return m +} +// NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder instantiates a new ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder and sets the default values. +func NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a HookDeliveryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#get-a-webhook-delivery-for-an-organization-webhook +func (m *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookDeliveryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryable), nil +} +// ToGetRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder when successful +func (m *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + return NewItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_item_pings_request_builder.go b/pkg/github/orgs/item_hooks_item_pings_request_builder.go new file mode 100644 index 0000000..ff4306b --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_pings_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksItemPingsRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\pings +type ItemHooksItemPingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemHooksItemPingsRequestBuilderInternal instantiates a new ItemHooksItemPingsRequestBuilder and sets the default values. +func NewItemHooksItemPingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemPingsRequestBuilder) { + m := &ItemHooksItemPingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/pings", pathParameters), + } + return m +} +// NewItemHooksItemPingsRequestBuilder instantiates a new ItemHooksItemPingsRequestBuilder and sets the default values. +func NewItemHooksItemPingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemPingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksItemPingsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#ping-an-organization-webhook +func (m *ItemHooksItemPingsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksItemPingsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksItemPingsRequestBuilder when successful +func (m *ItemHooksItemPingsRequestBuilder) WithUrl(rawUrl string)(*ItemHooksItemPingsRequestBuilder) { + return NewItemHooksItemPingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_item_with_hook_patch_request_body.go b/pkg/github/orgs/item_hooks_item_with_hook_patch_request_body.go new file mode 100644 index 0000000..9ef2466 --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_with_hook_patch_request_body.go @@ -0,0 +1,173 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemHooksItemWithHook_PatchRequestBody struct { + // Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Key/value pairs to provide settings for this webhook. + config ItemHooksItemWithHook_PatchRequestBody_configable + // Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. + events []string + // The name property + name *string +} +// NewItemHooksItemWithHook_PatchRequestBody instantiates a new ItemHooksItemWithHook_PatchRequestBody and sets the default values. +func NewItemHooksItemWithHook_PatchRequestBody()(*ItemHooksItemWithHook_PatchRequestBody) { + m := &ItemHooksItemWithHook_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemHooksItemWithHook_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHooksItemWithHook_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemHooksItemWithHook_PatchRequestBody(), nil +} +// GetActive gets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +// returns a *bool when successful +func (m *ItemHooksItemWithHook_PatchRequestBody) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemHooksItemWithHook_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfig gets the config property value. Key/value pairs to provide settings for this webhook. +// returns a ItemHooksItemWithHook_PatchRequestBody_configable when successful +func (m *ItemHooksItemWithHook_PatchRequestBody) GetConfig()(ItemHooksItemWithHook_PatchRequestBody_configable) { + return m.config +} +// GetEvents gets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. +// returns a []string when successful +func (m *ItemHooksItemWithHook_PatchRequestBody) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHooksItemWithHook_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemHooksItemWithHook_PatchRequestBody_configFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfig(val.(ItemHooksItemWithHook_PatchRequestBody_configable)) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ItemHooksItemWithHook_PatchRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemHooksItemWithHook_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("config", m.GetConfig()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +func (m *ItemHooksItemWithHook_PatchRequestBody) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemHooksItemWithHook_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfig sets the config property value. Key/value pairs to provide settings for this webhook. +func (m *ItemHooksItemWithHook_PatchRequestBody) SetConfig(value ItemHooksItemWithHook_PatchRequestBody_configable)() { + m.config = value +} +// SetEvents sets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. +func (m *ItemHooksItemWithHook_PatchRequestBody) SetEvents(value []string)() { + m.events = value +} +// SetName sets the name property value. The name property +func (m *ItemHooksItemWithHook_PatchRequestBody) SetName(value *string)() { + m.name = value +} +type ItemHooksItemWithHook_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetConfig()(ItemHooksItemWithHook_PatchRequestBody_configable) + GetEvents()([]string) + GetName()(*string) + SetActive(value *bool)() + SetConfig(value ItemHooksItemWithHook_PatchRequestBody_configable)() + SetEvents(value []string)() + SetName(value *string)() +} diff --git a/pkg/github/orgs/item_hooks_item_with_hook_patch_request_body_config.go b/pkg/github/orgs/item_hooks_item_with_hook_patch_request_body_config.go new file mode 100644 index 0000000..a82bd83 --- /dev/null +++ b/pkg/github/orgs/item_hooks_item_with_hook_patch_request_body_config.go @@ -0,0 +1,169 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksItemWithHook_PatchRequestBody_config key/value pairs to provide settings for this webhook. +type ItemHooksItemWithHook_PatchRequestBody_config struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string +} +// NewItemHooksItemWithHook_PatchRequestBody_config instantiates a new ItemHooksItemWithHook_PatchRequestBody_config and sets the default values. +func NewItemHooksItemWithHook_PatchRequestBody_config()(*ItemHooksItemWithHook_PatchRequestBody_config) { + m := &ItemHooksItemWithHook_PatchRequestBody_config{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemHooksItemWithHook_PatchRequestBody_configFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHooksItemWithHook_PatchRequestBody_configFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemHooksItemWithHook_PatchRequestBody_config(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemHooksItemWithHook_PatchRequestBody_config) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *ItemHooksItemWithHook_PatchRequestBody_config) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHooksItemWithHook_PatchRequestBody_config) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *ItemHooksItemWithHook_PatchRequestBody_config) GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *ItemHooksItemWithHook_PatchRequestBody_config) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *ItemHooksItemWithHook_PatchRequestBody_config) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ItemHooksItemWithHook_PatchRequestBody_config) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemHooksItemWithHook_PatchRequestBody_config) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *ItemHooksItemWithHook_PatchRequestBody_config) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *ItemHooksItemWithHook_PatchRequestBody_config) SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *ItemHooksItemWithHook_PatchRequestBody_config) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *ItemHooksItemWithHook_PatchRequestBody_config) SetUrl(value *string)() { + m.url = value +} +type ItemHooksItemWithHook_PatchRequestBody_configable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/orgs/item_hooks_post_request_body.go b/pkg/github/orgs/item_hooks_post_request_body.go new file mode 100644 index 0000000..ca6fa8a --- /dev/null +++ b/pkg/github/orgs/item_hooks_post_request_body.go @@ -0,0 +1,173 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemHooksPostRequestBody struct { + // Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Key/value pairs to provide settings for this webhook. + config ItemHooksPostRequestBody_configable + // Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + events []string + // Must be passed as "web". + name *string +} +// NewItemHooksPostRequestBody instantiates a new ItemHooksPostRequestBody and sets the default values. +func NewItemHooksPostRequestBody()(*ItemHooksPostRequestBody) { + m := &ItemHooksPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemHooksPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHooksPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemHooksPostRequestBody(), nil +} +// GetActive gets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +// returns a *bool when successful +func (m *ItemHooksPostRequestBody) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemHooksPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfig gets the config property value. Key/value pairs to provide settings for this webhook. +// returns a ItemHooksPostRequestBody_configable when successful +func (m *ItemHooksPostRequestBody) GetConfig()(ItemHooksPostRequestBody_configable) { + return m.config +} +// GetEvents gets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. +// returns a []string when successful +func (m *ItemHooksPostRequestBody) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHooksPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemHooksPostRequestBody_configFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfig(val.(ItemHooksPostRequestBody_configable)) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Must be passed as "web". +// returns a *string when successful +func (m *ItemHooksPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemHooksPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("config", m.GetConfig()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +func (m *ItemHooksPostRequestBody) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemHooksPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfig sets the config property value. Key/value pairs to provide settings for this webhook. +func (m *ItemHooksPostRequestBody) SetConfig(value ItemHooksPostRequestBody_configable)() { + m.config = value +} +// SetEvents sets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. +func (m *ItemHooksPostRequestBody) SetEvents(value []string)() { + m.events = value +} +// SetName sets the name property value. Must be passed as "web". +func (m *ItemHooksPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemHooksPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetConfig()(ItemHooksPostRequestBody_configable) + GetEvents()([]string) + GetName()(*string) + SetActive(value *bool)() + SetConfig(value ItemHooksPostRequestBody_configable)() + SetEvents(value []string)() + SetName(value *string)() +} diff --git a/pkg/github/orgs/item_hooks_post_request_body_config.go b/pkg/github/orgs/item_hooks_post_request_body_config.go new file mode 100644 index 0000000..fd39551 --- /dev/null +++ b/pkg/github/orgs/item_hooks_post_request_body_config.go @@ -0,0 +1,227 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksPostRequestBody_config key/value pairs to provide settings for this webhook. +type ItemHooksPostRequestBody_config struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable + // The password property + password *string + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string + // The username property + username *string +} +// NewItemHooksPostRequestBody_config instantiates a new ItemHooksPostRequestBody_config and sets the default values. +func NewItemHooksPostRequestBody_config()(*ItemHooksPostRequestBody_config) { + m := &ItemHooksPostRequestBody_config{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemHooksPostRequestBody_configFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemHooksPostRequestBody_configFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemHooksPostRequestBody_config(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemHooksPostRequestBody_config) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *ItemHooksPostRequestBody_config) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemHooksPostRequestBody_config) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)) + } + return nil + } + res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPassword(val) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsername(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *ItemHooksPostRequestBody_config) GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetPassword gets the password property value. The password property +// returns a *string when successful +func (m *ItemHooksPostRequestBody_config) GetPassword()(*string) { + return m.password +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *ItemHooksPostRequestBody_config) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *ItemHooksPostRequestBody_config) GetUrl()(*string) { + return m.url +} +// GetUsername gets the username property value. The username property +// returns a *string when successful +func (m *ItemHooksPostRequestBody_config) GetUsername()(*string) { + return m.username +} +// Serialize serializes information the current object +func (m *ItemHooksPostRequestBody_config) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("password", m.GetPassword()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("username", m.GetUsername()) + 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 *ItemHooksPostRequestBody_config) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *ItemHooksPostRequestBody_config) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *ItemHooksPostRequestBody_config) SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetPassword sets the password property value. The password property +func (m *ItemHooksPostRequestBody_config) SetPassword(value *string)() { + m.password = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *ItemHooksPostRequestBody_config) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *ItemHooksPostRequestBody_config) SetUrl(value *string)() { + m.url = value +} +// SetUsername sets the username property value. The username property +func (m *ItemHooksPostRequestBody_config) SetUsername(value *string)() { + m.username = value +} +type ItemHooksPostRequestBody_configable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) + GetPassword()(*string) + GetSecret()(*string) + GetUrl()(*string) + GetUsername()(*string) + SetContentType(value *string)() + SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() + SetPassword(value *string)() + SetSecret(value *string)() + SetUrl(value *string)() + SetUsername(value *string)() +} diff --git a/pkg/github/orgs/item_hooks_request_builder.go b/pkg/github/orgs/item_hooks_request_builder.go new file mode 100644 index 0000000..c69fec5 --- /dev/null +++ b/pkg/github/orgs/item_hooks_request_builder.go @@ -0,0 +1,119 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks +type ItemHooksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemHooksRequestBuilderGetQueryParameters you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +type ItemHooksRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByHook_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.hooks.item collection +// returns a *ItemHooksWithHook_ItemRequestBuilder when successful +func (m *ItemHooksRequestBuilder) ByHook_id(hook_id int32)(*ItemHooksWithHook_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["hook_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(hook_id), 10) + return NewItemHooksWithHook_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemHooksRequestBuilderInternal instantiates a new ItemHooksRequestBuilder and sets the default values. +func NewItemHooksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksRequestBuilder) { + m := &ItemHooksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemHooksRequestBuilder instantiates a new ItemHooksRequestBuilder and sets the default values. +func NewItemHooksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a []OrgHookable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#list-organization-webhooks +func (m *ItemHooksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHooksRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable) + } + } + return val, nil +} +// Post you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a OrgHookable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#create-an-organization-webhook +func (m *ItemHooksRequestBuilder) Post(ctx context.Context, body ItemHooksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable), nil +} +// ToGetRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHooksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemHooksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksRequestBuilder when successful +func (m *ItemHooksRequestBuilder) WithUrl(rawUrl string)(*ItemHooksRequestBuilder) { + return NewItemHooksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_hooks_with_hook_item_request_builder.go b/pkg/github/orgs/item_hooks_with_hook_item_request_builder.go new file mode 100644 index 0000000..0b65114 --- /dev/null +++ b/pkg/github/orgs/item_hooks_with_hook_item_request_builder.go @@ -0,0 +1,140 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemHooksWithHook_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\hooks\{hook_id} +type ItemHooksWithHook_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Config the config property +// returns a *ItemHooksItemConfigRequestBuilder when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) Config()(*ItemHooksItemConfigRequestBuilder) { + return NewItemHooksItemConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemHooksWithHook_ItemRequestBuilderInternal instantiates a new ItemHooksWithHook_ItemRequestBuilder and sets the default values. +func NewItemHooksWithHook_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksWithHook_ItemRequestBuilder) { + m := &ItemHooksWithHook_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}", pathParameters), + } + return m +} +// NewItemHooksWithHook_ItemRequestBuilder instantiates a new ItemHooksWithHook_ItemRequestBuilder and sets the default values. +func NewItemHooksWithHook_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksWithHook_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHooksWithHook_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#delete-an-organization-webhook +func (m *ItemHooksWithHook_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Deliveries the deliveries property +// returns a *ItemHooksItemDeliveriesRequestBuilder when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) Deliveries()(*ItemHooksItemDeliveriesRequestBuilder) { + return NewItemHooksItemDeliveriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a OrgHookable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#get-an-organization-webhook +func (m *ItemHooksWithHook_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable), nil +} +// Patch you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a OrgHookable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/webhooks#update-an-organization-webhook +func (m *ItemHooksWithHook_ItemRequestBuilder) Patch(ctx context.Context, body ItemHooksItemWithHook_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgHookable), nil +} +// Pings the pings property +// returns a *ItemHooksItemPingsRequestBuilder when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) Pings()(*ItemHooksItemPingsRequestBuilder) { + return NewItemHooksItemPingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation you must be an organization owner or have the "Manage organization webhooks" permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooksthat they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// returns a *RequestInformation when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemHooksItemWithHook_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHooksWithHook_ItemRequestBuilder when successful +func (m *ItemHooksWithHook_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemHooksWithHook_ItemRequestBuilder) { + return NewItemHooksWithHook_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_installation_request_builder.go b/pkg/github/orgs/item_installation_request_builder.go new file mode 100644 index 0000000..21e27e2 --- /dev/null +++ b/pkg/github/orgs/item_installation_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemInstallationRequestBuilder builds and executes requests for operations under \orgs\{org}\installation +type ItemInstallationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemInstallationRequestBuilderInternal instantiates a new ItemInstallationRequestBuilder and sets the default values. +func NewItemInstallationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInstallationRequestBuilder) { + m := &ItemInstallationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/installation", pathParameters), + } + return m +} +// NewItemInstallationRequestBuilder instantiates a new ItemInstallationRequestBuilder and sets the default values. +func NewItemInstallationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInstallationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInstallationRequestBuilderInternal(urlParams, requestAdapter) +} +// Get enables an authenticated GitHub App to find the organization's installation information.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a Installationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-organization-installation-for-the-authenticated-app +func (m *ItemInstallationRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable), nil +} +// ToGetRequestInformation enables an authenticated GitHub App to find the organization's installation information.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *ItemInstallationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInstallationRequestBuilder when successful +func (m *ItemInstallationRequestBuilder) WithUrl(rawUrl string)(*ItemInstallationRequestBuilder) { + return NewItemInstallationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_installations_get_response.go b/pkg/github/orgs/item_installations_get_response.go new file mode 100644 index 0000000..27042ee --- /dev/null +++ b/pkg/github/orgs/item_installations_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemInstallationsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The installations property + installations []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable + // The total_count property + total_count *int32 +} +// NewItemInstallationsGetResponse instantiates a new ItemInstallationsGetResponse and sets the default values. +func NewItemInstallationsGetResponse()(*ItemInstallationsGetResponse) { + m := &ItemInstallationsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemInstallationsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemInstallationsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemInstallationsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemInstallationsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemInstallationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["installations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) + } + } + m.SetInstallations(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetInstallations gets the installations property value. The installations property +// returns a []Installationable when successful +func (m *ItemInstallationsGetResponse) GetInstallations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) { + return m.installations +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemInstallationsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemInstallationsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInstallations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstallations())) + for i, v := range m.GetInstallations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("installations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemInstallationsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetInstallations sets the installations property value. The installations property +func (m *ItemInstallationsGetResponse) SetInstallations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable)() { + m.installations = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemInstallationsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemInstallationsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInstallations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) + GetTotalCount()(*int32) + SetInstallations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_installations_request_builder.go b/pkg/github/orgs/item_installations_request_builder.go new file mode 100644 index 0000000..52b0f33 --- /dev/null +++ b/pkg/github/orgs/item_installations_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInstallationsRequestBuilder builds and executes requests for operations under \orgs\{org}\installations +type ItemInstallationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInstallationsRequestBuilderGetQueryParameters lists all GitHub Apps in an organization. The installation count includesall GitHub Apps installed on repositories in the organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:read` scope to use this endpoint. +type ItemInstallationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemInstallationsRequestBuilderInternal instantiates a new ItemInstallationsRequestBuilder and sets the default values. +func NewItemInstallationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInstallationsRequestBuilder) { + m := &ItemInstallationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/installations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemInstallationsRequestBuilder instantiates a new ItemInstallationsRequestBuilder and sets the default values. +func NewItemInstallationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInstallationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInstallationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all GitHub Apps in an organization. The installation count includesall GitHub Apps installed on repositories in the organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:read` scope to use this endpoint. +// returns a ItemInstallationsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-app-installations-for-an-organization +func (m *ItemInstallationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInstallationsRequestBuilderGetQueryParameters])(ItemInstallationsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemInstallationsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemInstallationsGetResponseable), nil +} +// ToGetRequestInformation lists all GitHub Apps in an organization. The installation count includesall GitHub Apps installed on repositories in the organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:read` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemInstallationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInstallationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInstallationsRequestBuilder when successful +func (m *ItemInstallationsRequestBuilder) WithUrl(rawUrl string)(*ItemInstallationsRequestBuilder) { + return NewItemInstallationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_interaction_limits_request_builder.go b/pkg/github/orgs/item_interaction_limits_request_builder.go new file mode 100644 index 0000000..560a8d2 --- /dev/null +++ b/pkg/github/orgs/item_interaction_limits_request_builder.go @@ -0,0 +1,114 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemInteractionLimitsRequestBuilder builds and executes requests for operations under \orgs\{org}\interaction-limits +type ItemInteractionLimitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemInteractionLimitsRequestBuilderInternal instantiates a new ItemInteractionLimitsRequestBuilder and sets the default values. +func NewItemInteractionLimitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInteractionLimitsRequestBuilder) { + m := &ItemInteractionLimitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/interaction-limits", pathParameters), + } + return m +} +// NewItemInteractionLimitsRequestBuilder instantiates a new ItemInteractionLimitsRequestBuilder and sets the default values. +func NewItemInteractionLimitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInteractionLimitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInteractionLimitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/orgs#remove-interaction-restrictions-for-an-organization +func (m *ItemInteractionLimitsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. +// returns a InteractionLimitResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/orgs#get-interaction-restrictions-for-an-organization +func (m *ItemInteractionLimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInteractionLimitResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable), nil +} +// Put temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. +// returns a InteractionLimitResponseable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/orgs#set-interaction-restrictions-for-an-organization +func (m *ItemInteractionLimitsRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInteractionLimitResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable), nil +} +// ToDeleteRequestInformation removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. +// returns a *RequestInformation when successful +func (m *ItemInteractionLimitsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. +// returns a *RequestInformation when successful +func (m *ItemInteractionLimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. +// returns a *RequestInformation when successful +func (m *ItemInteractionLimitsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInteractionLimitsRequestBuilder when successful +func (m *ItemInteractionLimitsRequestBuilder) WithUrl(rawUrl string)(*ItemInteractionLimitsRequestBuilder) { + return NewItemInteractionLimitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_invitations_item_teams_request_builder.go b/pkg/github/orgs/item_invitations_item_teams_request_builder.go new file mode 100644 index 0000000..bdf75b0 --- /dev/null +++ b/pkg/github/orgs/item_invitations_item_teams_request_builder.go @@ -0,0 +1,71 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemInvitationsItemTeamsRequestBuilder builds and executes requests for operations under \orgs\{org}\invitations\{invitation_id}\teams +type ItemInvitationsItemTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInvitationsItemTeamsRequestBuilderGetQueryParameters list all teams associated with an invitation. In order to see invitationsin an organization, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +type ItemInvitationsItemTeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemInvitationsItemTeamsRequestBuilderInternal instantiates a new ItemInvitationsItemTeamsRequestBuilder and sets the default values. +func NewItemInvitationsItemTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsItemTeamsRequestBuilder) { + m := &ItemInvitationsItemTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/invitations/{invitation_id}/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemInvitationsItemTeamsRequestBuilder instantiates a new ItemInvitationsItemTeamsRequestBuilder and sets the default values. +func NewItemInvitationsItemTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsItemTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInvitationsItemTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all teams associated with an invitation. In order to see invitationsin an organization, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +// returns a []Teamable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#list-organization-invitation-teams +func (m *ItemInvitationsItemTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsItemTeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// ToGetRequestInformation list all teams associated with an invitation. In order to see invitationsin an organization, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +// returns a *RequestInformation when successful +func (m *ItemInvitationsItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsItemTeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInvitationsItemTeamsRequestBuilder when successful +func (m *ItemInvitationsItemTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemInvitationsItemTeamsRequestBuilder) { + return NewItemInvitationsItemTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_invitations_post_request_body.go b/pkg/github/orgs/item_invitations_post_request_body.go new file mode 100644 index 0000000..651d2d3 --- /dev/null +++ b/pkg/github/orgs/item_invitations_post_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemInvitationsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + email *string + // **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + invitee_id *int32 + // Specify IDs for the teams you want to invite new members to. + team_ids []int32 +} +// NewItemInvitationsPostRequestBody instantiates a new ItemInvitationsPostRequestBody and sets the default values. +func NewItemInvitationsPostRequestBody()(*ItemInvitationsPostRequestBody) { + m := &ItemInvitationsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemInvitationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemInvitationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemInvitationsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemInvitationsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. +// returns a *string when successful +func (m *ItemInvitationsPostRequestBody) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemInvitationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["invitee_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInviteeId(val) + } + return nil + } + res["team_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetTeamIds(res) + } + return nil + } + return res +} +// GetInviteeId gets the invitee_id property value. **Required unless you provide `email`**. GitHub user ID for the person you are inviting. +// returns a *int32 when successful +func (m *ItemInvitationsPostRequestBody) GetInviteeId()(*int32) { + return m.invitee_id +} +// GetTeamIds gets the team_ids property value. Specify IDs for the teams you want to invite new members to. +// returns a []int32 when successful +func (m *ItemInvitationsPostRequestBody) GetTeamIds()([]int32) { + return m.team_ids +} +// Serialize serializes information the current object +func (m *ItemInvitationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("invitee_id", m.GetInviteeId()) + if err != nil { + return err + } + } + if m.GetTeamIds() != nil { + err := writer.WriteCollectionOfInt32Values("team_ids", m.GetTeamIds()) + 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 *ItemInvitationsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. +func (m *ItemInvitationsPostRequestBody) SetEmail(value *string)() { + m.email = value +} +// SetInviteeId sets the invitee_id property value. **Required unless you provide `email`**. GitHub user ID for the person you are inviting. +func (m *ItemInvitationsPostRequestBody) SetInviteeId(value *int32)() { + m.invitee_id = value +} +// SetTeamIds sets the team_ids property value. Specify IDs for the teams you want to invite new members to. +func (m *ItemInvitationsPostRequestBody) SetTeamIds(value []int32)() { + m.team_ids = value +} +type ItemInvitationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetInviteeId()(*int32) + GetTeamIds()([]int32) + SetEmail(value *string)() + SetInviteeId(value *int32)() + SetTeamIds(value []int32)() +} diff --git a/pkg/github/orgs/item_invitations_request_builder.go b/pkg/github/orgs/item_invitations_request_builder.go new file mode 100644 index 0000000..6141f06 --- /dev/null +++ b/pkg/github/orgs/item_invitations_request_builder.go @@ -0,0 +1,124 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ic7d24c008599ade743bab0256a8564441292f08ec26aded30ea259bed2372d9f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/invitations" +) + +// ItemInvitationsRequestBuilder builds and executes requests for operations under \orgs\{org}\invitations +type ItemInvitationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInvitationsRequestBuilderGetQueryParameters the return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHub Enterprise Cloudmember, the `login` field in the return hash will be `null`.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +type ItemInvitationsRequestBuilderGetQueryParameters struct { + // Filter invitations by their invitation source. + Invitation_source *ic7d24c008599ade743bab0256a8564441292f08ec26aded30ea259bed2372d9f.GetInvitation_sourceQueryParameterType `uriparametername:"invitation_source"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Filter invitations by their member role. + Role *ic7d24c008599ade743bab0256a8564441292f08ec26aded30ea259bed2372d9f.GetRoleQueryParameterType `uriparametername:"role"` +} +// ByInvitation_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.invitations.item collection +// returns a *ItemInvitationsWithInvitation_ItemRequestBuilder when successful +func (m *ItemInvitationsRequestBuilder) ByInvitation_id(invitation_id int32)(*ItemInvitationsWithInvitation_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["invitation_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(invitation_id), 10) + return NewItemInvitationsWithInvitation_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInvitationsRequestBuilderInternal instantiates a new ItemInvitationsRequestBuilder and sets the default values. +func NewItemInvitationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsRequestBuilder) { + m := &ItemInvitationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/invitations{?invitation_source*,page*,per_page*,role*}", pathParameters), + } + return m +} +// NewItemInvitationsRequestBuilder instantiates a new ItemInvitationsRequestBuilder and sets the default values. +func NewItemInvitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInvitationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHub Enterprise Cloudmember, the `login` field in the return hash will be `null`.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +// returns a []OrganizationInvitationable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#list-pending-organization-invitations +func (m *ItemInvitationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationInvitationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable) + } + } + return val, nil +} +// Post invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users).This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. +// returns a OrganizationInvitationable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#create-an-organization-invitation +func (m *ItemInvitationsRequestBuilder) Post(ctx context.Context, body ItemInvitationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationInvitationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable), nil +} +// ToGetRequestInformation the return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHub Enterprise Cloudmember, the `login` field in the return hash will be `null`.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users). +// returns a *RequestInformation when successful +func (m *ItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users).This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. +// returns a *RequestInformation when successful +func (m *ItemInvitationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemInvitationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInvitationsRequestBuilder when successful +func (m *ItemInvitationsRequestBuilder) WithUrl(rawUrl string)(*ItemInvitationsRequestBuilder) { + return NewItemInvitationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_invitations_with_invitation_item_request_builder.go b/pkg/github/orgs/item_invitations_with_invitation_item_request_builder.go new file mode 100644 index 0000000..57a6523 --- /dev/null +++ b/pkg/github/orgs/item_invitations_with_invitation_item_request_builder.go @@ -0,0 +1,64 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemInvitationsWithInvitation_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\invitations\{invitation_id} +type ItemInvitationsWithInvitation_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemInvitationsWithInvitation_ItemRequestBuilderInternal instantiates a new ItemInvitationsWithInvitation_ItemRequestBuilder and sets the default values. +func NewItemInvitationsWithInvitation_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsWithInvitation_ItemRequestBuilder) { + m := &ItemInvitationsWithInvitation_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/invitations/{invitation_id}", pathParameters), + } + return m +} +// NewItemInvitationsWithInvitation_ItemRequestBuilder instantiates a new ItemInvitationsWithInvitation_ItemRequestBuilder and sets the default values. +func NewItemInvitationsWithInvitation_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsWithInvitation_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInvitationsWithInvitation_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users).This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#cancel-an-organization-invitation +func (m *ItemInvitationsWithInvitation_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Teams the teams property +// returns a *ItemInvitationsItemTeamsRequestBuilder when successful +func (m *ItemInvitationsWithInvitation_ItemRequestBuilder) Teams()(*ItemInvitationsItemTeamsRequestBuilder) { + return NewItemInvitationsItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.This endpoint is not available for [Enterprise Managed User (EMU) organizations](https://docs.github.com/enterprise-cloud@latest//admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users).This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). +// returns a *RequestInformation when successful +func (m *ItemInvitationsWithInvitation_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInvitationsWithInvitation_ItemRequestBuilder when successful +func (m *ItemInvitationsWithInvitation_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInvitationsWithInvitation_ItemRequestBuilder) { + return NewItemInvitationsWithInvitation_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_issues_request_builder.go b/pkg/github/orgs/item_issues_request_builder.go new file mode 100644 index 0000000..bb7ae21 --- /dev/null +++ b/pkg/github/orgs/item_issues_request_builder.go @@ -0,0 +1,85 @@ +package orgs + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i4b632d486fbe62949e9fe64d9f8d7ea30f02d1fcac50947bdea7d6a93016b14d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/issues" +) + +// ItemIssuesRequestBuilder builds and executes requests for operations under \orgs\{org}\issues +type ItemIssuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemIssuesRequestBuilderGetQueryParameters list issues in an organization assigned to the authenticated user.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemIssuesRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i4b632d486fbe62949e9fe64d9f8d7ea30f02d1fcac50947bdea7d6a93016b14d.GetDirectionQueryParameterType `uriparametername:"direction"` + // Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. + Filter *i4b632d486fbe62949e9fe64d9f8d7ea30f02d1fcac50947bdea7d6a93016b14d.GetFilterQueryParameterType `uriparametername:"filter"` + // A list of comma separated label names. Example: `bug,ui,@high` + Labels *string `uriparametername:"labels"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // What to sort results by. + Sort *i4b632d486fbe62949e9fe64d9f8d7ea30f02d1fcac50947bdea7d6a93016b14d.GetSortQueryParameterType `uriparametername:"sort"` + // Indicates the state of the issues to return. + State *i4b632d486fbe62949e9fe64d9f8d7ea30f02d1fcac50947bdea7d6a93016b14d.GetStateQueryParameterType `uriparametername:"state"` +} +// NewItemIssuesRequestBuilderInternal instantiates a new ItemIssuesRequestBuilder and sets the default values. +func NewItemIssuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemIssuesRequestBuilder) { + m := &ItemIssuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/issues{?direction*,filter*,labels*,page*,per_page*,since*,sort*,state*}", pathParameters), + } + return m +} +// NewItemIssuesRequestBuilder instantiates a new ItemIssuesRequestBuilder and sets the default values. +func NewItemIssuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemIssuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemIssuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list issues in an organization assigned to the authenticated user.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []Issueable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#list-organization-issues-assigned-to-the-authenticated-user +func (m *ItemIssuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemIssuesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable) + } + } + return val, nil +} +// ToGetRequestInformation list issues in an organization assigned to the authenticated user.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemIssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemIssuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemIssuesRequestBuilder when successful +func (m *ItemIssuesRequestBuilder) WithUrl(rawUrl string)(*ItemIssuesRequestBuilder) { + return NewItemIssuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_item_item_with_enablement_post_request_body.go b/pkg/github/orgs/item_item_item_with_enablement_post_request_body.go new file mode 100644 index 0000000..cdf3c70 --- /dev/null +++ b/pkg/github/orgs/item_item_item_with_enablement_post_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemItemWithEnablementPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemItemWithEnablementPostRequestBody instantiates a new ItemItemItemWithEnablementPostRequestBody and sets the default values. +func NewItemItemItemWithEnablementPostRequestBody()(*ItemItemItemWithEnablementPostRequestBody) { + m := &ItemItemItemWithEnablementPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemItemWithEnablementPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemItemWithEnablementPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemItemWithEnablementPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemItemWithEnablementPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemItemWithEnablementPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemItemWithEnablementPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemItemWithEnablementPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemItemWithEnablementPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_item_with_enablement_item_request_builder.go b/pkg/github/orgs/item_item_with_enablement_item_request_builder.go new file mode 100644 index 0000000..757fbe1 --- /dev/null +++ b/pkg/github/orgs/item_item_with_enablement_item_request_builder.go @@ -0,0 +1,55 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemWithEnablementItemRequestBuilder builds and executes requests for operations under \orgs\{org}\{security_product}\{enablement} +type ItemItemWithEnablementItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemWithEnablementItemRequestBuilderInternal instantiates a new ItemItemWithEnablementItemRequestBuilder and sets the default values. +func NewItemItemWithEnablementItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemWithEnablementItemRequestBuilder) { + m := &ItemItemWithEnablementItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/{security_product}/{enablement}", pathParameters), + } + return m +} +// NewItemItemWithEnablementItemRequestBuilder instantiates a new ItemItemWithEnablementItemRequestBuilder and sets the default values. +func NewItemItemWithEnablementItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemWithEnablementItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemWithEnablementItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Post enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#enable-or-disable-a-security-feature-for-an-organization +func (m *ItemItemWithEnablementItemRequestBuilder) Post(ctx context.Context, body ItemItemItemWithEnablementPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemWithEnablementItemRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemItemWithEnablementPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemWithEnablementItemRequestBuilder when successful +func (m *ItemItemWithEnablementItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemWithEnablementItemRequestBuilder) { + return NewItemItemWithEnablementItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_members_item_codespaces_get_response.go b/pkg/github/orgs/item_members_item_codespaces_get_response.go new file mode 100644 index 0000000..911121e --- /dev/null +++ b/pkg/github/orgs/item_members_item_codespaces_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemMembersItemCodespacesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The codespaces property + codespaces []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable + // The total_count property + total_count *int32 +} +// NewItemMembersItemCodespacesGetResponse instantiates a new ItemMembersItemCodespacesGetResponse and sets the default values. +func NewItemMembersItemCodespacesGetResponse()(*ItemMembersItemCodespacesGetResponse) { + m := &ItemMembersItemCodespacesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemMembersItemCodespacesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemMembersItemCodespacesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemMembersItemCodespacesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemMembersItemCodespacesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodespaces gets the codespaces property value. The codespaces property +// returns a []Codespaceable when successful +func (m *ItemMembersItemCodespacesGetResponse) GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) { + return m.codespaces +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemMembersItemCodespacesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + } + } + m.SetCodespaces(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemMembersItemCodespacesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemMembersItemCodespacesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCodespaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCodespaces())) + for i, v := range m.GetCodespaces() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("codespaces", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemMembersItemCodespacesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodespaces sets the codespaces property value. The codespaces property +func (m *ItemMembersItemCodespacesGetResponse) SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() { + m.codespaces = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemMembersItemCodespacesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemMembersItemCodespacesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + GetTotalCount()(*int32) + SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_members_item_codespaces_item_stop_request_builder.go b/pkg/github/orgs/item_members_item_codespaces_item_stop_request_builder.go new file mode 100644 index 0000000..5da3f1f --- /dev/null +++ b/pkg/github/orgs/item_members_item_codespaces_item_stop_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembersItemCodespacesItemStopRequestBuilder builds and executes requests for operations under \orgs\{org}\members\{username}\codespaces\{codespace_name}\stop +type ItemMembersItemCodespacesItemStopRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMembersItemCodespacesItemStopRequestBuilderInternal instantiates a new ItemMembersItemCodespacesItemStopRequestBuilder and sets the default values. +func NewItemMembersItemCodespacesItemStopRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCodespacesItemStopRequestBuilder) { + m := &ItemMembersItemCodespacesItemStopRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", pathParameters), + } + return m +} +// NewItemMembersItemCodespacesItemStopRequestBuilder instantiates a new ItemMembersItemCodespacesItemStopRequestBuilder and sets the default values. +func NewItemMembersItemCodespacesItemStopRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCodespacesItemStopRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersItemCodespacesItemStopRequestBuilderInternal(urlParams, requestAdapter) +} +// Post stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#stop-a-codespace-for-an-organization-user +func (m *ItemMembersItemCodespacesItemStopRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// ToPostRequestInformation stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemMembersItemCodespacesItemStopRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembersItemCodespacesItemStopRequestBuilder when successful +func (m *ItemMembersItemCodespacesItemStopRequestBuilder) WithUrl(rawUrl string)(*ItemMembersItemCodespacesItemStopRequestBuilder) { + return NewItemMembersItemCodespacesItemStopRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_members_item_codespaces_item_with_codespace_name_delete_response.go b/pkg/github/orgs/item_members_item_codespaces_item_with_codespace_name_delete_response.go new file mode 100644 index 0000000..19d3109 --- /dev/null +++ b/pkg/github/orgs/item_members_item_codespaces_item_with_codespace_name_delete_response.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse instantiates a new ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse and sets the default values. +func NewItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse()(*ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse) { + m := &ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_members_item_codespaces_request_builder.go b/pkg/github/orgs/item_members_item_codespaces_request_builder.go new file mode 100644 index 0000000..6bca3ef --- /dev/null +++ b/pkg/github/orgs/item_members_item_codespaces_request_builder.go @@ -0,0 +1,86 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembersItemCodespacesRequestBuilder builds and executes requests for operations under \orgs\{org}\members\{username}\codespaces +type ItemMembersItemCodespacesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemMembersItemCodespacesRequestBuilderGetQueryParameters lists the codespaces that a member of an organization has for repositories in that organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemMembersItemCodespacesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByCodespace_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.members.item.codespaces.item collection +// returns a *ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder when successful +func (m *ItemMembersItemCodespacesRequestBuilder) ByCodespace_name(codespace_name string)(*ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if codespace_name != "" { + urlTplParams["codespace_name"] = codespace_name + } + return NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMembersItemCodespacesRequestBuilderInternal instantiates a new ItemMembersItemCodespacesRequestBuilder and sets the default values. +func NewItemMembersItemCodespacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCodespacesRequestBuilder) { + m := &ItemMembersItemCodespacesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemMembersItemCodespacesRequestBuilder instantiates a new ItemMembersItemCodespacesRequestBuilder and sets the default values. +func NewItemMembersItemCodespacesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCodespacesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersItemCodespacesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the codespaces that a member of an organization has for repositories in that organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemMembersItemCodespacesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#list-codespaces-for-a-user-in-organization +func (m *ItemMembersItemCodespacesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMembersItemCodespacesRequestBuilderGetQueryParameters])(ItemMembersItemCodespacesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemMembersItemCodespacesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemMembersItemCodespacesGetResponseable), nil +} +// ToGetRequestInformation lists the codespaces that a member of an organization has for repositories in that organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemMembersItemCodespacesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMembersItemCodespacesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembersItemCodespacesRequestBuilder when successful +func (m *ItemMembersItemCodespacesRequestBuilder) WithUrl(rawUrl string)(*ItemMembersItemCodespacesRequestBuilder) { + return NewItemMembersItemCodespacesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_members_item_codespaces_with_codespace_name_item_request_builder.go b/pkg/github/orgs/item_members_item_codespaces_with_codespace_name_item_request_builder.go new file mode 100644 index 0000000..ffae6d2 --- /dev/null +++ b/pkg/github/orgs/item_members_item_codespaces_with_codespace_name_item_request_builder.go @@ -0,0 +1,72 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\members\{username}\codespaces\{codespace_name} +type ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilderInternal instantiates a new ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder and sets the default values. +func NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) { + m := &ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces/{codespace_name}", pathParameters), + } + return m +} +// NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder instantiates a new ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder and sets the default values. +func NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/organizations#delete-a-codespace-from-the-organization +func (m *ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemMembersItemCodespacesItemWithCodespace_nameDeleteResponseable), nil +} +// Stop the stop property +// returns a *ItemMembersItemCodespacesItemStopRequestBuilder when successful +func (m *ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) Stop()(*ItemMembersItemCodespacesItemStopRequestBuilder) { + return NewItemMembersItemCodespacesItemStopRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder when successful +func (m *ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder) { + return NewItemMembersItemCodespacesWithCodespace_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_members_item_copilot_request_builder.go b/pkg/github/orgs/item_members_item_copilot_request_builder.go new file mode 100644 index 0000000..a90b798 --- /dev/null +++ b/pkg/github/orgs/item_members_item_copilot_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembersItemCopilotRequestBuilder builds and executes requests for operations under \orgs\{org}\members\{username}\copilot +type ItemMembersItemCopilotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMembersItemCopilotRequestBuilderInternal instantiates a new ItemMembersItemCopilotRequestBuilder and sets the default values. +func NewItemMembersItemCopilotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCopilotRequestBuilder) { + m := &ItemMembersItemCopilotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/copilot", pathParameters), + } + return m +} +// NewItemMembersItemCopilotRequestBuilder instantiates a new ItemMembersItemCopilotRequestBuilder and sets the default values. +func NewItemMembersItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersItemCopilotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersItemCopilotRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// returns a CopilotSeatDetailsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-user-management#get-copilot-seat-assignment-details-for-a-user +func (m *ItemMembersItemCopilotRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCopilotSeatDetailsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CopilotSeatDetailsable), nil +} +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemMembersItemCopilotRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembersItemCopilotRequestBuilder when successful +func (m *ItemMembersItemCopilotRequestBuilder) WithUrl(rawUrl string)(*ItemMembersItemCopilotRequestBuilder) { + return NewItemMembersItemCopilotRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_members_request_builder.go b/pkg/github/orgs/item_members_request_builder.go new file mode 100644 index 0000000..26e4d70 --- /dev/null +++ b/pkg/github/orgs/item_members_request_builder.go @@ -0,0 +1,88 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i81261bd21468e696fc553ae8a17f0a3ba93247f988d49f9bff36e48f6b293eb0 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/members" +) + +// ItemMembersRequestBuilder builds and executes requests for operations under \orgs\{org}\members +type ItemMembersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemMembersRequestBuilderGetQueryParameters list all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. +type ItemMembersRequestBuilderGetQueryParameters struct { + // Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. + Filter *i81261bd21468e696fc553ae8a17f0a3ba93247f988d49f9bff36e48f6b293eb0.GetFilterQueryParameterType `uriparametername:"filter"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Filter members returned by their role. + Role *i81261bd21468e696fc553ae8a17f0a3ba93247f988d49f9bff36e48f6b293eb0.GetRoleQueryParameterType `uriparametername:"role"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.members.item collection +// returns a *ItemMembersWithUsernameItemRequestBuilder when successful +func (m *ItemMembersRequestBuilder) ByUsername(username string)(*ItemMembersWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemMembersWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMembersRequestBuilderInternal instantiates a new ItemMembersRequestBuilder and sets the default values. +func NewItemMembersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersRequestBuilder) { + m := &ItemMembersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/members{?filter*,page*,per_page*,role*}", pathParameters), + } + return m +} +// NewItemMembersRequestBuilder instantiates a new ItemMembersRequestBuilder and sets the default values. +func NewItemMembersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. +// returns a []SimpleUserable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#list-organization-members +func (m *ItemMembersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMembersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation list all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. +// returns a *RequestInformation when successful +func (m *ItemMembersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMembersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembersRequestBuilder when successful +func (m *ItemMembersRequestBuilder) WithUrl(rawUrl string)(*ItemMembersRequestBuilder) { + return NewItemMembersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_members_with_username_item_request_builder.go b/pkg/github/orgs/item_members_with_username_item_request_builder.go new file mode 100644 index 0000000..91c3a0a --- /dev/null +++ b/pkg/github/orgs/item_members_with_username_item_request_builder.go @@ -0,0 +1,89 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembersWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\members\{username} +type ItemMembersWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Codespaces the codespaces property +// returns a *ItemMembersItemCodespacesRequestBuilder when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) Codespaces()(*ItemMembersItemCodespacesRequestBuilder) { + return NewItemMembersItemCodespacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMembersWithUsernameItemRequestBuilderInternal instantiates a new ItemMembersWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembersWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersWithUsernameItemRequestBuilder) { + m := &ItemMembersWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}", pathParameters), + } + return m +} +// NewItemMembersWithUsernameItemRequestBuilder instantiates a new ItemMembersWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembersWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Copilot the copilot property +// returns a *ItemMembersItemCopilotRequestBuilder when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) Copilot()(*ItemMembersItemCopilotRequestBuilder) { + return NewItemMembersItemCopilotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#remove-an-organization-member +func (m *ItemMembersWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get check if a user is, publicly or privately, a member of the organization. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#check-organization-membership-for-a-user +func (m *ItemMembersWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. +// returns a *RequestInformation when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation check if a user is, publicly or privately, a member of the organization. +// returns a *RequestInformation when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembersWithUsernameItemRequestBuilder when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemMembersWithUsernameItemRequestBuilder) { + return NewItemMembersWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_memberships_item_with_username_put_request_body.go b/pkg/github/orgs/item_memberships_item_with_username_put_request_body.go new file mode 100644 index 0000000..4110b5c --- /dev/null +++ b/pkg/github/orgs/item_memberships_item_with_username_put_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemMembershipsItemWithUsernamePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemMembershipsItemWithUsernamePutRequestBody instantiates a new ItemMembershipsItemWithUsernamePutRequestBody and sets the default values. +func NewItemMembershipsItemWithUsernamePutRequestBody()(*ItemMembershipsItemWithUsernamePutRequestBody) { + m := &ItemMembershipsItemWithUsernamePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemMembershipsItemWithUsernamePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemMembershipsItemWithUsernamePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemMembershipsItemWithUsernamePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemMembershipsItemWithUsernamePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemMembershipsItemWithUsernamePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemMembershipsItemWithUsernamePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemMembershipsItemWithUsernamePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemMembershipsItemWithUsernamePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_memberships_request_builder.go b/pkg/github/orgs/item_memberships_request_builder.go new file mode 100644 index 0000000..2a01e0c --- /dev/null +++ b/pkg/github/orgs/item_memberships_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemMembershipsRequestBuilder builds and executes requests for operations under \orgs\{org}\memberships +type ItemMembershipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.memberships.item collection +// returns a *ItemMembershipsWithUsernameItemRequestBuilder when successful +func (m *ItemMembershipsRequestBuilder) ByUsername(username string)(*ItemMembershipsWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemMembershipsWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMembershipsRequestBuilderInternal instantiates a new ItemMembershipsRequestBuilder and sets the default values. +func NewItemMembershipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsRequestBuilder) { + m := &ItemMembershipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/memberships", pathParameters), + } + return m +} +// NewItemMembershipsRequestBuilder instantiates a new ItemMembershipsRequestBuilder and sets the default values. +func NewItemMembershipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembershipsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_memberships_with_username_item_request_builder.go b/pkg/github/orgs/item_memberships_with_username_item_request_builder.go new file mode 100644 index 0000000..4a02789 --- /dev/null +++ b/pkg/github/orgs/item_memberships_with_username_item_request_builder.go @@ -0,0 +1,129 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembershipsWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\memberships\{username} +type ItemMembershipsWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMembershipsWithUsernameItemRequestBuilderInternal instantiates a new ItemMembershipsWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembershipsWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsWithUsernameItemRequestBuilder) { + m := &ItemMembershipsWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/memberships/{username}", pathParameters), + } + return m +} +// NewItemMembershipsWithUsernameItemRequestBuilder instantiates a new ItemMembershipsWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembershipsWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembershipsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete in order to remove a user's membership with an organization, the authenticated user must be an organization owner.If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#remove-organization-membership-for-a-user +func (m *ItemMembershipsWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get in order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. +// returns a OrgMembershipable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#get-organization-membership-for-a-user +func (m *ItemMembershipsWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable), nil +} +// Put only authenticated organization owners can add a member to the organization or update the member's role.* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.**Rate limits**To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. +// returns a OrgMembershipable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#set-organization-membership-for-a-user +func (m *ItemMembershipsWithUsernameItemRequestBuilder) Put(ctx context.Context, body ItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable), nil +} +// ToDeleteRequestInformation in order to remove a user's membership with an organization, the authenticated user must be an organization owner.If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. +// returns a *RequestInformation when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation in order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. +// returns a *RequestInformation when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation only authenticated organization owners can add a member to the organization or update the member's role.* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.**Rate limits**To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. +// returns a *RequestInformation when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMembershipsWithUsernameItemRequestBuilder when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemMembershipsWithUsernameItemRequestBuilder) { + return NewItemMembershipsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_migrations_item_archive_request_builder.go b/pkg/github/orgs/item_migrations_item_archive_request_builder.go new file mode 100644 index 0000000..d3d9b7c --- /dev/null +++ b/pkg/github/orgs/item_migrations_item_archive_request_builder.go @@ -0,0 +1,84 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMigrationsItemArchiveRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\archive +type ItemMigrationsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMigrationsItemArchiveRequestBuilderInternal instantiates a new ItemMigrationsItemArchiveRequestBuilder and sets the default values. +func NewItemMigrationsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemArchiveRequestBuilder) { + m := &ItemMigrationsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/archive", pathParameters), + } + return m +} +// NewItemMigrationsItemArchiveRequestBuilder instantiates a new ItemMigrationsItemArchiveRequestBuilder and sets the default values. +func NewItemMigrationsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a previous migration archive. Migration archives are automatically deleted after seven days. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#delete-an-organization-migration-archive +func (m *ItemMigrationsItemArchiveRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get fetches the URL to a migration archive. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#download-an-organization-migration-archive +func (m *ItemMigrationsItemArchiveRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes a previous migration archive. Migration archives are automatically deleted after seven days. +// returns a *RequestInformation when successful +func (m *ItemMigrationsItemArchiveRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation fetches the URL to a migration archive. +// returns a *RequestInformation when successful +func (m *ItemMigrationsItemArchiveRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMigrationsItemArchiveRequestBuilder when successful +func (m *ItemMigrationsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemMigrationsItemArchiveRequestBuilder) { + return NewItemMigrationsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_migrations_item_repos_item_lock_request_builder.go b/pkg/github/orgs/item_migrations_item_repos_item_lock_request_builder.go new file mode 100644 index 0000000..a2bc352 --- /dev/null +++ b/pkg/github/orgs/item_migrations_item_repos_item_lock_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMigrationsItemReposItemLockRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repos\{repo_name}\lock +type ItemMigrationsItemReposItemLockRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMigrationsItemReposItemLockRequestBuilderInternal instantiates a new ItemMigrationsItemReposItemLockRequestBuilder and sets the default values. +func NewItemMigrationsItemReposItemLockRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemReposItemLockRequestBuilder) { + m := &ItemMigrationsItemReposItemLockRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", pathParameters), + } + return m +} +// NewItemMigrationsItemReposItemLockRequestBuilder instantiates a new ItemMigrationsItemReposItemLockRequestBuilder and sets the default values. +func NewItemMigrationsItemReposItemLockRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemReposItemLockRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsItemReposItemLockRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#unlock-an-organization-repository +func (m *ItemMigrationsItemReposItemLockRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. +// returns a *RequestInformation when successful +func (m *ItemMigrationsItemReposItemLockRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMigrationsItemReposItemLockRequestBuilder when successful +func (m *ItemMigrationsItemReposItemLockRequestBuilder) WithUrl(rawUrl string)(*ItemMigrationsItemReposItemLockRequestBuilder) { + return NewItemMigrationsItemReposItemLockRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_migrations_item_repos_request_builder.go b/pkg/github/orgs/item_migrations_item_repos_request_builder.go new file mode 100644 index 0000000..21dfbac --- /dev/null +++ b/pkg/github/orgs/item_migrations_item_repos_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemMigrationsItemReposRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repos +type ItemMigrationsItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.migrations.item.repos.item collection +// returns a *ItemMigrationsItemReposWithRepo_nameItemRequestBuilder when successful +func (m *ItemMigrationsItemReposRequestBuilder) ByRepo_name(repo_name string)(*ItemMigrationsItemReposWithRepo_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo_name != "" { + urlTplParams["repo_name"] = repo_name + } + return NewItemMigrationsItemReposWithRepo_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMigrationsItemReposRequestBuilderInternal instantiates a new ItemMigrationsItemReposRequestBuilder and sets the default values. +func NewItemMigrationsItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemReposRequestBuilder) { + m := &ItemMigrationsItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos", pathParameters), + } + return m +} +// NewItemMigrationsItemReposRequestBuilder instantiates a new ItemMigrationsItemReposRequestBuilder and sets the default values. +func NewItemMigrationsItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsItemReposRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_migrations_item_repos_with_repo_name_item_request_builder.go b/pkg/github/orgs/item_migrations_item_repos_with_repo_name_item_request_builder.go new file mode 100644 index 0000000..a19a036 --- /dev/null +++ b/pkg/github/orgs/item_migrations_item_repos_with_repo_name_item_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemMigrationsItemReposWithRepo_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repos\{repo_name} +type ItemMigrationsItemReposWithRepo_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMigrationsItemReposWithRepo_nameItemRequestBuilderInternal instantiates a new ItemMigrationsItemReposWithRepo_nameItemRequestBuilder and sets the default values. +func NewItemMigrationsItemReposWithRepo_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemReposWithRepo_nameItemRequestBuilder) { + m := &ItemMigrationsItemReposWithRepo_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos/{repo_name}", pathParameters), + } + return m +} +// NewItemMigrationsItemReposWithRepo_nameItemRequestBuilder instantiates a new ItemMigrationsItemReposWithRepo_nameItemRequestBuilder and sets the default values. +func NewItemMigrationsItemReposWithRepo_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemReposWithRepo_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsItemReposWithRepo_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Lock the lock property +// returns a *ItemMigrationsItemReposItemLockRequestBuilder when successful +func (m *ItemMigrationsItemReposWithRepo_nameItemRequestBuilder) Lock()(*ItemMigrationsItemReposItemLockRequestBuilder) { + return NewItemMigrationsItemReposItemLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_migrations_item_repositories_request_builder.go b/pkg/github/orgs/item_migrations_item_repositories_request_builder.go new file mode 100644 index 0000000..4a1b098 --- /dev/null +++ b/pkg/github/orgs/item_migrations_item_repositories_request_builder.go @@ -0,0 +1,71 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMigrationsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repositories +type ItemMigrationsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemMigrationsItemRepositoriesRequestBuilderGetQueryParameters list all the repositories for this organization migration. +type ItemMigrationsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemMigrationsItemRepositoriesRequestBuilderInternal instantiates a new ItemMigrationsItemRepositoriesRequestBuilder and sets the default values. +func NewItemMigrationsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemRepositoriesRequestBuilder) { + m := &ItemMigrationsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemMigrationsItemRepositoriesRequestBuilder instantiates a new ItemMigrationsItemRepositoriesRequestBuilder and sets the default values. +func NewItemMigrationsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all the repositories for this organization migration. +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#list-repositories-in-an-organization-migration +func (m *ItemMigrationsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMigrationsItemRepositoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation list all the repositories for this organization migration. +// returns a *RequestInformation when successful +func (m *ItemMigrationsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMigrationsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMigrationsItemRepositoriesRequestBuilder when successful +func (m *ItemMigrationsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemMigrationsItemRepositoriesRequestBuilder) { + return NewItemMigrationsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_migrations_post_request_body.go b/pkg/github/orgs/item_migrations_post_request_body.go new file mode 100644 index 0000000..ce2837a --- /dev/null +++ b/pkg/github/orgs/item_migrations_post_request_body.go @@ -0,0 +1,289 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemMigrationsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + exclude_attachments *bool + // Indicates whether the repository git data should be excluded from the migration. + exclude_git_data *bool + // Indicates whether metadata should be excluded and only git source should be included for the migration. + exclude_metadata *bool + // Indicates whether projects owned by the organization or users should be excluded. from the migration. + exclude_owner_projects *bool + // Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + exclude_releases *bool + // Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + lock_repositories *bool + // Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + org_metadata_only *bool + // A list of arrays indicating which repositories should be migrated. + repositories []string +} +// NewItemMigrationsPostRequestBody instantiates a new ItemMigrationsPostRequestBody and sets the default values. +func NewItemMigrationsPostRequestBody()(*ItemMigrationsPostRequestBody) { + m := &ItemMigrationsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemMigrationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemMigrationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemMigrationsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemMigrationsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExcludeAttachments gets the exclude_attachments property value. Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetExcludeAttachments()(*bool) { + return m.exclude_attachments +} +// GetExcludeGitData gets the exclude_git_data property value. Indicates whether the repository git data should be excluded from the migration. +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetExcludeGitData()(*bool) { + return m.exclude_git_data +} +// GetExcludeMetadata gets the exclude_metadata property value. Indicates whether metadata should be excluded and only git source should be included for the migration. +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetExcludeMetadata()(*bool) { + return m.exclude_metadata +} +// GetExcludeOwnerProjects gets the exclude_owner_projects property value. Indicates whether projects owned by the organization or users should be excluded. from the migration. +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetExcludeOwnerProjects()(*bool) { + return m.exclude_owner_projects +} +// GetExcludeReleases gets the exclude_releases property value. Indicates whether releases should be excluded from the migration (to reduce migration archive file size). +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetExcludeReleases()(*bool) { + return m.exclude_releases +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemMigrationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["exclude_attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeAttachments(val) + } + return nil + } + res["exclude_git_data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeGitData(val) + } + return nil + } + res["exclude_metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeMetadata(val) + } + return nil + } + res["exclude_owner_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeOwnerProjects(val) + } + return nil + } + res["exclude_releases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeReleases(val) + } + return nil + } + res["lock_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockRepositories(val) + } + return nil + } + res["org_metadata_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOrgMetadataOnly(val) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositories(res) + } + return nil + } + return res +} +// GetLockRepositories gets the lock_repositories property value. Indicates whether repositories should be locked (to prevent manipulation) while migrating data. +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetLockRepositories()(*bool) { + return m.lock_repositories +} +// GetOrgMetadataOnly gets the org_metadata_only property value. Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). +// returns a *bool when successful +func (m *ItemMigrationsPostRequestBody) GetOrgMetadataOnly()(*bool) { + return m.org_metadata_only +} +// GetRepositories gets the repositories property value. A list of arrays indicating which repositories should be migrated. +// returns a []string when successful +func (m *ItemMigrationsPostRequestBody) GetRepositories()([]string) { + return m.repositories +} +// Serialize serializes information the current object +func (m *ItemMigrationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("exclude_attachments", m.GetExcludeAttachments()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_git_data", m.GetExcludeGitData()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_metadata", m.GetExcludeMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_owner_projects", m.GetExcludeOwnerProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_releases", m.GetExcludeReleases()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("lock_repositories", m.GetLockRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("org_metadata_only", m.GetOrgMetadataOnly()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + err := writer.WriteCollectionOfStringValues("repositories", m.GetRepositories()) + 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 *ItemMigrationsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExcludeAttachments sets the exclude_attachments property value. Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). +func (m *ItemMigrationsPostRequestBody) SetExcludeAttachments(value *bool)() { + m.exclude_attachments = value +} +// SetExcludeGitData sets the exclude_git_data property value. Indicates whether the repository git data should be excluded from the migration. +func (m *ItemMigrationsPostRequestBody) SetExcludeGitData(value *bool)() { + m.exclude_git_data = value +} +// SetExcludeMetadata sets the exclude_metadata property value. Indicates whether metadata should be excluded and only git source should be included for the migration. +func (m *ItemMigrationsPostRequestBody) SetExcludeMetadata(value *bool)() { + m.exclude_metadata = value +} +// SetExcludeOwnerProjects sets the exclude_owner_projects property value. Indicates whether projects owned by the organization or users should be excluded. from the migration. +func (m *ItemMigrationsPostRequestBody) SetExcludeOwnerProjects(value *bool)() { + m.exclude_owner_projects = value +} +// SetExcludeReleases sets the exclude_releases property value. Indicates whether releases should be excluded from the migration (to reduce migration archive file size). +func (m *ItemMigrationsPostRequestBody) SetExcludeReleases(value *bool)() { + m.exclude_releases = value +} +// SetLockRepositories sets the lock_repositories property value. Indicates whether repositories should be locked (to prevent manipulation) while migrating data. +func (m *ItemMigrationsPostRequestBody) SetLockRepositories(value *bool)() { + m.lock_repositories = value +} +// SetOrgMetadataOnly sets the org_metadata_only property value. Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). +func (m *ItemMigrationsPostRequestBody) SetOrgMetadataOnly(value *bool)() { + m.org_metadata_only = value +} +// SetRepositories sets the repositories property value. A list of arrays indicating which repositories should be migrated. +func (m *ItemMigrationsPostRequestBody) SetRepositories(value []string)() { + m.repositories = value +} +type ItemMigrationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeAttachments()(*bool) + GetExcludeGitData()(*bool) + GetExcludeMetadata()(*bool) + GetExcludeOwnerProjects()(*bool) + GetExcludeReleases()(*bool) + GetLockRepositories()(*bool) + GetOrgMetadataOnly()(*bool) + GetRepositories()([]string) + SetExcludeAttachments(value *bool)() + SetExcludeGitData(value *bool)() + SetExcludeMetadata(value *bool)() + SetExcludeOwnerProjects(value *bool)() + SetExcludeReleases(value *bool)() + SetLockRepositories(value *bool)() + SetOrgMetadataOnly(value *bool)() + SetRepositories(value []string)() +} diff --git a/pkg/github/orgs/item_migrations_request_builder.go b/pkg/github/orgs/item_migrations_request_builder.go new file mode 100644 index 0000000..53d5390 --- /dev/null +++ b/pkg/github/orgs/item_migrations_request_builder.go @@ -0,0 +1,118 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i087d737e3fed6dfb8edf759890d13e58367e3cbc960f15f949a95c9b6d83f05c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/migrations" +) + +// ItemMigrationsRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations +type ItemMigrationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemMigrationsRequestBuilderGetQueryParameters lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API).A list of `repositories` is only returned for export migrations. +type ItemMigrationsRequestBuilderGetQueryParameters struct { + // Exclude attributes from the API response to improve performance + Exclude []i087d737e3fed6dfb8edf759890d13e58367e3cbc960f15f949a95c9b6d83f05c.GetExcludeQueryParameterType `uriparametername:"exclude"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByMigration_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.migrations.item collection +// returns a *ItemMigrationsWithMigration_ItemRequestBuilder when successful +func (m *ItemMigrationsRequestBuilder) ByMigration_id(migration_id int32)(*ItemMigrationsWithMigration_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["migration_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(migration_id), 10) + return NewItemMigrationsWithMigration_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMigrationsRequestBuilderInternal instantiates a new ItemMigrationsRequestBuilder and sets the default values. +func NewItemMigrationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsRequestBuilder) { + m := &ItemMigrationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations{?exclude*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemMigrationsRequestBuilder instantiates a new ItemMigrationsRequestBuilder and sets the default values. +func NewItemMigrationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API).A list of `repositories` is only returned for export migrations. +// returns a []Migrationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#list-organization-migrations +func (m *ItemMigrationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMigrationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMigrationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable) + } + } + return val, nil +} +// Post initiates the generation of a migration archive. +// returns a Migrationable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#start-an-organization-migration +func (m *ItemMigrationsRequestBuilder) Post(ctx context.Context, body ItemMigrationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMigrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable), nil +} +// ToGetRequestInformation lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API).A list of `repositories` is only returned for export migrations. +// returns a *RequestInformation when successful +func (m *ItemMigrationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMigrationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation initiates the generation of a migration archive. +// returns a *RequestInformation when successful +func (m *ItemMigrationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemMigrationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMigrationsRequestBuilder when successful +func (m *ItemMigrationsRequestBuilder) WithUrl(rawUrl string)(*ItemMigrationsRequestBuilder) { + return NewItemMigrationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_migrations_with_migration_item_request_builder.go b/pkg/github/orgs/item_migrations_with_migration_item_request_builder.go new file mode 100644 index 0000000..df5ef09 --- /dev/null +++ b/pkg/github/orgs/item_migrations_with_migration_item_request_builder.go @@ -0,0 +1,82 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i49bef2d41e85df11635b5f54fc591277b54ce82be042bb3486664ed17d3e94d5 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/migrations/item" +) + +// ItemMigrationsWithMigration_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\migrations\{migration_id} +type ItemMigrationsWithMigration_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemMigrationsWithMigration_ItemRequestBuilderGetQueryParameters fetches the status of a migration.The `state` of a migration can be one of the following values:* `pending`, which means the migration hasn't started yet.* `exporting`, which means the migration is in progress.* `exported`, which means the migration finished successfully.* `failed`, which means the migration failed. +type ItemMigrationsWithMigration_ItemRequestBuilderGetQueryParameters struct { + // Exclude attributes from the API response to improve performance + Exclude []i49bef2d41e85df11635b5f54fc591277b54ce82be042bb3486664ed17d3e94d5.GetExcludeQueryParameterType `uriparametername:"exclude"` +} +// Archive the archive property +// returns a *ItemMigrationsItemArchiveRequestBuilder when successful +func (m *ItemMigrationsWithMigration_ItemRequestBuilder) Archive()(*ItemMigrationsItemArchiveRequestBuilder) { + return NewItemMigrationsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMigrationsWithMigration_ItemRequestBuilderInternal instantiates a new ItemMigrationsWithMigration_ItemRequestBuilder and sets the default values. +func NewItemMigrationsWithMigration_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsWithMigration_ItemRequestBuilder) { + m := &ItemMigrationsWithMigration_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}{?exclude*}", pathParameters), + } + return m +} +// NewItemMigrationsWithMigration_ItemRequestBuilder instantiates a new ItemMigrationsWithMigration_ItemRequestBuilder and sets the default values. +func NewItemMigrationsWithMigration_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMigrationsWithMigration_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMigrationsWithMigration_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get fetches the status of a migration.The `state` of a migration can be one of the following values:* `pending`, which means the migration hasn't started yet.* `exporting`, which means the migration is in progress.* `exported`, which means the migration finished successfully.* `failed`, which means the migration failed. +// returns a Migrationable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/orgs#get-an-organization-migration-status +func (m *ItemMigrationsWithMigration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMigrationsWithMigration_ItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMigrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable), nil +} +// Repos the repos property +// returns a *ItemMigrationsItemReposRequestBuilder when successful +func (m *ItemMigrationsWithMigration_ItemRequestBuilder) Repos()(*ItemMigrationsItemReposRequestBuilder) { + return NewItemMigrationsItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repositories the repositories property +// returns a *ItemMigrationsItemRepositoriesRequestBuilder when successful +func (m *ItemMigrationsWithMigration_ItemRequestBuilder) Repositories()(*ItemMigrationsItemRepositoriesRequestBuilder) { + return NewItemMigrationsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation fetches the status of a migration.The `state` of a migration can be one of the following values:* `pending`, which means the migration hasn't started yet.* `exporting`, which means the migration is in progress.* `exported`, which means the migration finished successfully.* `failed`, which means the migration failed. +// returns a *RequestInformation when successful +func (m *ItemMigrationsWithMigration_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMigrationsWithMigration_ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemMigrationsWithMigration_ItemRequestBuilder when successful +func (m *ItemMigrationsWithMigration_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemMigrationsWithMigration_ItemRequestBuilder) { + return NewItemMigrationsWithMigration_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_fine_grained_permissions_request_builder.go b/pkg/github/orgs/item_organization_fine_grained_permissions_request_builder.go new file mode 100644 index 0000000..4364a7e --- /dev/null +++ b/pkg/github/orgs/item_organization_fine_grained_permissions_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOrganizationFineGrainedPermissionsRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-fine-grained-permissions +type ItemOrganizationFineGrainedPermissionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemOrganizationFineGrainedPermissionsRequestBuilderInternal instantiates a new ItemOrganizationFineGrainedPermissionsRequestBuilder and sets the default values. +func NewItemOrganizationFineGrainedPermissionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationFineGrainedPermissionsRequestBuilder) { + m := &ItemOrganizationFineGrainedPermissionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-fine-grained-permissions", pathParameters), + } + return m +} +// NewItemOrganizationFineGrainedPermissionsRequestBuilder instantiates a new ItemOrganizationFineGrainedPermissionsRequestBuilder and sets the default values. +func NewItemOrganizationFineGrainedPermissionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationFineGrainedPermissionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationFineGrainedPermissionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a []OrganizationFineGrainedPermissionable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization +func (m *ItemOrganizationFineGrainedPermissionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFineGrainedPermissionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationFineGrainedPermissionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFineGrainedPermissionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFineGrainedPermissionable) + } + } + return val, nil +} +// ToGetRequestInformation lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationFineGrainedPermissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationFineGrainedPermissionsRequestBuilder when successful +func (m *ItemOrganizationFineGrainedPermissionsRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationFineGrainedPermissionsRequestBuilder) { + return NewItemOrganizationFineGrainedPermissionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_get_response.go b/pkg/github/orgs/item_organization_roles_get_response.go new file mode 100644 index 0000000..8c78603 --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemOrganizationRolesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of organization roles available to the organization. + roles []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable + // The total number of organization roles available to the organization. + total_count *int32 +} +// NewItemOrganizationRolesGetResponse instantiates a new ItemOrganizationRolesGetResponse and sets the default values. +func NewItemOrganizationRolesGetResponse()(*ItemOrganizationRolesGetResponse) { + m := &ItemOrganizationRolesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemOrganizationRolesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOrganizationRolesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemOrganizationRolesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemOrganizationRolesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOrganizationRolesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable) + } + } + m.SetRoles(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRoles gets the roles property value. The list of organization roles available to the organization. +// returns a []OrganizationRoleable when successful +func (m *ItemOrganizationRolesGetResponse) GetRoles()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable) { + return m.roles +} +// GetTotalCount gets the total_count property value. The total number of organization roles available to the organization. +// returns a *int32 when successful +func (m *ItemOrganizationRolesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemOrganizationRolesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoles())) + for i, v := range m.GetRoles() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("roles", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemOrganizationRolesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRoles sets the roles property value. The list of organization roles available to the organization. +func (m *ItemOrganizationRolesGetResponse) SetRoles(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable)() { + m.roles = value +} +// SetTotalCount sets the total_count property value. The total number of organization roles available to the organization. +func (m *ItemOrganizationRolesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemOrganizationRolesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRoles()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable) + GetTotalCount()(*int32) + SetRoles(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_organization_roles_item_teams_request_builder.go b/pkg/github/orgs/item_organization_roles_item_teams_request_builder.go new file mode 100644 index 0000000..842dc0a --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_item_teams_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOrganizationRolesItemTeamsRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\{role_id}\teams +type ItemOrganizationRolesItemTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOrganizationRolesItemTeamsRequestBuilderGetQueryParameters lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, you must be an administrator for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemOrganizationRolesItemTeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemOrganizationRolesItemTeamsRequestBuilderInternal instantiates a new ItemOrganizationRolesItemTeamsRequestBuilder and sets the default values. +func NewItemOrganizationRolesItemTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesItemTeamsRequestBuilder) { + m := &ItemOrganizationRolesItemTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemOrganizationRolesItemTeamsRequestBuilder instantiates a new ItemOrganizationRolesItemTeamsRequestBuilder and sets the default values. +func NewItemOrganizationRolesItemTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesItemTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesItemTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, you must be an administrator for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a []TeamRoleAssignmentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#list-teams-that-are-assigned-to-an-organization-role +func (m *ItemOrganizationRolesItemTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOrganizationRolesItemTeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRoleAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamRoleAssignmentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRoleAssignmentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRoleAssignmentable) + } + } + return val, nil +} +// ToGetRequestInformation lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, you must be an administrator for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOrganizationRolesItemTeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationRolesItemTeamsRequestBuilder when successful +func (m *ItemOrganizationRolesItemTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesItemTeamsRequestBuilder) { + return NewItemOrganizationRolesItemTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_item_users_request_builder.go b/pkg/github/orgs/item_organization_roles_item_users_request_builder.go new file mode 100644 index 0000000..0ff2147 --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_item_users_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOrganizationRolesItemUsersRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\{role_id}\users +type ItemOrganizationRolesItemUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOrganizationRolesItemUsersRequestBuilderGetQueryParameters lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, you must be an administrator for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemOrganizationRolesItemUsersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemOrganizationRolesItemUsersRequestBuilderInternal instantiates a new ItemOrganizationRolesItemUsersRequestBuilder and sets the default values. +func NewItemOrganizationRolesItemUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesItemUsersRequestBuilder) { + m := &ItemOrganizationRolesItemUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}/users{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemOrganizationRolesItemUsersRequestBuilder instantiates a new ItemOrganizationRolesItemUsersRequestBuilder and sets the default values. +func NewItemOrganizationRolesItemUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesItemUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesItemUsersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, you must be an administrator for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a []UserRoleAssignmentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#list-users-that-are-assigned-to-an-organization-role +func (m *ItemOrganizationRolesItemUsersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOrganizationRolesItemUsersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserRoleAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateUserRoleAssignmentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserRoleAssignmentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserRoleAssignmentable) + } + } + return val, nil +} +// ToGetRequestInformation lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, you must be an administrator for the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesItemUsersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOrganizationRolesItemUsersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationRolesItemUsersRequestBuilder when successful +func (m *ItemOrganizationRolesItemUsersRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesItemUsersRequestBuilder) { + return NewItemOrganizationRolesItemUsersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_item_with_role_patch_request_body.go b/pkg/github/orgs/item_organization_roles_item_with_role_patch_request_body.go new file mode 100644 index 0000000..67399c1 --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_item_with_role_patch_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemOrganizationRolesItemWithRole_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A short description about the intended usage of this role or what permissions it grants. + description *string + // The name of the custom role. + name *string + // A list of additional permissions included in this role. + permissions []string +} +// NewItemOrganizationRolesItemWithRole_PatchRequestBody instantiates a new ItemOrganizationRolesItemWithRole_PatchRequestBody and sets the default values. +func NewItemOrganizationRolesItemWithRole_PatchRequestBody()(*ItemOrganizationRolesItemWithRole_PatchRequestBody) { + m := &ItemOrganizationRolesItemWithRole_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemOrganizationRolesItemWithRole_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOrganizationRolesItemWithRole_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemOrganizationRolesItemWithRole_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A short description about the intended usage of this role or what permissions it grants. +// returns a *string when successful +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the custom role. +// returns a *string when successful +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetPermissions gets the permissions property value. A list of additional permissions included in this role. +// returns a []string when successful +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) GetPermissions()([]string) { + return m.permissions +} +// Serialize serializes information the current object +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + 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 *ItemOrganizationRolesItemWithRole_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A short description about the intended usage of this role or what permissions it grants. +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the custom role. +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetPermissions sets the permissions property value. A list of additional permissions included in this role. +func (m *ItemOrganizationRolesItemWithRole_PatchRequestBody) SetPermissions(value []string)() { + m.permissions = value +} +type ItemOrganizationRolesItemWithRole_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetPermissions()([]string) + SetDescription(value *string)() + SetName(value *string)() + SetPermissions(value []string)() +} diff --git a/pkg/github/orgs/item_organization_roles_post_request_body.go b/pkg/github/orgs/item_organization_roles_post_request_body.go new file mode 100644 index 0000000..03f5108 --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_post_request_body.go @@ -0,0 +1,144 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemOrganizationRolesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A short description about the intended usage of this role or what permissions it grants. + description *string + // The name of the custom role. + name *string + // A list of additional permissions included in this role. + permissions []string +} +// NewItemOrganizationRolesPostRequestBody instantiates a new ItemOrganizationRolesPostRequestBody and sets the default values. +func NewItemOrganizationRolesPostRequestBody()(*ItemOrganizationRolesPostRequestBody) { + m := &ItemOrganizationRolesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemOrganizationRolesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOrganizationRolesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemOrganizationRolesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemOrganizationRolesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A short description about the intended usage of this role or what permissions it grants. +// returns a *string when successful +func (m *ItemOrganizationRolesPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOrganizationRolesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPermissions(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the custom role. +// returns a *string when successful +func (m *ItemOrganizationRolesPostRequestBody) GetName()(*string) { + return m.name +} +// GetPermissions gets the permissions property value. A list of additional permissions included in this role. +// returns a []string when successful +func (m *ItemOrganizationRolesPostRequestBody) GetPermissions()([]string) { + return m.permissions +} +// Serialize serializes information the current object +func (m *ItemOrganizationRolesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err := writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + 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 *ItemOrganizationRolesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A short description about the intended usage of this role or what permissions it grants. +func (m *ItemOrganizationRolesPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the custom role. +func (m *ItemOrganizationRolesPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetPermissions sets the permissions property value. A list of additional permissions included in this role. +func (m *ItemOrganizationRolesPostRequestBody) SetPermissions(value []string)() { + m.permissions = value +} +type ItemOrganizationRolesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetPermissions()([]string) + SetDescription(value *string)() + SetName(value *string)() + SetPermissions(value []string)() +} diff --git a/pkg/github/orgs/item_organization_roles_request_builder.go b/pkg/github/orgs/item_organization_roles_request_builder.go new file mode 100644 index 0000000..3bc6082 --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_request_builder.go @@ -0,0 +1,123 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOrganizationRolesRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles +type ItemOrganizationRolesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRole_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.organizationRoles.item collection +// returns a *ItemOrganizationRolesWithRole_ItemRequestBuilder when successful +func (m *ItemOrganizationRolesRequestBuilder) ByRole_id(role_id int32)(*ItemOrganizationRolesWithRole_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["role_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(role_id), 10) + return NewItemOrganizationRolesWithRole_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOrganizationRolesRequestBuilderInternal instantiates a new ItemOrganizationRolesRequestBuilder and sets the default values. +func NewItemOrganizationRolesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesRequestBuilder) { + m := &ItemOrganizationRolesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles", pathParameters), + } + return m +} +// NewItemOrganizationRolesRequestBuilder instantiates a new ItemOrganizationRolesRequestBuilder and sets the default values. +func NewItemOrganizationRolesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemOrganizationRolesGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#get-all-organization-roles-for-an-organization +func (m *ItemOrganizationRolesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemOrganizationRolesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemOrganizationRolesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemOrganizationRolesGetResponseable), nil +} +// Post creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a OrganizationRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#create-a-custom-organization-role +func (m *ItemOrganizationRolesRequestBuilder) Post(ctx context.Context, body ItemOrganizationRolesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable), nil +} +// Teams the teams property +// returns a *ItemOrganizationRolesTeamsRequestBuilder when successful +func (m *ItemOrganizationRolesRequestBuilder) Teams()(*ItemOrganizationRolesTeamsRequestBuilder) { + return NewItemOrganizationRolesTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemOrganizationRolesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// Users the users property +// returns a *ItemOrganizationRolesUsersRequestBuilder when successful +func (m *ItemOrganizationRolesRequestBuilder) Users()(*ItemOrganizationRolesUsersRequestBuilder) { + return NewItemOrganizationRolesUsersRequestBuilderInternal(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. +// returns a *ItemOrganizationRolesRequestBuilder when successful +func (m *ItemOrganizationRolesRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesRequestBuilder) { + return NewItemOrganizationRolesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_teams_item_with_role_item_request_builder.go b/pkg/github/orgs/item_organization_roles_teams_item_with_role_item_request_builder.go new file mode 100644 index 0000000..696641c --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_teams_item_with_role_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\teams\{team_slug}\{role_id} +type ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilderInternal instantiates a new ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) { + m := &ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}", pathParameters), + } + return m +} +// NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder instantiates a new ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#remove-an-organization-role-from-a-team +func (m *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#assign-an-organization-role-to-a-team +func (m *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder when successful +func (m *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) { + return NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_teams_request_builder.go b/pkg/github/orgs/item_organization_roles_teams_request_builder.go new file mode 100644 index 0000000..c924c5d --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_teams_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemOrganizationRolesTeamsRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\teams +type ItemOrganizationRolesTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTeam_slug gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.organizationRoles.teams.item collection +// returns a *ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder when successful +func (m *ItemOrganizationRolesTeamsRequestBuilder) ByTeam_slug(team_slug string)(*ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if team_slug != "" { + urlTplParams["team_slug"] = team_slug + } + return NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOrganizationRolesTeamsRequestBuilderInternal instantiates a new ItemOrganizationRolesTeamsRequestBuilder and sets the default values. +func NewItemOrganizationRolesTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesTeamsRequestBuilder) { + m := &ItemOrganizationRolesTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams", pathParameters), + } + return m +} +// NewItemOrganizationRolesTeamsRequestBuilder instantiates a new ItemOrganizationRolesTeamsRequestBuilder and sets the default values. +func NewItemOrganizationRolesTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesTeamsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_organization_roles_teams_with_team_slug_item_request_builder.go b/pkg/github/orgs/item_organization_roles_teams_with_team_slug_item_request_builder.go new file mode 100644 index 0000000..91b195e --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_teams_with_team_slug_item_request_builder.go @@ -0,0 +1,62 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\teams\{team_slug} +type ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRole_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.organizationRoles.teams.item.item collection +// returns a *ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder when successful +func (m *ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) ByRole_id(role_id int32)(*ItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["role_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(role_id), 10) + return NewItemOrganizationRolesTeamsItemWithRole_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilderInternal instantiates a new ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) { + m := &ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams/{team_slug}", pathParameters), + } + return m +} +// NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder instantiates a new ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#remove-all-organization-roles-for-a-team +func (m *ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder when successful +func (m *ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder) { + return NewItemOrganizationRolesTeamsWithTeam_slugItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_users_item_with_role_item_request_builder.go b/pkg/github/orgs/item_organization_roles_users_item_with_role_item_request_builder.go new file mode 100644 index 0000000..d3b9f4d --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_users_item_with_role_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\users\{username}\{role_id} +type ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilderInternal instantiates a new ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) { + m := &ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users/{username}/{role_id}", pathParameters), + } + return m +} +// NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder instantiates a new ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#remove-an-organization-role-from-a-user +func (m *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#assign-an-organization-role-to-a-user +func (m *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder when successful +func (m *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) { + return NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_users_request_builder.go b/pkg/github/orgs/item_organization_roles_users_request_builder.go new file mode 100644 index 0000000..97c46e8 --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_users_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemOrganizationRolesUsersRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\users +type ItemOrganizationRolesUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.organizationRoles.users.item collection +// returns a *ItemOrganizationRolesUsersWithUsernameItemRequestBuilder when successful +func (m *ItemOrganizationRolesUsersRequestBuilder) ByUsername(username string)(*ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemOrganizationRolesUsersWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOrganizationRolesUsersRequestBuilderInternal instantiates a new ItemOrganizationRolesUsersRequestBuilder and sets the default values. +func NewItemOrganizationRolesUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesUsersRequestBuilder) { + m := &ItemOrganizationRolesUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users", pathParameters), + } + return m +} +// NewItemOrganizationRolesUsersRequestBuilder instantiates a new ItemOrganizationRolesUsersRequestBuilder and sets the default values. +func NewItemOrganizationRolesUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesUsersRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_organization_roles_users_with_username_item_request_builder.go b/pkg/github/orgs/item_organization_roles_users_with_username_item_request_builder.go new file mode 100644 index 0000000..4b0067a --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_users_with_username_item_request_builder.go @@ -0,0 +1,62 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemOrganizationRolesUsersWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\users\{username} +type ItemOrganizationRolesUsersWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRole_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.organizationRoles.users.item.item collection +// returns a *ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder when successful +func (m *ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) ByRole_id(role_id int32)(*ItemOrganizationRolesUsersItemWithRole_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["role_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(role_id), 10) + return NewItemOrganizationRolesUsersItemWithRole_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOrganizationRolesUsersWithUsernameItemRequestBuilderInternal instantiates a new ItemOrganizationRolesUsersWithUsernameItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesUsersWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) { + m := &ItemOrganizationRolesUsersWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users/{username}", pathParameters), + } + return m +} +// NewItemOrganizationRolesUsersWithUsernameItemRequestBuilder instantiates a new ItemOrganizationRolesUsersWithUsernameItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesUsersWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesUsersWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#remove-all-organization-roles-for-a-user +func (m *ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrganizationRolesUsersWithUsernameItemRequestBuilder when successful +func (m *ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesUsersWithUsernameItemRequestBuilder) { + return NewItemOrganizationRolesUsersWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_organization_roles_with_role_item_request_builder.go b/pkg/github/orgs/item_organization_roles_with_role_item_request_builder.go new file mode 100644 index 0000000..caf0cdf --- /dev/null +++ b/pkg/github/orgs/item_organization_roles_with_role_item_request_builder.go @@ -0,0 +1,134 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOrganizationRolesWithRole_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\organization-roles\{role_id} +type ItemOrganizationRolesWithRole_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemOrganizationRolesWithRole_ItemRequestBuilderInternal instantiates a new ItemOrganizationRolesWithRole_ItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesWithRole_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesWithRole_ItemRequestBuilder) { + m := &ItemOrganizationRolesWithRole_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}", pathParameters), + } + return m +} +// NewItemOrganizationRolesWithRole_ItemRequestBuilder instantiates a new ItemOrganizationRolesWithRole_ItemRequestBuilder and sets the default values. +func NewItemOrganizationRolesWithRole_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrganizationRolesWithRole_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrganizationRolesWithRole_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#delete-a-custom-organization-role +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a OrganizationRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#get-an-organization-role +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable), nil +} +// Patch updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a OrganizationRoleable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#update-a-custom-organization-role +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) Patch(ctx context.Context, body ItemOrganizationRolesItemWithRole_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationRoleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationRoleable), nil +} +// Teams the teams property +// returns a *ItemOrganizationRolesItemTeamsRequestBuilder when successful +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) Teams()(*ItemOrganizationRolesItemTeamsRequestBuilder) { + return NewItemOrganizationRolesItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemOrganizationRolesItemWithRole_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// Users the users property +// returns a *ItemOrganizationRolesItemUsersRequestBuilder when successful +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) Users()(*ItemOrganizationRolesItemUsersRequestBuilder) { + return NewItemOrganizationRolesItemUsersRequestBuilderInternal(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. +// returns a *ItemOrganizationRolesWithRole_ItemRequestBuilder when successful +func (m *ItemOrganizationRolesWithRole_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemOrganizationRolesWithRole_ItemRequestBuilder) { + return NewItemOrganizationRolesWithRole_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_outside_collaborators_item_with_username422_error.go b/pkg/github/orgs/item_outside_collaborators_item_with_username422_error.go new file mode 100644 index 0000000..8e90328 --- /dev/null +++ b/pkg/github/orgs/item_outside_collaborators_item_with_username422_error.go @@ -0,0 +1,117 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemOutside_collaboratorsItemWithUsername422Error 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 +} +// NewItemOutside_collaboratorsItemWithUsername422Error instantiates a new ItemOutside_collaboratorsItemWithUsername422Error and sets the default values. +func NewItemOutside_collaboratorsItemWithUsername422Error()(*ItemOutside_collaboratorsItemWithUsername422Error) { + m := &ItemOutside_collaboratorsItemWithUsername422Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemOutside_collaboratorsItemWithUsername422ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOutside_collaboratorsItemWithUsername422ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemOutside_collaboratorsItemWithUsername422Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemOutside_collaboratorsItemWithUsername422Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemOutside_collaboratorsItemWithUsername422Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemOutside_collaboratorsItemWithUsername422Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOutside_collaboratorsItemWithUsername422Error) 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 +// returns a *string when successful +func (m *ItemOutside_collaboratorsItemWithUsername422Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemOutside_collaboratorsItemWithUsername422Error) 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 *ItemOutside_collaboratorsItemWithUsername422Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemOutside_collaboratorsItemWithUsername422Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemOutside_collaboratorsItemWithUsername422Error) SetMessage(value *string)() { + m.message = value +} +type ItemOutside_collaboratorsItemWithUsername422Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/orgs/item_outside_collaborators_item_with_username_put_request_body.go b/pkg/github/orgs/item_outside_collaborators_item_with_username_put_request_body.go new file mode 100644 index 0000000..b664107 --- /dev/null +++ b/pkg/github/orgs/item_outside_collaborators_item_with_username_put_request_body.go @@ -0,0 +1,80 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemOutside_collaboratorsItemWithUsernamePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + async *bool +} +// NewItemOutside_collaboratorsItemWithUsernamePutRequestBody instantiates a new ItemOutside_collaboratorsItemWithUsernamePutRequestBody and sets the default values. +func NewItemOutside_collaboratorsItemWithUsernamePutRequestBody()(*ItemOutside_collaboratorsItemWithUsernamePutRequestBody) { + m := &ItemOutside_collaboratorsItemWithUsernamePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemOutside_collaboratorsItemWithUsernamePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOutside_collaboratorsItemWithUsernamePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemOutside_collaboratorsItemWithUsernamePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemOutside_collaboratorsItemWithUsernamePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAsync gets the async property value. When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. +// returns a *bool when successful +func (m *ItemOutside_collaboratorsItemWithUsernamePutRequestBody) GetAsync()(*bool) { + return m.async +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOutside_collaboratorsItemWithUsernamePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["async"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAsync(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemOutside_collaboratorsItemWithUsernamePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("async", m.GetAsync()) + 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 *ItemOutside_collaboratorsItemWithUsernamePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAsync sets the async property value. When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. +func (m *ItemOutside_collaboratorsItemWithUsernamePutRequestBody) SetAsync(value *bool)() { + m.async = value +} +type ItemOutside_collaboratorsItemWithUsernamePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAsync()(*bool) + SetAsync(value *bool)() +} diff --git a/pkg/github/orgs/item_outside_collaborators_item_with_username_put_response.go b/pkg/github/orgs/item_outside_collaborators_item_with_username_put_response.go new file mode 100644 index 0000000..c00c2ff --- /dev/null +++ b/pkg/github/orgs/item_outside_collaborators_item_with_username_put_response.go @@ -0,0 +1,32 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemOutside_collaboratorsItemWithUsernamePutResponse struct { +} +// NewItemOutside_collaboratorsItemWithUsernamePutResponse instantiates a new ItemOutside_collaboratorsItemWithUsernamePutResponse and sets the default values. +func NewItemOutside_collaboratorsItemWithUsernamePutResponse()(*ItemOutside_collaboratorsItemWithUsernamePutResponse) { + m := &ItemOutside_collaboratorsItemWithUsernamePutResponse{ + } + return m +} +// CreateItemOutside_collaboratorsItemWithUsernamePutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemOutside_collaboratorsItemWithUsernamePutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemOutside_collaboratorsItemWithUsernamePutResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemOutside_collaboratorsItemWithUsernamePutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemOutside_collaboratorsItemWithUsernamePutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +type ItemOutside_collaboratorsItemWithUsernamePutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_outside_collaborators_request_builder.go b/pkg/github/orgs/item_outside_collaborators_request_builder.go new file mode 100644 index 0000000..94abe0f --- /dev/null +++ b/pkg/github/orgs/item_outside_collaborators_request_builder.go @@ -0,0 +1,82 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i9bc30b236570142d88004fd1b034ec56dc99a2ea976f2b6fea9218e37de0e887 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/outside_collaborators" +) + +// ItemOutside_collaboratorsRequestBuilder builds and executes requests for operations under \orgs\{org}\outside_collaborators +type ItemOutside_collaboratorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOutside_collaboratorsRequestBuilderGetQueryParameters list all users who are outside collaborators of an organization. +type ItemOutside_collaboratorsRequestBuilderGetQueryParameters struct { + // Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. + Filter *i9bc30b236570142d88004fd1b034ec56dc99a2ea976f2b6fea9218e37de0e887.GetFilterQueryParameterType `uriparametername:"filter"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.outside_collaborators.item collection +// returns a *ItemOutside_collaboratorsWithUsernameItemRequestBuilder when successful +func (m *ItemOutside_collaboratorsRequestBuilder) ByUsername(username string)(*ItemOutside_collaboratorsWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemOutside_collaboratorsWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOutside_collaboratorsRequestBuilderInternal instantiates a new ItemOutside_collaboratorsRequestBuilder and sets the default values. +func NewItemOutside_collaboratorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOutside_collaboratorsRequestBuilder) { + m := &ItemOutside_collaboratorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/outside_collaborators{?filter*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemOutside_collaboratorsRequestBuilder instantiates a new ItemOutside_collaboratorsRequestBuilder and sets the default values. +func NewItemOutside_collaboratorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOutside_collaboratorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOutside_collaboratorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all users who are outside collaborators of an organization. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/outside-collaborators#list-outside-collaborators-for-an-organization +func (m *ItemOutside_collaboratorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOutside_collaboratorsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation list all users who are outside collaborators of an organization. +// returns a *RequestInformation when successful +func (m *ItemOutside_collaboratorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOutside_collaboratorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOutside_collaboratorsRequestBuilder when successful +func (m *ItemOutside_collaboratorsRequestBuilder) WithUrl(rawUrl string)(*ItemOutside_collaboratorsRequestBuilder) { + return NewItemOutside_collaboratorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_outside_collaborators_with_username_item_request_builder.go b/pkg/github/orgs/item_outside_collaborators_with_username_item_request_builder.go new file mode 100644 index 0000000..813f5f2 --- /dev/null +++ b/pkg/github/orgs/item_outside_collaborators_with_username_item_request_builder.go @@ -0,0 +1,92 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOutside_collaboratorsWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\outside_collaborators\{username} +type ItemOutside_collaboratorsWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemOutside_collaboratorsWithUsernameItemRequestBuilderInternal instantiates a new ItemOutside_collaboratorsWithUsernameItemRequestBuilder and sets the default values. +func NewItemOutside_collaboratorsWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOutside_collaboratorsWithUsernameItemRequestBuilder) { + m := &ItemOutside_collaboratorsWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/outside_collaborators/{username}", pathParameters), + } + return m +} +// NewItemOutside_collaboratorsWithUsernameItemRequestBuilder instantiates a new ItemOutside_collaboratorsWithUsernameItemRequestBuilder and sets the default values. +func NewItemOutside_collaboratorsWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOutside_collaboratorsWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOutside_collaboratorsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removing a user from this list will remove them from all the organization's repositories. +// returns a ItemOutside_collaboratorsItemWithUsername422Error error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/outside-collaborators#remove-outside-collaborator-from-an-organization +func (m *ItemOutside_collaboratorsWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": CreateItemOutside_collaboratorsItemWithUsername422ErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put when an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-cloud@latest//articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." +// returns a ItemOutside_collaboratorsItemWithUsernamePutResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/outside-collaborators#convert-an-organization-member-to-outside-collaborator +func (m *ItemOutside_collaboratorsWithUsernameItemRequestBuilder) Put(ctx context.Context, body ItemOutside_collaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemOutside_collaboratorsItemWithUsernamePutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemOutside_collaboratorsItemWithUsernamePutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemOutside_collaboratorsItemWithUsernamePutResponseable), nil +} +// ToDeleteRequestInformation removing a user from this list will remove them from all the organization's repositories. +// returns a *RequestInformation when successful +func (m *ItemOutside_collaboratorsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation when an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-cloud@latest//articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." +// returns a *RequestInformation when successful +func (m *ItemOutside_collaboratorsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemOutside_collaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOutside_collaboratorsWithUsernameItemRequestBuilder when successful +func (m *ItemOutside_collaboratorsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemOutside_collaboratorsWithUsernameItemRequestBuilder) { + return NewItemOutside_collaboratorsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_item_item_restore_request_builder.go b/pkg/github/orgs/item_packages_item_item_restore_request_builder.go new file mode 100644 index 0000000..a644123 --- /dev/null +++ b/pkg/github/orgs/item_packages_item_item_restore_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemRestoreRequestBuilder builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\restore +type ItemPackagesItemItemRestoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters struct { + // package token + Token *string `uriparametername:"token"` +} +// NewItemPackagesItemItemRestoreRequestBuilderInternal instantiates a new ItemPackagesItemItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemRestoreRequestBuilder) { + m := &ItemPackagesItemItemRestoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/restore{?token*}", pathParameters), + } + return m +} +// NewItemPackagesItemItemRestoreRequestBuilder instantiates a new ItemPackagesItemItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemRestoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemRestoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Post restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#restore-a-package-for-an-organization +func (m *ItemPackagesItemItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemItemRestoreRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemRestoreRequestBuilder) { + return NewItemPackagesItemItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go b/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go new file mode 100644 index 0000000..a308738 --- /dev/null +++ b/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go @@ -0,0 +1,61 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemVersionsItemRestoreRequestBuilder builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\versions\{package_version_id}\restore +type ItemPackagesItemItemVersionsItemRestoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal instantiates a new ItemPackagesItemItemVersionsItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + m := &ItemPackagesItemItemVersionsItemRestoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", pathParameters), + } + return m +} +// NewItemPackagesItemItemVersionsItemRestoreRequestBuilder instantiates a new ItemPackagesItemItemVersionsItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Post restores a specific package version in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#restore-package-version-for-an-organization +func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation restores a specific package version in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemVersionsItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + return NewItemPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_item_item_versions_request_builder.go b/pkg/github/orgs/item_packages_item_item_versions_request_builder.go new file mode 100644 index 0000000..586b856 --- /dev/null +++ b/pkg/github/orgs/item_packages_item_item_versions_request_builder.go @@ -0,0 +1,89 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i86c98e855512fe4e382b3449ef2c81533effbf7d48991be1f16bb66b95f26efb "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/packages/item/item/versions" +) + +// ItemPackagesItemItemVersionsRequestBuilder builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\versions +type ItemPackagesItemItemVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The state of the package, either active or deleted. + State *i86c98e855512fe4e382b3449ef2c81533effbf7d48991be1f16bb66b95f26efb.GetStateQueryParameterType `uriparametername:"state"` +} +// ByPackage_version_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.packages.item.item.versions.item collection +// returns a *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsRequestBuilder) ByPackage_version_id(package_version_id int32)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["package_version_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(package_version_id), 10) + return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPackagesItemItemVersionsRequestBuilderInternal instantiates a new ItemPackagesItemItemVersionsRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsRequestBuilder) { + m := &ItemPackagesItemItemVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions{?page*,per_page*,state*}", pathParameters), + } + return m +} +// NewItemPackagesItemItemVersionsRequestBuilder instantiates a new ItemPackagesItemItemVersionsRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a []PackageVersionable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#list-package-versions-for-a-package-owned-by-an-organization +func (m *ItemPackagesItemItemVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageVersionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable) + } + } + return val, nil +} +// ToGetRequestInformation lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemVersionsRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemVersionsRequestBuilder) { + return NewItemPackagesItemItemVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_item_item_versions_with_package_version_item_request_builder.go b/pkg/github/orgs/item_packages_item_item_versions_with_package_version_item_request_builder.go new file mode 100644 index 0000000..78f8267 --- /dev/null +++ b/pkg/github/orgs/item_packages_item_item_versions_with_package_version_item_request_builder.go @@ -0,0 +1,93 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\versions\{package_version_id} +type ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal instantiates a new ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + m := &ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", pathParameters), + } + return m +} +// NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder instantiates a new ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#delete-package-version-for-an-organization +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specific package version in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a PackageVersionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-a-package-version-for-an-organization +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageVersionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable), nil +} +// Restore the restore property +// returns a *ItemPackagesItemItemVersionsItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Restore()(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specific package version in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_item_with_package_name_item_request_builder.go b/pkg/github/orgs/item_packages_item_with_package_name_item_request_builder.go new file mode 100644 index 0000000..55516e3 --- /dev/null +++ b/pkg/github/orgs/item_packages_item_with_package_name_item_request_builder.go @@ -0,0 +1,98 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemWithPackage_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name} +type ItemPackagesItemWithPackage_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal instantiates a new ItemPackagesItemWithPackage_nameItemRequestBuilder and sets the default values. +func NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + m := &ItemPackagesItemWithPackage_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}", pathParameters), + } + return m +} +// NewItemPackagesItemWithPackage_nameItemRequestBuilder instantiates a new ItemPackagesItemWithPackage_nameItemRequestBuilder and sets the default values. +func NewItemPackagesItemWithPackage_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#delete-a-package-for-an-organization +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a PackageEscapedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-a-package-for-an-organization +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable), nil +} +// Restore the restore property +// returns a *ItemPackagesItemItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Restore()(*ItemPackagesItemItemRestoreRequestBuilder) { + return NewItemPackagesItemItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// Versions the versions property +// returns a *ItemPackagesItemItemVersionsRequestBuilder when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Versions()(*ItemPackagesItemItemVersionsRequestBuilder) { + return NewItemPackagesItemItemVersionsRequestBuilderInternal(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. +// returns a *ItemPackagesItemWithPackage_nameItemRequestBuilder when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + return NewItemPackagesItemWithPackage_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_request_builder.go b/pkg/github/orgs/item_packages_request_builder.go new file mode 100644 index 0000000..30dfb65 --- /dev/null +++ b/pkg/github/orgs/item_packages_request_builder.go @@ -0,0 +1,90 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ief4a5560e28317e5f30cb365b0e56668a9558cd307034d4a6f4fce9f2f377ce2 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/packages" +) + +// ItemPackagesRequestBuilder builds and executes requests for operations under \orgs\{org}\packages +type ItemPackagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPackagesRequestBuilderGetQueryParameters lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type ItemPackagesRequestBuilderGetQueryParameters struct { + // The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. + Package_type *ief4a5560e28317e5f30cb365b0e56668a9558cd307034d4a6f4fce9f2f377ce2.GetPackage_typeQueryParameterType `uriparametername:"package_type"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The selected visibility of the packages. This parameter is optional and only filters an existing result set.The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`.For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + Visibility *ief4a5560e28317e5f30cb365b0e56668a9558cd307034d4a6f4fce9f2f377ce2.GetVisibilityQueryParameterType `uriparametername:"visibility"` +} +// ByPackage_type gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.packages.item collection +// returns a *ItemPackagesWithPackage_typeItemRequestBuilder when successful +func (m *ItemPackagesRequestBuilder) ByPackage_type(package_type string)(*ItemPackagesWithPackage_typeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if package_type != "" { + urlTplParams["package_type"] = package_type + } + return NewItemPackagesWithPackage_typeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPackagesRequestBuilderInternal instantiates a new ItemPackagesRequestBuilder and sets the default values. +func NewItemPackagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesRequestBuilder) { + m := &ItemPackagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages?package_type={package_type}{&page*,per_page*,visibility*}", pathParameters), + } + return m +} +// NewItemPackagesRequestBuilder instantiates a new ItemPackagesRequestBuilder and sets the default values. +func NewItemPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a []PackageEscapedable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#list-packages-for-an-organization +func (m *ItemPackagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable) + } + } + return val, nil +} +// ToGetRequestInformation lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesRequestBuilder when successful +func (m *ItemPackagesRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesRequestBuilder) { + return NewItemPackagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_packages_with_package_type_item_request_builder.go b/pkg/github/orgs/item_packages_with_package_type_item_request_builder.go new file mode 100644 index 0000000..155a32b --- /dev/null +++ b/pkg/github/orgs/item_packages_with_package_type_item_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemPackagesWithPackage_typeItemRequestBuilder builds and executes requests for operations under \orgs\{org}\packages\{package_type} +type ItemPackagesWithPackage_typeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByPackage_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.packages.item.item collection +// returns a *ItemPackagesItemWithPackage_nameItemRequestBuilder when successful +func (m *ItemPackagesWithPackage_typeItemRequestBuilder) ByPackage_name(package_name string)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if package_name != "" { + urlTplParams["package_name"] = package_name + } + return NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPackagesWithPackage_typeItemRequestBuilderInternal instantiates a new ItemPackagesWithPackage_typeItemRequestBuilder and sets the default values. +func NewItemPackagesWithPackage_typeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesWithPackage_typeItemRequestBuilder) { + m := &ItemPackagesWithPackage_typeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}", pathParameters), + } + return m +} +// NewItemPackagesWithPackage_typeItemRequestBuilder instantiates a new ItemPackagesWithPackage_typeItemRequestBuilder and sets the default values. +func NewItemPackagesWithPackage_typeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesWithPackage_typeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesWithPackage_typeItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_personal_access_token_requests_item_repositories_request_builder.go b/pkg/github/orgs/item_personal_access_token_requests_item_repositories_request_builder.go new file mode 100644 index 0000000..a0aefa2 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_token_requests_item_repositories_request_builder.go @@ -0,0 +1,75 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\personal-access-token-requests\{pat_request_id}\repositories +type ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderGetQueryParameters lists the repositories a fine-grained personal access token request is requesting access to.Only GitHub Apps can use this endpoint. +type ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderInternal instantiates a new ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder and sets the default values. +func NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) { + m := &ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder instantiates a new ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder and sets the default values. +func NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the repositories a fine-grained personal access token request is requesting access to.Only GitHub Apps can use this endpoint. +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#list-repositories-requested-to-be-accessed-by-a-fine-grained-personal-access-token +func (m *ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists the repositories a fine-grained personal access token request is requesting access to.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder when successful +func (m *ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) { + return NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_personal_access_token_requests_item_with_pat_request_post_request_body.go b/pkg/github/orgs/item_personal_access_token_requests_item_with_pat_request_post_request_body.go new file mode 100644 index 0000000..f6bef39 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_token_requests_item_with_pat_request_post_request_body.go @@ -0,0 +1,80 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Reason for approving or denying the request. Max 1024 characters. + reason *string +} +// NewItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody instantiates a new ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody and sets the default values. +func NewItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody()(*ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) { + m := &ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + return res +} +// GetReason gets the reason property value. Reason for approving or denying the request. Max 1024 characters. +// returns a *string when successful +func (m *ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) GetReason()(*string) { + return m.reason +} +// Serialize serializes information the current object +func (m *ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("reason", m.GetReason()) + 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 *ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReason sets the reason property value. Reason for approving or denying the request. Max 1024 characters. +func (m *ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBody) SetReason(value *string)() { + m.reason = value +} +type ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReason()(*string) + SetReason(value *string)() +} diff --git a/pkg/github/orgs/item_personal_access_token_requests_post_request_body.go b/pkg/github/orgs/item_personal_access_token_requests_post_request_body.go new file mode 100644 index 0000000..41fc7db --- /dev/null +++ b/pkg/github/orgs/item_personal_access_token_requests_post_request_body.go @@ -0,0 +1,115 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPersonalAccessTokenRequestsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Unique identifiers of the requests for access via fine-grained personal access token. Must be formed of between 1 and 100 `pat_request_id` values. + pat_request_ids []int32 + // Reason for approving or denying the requests. Max 1024 characters. + reason *string +} +// NewItemPersonalAccessTokenRequestsPostRequestBody instantiates a new ItemPersonalAccessTokenRequestsPostRequestBody and sets the default values. +func NewItemPersonalAccessTokenRequestsPostRequestBody()(*ItemPersonalAccessTokenRequestsPostRequestBody) { + m := &ItemPersonalAccessTokenRequestsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPersonalAccessTokenRequestsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPersonalAccessTokenRequestsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPersonalAccessTokenRequestsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pat_request_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetPatRequestIds(res) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + return res +} +// GetPatRequestIds gets the pat_request_ids property value. Unique identifiers of the requests for access via fine-grained personal access token. Must be formed of between 1 and 100 `pat_request_id` values. +// returns a []int32 when successful +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) GetPatRequestIds()([]int32) { + return m.pat_request_ids +} +// GetReason gets the reason property value. Reason for approving or denying the requests. Max 1024 characters. +// returns a *string when successful +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) GetReason()(*string) { + return m.reason +} +// Serialize serializes information the current object +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPatRequestIds() != nil { + err := writer.WriteCollectionOfInt32Values("pat_request_ids", m.GetPatRequestIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + 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 *ItemPersonalAccessTokenRequestsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPatRequestIds sets the pat_request_ids property value. Unique identifiers of the requests for access via fine-grained personal access token. Must be formed of between 1 and 100 `pat_request_id` values. +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) SetPatRequestIds(value []int32)() { + m.pat_request_ids = value +} +// SetReason sets the reason property value. Reason for approving or denying the requests. Max 1024 characters. +func (m *ItemPersonalAccessTokenRequestsPostRequestBody) SetReason(value *string)() { + m.reason = value +} +type ItemPersonalAccessTokenRequestsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPatRequestIds()([]int32) + GetReason()(*string) + SetPatRequestIds(value []int32)() + SetReason(value *string)() +} diff --git a/pkg/github/orgs/item_personal_access_token_requests_post_response.go b/pkg/github/orgs/item_personal_access_token_requests_post_response.go new file mode 100644 index 0000000..46e9544 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_token_requests_post_response.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPersonalAccessTokenRequestsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemPersonalAccessTokenRequestsPostResponse instantiates a new ItemPersonalAccessTokenRequestsPostResponse and sets the default values. +func NewItemPersonalAccessTokenRequestsPostResponse()(*ItemPersonalAccessTokenRequestsPostResponse) { + m := &ItemPersonalAccessTokenRequestsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPersonalAccessTokenRequestsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPersonalAccessTokenRequestsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPersonalAccessTokenRequestsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPersonalAccessTokenRequestsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPersonalAccessTokenRequestsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemPersonalAccessTokenRequestsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPersonalAccessTokenRequestsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemPersonalAccessTokenRequestsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_personal_access_token_requests_request_builder.go b/pkg/github/orgs/item_personal_access_token_requests_request_builder.go new file mode 100644 index 0000000..efcb4a9 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_token_requests_request_builder.go @@ -0,0 +1,145 @@ +package orgs + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i36fc4ef1d6b81a809f590950bffaea825a8ede841666554e6532b4de87c79070 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/personalaccesstokenrequests" +) + +// ItemPersonalAccessTokenRequestsRequestBuilder builds and executes requests for operations under \orgs\{org}\personal-access-token-requests +type ItemPersonalAccessTokenRequestsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPersonalAccessTokenRequestsRequestBuilderGetQueryParameters lists requests from organization members to access organization resources with a fine-grained personal access token.Only GitHub Apps can use this endpoint. +type ItemPersonalAccessTokenRequestsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i36fc4ef1d6b81a809f590950bffaea825a8ede841666554e6532b4de87c79070.GetDirectionQueryParameterType `uriparametername:"direction"` + // Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Last_used_after *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"last_used_after"` + // Only show fine-grained personal access tokens used before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Last_used_before *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"last_used_before"` + // A list of owner usernames to use to filter the results. + Owner []string `uriparametername:"owner"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The permission to use to filter the results. + Permission *string `uriparametername:"permission"` + // The name of the repository to use to filter the results. + Repository *string `uriparametername:"repository"` + // The property by which to sort the results. + Sort *i36fc4ef1d6b81a809f590950bffaea825a8ede841666554e6532b4de87c79070.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByPat_request_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.personalAccessTokenRequests.item collection +// returns a *ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder when successful +func (m *ItemPersonalAccessTokenRequestsRequestBuilder) ByPat_request_id(pat_request_id int32)(*ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["pat_request_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(pat_request_id), 10) + return NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPersonalAccessTokenRequestsRequestBuilderInternal instantiates a new ItemPersonalAccessTokenRequestsRequestBuilder and sets the default values. +func NewItemPersonalAccessTokenRequestsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokenRequestsRequestBuilder) { + m := &ItemPersonalAccessTokenRequestsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests{?direction*,last_used_after*,last_used_before*,owner*,page*,per_page*,permission*,repository*,sort*}", pathParameters), + } + return m +} +// NewItemPersonalAccessTokenRequestsRequestBuilder instantiates a new ItemPersonalAccessTokenRequestsRequestBuilder and sets the default values. +func NewItemPersonalAccessTokenRequestsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokenRequestsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPersonalAccessTokenRequestsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists requests from organization members to access organization resources with a fine-grained personal access token.Only GitHub Apps can use this endpoint. +// returns a []OrganizationProgrammaticAccessGrantRequestable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens +func (m *ItemPersonalAccessTokenRequestsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokenRequestsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationProgrammaticAccessGrantRequestable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationProgrammaticAccessGrantRequestFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationProgrammaticAccessGrantRequestable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationProgrammaticAccessGrantRequestable) + } + } + return val, nil +} +// Post approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. +// returns a ItemPersonalAccessTokenRequestsPostResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#review-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens +func (m *ItemPersonalAccessTokenRequestsRequestBuilder) Post(ctx context.Context, body ItemPersonalAccessTokenRequestsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemPersonalAccessTokenRequestsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemPersonalAccessTokenRequestsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemPersonalAccessTokenRequestsPostResponseable), nil +} +// ToGetRequestInformation lists requests from organization members to access organization resources with a fine-grained personal access token.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokenRequestsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokenRequestsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokenRequestsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPersonalAccessTokenRequestsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPersonalAccessTokenRequestsRequestBuilder when successful +func (m *ItemPersonalAccessTokenRequestsRequestBuilder) WithUrl(rawUrl string)(*ItemPersonalAccessTokenRequestsRequestBuilder) { + return NewItemPersonalAccessTokenRequestsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_personal_access_token_requests_with_pat_request_item_request_builder.go b/pkg/github/orgs/item_personal_access_token_requests_with_pat_request_item_request_builder.go new file mode 100644 index 0000000..1da4539 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_token_requests_with_pat_request_item_request_builder.go @@ -0,0 +1,72 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\personal-access-token-requests\{pat_request_id} +type ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilderInternal instantiates a new ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder and sets the default values. +func NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) { + m := &ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests/{pat_request_id}", pathParameters), + } + return m +} +// NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder instantiates a new ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder and sets the default values. +func NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Post approves or denies a pending request to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#review-a-request-to-access-organization-resources-with-a-fine-grained-personal-access-token +func (m *ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) Post(ctx context.Context, body ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Repositories the repositories property +// returns a *ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder when successful +func (m *ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) Repositories()(*ItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilder) { + return NewItemPersonalAccessTokenRequestsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToPostRequestInformation approves or denies a pending request to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPersonalAccessTokenRequestsItemWithPat_request_PostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder when successful +func (m *ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder) { + return NewItemPersonalAccessTokenRequestsWithPat_request_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_personal_access_tokens_item_repositories_request_builder.go b/pkg/github/orgs/item_personal_access_tokens_item_repositories_request_builder.go new file mode 100644 index 0000000..026cede --- /dev/null +++ b/pkg/github/orgs/item_personal_access_tokens_item_repositories_request_builder.go @@ -0,0 +1,75 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPersonalAccessTokensItemRepositoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\personal-access-tokens\{pat_id}\repositories +type ItemPersonalAccessTokensItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPersonalAccessTokensItemRepositoriesRequestBuilderGetQueryParameters lists the repositories a fine-grained personal access token has access to.Only GitHub Apps can use this endpoint. +type ItemPersonalAccessTokensItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemPersonalAccessTokensItemRepositoriesRequestBuilderInternal instantiates a new ItemPersonalAccessTokensItemRepositoriesRequestBuilder and sets the default values. +func NewItemPersonalAccessTokensItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokensItemRepositoriesRequestBuilder) { + m := &ItemPersonalAccessTokensItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens/{pat_id}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemPersonalAccessTokensItemRepositoriesRequestBuilder instantiates a new ItemPersonalAccessTokensItemRepositoriesRequestBuilder and sets the default values. +func NewItemPersonalAccessTokensItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokensItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPersonalAccessTokensItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the repositories a fine-grained personal access token has access to.Only GitHub Apps can use this endpoint. +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#list-repositories-a-fine-grained-personal-access-token-has-access-to +func (m *ItemPersonalAccessTokensItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokensItemRepositoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists the repositories a fine-grained personal access token has access to.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokensItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokensItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPersonalAccessTokensItemRepositoriesRequestBuilder when successful +func (m *ItemPersonalAccessTokensItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*ItemPersonalAccessTokensItemRepositoriesRequestBuilder) { + return NewItemPersonalAccessTokensItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_personal_access_tokens_item_with_pat_post_request_body.go b/pkg/github/orgs/item_personal_access_tokens_item_with_pat_post_request_body.go new file mode 100644 index 0000000..4aba84f --- /dev/null +++ b/pkg/github/orgs/item_personal_access_tokens_item_with_pat_post_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPersonalAccessTokensItemWithPat_PostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemPersonalAccessTokensItemWithPat_PostRequestBody instantiates a new ItemPersonalAccessTokensItemWithPat_PostRequestBody and sets the default values. +func NewItemPersonalAccessTokensItemWithPat_PostRequestBody()(*ItemPersonalAccessTokensItemWithPat_PostRequestBody) { + m := &ItemPersonalAccessTokensItemWithPat_PostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPersonalAccessTokensItemWithPat_PostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPersonalAccessTokensItemWithPat_PostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPersonalAccessTokensItemWithPat_PostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPersonalAccessTokensItemWithPat_PostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPersonalAccessTokensItemWithPat_PostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemPersonalAccessTokensItemWithPat_PostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPersonalAccessTokensItemWithPat_PostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemPersonalAccessTokensItemWithPat_PostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_personal_access_tokens_post_request_body.go b/pkg/github/orgs/item_personal_access_tokens_post_request_body.go new file mode 100644 index 0000000..0b802b3 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_tokens_post_request_body.go @@ -0,0 +1,86 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPersonalAccessTokensPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The IDs of the fine-grained personal access tokens. + pat_ids []int32 +} +// NewItemPersonalAccessTokensPostRequestBody instantiates a new ItemPersonalAccessTokensPostRequestBody and sets the default values. +func NewItemPersonalAccessTokensPostRequestBody()(*ItemPersonalAccessTokensPostRequestBody) { + m := &ItemPersonalAccessTokensPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPersonalAccessTokensPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPersonalAccessTokensPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPersonalAccessTokensPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPersonalAccessTokensPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPersonalAccessTokensPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pat_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetPatIds(res) + } + return nil + } + return res +} +// GetPatIds gets the pat_ids property value. The IDs of the fine-grained personal access tokens. +// returns a []int32 when successful +func (m *ItemPersonalAccessTokensPostRequestBody) GetPatIds()([]int32) { + return m.pat_ids +} +// Serialize serializes information the current object +func (m *ItemPersonalAccessTokensPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPatIds() != nil { + err := writer.WriteCollectionOfInt32Values("pat_ids", m.GetPatIds()) + 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 *ItemPersonalAccessTokensPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPatIds sets the pat_ids property value. The IDs of the fine-grained personal access tokens. +func (m *ItemPersonalAccessTokensPostRequestBody) SetPatIds(value []int32)() { + m.pat_ids = value +} +type ItemPersonalAccessTokensPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPatIds()([]int32) + SetPatIds(value []int32)() +} diff --git a/pkg/github/orgs/item_personal_access_tokens_post_response.go b/pkg/github/orgs/item_personal_access_tokens_post_response.go new file mode 100644 index 0000000..1bc4138 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_tokens_post_response.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPersonalAccessTokensPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemPersonalAccessTokensPostResponse instantiates a new ItemPersonalAccessTokensPostResponse and sets the default values. +func NewItemPersonalAccessTokensPostResponse()(*ItemPersonalAccessTokensPostResponse) { + m := &ItemPersonalAccessTokensPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPersonalAccessTokensPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPersonalAccessTokensPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPersonalAccessTokensPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPersonalAccessTokensPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPersonalAccessTokensPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemPersonalAccessTokensPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPersonalAccessTokensPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemPersonalAccessTokensPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_personal_access_tokens_request_builder.go b/pkg/github/orgs/item_personal_access_tokens_request_builder.go new file mode 100644 index 0000000..7580d41 --- /dev/null +++ b/pkg/github/orgs/item_personal_access_tokens_request_builder.go @@ -0,0 +1,145 @@ +package orgs + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ie7399a0650362c45071f0217a26c4137c832fc445bd08af25c08626e74e6a79b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/personalaccesstokens" +) + +// ItemPersonalAccessTokensRequestBuilder builds and executes requests for operations under \orgs\{org}\personal-access-tokens +type ItemPersonalAccessTokensRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPersonalAccessTokensRequestBuilderGetQueryParameters lists approved fine-grained personal access tokens owned by organization members that can access organization resources.Only GitHub Apps can use this endpoint. +type ItemPersonalAccessTokensRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *ie7399a0650362c45071f0217a26c4137c832fc445bd08af25c08626e74e6a79b.GetDirectionQueryParameterType `uriparametername:"direction"` + // Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Last_used_after *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"last_used_after"` + // Only show fine-grained personal access tokens used before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Last_used_before *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"last_used_before"` + // A list of owner usernames to use to filter the results. + Owner []string `uriparametername:"owner"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The permission to use to filter the results. + Permission *string `uriparametername:"permission"` + // The name of the repository to use to filter the results. + Repository *string `uriparametername:"repository"` + // The property by which to sort the results. + Sort *ie7399a0650362c45071f0217a26c4137c832fc445bd08af25c08626e74e6a79b.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByPat_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.personalAccessTokens.item collection +// returns a *ItemPersonalAccessTokensWithPat_ItemRequestBuilder when successful +func (m *ItemPersonalAccessTokensRequestBuilder) ByPat_id(pat_id int32)(*ItemPersonalAccessTokensWithPat_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["pat_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(pat_id), 10) + return NewItemPersonalAccessTokensWithPat_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPersonalAccessTokensRequestBuilderInternal instantiates a new ItemPersonalAccessTokensRequestBuilder and sets the default values. +func NewItemPersonalAccessTokensRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokensRequestBuilder) { + m := &ItemPersonalAccessTokensRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens{?direction*,last_used_after*,last_used_before*,owner*,page*,per_page*,permission*,repository*,sort*}", pathParameters), + } + return m +} +// NewItemPersonalAccessTokensRequestBuilder instantiates a new ItemPersonalAccessTokensRequestBuilder and sets the default values. +func NewItemPersonalAccessTokensRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokensRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPersonalAccessTokensRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists approved fine-grained personal access tokens owned by organization members that can access organization resources.Only GitHub Apps can use this endpoint. +// returns a []OrganizationProgrammaticAccessGrantable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#list-fine-grained-personal-access-tokens-with-access-to-organization-resources +func (m *ItemPersonalAccessTokensRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokensRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationProgrammaticAccessGrantable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationProgrammaticAccessGrantFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationProgrammaticAccessGrantable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationProgrammaticAccessGrantable) + } + } + return val, nil +} +// Post updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access.Only GitHub Apps can use this endpoint. +// returns a ItemPersonalAccessTokensPostResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#update-the-access-to-organization-resources-via-fine-grained-personal-access-tokens +func (m *ItemPersonalAccessTokensRequestBuilder) Post(ctx context.Context, body ItemPersonalAccessTokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemPersonalAccessTokensPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemPersonalAccessTokensPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemPersonalAccessTokensPostResponseable), nil +} +// ToGetRequestInformation lists approved fine-grained personal access tokens owned by organization members that can access organization resources.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokensRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPersonalAccessTokensRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokensRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPersonalAccessTokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPersonalAccessTokensRequestBuilder when successful +func (m *ItemPersonalAccessTokensRequestBuilder) WithUrl(rawUrl string)(*ItemPersonalAccessTokensRequestBuilder) { + return NewItemPersonalAccessTokensRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_personal_access_tokens_with_pat_item_request_builder.go b/pkg/github/orgs/item_personal_access_tokens_with_pat_item_request_builder.go new file mode 100644 index 0000000..e876a2f --- /dev/null +++ b/pkg/github/orgs/item_personal_access_tokens_with_pat_item_request_builder.go @@ -0,0 +1,72 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPersonalAccessTokensWithPat_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\personal-access-tokens\{pat_id} +type ItemPersonalAccessTokensWithPat_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPersonalAccessTokensWithPat_ItemRequestBuilderInternal instantiates a new ItemPersonalAccessTokensWithPat_ItemRequestBuilder and sets the default values. +func NewItemPersonalAccessTokensWithPat_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokensWithPat_ItemRequestBuilder) { + m := &ItemPersonalAccessTokensWithPat_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens/{pat_id}", pathParameters), + } + return m +} +// NewItemPersonalAccessTokensWithPat_ItemRequestBuilder instantiates a new ItemPersonalAccessTokensWithPat_ItemRequestBuilder and sets the default values. +func NewItemPersonalAccessTokensWithPat_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPersonalAccessTokensWithPat_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPersonalAccessTokensWithPat_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Post updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token's existing access. Limited to revoking a token's existing access.Only GitHub Apps can use this endpoint. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/personal-access-tokens#update-the-access-a-fine-grained-personal-access-token-has-to-organization-resources +func (m *ItemPersonalAccessTokensWithPat_ItemRequestBuilder) Post(ctx context.Context, body ItemPersonalAccessTokensItemWithPat_PostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Repositories the repositories property +// returns a *ItemPersonalAccessTokensItemRepositoriesRequestBuilder when successful +func (m *ItemPersonalAccessTokensWithPat_ItemRequestBuilder) Repositories()(*ItemPersonalAccessTokensItemRepositoriesRequestBuilder) { + return NewItemPersonalAccessTokensItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToPostRequestInformation updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token's existing access. Limited to revoking a token's existing access.Only GitHub Apps can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemPersonalAccessTokensWithPat_ItemRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPersonalAccessTokensItemWithPat_PostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPersonalAccessTokensWithPat_ItemRequestBuilder when successful +func (m *ItemPersonalAccessTokensWithPat_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemPersonalAccessTokensWithPat_ItemRequestBuilder) { + return NewItemPersonalAccessTokensWithPat_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_projects_post_request_body.go b/pkg/github/orgs/item_projects_post_request_body.go new file mode 100644 index 0000000..32b6494 --- /dev/null +++ b/pkg/github/orgs/item_projects_post_request_body.go @@ -0,0 +1,109 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemProjectsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the project. + body *string + // The name of the project. + name *string +} +// NewItemProjectsPostRequestBody instantiates a new ItemProjectsPostRequestBody and sets the default values. +func NewItemProjectsPostRequestBody()(*ItemProjectsPostRequestBody) { + m := &ItemProjectsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemProjectsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProjectsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProjectsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemProjectsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The description of the project. +// returns a *string when successful +func (m *ItemProjectsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProjectsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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 + } + return res +} +// GetName gets the name property value. The name of the project. +// returns a *string when successful +func (m *ItemProjectsPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemProjectsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemProjectsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The description of the project. +func (m *ItemProjectsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetName sets the name property value. The name of the project. +func (m *ItemProjectsPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemProjectsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetName()(*string) + SetBody(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/orgs/item_projects_request_builder.go b/pkg/github/orgs/item_projects_request_builder.go new file mode 100644 index 0000000..60de29c --- /dev/null +++ b/pkg/github/orgs/item_projects_request_builder.go @@ -0,0 +1,117 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ied68167754867cd7f1a3e750735be1a57aa2c5eb3d431365061d022d2e3cbbaa "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/projects" +) + +// ItemProjectsRequestBuilder builds and executes requests for operations under \orgs\{org}\projects +type ItemProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemProjectsRequestBuilderGetQueryParameters lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +type ItemProjectsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Indicates the state of the projects to return. + State *ied68167754867cd7f1a3e750735be1a57aa2c5eb3d431365061d022d2e3cbbaa.GetStateQueryParameterType `uriparametername:"state"` +} +// NewItemProjectsRequestBuilderInternal instantiates a new ItemProjectsRequestBuilder and sets the default values. +func NewItemProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { + m := &ItemProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/projects{?page*,per_page*,state*}", pathParameters), + } + return m +} +// NewItemProjectsRequestBuilder instantiates a new ItemProjectsRequestBuilder and sets the default values. +func NewItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemProjectsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a []Projectable when successful +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#list-organization-projects +func (m *ItemProjectsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable) + } + } + return val, nil +} +// Post creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a Projectable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#create-an-organization-project +func (m *ItemProjectsRequestBuilder) Post(ctx context.Context, body ItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable), nil +} +// ToGetRequestInformation lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *ItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemProjectsRequestBuilder when successful +func (m *ItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemProjectsRequestBuilder) { + return NewItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_properties_request_builder.go b/pkg/github/orgs/item_properties_request_builder.go new file mode 100644 index 0000000..25a021a --- /dev/null +++ b/pkg/github/orgs/item_properties_request_builder.go @@ -0,0 +1,33 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemPropertiesRequestBuilder builds and executes requests for operations under \orgs\{org}\properties +type ItemPropertiesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPropertiesRequestBuilderInternal instantiates a new ItemPropertiesRequestBuilder and sets the default values. +func NewItemPropertiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesRequestBuilder) { + m := &ItemPropertiesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/properties", pathParameters), + } + return m +} +// NewItemPropertiesRequestBuilder instantiates a new ItemPropertiesRequestBuilder and sets the default values. +func NewItemPropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPropertiesRequestBuilderInternal(urlParams, requestAdapter) +} +// Schema the schema property +// returns a *ItemPropertiesSchemaRequestBuilder when successful +func (m *ItemPropertiesRequestBuilder) Schema()(*ItemPropertiesSchemaRequestBuilder) { + return NewItemPropertiesSchemaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Values the values property +// returns a *ItemPropertiesValuesRequestBuilder when successful +func (m *ItemPropertiesRequestBuilder) Values()(*ItemPropertiesValuesRequestBuilder) { + return NewItemPropertiesValuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_properties_schema_item_with_custom_property_name_put_request_body.go b/pkg/github/orgs/item_properties_schema_item_with_custom_property_name_put_request_body.go new file mode 100644 index 0000000..de3b798 --- /dev/null +++ b/pkg/github/orgs/item_properties_schema_item_with_custom_property_name_put_request_body.go @@ -0,0 +1,244 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An ordered list of the allowed values of the property.The property can have up to 200 allowed values. + allowed_values []string + // Default value of the property + default_value ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable + // Short description of the property + description *string + // Whether the property is required. + required *bool +} +// ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value composed type wrapper for classes string +type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value struct { + // Composed type representation for type string + string *string +} +// NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value instantiates a new ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value and sets the default values. +func NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value()(*ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) { + m := &ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value{ + } + return m +} +// CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetString sets the string property value. Composed type representation for type string +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) SetString(value *string)() { + m.string = value +} +type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetString()(*string) + SetString(value *string)() +} +// NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody instantiates a new ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody and sets the default values. +func NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody()(*ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) { + m := &ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedValues gets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +// returns a []string when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetAllowedValues()([]string) { + return m.allowed_values +} +// GetDefaultValue gets the default_value property value. Default value of the property +// returns a ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetDefaultValue()(ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable) { + return m.default_value +} +// GetDescription gets the description property value. Short description of the property +// returns a *string when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAllowedValues(res) + } + return nil + } + res["default_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + return res +} +// GetRequired gets the required property value. Whether the property is required. +// returns a *bool when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetRequired()(*bool) { + return m.required +} +// Serialize serializes information the current object +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedValues() != nil { + err := writer.WriteCollectionOfStringValues("allowed_values", m.GetAllowedValues()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("default_value", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedValues sets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetAllowedValues(value []string)() { + m.allowed_values = value +} +// SetDefaultValue sets the default_value property value. Default value of the property +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetDefaultValue(value ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable)() { + m.default_value = value +} +// SetDescription sets the description property value. Short description of the property +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetRequired sets the required property value. Whether the property is required. +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetRequired(value *bool)() { + m.required = value +} +type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedValues()([]string) + GetDefaultValue()(ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable) + GetDescription()(*string) + GetRequired()(*bool) + SetAllowedValues(value []string)() + SetDefaultValue(value ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable)() + SetDescription(value *string)() + SetRequired(value *bool)() +} diff --git a/pkg/github/orgs/item_properties_schema_patch_request_body.go b/pkg/github/orgs/item_properties_schema_patch_request_body.go new file mode 100644 index 0000000..09a2926 --- /dev/null +++ b/pkg/github/orgs/item_properties_schema_patch_request_body.go @@ -0,0 +1,93 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemPropertiesSchemaPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The array of custom properties to create or update. + properties []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable +} +// NewItemPropertiesSchemaPatchRequestBody instantiates a new ItemPropertiesSchemaPatchRequestBody and sets the default values. +func NewItemPropertiesSchemaPatchRequestBody()(*ItemPropertiesSchemaPatchRequestBody) { + m := &ItemPropertiesSchemaPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPropertiesSchemaPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPropertiesSchemaPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPropertiesSchemaPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPropertiesSchemaPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPropertiesSchemaPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgCustomPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable) + } + } + m.SetProperties(res) + } + return nil + } + return res +} +// GetProperties gets the properties property value. The array of custom properties to create or update. +// returns a []OrgCustomPropertyable when successful +func (m *ItemPropertiesSchemaPatchRequestBody) GetProperties()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable) { + return m.properties +} +// Serialize serializes information the current object +func (m *ItemPropertiesSchemaPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPropertiesSchemaPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetProperties sets the properties property value. The array of custom properties to create or update. +func (m *ItemPropertiesSchemaPatchRequestBody) SetProperties(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable)() { + m.properties = value +} +type ItemPropertiesSchemaPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProperties()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable) + SetProperties(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable)() +} diff --git a/pkg/github/orgs/item_properties_schema_request_builder.go b/pkg/github/orgs/item_properties_schema_request_builder.go new file mode 100644 index 0000000..9fcaa0f --- /dev/null +++ b/pkg/github/orgs/item_properties_schema_request_builder.go @@ -0,0 +1,118 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPropertiesSchemaRequestBuilder builds and executes requests for operations under \orgs\{org}\properties\schema +type ItemPropertiesSchemaRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCustom_property_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.properties.schema.item collection +// returns a *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder when successful +func (m *ItemPropertiesSchemaRequestBuilder) ByCustom_property_name(custom_property_name string)(*ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if custom_property_name != "" { + urlTplParams["custom_property_name"] = custom_property_name + } + return NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPropertiesSchemaRequestBuilderInternal instantiates a new ItemPropertiesSchemaRequestBuilder and sets the default values. +func NewItemPropertiesSchemaRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesSchemaRequestBuilder) { + m := &ItemPropertiesSchemaRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/properties/schema", pathParameters), + } + return m +} +// NewItemPropertiesSchemaRequestBuilder instantiates a new ItemPropertiesSchemaRequestBuilder and sets the default values. +func NewItemPropertiesSchemaRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesSchemaRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPropertiesSchemaRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets all custom properties defined for an organization.Organization members can read these properties. +// returns a []OrgCustomPropertyable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#get-all-custom-properties-for-an-organization +func (m *ItemPropertiesSchemaRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable) + } + } + return val, nil +} +// Patch creates new or updates existing custom properties defined for an organization in a batch.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. +// returns a []OrgCustomPropertyable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization +func (m *ItemPropertiesSchemaRequestBuilder) Patch(ctx context.Context, body ItemPropertiesSchemaPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable) + } + } + return val, nil +} +// ToGetRequestInformation gets all custom properties defined for an organization.Organization members can read these properties. +// returns a *RequestInformation when successful +func (m *ItemPropertiesSchemaRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation creates new or updates existing custom properties defined for an organization in a batch.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. +// returns a *RequestInformation when successful +func (m *ItemPropertiesSchemaRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemPropertiesSchemaPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPropertiesSchemaRequestBuilder when successful +func (m *ItemPropertiesSchemaRequestBuilder) WithUrl(rawUrl string)(*ItemPropertiesSchemaRequestBuilder) { + return NewItemPropertiesSchemaRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go b/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go new file mode 100644 index 0000000..5738338 --- /dev/null +++ b/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go @@ -0,0 +1,129 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\properties\schema\{custom_property_name} +type ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilderInternal instantiates a new ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder and sets the default values. +func NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) { + m := &ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/properties/schema/{custom_property_name}", pathParameters), + } + return m +} +// NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder instantiates a new ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder and sets the default values. +func NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#remove-a-custom-property-for-an-organization +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a custom property that is defined for an organization.Organization members can read these properties. +// returns a OrgCustomPropertyable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#get-a-custom-property-for-an-organization +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable), nil +} +// Put creates a new or updates an existing custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. +// returns a OrgCustomPropertyable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Put(ctx context.Context, body ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgCustomPropertyable), nil +} +// ToDeleteRequestInformation removes a custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. +// returns a *RequestInformation when successful +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a custom property that is defined for an organization.Organization members can read these properties. +// returns a *RequestInformation when successful +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates a new or updates an existing custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. +// returns a *RequestInformation when successful +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder when successful +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) { + return NewItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_properties_values_patch_request_body.go b/pkg/github/orgs/item_properties_values_patch_request_body.go new file mode 100644 index 0000000..b95045f --- /dev/null +++ b/pkg/github/orgs/item_properties_values_patch_request_body.go @@ -0,0 +1,128 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemPropertiesValuesPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of custom property names and associated values to apply to the repositories. + properties []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable + // The names of repositories that the custom property values will be applied to. + repository_names []string +} +// NewItemPropertiesValuesPatchRequestBody instantiates a new ItemPropertiesValuesPatchRequestBody and sets the default values. +func NewItemPropertiesValuesPatchRequestBody()(*ItemPropertiesValuesPatchRequestBody) { + m := &ItemPropertiesValuesPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPropertiesValuesPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemPropertiesValuesPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPropertiesValuesPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemPropertiesValuesPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemPropertiesValuesPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCustomPropertyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) + } + } + m.SetProperties(res) + } + return nil + } + res["repository_names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositoryNames(res) + } + return nil + } + return res +} +// GetProperties gets the properties property value. List of custom property names and associated values to apply to the repositories. +// returns a []CustomPropertyValueable when successful +func (m *ItemPropertiesValuesPatchRequestBody) GetProperties()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) { + return m.properties +} +// GetRepositoryNames gets the repository_names property value. The names of repositories that the custom property values will be applied to. +// returns a []string when successful +func (m *ItemPropertiesValuesPatchRequestBody) GetRepositoryNames()([]string) { + return m.repository_names +} +// Serialize serializes information the current object +func (m *ItemPropertiesValuesPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + if m.GetRepositoryNames() != nil { + err := writer.WriteCollectionOfStringValues("repository_names", m.GetRepositoryNames()) + 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 *ItemPropertiesValuesPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetProperties sets the properties property value. List of custom property names and associated values to apply to the repositories. +func (m *ItemPropertiesValuesPatchRequestBody) SetProperties(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable)() { + m.properties = value +} +// SetRepositoryNames sets the repository_names property value. The names of repositories that the custom property values will be applied to. +func (m *ItemPropertiesValuesPatchRequestBody) SetRepositoryNames(value []string)() { + m.repository_names = value +} +type ItemPropertiesValuesPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProperties()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) + GetRepositoryNames()([]string) + SetProperties(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable)() + SetRepositoryNames(value []string)() +} diff --git a/pkg/github/orgs/item_properties_values_request_builder.go b/pkg/github/orgs/item_properties_values_request_builder.go new file mode 100644 index 0000000..cce093c --- /dev/null +++ b/pkg/github/orgs/item_properties_values_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPropertiesValuesRequestBuilder builds and executes requests for operations under \orgs\{org}\properties\values +type ItemPropertiesValuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPropertiesValuesRequestBuilderGetQueryParameters lists organization repositories with all of their custom property values.Organization members can read these properties. +type ItemPropertiesValuesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Finds repositories in the organization with a query containing one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/enterprise-cloud@latest//articles/searching-for-repositories/)" for a detailed list of qualifiers. + Repository_query *string `uriparametername:"repository_query"` +} +// NewItemPropertiesValuesRequestBuilderInternal instantiates a new ItemPropertiesValuesRequestBuilder and sets the default values. +func NewItemPropertiesValuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesValuesRequestBuilder) { + m := &ItemPropertiesValuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/properties/values{?page*,per_page*,repository_query*}", pathParameters), + } + return m +} +// NewItemPropertiesValuesRequestBuilder instantiates a new ItemPropertiesValuesRequestBuilder and sets the default values. +func NewItemPropertiesValuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPropertiesValuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPropertiesValuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists organization repositories with all of their custom property values.Organization members can read these properties. +// returns a []OrgRepoCustomPropertyValuesable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#list-custom-property-values-for-organization-repositories +func (m *ItemPropertiesValuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPropertiesValuesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRepoCustomPropertyValuesable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgRepoCustomPropertyValuesFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRepoCustomPropertyValuesable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRepoCustomPropertyValuesable) + } + } + return val, nil +} +// Patch create new or update existing custom property values for repositories in a batch that belong to an organization.Each target repository will have its custom property values updated to match the values provided in the request.A maximum of 30 repositories can be updated in a single request.Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_values_editor` in the organization. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories +func (m *ItemPropertiesValuesRequestBuilder) Patch(ctx context.Context, body ItemPropertiesValuesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation lists organization repositories with all of their custom property values.Organization members can read these properties. +// returns a *RequestInformation when successful +func (m *ItemPropertiesValuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPropertiesValuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation create new or update existing custom property values for repositories in a batch that belong to an organization.Each target repository will have its custom property values updated to match the values provided in the request.A maximum of 30 repositories can be updated in a single request.Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_values_editor` in the organization. +// returns a *RequestInformation when successful +func (m *ItemPropertiesValuesRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemPropertiesValuesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPropertiesValuesRequestBuilder when successful +func (m *ItemPropertiesValuesRequestBuilder) WithUrl(rawUrl string)(*ItemPropertiesValuesRequestBuilder) { + return NewItemPropertiesValuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_public_members_request_builder.go b/pkg/github/orgs/item_public_members_request_builder.go new file mode 100644 index 0000000..b07856b --- /dev/null +++ b/pkg/github/orgs/item_public_members_request_builder.go @@ -0,0 +1,79 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPublic_membersRequestBuilder builds and executes requests for operations under \orgs\{org}\public_members +type ItemPublic_membersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPublic_membersRequestBuilderGetQueryParameters members of an organization can choose to have their membership publicized or not. +type ItemPublic_membersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.public_members.item collection +// returns a *ItemPublic_membersWithUsernameItemRequestBuilder when successful +func (m *ItemPublic_membersRequestBuilder) ByUsername(username string)(*ItemPublic_membersWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemPublic_membersWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPublic_membersRequestBuilderInternal instantiates a new ItemPublic_membersRequestBuilder and sets the default values. +func NewItemPublic_membersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPublic_membersRequestBuilder) { + m := &ItemPublic_membersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/public_members{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemPublic_membersRequestBuilder instantiates a new ItemPublic_membersRequestBuilder and sets the default values. +func NewItemPublic_membersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPublic_membersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPublic_membersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get members of an organization can choose to have their membership publicized or not. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#list-public-organization-members +func (m *ItemPublic_membersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPublic_membersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation members of an organization can choose to have their membership publicized or not. +// returns a *RequestInformation when successful +func (m *ItemPublic_membersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPublic_membersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPublic_membersRequestBuilder when successful +func (m *ItemPublic_membersRequestBuilder) WithUrl(rawUrl string)(*ItemPublic_membersRequestBuilder) { + return NewItemPublic_membersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_public_members_with_username_item_request_builder.go b/pkg/github/orgs/item_public_members_with_username_item_request_builder.go new file mode 100644 index 0000000..0fee3ff --- /dev/null +++ b/pkg/github/orgs/item_public_members_with_username_item_request_builder.go @@ -0,0 +1,101 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPublic_membersWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\public_members\{username} +type ItemPublic_membersWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPublic_membersWithUsernameItemRequestBuilderInternal instantiates a new ItemPublic_membersWithUsernameItemRequestBuilder and sets the default values. +func NewItemPublic_membersWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPublic_membersWithUsernameItemRequestBuilder) { + m := &ItemPublic_membersWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/public_members/{username}", pathParameters), + } + return m +} +// NewItemPublic_membersWithUsernameItemRequestBuilder instantiates a new ItemPublic_membersWithUsernameItemRequestBuilder and sets the default values. +func NewItemPublic_membersWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPublic_membersWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPublic_membersWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#remove-public-organization-membership-for-the-authenticated-user +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get check if the provided user is a public member of the organization. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#check-public-organization-membership-for-a-user +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put the user can publicize their own membership. (A user cannot publicize the membership for another user.)Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#set-public-organization-membership-for-the-authenticated-user +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. +// returns a *RequestInformation when successful +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation check if the provided user is a public member of the organization. +// returns a *RequestInformation when successful +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation the user can publicize their own membership. (A user cannot publicize the membership for another user.)Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a *RequestInformation when successful +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPublic_membersWithUsernameItemRequestBuilder when successful +func (m *ItemPublic_membersWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemPublic_membersWithUsernameItemRequestBuilder) { + return NewItemPublic_membersWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_repos_post_request_body.go b/pkg/github/orgs/item_repos_post_request_body.go new file mode 100644 index 0000000..167f5c0 --- /dev/null +++ b/pkg/github/orgs/item_repos_post_request_body.go @@ -0,0 +1,634 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemReposPostRequestBody 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 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 + // Pass `true` to create an initial commit with empty README. + auto_init *bool + // The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. + custom_properties ItemReposPostRequestBody_custom_propertiesable + // Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. **The authenticated user must be an organization owner to set this property to `true`.** + delete_branch_on_merge *bool + // A short description of the repository. + description *string + // Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + gitignore_template *string + // Whether downloads are enabled. + has_downloads *bool + // 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 + // Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/enterprise-cloud@latest//articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + license_template *string + // The name of the repository. + name *string + // Whether the repository is private. + private *bool + // The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + team_id *int32 + // 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 +} +// NewItemReposPostRequestBody instantiates a new ItemReposPostRequestBody and sets the default values. +func NewItemReposPostRequestBody()(*ItemReposPostRequestBody) { + m := &ItemReposPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemReposPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemReposPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemReposPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemReposPostRequestBody) 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetAutoInit gets the auto_init property value. Pass `true` to create an initial commit with empty README. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetAutoInit()(*bool) { + return m.auto_init +} +// GetCustomProperties gets the custom_properties property value. The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. +// returns a ItemReposPostRequestBody_custom_propertiesable when successful +func (m *ItemReposPostRequestBody) GetCustomProperties()(ItemReposPostRequestBody_custom_propertiesable) { + return m.custom_properties +} +// 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. **The authenticated user must be an organization owner to set this property to `true`.** +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDescription gets the description property value. A short description of the repository. +// returns a *string when successful +func (m *ItemReposPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemReposPostRequestBody) 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_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["auto_init"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoInit(val) + } + return nil + } + res["custom_properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemReposPostRequestBody_custom_propertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomProperties(val.(ItemReposPostRequestBody_custom_propertiesable)) + } + 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["gitignore_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitignoreTemplate(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_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["license_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicenseTemplate(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["team_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamId(val) + } + 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 + } + return res +} +// GetGitignoreTemplate gets the gitignore_template property value. Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". +// returns a *string when successful +func (m *ItemReposPostRequestBody) GetGitignoreTemplate()(*string) { + return m.gitignore_template +} +// GetHasDownloads gets the has_downloads property value. Whether downloads are enabled. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. Either `true` to enable issues for this repository or `false` to disable them. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. A URL with more information about the repository. +// returns a *string when successful +func (m *ItemReposPostRequestBody) 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. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetIsTemplate()(*bool) { + return m.is_template +} +// GetLicenseTemplate gets the license_template property value. Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/enterprise-cloud@latest//articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". +// returns a *string when successful +func (m *ItemReposPostRequestBody) GetLicenseTemplate()(*string) { + return m.license_template +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *ItemReposPostRequestBody) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Whether the repository is private. +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetPrivate()(*bool) { + return m.private +} +// GetTeamId gets the team_id property value. The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. +// returns a *int32 when successful +func (m *ItemReposPostRequestBody) GetTeamId()(*int32) { + return m.team_id +} +// 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: +// returns a *bool when successful +func (m *ItemReposPostRequestBody) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// Serialize serializes information the current object +func (m *ItemReposPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_auto_merge", m.GetAllowAutoMerge()) + 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("auto_init", m.GetAutoInit()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("custom_properties", m.GetCustomProperties()) + 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.WriteStringValue("gitignore_template", m.GetGitignoreTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_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("license_template", m.GetLicenseTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("team_id", m.GetTeamId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + 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 *ItemReposPostRequestBody) 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 *ItemReposPostRequestBody) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = 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 *ItemReposPostRequestBody) 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 *ItemReposPostRequestBody) 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 *ItemReposPostRequestBody) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetAutoInit sets the auto_init property value. Pass `true` to create an initial commit with empty README. +func (m *ItemReposPostRequestBody) SetAutoInit(value *bool)() { + m.auto_init = value +} +// SetCustomProperties sets the custom_properties property value. The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. +func (m *ItemReposPostRequestBody) SetCustomProperties(value ItemReposPostRequestBody_custom_propertiesable)() { + m.custom_properties = 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. **The authenticated user must be an organization owner to set this property to `true`.** +func (m *ItemReposPostRequestBody) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDescription sets the description property value. A short description of the repository. +func (m *ItemReposPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetGitignoreTemplate sets the gitignore_template property value. Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". +func (m *ItemReposPostRequestBody) SetGitignoreTemplate(value *string)() { + m.gitignore_template = value +} +// SetHasDownloads sets the has_downloads property value. Whether downloads are enabled. +func (m *ItemReposPostRequestBody) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. Either `true` to enable issues for this repository or `false` to disable them. +func (m *ItemReposPostRequestBody) 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 *ItemReposPostRequestBody) 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 *ItemReposPostRequestBody) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. A URL with more information about the repository. +func (m *ItemReposPostRequestBody) 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 *ItemReposPostRequestBody) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetLicenseTemplate sets the license_template property value. Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/enterprise-cloud@latest//articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". +func (m *ItemReposPostRequestBody) SetLicenseTemplate(value *string)() { + m.license_template = value +} +// SetName sets the name property value. The name of the repository. +func (m *ItemReposPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Whether the repository is private. +func (m *ItemReposPostRequestBody) SetPrivate(value *bool)() { + m.private = value +} +// SetTeamId sets the team_id property value. The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. +func (m *ItemReposPostRequestBody) SetTeamId(value *int32)() { + m.team_id = 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 *ItemReposPostRequestBody) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +type ItemReposPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetAutoInit()(*bool) + GetCustomProperties()(ItemReposPostRequestBody_custom_propertiesable) + GetDeleteBranchOnMerge()(*bool) + GetDescription()(*string) + GetGitignoreTemplate()(*string) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetIsTemplate()(*bool) + GetLicenseTemplate()(*string) + GetName()(*string) + GetPrivate()(*bool) + GetTeamId()(*int32) + GetUseSquashPrTitleAsDefault()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetAutoInit(value *bool)() + SetCustomProperties(value ItemReposPostRequestBody_custom_propertiesable)() + SetDeleteBranchOnMerge(value *bool)() + SetDescription(value *string)() + SetGitignoreTemplate(value *string)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetIsTemplate(value *bool)() + SetLicenseTemplate(value *string)() + SetName(value *string)() + SetPrivate(value *bool)() + SetTeamId(value *int32)() + SetUseSquashPrTitleAsDefault(value *bool)() +} diff --git a/pkg/github/orgs/item_repos_post_request_body_custom_properties.go b/pkg/github/orgs/item_repos_post_request_body_custom_properties.go new file mode 100644 index 0000000..17425c2 --- /dev/null +++ b/pkg/github/orgs/item_repos_post_request_body_custom_properties.go @@ -0,0 +1,52 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemReposPostRequestBody_custom_properties the custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. +type ItemReposPostRequestBody_custom_properties struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemReposPostRequestBody_custom_properties instantiates a new ItemReposPostRequestBody_custom_properties and sets the default values. +func NewItemReposPostRequestBody_custom_properties()(*ItemReposPostRequestBody_custom_properties) { + m := &ItemReposPostRequestBody_custom_properties{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemReposPostRequestBody_custom_propertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemReposPostRequestBody_custom_propertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemReposPostRequestBody_custom_properties(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemReposPostRequestBody_custom_properties) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemReposPostRequestBody_custom_properties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemReposPostRequestBody_custom_properties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemReposPostRequestBody_custom_properties) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemReposPostRequestBody_custom_propertiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_repos_request_builder.go b/pkg/github/orgs/item_repos_request_builder.go new file mode 100644 index 0000000..fafd967 --- /dev/null +++ b/pkg/github/orgs/item_repos_request_builder.go @@ -0,0 +1,111 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i7ddfea8f95de89bfbb296303d2bb85aec6f0dbddb32718604ef37e2ec6b90c66 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/repos" +) + +// ItemReposRequestBuilder builds and executes requests for operations under \orgs\{org}\repos +type ItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemReposRequestBuilderGetQueryParameters lists repositories for the specified organization.**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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +type ItemReposRequestBuilderGetQueryParameters struct { + // The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + Direction *i7ddfea8f95de89bfbb296303d2bb85aec6f0dbddb32718604ef37e2ec6b90c66.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. + Sort *i7ddfea8f95de89bfbb296303d2bb85aec6f0dbddb32718604ef37e2ec6b90c66.GetSortQueryParameterType `uriparametername:"sort"` + // Specifies the types of repositories you want returned. `internal` is not yet supported when a GitHub App calls this endpoint with an installation access token. + Type *i7ddfea8f95de89bfbb296303d2bb85aec6f0dbddb32718604ef37e2ec6b90c66.GetTypeQueryParameterType `uriparametername:"type"` +} +// NewItemReposRequestBuilderInternal instantiates a new ItemReposRequestBuilder and sets the default values. +func NewItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposRequestBuilder) { + m := &ItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/repos{?direction*,page*,per_page*,sort*,type*}", pathParameters), + } + return m +} +// NewItemReposRequestBuilder instantiates a new ItemReposRequestBuilder and sets the default values. +func NewItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReposRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories for the specified organization.**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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +// returns a []MinimalRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-organization-repositories +func (m *ItemReposRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReposRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// Post creates a new repository in the specified organization. The authenticated user must be a member of the organization.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. +// returns a FullRepositoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-an-organization-repository +func (m *ItemReposRequestBuilder) Post(ctx context.Context, body ItemReposPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// ToGetRequestInformation lists repositories for the specified organization.**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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +// returns a *RequestInformation when successful +func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReposRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new repository in the specified organization. The authenticated user must be a member of the organization.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. +// returns a *RequestInformation when successful +func (m *ItemReposRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemReposPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemReposRequestBuilder when successful +func (m *ItemReposRequestBuilder) WithUrl(rawUrl string)(*ItemReposRequestBuilder) { + return NewItemReposRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_repository_fine_grained_permissions_request_builder.go b/pkg/github/orgs/item_repository_fine_grained_permissions_request_builder.go new file mode 100644 index 0000000..e3baf5b --- /dev/null +++ b/pkg/github/orgs/item_repository_fine_grained_permissions_request_builder.go @@ -0,0 +1,60 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemRepositoryFineGrainedPermissionsRequestBuilder builds and executes requests for operations under \orgs\{org}\repository-fine-grained-permissions +type ItemRepositoryFineGrainedPermissionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemRepositoryFineGrainedPermissionsRequestBuilderInternal instantiates a new ItemRepositoryFineGrainedPermissionsRequestBuilder and sets the default values. +func NewItemRepositoryFineGrainedPermissionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRepositoryFineGrainedPermissionsRequestBuilder) { + m := &ItemRepositoryFineGrainedPermissionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/repository-fine-grained-permissions", pathParameters), + } + return m +} +// NewItemRepositoryFineGrainedPermissionsRequestBuilder instantiates a new ItemRepositoryFineGrainedPermissionsRequestBuilder and sets the default values. +func NewItemRepositoryFineGrainedPermissionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRepositoryFineGrainedPermissionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRepositoryFineGrainedPermissionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the fine-grained permissions that can be used in custom repository roles for an organization. For more information, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a []RepositoryFineGrainedPermissionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-repository-fine-grained-permissions-for-an-organization +func (m *ItemRepositoryFineGrainedPermissionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryFineGrainedPermissionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFineGrainedPermissionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryFineGrainedPermissionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryFineGrainedPermissionable) + } + } + return val, nil +} +// ToGetRequestInformation lists the fine-grained permissions that can be used in custom repository roles for an organization. For more information, see "[About custom repository roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemRepositoryFineGrainedPermissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRepositoryFineGrainedPermissionsRequestBuilder when successful +func (m *ItemRepositoryFineGrainedPermissionsRequestBuilder) WithUrl(rawUrl string)(*ItemRepositoryFineGrainedPermissionsRequestBuilder) { + return NewItemRepositoryFineGrainedPermissionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_rulesets_item_with_ruleset_put_request_body.go b/pkg/github/orgs/item_rulesets_item_with_ruleset_put_request_body.go new file mode 100644 index 0000000..6f2ba03 --- /dev/null +++ b/pkg/github/orgs/item_rulesets_item_with_ruleset_put_request_body.go @@ -0,0 +1,222 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemRulesetsItemWithRuleset_PutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The actors that can bypass the rules in this ruleset + bypass_actors []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable + // Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. + conditions i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + enforcement *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement + // The name of the ruleset. + name *string + // An array of rules within the ruleset. + rules []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable +} +// NewItemRulesetsItemWithRuleset_PutRequestBody instantiates a new ItemRulesetsItemWithRuleset_PutRequestBody and sets the default values. +func NewItemRulesetsItemWithRuleset_PutRequestBody()(*ItemRulesetsItemWithRuleset_PutRequestBody) { + m := &ItemRulesetsItemWithRuleset_PutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemRulesetsItemWithRuleset_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemRulesetsItemWithRuleset_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemRulesetsItemWithRuleset_PutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassActors gets the bypass_actors property value. The actors that can bypass the rules in this ruleset +// returns a []RepositoryRulesetBypassActorable when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) { + return m.bypass_actors +} +// GetConditions gets the conditions property value. Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. +// returns a OrgRulesetConditionsable when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable) { + return m.conditions +} +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// returns a *RepositoryRuleEnforcement when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) { + return m.enforcement +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_actors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetBypassActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + } + } + m.SetBypassActors(res) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgRulesetConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable)) + } + return nil + } + res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseRepositoryRuleEnforcement) + if err != nil { + return err + } + if val != nil { + m.SetEnforcement(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)) + } + 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["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + } + } + m.SetRules(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the ruleset. +// returns a *string when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetName()(*string) { + return m.name +} +// GetRules gets the rules property value. An array of rules within the ruleset. +// returns a []RepositoryRuleable when successful +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) { + return m.rules +} +// Serialize serializes information the current object +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBypassActors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBypassActors())) + for i, v := range m.GetBypassActors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bypass_actors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + if m.GetEnforcement() != nil { + cast := (*m.GetEnforcement()).String() + err := writer.WriteStringValue("enforcement", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassActors sets the bypass_actors property value. The actors that can bypass the rules in this ruleset +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() { + m.bypass_actors = value +} +// SetConditions sets the conditions property value. Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable)() { + m.conditions = value +} +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() { + m.enforcement = value +} +// SetName sets the name property value. The name of the ruleset. +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetName(value *string)() { + m.name = value +} +// SetRules sets the rules property value. An array of rules within the ruleset. +func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() { + m.rules = value +} +type ItemRulesetsItemWithRuleset_PutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable) + GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) + GetName()(*string) + GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() + SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable)() + SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() + SetName(value *string)() + SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() +} diff --git a/pkg/github/orgs/item_rulesets_post_request_body.go b/pkg/github/orgs/item_rulesets_post_request_body.go new file mode 100644 index 0000000..951ec07 --- /dev/null +++ b/pkg/github/orgs/item_rulesets_post_request_body.go @@ -0,0 +1,222 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemRulesetsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The actors that can bypass the rules in this ruleset + bypass_actors []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable + // Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. + conditions i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + enforcement *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement + // The name of the ruleset. + name *string + // An array of rules within the ruleset. + rules []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable +} +// NewItemRulesetsPostRequestBody instantiates a new ItemRulesetsPostRequestBody and sets the default values. +func NewItemRulesetsPostRequestBody()(*ItemRulesetsPostRequestBody) { + m := &ItemRulesetsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemRulesetsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemRulesetsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemRulesetsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemRulesetsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassActors gets the bypass_actors property value. The actors that can bypass the rules in this ruleset +// returns a []RepositoryRulesetBypassActorable when successful +func (m *ItemRulesetsPostRequestBody) GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) { + return m.bypass_actors +} +// GetConditions gets the conditions property value. Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. +// returns a OrgRulesetConditionsable when successful +func (m *ItemRulesetsPostRequestBody) GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable) { + return m.conditions +} +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// returns a *RepositoryRuleEnforcement when successful +func (m *ItemRulesetsPostRequestBody) GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) { + return m.enforcement +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemRulesetsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_actors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetBypassActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + } + } + m.SetBypassActors(res) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgRulesetConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable)) + } + return nil + } + res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseRepositoryRuleEnforcement) + if err != nil { + return err + } + if val != nil { + m.SetEnforcement(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)) + } + 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["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + } + } + m.SetRules(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the ruleset. +// returns a *string when successful +func (m *ItemRulesetsPostRequestBody) GetName()(*string) { + return m.name +} +// GetRules gets the rules property value. An array of rules within the ruleset. +// returns a []RepositoryRuleable when successful +func (m *ItemRulesetsPostRequestBody) GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) { + return m.rules +} +// Serialize serializes information the current object +func (m *ItemRulesetsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBypassActors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBypassActors())) + for i, v := range m.GetBypassActors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bypass_actors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + if m.GetEnforcement() != nil { + cast := (*m.GetEnforcement()).String() + err := writer.WriteStringValue("enforcement", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemRulesetsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassActors sets the bypass_actors property value. The actors that can bypass the rules in this ruleset +func (m *ItemRulesetsPostRequestBody) SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() { + m.bypass_actors = value +} +// SetConditions sets the conditions property value. Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties. +func (m *ItemRulesetsPostRequestBody) SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable)() { + m.conditions = value +} +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +func (m *ItemRulesetsPostRequestBody) SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() { + m.enforcement = value +} +// SetName sets the name property value. The name of the ruleset. +func (m *ItemRulesetsPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRules sets the rules property value. An array of rules within the ruleset. +func (m *ItemRulesetsPostRequestBody) SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() { + m.rules = value +} +type ItemRulesetsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable) + GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) + GetName()(*string) + GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() + SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgRulesetConditionsable)() + SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() + SetName(value *string)() + SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() +} diff --git a/pkg/github/orgs/item_rulesets_request_builder.go b/pkg/github/orgs/item_rulesets_request_builder.go new file mode 100644 index 0000000..beb51a3 --- /dev/null +++ b/pkg/github/orgs/item_rulesets_request_builder.go @@ -0,0 +1,126 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemRulesetsRequestBuilder builds and executes requests for operations under \orgs\{org}\rulesets +type ItemRulesetsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemRulesetsRequestBuilderGetQueryParameters get all the repository rulesets for an organization. +type ItemRulesetsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRuleset_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.rulesets.item collection +// returns a *ItemRulesetsWithRuleset_ItemRequestBuilder when successful +func (m *ItemRulesetsRequestBuilder) ByRuleset_id(ruleset_id int32)(*ItemRulesetsWithRuleset_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["ruleset_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(ruleset_id), 10) + return NewItemRulesetsWithRuleset_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemRulesetsRequestBuilderInternal instantiates a new ItemRulesetsRequestBuilder and sets the default values. +func NewItemRulesetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsRequestBuilder) { + m := &ItemRulesetsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemRulesetsRequestBuilder instantiates a new ItemRulesetsRequestBuilder and sets the default values. +func NewItemRulesetsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRulesetsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get all the repository rulesets for an organization. +// returns a []RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rules#get-all-organization-repository-rulesets +func (m *ItemRulesetsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRulesetsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable) + } + } + return val, nil +} +// Post create a repository ruleset for an organization. +// returns a RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rules#create-an-organization-repository-ruleset +func (m *ItemRulesetsRequestBuilder) Post(ctx context.Context, body ItemRulesetsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable), nil +} +// RuleSuites the ruleSuites property +// returns a *ItemRulesetsRuleSuitesRequestBuilder when successful +func (m *ItemRulesetsRequestBuilder) RuleSuites()(*ItemRulesetsRuleSuitesRequestBuilder) { + return NewItemRulesetsRuleSuitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation get all the repository rulesets for an organization. +// returns a *RequestInformation when successful +func (m *ItemRulesetsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRulesetsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a repository ruleset for an organization. +// returns a *RequestInformation when successful +func (m *ItemRulesetsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemRulesetsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesetsRequestBuilder when successful +func (m *ItemRulesetsRequestBuilder) WithUrl(rawUrl string)(*ItemRulesetsRequestBuilder) { + return NewItemRulesetsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go b/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go new file mode 100644 index 0000000..603eb20 --- /dev/null +++ b/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go @@ -0,0 +1,93 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i833ac8e90c82c8f666c7cd677c3d2548c7d68fbc156daf09cce37f63eedac29b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/rulesets/rulesuites" +) + +// ItemRulesetsRuleSuitesRequestBuilder builds and executes requests for operations under \orgs\{org}\rulesets\rule-suites +type ItemRulesetsRuleSuitesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemRulesetsRuleSuitesRequestBuilderGetQueryParameters lists suites of rule evaluations at the organization level.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." +type ItemRulesetsRuleSuitesRequestBuilderGetQueryParameters struct { + // The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. + Actor_name *string `uriparametername:"actor_name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. + Repository_name *int32 `uriparametername:"repository_name"` + // The rule results to filter on. When specified, only suites with this result will be returned. + Rule_suite_result *i833ac8e90c82c8f666c7cd677c3d2548c7d68fbc156daf09cce37f63eedac29b.GetRule_suite_resultQueryParameterType `uriparametername:"rule_suite_result"` + // The time period to filter by.For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + Time_period *i833ac8e90c82c8f666c7cd677c3d2548c7d68fbc156daf09cce37f63eedac29b.GetTime_periodQueryParameterType `uriparametername:"time_period"` +} +// ByRule_suite_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.rulesets.ruleSuites.item collection +// returns a *ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder when successful +func (m *ItemRulesetsRuleSuitesRequestBuilder) ByRule_suite_id(rule_suite_id int32)(*ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["rule_suite_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(rule_suite_id), 10) + return NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemRulesetsRuleSuitesRequestBuilderInternal instantiates a new ItemRulesetsRuleSuitesRequestBuilder and sets the default values. +func NewItemRulesetsRuleSuitesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsRuleSuitesRequestBuilder) { + m := &ItemRulesetsRuleSuitesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/rule-suites{?actor_name*,page*,per_page*,repository_name*,rule_suite_result*,time_period*}", pathParameters), + } + return m +} +// NewItemRulesetsRuleSuitesRequestBuilder instantiates a new ItemRulesetsRuleSuitesRequestBuilder and sets the default values. +func NewItemRulesetsRuleSuitesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsRuleSuitesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRulesetsRuleSuitesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists suites of rule evaluations at the organization level.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." +// returns a []RuleSuitesable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rule-suites#list-organization-rule-suites +func (m *ItemRulesetsRuleSuitesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRulesetsRuleSuitesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuitesable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRuleSuitesFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuitesable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuitesable) + } + } + return val, nil +} +// ToGetRequestInformation lists suites of rule evaluations at the organization level.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." +// returns a *RequestInformation when successful +func (m *ItemRulesetsRuleSuitesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRulesetsRuleSuitesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesetsRuleSuitesRequestBuilder when successful +func (m *ItemRulesetsRuleSuitesRequestBuilder) WithUrl(rawUrl string)(*ItemRulesetsRuleSuitesRequestBuilder) { + return NewItemRulesetsRuleSuitesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_rulesets_rule_suites_with_rule_suite_item_request_builder.go b/pkg/github/orgs/item_rulesets_rule_suites_with_rule_suite_item_request_builder.go new file mode 100644 index 0000000..2596a3d --- /dev/null +++ b/pkg/github/orgs/item_rulesets_rule_suites_with_rule_suite_item_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\rulesets\rule-suites\{rule_suite_id} +type ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal instantiates a new ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder and sets the default values. +func NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + m := &ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", pathParameters), + } + return m +} +// NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder instantiates a new ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder and sets the default values. +func NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about a suite of rule evaluations from within an organization.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." +// returns a RuleSuiteable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rule-suites#get-an-organization-rule-suite +func (m *ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuiteable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRuleSuiteFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuiteable), nil +} +// ToGetRequestInformation gets information about a suite of rule evaluations from within an organization.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." +// returns a *RequestInformation when successful +func (m *ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder when successful +func (m *ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + return NewItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go b/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go new file mode 100644 index 0000000..61a4731 --- /dev/null +++ b/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go @@ -0,0 +1,129 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemRulesetsWithRuleset_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\rulesets\{ruleset_id} +type ItemRulesetsWithRuleset_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemRulesetsWithRuleset_ItemRequestBuilderInternal instantiates a new ItemRulesetsWithRuleset_ItemRequestBuilder and sets the default values. +func NewItemRulesetsWithRuleset_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsWithRuleset_ItemRequestBuilder) { + m := &ItemRulesetsWithRuleset_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}", pathParameters), + } + return m +} +// NewItemRulesetsWithRuleset_ItemRequestBuilder instantiates a new ItemRulesetsWithRuleset_ItemRequestBuilder and sets the default values. +func NewItemRulesetsWithRuleset_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsWithRuleset_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRulesetsWithRuleset_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a ruleset for an organization. +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rules#delete-an-organization-repository-ruleset +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get a repository ruleset for an organization. +// returns a RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rules#get-an-organization-repository-ruleset +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable), nil +} +// Put update a ruleset for an organization. +// returns a RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/rules#update-an-organization-repository-ruleset +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) Put(ctx context.Context, body ItemRulesetsItemWithRuleset_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable), nil +} +// ToDeleteRequestInformation delete a ruleset for an organization. +// returns a *RequestInformation when successful +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation get a repository ruleset for an organization. +// returns a *RequestInformation when successful +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation update a ruleset for an organization. +// returns a *RequestInformation when successful +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemRulesetsItemWithRuleset_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesetsWithRuleset_ItemRequestBuilder when successful +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemRulesetsWithRuleset_ItemRequestBuilder) { + return NewItemRulesetsWithRuleset_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go b/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go new file mode 100644 index 0000000..73460ee --- /dev/null +++ b/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go @@ -0,0 +1,90 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ie6e7e96112e711be5d0159adaf9b2cda61910addb0e82c40d3356503e7ed76f8 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/secretscanning/alerts" +) + +// ItemSecretScanningAlertsRequestBuilder builds and executes requests for operations under \orgs\{org}\secret-scanning\alerts +type ItemSecretScanningAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSecretScanningAlertsRequestBuilderGetQueryParameters lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +type ItemSecretScanningAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *ie6e7e96112e711be5d0159adaf9b2cda61910addb0e82c40d3356503e7ed76f8.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. + Resolution *string `uriparametername:"resolution"` + // A comma-separated list of secret types to return. By default all secret types are returned.See "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)"for a complete list of secret types. + Secret_type *string `uriparametername:"secret_type"` + // The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + Sort *ie6e7e96112e711be5d0159adaf9b2cda61910addb0e82c40d3356503e7ed76f8.GetSortQueryParameterType `uriparametername:"sort"` + // Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + State *ie6e7e96112e711be5d0159adaf9b2cda61910addb0e82c40d3356503e7ed76f8.GetStateQueryParameterType `uriparametername:"state"` + // A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. + Validity *string `uriparametername:"validity"` +} +// NewItemSecretScanningAlertsRequestBuilderInternal instantiates a new ItemSecretScanningAlertsRequestBuilder and sets the default values. +func NewItemSecretScanningAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningAlertsRequestBuilder) { + m := &ItemSecretScanningAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning/alerts{?after*,before*,direction*,page*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", pathParameters), + } + return m +} +// NewItemSecretScanningAlertsRequestBuilder instantiates a new ItemSecretScanningAlertsRequestBuilder and sets the default values. +func NewItemSecretScanningAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecretScanningAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a []OrganizationSecretScanningAlertable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a Alerts503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization +func (m *ItemSecretScanningAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSecretScanningAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSecretScanningAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAlerts503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSecretScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSecretScanningAlertable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSecretScanningAlertable) + } + } + return val, nil +} +// ToGetRequestInformation lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemSecretScanningAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSecretScanningAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSecretScanningAlertsRequestBuilder when successful +func (m *ItemSecretScanningAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemSecretScanningAlertsRequestBuilder) { + return NewItemSecretScanningAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_secret_scanning_request_builder.go b/pkg/github/orgs/item_secret_scanning_request_builder.go new file mode 100644 index 0000000..2ffa92c --- /dev/null +++ b/pkg/github/orgs/item_secret_scanning_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSecretScanningRequestBuilder builds and executes requests for operations under \orgs\{org}\secret-scanning +type ItemSecretScanningRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemSecretScanningAlertsRequestBuilder when successful +func (m *ItemSecretScanningRequestBuilder) Alerts()(*ItemSecretScanningAlertsRequestBuilder) { + return NewItemSecretScanningAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSecretScanningRequestBuilderInternal instantiates a new ItemSecretScanningRequestBuilder and sets the default values. +func NewItemSecretScanningRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningRequestBuilder) { + m := &ItemSecretScanningRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning", pathParameters), + } + return m +} +// NewItemSecretScanningRequestBuilder instantiates a new ItemSecretScanningRequestBuilder and sets the default values. +func NewItemSecretScanningRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecretScanningRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecretScanningRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_security_advisories_request_builder.go b/pkg/github/orgs/item_security_advisories_request_builder.go new file mode 100644 index 0000000..f21aafb --- /dev/null +++ b/pkg/github/orgs/item_security_advisories_request_builder.go @@ -0,0 +1,82 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i1588c179a8115ecdb33d1e775d77520529de945c2e1c5e8f0653125033ae247c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/securityadvisories" +) + +// ItemSecurityAdvisoriesRequestBuilder builds and executes requests for operations under \orgs\{org}\security-advisories +type ItemSecurityAdvisoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSecurityAdvisoriesRequestBuilderGetQueryParameters lists repository security advisories for an organization.The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +type ItemSecurityAdvisoriesRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i1588c179a8115ecdb33d1e775d77520529de945c2e1c5e8f0653125033ae247c.GetDirectionQueryParameterType `uriparametername:"direction"` + // The number of advisories to return per page. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. + Sort *i1588c179a8115ecdb33d1e775d77520529de945c2e1c5e8f0653125033ae247c.GetSortQueryParameterType `uriparametername:"sort"` + // Filter by the state of the repository advisories. Only advisories of this state will be returned. + State *i1588c179a8115ecdb33d1e775d77520529de945c2e1c5e8f0653125033ae247c.GetStateQueryParameterType `uriparametername:"state"` +} +// NewItemSecurityAdvisoriesRequestBuilderInternal instantiates a new ItemSecurityAdvisoriesRequestBuilder and sets the default values. +func NewItemSecurityAdvisoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityAdvisoriesRequestBuilder) { + m := &ItemSecurityAdvisoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/security-advisories{?after*,before*,direction*,per_page*,sort*,state*}", pathParameters), + } + return m +} +// NewItemSecurityAdvisoriesRequestBuilder instantiates a new ItemSecurityAdvisoriesRequestBuilder and sets the default values. +func NewItemSecurityAdvisoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityAdvisoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecurityAdvisoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repository security advisories for an organization.The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a []RepositoryAdvisoryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#list-repository-security-advisories-for-an-organization +func (m *ItemSecurityAdvisoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSecurityAdvisoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists repository security advisories for an organization.The authenticated user must be an owner or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSecurityAdvisoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSecurityAdvisoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSecurityAdvisoriesRequestBuilder when successful +func (m *ItemSecurityAdvisoriesRequestBuilder) WithUrl(rawUrl string)(*ItemSecurityAdvisoriesRequestBuilder) { + return NewItemSecurityAdvisoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_security_managers_request_builder.go b/pkg/github/orgs/item_security_managers_request_builder.go new file mode 100644 index 0000000..046586d --- /dev/null +++ b/pkg/github/orgs/item_security_managers_request_builder.go @@ -0,0 +1,65 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSecurityManagersRequestBuilder builds and executes requests for operations under \orgs\{org}\security-managers +type ItemSecurityManagersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSecurityManagersRequestBuilderInternal instantiates a new ItemSecurityManagersRequestBuilder and sets the default values. +func NewItemSecurityManagersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityManagersRequestBuilder) { + m := &ItemSecurityManagersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/security-managers", pathParameters), + } + return m +} +// NewItemSecurityManagersRequestBuilder instantiates a new ItemSecurityManagersRequestBuilder and sets the default values. +func NewItemSecurityManagersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityManagersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecurityManagersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a []TeamSimpleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/security-managers#list-security-manager-teams +func (m *ItemSecurityManagersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamSimpleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamSimpleable) + } + } + return val, nil +} +// Teams the teams property +// returns a *ItemSecurityManagersTeamsRequestBuilder when successful +func (m *ItemSecurityManagersRequestBuilder) Teams()(*ItemSecurityManagersTeamsRequestBuilder) { + return NewItemSecurityManagersTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSecurityManagersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSecurityManagersRequestBuilder when successful +func (m *ItemSecurityManagersRequestBuilder) WithUrl(rawUrl string)(*ItemSecurityManagersRequestBuilder) { + return NewItemSecurityManagersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_security_managers_teams_request_builder.go b/pkg/github/orgs/item_security_managers_teams_request_builder.go new file mode 100644 index 0000000..7110d5f --- /dev/null +++ b/pkg/github/orgs/item_security_managers_teams_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSecurityManagersTeamsRequestBuilder builds and executes requests for operations under \orgs\{org}\security-managers\teams +type ItemSecurityManagersTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTeam_slug gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.securityManagers.teams.item collection +// returns a *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder when successful +func (m *ItemSecurityManagersTeamsRequestBuilder) ByTeam_slug(team_slug string)(*ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if team_slug != "" { + urlTplParams["team_slug"] = team_slug + } + return NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSecurityManagersTeamsRequestBuilderInternal instantiates a new ItemSecurityManagersTeamsRequestBuilder and sets the default values. +func NewItemSecurityManagersTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityManagersTeamsRequestBuilder) { + m := &ItemSecurityManagersTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/security-managers/teams", pathParameters), + } + return m +} +// NewItemSecurityManagersTeamsRequestBuilder instantiates a new ItemSecurityManagersTeamsRequestBuilder and sets the default values. +func NewItemSecurityManagersTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityManagersTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecurityManagersTeamsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_security_managers_teams_with_team_slug_item_request_builder.go b/pkg/github/orgs/item_security_managers_teams_with_team_slug_item_request_builder.go new file mode 100644 index 0000000..3e9f232 --- /dev/null +++ b/pkg/github/orgs/item_security_managers_teams_with_team_slug_item_request_builder.go @@ -0,0 +1,73 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder builds and executes requests for operations under \orgs\{org}\security-managers\teams\{team_slug} +type ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilderInternal instantiates a new ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) { + m := &ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/security-managers/teams/{team_slug}", pathParameters), + } + return m +} +// NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder instantiates a new ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/security-managers#remove-a-security-manager-team +func (m *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/security-managers#add-a-security-manager-team +func (m *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder when successful +func (m *ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) WithUrl(rawUrl string)(*ItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder) { + return NewItemSecurityManagersTeamsWithTeam_slugItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_billing_actions_request_builder.go b/pkg/github/orgs/item_settings_billing_actions_request_builder.go new file mode 100644 index 0000000..c4e7e76 --- /dev/null +++ b/pkg/github/orgs/item_settings_billing_actions_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingActionsRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\billing\actions +type ItemSettingsBillingActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingActionsRequestBuilderInternal instantiates a new ItemSettingsBillingActionsRequestBuilder and sets the default values. +func NewItemSettingsBillingActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingActionsRequestBuilder) { + m := &ItemSettingsBillingActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/actions", pathParameters), + } + return m +} +// NewItemSettingsBillingActionsRequestBuilder instantiates a new ItemSettingsBillingActionsRequestBuilder and sets the default values. +func NewItemSettingsBillingActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the summary of the free and paid GitHub Actions minutes used.Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. +// returns a ActionsBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-github-actions-billing-for-an-organization +func (m *ItemSettingsBillingActionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsBillingUsageable), nil +} +// ToGetRequestInformation gets the summary of the free and paid GitHub Actions minutes used.Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingActionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingActionsRequestBuilder when successful +func (m *ItemSettingsBillingActionsRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingActionsRequestBuilder) { + return NewItemSettingsBillingActionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_billing_advanced_security_request_builder.go b/pkg/github/orgs/item_settings_billing_advanced_security_request_builder.go new file mode 100644 index 0000000..9a3909d --- /dev/null +++ b/pkg/github/orgs/item_settings_billing_advanced_security_request_builder.go @@ -0,0 +1,64 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingAdvancedSecurityRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\billing\advanced-security +type ItemSettingsBillingAdvancedSecurityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters gets the GitHub Advanced Security active committers for an organization per repository.Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository.If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level.The total number of repositories with committer information is tracked by the `total_count` field. +type ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal instantiates a new ItemSettingsBillingAdvancedSecurityRequestBuilder and sets the default values. +func NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + m := &ItemSettingsBillingAdvancedSecurityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/advanced-security{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemSettingsBillingAdvancedSecurityRequestBuilder instantiates a new ItemSettingsBillingAdvancedSecurityRequestBuilder and sets the default values. +func NewItemSettingsBillingAdvancedSecurityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the GitHub Advanced Security active committers for an organization per repository.Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository.If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level.The total number of repositories with committer information is tracked by the `total_count` field. +// returns a AdvancedSecurityActiveCommittersable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-github-advanced-security-active-committers-for-an-organization +func (m *ItemSettingsBillingAdvancedSecurityRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AdvancedSecurityActiveCommittersable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAdvancedSecurityActiveCommittersFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AdvancedSecurityActiveCommittersable), nil +} +// ToGetRequestInformation gets the GitHub Advanced Security active committers for an organization per repository.Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository.If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level.The total number of repositories with committer information is tracked by the `total_count` field. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingAdvancedSecurityRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingAdvancedSecurityRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingAdvancedSecurityRequestBuilder when successful +func (m *ItemSettingsBillingAdvancedSecurityRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + return NewItemSettingsBillingAdvancedSecurityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_billing_packages_request_builder.go b/pkg/github/orgs/item_settings_billing_packages_request_builder.go new file mode 100644 index 0000000..44df564 --- /dev/null +++ b/pkg/github/orgs/item_settings_billing_packages_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingPackagesRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\billing\packages +type ItemSettingsBillingPackagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingPackagesRequestBuilderInternal instantiates a new ItemSettingsBillingPackagesRequestBuilder and sets the default values. +func NewItemSettingsBillingPackagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingPackagesRequestBuilder) { + m := &ItemSettingsBillingPackagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/packages", pathParameters), + } + return m +} +// NewItemSettingsBillingPackagesRequestBuilder instantiates a new ItemSettingsBillingPackagesRequestBuilder and sets the default values. +func NewItemSettingsBillingPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingPackagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingPackagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the free and paid storage used for GitHub Packages in gigabytes.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. +// returns a PackagesBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-github-packages-billing-for-an-organization +func (m *ItemSettingsBillingPackagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackagesBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackagesBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackagesBillingUsageable), nil +} +// ToGetRequestInformation gets the free and paid storage used for GitHub Packages in gigabytes.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingPackagesRequestBuilder when successful +func (m *ItemSettingsBillingPackagesRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingPackagesRequestBuilder) { + return NewItemSettingsBillingPackagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_billing_request_builder.go b/pkg/github/orgs/item_settings_billing_request_builder.go new file mode 100644 index 0000000..1b43c7a --- /dev/null +++ b/pkg/github/orgs/item_settings_billing_request_builder.go @@ -0,0 +1,43 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsBillingRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\billing +type ItemSettingsBillingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Actions the actions property +// returns a *ItemSettingsBillingActionsRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Actions()(*ItemSettingsBillingActionsRequestBuilder) { + return NewItemSettingsBillingActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AdvancedSecurity the advancedSecurity property +// returns a *ItemSettingsBillingAdvancedSecurityRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) AdvancedSecurity()(*ItemSettingsBillingAdvancedSecurityRequestBuilder) { + return NewItemSettingsBillingAdvancedSecurityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsBillingRequestBuilderInternal instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + m := &ItemSettingsBillingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing", pathParameters), + } + return m +} +// NewItemSettingsBillingRequestBuilder instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingRequestBuilderInternal(urlParams, requestAdapter) +} +// Packages the packages property +// returns a *ItemSettingsBillingPackagesRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Packages()(*ItemSettingsBillingPackagesRequestBuilder) { + return NewItemSettingsBillingPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SharedStorage the sharedStorage property +// returns a *ItemSettingsBillingSharedStorageRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) SharedStorage()(*ItemSettingsBillingSharedStorageRequestBuilder) { + return NewItemSettingsBillingSharedStorageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_settings_billing_shared_storage_request_builder.go b/pkg/github/orgs/item_settings_billing_shared_storage_request_builder.go new file mode 100644 index 0000000..d4356e1 --- /dev/null +++ b/pkg/github/orgs/item_settings_billing_shared_storage_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingSharedStorageRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\billing\shared-storage +type ItemSettingsBillingSharedStorageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingSharedStorageRequestBuilderInternal instantiates a new ItemSettingsBillingSharedStorageRequestBuilder and sets the default values. +func NewItemSettingsBillingSharedStorageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingSharedStorageRequestBuilder) { + m := &ItemSettingsBillingSharedStorageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/shared-storage", pathParameters), + } + return m +} +// NewItemSettingsBillingSharedStorageRequestBuilder instantiates a new ItemSettingsBillingSharedStorageRequestBuilder and sets the default values. +func NewItemSettingsBillingSharedStorageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingSharedStorageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingSharedStorageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. +// returns a CombinedBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-shared-storage-billing-for-an-organization +func (m *ItemSettingsBillingSharedStorageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCombinedBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedBillingUsageable), nil +} +// ToGetRequestInformation gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingSharedStorageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingSharedStorageRequestBuilder when successful +func (m *ItemSettingsBillingSharedStorageRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingSharedStorageRequestBuilder) { + return NewItemSettingsBillingSharedStorageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_request_builder.go b/pkg/github/orgs/item_settings_request_builder.go new file mode 100644 index 0000000..8939a22 --- /dev/null +++ b/pkg/github/orgs/item_settings_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsRequestBuilder builds and executes requests for operations under \orgs\{org}\settings +type ItemSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Billing the billing property +// returns a *ItemSettingsBillingRequestBuilder when successful +func (m *ItemSettingsRequestBuilder) Billing()(*ItemSettingsBillingRequestBuilder) { + return NewItemSettingsBillingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsRequestBuilderInternal instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + m := &ItemSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings", pathParameters), + } + return m +} +// NewItemSettingsRequestBuilder instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_team_sync_groups_request_builder.go b/pkg/github/orgs/item_team_sync_groups_request_builder.go new file mode 100644 index 0000000..7906ae5 --- /dev/null +++ b/pkg/github/orgs/item_team_sync_groups_request_builder.go @@ -0,0 +1,66 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamSyncGroupsRequestBuilder builds and executes requests for operations under \orgs\{org}\team-sync\groups +type ItemTeamSyncGroupsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamSyncGroupsRequestBuilderGetQueryParameters lists IdP groups available in an organization. +type ItemTeamSyncGroupsRequestBuilderGetQueryParameters struct { + // Page token + Page *string `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Filters the results to return only those that begin with the value specified by this parameter. For example, a value of `ab` will return results that begin with "ab". + Q *string `uriparametername:"q"` +} +// NewItemTeamSyncGroupsRequestBuilderInternal instantiates a new ItemTeamSyncGroupsRequestBuilder and sets the default values. +func NewItemTeamSyncGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncGroupsRequestBuilder) { + m := &ItemTeamSyncGroupsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team-sync/groups{?page*,per_page*,q*}", pathParameters), + } + return m +} +// NewItemTeamSyncGroupsRequestBuilder instantiates a new ItemTeamSyncGroupsRequestBuilder and sets the default values. +func NewItemTeamSyncGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncGroupsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamSyncGroupsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists IdP groups available in an organization. +// returns a GroupMappingable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-an-organization +func (m *ItemTeamSyncGroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamSyncGroupsRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGroupMappingFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable), nil +} +// ToGetRequestInformation lists IdP groups available in an organization. +// returns a *RequestInformation when successful +func (m *ItemTeamSyncGroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamSyncGroupsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamSyncGroupsRequestBuilder when successful +func (m *ItemTeamSyncGroupsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamSyncGroupsRequestBuilder) { + return NewItemTeamSyncGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_team_sync_request_builder.go b/pkg/github/orgs/item_team_sync_request_builder.go new file mode 100644 index 0000000..e8402b7 --- /dev/null +++ b/pkg/github/orgs/item_team_sync_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamSyncRequestBuilder builds and executes requests for operations under \orgs\{org}\team-sync +type ItemTeamSyncRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamSyncRequestBuilderInternal instantiates a new ItemTeamSyncRequestBuilder and sets the default values. +func NewItemTeamSyncRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncRequestBuilder) { + m := &ItemTeamSyncRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team-sync", pathParameters), + } + return m +} +// NewItemTeamSyncRequestBuilder instantiates a new ItemTeamSyncRequestBuilder and sets the default values. +func NewItemTeamSyncRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamSyncRequestBuilderInternal(urlParams, requestAdapter) +} +// Groups the groups property +// returns a *ItemTeamSyncGroupsRequestBuilder when successful +func (m *ItemTeamSyncRequestBuilder) Groups()(*ItemTeamSyncGroupsRequestBuilder) { + return NewItemTeamSyncGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_post_request_body.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_post_request_body.go new file mode 100644 index 0000000..1021207 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody instantiates a new ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody()(*ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody) { + m := &ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go new file mode 100644 index 0000000..e98b65b --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go @@ -0,0 +1,112 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i564165e8741b9cfcb4292e33d456cd612f727d40a6c6ee61e76c1ecd554b549a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions" +) + +// ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments\{comment_number}\reactions +type ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters list the reactions to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. + Content *i564165e8741b9cfcb4292e33d456cd612f727d40a6c6ee61e76c1ecd554b549a.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.discussions.item.comments.item.reactions.item collection +// returns a *ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + m := &ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder instantiates a new ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a []Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion-comment +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion-comment +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_with_reaction_item_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..f94ff51 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments\{comment_number}\reactions\{reaction_id} +type ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.Delete a reaction to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-team-discussion-comment-reaction +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.Delete a reaction to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_item_with_comment_number_patch_request_body.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_with_comment_number_patch_request_body.go new file mode 100644 index 0000000..c43bf70 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_with_comment_number_patch_request_body.go @@ -0,0 +1,80 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion comment's body text. + body *string +} +// NewItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody instantiates a new ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody()(*ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) { + m := &ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion comment's body text. +// returns a *string when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion comment's body text. +func (m *ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_post_request_body.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_post_request_body.go new file mode 100644 index 0000000..adc0873 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_post_request_body.go @@ -0,0 +1,80 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemDiscussionsItemCommentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion comment's body text. + body *string +} +// NewItemTeamsItemDiscussionsItemCommentsPostRequestBody instantiates a new ItemTeamsItemDiscussionsItemCommentsPostRequestBody and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsPostRequestBody()(*ItemTeamsItemDiscussionsItemCommentsPostRequestBody) { + m := &ItemTeamsItemDiscussionsItemCommentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemDiscussionsItemCommentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemDiscussionsItemCommentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemDiscussionsItemCommentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemDiscussionsItemCommentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion comment's body text. +// returns a *string when successful +func (m *ItemTeamsItemDiscussionsItemCommentsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemDiscussionsItemCommentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemTeamsItemDiscussionsItemCommentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemTeamsItemDiscussionsItemCommentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion comment's body text. +func (m *ItemTeamsItemDiscussionsItemCommentsPostRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemTeamsItemDiscussionsItemCommentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go new file mode 100644 index 0000000..7ff05aa --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go @@ -0,0 +1,112 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i4f172c8a35032388df1c876657e3a6a002f62be06ec1f426d57d4a5c7a8ec82e "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/teams/item/discussions/item/comments" +) + +// ItemTeamsItemDiscussionsItemCommentsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments +type ItemTeamsItemDiscussionsItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemDiscussionsItemCommentsRequestBuilderGetQueryParameters list all comments on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemTeamsItemDiscussionsItemCommentsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i4f172c8a35032388df1c876657e3a6a002f62be06ec1f426d57d4a5c7a8ec82e.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByComment_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.discussions.item.comments.item collection +// returns a *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ByComment_number(comment_number int32)(*ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_number), 10) + return NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemDiscussionsItemCommentsRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsItemCommentsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsRequestBuilder) { + m := &ItemTeamsItemDiscussionsItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments{?direction*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsItemCommentsRequestBuilder instantiates a new ItemTeamsItemDiscussionsItemCommentsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all comments on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a []TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#list-discussion-comments +func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable) + } + } + return val, nil +} +// Post creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#create-a-discussion-comment +func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) Post(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable), nil +} +// ToGetRequestInformation list all comments on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsItemCommentsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsItemCommentsRequestBuilder) { + return NewItemTeamsItemDiscussionsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_with_comment_number_item_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_with_comment_number_item_request_builder.go new file mode 100644 index 0000000..d81105f --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_with_comment_number_item_request_builder.go @@ -0,0 +1,115 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments\{comment_number} +type ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + m := &ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder instantiates a new ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a comment on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#delete-a-discussion-comment +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get get a specific comment on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable), nil +} +// Patch edits the body text of a discussion comment.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#update-a-discussion-comment +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Patch(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable), nil +} +// Reactions the reactions property +// returns a *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Reactions()(*ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + return NewItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a comment on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation get a specific comment on a team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation edits the body text of a discussion comment.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + return NewItemTeamsItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_reactions_post_request_body.go b/pkg/github/orgs/item_teams_item_discussions_item_reactions_post_request_body.go new file mode 100644 index 0000000..6efa338 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemDiscussionsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTeamsItemDiscussionsItemReactionsPostRequestBody instantiates a new ItemTeamsItemDiscussionsItemReactionsPostRequestBody and sets the default values. +func NewItemTeamsItemDiscussionsItemReactionsPostRequestBody()(*ItemTeamsItemDiscussionsItemReactionsPostRequestBody) { + m := &ItemTeamsItemDiscussionsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemDiscussionsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemDiscussionsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemDiscussionsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemDiscussionsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemDiscussionsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemTeamsItemDiscussionsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamsItemDiscussionsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTeamsItemDiscussionsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go new file mode 100644 index 0000000..3b8a353 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go @@ -0,0 +1,112 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ie961c9b74390e268ab48ff84f76179ac01ff30f851de45cdc9b8a186e7198301 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/teams/item/discussions/item/reactions" +) + +// ItemTeamsItemDiscussionsItemReactionsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\reactions +type ItemTeamsItemDiscussionsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemDiscussionsItemReactionsRequestBuilderGetQueryParameters list the reactions to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemTeamsItemDiscussionsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. + Content *ie961c9b74390e268ab48ff84f76179ac01ff30f851de45cdc9b8a186e7198301.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.discussions.item.reactions.item collection +// returns a *ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemDiscussionsItemReactionsRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsItemReactionsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemReactionsRequestBuilder) { + m := &ItemTeamsItemDiscussionsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsItemReactionsRequestBuilder instantiates a new ItemTeamsItemDiscussionsItemReactionsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a []Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion +func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).A response with an HTTP `200` status means that you already added the reaction type to this team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion +func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemTeamsItemDiscussionsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).A response with an HTTP `200` status means that you already added the reaction type to this team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsItemReactionsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsItemReactionsRequestBuilder) { + return NewItemTeamsItemDiscussionsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_reactions_with_reaction_item_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..42f081b --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\reactions\{reaction_id} +type ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.Delete a reaction to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-team-discussion-reaction +func (m *ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.Delete a reaction to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemTeamsItemDiscussionsItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_item_with_discussion_number_patch_request_body.go b/pkg/github/orgs/item_teams_item_discussions_item_with_discussion_number_patch_request_body.go new file mode 100644 index 0000000..b36c827 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_item_with_discussion_number_patch_request_body.go @@ -0,0 +1,109 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion post's body text. + body *string + // The discussion post's title. + title *string +} +// NewItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody instantiates a new ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody and sets the default values. +func NewItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody()(*ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) { + m := &ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion post's body text. +// returns a *string when successful +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The discussion post's title. +// returns a *string when successful +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion post's body text. +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) SetBody(value *string)() { + m.body = value +} +// SetTitle sets the title property value. The discussion post's title. +func (m *ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetTitle()(*string) + SetBody(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_discussions_post_request_body.go b/pkg/github/orgs/item_teams_item_discussions_post_request_body.go new file mode 100644 index 0000000..cdc27b3 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_post_request_body.go @@ -0,0 +1,138 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemDiscussionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion post's body text. + body *string + // Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + private *bool + // The discussion post's title. + title *string +} +// NewItemTeamsItemDiscussionsPostRequestBody instantiates a new ItemTeamsItemDiscussionsPostRequestBody and sets the default values. +func NewItemTeamsItemDiscussionsPostRequestBody()(*ItemTeamsItemDiscussionsPostRequestBody) { + m := &ItemTeamsItemDiscussionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemDiscussionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemDiscussionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemDiscussionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemDiscussionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion post's body text. +// returns a *string when successful +func (m *ItemTeamsItemDiscussionsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemDiscussionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetPrivate gets the private property value. Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. +// returns a *bool when successful +func (m *ItemTeamsItemDiscussionsPostRequestBody) GetPrivate()(*bool) { + return m.private +} +// GetTitle gets the title property value. The discussion post's title. +// returns a *string when successful +func (m *ItemTeamsItemDiscussionsPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemTeamsItemDiscussionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemTeamsItemDiscussionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion post's body text. +func (m *ItemTeamsItemDiscussionsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetPrivate sets the private property value. Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. +func (m *ItemTeamsItemDiscussionsPostRequestBody) SetPrivate(value *bool)() { + m.private = value +} +// SetTitle sets the title property value. The discussion post's title. +func (m *ItemTeamsItemDiscussionsPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemTeamsItemDiscussionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetPrivate()(*bool) + GetTitle()(*string) + SetBody(value *string)() + SetPrivate(value *bool)() + SetTitle(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_discussions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_request_builder.go new file mode 100644 index 0000000..4c7c0a5 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_request_builder.go @@ -0,0 +1,114 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ic3cc6ffacec61684eee36f490b5242a3f2b149a315732d1dd6517a4e31117d60 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/teams/item/discussions" +) + +// ItemTeamsItemDiscussionsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions +type ItemTeamsItemDiscussionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemDiscussionsRequestBuilderGetQueryParameters list all discussions on a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemTeamsItemDiscussionsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *ic3cc6ffacec61684eee36f490b5242a3f2b149a315732d1dd6517a4e31117d60.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Pinned discussions only filter + Pinned *string `uriparametername:"pinned"` +} +// ByDiscussion_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.discussions.item collection +// returns a *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsRequestBuilder) ByDiscussion_number(discussion_number int32)(*ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["discussion_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(discussion_number), 10) + return NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemDiscussionsRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsRequestBuilder) { + m := &ItemTeamsItemDiscussionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions{?direction*,page*,per_page*,pinned*}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsRequestBuilder instantiates a new ItemTeamsItemDiscussionsRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all discussions on a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a []TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#list-discussions +func (m *ItemTeamsItemDiscussionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable) + } + } + return val, nil +} +// Post creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#create-a-discussion +func (m *ItemTeamsItemDiscussionsRequestBuilder) Post(ctx context.Context, body ItemTeamsItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable), nil +} +// ToGetRequestInformation list all discussions on a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemDiscussionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsRequestBuilder) { + return NewItemTeamsItemDiscussionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_discussions_with_discussion_number_item_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_with_discussion_number_item_request_builder.go new file mode 100644 index 0000000..81ea95b --- /dev/null +++ b/pkg/github/orgs/item_teams_item_discussions_with_discussion_number_item_request_builder.go @@ -0,0 +1,120 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number} +type ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Comments the comments property +// returns a *ItemTeamsItemDiscussionsItemCommentsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) Comments()(*ItemTeamsItemDiscussionsItemCommentsRequestBuilder) { + return NewItemTeamsItemDiscussionsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal instantiates a new ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + m := &ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", pathParameters), + } + return m +} +// NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder instantiates a new ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder and sets the default values. +func NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a discussion from a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#delete-a-discussion +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get get a specific discussion on a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable), nil +} +// Patch edits the title and body text of a discussion post. Only the parameters you provide are updated.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#update-a-discussion +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) Patch(ctx context.Context, body ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable), nil +} +// Reactions the reactions property +// returns a *ItemTeamsItemDiscussionsItemReactionsRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) Reactions()(*ItemTeamsItemDiscussionsItemReactionsRequestBuilder) { + return NewItemTeamsItemDiscussionsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete a discussion from a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation get a specific discussion on a team's page.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation edits the title and body text of a discussion post. Only the parameters you provide are updated.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemWithDiscussion_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder when successful +func (m *ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + return NewItemTeamsItemDiscussionsWithDiscussion_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_external_groups_patch_request_body.go b/pkg/github/orgs/item_teams_item_external_groups_patch_request_body.go new file mode 100644 index 0000000..270bcf2 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_external_groups_patch_request_body.go @@ -0,0 +1,80 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemExternalGroupsPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // External Group Id + group_id *int32 +} +// NewItemTeamsItemExternalGroupsPatchRequestBody instantiates a new ItemTeamsItemExternalGroupsPatchRequestBody and sets the default values. +func NewItemTeamsItemExternalGroupsPatchRequestBody()(*ItemTeamsItemExternalGroupsPatchRequestBody) { + m := &ItemTeamsItemExternalGroupsPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemExternalGroupsPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemExternalGroupsPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemExternalGroupsPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemExternalGroupsPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemExternalGroupsPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + return res +} +// GetGroupId gets the group_id property value. External Group Id +// returns a *int32 when successful +func (m *ItemTeamsItemExternalGroupsPatchRequestBody) GetGroupId()(*int32) { + return m.group_id +} +// Serialize serializes information the current object +func (m *ItemTeamsItemExternalGroupsPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("group_id", m.GetGroupId()) + 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 *ItemTeamsItemExternalGroupsPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroupId sets the group_id property value. External Group Id +func (m *ItemTeamsItemExternalGroupsPatchRequestBody) SetGroupId(value *int32)() { + m.group_id = value +} +type ItemTeamsItemExternalGroupsPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*int32) + SetGroupId(value *int32)() +} diff --git a/pkg/github/orgs/item_teams_item_external_groups_request_builder.go b/pkg/github/orgs/item_teams_item_external_groups_request_builder.go new file mode 100644 index 0000000..7e3f6ee --- /dev/null +++ b/pkg/github/orgs/item_teams_item_external_groups_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemExternalGroupsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\external-groups +type ItemTeamsItemExternalGroupsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemExternalGroupsRequestBuilderInternal instantiates a new ItemTeamsItemExternalGroupsRequestBuilder and sets the default values. +func NewItemTeamsItemExternalGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemExternalGroupsRequestBuilder) { + m := &ItemTeamsItemExternalGroupsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/external-groups", pathParameters), + } + return m +} +// NewItemTeamsItemExternalGroupsRequestBuilder instantiates a new ItemTeamsItemExternalGroupsRequestBuilder and sets the default values. +func NewItemTeamsItemExternalGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemExternalGroupsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemExternalGroupsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a connection between a team and an external group.You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#remove-the-connection-between-an-external-group-and-a-team +func (m *ItemTeamsItemExternalGroupsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get lists a connection between a team and an external group.You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a ExternalGroupsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#list-a-connection-between-an-external-group-and-a-team +func (m *ItemTeamsItemExternalGroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateExternalGroupsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupsable), nil +} +// Patch creates a connection between a team and an external group. Only one external group can be linked to a team.You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a ExternalGroupable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#update-the-connection-between-an-external-group-and-a-team +func (m *ItemTeamsItemExternalGroupsRequestBuilder) Patch(ctx context.Context, body ItemTeamsItemExternalGroupsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateExternalGroupFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ExternalGroupable), nil +} +// ToDeleteRequestInformation deletes a connection between a team and an external group.You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemExternalGroupsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation lists a connection between a team and an external group.You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemExternalGroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation creates a connection between a team and an external group. Only one external group can be linked to a team.You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemExternalGroupsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTeamsItemExternalGroupsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemExternalGroupsRequestBuilder when successful +func (m *ItemTeamsItemExternalGroupsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemExternalGroupsRequestBuilder) { + return NewItemTeamsItemExternalGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_invitations_request_builder.go b/pkg/github/orgs/item_teams_item_invitations_request_builder.go new file mode 100644 index 0000000..f5bb75f --- /dev/null +++ b/pkg/github/orgs/item_teams_item_invitations_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemInvitationsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\invitations +type ItemTeamsItemInvitationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemInvitationsRequestBuilderGetQueryParameters the return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub Enterprise Cloud member, the `login` field in the return hash will be `null`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. +type ItemTeamsItemInvitationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemTeamsItemInvitationsRequestBuilderInternal instantiates a new ItemTeamsItemInvitationsRequestBuilder and sets the default values. +func NewItemTeamsItemInvitationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemInvitationsRequestBuilder) { + m := &ItemTeamsItemInvitationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/invitations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemInvitationsRequestBuilder instantiates a new ItemTeamsItemInvitationsRequestBuilder and sets the default values. +func NewItemTeamsItemInvitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemInvitationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemInvitationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub Enterprise Cloud member, the `login` field in the return hash will be `null`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. +// returns a []OrganizationInvitationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-pending-team-invitations +func (m *ItemTeamsItemInvitationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemInvitationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationInvitationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable) + } + } + return val, nil +} +// ToGetRequestInformation the return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub Enterprise Cloud member, the `login` field in the return hash will be `null`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemInvitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemInvitationsRequestBuilder when successful +func (m *ItemTeamsItemInvitationsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemInvitationsRequestBuilder) { + return NewItemTeamsItemInvitationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_members_request_builder.go b/pkg/github/orgs/item_teams_item_members_request_builder.go new file mode 100644 index 0000000..af9c8b7 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_members_request_builder.go @@ -0,0 +1,70 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i6e223be6fe8a5e809c1f58c35fde308f3d99429fe7b30b7670732fa95bae78a6 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/orgs/item/teams/item/members" +) + +// ItemTeamsItemMembersRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\members +type ItemTeamsItemMembersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemMembersRequestBuilderGetQueryParameters team members will include the members of child teams.To list members in a team, the team must be visible to the authenticated user. +type ItemTeamsItemMembersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Filters members returned by their role in the team. + Role *i6e223be6fe8a5e809c1f58c35fde308f3d99429fe7b30b7670732fa95bae78a6.GetRoleQueryParameterType `uriparametername:"role"` +} +// NewItemTeamsItemMembersRequestBuilderInternal instantiates a new ItemTeamsItemMembersRequestBuilder and sets the default values. +func NewItemTeamsItemMembersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemMembersRequestBuilder) { + m := &ItemTeamsItemMembersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/members{?page*,per_page*,role*}", pathParameters), + } + return m +} +// NewItemTeamsItemMembersRequestBuilder instantiates a new ItemTeamsItemMembersRequestBuilder and sets the default values. +func NewItemTeamsItemMembersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemMembersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemMembersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get team members will include the members of child teams.To list members in a team, the team must be visible to the authenticated user. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-team-members +func (m *ItemTeamsItemMembersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemMembersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation team members will include the members of child teams.To list members in a team, the team must be visible to the authenticated user. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemMembersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemMembersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemMembersRequestBuilder when successful +func (m *ItemTeamsItemMembersRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemMembersRequestBuilder) { + return NewItemTeamsItemMembersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_memberships_item_with_username_put_request_body.go b/pkg/github/orgs/item_teams_item_memberships_item_with_username_put_request_body.go new file mode 100644 index 0000000..fa876a4 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_memberships_item_with_username_put_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemMembershipsItemWithUsernamePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTeamsItemMembershipsItemWithUsernamePutRequestBody instantiates a new ItemTeamsItemMembershipsItemWithUsernamePutRequestBody and sets the default values. +func NewItemTeamsItemMembershipsItemWithUsernamePutRequestBody()(*ItemTeamsItemMembershipsItemWithUsernamePutRequestBody) { + m := &ItemTeamsItemMembershipsItemWithUsernamePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemMembershipsItemWithUsernamePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemMembershipsItemWithUsernamePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemMembershipsItemWithUsernamePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemMembershipsItemWithUsernamePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemMembershipsItemWithUsernamePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemTeamsItemMembershipsItemWithUsernamePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamsItemMembershipsItemWithUsernamePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTeamsItemMembershipsItemWithUsernamePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_teams_item_memberships_request_builder.go b/pkg/github/orgs/item_teams_item_memberships_request_builder.go new file mode 100644 index 0000000..0bebc9e --- /dev/null +++ b/pkg/github/orgs/item_teams_item_memberships_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamsItemMembershipsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\memberships +type ItemTeamsItemMembershipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.memberships.item collection +// returns a *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder when successful +func (m *ItemTeamsItemMembershipsRequestBuilder) ByUsername(username string)(*ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemTeamsItemMembershipsWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemMembershipsRequestBuilderInternal instantiates a new ItemTeamsItemMembershipsRequestBuilder and sets the default values. +func NewItemTeamsItemMembershipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemMembershipsRequestBuilder) { + m := &ItemTeamsItemMembershipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/memberships", pathParameters), + } + return m +} +// NewItemTeamsItemMembershipsRequestBuilder instantiates a new ItemTeamsItemMembershipsRequestBuilder and sets the default values. +func NewItemTeamsItemMembershipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemMembershipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemMembershipsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_teams_item_memberships_with_username_item_request_builder.go b/pkg/github/orgs/item_teams_item_memberships_with_username_item_request_builder.go new file mode 100644 index 0000000..56fe342 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_memberships_with_username_item_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemMembershipsWithUsernameItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\memberships\{username} +type ItemTeamsItemMembershipsWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemMembershipsWithUsernameItemRequestBuilderInternal instantiates a new ItemTeamsItemMembershipsWithUsernameItemRequestBuilder and sets the default values. +func NewItemTeamsItemMembershipsWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) { + m := &ItemTeamsItemMembershipsWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/memberships/{username}", pathParameters), + } + return m +} +// NewItemTeamsItemMembershipsWithUsernameItemRequestBuilder instantiates a new ItemTeamsItemMembershipsWithUsernameItemRequestBuilder and sets the default values. +func NewItemTeamsItemMembershipsWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemMembershipsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete to remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-membership-for-a-user +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get team members will include the members of child teams.To get a user's membership with a team, the team must be visible to the authenticated user.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.**Note:**The response contains the `state` of the membership and the member's `role`.The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#create-a-team). +// returns a TeamMembershipable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-membership-for-a-user +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamMembershipFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable), nil +} +// Put adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. +// returns a TeamMembershipable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-or-update-team-membership-for-a-user +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) Put(ctx context.Context, body ItemTeamsItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamMembershipFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable), nil +} +// ToDeleteRequestInformation to remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation team members will include the members of child teams.To get a user's membership with a team, the team must be visible to the authenticated user.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.**Note:**The response contains the `state` of the membership and the member's `role`.The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#create-a-team). +// returns a *RequestInformation when successful +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemTeamsItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder when successful +func (m *ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemMembershipsWithUsernameItemRequestBuilder) { + return NewItemTeamsItemMembershipsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_projects_item_with_project_403_error.go b/pkg/github/orgs/item_teams_item_projects_item_with_project_403_error.go new file mode 100644 index 0000000..0806159 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_projects_item_with_project_403_error.go @@ -0,0 +1,117 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemProjectsItemWithProject_403Error 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 +} +// NewItemTeamsItemProjectsItemWithProject_403Error instantiates a new ItemTeamsItemProjectsItemWithProject_403Error and sets the default values. +func NewItemTeamsItemProjectsItemWithProject_403Error()(*ItemTeamsItemProjectsItemWithProject_403Error) { + m := &ItemTeamsItemProjectsItemWithProject_403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemProjectsItemWithProject_403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemProjectsItemWithProject_403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemProjectsItemWithProject_403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemTeamsItemProjectsItemWithProject_403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemProjectsItemWithProject_403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemTeamsItemProjectsItemWithProject_403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemProjectsItemWithProject_403Error) 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 +// returns a *string when successful +func (m *ItemTeamsItemProjectsItemWithProject_403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemTeamsItemProjectsItemWithProject_403Error) 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 *ItemTeamsItemProjectsItemWithProject_403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemTeamsItemProjectsItemWithProject_403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemTeamsItemProjectsItemWithProject_403Error) SetMessage(value *string)() { + m.message = value +} +type ItemTeamsItemProjectsItemWithProject_403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_projects_item_with_project_put_request_body.go b/pkg/github/orgs/item_teams_item_projects_item_with_project_put_request_body.go new file mode 100644 index 0000000..9fd0aad --- /dev/null +++ b/pkg/github/orgs/item_teams_item_projects_item_with_project_put_request_body.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemProjectsItemWithProject_PutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemTeamsItemProjectsItemWithProject_PutRequestBody instantiates a new ItemTeamsItemProjectsItemWithProject_PutRequestBody and sets the default values. +func NewItemTeamsItemProjectsItemWithProject_PutRequestBody()(*ItemTeamsItemProjectsItemWithProject_PutRequestBody) { + m := &ItemTeamsItemProjectsItemWithProject_PutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemProjectsItemWithProject_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemProjectsItemWithProject_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemProjectsItemWithProject_PutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemProjectsItemWithProject_PutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemProjectsItemWithProject_PutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemTeamsItemProjectsItemWithProject_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamsItemProjectsItemWithProject_PutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemTeamsItemProjectsItemWithProject_PutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_teams_item_projects_request_builder.go b/pkg/github/orgs/item_teams_item_projects_request_builder.go new file mode 100644 index 0000000..3a447f8 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_projects_request_builder.go @@ -0,0 +1,78 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemProjectsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\projects +type ItemTeamsItemProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemProjectsRequestBuilderGetQueryParameters lists the organization projects for a team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. +type ItemTeamsItemProjectsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByProject_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.projects.item collection +// returns a *ItemTeamsItemProjectsWithProject_ItemRequestBuilder when successful +func (m *ItemTeamsItemProjectsRequestBuilder) ByProject_id(project_id int32)(*ItemTeamsItemProjectsWithProject_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["project_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(project_id), 10) + return NewItemTeamsItemProjectsWithProject_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemProjectsRequestBuilderInternal instantiates a new ItemTeamsItemProjectsRequestBuilder and sets the default values. +func NewItemTeamsItemProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemProjectsRequestBuilder) { + m := &ItemTeamsItemProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/projects{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemProjectsRequestBuilder instantiates a new ItemTeamsItemProjectsRequestBuilder and sets the default values. +func NewItemTeamsItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemProjectsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the organization projects for a team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. +// returns a []TeamProjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-projects +func (m *ItemTeamsItemProjectsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemProjectsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamProjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable) + } + } + return val, nil +} +// ToGetRequestInformation lists the organization projects for a team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemProjectsRequestBuilder when successful +func (m *ItemTeamsItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemProjectsRequestBuilder) { + return NewItemTeamsItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_projects_with_project_item_request_builder.go b/pkg/github/orgs/item_teams_item_projects_with_project_item_request_builder.go new file mode 100644 index 0000000..55de653 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_projects_with_project_item_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemProjectsWithProject_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\projects\{project_id} +type ItemTeamsItemProjectsWithProject_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemProjectsWithProject_ItemRequestBuilderInternal instantiates a new ItemTeamsItemProjectsWithProject_ItemRequestBuilder and sets the default values. +func NewItemTeamsItemProjectsWithProject_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemProjectsWithProject_ItemRequestBuilder) { + m := &ItemTeamsItemProjectsWithProject_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/projects/{project_id}", pathParameters), + } + return m +} +// NewItemTeamsItemProjectsWithProject_ItemRequestBuilder instantiates a new ItemTeamsItemProjectsWithProject_ItemRequestBuilder and sets the default values. +func NewItemTeamsItemProjectsWithProject_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemProjectsWithProject_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemProjectsWithProject_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-project-from-a-team +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// returns a TeamProjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-project +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamProjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable), nil +} +// Put adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// returns a ItemTeamsItemProjectsItemWithProject_403Error error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-project-permissions +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) Put(ctx context.Context, body ItemTeamsItemProjectsItemWithProject_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": CreateItemTeamsItemProjectsItemWithProject_403ErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemTeamsItemProjectsItemWithProject_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemProjectsWithProject_ItemRequestBuilder when successful +func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemProjectsWithProject_ItemRequestBuilder) { + return NewItemTeamsItemProjectsWithProject_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_repos_item_item_with_repo_put_request_body.go b/pkg/github/orgs/item_teams_item_repos_item_item_with_repo_put_request_body.go new file mode 100644 index 0000000..fe82271 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_repos_item_item_with_repo_put_request_body.go @@ -0,0 +1,80 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemReposItemItemWithRepoPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + permission *string +} +// NewItemTeamsItemReposItemItemWithRepoPutRequestBody instantiates a new ItemTeamsItemReposItemItemWithRepoPutRequestBody and sets the default values. +func NewItemTeamsItemReposItemItemWithRepoPutRequestBody()(*ItemTeamsItemReposItemItemWithRepoPutRequestBody) { + m := &ItemTeamsItemReposItemItemWithRepoPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemReposItemItemWithRepoPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemReposItemItemWithRepoPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemReposItemItemWithRepoPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemReposItemItemWithRepoPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemReposItemItemWithRepoPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + return res +} +// GetPermission gets the permission property value. The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. +// returns a *string when successful +func (m *ItemTeamsItemReposItemItemWithRepoPutRequestBody) GetPermission()(*string) { + return m.permission +} +// Serialize serializes information the current object +func (m *ItemTeamsItemReposItemItemWithRepoPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("permission", m.GetPermission()) + 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 *ItemTeamsItemReposItemItemWithRepoPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPermission sets the permission property value. The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. +func (m *ItemTeamsItemReposItemItemWithRepoPutRequestBody) SetPermission(value *string)() { + m.permission = value +} +type ItemTeamsItemReposItemItemWithRepoPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPermission()(*string) + SetPermission(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go b/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go new file mode 100644 index 0000000..c05bbfc --- /dev/null +++ b/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go @@ -0,0 +1,105 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemReposItemWithRepoItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\repos\{owner}\{repo} +type ItemTeamsItemReposItemWithRepoItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemReposItemWithRepoItemRequestBuilderInternal instantiates a new ItemTeamsItemReposItemWithRepoItemRequestBuilder and sets the default values. +func NewItemTeamsItemReposItemWithRepoItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemReposItemWithRepoItemRequestBuilder) { + m := &ItemTeamsItemReposItemWithRepoItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", pathParameters), + } + return m +} +// NewItemTeamsItemReposItemWithRepoItemRequestBuilder instantiates a new ItemTeamsItemReposItemWithRepoItemRequestBuilder and sets the default values. +func NewItemTeamsItemReposItemWithRepoItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemReposItemWithRepoItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemReposItemWithRepoItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete if the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-repository-from-a-team +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// returns a TeamRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-repository +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRepositoryable), nil +} +// Put to add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-repository-permissions +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) Put(ctx context.Context, body ItemTeamsItemReposItemItemWithRepoPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation if the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation to add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". +// returns a *RequestInformation when successful +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemTeamsItemReposItemItemWithRepoPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemReposItemWithRepoItemRequestBuilder when successful +func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemReposItemWithRepoItemRequestBuilder) { + return NewItemTeamsItemReposItemWithRepoItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_repos_request_builder.go b/pkg/github/orgs/item_teams_item_repos_request_builder.go new file mode 100644 index 0000000..9ef8aa5 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_repos_request_builder.go @@ -0,0 +1,79 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemReposRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\repos +type ItemTeamsItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemReposRequestBuilderGetQueryParameters lists a team's repositories visible to the authenticated user.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. +type ItemTeamsItemReposRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByOwner gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.repos.item collection +// returns a *ItemTeamsItemReposWithOwnerItemRequestBuilder when successful +func (m *ItemTeamsItemReposRequestBuilder) ByOwner(owner string)(*ItemTeamsItemReposWithOwnerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if owner != "" { + urlTplParams["owner"] = owner + } + return NewItemTeamsItemReposWithOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemReposRequestBuilderInternal instantiates a new ItemTeamsItemReposRequestBuilder and sets the default values. +func NewItemTeamsItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemReposRequestBuilder) { + m := &ItemTeamsItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemReposRequestBuilder instantiates a new ItemTeamsItemReposRequestBuilder and sets the default values. +func NewItemTeamsItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemReposRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists a team's repositories visible to the authenticated user.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. +// returns a []MinimalRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-repositories +func (m *ItemTeamsItemReposRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemReposRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists a team's repositories visible to the authenticated user.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemReposRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemReposRequestBuilder when successful +func (m *ItemTeamsItemReposRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemReposRequestBuilder) { + return NewItemTeamsItemReposRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_repos_with_owner_item_request_builder.go b/pkg/github/orgs/item_teams_item_repos_with_owner_item_request_builder.go new file mode 100644 index 0000000..b4ce1af --- /dev/null +++ b/pkg/github/orgs/item_teams_item_repos_with_owner_item_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamsItemReposWithOwnerItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\repos\{owner} +type ItemTeamsItemReposWithOwnerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item.repos.item.item collection +// returns a *ItemTeamsItemReposItemWithRepoItemRequestBuilder when successful +func (m *ItemTeamsItemReposWithOwnerItemRequestBuilder) ByRepo(repo string)(*ItemTeamsItemReposItemWithRepoItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo != "" { + urlTplParams["repo"] = repo + } + return NewItemTeamsItemReposItemWithRepoItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsItemReposWithOwnerItemRequestBuilderInternal instantiates a new ItemTeamsItemReposWithOwnerItemRequestBuilder and sets the default values. +func NewItemTeamsItemReposWithOwnerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemReposWithOwnerItemRequestBuilder) { + m := &ItemTeamsItemReposWithOwnerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos/{owner}", pathParameters), + } + return m +} +// NewItemTeamsItemReposWithOwnerItemRequestBuilder instantiates a new ItemTeamsItemReposWithOwnerItemRequestBuilder and sets the default values. +func NewItemTeamsItemReposWithOwnerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemReposWithOwnerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemReposWithOwnerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_teams_item_team_sync_group_mappings_patch_request_body.go b/pkg/github/orgs/item_teams_item_team_sync_group_mappings_patch_request_body.go new file mode 100644 index 0000000..0b51d98 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_team_sync_group_mappings_patch_request_body.go @@ -0,0 +1,73 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody struct { + // The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. + groups []ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable +} +// NewItemTeamsItemTeamSyncGroupMappingsPatchRequestBody instantiates a new ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody and sets the default values. +func NewItemTeamsItemTeamSyncGroupMappingsPatchRequestBody()(*ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody) { + m := &ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody{ + } + return m +} +// CreateItemTeamsItemTeamSyncGroupMappingsPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemTeamSyncGroupMappingsPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemTeamSyncGroupMappingsPatchRequestBody(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable) + } + } + m.SetGroups(res) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. +// returns a []ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody) GetGroups()([]ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable) { + return m.groups +} +// Serialize serializes information the current object +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + return nil +} +// SetGroups sets the groups property value. The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody) SetGroups(value []ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable)() { + m.groups = value +} +type ItemTeamsItemTeamSyncGroupMappingsPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroups()([]ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable) + SetGroups(value []ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable)() +} diff --git a/pkg/github/orgs/item_teams_item_team_sync_group_mappings_patch_request_body_groups.go b/pkg/github/orgs/item_teams_item_team_sync_group_mappings_patch_request_body_groups.go new file mode 100644 index 0000000..947e6d7 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_team_sync_group_mappings_patch_request_body_groups.go @@ -0,0 +1,138 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Description of the IdP group. + group_description *string + // ID of the IdP group. + group_id *string + // Name of the IdP group. + group_name *string +} +// NewItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups instantiates a new ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups and sets the default values. +func NewItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups()(*ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) { + m := &ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["group_description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupDescription(val) + } + return nil + } + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + return res +} +// GetGroupDescription gets the group_description property value. Description of the IdP group. +// returns a *string when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) GetGroupDescription()(*string) { + return m.group_description +} +// GetGroupId gets the group_id property value. ID of the IdP group. +// returns a *string when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) GetGroupId()(*string) { + return m.group_id +} +// GetGroupName gets the group_name property value. Name of the IdP group. +// returns a *string when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) GetGroupName()(*string) { + return m.group_name +} +// Serialize serializes information the current object +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("group_description", m.GetGroupDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + 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 *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroupDescription sets the group_description property value. Description of the IdP group. +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) SetGroupDescription(value *string)() { + m.group_description = value +} +// SetGroupId sets the group_id property value. ID of the IdP group. +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) SetGroupId(value *string)() { + m.group_id = value +} +// SetGroupName sets the group_name property value. Name of the IdP group. +func (m *ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groups) SetGroupName(value *string)() { + m.group_name = value +} +type ItemTeamsItemTeamSyncGroupMappingsPatchRequestBody_groupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupDescription()(*string) + GetGroupId()(*string) + GetGroupName()(*string) + SetGroupDescription(value *string)() + SetGroupId(value *string)() + SetGroupName(value *string)() +} diff --git a/pkg/github/orgs/item_teams_item_team_sync_group_mappings_request_builder.go b/pkg/github/orgs/item_teams_item_team_sync_group_mappings_request_builder.go new file mode 100644 index 0000000..40112c2 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_team_sync_group_mappings_request_builder.go @@ -0,0 +1,88 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemTeamSyncGroupMappingsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\team-sync\group-mappings +type ItemTeamsItemTeamSyncGroupMappingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemTeamSyncGroupMappingsRequestBuilderInternal instantiates a new ItemTeamsItemTeamSyncGroupMappingsRequestBuilder and sets the default values. +func NewItemTeamsItemTeamSyncGroupMappingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) { + m := &ItemTeamsItemTeamSyncGroupMappingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/team-sync/group-mappings", pathParameters), + } + return m +} +// NewItemTeamsItemTeamSyncGroupMappingsRequestBuilder instantiates a new ItemTeamsItemTeamSyncGroupMappingsRequestBuilder and sets the default values. +func NewItemTeamsItemTeamSyncGroupMappingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemTeamSyncGroupMappingsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list IdP groups connected to a team on GitHub Enterprise Cloud.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. +// returns a GroupMappingable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-a-team +func (m *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGroupMappingFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable), nil +} +// Patch creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. +// returns a GroupMappingable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#create-or-update-idp-group-connections +func (m *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) Patch(ctx context.Context, body ItemTeamsItemTeamSyncGroupMappingsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGroupMappingFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable), nil +} +// ToGetRequestInformation list IdP groups connected to a team on GitHub Enterprise Cloud.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTeamsItemTeamSyncGroupMappingsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder when successful +func (m *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) { + return NewItemTeamsItemTeamSyncGroupMappingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_team_sync_request_builder.go b/pkg/github/orgs/item_teams_item_team_sync_request_builder.go new file mode 100644 index 0000000..527a705 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_team_sync_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamsItemTeamSyncRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\team-sync +type ItemTeamsItemTeamSyncRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsItemTeamSyncRequestBuilderInternal instantiates a new ItemTeamsItemTeamSyncRequestBuilder and sets the default values. +func NewItemTeamsItemTeamSyncRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemTeamSyncRequestBuilder) { + m := &ItemTeamsItemTeamSyncRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/team-sync", pathParameters), + } + return m +} +// NewItemTeamsItemTeamSyncRequestBuilder instantiates a new ItemTeamsItemTeamSyncRequestBuilder and sets the default values. +func NewItemTeamsItemTeamSyncRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemTeamSyncRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemTeamSyncRequestBuilderInternal(urlParams, requestAdapter) +} +// GroupMappings the groupMappings property +// returns a *ItemTeamsItemTeamSyncGroupMappingsRequestBuilder when successful +func (m *ItemTeamsItemTeamSyncRequestBuilder) GroupMappings()(*ItemTeamsItemTeamSyncGroupMappingsRequestBuilder) { + return NewItemTeamsItemTeamSyncGroupMappingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_teams_item_teams_request_builder.go b/pkg/github/orgs/item_teams_item_teams_request_builder.go new file mode 100644 index 0000000..8a9d715 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_teams_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsItemTeamsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\teams +type ItemTeamsItemTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsItemTeamsRequestBuilderGetQueryParameters lists the child teams of the team specified by `{team_slug}`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. +type ItemTeamsItemTeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemTeamsItemTeamsRequestBuilderInternal instantiates a new ItemTeamsItemTeamsRequestBuilder and sets the default values. +func NewItemTeamsItemTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemTeamsRequestBuilder) { + m := &ItemTeamsItemTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsItemTeamsRequestBuilder instantiates a new ItemTeamsItemTeamsRequestBuilder and sets the default values. +func NewItemTeamsItemTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsItemTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsItemTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the child teams of the team specified by `{team_slug}`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. +// returns a []Teamable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-child-teams +func (m *ItemTeamsItemTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemTeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// ToGetRequestInformation lists the child teams of the team specified by `{team_slug}`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. +// returns a *RequestInformation when successful +func (m *ItemTeamsItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemTeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsItemTeamsRequestBuilder when successful +func (m *ItemTeamsItemTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemTeamsRequestBuilder) { + return NewItemTeamsItemTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_item_with_team_slug_patch_request_body.go b/pkg/github/orgs/item_teams_item_with_team_slug_patch_request_body.go new file mode 100644 index 0000000..ec54c70 --- /dev/null +++ b/pkg/github/orgs/item_teams_item_with_team_slug_patch_request_body.go @@ -0,0 +1,138 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsItemWithTeam_slugPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the team. + description *string + // The name of the team. + name *string + // The ID of a team to set as the parent team. + parent_team_id *int32 +} +// NewItemTeamsItemWithTeam_slugPatchRequestBody instantiates a new ItemTeamsItemWithTeam_slugPatchRequestBody and sets the default values. +func NewItemTeamsItemWithTeam_slugPatchRequestBody()(*ItemTeamsItemWithTeam_slugPatchRequestBody) { + m := &ItemTeamsItemWithTeam_slugPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsItemWithTeam_slugPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsItemWithTeam_slugPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsItemWithTeam_slugPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description of the team. +// returns a *string when successful +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parent_team_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetParentTeamId(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the team. +// returns a *string when successful +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) GetName()(*string) { + return m.name +} +// GetParentTeamId gets the parent_team_id property value. The ID of a team to set as the parent team. +// returns a *int32 when successful +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) GetParentTeamId()(*int32) { + return m.parent_team_id +} +// Serialize serializes information the current object +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("parent_team_id", m.GetParentTeamId()) + 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 *ItemTeamsItemWithTeam_slugPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of the team. +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the team. +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetParentTeamId sets the parent_team_id property value. The ID of a team to set as the parent team. +func (m *ItemTeamsItemWithTeam_slugPatchRequestBody) SetParentTeamId(value *int32)() { + m.parent_team_id = value +} +type ItemTeamsItemWithTeam_slugPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetParentTeamId()(*int32) + SetDescription(value *string)() + SetName(value *string)() + SetParentTeamId(value *int32)() +} diff --git a/pkg/github/orgs/item_teams_post_request_body.go b/pkg/github/orgs/item_teams_post_request_body.go new file mode 100644 index 0000000..94e76ea --- /dev/null +++ b/pkg/github/orgs/item_teams_post_request_body.go @@ -0,0 +1,208 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the team. + description *string + // List GitHub IDs for organization members who will become team maintainers. + maintainers []string + // The name of the team. + name *string + // The ID of a team to set as the parent team. + parent_team_id *int32 + // The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + repo_names []string +} +// NewItemTeamsPostRequestBody instantiates a new ItemTeamsPostRequestBody and sets the default values. +func NewItemTeamsPostRequestBody()(*ItemTeamsPostRequestBody) { + m := &ItemTeamsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description of the team. +// returns a *string when successful +func (m *ItemTeamsPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["maintainers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetMaintainers(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parent_team_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetParentTeamId(val) + } + return nil + } + res["repo_names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepoNames(res) + } + return nil + } + return res +} +// GetMaintainers gets the maintainers property value. List GitHub IDs for organization members who will become team maintainers. +// returns a []string when successful +func (m *ItemTeamsPostRequestBody) GetMaintainers()([]string) { + return m.maintainers +} +// GetName gets the name property value. The name of the team. +// returns a *string when successful +func (m *ItemTeamsPostRequestBody) GetName()(*string) { + return m.name +} +// GetParentTeamId gets the parent_team_id property value. The ID of a team to set as the parent team. +// returns a *int32 when successful +func (m *ItemTeamsPostRequestBody) GetParentTeamId()(*int32) { + return m.parent_team_id +} +// GetRepoNames gets the repo_names property value. The full name (e.g., "organization-name/repository-name") of repositories to add the team to. +// returns a []string when successful +func (m *ItemTeamsPostRequestBody) GetRepoNames()([]string) { + return m.repo_names +} +// Serialize serializes information the current object +func (m *ItemTeamsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetMaintainers() != nil { + err := writer.WriteCollectionOfStringValues("maintainers", m.GetMaintainers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("parent_team_id", m.GetParentTeamId()) + if err != nil { + return err + } + } + if m.GetRepoNames() != nil { + err := writer.WriteCollectionOfStringValues("repo_names", m.GetRepoNames()) + 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 *ItemTeamsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of the team. +func (m *ItemTeamsPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetMaintainers sets the maintainers property value. List GitHub IDs for organization members who will become team maintainers. +func (m *ItemTeamsPostRequestBody) SetMaintainers(value []string)() { + m.maintainers = value +} +// SetName sets the name property value. The name of the team. +func (m *ItemTeamsPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetParentTeamId sets the parent_team_id property value. The ID of a team to set as the parent team. +func (m *ItemTeamsPostRequestBody) SetParentTeamId(value *int32)() { + m.parent_team_id = value +} +// SetRepoNames sets the repo_names property value. The full name (e.g., "organization-name/repository-name") of repositories to add the team to. +func (m *ItemTeamsPostRequestBody) SetRepoNames(value []string)() { + m.repo_names = value +} +type ItemTeamsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetMaintainers()([]string) + GetName()(*string) + GetParentTeamId()(*int32) + GetRepoNames()([]string) + SetDescription(value *string)() + SetMaintainers(value []string)() + SetName(value *string)() + SetParentTeamId(value *int32)() + SetRepoNames(value []string)() +} diff --git a/pkg/github/orgs/item_teams_request_builder.go b/pkg/github/orgs/item_teams_request_builder.go new file mode 100644 index 0000000..50b54d2 --- /dev/null +++ b/pkg/github/orgs/item_teams_request_builder.go @@ -0,0 +1,120 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsRequestBuilder builds and executes requests for operations under \orgs\{org}\teams +type ItemTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsRequestBuilderGetQueryParameters lists all teams in an organization that are visible to the authenticated user. +type ItemTeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByTeam_slug gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.teams.item collection +// returns a *ItemTeamsWithTeam_slugItemRequestBuilder when successful +func (m *ItemTeamsRequestBuilder) ByTeam_slug(team_slug string)(*ItemTeamsWithTeam_slugItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if team_slug != "" { + urlTplParams["team_slug"] = team_slug + } + return NewItemTeamsWithTeam_slugItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamsRequestBuilderInternal instantiates a new ItemTeamsRequestBuilder and sets the default values. +func NewItemTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsRequestBuilder) { + m := &ItemTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsRequestBuilder instantiates a new ItemTeamsRequestBuilder and sets the default values. +func NewItemTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all teams in an organization that are visible to the authenticated user. +// returns a []Teamable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-teams +func (m *ItemTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// Post to create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/enterprise-cloud@latest//articles/setting-team-creation-permissions-in-your-organization)."When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/about-teams)". +// returns a TeamFullable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#create-a-team +func (m *ItemTeamsRequestBuilder) Post(ctx context.Context, body ItemTeamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable), nil +} +// ToGetRequestInformation lists all teams in an organization that are visible to the authenticated user. +// returns a *RequestInformation when successful +func (m *ItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation to create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/enterprise-cloud@latest//articles/setting-team-creation-permissions-in-your-organization)."When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/about-teams)". +// returns a *RequestInformation when successful +func (m *ItemTeamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsRequestBuilder when successful +func (m *ItemTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsRequestBuilder) { + return NewItemTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_teams_with_team_slug_item_request_builder.go b/pkg/github/orgs/item_teams_with_team_slug_item_request_builder.go new file mode 100644 index 0000000..c08c6fc --- /dev/null +++ b/pkg/github/orgs/item_teams_with_team_slug_item_request_builder.go @@ -0,0 +1,167 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsWithTeam_slugItemRequestBuilder builds and executes requests for operations under \orgs\{org}\teams\{team_slug} +type ItemTeamsWithTeam_slugItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamsWithTeam_slugItemRequestBuilderInternal instantiates a new ItemTeamsWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemTeamsWithTeam_slugItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsWithTeam_slugItemRequestBuilder) { + m := &ItemTeamsWithTeam_slugItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}", pathParameters), + } + return m +} +// NewItemTeamsWithTeam_slugItemRequestBuilder instantiates a new ItemTeamsWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemTeamsWithTeam_slugItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsWithTeam_slugItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsWithTeam_slugItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete to delete a team, the authenticated user must be an organization owner or team maintainer.If you are an organization owner, deleting a parent team will delete all of its child teams as well.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#delete-a-team +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Discussions the discussions property +// returns a *ItemTeamsItemDiscussionsRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Discussions()(*ItemTeamsItemDiscussionsRequestBuilder) { + return NewItemTeamsItemDiscussionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ExternalGroups the externalGroups property +// returns a *ItemTeamsItemExternalGroupsRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) ExternalGroups()(*ItemTeamsItemExternalGroupsRequestBuilder) { + return NewItemTeamsItemExternalGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets a team using the team's `slug`. To create the `slug`, GitHub Enterprise Cloud replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. +// returns a TeamFullable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#get-a-team-by-name +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable), nil +} +// Invitations the invitations property +// returns a *ItemTeamsItemInvitationsRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Invitations()(*ItemTeamsItemInvitationsRequestBuilder) { + return NewItemTeamsItemInvitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Members the members property +// returns a *ItemTeamsItemMembersRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Members()(*ItemTeamsItemMembersRequestBuilder) { + return NewItemTeamsItemMembersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Memberships the memberships property +// returns a *ItemTeamsItemMembershipsRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Memberships()(*ItemTeamsItemMembershipsRequestBuilder) { + return NewItemTeamsItemMembershipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch to edit a team, the authenticated user must either be an organization owner or a team maintainer.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. +// returns a TeamFullable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#update-a-team +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Patch(ctx context.Context, body ItemTeamsItemWithTeam_slugPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable), nil +} +// Projects the projects property +// returns a *ItemTeamsItemProjectsRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Projects()(*ItemTeamsItemProjectsRequestBuilder) { + return NewItemTeamsItemProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repos the repos property +// returns a *ItemTeamsItemReposRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Repos()(*ItemTeamsItemReposRequestBuilder) { + return NewItemTeamsItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +// returns a *ItemTeamsItemTeamsRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) Teams()(*ItemTeamsItemTeamsRequestBuilder) { + return NewItemTeamsItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// TeamSync the teamSync property +// returns a *ItemTeamsItemTeamSyncRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) TeamSync()(*ItemTeamsItemTeamSyncRequestBuilder) { + return NewItemTeamsItemTeamSyncRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation to delete a team, the authenticated user must be an organization owner or team maintainer.If you are an organization owner, deleting a parent team will delete all of its child teams as well.**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a team using the team's `slug`. To create the `slug`, GitHub Enterprise Cloud replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation to edit a team, the authenticated user must either be an organization owner or a team maintainer.**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. +// returns a *RequestInformation when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTeamsItemWithTeam_slugPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemTeamsWithTeam_slugItemRequestBuilder when successful +func (m *ItemTeamsWithTeam_slugItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsWithTeam_slugItemRequestBuilder) { + return NewItemTeamsWithTeam_slugItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_with_org_delete_response.go b/pkg/github/orgs/item_with_org_delete_response.go new file mode 100644 index 0000000..5bb0436 --- /dev/null +++ b/pkg/github/orgs/item_with_org_delete_response.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWithOrgDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemWithOrgDeleteResponse instantiates a new ItemWithOrgDeleteResponse and sets the default values. +func NewItemWithOrgDeleteResponse()(*ItemWithOrgDeleteResponse) { + m := &ItemWithOrgDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithOrgDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithOrgDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithOrgDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithOrgDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithOrgDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemWithOrgDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemWithOrgDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemWithOrgDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_with_org_patch_request_body.go b/pkg/github/orgs/item_with_org_patch_request_body.go new file mode 100644 index 0000000..b9c818e --- /dev/null +++ b/pkg/github/orgs/item_with_org_patch_request_body.go @@ -0,0 +1,863 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWithOrgPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether GitHub Advanced Security is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + advanced_security_enabled_for_new_repositories *bool + // Billing email address. This address is not publicized. + billing_email *string + // The blog property + blog *string + // The company name. + company *string + // Whether Dependabot alerts is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + dependabot_alerts_enabled_for_new_repositories *bool + // Whether Dependabot security updates is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + dependabot_security_updates_enabled_for_new_repositories *bool + // Whether dependency graph is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + dependency_graph_enabled_for_new_repositories *bool + // The description of the company. The maximum size is 160 characters. + description *string + // The publicly visible email address. + email *string + // Whether an organization can use organization projects. + has_organization_projects *bool + // Whether repositories that belong to the organization can use repository projects. + has_repository_projects *bool + // The location. + location *string + // Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + members_can_create_internal_repositories *bool + // Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + members_can_create_pages *bool + // Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + members_can_create_private_pages *bool + // Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + members_can_create_private_repositories *bool + // Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + members_can_create_public_pages *bool + // Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + members_can_create_public_repositories *bool + // Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + members_can_create_repositories *bool + // Whether organization members can fork private organization repositories. + members_can_fork_private_repositories *bool + // The shorthand name of the company. + name *string + // Whether secret scanning is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + secret_scanning_enabled_for_new_repositories *bool + // If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. + secret_scanning_push_protection_custom_link *string + // Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + secret_scanning_push_protection_custom_link_enabled *bool + // Whether secret scanning push protection is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + secret_scanning_push_protection_enabled_for_new_repositories *bool + // Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization. + secret_scanning_validity_checks_enabled *bool + // The Twitter username of the company. + twitter_username *string + // Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + web_commit_signoff_required *bool +} +// NewItemWithOrgPatchRequestBody instantiates a new ItemWithOrgPatchRequestBody and sets the default values. +func NewItemWithOrgPatchRequestBody()(*ItemWithOrgPatchRequestBody) { + m := &ItemWithOrgPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithOrgPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithOrgPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithOrgPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithOrgPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetAdvancedSecurityEnabledForNewRepositories()(*bool) { + return m.advanced_security_enabled_for_new_repositories +} +// GetBillingEmail gets the billing_email property value. Billing email address. This address is not publicized. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetBillingEmail()(*string) { + return m.billing_email +} +// GetBlog gets the blog property value. The blog property +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetBlog()(*string) { + return m.blog +} +// GetCompany gets the company property value. The company name. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetCompany()(*string) { + return m.company +} +// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetDependabotAlertsEnabledForNewRepositories()(*bool) { + return m.dependabot_alerts_enabled_for_new_repositories +} +// GetDependabotSecurityUpdatesEnabledForNewRepositories gets the dependabot_security_updates_enabled_for_new_repositories property value. Whether Dependabot security updates is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) { + return m.dependabot_security_updates_enabled_for_new_repositories +} +// GetDependencyGraphEnabledForNewRepositories gets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetDependencyGraphEnabledForNewRepositories()(*bool) { + return m.dependency_graph_enabled_for_new_repositories +} +// GetDescription gets the description property value. The description of the company. The maximum size is 160 characters. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetEmail gets the email property value. The publicly visible email address. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithOrgPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advanced_security_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurityEnabledForNewRepositories(val) + } + return nil + } + res["billing_email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillingEmail(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["dependabot_alerts_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependabotAlertsEnabledForNewRepositories(val) + } + return nil + } + res["dependabot_security_updates_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependabotSecurityUpdatesEnabledForNewRepositories(val) + } + return nil + } + res["dependency_graph_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraphEnabledForNewRepositories(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["has_organization_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasOrganizationProjects(val) + } + return nil + } + res["has_repository_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasRepositoryProjects(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["members_can_create_internal_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreateInternalRepositories(val) + } + return nil + } + res["members_can_create_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePages(val) + } + return nil + } + res["members_can_create_private_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePrivatePages(val) + } + return nil + } + res["members_can_create_private_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePrivateRepositories(val) + } + return nil + } + res["members_can_create_public_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePublicPages(val) + } + return nil + } + res["members_can_create_public_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreatePublicRepositories(val) + } + return nil + } + res["members_can_create_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanCreateRepositories(val) + } + return nil + } + res["members_can_fork_private_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersCanForkPrivateRepositories(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["secret_scanning_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_push_protection_custom_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionCustomLink(val) + } + return nil + } + res["secret_scanning_push_protection_custom_link_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionCustomLinkEnabled(val) + } + return nil + } + res["secret_scanning_push_protection_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtectionEnabledForNewRepositories(val) + } + return nil + } + res["secret_scanning_validity_checks_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningValidityChecksEnabled(val) + } + return nil + } + res["twitter_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTwitterUsername(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 +} +// GetHasOrganizationProjects gets the has_organization_projects property value. Whether an organization can use organization projects. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetHasOrganizationProjects()(*bool) { + return m.has_organization_projects +} +// GetHasRepositoryProjects gets the has_repository_projects property value. Whether repositories that belong to the organization can use repository projects. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetHasRepositoryProjects()(*bool) { + return m.has_repository_projects +} +// GetLocation gets the location property value. The location. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetLocation()(*string) { + return m.location +} +// GetMembersCanCreateInternalRepositories gets the members_can_create_internal_repositories property value. Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreateInternalRepositories()(*bool) { + return m.members_can_create_internal_repositories +} +// GetMembersCanCreatePages gets the members_can_create_pages property value. Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreatePages()(*bool) { + return m.members_can_create_pages +} +// GetMembersCanCreatePrivatePages gets the members_can_create_private_pages property value. Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreatePrivatePages()(*bool) { + return m.members_can_create_private_pages +} +// GetMembersCanCreatePrivateRepositories gets the members_can_create_private_repositories property value. Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreatePrivateRepositories()(*bool) { + return m.members_can_create_private_repositories +} +// GetMembersCanCreatePublicPages gets the members_can_create_public_pages property value. Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreatePublicPages()(*bool) { + return m.members_can_create_public_pages +} +// GetMembersCanCreatePublicRepositories gets the members_can_create_public_repositories property value. Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreatePublicRepositories()(*bool) { + return m.members_can_create_public_repositories +} +// GetMembersCanCreateRepositories gets the members_can_create_repositories property value. Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanCreateRepositories()(*bool) { + return m.members_can_create_repositories +} +// GetMembersCanForkPrivateRepositories gets the members_can_fork_private_repositories property value. Whether organization members can fork private organization repositories. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetMembersCanForkPrivateRepositories()(*bool) { + return m.members_can_fork_private_repositories +} +// GetName gets the name property value. The shorthand name of the company. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetName()(*string) { + return m.name +} +// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetSecretScanningEnabledForNewRepositories()(*bool) { + return m.secret_scanning_enabled_for_new_repositories +} +// GetSecretScanningPushProtectionCustomLink gets the secret_scanning_push_protection_custom_link property value. If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetSecretScanningPushProtectionCustomLink()(*string) { + return m.secret_scanning_push_protection_custom_link +} +// GetSecretScanningPushProtectionCustomLinkEnabled gets the secret_scanning_push_protection_custom_link_enabled property value. Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetSecretScanningPushProtectionCustomLinkEnabled()(*bool) { + return m.secret_scanning_push_protection_custom_link_enabled +} +// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) { + return m.secret_scanning_push_protection_enabled_for_new_repositories +} +// GetSecretScanningValidityChecksEnabled gets the secret_scanning_validity_checks_enabled property value. Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetSecretScanningValidityChecksEnabled()(*bool) { + return m.secret_scanning_validity_checks_enabled +} +// GetTwitterUsername gets the twitter_username property value. The Twitter username of the company. +// returns a *string when successful +func (m *ItemWithOrgPatchRequestBody) GetTwitterUsername()(*string) { + return m.twitter_username +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *ItemWithOrgPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("advanced_security_enabled_for_new_repositories", m.GetAdvancedSecurityEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("billing_email", m.GetBillingEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", m.GetDependabotAlertsEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependabot_security_updates_enabled_for_new_repositories", m.GetDependabotSecurityUpdatesEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dependency_graph_enabled_for_new_repositories", m.GetDependencyGraphEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_organization_projects", m.GetHasOrganizationProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_repository_projects", m.GetHasRepositoryProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_internal_repositories", m.GetMembersCanCreateInternalRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_pages", m.GetMembersCanCreatePages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_private_pages", m.GetMembersCanCreatePrivatePages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_private_repositories", m.GetMembersCanCreatePrivateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_public_pages", m.GetMembersCanCreatePublicPages()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_public_repositories", m.GetMembersCanCreatePublicRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_create_repositories", m.GetMembersCanCreateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("members_can_fork_private_repositories", m.GetMembersCanForkPrivateRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_enabled_for_new_repositories", m.GetSecretScanningEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret_scanning_push_protection_custom_link", m.GetSecretScanningPushProtectionCustomLink()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_push_protection_custom_link_enabled", m.GetSecretScanningPushProtectionCustomLinkEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_push_protection_enabled_for_new_repositories", m.GetSecretScanningPushProtectionEnabledForNewRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secret_scanning_validity_checks_enabled", m.GetSecretScanningValidityChecksEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("twitter_username", m.GetTwitterUsername()) + 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 *ItemWithOrgPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +func (m *ItemWithOrgPatchRequestBody) SetAdvancedSecurityEnabledForNewRepositories(value *bool)() { + m.advanced_security_enabled_for_new_repositories = value +} +// SetBillingEmail sets the billing_email property value. Billing email address. This address is not publicized. +func (m *ItemWithOrgPatchRequestBody) SetBillingEmail(value *string)() { + m.billing_email = value +} +// SetBlog sets the blog property value. The blog property +func (m *ItemWithOrgPatchRequestBody) SetBlog(value *string)() { + m.blog = value +} +// SetCompany sets the company property value. The company name. +func (m *ItemWithOrgPatchRequestBody) SetCompany(value *string)() { + m.company = value +} +// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +func (m *ItemWithOrgPatchRequestBody) SetDependabotAlertsEnabledForNewRepositories(value *bool)() { + m.dependabot_alerts_enabled_for_new_repositories = value +} +// SetDependabotSecurityUpdatesEnabledForNewRepositories sets the dependabot_security_updates_enabled_for_new_repositories property value. Whether Dependabot security updates is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +func (m *ItemWithOrgPatchRequestBody) SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() { + m.dependabot_security_updates_enabled_for_new_repositories = value +} +// SetDependencyGraphEnabledForNewRepositories sets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +func (m *ItemWithOrgPatchRequestBody) SetDependencyGraphEnabledForNewRepositories(value *bool)() { + m.dependency_graph_enabled_for_new_repositories = value +} +// SetDescription sets the description property value. The description of the company. The maximum size is 160 characters. +func (m *ItemWithOrgPatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetEmail sets the email property value. The publicly visible email address. +func (m *ItemWithOrgPatchRequestBody) SetEmail(value *string)() { + m.email = value +} +// SetHasOrganizationProjects sets the has_organization_projects property value. Whether an organization can use organization projects. +func (m *ItemWithOrgPatchRequestBody) SetHasOrganizationProjects(value *bool)() { + m.has_organization_projects = value +} +// SetHasRepositoryProjects sets the has_repository_projects property value. Whether repositories that belong to the organization can use repository projects. +func (m *ItemWithOrgPatchRequestBody) SetHasRepositoryProjects(value *bool)() { + m.has_repository_projects = value +} +// SetLocation sets the location property value. The location. +func (m *ItemWithOrgPatchRequestBody) SetLocation(value *string)() { + m.location = value +} +// SetMembersCanCreateInternalRepositories sets the members_can_create_internal_repositories property value. Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreateInternalRepositories(value *bool)() { + m.members_can_create_internal_repositories = value +} +// SetMembersCanCreatePages sets the members_can_create_pages property value. Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreatePages(value *bool)() { + m.members_can_create_pages = value +} +// SetMembersCanCreatePrivatePages sets the members_can_create_private_pages property value. Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreatePrivatePages(value *bool)() { + m.members_can_create_private_pages = value +} +// SetMembersCanCreatePrivateRepositories sets the members_can_create_private_repositories property value. Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreatePrivateRepositories(value *bool)() { + m.members_can_create_private_repositories = value +} +// SetMembersCanCreatePublicPages sets the members_can_create_public_pages property value. Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreatePublicPages(value *bool)() { + m.members_can_create_public_pages = value +} +// SetMembersCanCreatePublicRepositories sets the members_can_create_public_repositories property value. Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreatePublicRepositories(value *bool)() { + m.members_can_create_public_repositories = value +} +// SetMembersCanCreateRepositories sets the members_can_create_repositories property value. Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanCreateRepositories(value *bool)() { + m.members_can_create_repositories = value +} +// SetMembersCanForkPrivateRepositories sets the members_can_fork_private_repositories property value. Whether organization members can fork private organization repositories. +func (m *ItemWithOrgPatchRequestBody) SetMembersCanForkPrivateRepositories(value *bool)() { + m.members_can_fork_private_repositories = value +} +// SetName sets the name property value. The shorthand name of the company. +func (m *ItemWithOrgPatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +func (m *ItemWithOrgPatchRequestBody) SetSecretScanningEnabledForNewRepositories(value *bool)() { + m.secret_scanning_enabled_for_new_repositories = value +} +// SetSecretScanningPushProtectionCustomLink sets the secret_scanning_push_protection_custom_link property value. If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. +func (m *ItemWithOrgPatchRequestBody) SetSecretScanningPushProtectionCustomLink(value *string)() { + m.secret_scanning_push_protection_custom_link = value +} +// SetSecretScanningPushProtectionCustomLinkEnabled sets the secret_scanning_push_protection_custom_link_enabled property value. Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. +func (m *ItemWithOrgPatchRequestBody) SetSecretScanningPushProtectionCustomLinkEnabled(value *bool)() { + m.secret_scanning_push_protection_custom_link_enabled = value +} +// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories.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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +func (m *ItemWithOrgPatchRequestBody) SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() { + m.secret_scanning_push_protection_enabled_for_new_repositories = value +} +// SetSecretScanningValidityChecksEnabled sets the secret_scanning_validity_checks_enabled property value. Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization. +func (m *ItemWithOrgPatchRequestBody) SetSecretScanningValidityChecksEnabled(value *bool)() { + m.secret_scanning_validity_checks_enabled = value +} +// SetTwitterUsername sets the twitter_username property value. The Twitter username of the company. +func (m *ItemWithOrgPatchRequestBody) SetTwitterUsername(value *string)() { + m.twitter_username = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. +func (m *ItemWithOrgPatchRequestBody) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type ItemWithOrgPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurityEnabledForNewRepositories()(*bool) + GetBillingEmail()(*string) + GetBlog()(*string) + GetCompany()(*string) + GetDependabotAlertsEnabledForNewRepositories()(*bool) + GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) + GetDependencyGraphEnabledForNewRepositories()(*bool) + GetDescription()(*string) + GetEmail()(*string) + GetHasOrganizationProjects()(*bool) + GetHasRepositoryProjects()(*bool) + GetLocation()(*string) + GetMembersCanCreateInternalRepositories()(*bool) + GetMembersCanCreatePages()(*bool) + GetMembersCanCreatePrivatePages()(*bool) + GetMembersCanCreatePrivateRepositories()(*bool) + GetMembersCanCreatePublicPages()(*bool) + GetMembersCanCreatePublicRepositories()(*bool) + GetMembersCanCreateRepositories()(*bool) + GetMembersCanForkPrivateRepositories()(*bool) + GetName()(*string) + GetSecretScanningEnabledForNewRepositories()(*bool) + GetSecretScanningPushProtectionCustomLink()(*string) + GetSecretScanningPushProtectionCustomLinkEnabled()(*bool) + GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) + GetSecretScanningValidityChecksEnabled()(*bool) + GetTwitterUsername()(*string) + GetWebCommitSignoffRequired()(*bool) + SetAdvancedSecurityEnabledForNewRepositories(value *bool)() + SetBillingEmail(value *string)() + SetBlog(value *string)() + SetCompany(value *string)() + SetDependabotAlertsEnabledForNewRepositories(value *bool)() + SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() + SetDependencyGraphEnabledForNewRepositories(value *bool)() + SetDescription(value *string)() + SetEmail(value *string)() + SetHasOrganizationProjects(value *bool)() + SetHasRepositoryProjects(value *bool)() + SetLocation(value *string)() + SetMembersCanCreateInternalRepositories(value *bool)() + SetMembersCanCreatePages(value *bool)() + SetMembersCanCreatePrivatePages(value *bool)() + SetMembersCanCreatePrivateRepositories(value *bool)() + SetMembersCanCreatePublicPages(value *bool)() + SetMembersCanCreatePublicRepositories(value *bool)() + SetMembersCanCreateRepositories(value *bool)() + SetMembersCanForkPrivateRepositories(value *bool)() + SetName(value *string)() + SetSecretScanningEnabledForNewRepositories(value *bool)() + SetSecretScanningPushProtectionCustomLink(value *string)() + SetSecretScanningPushProtectionCustomLinkEnabled(value *bool)() + SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() + SetSecretScanningValidityChecksEnabled(value *bool)() + SetTwitterUsername(value *string)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/orgs/item_with_security_product_item_request_builder.go b/pkg/github/orgs/item_with_security_product_item_request_builder.go new file mode 100644 index 0000000..4d6cc4a --- /dev/null +++ b/pkg/github/orgs/item_with_security_product_item_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemWithSecurity_productItemRequestBuilder builds and executes requests for operations under \orgs\{org}\{security_product} +type ItemWithSecurity_productItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByEnablement gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.item.item collection +// returns a *ItemItemWithEnablementItemRequestBuilder when successful +func (m *ItemWithSecurity_productItemRequestBuilder) ByEnablement(enablement string)(*ItemItemWithEnablementItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if enablement != "" { + urlTplParams["enablement"] = enablement + } + return NewItemItemWithEnablementItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemWithSecurity_productItemRequestBuilderInternal instantiates a new ItemWithSecurity_productItemRequestBuilder and sets the default values. +func NewItemWithSecurity_productItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithSecurity_productItemRequestBuilder) { + m := &ItemWithSecurity_productItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/{security_product}", pathParameters), + } + return m +} +// NewItemWithSecurity_productItemRequestBuilder instantiates a new ItemWithSecurity_productItemRequestBuilder and sets the default values. +func NewItemWithSecurity_productItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemWithSecurity_productItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemWithSecurity_productItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/orgs_request_builder.go b/pkg/github/orgs/orgs_request_builder.go new file mode 100644 index 0000000..4eb3831 --- /dev/null +++ b/pkg/github/orgs/orgs_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// OrgsRequestBuilder builds and executes requests for operations under \orgs +type OrgsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByOrg gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item collection +// returns a *WithOrgItemRequestBuilder when successful +func (m *OrgsRequestBuilder) ByOrg(org string)(*WithOrgItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if org != "" { + urlTplParams["org"] = org + } + return NewWithOrgItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewOrgsRequestBuilderInternal instantiates a new OrgsRequestBuilder and sets the default values. +func NewOrgsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrgsRequestBuilder) { + m := &OrgsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs", pathParameters), + } + return m +} +// NewOrgsRequestBuilder instantiates a new OrgsRequestBuilder and sets the default values. +func NewOrgsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrgsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewOrgsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go new file mode 100644 index 0000000..fedd3fa --- /dev/null +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -0,0 +1,371 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithOrgItemRequestBuilder builds and executes requests for operations under \orgs\{org} +type WithOrgItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Actions the actions property +// returns a *ItemActionsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Actions()(*ItemActionsRequestBuilder) { + return NewItemActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Announcement the announcement property +// returns a *ItemAnnouncementRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Announcement()(*ItemAnnouncementRequestBuilder) { + return NewItemAnnouncementRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Attestations the attestations property +// returns a *ItemAttestationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Attestations()(*ItemAttestationsRequestBuilder) { + return NewItemAttestationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AuditLog the auditLog property +// returns a *ItemAuditLogRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) AuditLog()(*ItemAuditLogRequestBuilder) { + return NewItemAuditLogRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Blocks the blocks property +// returns a *ItemBlocksRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Blocks()(*ItemBlocksRequestBuilder) { + return NewItemBlocksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// BySecurity_product gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.orgs.item.item collection +// returns a *ItemWithSecurity_productItemRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) BySecurity_product(security_product string)(*ItemWithSecurity_productItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if security_product != "" { + urlTplParams["security_product"] = security_product + } + return NewItemWithSecurity_productItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// CodeScanning the codeScanning property +// returns a *ItemCodeScanningRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) CodeScanning()(*ItemCodeScanningRequestBuilder) { + return NewItemCodeScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CodeSecurity the codeSecurity property +// returns a *ItemCodeSecurityRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) CodeSecurity()(*ItemCodeSecurityRequestBuilder) { + return NewItemCodeSecurityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codespaces the codespaces property +// returns a *ItemCodespacesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Codespaces()(*ItemCodespacesRequestBuilder) { + return NewItemCodespacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithOrgItemRequestBuilderInternal instantiates a new WithOrgItemRequestBuilder and sets the default values. +func NewWithOrgItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOrgItemRequestBuilder) { + m := &WithOrgItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}", pathParameters), + } + return m +} +// NewWithOrgItemRequestBuilder instantiates a new WithOrgItemRequestBuilder and sets the default values. +func NewWithOrgItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOrgItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithOrgItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Copilot the copilot property +// returns a *ItemCopilotRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Copilot()(*ItemCopilotRequestBuilder) { + return NewItemCopilotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CredentialAuthorizations the credentialAuthorizations property +// returns a *ItemCredentialAuthorizationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) CredentialAuthorizations()(*ItemCredentialAuthorizationsRequestBuilder) { + return NewItemCredentialAuthorizationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Custom_roles the custom_roles property +// returns a *ItemCustom_rolesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Custom_roles()(*ItemCustom_rolesRequestBuilder) { + return NewItemCustom_rolesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CustomRepositoryRoles the customRepositoryRoles property +// returns a *ItemCustomRepositoryRolesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) CustomRepositoryRoles()(*ItemCustomRepositoryRolesRequestBuilder) { + return NewItemCustomRepositoryRolesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete deletes an organization and all its repositories.The organization login will be unavailable for 90 days after deletion.Please review the Terms of Service regarding account deletion before using this endpoint:https://docs.github.com/enterprise-cloud@latest//site-policy/github-terms/github-terms-of-service +// returns a ItemWithOrgDeleteResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#delete-an-organization +func (m *WithOrgItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemWithOrgDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemWithOrgDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemWithOrgDeleteResponseable), nil +} +// Dependabot the dependabot property +// returns a *ItemDependabotRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Dependabot()(*ItemDependabotRequestBuilder) { + return NewItemDependabotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Docker the docker property +// returns a *ItemDockerRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Docker()(*ItemDockerRequestBuilder) { + return NewItemDockerRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Events the events property +// returns a *ItemEventsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Events()(*ItemEventsRequestBuilder) { + return NewItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ExternalGroup the externalGroup property +// returns a *ItemExternalGroupRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) ExternalGroup()(*ItemExternalGroupRequestBuilder) { + return NewItemExternalGroupRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ExternalGroups the externalGroups property +// returns a *ItemExternalGroupsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) ExternalGroups()(*ItemExternalGroupsRequestBuilder) { + return NewItemExternalGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Failed_invitations the failed_invitations property +// returns a *ItemFailed_invitationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Failed_invitations()(*ItemFailed_invitationsRequestBuilder) { + return NewItemFailed_invitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Fine_grained_permissions the fine_grained_permissions property +// returns a *ItemFine_grained_permissionsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Fine_grained_permissions()(*ItemFine_grained_permissionsRequestBuilder) { + return NewItemFine_grained_permissionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/enterprise-cloud@latest//articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/enterprise-cloud@latest//code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub Enterprise Cloud plan, GitHub Apps need the `Organization plan` permission. +// returns a OrganizationFullable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#get-an-organization +func (m *WithOrgItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFullable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFullable), nil +} +// Hooks the hooks property +// returns a *ItemHooksRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Hooks()(*ItemHooksRequestBuilder) { + return NewItemHooksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installation the installation property +// returns a *ItemInstallationRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Installation()(*ItemInstallationRequestBuilder) { + return NewItemInstallationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installations the installations property +// returns a *ItemInstallationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Installations()(*ItemInstallationsRequestBuilder) { + return NewItemInstallationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// InteractionLimits the interactionLimits property +// returns a *ItemInteractionLimitsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) InteractionLimits()(*ItemInteractionLimitsRequestBuilder) { + return NewItemInteractionLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Invitations the invitations property +// returns a *ItemInvitationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Invitations()(*ItemInvitationsRequestBuilder) { + return NewItemInvitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Issues the issues property +// returns a *ItemIssuesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Issues()(*ItemIssuesRequestBuilder) { + return NewItemIssuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Members the members property +// returns a *ItemMembersRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Members()(*ItemMembersRequestBuilder) { + return NewItemMembersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Memberships the memberships property +// returns a *ItemMembershipsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Memberships()(*ItemMembershipsRequestBuilder) { + return NewItemMembershipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Migrations the migrations property +// returns a *ItemMigrationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Migrations()(*ItemMigrationsRequestBuilder) { + return NewItemMigrationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// OrganizationFineGrainedPermissions the organizationFineGrainedPermissions property +// returns a *ItemOrganizationFineGrainedPermissionsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) OrganizationFineGrainedPermissions()(*ItemOrganizationFineGrainedPermissionsRequestBuilder) { + return NewItemOrganizationFineGrainedPermissionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// OrganizationRoles the organizationRoles property +// returns a *ItemOrganizationRolesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) OrganizationRoles()(*ItemOrganizationRolesRequestBuilder) { + return NewItemOrganizationRolesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Outside_collaborators the outside_collaborators property +// returns a *ItemOutside_collaboratorsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Outside_collaborators()(*ItemOutside_collaboratorsRequestBuilder) { + return NewItemOutside_collaboratorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Packages the packages property +// returns a *ItemPackagesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Packages()(*ItemPackagesRequestBuilder) { + return NewItemPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch **Parameter Deprecation Notice:** GitHub Enterprise Cloud will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).Updates the organization's profile and member privileges.With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/enterprise-cloud@latest//code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a OrganizationFullable when successful +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#update-an-organization +func (m *WithOrgItemRequestBuilder) Patch(ctx context.Context, body ItemWithOrgPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFullable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationFullable), nil +} +// PersonalAccessTokenRequests the personalAccessTokenRequests property +// returns a *ItemPersonalAccessTokenRequestsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) PersonalAccessTokenRequests()(*ItemPersonalAccessTokenRequestsRequestBuilder) { + return NewItemPersonalAccessTokenRequestsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// PersonalAccessTokens the personalAccessTokens property +// returns a *ItemPersonalAccessTokensRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) PersonalAccessTokens()(*ItemPersonalAccessTokensRequestBuilder) { + return NewItemPersonalAccessTokensRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Projects the projects property +// returns a *ItemProjectsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Projects()(*ItemProjectsRequestBuilder) { + return NewItemProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Properties the properties property +// returns a *ItemPropertiesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Properties()(*ItemPropertiesRequestBuilder) { + return NewItemPropertiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Public_members the public_members property +// returns a *ItemPublic_membersRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Public_members()(*ItemPublic_membersRequestBuilder) { + return NewItemPublic_membersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repos the repos property +// returns a *ItemReposRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Repos()(*ItemReposRequestBuilder) { + return NewItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RepositoryFineGrainedPermissions the repositoryFineGrainedPermissions property +// returns a *ItemRepositoryFineGrainedPermissionsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) RepositoryFineGrainedPermissions()(*ItemRepositoryFineGrainedPermissionsRequestBuilder) { + return NewItemRepositoryFineGrainedPermissionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rulesets the rulesets property +// returns a *ItemRulesetsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Rulesets()(*ItemRulesetsRequestBuilder) { + return NewItemRulesetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecretScanning the secretScanning property +// returns a *ItemSecretScanningRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) SecretScanning()(*ItemSecretScanningRequestBuilder) { + return NewItemSecretScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecurityAdvisories the securityAdvisories property +// returns a *ItemSecurityAdvisoriesRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) SecurityAdvisories()(*ItemSecurityAdvisoriesRequestBuilder) { + return NewItemSecurityAdvisoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecurityManagers the securityManagers property +// returns a *ItemSecurityManagersRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) SecurityManagers()(*ItemSecurityManagersRequestBuilder) { + return NewItemSecurityManagersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Settings the settings property +// returns a *ItemSettingsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { + return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +// returns a *ItemTeamsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Teams()(*ItemTeamsRequestBuilder) { + return NewItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// TeamSync the teamSync property +// returns a *ItemTeamSyncRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) TeamSync()(*ItemTeamSyncRequestBuilder) { + return NewItemTeamSyncRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes an organization and all its repositories.The organization login will be unavailable for 90 days after deletion.Please review the Terms of Service regarding account deletion before using this endpoint:https://docs.github.com/enterprise-cloud@latest//site-policy/github-terms/github-terms-of-service +// returns a *RequestInformation when successful +func (m *WithOrgItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/enterprise-cloud@latest//articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/enterprise-cloud@latest//code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub Enterprise Cloud plan, GitHub Apps need the `Organization plan` permission. +// returns a *RequestInformation when successful +func (m *WithOrgItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Parameter Deprecation Notice:** GitHub Enterprise Cloud will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).Updates the organization's profile and member privileges.With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/enterprise-cloud@latest//code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *WithOrgItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithOrgPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithOrgItemRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) WithUrl(rawUrl string)(*WithOrgItemRequestBuilder) { + return NewWithOrgItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go b/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go new file mode 100644 index 0000000..cf17922 --- /dev/null +++ b/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package cards +import ( + "errors" +) +type GetArchived_stateQueryParameterType int + +const ( + ALL_GETARCHIVED_STATEQUERYPARAMETERTYPE GetArchived_stateQueryParameterType = iota + ARCHIVED_GETARCHIVED_STATEQUERYPARAMETERTYPE + NOT_ARCHIVED_GETARCHIVED_STATEQUERYPARAMETERTYPE +) + +func (i GetArchived_stateQueryParameterType) String() string { + return []string{"all", "archived", "not_archived"}[i] +} +func ParseGetArchived_stateQueryParameterType(v string) (any, error) { + result := ALL_GETARCHIVED_STATEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETARCHIVED_STATEQUERYPARAMETERTYPE + case "archived": + result = ARCHIVED_GETARCHIVED_STATEQUERYPARAMETERTYPE + case "not_archived": + result = NOT_ARCHIVED_GETARCHIVED_STATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetArchived_stateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetArchived_stateQueryParameterType(values []GetArchived_stateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetArchived_stateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/projects/columns_cards_item_moves403_error.go b/pkg/github/projects/columns_cards_item_moves403_error.go new file mode 100644 index 0000000..19ed620 --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves403_error.go @@ -0,0 +1,158 @@ +package projects + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemMoves403Error 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 errors property + errors []ColumnsCardsItemMoves403Error_errorsable + // The message property + message *string +} +// NewColumnsCardsItemMoves403Error instantiates a new ColumnsCardsItemMoves403Error and sets the default values. +func NewColumnsCardsItemMoves403Error()(*ColumnsCardsItemMoves403Error) { + m := &ColumnsCardsItemMoves403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemMoves403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemMoves403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemMoves403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ColumnsCardsItemMoves403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemMoves403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ColumnsCardsItemMoves403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []ColumnsCardsItemMoves403Error_errorsable when successful +func (m *ColumnsCardsItemMoves403Error) GetErrors()([]ColumnsCardsItemMoves403Error_errorsable) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemMoves403Error) 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["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnsCardsItemMoves403Error_errorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnsCardsItemMoves403Error_errorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ColumnsCardsItemMoves403Error_errorsable) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsCardsItemMoves403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemMoves403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("errors", cast) + 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 *ColumnsCardsItemMoves403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ColumnsCardsItemMoves403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ColumnsCardsItemMoves403Error) SetErrors(value []ColumnsCardsItemMoves403Error_errorsable)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsCardsItemMoves403Error) SetMessage(value *string)() { + m.message = value +} +type ColumnsCardsItemMoves403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetErrors()([]ColumnsCardsItemMoves403Error_errorsable) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetErrors(value []ColumnsCardsItemMoves403Error_errorsable)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/columns_cards_item_moves403_error_errors.go b/pkg/github/projects/columns_cards_item_moves403_error_errors.go new file mode 100644 index 0000000..a4a3d66 --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves403_error_errors.go @@ -0,0 +1,167 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemMoves403Error_errors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The field property + field *string + // The message property + message *string + // The resource property + resource *string +} +// NewColumnsCardsItemMoves403Error_errors instantiates a new ColumnsCardsItemMoves403Error_errors and sets the default values. +func NewColumnsCardsItemMoves403Error_errors()(*ColumnsCardsItemMoves403Error_errors) { + m := &ColumnsCardsItemMoves403Error_errors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemMoves403Error_errorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemMoves403Error_errorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemMoves403Error_errors(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemMoves403Error_errors) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *ColumnsCardsItemMoves403Error_errors) GetCode()(*string) { + return m.code +} +// GetField gets the field property value. The field property +// returns a *string when successful +func (m *ColumnsCardsItemMoves403Error_errors) GetField()(*string) { + return m.field +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemMoves403Error_errors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["field"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetField(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 + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsCardsItemMoves403Error_errors) GetMessage()(*string) { + return m.message +} +// GetResource gets the resource property value. The resource property +// returns a *string when successful +func (m *ColumnsCardsItemMoves403Error_errors) GetResource()(*string) { + return m.resource +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemMoves403Error_errors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("field", m.GetField()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource", m.GetResource()) + 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 *ColumnsCardsItemMoves403Error_errors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ColumnsCardsItemMoves403Error_errors) SetCode(value *string)() { + m.code = value +} +// SetField sets the field property value. The field property +func (m *ColumnsCardsItemMoves403Error_errors) SetField(value *string)() { + m.field = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsCardsItemMoves403Error_errors) SetMessage(value *string)() { + m.message = value +} +// SetResource sets the resource property value. The resource property +func (m *ColumnsCardsItemMoves403Error_errors) SetResource(value *string)() { + m.resource = value +} +type ColumnsCardsItemMoves403Error_errorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetField()(*string) + GetMessage()(*string) + GetResource()(*string) + SetCode(value *string)() + SetField(value *string)() + SetMessage(value *string)() + SetResource(value *string)() +} diff --git a/pkg/github/projects/columns_cards_item_moves503_error.go b/pkg/github/projects/columns_cards_item_moves503_error.go new file mode 100644 index 0000000..e8e956b --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves503_error.go @@ -0,0 +1,187 @@ +package projects + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemMoves503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The errors property + errors []ColumnsCardsItemMoves503Error_errorsable + // The message property + message *string +} +// NewColumnsCardsItemMoves503Error instantiates a new ColumnsCardsItemMoves503Error and sets the default values. +func NewColumnsCardsItemMoves503Error()(*ColumnsCardsItemMoves503Error) { + m := &ColumnsCardsItemMoves503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemMoves503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemMoves503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemMoves503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ColumnsCardsItemMoves503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemMoves503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *ColumnsCardsItemMoves503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ColumnsCardsItemMoves503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []ColumnsCardsItemMoves503Error_errorsable when successful +func (m *ColumnsCardsItemMoves503Error) GetErrors()([]ColumnsCardsItemMoves503Error_errorsable) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemMoves503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnsCardsItemMoves503Error_errorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnsCardsItemMoves503Error_errorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ColumnsCardsItemMoves503Error_errorsable) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsCardsItemMoves503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemMoves503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("errors", cast) + 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 *ColumnsCardsItemMoves503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ColumnsCardsItemMoves503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ColumnsCardsItemMoves503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ColumnsCardsItemMoves503Error) SetErrors(value []ColumnsCardsItemMoves503Error_errorsable)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsCardsItemMoves503Error) SetMessage(value *string)() { + m.message = value +} +type ColumnsCardsItemMoves503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetErrors()([]ColumnsCardsItemMoves503Error_errorsable) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetErrors(value []ColumnsCardsItemMoves503Error_errorsable)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/columns_cards_item_moves503_error_errors.go b/pkg/github/projects/columns_cards_item_moves503_error_errors.go new file mode 100644 index 0000000..fde626e --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves503_error_errors.go @@ -0,0 +1,109 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemMoves503Error_errors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The message property + message *string +} +// NewColumnsCardsItemMoves503Error_errors instantiates a new ColumnsCardsItemMoves503Error_errors and sets the default values. +func NewColumnsCardsItemMoves503Error_errors()(*ColumnsCardsItemMoves503Error_errors) { + m := &ColumnsCardsItemMoves503Error_errors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemMoves503Error_errorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemMoves503Error_errorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemMoves503Error_errors(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemMoves503Error_errors) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *ColumnsCardsItemMoves503Error_errors) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemMoves503Error_errors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsCardsItemMoves503Error_errors) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemMoves503Error_errors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + 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 *ColumnsCardsItemMoves503Error_errors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ColumnsCardsItemMoves503Error_errors) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsCardsItemMoves503Error_errors) SetMessage(value *string)() { + m.message = value +} +type ColumnsCardsItemMoves503Error_errorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/columns_cards_item_moves_post_request_body.go b/pkg/github/projects/columns_cards_item_moves_post_request_body.go new file mode 100644 index 0000000..5d29836 --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves_post_request_body.go @@ -0,0 +1,109 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemMovesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The unique identifier of the column the card should be moved to + column_id *int32 + // The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + position *string +} +// NewColumnsCardsItemMovesPostRequestBody instantiates a new ColumnsCardsItemMovesPostRequestBody and sets the default values. +func NewColumnsCardsItemMovesPostRequestBody()(*ColumnsCardsItemMovesPostRequestBody) { + m := &ColumnsCardsItemMovesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemMovesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemMovesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemMovesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemMovesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColumnId gets the column_id property value. The unique identifier of the column the card should be moved to +// returns a *int32 when successful +func (m *ColumnsCardsItemMovesPostRequestBody) GetColumnId()(*int32) { + return m.column_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemMovesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["column_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetColumnId(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + return res +} +// GetPosition gets the position property value. The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. +// returns a *string when successful +func (m *ColumnsCardsItemMovesPostRequestBody) GetPosition()(*string) { + return m.position +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemMovesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("column_id", m.GetColumnId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("position", m.GetPosition()) + 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 *ColumnsCardsItemMovesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColumnId sets the column_id property value. The unique identifier of the column the card should be moved to +func (m *ColumnsCardsItemMovesPostRequestBody) SetColumnId(value *int32)() { + m.column_id = value +} +// SetPosition sets the position property value. The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. +func (m *ColumnsCardsItemMovesPostRequestBody) SetPosition(value *string)() { + m.position = value +} +type ColumnsCardsItemMovesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnId()(*int32) + GetPosition()(*string) + SetColumnId(value *int32)() + SetPosition(value *string)() +} diff --git a/pkg/github/projects/columns_cards_item_moves_post_response.go b/pkg/github/projects/columns_cards_item_moves_post_response.go new file mode 100644 index 0000000..2e5c637 --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves_post_response.go @@ -0,0 +1,32 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemMovesPostResponse struct { +} +// NewColumnsCardsItemMovesPostResponse instantiates a new ColumnsCardsItemMovesPostResponse and sets the default values. +func NewColumnsCardsItemMovesPostResponse()(*ColumnsCardsItemMovesPostResponse) { + m := &ColumnsCardsItemMovesPostResponse{ + } + return m +} +// CreateColumnsCardsItemMovesPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemMovesPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemMovesPostResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemMovesPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemMovesPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +type ColumnsCardsItemMovesPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/projects/columns_cards_item_moves_request_builder.go b/pkg/github/projects/columns_cards_item_moves_request_builder.go new file mode 100644 index 0000000..4b5773d --- /dev/null +++ b/pkg/github/projects/columns_cards_item_moves_request_builder.go @@ -0,0 +1,70 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ColumnsCardsItemMovesRequestBuilder builds and executes requests for operations under \projects\columns\cards\{card_id}\moves +type ColumnsCardsItemMovesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewColumnsCardsItemMovesRequestBuilderInternal instantiates a new ColumnsCardsItemMovesRequestBuilder and sets the default values. +func NewColumnsCardsItemMovesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsCardsItemMovesRequestBuilder) { + m := &ColumnsCardsItemMovesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns/cards/{card_id}/moves", pathParameters), + } + return m +} +// NewColumnsCardsItemMovesRequestBuilder instantiates a new ColumnsCardsItemMovesRequestBuilder and sets the default values. +func NewColumnsCardsItemMovesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsCardsItemMovesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsCardsItemMovesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post move a project card +// returns a ColumnsCardsItemMovesPostResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a ColumnsCardsItemMoves403Error error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a ColumnsCardsItemMoves503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/cards#move-a-project-card +func (m *ColumnsCardsItemMovesRequestBuilder) Post(ctx context.Context, body ColumnsCardsItemMovesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ColumnsCardsItemMovesPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": CreateColumnsCardsItemMoves403ErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": CreateColumnsCardsItemMoves503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateColumnsCardsItemMovesPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ColumnsCardsItemMovesPostResponseable), nil +} +// returns a *RequestInformation when successful +func (m *ColumnsCardsItemMovesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ColumnsCardsItemMovesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ColumnsCardsItemMovesRequestBuilder when successful +func (m *ColumnsCardsItemMovesRequestBuilder) WithUrl(rawUrl string)(*ColumnsCardsItemMovesRequestBuilder) { + return NewColumnsCardsItemMovesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/columns_cards_item_with_card_403_error.go b/pkg/github/projects/columns_cards_item_with_card_403_error.go new file mode 100644 index 0000000..569b0a0 --- /dev/null +++ b/pkg/github/projects/columns_cards_item_with_card_403_error.go @@ -0,0 +1,152 @@ +package projects + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemWithCard_403Error 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 errors property + errors []string + // The message property + message *string +} +// NewColumnsCardsItemWithCard_403Error instantiates a new ColumnsCardsItemWithCard_403Error and sets the default values. +func NewColumnsCardsItemWithCard_403Error()(*ColumnsCardsItemWithCard_403Error) { + m := &ColumnsCardsItemWithCard_403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemWithCard_403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemWithCard_403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemWithCard_403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ColumnsCardsItemWithCard_403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemWithCard_403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ColumnsCardsItemWithCard_403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []string when successful +func (m *ColumnsCardsItemWithCard_403Error) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemWithCard_403Error) 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["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsCardsItemWithCard_403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemWithCard_403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + err := writer.WriteCollectionOfStringValues("errors", m.GetErrors()) + 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 *ColumnsCardsItemWithCard_403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ColumnsCardsItemWithCard_403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ColumnsCardsItemWithCard_403Error) SetErrors(value []string)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsCardsItemWithCard_403Error) SetMessage(value *string)() { + m.message = value +} +type ColumnsCardsItemWithCard_403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetErrors()([]string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetErrors(value []string)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/columns_cards_item_with_card_patch_request_body.go b/pkg/github/projects/columns_cards_item_with_card_patch_request_body.go new file mode 100644 index 0000000..d95f114 --- /dev/null +++ b/pkg/github/projects/columns_cards_item_with_card_patch_request_body.go @@ -0,0 +1,109 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsCardsItemWithCard_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether or not the card is archived + archived *bool + // The project card's note + note *string +} +// NewColumnsCardsItemWithCard_PatchRequestBody instantiates a new ColumnsCardsItemWithCard_PatchRequestBody and sets the default values. +func NewColumnsCardsItemWithCard_PatchRequestBody()(*ColumnsCardsItemWithCard_PatchRequestBody) { + m := &ColumnsCardsItemWithCard_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsCardsItemWithCard_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsCardsItemWithCard_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsCardsItemWithCard_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsCardsItemWithCard_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArchived gets the archived property value. Whether or not the card is archived +// returns a *bool when successful +func (m *ColumnsCardsItemWithCard_PatchRequestBody) GetArchived()(*bool) { + return m.archived +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsCardsItemWithCard_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNote(val) + } + return nil + } + return res +} +// GetNote gets the note property value. The project card's note +// returns a *string when successful +func (m *ColumnsCardsItemWithCard_PatchRequestBody) GetNote()(*string) { + return m.note +} +// Serialize serializes information the current object +func (m *ColumnsCardsItemWithCard_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("note", m.GetNote()) + 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 *ColumnsCardsItemWithCard_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArchived sets the archived property value. Whether or not the card is archived +func (m *ColumnsCardsItemWithCard_PatchRequestBody) SetArchived(value *bool)() { + m.archived = value +} +// SetNote sets the note property value. The project card's note +func (m *ColumnsCardsItemWithCard_PatchRequestBody) SetNote(value *string)() { + m.note = value +} +type ColumnsCardsItemWithCard_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchived()(*bool) + GetNote()(*string) + SetArchived(value *bool)() + SetNote(value *string)() +} diff --git a/pkg/github/projects/columns_cards_request_builder.go b/pkg/github/projects/columns_cards_request_builder.go new file mode 100644 index 0000000..448f347 --- /dev/null +++ b/pkg/github/projects/columns_cards_request_builder.go @@ -0,0 +1,34 @@ +package projects + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ColumnsCardsRequestBuilder builds and executes requests for operations under \projects\columns\cards +type ColumnsCardsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCard_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.projects.columns.cards.item collection +// returns a *ColumnsCardsWithCard_ItemRequestBuilder when successful +func (m *ColumnsCardsRequestBuilder) ByCard_id(card_id int32)(*ColumnsCardsWithCard_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["card_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(card_id), 10) + return NewColumnsCardsWithCard_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewColumnsCardsRequestBuilderInternal instantiates a new ColumnsCardsRequestBuilder and sets the default values. +func NewColumnsCardsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsCardsRequestBuilder) { + m := &ColumnsCardsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns/cards", pathParameters), + } + return m +} +// NewColumnsCardsRequestBuilder instantiates a new ColumnsCardsRequestBuilder and sets the default values. +func NewColumnsCardsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsCardsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsCardsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/projects/columns_cards_with_card_item_request_builder.go b/pkg/github/projects/columns_cards_with_card_item_request_builder.go new file mode 100644 index 0000000..946ca43 --- /dev/null +++ b/pkg/github/projects/columns_cards_with_card_item_request_builder.go @@ -0,0 +1,141 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ColumnsCardsWithCard_ItemRequestBuilder builds and executes requests for operations under \projects\columns\cards\{card_id} +type ColumnsCardsWithCard_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewColumnsCardsWithCard_ItemRequestBuilderInternal instantiates a new ColumnsCardsWithCard_ItemRequestBuilder and sets the default values. +func NewColumnsCardsWithCard_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsCardsWithCard_ItemRequestBuilder) { + m := &ColumnsCardsWithCard_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns/cards/{card_id}", pathParameters), + } + return m +} +// NewColumnsCardsWithCard_ItemRequestBuilder instantiates a new ColumnsCardsWithCard_ItemRequestBuilder and sets the default values. +func NewColumnsCardsWithCard_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsCardsWithCard_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsCardsWithCard_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a project card +// returns a BasicError error when the service returns a 401 status code +// returns a ColumnsCardsItemWithCard_403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/cards#delete-a-project-card +func (m *ColumnsCardsWithCard_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": CreateColumnsCardsItemWithCard_403ErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets information about a project card. +// returns a ProjectCardable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/cards#get-a-project-card +func (m *ColumnsCardsWithCard_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectCardFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable), nil +} +// Moves the moves property +// returns a *ColumnsCardsItemMovesRequestBuilder when successful +func (m *ColumnsCardsWithCard_ItemRequestBuilder) Moves()(*ColumnsCardsItemMovesRequestBuilder) { + return NewColumnsCardsItemMovesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update an existing project card +// returns a ProjectCardable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/cards#update-an-existing-project-card +func (m *ColumnsCardsWithCard_ItemRequestBuilder) Patch(ctx context.Context, body ColumnsCardsItemWithCard_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectCardFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable), nil +} +// ToDeleteRequestInformation deletes a project card +// returns a *RequestInformation when successful +func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets information about a project card. +// returns a *RequestInformation when successful +func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ColumnsCardsItemWithCard_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ColumnsCardsWithCard_ItemRequestBuilder when successful +func (m *ColumnsCardsWithCard_ItemRequestBuilder) WithUrl(rawUrl string)(*ColumnsCardsWithCard_ItemRequestBuilder) { + return NewColumnsCardsWithCard_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/columns_item_cards_post_request_body_member1.go b/pkg/github/projects/columns_item_cards_post_request_body_member1.go new file mode 100644 index 0000000..7507055 --- /dev/null +++ b/pkg/github/projects/columns_item_cards_post_request_body_member1.go @@ -0,0 +1,80 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemCardsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The project card's note + note *string +} +// NewColumnsItemCardsPostRequestBodyMember1 instantiates a new ColumnsItemCardsPostRequestBodyMember1 and sets the default values. +func NewColumnsItemCardsPostRequestBodyMember1()(*ColumnsItemCardsPostRequestBodyMember1) { + m := &ColumnsItemCardsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsItemCardsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemCardsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemCardsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsItemCardsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemCardsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNote(val) + } + return nil + } + return res +} +// GetNote gets the note property value. The project card's note +// returns a *string when successful +func (m *ColumnsItemCardsPostRequestBodyMember1) GetNote()(*string) { + return m.note +} +// Serialize serializes information the current object +func (m *ColumnsItemCardsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("note", m.GetNote()) + 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 *ColumnsItemCardsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNote sets the note property value. The project card's note +func (m *ColumnsItemCardsPostRequestBodyMember1) SetNote(value *string)() { + m.note = value +} +type ColumnsItemCardsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNote()(*string) + SetNote(value *string)() +} diff --git a/pkg/github/projects/columns_item_cards_post_request_body_member2.go b/pkg/github/projects/columns_item_cards_post_request_body_member2.go new file mode 100644 index 0000000..78f5d78 --- /dev/null +++ b/pkg/github/projects/columns_item_cards_post_request_body_member2.go @@ -0,0 +1,109 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemCardsPostRequestBodyMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The unique identifier of the content associated with the card + content_id *int32 + // The piece of content associated with the card + content_type *string +} +// NewColumnsItemCardsPostRequestBodyMember2 instantiates a new ColumnsItemCardsPostRequestBodyMember2 and sets the default values. +func NewColumnsItemCardsPostRequestBodyMember2()(*ColumnsItemCardsPostRequestBodyMember2) { + m := &ColumnsItemCardsPostRequestBodyMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsItemCardsPostRequestBodyMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemCardsPostRequestBodyMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemCardsPostRequestBodyMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsItemCardsPostRequestBodyMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentId gets the content_id property value. The unique identifier of the content associated with the card +// returns a *int32 when successful +func (m *ColumnsItemCardsPostRequestBodyMember2) GetContentId()(*int32) { + return m.content_id +} +// GetContentType gets the content_type property value. The piece of content associated with the card +// returns a *string when successful +func (m *ColumnsItemCardsPostRequestBodyMember2) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemCardsPostRequestBodyMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetContentId(val) + } + return nil + } + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ColumnsItemCardsPostRequestBodyMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("content_id", m.GetContentId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + 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 *ColumnsItemCardsPostRequestBodyMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentId sets the content_id property value. The unique identifier of the content associated with the card +func (m *ColumnsItemCardsPostRequestBodyMember2) SetContentId(value *int32)() { + m.content_id = value +} +// SetContentType sets the content_type property value. The piece of content associated with the card +func (m *ColumnsItemCardsPostRequestBodyMember2) SetContentType(value *string)() { + m.content_type = value +} +type ColumnsItemCardsPostRequestBodyMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentId()(*int32) + GetContentType()(*string) + SetContentId(value *int32)() + SetContentType(value *string)() +} diff --git a/pkg/github/projects/columns_item_cards_project_card503_error.go b/pkg/github/projects/columns_item_cards_project_card503_error.go new file mode 100644 index 0000000..6b7083d --- /dev/null +++ b/pkg/github/projects/columns_item_cards_project_card503_error.go @@ -0,0 +1,187 @@ +package projects + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemCardsProjectCard503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The errors property + errors []ColumnsItemCardsProjectCard503Error_errorsable + // The message property + message *string +} +// NewColumnsItemCardsProjectCard503Error instantiates a new ColumnsItemCardsProjectCard503Error and sets the default values. +func NewColumnsItemCardsProjectCard503Error()(*ColumnsItemCardsProjectCard503Error) { + m := &ColumnsItemCardsProjectCard503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsItemCardsProjectCard503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemCardsProjectCard503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemCardsProjectCard503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ColumnsItemCardsProjectCard503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsItemCardsProjectCard503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *ColumnsItemCardsProjectCard503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ColumnsItemCardsProjectCard503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []ColumnsItemCardsProjectCard503Error_errorsable when successful +func (m *ColumnsItemCardsProjectCard503Error) GetErrors()([]ColumnsItemCardsProjectCard503Error_errorsable) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemCardsProjectCard503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnsItemCardsProjectCard503Error_errorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnsItemCardsProjectCard503Error_errorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ColumnsItemCardsProjectCard503Error_errorsable) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsItemCardsProjectCard503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ColumnsItemCardsProjectCard503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("errors", cast) + 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 *ColumnsItemCardsProjectCard503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ColumnsItemCardsProjectCard503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ColumnsItemCardsProjectCard503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ColumnsItemCardsProjectCard503Error) SetErrors(value []ColumnsItemCardsProjectCard503Error_errorsable)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsItemCardsProjectCard503Error) SetMessage(value *string)() { + m.message = value +} +type ColumnsItemCardsProjectCard503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetErrors()([]ColumnsItemCardsProjectCard503Error_errorsable) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetErrors(value []ColumnsItemCardsProjectCard503Error_errorsable)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/columns_item_cards_project_card503_error_errors.go b/pkg/github/projects/columns_item_cards_project_card503_error_errors.go new file mode 100644 index 0000000..e0e1886 --- /dev/null +++ b/pkg/github/projects/columns_item_cards_project_card503_error_errors.go @@ -0,0 +1,109 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemCardsProjectCard503Error_errors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The message property + message *string +} +// NewColumnsItemCardsProjectCard503Error_errors instantiates a new ColumnsItemCardsProjectCard503Error_errors and sets the default values. +func NewColumnsItemCardsProjectCard503Error_errors()(*ColumnsItemCardsProjectCard503Error_errors) { + m := &ColumnsItemCardsProjectCard503Error_errors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsItemCardsProjectCard503Error_errorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemCardsProjectCard503Error_errorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemCardsProjectCard503Error_errors(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsItemCardsProjectCard503Error_errors) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *ColumnsItemCardsProjectCard503Error_errors) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemCardsProjectCard503Error_errors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ColumnsItemCardsProjectCard503Error_errors) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ColumnsItemCardsProjectCard503Error_errors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + 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 *ColumnsItemCardsProjectCard503Error_errors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ColumnsItemCardsProjectCard503Error_errors) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The message property +func (m *ColumnsItemCardsProjectCard503Error_errors) SetMessage(value *string)() { + m.message = value +} +type ColumnsItemCardsProjectCard503Error_errorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/columns_item_cards_request_builder.go b/pkg/github/projects/columns_item_cards_request_builder.go new file mode 100644 index 0000000..ada9ef8 --- /dev/null +++ b/pkg/github/projects/columns_item_cards_request_builder.go @@ -0,0 +1,234 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i54357e02dbc89fd8e87cea2fea9e2d2560753f00b9df8cce40bbc80066b0a938 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/projects/columns/item/cards" +) + +// ColumnsItemCardsRequestBuilder builds and executes requests for operations under \projects\columns\{column_id}\cards +type ColumnsItemCardsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CardsPostRequestBody composed type wrapper for classes ColumnsItemCardsPostRequestBodyMember1able, ColumnsItemCardsPostRequestBodyMember2able +type CardsPostRequestBody struct { + // Composed type representation for type ColumnsItemCardsPostRequestBodyMember1able + cardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1 ColumnsItemCardsPostRequestBodyMember1able + // Composed type representation for type ColumnsItemCardsPostRequestBodyMember2able + cardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2 ColumnsItemCardsPostRequestBodyMember2able + // Composed type representation for type ColumnsItemCardsPostRequestBodyMember1able + columnsItemCardsPostRequestBodyMember1 ColumnsItemCardsPostRequestBodyMember1able + // Composed type representation for type ColumnsItemCardsPostRequestBodyMember2able + columnsItemCardsPostRequestBodyMember2 ColumnsItemCardsPostRequestBodyMember2able +} +// NewCardsPostRequestBody instantiates a new CardsPostRequestBody and sets the default values. +func NewCardsPostRequestBody()(*CardsPostRequestBody) { + m := &CardsPostRequestBody{ + } + return m +} +// CreateCardsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCardsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCardsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1 gets the ColumnsItemCardsPostRequestBodyMember1 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember1able +// returns a ColumnsItemCardsPostRequestBodyMember1able when successful +func (m *CardsPostRequestBody) GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1()(ColumnsItemCardsPostRequestBodyMember1able) { + return m.cardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1 +} +// GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2 gets the ColumnsItemCardsPostRequestBodyMember2 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember2able +// returns a ColumnsItemCardsPostRequestBodyMember2able when successful +func (m *CardsPostRequestBody) GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2()(ColumnsItemCardsPostRequestBodyMember2able) { + return m.cardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2 +} +// GetColumnsItemCardsPostRequestBodyMember1 gets the ColumnsItemCardsPostRequestBodyMember1 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember1able +// returns a ColumnsItemCardsPostRequestBodyMember1able when successful +func (m *CardsPostRequestBody) GetColumnsItemCardsPostRequestBodyMember1()(ColumnsItemCardsPostRequestBodyMember1able) { + return m.columnsItemCardsPostRequestBodyMember1 +} +// GetColumnsItemCardsPostRequestBodyMember2 gets the ColumnsItemCardsPostRequestBodyMember2 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember2able +// returns a ColumnsItemCardsPostRequestBodyMember2able when successful +func (m *CardsPostRequestBody) GetColumnsItemCardsPostRequestBodyMember2()(ColumnsItemCardsPostRequestBodyMember2able) { + return m.columnsItemCardsPostRequestBodyMember2 +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CardsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CardsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// Serialize serializes information the current object +func (m *CardsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetColumnsItemCardsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetColumnsItemCardsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetColumnsItemCardsPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetColumnsItemCardsPostRequestBodyMember2()) + if err != nil { + return err + } + } + return nil +} +// SetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1 sets the ColumnsItemCardsPostRequestBodyMember1 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember1able +func (m *CardsPostRequestBody) SetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1(value ColumnsItemCardsPostRequestBodyMember1able)() { + m.cardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1 = value +} +// SetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2 sets the ColumnsItemCardsPostRequestBodyMember2 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember2able +func (m *CardsPostRequestBody) SetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2(value ColumnsItemCardsPostRequestBodyMember2able)() { + m.cardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2 = value +} +// SetColumnsItemCardsPostRequestBodyMember1 sets the ColumnsItemCardsPostRequestBodyMember1 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember1able +func (m *CardsPostRequestBody) SetColumnsItemCardsPostRequestBodyMember1(value ColumnsItemCardsPostRequestBodyMember1able)() { + m.columnsItemCardsPostRequestBodyMember1 = value +} +// SetColumnsItemCardsPostRequestBodyMember2 sets the ColumnsItemCardsPostRequestBodyMember2 property value. Composed type representation for type ColumnsItemCardsPostRequestBodyMember2able +func (m *CardsPostRequestBody) SetColumnsItemCardsPostRequestBodyMember2(value ColumnsItemCardsPostRequestBodyMember2able)() { + m.columnsItemCardsPostRequestBodyMember2 = value +} +// ColumnsItemCardsRequestBuilderGetQueryParameters lists the project cards in a project. +type ColumnsItemCardsRequestBuilderGetQueryParameters struct { + // Filters the project cards that are returned by the card's state. + Archived_state *i54357e02dbc89fd8e87cea2fea9e2d2560753f00b9df8cce40bbc80066b0a938.GetArchived_stateQueryParameterType `uriparametername:"archived_state"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +type CardsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1()(ColumnsItemCardsPostRequestBodyMember1able) + GetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2()(ColumnsItemCardsPostRequestBodyMember2able) + GetColumnsItemCardsPostRequestBodyMember1()(ColumnsItemCardsPostRequestBodyMember1able) + GetColumnsItemCardsPostRequestBodyMember2()(ColumnsItemCardsPostRequestBodyMember2able) + SetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember1(value ColumnsItemCardsPostRequestBodyMember1able)() + SetCardsPostRequestBodyColumnsItemCardsPostRequestBodyMember2(value ColumnsItemCardsPostRequestBodyMember2able)() + SetColumnsItemCardsPostRequestBodyMember1(value ColumnsItemCardsPostRequestBodyMember1able)() + SetColumnsItemCardsPostRequestBodyMember2(value ColumnsItemCardsPostRequestBodyMember2able)() +} +// NewColumnsItemCardsRequestBuilderInternal instantiates a new ColumnsItemCardsRequestBuilder and sets the default values. +func NewColumnsItemCardsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsItemCardsRequestBuilder) { + m := &ColumnsItemCardsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns/{column_id}/cards{?archived_state*,page*,per_page*}", pathParameters), + } + return m +} +// NewColumnsItemCardsRequestBuilder instantiates a new ColumnsItemCardsRequestBuilder and sets the default values. +func NewColumnsItemCardsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsItemCardsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsItemCardsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the project cards in a project. +// returns a []ProjectCardable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/cards#list-project-cards +func (m *ColumnsItemCardsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ColumnsItemCardsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectCardFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable) + } + } + return val, nil +} +// Post create a project card +// returns a ProjectCardable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ColumnsItemCardsProjectCard503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/cards#create-a-project-card +func (m *ColumnsItemCardsRequestBuilder) Post(ctx context.Context, body CardsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": CreateColumnsItemCardsProjectCard503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectCardFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCardable), nil +} +// ToGetRequestInformation lists the project cards in a project. +// returns a *RequestInformation when successful +func (m *ColumnsItemCardsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ColumnsItemCardsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ColumnsItemCardsRequestBuilder) ToPostRequestInformation(ctx context.Context, body CardsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ColumnsItemCardsRequestBuilder when successful +func (m *ColumnsItemCardsRequestBuilder) WithUrl(rawUrl string)(*ColumnsItemCardsRequestBuilder) { + return NewColumnsItemCardsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/columns_item_moves_post_request_body.go b/pkg/github/projects/columns_item_moves_post_request_body.go new file mode 100644 index 0000000..ec74260 --- /dev/null +++ b/pkg/github/projects/columns_item_moves_post_request_body.go @@ -0,0 +1,80 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemMovesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + position *string +} +// NewColumnsItemMovesPostRequestBody instantiates a new ColumnsItemMovesPostRequestBody and sets the default values. +func NewColumnsItemMovesPostRequestBody()(*ColumnsItemMovesPostRequestBody) { + m := &ColumnsItemMovesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsItemMovesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemMovesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemMovesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsItemMovesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemMovesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + return res +} +// GetPosition gets the position property value. The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. +// returns a *string when successful +func (m *ColumnsItemMovesPostRequestBody) GetPosition()(*string) { + return m.position +} +// Serialize serializes information the current object +func (m *ColumnsItemMovesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("position", m.GetPosition()) + 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 *ColumnsItemMovesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPosition sets the position property value. The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. +func (m *ColumnsItemMovesPostRequestBody) SetPosition(value *string)() { + m.position = value +} +type ColumnsItemMovesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPosition()(*string) + SetPosition(value *string)() +} diff --git a/pkg/github/projects/columns_item_moves_post_response.go b/pkg/github/projects/columns_item_moves_post_response.go new file mode 100644 index 0000000..62f0663 --- /dev/null +++ b/pkg/github/projects/columns_item_moves_post_response.go @@ -0,0 +1,32 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemMovesPostResponse struct { +} +// NewColumnsItemMovesPostResponse instantiates a new ColumnsItemMovesPostResponse and sets the default values. +func NewColumnsItemMovesPostResponse()(*ColumnsItemMovesPostResponse) { + m := &ColumnsItemMovesPostResponse{ + } + return m +} +// CreateColumnsItemMovesPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemMovesPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemMovesPostResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemMovesPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ColumnsItemMovesPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + return nil +} +type ColumnsItemMovesPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/projects/columns_item_moves_request_builder.go b/pkg/github/projects/columns_item_moves_request_builder.go new file mode 100644 index 0000000..3414b7f --- /dev/null +++ b/pkg/github/projects/columns_item_moves_request_builder.go @@ -0,0 +1,68 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ColumnsItemMovesRequestBuilder builds and executes requests for operations under \projects\columns\{column_id}\moves +type ColumnsItemMovesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewColumnsItemMovesRequestBuilderInternal instantiates a new ColumnsItemMovesRequestBuilder and sets the default values. +func NewColumnsItemMovesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsItemMovesRequestBuilder) { + m := &ColumnsItemMovesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns/{column_id}/moves", pathParameters), + } + return m +} +// NewColumnsItemMovesRequestBuilder instantiates a new ColumnsItemMovesRequestBuilder and sets the default values. +func NewColumnsItemMovesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsItemMovesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsItemMovesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post move a project column +// returns a ColumnsItemMovesPostResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/columns#move-a-project-column +func (m *ColumnsItemMovesRequestBuilder) Post(ctx context.Context, body ColumnsItemMovesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ColumnsItemMovesPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateColumnsItemMovesPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ColumnsItemMovesPostResponseable), nil +} +// returns a *RequestInformation when successful +func (m *ColumnsItemMovesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ColumnsItemMovesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ColumnsItemMovesRequestBuilder when successful +func (m *ColumnsItemMovesRequestBuilder) WithUrl(rawUrl string)(*ColumnsItemMovesRequestBuilder) { + return NewColumnsItemMovesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/columns_item_with_column_patch_request_body.go b/pkg/github/projects/columns_item_with_column_patch_request_body.go new file mode 100644 index 0000000..ebd123d --- /dev/null +++ b/pkg/github/projects/columns_item_with_column_patch_request_body.go @@ -0,0 +1,80 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ColumnsItemWithColumn_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the project column + name *string +} +// NewColumnsItemWithColumn_PatchRequestBody instantiates a new ColumnsItemWithColumn_PatchRequestBody and sets the default values. +func NewColumnsItemWithColumn_PatchRequestBody()(*ColumnsItemWithColumn_PatchRequestBody) { + m := &ColumnsItemWithColumn_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateColumnsItemWithColumn_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateColumnsItemWithColumn_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnsItemWithColumn_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ColumnsItemWithColumn_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ColumnsItemWithColumn_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the project column +// returns a *string when successful +func (m *ColumnsItemWithColumn_PatchRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ColumnsItemWithColumn_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ColumnsItemWithColumn_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the project column +func (m *ColumnsItemWithColumn_PatchRequestBody) SetName(value *string)() { + m.name = value +} +type ColumnsItemWithColumn_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/pkg/github/projects/columns_request_builder.go b/pkg/github/projects/columns_request_builder.go new file mode 100644 index 0000000..541ddce --- /dev/null +++ b/pkg/github/projects/columns_request_builder.go @@ -0,0 +1,39 @@ +package projects + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ColumnsRequestBuilder builds and executes requests for operations under \projects\columns +type ColumnsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByColumn_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.projects.columns.item collection +// returns a *ColumnsWithColumn_ItemRequestBuilder when successful +func (m *ColumnsRequestBuilder) ByColumn_id(column_id int32)(*ColumnsWithColumn_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["column_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(column_id), 10) + return NewColumnsWithColumn_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Cards the cards property +// returns a *ColumnsCardsRequestBuilder when successful +func (m *ColumnsRequestBuilder) Cards()(*ColumnsCardsRequestBuilder) { + return NewColumnsCardsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewColumnsRequestBuilderInternal instantiates a new ColumnsRequestBuilder and sets the default values. +func NewColumnsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsRequestBuilder) { + m := &ColumnsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns", pathParameters), + } + return m +} +// NewColumnsRequestBuilder instantiates a new ColumnsRequestBuilder and sets the default values. +func NewColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/projects/columns_with_column_item_request_builder.go b/pkg/github/projects/columns_with_column_item_request_builder.go new file mode 100644 index 0000000..5aae58d --- /dev/null +++ b/pkg/github/projects/columns_with_column_item_request_builder.go @@ -0,0 +1,140 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ColumnsWithColumn_ItemRequestBuilder builds and executes requests for operations under \projects\columns\{column_id} +type ColumnsWithColumn_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Cards the cards property +// returns a *ColumnsItemCardsRequestBuilder when successful +func (m *ColumnsWithColumn_ItemRequestBuilder) Cards()(*ColumnsItemCardsRequestBuilder) { + return NewColumnsItemCardsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewColumnsWithColumn_ItemRequestBuilderInternal instantiates a new ColumnsWithColumn_ItemRequestBuilder and sets the default values. +func NewColumnsWithColumn_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsWithColumn_ItemRequestBuilder) { + m := &ColumnsWithColumn_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/columns/{column_id}", pathParameters), + } + return m +} +// NewColumnsWithColumn_ItemRequestBuilder instantiates a new ColumnsWithColumn_ItemRequestBuilder and sets the default values. +func NewColumnsWithColumn_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ColumnsWithColumn_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewColumnsWithColumn_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a project column. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/columns#delete-a-project-column +func (m *ColumnsWithColumn_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets information about a project column. +// returns a ProjectColumnable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/columns#get-a-project-column +func (m *ColumnsWithColumn_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectColumnFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable), nil +} +// Moves the moves property +// returns a *ColumnsItemMovesRequestBuilder when successful +func (m *ColumnsWithColumn_ItemRequestBuilder) Moves()(*ColumnsItemMovesRequestBuilder) { + return NewColumnsItemMovesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update an existing project column +// returns a ProjectColumnable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/columns#update-an-existing-project-column +func (m *ColumnsWithColumn_ItemRequestBuilder) Patch(ctx context.Context, body ColumnsItemWithColumn_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectColumnFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable), nil +} +// ToDeleteRequestInformation deletes a project column. +// returns a *RequestInformation when successful +func (m *ColumnsWithColumn_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets information about a project column. +// returns a *RequestInformation when successful +func (m *ColumnsWithColumn_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ColumnsWithColumn_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ColumnsItemWithColumn_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ColumnsWithColumn_ItemRequestBuilder when successful +func (m *ColumnsWithColumn_ItemRequestBuilder) WithUrl(rawUrl string)(*ColumnsWithColumn_ItemRequestBuilder) { + return NewColumnsWithColumn_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go b/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go new file mode 100644 index 0000000..6d93c8b --- /dev/null +++ b/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go @@ -0,0 +1,39 @@ +package collaborators +import ( + "errors" +) +type GetAffiliationQueryParameterType int + +const ( + OUTSIDE_GETAFFILIATIONQUERYPARAMETERTYPE GetAffiliationQueryParameterType = iota + DIRECT_GETAFFILIATIONQUERYPARAMETERTYPE + ALL_GETAFFILIATIONQUERYPARAMETERTYPE +) + +func (i GetAffiliationQueryParameterType) String() string { + return []string{"outside", "direct", "all"}[i] +} +func ParseGetAffiliationQueryParameterType(v string) (any, error) { + result := OUTSIDE_GETAFFILIATIONQUERYPARAMETERTYPE + switch v { + case "outside": + result = OUTSIDE_GETAFFILIATIONQUERYPARAMETERTYPE + case "direct": + result = DIRECT_GETAFFILIATIONQUERYPARAMETERTYPE + case "all": + result = ALL_GETAFFILIATIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetAffiliationQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetAffiliationQueryParameterType(values []GetAffiliationQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetAffiliationQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go b/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go new file mode 100644 index 0000000..6670acf --- /dev/null +++ b/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The permission to grant the collaborator. +type WithUsernamePutRequestBody_permission int + +const ( + READ_WITHUSERNAMEPUTREQUESTBODY_PERMISSION WithUsernamePutRequestBody_permission = iota + WRITE_WITHUSERNAMEPUTREQUESTBODY_PERMISSION + ADMIN_WITHUSERNAMEPUTREQUESTBODY_PERMISSION +) + +func (i WithUsernamePutRequestBody_permission) String() string { + return []string{"read", "write", "admin"}[i] +} +func ParseWithUsernamePutRequestBody_permission(v string) (any, error) { + result := READ_WITHUSERNAMEPUTREQUESTBODY_PERMISSION + switch v { + case "read": + result = READ_WITHUSERNAMEPUTREQUESTBODY_PERMISSION + case "write": + result = WRITE_WITHUSERNAMEPUTREQUESTBODY_PERMISSION + case "admin": + result = ADMIN_WITHUSERNAMEPUTREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown WithUsernamePutRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeWithUsernamePutRequestBody_permission(values []WithUsernamePutRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithUsernamePutRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go b/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go new file mode 100644 index 0000000..727281a --- /dev/null +++ b/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go @@ -0,0 +1,43 @@ +package item +import ( + "errors" +) +// The baseline permission that all organization members have on this project +type WithProject_PatchRequestBody_organization_permission int + +const ( + READ_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION WithProject_PatchRequestBody_organization_permission = iota + WRITE_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + ADMIN_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + NONE_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION +) + +func (i WithProject_PatchRequestBody_organization_permission) String() string { + return []string{"read", "write", "admin", "none"}[i] +} +func ParseWithProject_PatchRequestBody_organization_permission(v string) (any, error) { + result := READ_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + switch v { + case "read": + result = READ_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + case "write": + result = WRITE_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + case "admin": + result = ADMIN_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + case "none": + result = NONE_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION + default: + return 0, errors.New("Unknown WithProject_PatchRequestBody_organization_permission value: " + v) + } + return &result, nil +} +func SerializeWithProject_PatchRequestBody_organization_permission(values []WithProject_PatchRequestBody_organization_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithProject_PatchRequestBody_organization_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/projects/item_collaborators_item_permission_request_builder.go b/pkg/github/projects/item_collaborators_item_permission_request_builder.go new file mode 100644 index 0000000..3fd846e --- /dev/null +++ b/pkg/github/projects/item_collaborators_item_permission_request_builder.go @@ -0,0 +1,67 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCollaboratorsItemPermissionRequestBuilder builds and executes requests for operations under \projects\{project_id}\collaborators\{username}\permission +type ItemCollaboratorsItemPermissionRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCollaboratorsItemPermissionRequestBuilderInternal instantiates a new ItemCollaboratorsItemPermissionRequestBuilder and sets the default values. +func NewItemCollaboratorsItemPermissionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCollaboratorsItemPermissionRequestBuilder) { + m := &ItemCollaboratorsItemPermissionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators/{username}/permission", pathParameters), + } + return m +} +// NewItemCollaboratorsItemPermissionRequestBuilder instantiates a new ItemCollaboratorsItemPermissionRequestBuilder and sets the default values. +func NewItemCollaboratorsItemPermissionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCollaboratorsItemPermissionRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCollaboratorsItemPermissionRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. +// returns a ProjectCollaboratorPermissionable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/collaborators#get-project-permission-for-a-user +func (m *ItemCollaboratorsItemPermissionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCollaboratorPermissionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectCollaboratorPermissionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectCollaboratorPermissionable), nil +} +// ToGetRequestInformation returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. +// returns a *RequestInformation when successful +func (m *ItemCollaboratorsItemPermissionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCollaboratorsItemPermissionRequestBuilder when successful +func (m *ItemCollaboratorsItemPermissionRequestBuilder) WithUrl(rawUrl string)(*ItemCollaboratorsItemPermissionRequestBuilder) { + return NewItemCollaboratorsItemPermissionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/item_collaborators_item_with_username_put_request_body.go b/pkg/github/projects/item_collaborators_item_with_username_put_request_body.go new file mode 100644 index 0000000..52163f6 --- /dev/null +++ b/pkg/github/projects/item_collaborators_item_with_username_put_request_body.go @@ -0,0 +1,51 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCollaboratorsItemWithUsernamePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemCollaboratorsItemWithUsernamePutRequestBody instantiates a new ItemCollaboratorsItemWithUsernamePutRequestBody and sets the default values. +func NewItemCollaboratorsItemWithUsernamePutRequestBody()(*ItemCollaboratorsItemWithUsernamePutRequestBody) { + m := &ItemCollaboratorsItemWithUsernamePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCollaboratorsItemWithUsernamePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCollaboratorsItemWithUsernamePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCollaboratorsItemWithUsernamePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemCollaboratorsItemWithUsernamePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCollaboratorsItemWithUsernamePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemCollaboratorsItemWithUsernamePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemCollaboratorsItemWithUsernamePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemCollaboratorsItemWithUsernamePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/projects/item_collaborators_request_builder.go b/pkg/github/projects/item_collaborators_request_builder.go new file mode 100644 index 0000000..8bf11fb --- /dev/null +++ b/pkg/github/projects/item_collaborators_request_builder.go @@ -0,0 +1,92 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ib16f95d4eef8e11762c4ff50cfb8246deb8404909b9649bca26d533dace5b832 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/projects/item/collaborators" +) + +// ItemCollaboratorsRequestBuilder builds and executes requests for operations under \projects\{project_id}\collaborators +type ItemCollaboratorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCollaboratorsRequestBuilderGetQueryParameters lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. +type ItemCollaboratorsRequestBuilderGetQueryParameters struct { + // Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. + Affiliation *ib16f95d4eef8e11762c4ff50cfb8246deb8404909b9649bca26d533dace5b832.GetAffiliationQueryParameterType `uriparametername:"affiliation"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.projects.item.collaborators.item collection +// returns a *ItemCollaboratorsWithUsernameItemRequestBuilder when successful +func (m *ItemCollaboratorsRequestBuilder) ByUsername(username string)(*ItemCollaboratorsWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemCollaboratorsWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemCollaboratorsRequestBuilderInternal instantiates a new ItemCollaboratorsRequestBuilder and sets the default values. +func NewItemCollaboratorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCollaboratorsRequestBuilder) { + m := &ItemCollaboratorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators{?affiliation*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemCollaboratorsRequestBuilder instantiates a new ItemCollaboratorsRequestBuilder and sets the default values. +func NewItemCollaboratorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCollaboratorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCollaboratorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/collaborators#list-project-collaborators +func (m *ItemCollaboratorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCollaboratorsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. +// returns a *RequestInformation when successful +func (m *ItemCollaboratorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCollaboratorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCollaboratorsRequestBuilder when successful +func (m *ItemCollaboratorsRequestBuilder) WithUrl(rawUrl string)(*ItemCollaboratorsRequestBuilder) { + return NewItemCollaboratorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/item_collaborators_with_username_item_request_builder.go b/pkg/github/projects/item_collaborators_with_username_item_request_builder.go new file mode 100644 index 0000000..b9a0021 --- /dev/null +++ b/pkg/github/projects/item_collaborators_with_username_item_request_builder.go @@ -0,0 +1,105 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemCollaboratorsWithUsernameItemRequestBuilder builds and executes requests for operations under \projects\{project_id}\collaborators\{username} +type ItemCollaboratorsWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCollaboratorsWithUsernameItemRequestBuilderInternal instantiates a new ItemCollaboratorsWithUsernameItemRequestBuilder and sets the default values. +func NewItemCollaboratorsWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCollaboratorsWithUsernameItemRequestBuilder) { + m := &ItemCollaboratorsWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators/{username}", pathParameters), + } + return m +} +// NewItemCollaboratorsWithUsernameItemRequestBuilder instantiates a new ItemCollaboratorsWithUsernameItemRequestBuilder and sets the default values. +func NewItemCollaboratorsWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCollaboratorsWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCollaboratorsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/collaborators#remove-user-as-a-collaborator +func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Permission the permission property +// returns a *ItemCollaboratorsItemPermissionRequestBuilder when successful +func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) Permission()(*ItemCollaboratorsItemPermissionRequestBuilder) { + return NewItemCollaboratorsItemPermissionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Put adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/collaborators#add-project-collaborator +func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) Put(ctx context.Context, body ItemCollaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. +// returns a *RequestInformation when successful +func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. +// returns a *RequestInformation when successful +func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCollaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCollaboratorsWithUsernameItemRequestBuilder when successful +func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemCollaboratorsWithUsernameItemRequestBuilder) { + return NewItemCollaboratorsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/item_columns_post_request_body.go b/pkg/github/projects/item_columns_post_request_body.go new file mode 100644 index 0000000..9291391 --- /dev/null +++ b/pkg/github/projects/item_columns_post_request_body.go @@ -0,0 +1,80 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemColumnsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the project column + name *string +} +// NewItemColumnsPostRequestBody instantiates a new ItemColumnsPostRequestBody and sets the default values. +func NewItemColumnsPostRequestBody()(*ItemColumnsPostRequestBody) { + m := &ItemColumnsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemColumnsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemColumnsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemColumnsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemColumnsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemColumnsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the project column +// returns a *string when successful +func (m *ItemColumnsPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemColumnsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemColumnsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the project column +func (m *ItemColumnsPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemColumnsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/pkg/github/projects/item_columns_request_builder.go b/pkg/github/projects/item_columns_request_builder.go new file mode 100644 index 0000000..00c7c0a --- /dev/null +++ b/pkg/github/projects/item_columns_request_builder.go @@ -0,0 +1,112 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemColumnsRequestBuilder builds and executes requests for operations under \projects\{project_id}\columns +type ItemColumnsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemColumnsRequestBuilderGetQueryParameters lists the project columns in a project. +type ItemColumnsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemColumnsRequestBuilderInternal instantiates a new ItemColumnsRequestBuilder and sets the default values. +func NewItemColumnsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemColumnsRequestBuilder) { + m := &ItemColumnsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}/columns{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemColumnsRequestBuilder instantiates a new ItemColumnsRequestBuilder and sets the default values. +func NewItemColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemColumnsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemColumnsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the project columns in a project. +// returns a []ProjectColumnable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/columns#list-project-columns +func (m *ItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemColumnsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectColumnFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable) + } + } + return val, nil +} +// Post creates a new project column. +// returns a ProjectColumnable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/columns#create-a-project-column +func (m *ItemColumnsRequestBuilder) Post(ctx context.Context, body ItemColumnsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectColumnFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProjectColumnable), nil +} +// ToGetRequestInformation lists the project columns in a project. +// returns a *RequestInformation when successful +func (m *ItemColumnsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemColumnsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new project column. +// returns a *RequestInformation when successful +func (m *ItemColumnsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemColumnsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemColumnsRequestBuilder when successful +func (m *ItemColumnsRequestBuilder) WithUrl(rawUrl string)(*ItemColumnsRequestBuilder) { + return NewItemColumnsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/projects/item_project403_error.go b/pkg/github/projects/item_project403_error.go new file mode 100644 index 0000000..20954ab --- /dev/null +++ b/pkg/github/projects/item_project403_error.go @@ -0,0 +1,152 @@ +package projects + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemProject403Error 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 errors property + errors []string + // The message property + message *string +} +// NewItemProject403Error instantiates a new ItemProject403Error and sets the default values. +func NewItemProject403Error()(*ItemProject403Error) { + m := &ItemProject403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemProject403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProject403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProject403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemProject403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemProject403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemProject403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []string when successful +func (m *ItemProject403Error) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProject403Error) 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["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ItemProject403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemProject403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + err := writer.WriteCollectionOfStringValues("errors", m.GetErrors()) + 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 *ItemProject403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemProject403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ItemProject403Error) SetErrors(value []string)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ItemProject403Error) SetMessage(value *string)() { + m.message = value +} +type ItemProject403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetErrors()([]string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetErrors(value []string)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/item_with_project_403_error.go b/pkg/github/projects/item_with_project_403_error.go new file mode 100644 index 0000000..94e53c8 --- /dev/null +++ b/pkg/github/projects/item_with_project_403_error.go @@ -0,0 +1,152 @@ +package projects + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWithProject_403Error 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 errors property + errors []string + // The message property + message *string +} +// NewItemWithProject_403Error instantiates a new ItemWithProject_403Error and sets the default values. +func NewItemWithProject_403Error()(*ItemWithProject_403Error) { + m := &ItemWithProject_403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithProject_403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithProject_403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithProject_403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemWithProject_403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithProject_403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemWithProject_403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetErrors gets the errors property value. The errors property +// returns a []string when successful +func (m *ItemWithProject_403Error) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithProject_403Error) 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["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetErrors(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ItemWithProject_403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemWithProject_403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + err := writer.WriteCollectionOfStringValues("errors", m.GetErrors()) + 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 *ItemWithProject_403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemWithProject_403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetErrors sets the errors property value. The errors property +func (m *ItemWithProject_403Error) SetErrors(value []string)() { + m.errors = value +} +// SetMessage sets the message property value. The message property +func (m *ItemWithProject_403Error) SetMessage(value *string)() { + m.message = value +} +type ItemWithProject_403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetErrors()([]string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetErrors(value []string)() + SetMessage(value *string)() +} diff --git a/pkg/github/projects/item_with_project_patch_request_body.go b/pkg/github/projects/item_with_project_patch_request_body.go new file mode 100644 index 0000000..140a19b --- /dev/null +++ b/pkg/github/projects/item_with_project_patch_request_body.go @@ -0,0 +1,167 @@ +package projects + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWithProject_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Body of the project + body *string + // Name of the project + name *string + // Whether or not this project can be seen by everyone. + private *bool + // State of the project; either 'open' or 'closed' + state *string +} +// NewItemWithProject_PatchRequestBody instantiates a new ItemWithProject_PatchRequestBody and sets the default values. +func NewItemWithProject_PatchRequestBody()(*ItemWithProject_PatchRequestBody) { + m := &ItemWithProject_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithProject_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithProject_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithProject_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithProject_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. Body of the project +// returns a *string when successful +func (m *ItemWithProject_PatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithProject_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the project +// returns a *string when successful +func (m *ItemWithProject_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Whether or not this project can be seen by everyone. +// returns a *bool when successful +func (m *ItemWithProject_PatchRequestBody) GetPrivate()(*bool) { + return m.private +} +// GetState gets the state property value. State of the project; either 'open' or 'closed' +// returns a *string when successful +func (m *ItemWithProject_PatchRequestBody) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *ItemWithProject_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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.WriteStringValue("state", m.GetState()) + 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 *ItemWithProject_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. Body of the project +func (m *ItemWithProject_PatchRequestBody) SetBody(value *string)() { + m.body = value +} +// SetName sets the name property value. Name of the project +func (m *ItemWithProject_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Whether or not this project can be seen by everyone. +func (m *ItemWithProject_PatchRequestBody) SetPrivate(value *bool)() { + m.private = value +} +// SetState sets the state property value. State of the project; either 'open' or 'closed' +func (m *ItemWithProject_PatchRequestBody) SetState(value *string)() { + m.state = value +} +type ItemWithProject_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetName()(*string) + GetPrivate()(*bool) + GetState()(*string) + SetBody(value *string)() + SetName(value *string)() + SetPrivate(value *bool)() + SetState(value *string)() +} diff --git a/pkg/github/projects/projects_request_builder.go b/pkg/github/projects/projects_request_builder.go new file mode 100644 index 0000000..9eae8ed --- /dev/null +++ b/pkg/github/projects/projects_request_builder.go @@ -0,0 +1,39 @@ +package projects + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ProjectsRequestBuilder builds and executes requests for operations under \projects +type ProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByProject_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.projects.item collection +// returns a *WithProject_ItemRequestBuilder when successful +func (m *ProjectsRequestBuilder) ByProject_id(project_id int32)(*WithProject_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["project_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(project_id), 10) + return NewWithProject_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Columns the columns property +// returns a *ColumnsRequestBuilder when successful +func (m *ProjectsRequestBuilder) Columns()(*ColumnsRequestBuilder) { + return NewColumnsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewProjectsRequestBuilderInternal instantiates a new ProjectsRequestBuilder and sets the default values. +func NewProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ProjectsRequestBuilder) { + m := &ProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects", pathParameters), + } + return m +} +// NewProjectsRequestBuilder instantiates a new ProjectsRequestBuilder and sets the default values. +func NewProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewProjectsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/projects/with_project_item_request_builder.go b/pkg/github/projects/with_project_item_request_builder.go new file mode 100644 index 0000000..6d09f54 --- /dev/null +++ b/pkg/github/projects/with_project_item_request_builder.go @@ -0,0 +1,147 @@ +package projects + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithProject_ItemRequestBuilder builds and executes requests for operations under \projects\{project_id} +type WithProject_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Collaborators the collaborators property +// returns a *ItemCollaboratorsRequestBuilder when successful +func (m *WithProject_ItemRequestBuilder) Collaborators()(*ItemCollaboratorsRequestBuilder) { + return NewItemCollaboratorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Columns the columns property +// returns a *ItemColumnsRequestBuilder when successful +func (m *WithProject_ItemRequestBuilder) Columns()(*ItemColumnsRequestBuilder) { + return NewItemColumnsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithProject_ItemRequestBuilderInternal instantiates a new WithProject_ItemRequestBuilder and sets the default values. +func NewWithProject_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithProject_ItemRequestBuilder) { + m := &WithProject_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/projects/{project_id}", pathParameters), + } + return m +} +// NewWithProject_ItemRequestBuilder instantiates a new WithProject_ItemRequestBuilder and sets the default values. +func NewWithProject_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithProject_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithProject_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a project board. Returns a `404 Not Found` status if projects are disabled. +// returns a BasicError error when the service returns a 401 status code +// returns a ItemWithProject_403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#delete-a-project +func (m *WithProject_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": CreateItemWithProject_403ErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a Projectable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#get-a-project +func (m *WithProject_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable), nil +} +// Patch updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a Projectable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a ItemProject403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#update-a-project +func (m *WithProject_ItemRequestBuilder) Patch(ctx context.Context, body ItemWithProject_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": CreateItemProject403ErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable), nil +} +// ToDeleteRequestInformation deletes a project board. Returns a `404 Not Found` status if projects are disabled. +// returns a *RequestInformation when successful +func (m *WithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *WithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *WithProject_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithProject_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithProject_ItemRequestBuilder when successful +func (m *WithProject_ItemRequestBuilder) WithUrl(rawUrl string)(*WithProject_ItemRequestBuilder) { + return NewWithProject_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/rate_limit/rate_limit_request_builder.go b/pkg/github/rate_limit/rate_limit_request_builder.go new file mode 100644 index 0000000..f643208 --- /dev/null +++ b/pkg/github/rate_limit/rate_limit_request_builder.go @@ -0,0 +1,61 @@ +package rate_limit + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Rate_limitRequestBuilder builds and executes requests for operations under \rate_limit +type Rate_limitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewRate_limitRequestBuilderInternal instantiates a new Rate_limitRequestBuilder and sets the default values. +func NewRate_limitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Rate_limitRequestBuilder) { + m := &Rate_limitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/rate_limit", pathParameters), + } + return m +} +// NewRate_limitRequestBuilder instantiates a new Rate_limitRequestBuilder and sets the default values. +func NewRate_limitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Rate_limitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRate_limitRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note:** Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/enterprise-cloud@latest//rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/enterprise-cloud@latest//graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/enterprise-cloud@latest//apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/enterprise-cloud@latest//rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/enterprise-cloud@latest//rest/about-the-rest-api/api-versions)."**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. +// returns a RateLimitOverviewable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/rate-limit/rate-limit#get-rate-limit-status-for-the-authenticated-user +func (m *Rate_limitRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RateLimitOverviewable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRateLimitOverviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RateLimitOverviewable), nil +} +// ToGetRequestInformation **Note:** Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/enterprise-cloud@latest//rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/enterprise-cloud@latest//graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/enterprise-cloud@latest//apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/enterprise-cloud@latest//rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/enterprise-cloud@latest//rest/about-the-rest-api/api-versions)."**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. +// returns a *RequestInformation when successful +func (m *Rate_limitRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Rate_limitRequestBuilder when successful +func (m *Rate_limitRequestBuilder) WithUrl(rawUrl string)(*Rate_limitRequestBuilder) { + return NewRate_limitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item/item/actions/caches/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/actions/caches/get_direction_query_parameter_type.go new file mode 100644 index 0000000..816d21f --- /dev/null +++ b/pkg/github/repos/item/item/actions/caches/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package caches +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go new file mode 100644 index 0000000..f259bd0 --- /dev/null +++ b/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package caches +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_AT_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + LAST_ACCESSED_AT_GETSORTQUERYPARAMETERTYPE + SIZE_IN_BYTES_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created_at", "last_accessed_at", "size_in_bytes"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_AT_GETSORTQUERYPARAMETERTYPE + switch v { + case "created_at": + result = CREATED_AT_GETSORTQUERYPARAMETERTYPE + case "last_accessed_at": + result = LAST_ACCESSED_AT_GETSORTQUERYPARAMETERTYPE + case "size_in_bytes": + result = SIZE_IN_BYTES_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go b/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go new file mode 100644 index 0000000..651b8b5 --- /dev/null +++ b/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go @@ -0,0 +1,72 @@ +package runs +import ( + "errors" +) +type GetStatusQueryParameterType int + +const ( + COMPLETED_GETSTATUSQUERYPARAMETERTYPE GetStatusQueryParameterType = iota + ACTION_REQUIRED_GETSTATUSQUERYPARAMETERTYPE + CANCELLED_GETSTATUSQUERYPARAMETERTYPE + FAILURE_GETSTATUSQUERYPARAMETERTYPE + NEUTRAL_GETSTATUSQUERYPARAMETERTYPE + SKIPPED_GETSTATUSQUERYPARAMETERTYPE + STALE_GETSTATUSQUERYPARAMETERTYPE + SUCCESS_GETSTATUSQUERYPARAMETERTYPE + TIMED_OUT_GETSTATUSQUERYPARAMETERTYPE + IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + QUEUED_GETSTATUSQUERYPARAMETERTYPE + REQUESTED_GETSTATUSQUERYPARAMETERTYPE + WAITING_GETSTATUSQUERYPARAMETERTYPE + PENDING_GETSTATUSQUERYPARAMETERTYPE +) + +func (i GetStatusQueryParameterType) String() string { + return []string{"completed", "action_required", "cancelled", "failure", "neutral", "skipped", "stale", "success", "timed_out", "in_progress", "queued", "requested", "waiting", "pending"}[i] +} +func ParseGetStatusQueryParameterType(v string) (any, error) { + result := COMPLETED_GETSTATUSQUERYPARAMETERTYPE + switch v { + case "completed": + result = COMPLETED_GETSTATUSQUERYPARAMETERTYPE + case "action_required": + result = ACTION_REQUIRED_GETSTATUSQUERYPARAMETERTYPE + case "cancelled": + result = CANCELLED_GETSTATUSQUERYPARAMETERTYPE + case "failure": + result = FAILURE_GETSTATUSQUERYPARAMETERTYPE + case "neutral": + result = NEUTRAL_GETSTATUSQUERYPARAMETERTYPE + case "skipped": + result = SKIPPED_GETSTATUSQUERYPARAMETERTYPE + case "stale": + result = STALE_GETSTATUSQUERYPARAMETERTYPE + case "success": + result = SUCCESS_GETSTATUSQUERYPARAMETERTYPE + case "timed_out": + result = TIMED_OUT_GETSTATUSQUERYPARAMETERTYPE + case "in_progress": + result = IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + case "queued": + result = QUEUED_GETSTATUSQUERYPARAMETERTYPE + case "requested": + result = REQUESTED_GETSTATUSQUERYPARAMETERTYPE + case "waiting": + result = WAITING_GETSTATUSQUERYPARAMETERTYPE + case "pending": + result = PENDING_GETSTATUSQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStatusQueryParameterType(values []GetStatusQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStatusQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go b/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go new file mode 100644 index 0000000..e943e7e --- /dev/null +++ b/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go @@ -0,0 +1,36 @@ +package jobs +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + LATEST_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"latest", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := LATEST_GETFILTERQUERYPARAMETERTYPE + switch v { + case "latest": + result = LATEST_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go b/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go new file mode 100644 index 0000000..2a4bca1 --- /dev/null +++ b/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go @@ -0,0 +1,37 @@ +package pending_deployments +import ( + "errors" +) +// Whether to approve or reject deployment to the specified environments. +type Pending_deploymentsPostRequestBody_state int + +const ( + APPROVED_PENDING_DEPLOYMENTSPOSTREQUESTBODY_STATE Pending_deploymentsPostRequestBody_state = iota + REJECTED_PENDING_DEPLOYMENTSPOSTREQUESTBODY_STATE +) + +func (i Pending_deploymentsPostRequestBody_state) String() string { + return []string{"approved", "rejected"}[i] +} +func ParsePending_deploymentsPostRequestBody_state(v string) (any, error) { + result := APPROVED_PENDING_DEPLOYMENTSPOSTREQUESTBODY_STATE + switch v { + case "approved": + result = APPROVED_PENDING_DEPLOYMENTSPOSTREQUESTBODY_STATE + case "rejected": + result = REJECTED_PENDING_DEPLOYMENTSPOSTREQUESTBODY_STATE + default: + return 0, errors.New("Unknown Pending_deploymentsPostRequestBody_state value: " + v) + } + return &result, nil +} +func SerializePending_deploymentsPostRequestBody_state(values []Pending_deploymentsPostRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Pending_deploymentsPostRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go b/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go new file mode 100644 index 0000000..651b8b5 --- /dev/null +++ b/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go @@ -0,0 +1,72 @@ +package runs +import ( + "errors" +) +type GetStatusQueryParameterType int + +const ( + COMPLETED_GETSTATUSQUERYPARAMETERTYPE GetStatusQueryParameterType = iota + ACTION_REQUIRED_GETSTATUSQUERYPARAMETERTYPE + CANCELLED_GETSTATUSQUERYPARAMETERTYPE + FAILURE_GETSTATUSQUERYPARAMETERTYPE + NEUTRAL_GETSTATUSQUERYPARAMETERTYPE + SKIPPED_GETSTATUSQUERYPARAMETERTYPE + STALE_GETSTATUSQUERYPARAMETERTYPE + SUCCESS_GETSTATUSQUERYPARAMETERTYPE + TIMED_OUT_GETSTATUSQUERYPARAMETERTYPE + IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + QUEUED_GETSTATUSQUERYPARAMETERTYPE + REQUESTED_GETSTATUSQUERYPARAMETERTYPE + WAITING_GETSTATUSQUERYPARAMETERTYPE + PENDING_GETSTATUSQUERYPARAMETERTYPE +) + +func (i GetStatusQueryParameterType) String() string { + return []string{"completed", "action_required", "cancelled", "failure", "neutral", "skipped", "stale", "success", "timed_out", "in_progress", "queued", "requested", "waiting", "pending"}[i] +} +func ParseGetStatusQueryParameterType(v string) (any, error) { + result := COMPLETED_GETSTATUSQUERYPARAMETERTYPE + switch v { + case "completed": + result = COMPLETED_GETSTATUSQUERYPARAMETERTYPE + case "action_required": + result = ACTION_REQUIRED_GETSTATUSQUERYPARAMETERTYPE + case "cancelled": + result = CANCELLED_GETSTATUSQUERYPARAMETERTYPE + case "failure": + result = FAILURE_GETSTATUSQUERYPARAMETERTYPE + case "neutral": + result = NEUTRAL_GETSTATUSQUERYPARAMETERTYPE + case "skipped": + result = SKIPPED_GETSTATUSQUERYPARAMETERTYPE + case "stale": + result = STALE_GETSTATUSQUERYPARAMETERTYPE + case "success": + result = SUCCESS_GETSTATUSQUERYPARAMETERTYPE + case "timed_out": + result = TIMED_OUT_GETSTATUSQUERYPARAMETERTYPE + case "in_progress": + result = IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + case "queued": + result = QUEUED_GETSTATUSQUERYPARAMETERTYPE + case "requested": + result = REQUESTED_GETSTATUSQUERYPARAMETERTYPE + case "waiting": + result = WAITING_GETSTATUSQUERYPARAMETERTYPE + case "pending": + result = PENDING_GETSTATUSQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStatusQueryParameterType(values []GetStatusQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStatusQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go b/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go new file mode 100644 index 0000000..ac8a49a --- /dev/null +++ b/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go @@ -0,0 +1,48 @@ +package activity +import ( + "errors" +) +type GetActivity_typeQueryParameterType int + +const ( + PUSH_GETACTIVITY_TYPEQUERYPARAMETERTYPE GetActivity_typeQueryParameterType = iota + FORCE_PUSH_GETACTIVITY_TYPEQUERYPARAMETERTYPE + BRANCH_CREATION_GETACTIVITY_TYPEQUERYPARAMETERTYPE + BRANCH_DELETION_GETACTIVITY_TYPEQUERYPARAMETERTYPE + PR_MERGE_GETACTIVITY_TYPEQUERYPARAMETERTYPE + MERGE_QUEUE_MERGE_GETACTIVITY_TYPEQUERYPARAMETERTYPE +) + +func (i GetActivity_typeQueryParameterType) String() string { + return []string{"push", "force_push", "branch_creation", "branch_deletion", "pr_merge", "merge_queue_merge"}[i] +} +func ParseGetActivity_typeQueryParameterType(v string) (any, error) { + result := PUSH_GETACTIVITY_TYPEQUERYPARAMETERTYPE + switch v { + case "push": + result = PUSH_GETACTIVITY_TYPEQUERYPARAMETERTYPE + case "force_push": + result = FORCE_PUSH_GETACTIVITY_TYPEQUERYPARAMETERTYPE + case "branch_creation": + result = BRANCH_CREATION_GETACTIVITY_TYPEQUERYPARAMETERTYPE + case "branch_deletion": + result = BRANCH_DELETION_GETACTIVITY_TYPEQUERYPARAMETERTYPE + case "pr_merge": + result = PR_MERGE_GETACTIVITY_TYPEQUERYPARAMETERTYPE + case "merge_queue_merge": + result = MERGE_QUEUE_MERGE_GETACTIVITY_TYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetActivity_typeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetActivity_typeQueryParameterType(values []GetActivity_typeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetActivity_typeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go new file mode 100644 index 0000000..bac81da --- /dev/null +++ b/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package activity +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go b/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go new file mode 100644 index 0000000..abb4d65 --- /dev/null +++ b/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go @@ -0,0 +1,45 @@ +package activity +import ( + "errors" +) +type GetTime_periodQueryParameterType int + +const ( + DAY_GETTIME_PERIODQUERYPARAMETERTYPE GetTime_periodQueryParameterType = iota + WEEK_GETTIME_PERIODQUERYPARAMETERTYPE + MONTH_GETTIME_PERIODQUERYPARAMETERTYPE + QUARTER_GETTIME_PERIODQUERYPARAMETERTYPE + YEAR_GETTIME_PERIODQUERYPARAMETERTYPE +) + +func (i GetTime_periodQueryParameterType) String() string { + return []string{"day", "week", "month", "quarter", "year"}[i] +} +func ParseGetTime_periodQueryParameterType(v string) (any, error) { + result := DAY_GETTIME_PERIODQUERYPARAMETERTYPE + switch v { + case "day": + result = DAY_GETTIME_PERIODQUERYPARAMETERTYPE + case "week": + result = WEEK_GETTIME_PERIODQUERYPARAMETERTYPE + case "month": + result = MONTH_GETTIME_PERIODQUERYPARAMETERTYPE + case "quarter": + result = QUARTER_GETTIME_PERIODQUERYPARAMETERTYPE + case "year": + result = YEAR_GETTIME_PERIODQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTime_periodQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTime_periodQueryParameterType(values []GetTime_periodQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTime_periodQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go new file mode 100644 index 0000000..a8ca89f --- /dev/null +++ b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go @@ -0,0 +1,33 @@ +package checkruns +import ( + "errors" +) +type CheckRunsPostRequestBodyMember1_status int + +const ( + COMPLETED_CHECKRUNSPOSTREQUESTBODYMEMBER1_STATUS CheckRunsPostRequestBodyMember1_status = iota +) + +func (i CheckRunsPostRequestBodyMember1_status) String() string { + return []string{"completed"}[i] +} +func ParseCheckRunsPostRequestBodyMember1_status(v string) (any, error) { + result := COMPLETED_CHECKRUNSPOSTREQUESTBODYMEMBER1_STATUS + switch v { + case "completed": + result = COMPLETED_CHECKRUNSPOSTREQUESTBODYMEMBER1_STATUS + default: + return 0, errors.New("Unknown CheckRunsPostRequestBodyMember1_status value: " + v) + } + return &result, nil +} +func SerializeCheckRunsPostRequestBodyMember1_status(values []CheckRunsPostRequestBodyMember1_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CheckRunsPostRequestBodyMember1_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go new file mode 100644 index 0000000..e38b6d7 --- /dev/null +++ b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go @@ -0,0 +1,36 @@ +package checkruns +import ( + "errors" +) +type CheckRunsPostRequestBodyMember2_status int + +const ( + QUEUED_CHECKRUNSPOSTREQUESTBODYMEMBER2_STATUS CheckRunsPostRequestBodyMember2_status = iota + IN_PROGRESS_CHECKRUNSPOSTREQUESTBODYMEMBER2_STATUS +) + +func (i CheckRunsPostRequestBodyMember2_status) String() string { + return []string{"queued", "in_progress"}[i] +} +func ParseCheckRunsPostRequestBodyMember2_status(v string) (any, error) { + result := QUEUED_CHECKRUNSPOSTREQUESTBODYMEMBER2_STATUS + switch v { + case "queued": + result = QUEUED_CHECKRUNSPOSTREQUESTBODYMEMBER2_STATUS + case "in_progress": + result = IN_PROGRESS_CHECKRUNSPOSTREQUESTBODYMEMBER2_STATUS + default: + return 0, errors.New("Unknown CheckRunsPostRequestBodyMember2_status value: " + v) + } + return &result, nil +} +func SerializeCheckRunsPostRequestBodyMember2_status(values []CheckRunsPostRequestBodyMember2_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CheckRunsPostRequestBodyMember2_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go new file mode 100644 index 0000000..0bddff4 --- /dev/null +++ b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go @@ -0,0 +1,33 @@ +package item +import ( + "errors" +) +type WithCheck_run_PatchRequestBodyMember1_status int + +const ( + COMPLETED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER1_STATUS WithCheck_run_PatchRequestBodyMember1_status = iota +) + +func (i WithCheck_run_PatchRequestBodyMember1_status) String() string { + return []string{"completed"}[i] +} +func ParseWithCheck_run_PatchRequestBodyMember1_status(v string) (any, error) { + result := COMPLETED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER1_STATUS + switch v { + case "completed": + result = COMPLETED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER1_STATUS + default: + return 0, errors.New("Unknown WithCheck_run_PatchRequestBodyMember1_status value: " + v) + } + return &result, nil +} +func SerializeWithCheck_run_PatchRequestBodyMember1_status(values []WithCheck_run_PatchRequestBodyMember1_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithCheck_run_PatchRequestBodyMember1_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go new file mode 100644 index 0000000..8e0fe39 --- /dev/null +++ b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go @@ -0,0 +1,36 @@ +package item +import ( + "errors" +) +type WithCheck_run_PatchRequestBodyMember2_status int + +const ( + QUEUED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER2_STATUS WithCheck_run_PatchRequestBodyMember2_status = iota + IN_PROGRESS_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER2_STATUS +) + +func (i WithCheck_run_PatchRequestBodyMember2_status) String() string { + return []string{"queued", "in_progress"}[i] +} +func ParseWithCheck_run_PatchRequestBodyMember2_status(v string) (any, error) { + result := QUEUED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER2_STATUS + switch v { + case "queued": + result = QUEUED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER2_STATUS + case "in_progress": + result = IN_PROGRESS_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER2_STATUS + default: + return 0, errors.New("Unknown WithCheck_run_PatchRequestBodyMember2_status value: " + v) + } + return &result, nil +} +func SerializeWithCheck_run_PatchRequestBodyMember2_status(values []WithCheck_run_PatchRequestBodyMember2_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithCheck_run_PatchRequestBodyMember2_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go b/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go new file mode 100644 index 0000000..f648646 --- /dev/null +++ b/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go @@ -0,0 +1,36 @@ +package checkruns +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + LATEST_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"latest", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := LATEST_GETFILTERQUERYPARAMETERTYPE + switch v { + case "latest": + result = LATEST_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go b/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go new file mode 100644 index 0000000..9bc3cab --- /dev/null +++ b/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go @@ -0,0 +1,39 @@ +package checkruns +import ( + "errors" +) +type GetStatusQueryParameterType int + +const ( + QUEUED_GETSTATUSQUERYPARAMETERTYPE GetStatusQueryParameterType = iota + IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + COMPLETED_GETSTATUSQUERYPARAMETERTYPE +) + +func (i GetStatusQueryParameterType) String() string { + return []string{"queued", "in_progress", "completed"}[i] +} +func ParseGetStatusQueryParameterType(v string) (any, error) { + result := QUEUED_GETSTATUSQUERYPARAMETERTYPE + switch v { + case "queued": + result = QUEUED_GETSTATUSQUERYPARAMETERTYPE + case "in_progress": + result = IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + case "completed": + result = COMPLETED_GETSTATUSQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStatusQueryParameterType(values []GetStatusQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStatusQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go new file mode 100644 index 0000000..f7f659c --- /dev/null +++ b/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package analyses +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go new file mode 100644 index 0000000..c937f78 --- /dev/null +++ b/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go @@ -0,0 +1,33 @@ +package analyses +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go b/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go new file mode 100644 index 0000000..2a4909f --- /dev/null +++ b/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go @@ -0,0 +1,43 @@ +package codespaces +import ( + "errors" +) +// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. +type CodespacesPostRequestBody_geo int + +const ( + EUROPEWEST_CODESPACESPOSTREQUESTBODY_GEO CodespacesPostRequestBody_geo = iota + SOUTHEASTASIA_CODESPACESPOSTREQUESTBODY_GEO + USEAST_CODESPACESPOSTREQUESTBODY_GEO + USWEST_CODESPACESPOSTREQUESTBODY_GEO +) + +func (i CodespacesPostRequestBody_geo) String() string { + return []string{"EuropeWest", "SoutheastAsia", "UsEast", "UsWest"}[i] +} +func ParseCodespacesPostRequestBody_geo(v string) (any, error) { + result := EUROPEWEST_CODESPACESPOSTREQUESTBODY_GEO + switch v { + case "EuropeWest": + result = EUROPEWEST_CODESPACESPOSTREQUESTBODY_GEO + case "SoutheastAsia": + result = SOUTHEASTASIA_CODESPACESPOSTREQUESTBODY_GEO + case "UsEast": + result = USEAST_CODESPACESPOSTREQUESTBODY_GEO + case "UsWest": + result = USWEST_CODESPACESPOSTREQUESTBODY_GEO + default: + return 0, errors.New("Unknown CodespacesPostRequestBody_geo value: " + v) + } + return &result, nil +} +func SerializeCodespacesPostRequestBody_geo(values []CodespacesPostRequestBody_geo) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespacesPostRequestBody_geo) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go b/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go new file mode 100644 index 0000000..6d93c8b --- /dev/null +++ b/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go @@ -0,0 +1,39 @@ +package collaborators +import ( + "errors" +) +type GetAffiliationQueryParameterType int + +const ( + OUTSIDE_GETAFFILIATIONQUERYPARAMETERTYPE GetAffiliationQueryParameterType = iota + DIRECT_GETAFFILIATIONQUERYPARAMETERTYPE + ALL_GETAFFILIATIONQUERYPARAMETERTYPE +) + +func (i GetAffiliationQueryParameterType) String() string { + return []string{"outside", "direct", "all"}[i] +} +func ParseGetAffiliationQueryParameterType(v string) (any, error) { + result := OUTSIDE_GETAFFILIATIONQUERYPARAMETERTYPE + switch v { + case "outside": + result = OUTSIDE_GETAFFILIATIONQUERYPARAMETERTYPE + case "direct": + result = DIRECT_GETAFFILIATIONQUERYPARAMETERTYPE + case "all": + result = ALL_GETAFFILIATIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetAffiliationQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetAffiliationQueryParameterType(values []GetAffiliationQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetAffiliationQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go b/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go new file mode 100644 index 0000000..d53dfc6 --- /dev/null +++ b/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go @@ -0,0 +1,45 @@ +package collaborators +import ( + "errors" +) +type GetPermissionQueryParameterType int + +const ( + PULL_GETPERMISSIONQUERYPARAMETERTYPE GetPermissionQueryParameterType = iota + TRIAGE_GETPERMISSIONQUERYPARAMETERTYPE + PUSH_GETPERMISSIONQUERYPARAMETERTYPE + MAINTAIN_GETPERMISSIONQUERYPARAMETERTYPE + ADMIN_GETPERMISSIONQUERYPARAMETERTYPE +) + +func (i GetPermissionQueryParameterType) String() string { + return []string{"pull", "triage", "push", "maintain", "admin"}[i] +} +func ParseGetPermissionQueryParameterType(v string) (any, error) { + result := PULL_GETPERMISSIONQUERYPARAMETERTYPE + switch v { + case "pull": + result = PULL_GETPERMISSIONQUERYPARAMETERTYPE + case "triage": + result = TRIAGE_GETPERMISSIONQUERYPARAMETERTYPE + case "push": + result = PUSH_GETPERMISSIONQUERYPARAMETERTYPE + case "maintain": + result = MAINTAIN_GETPERMISSIONQUERYPARAMETERTYPE + case "admin": + result = ADMIN_GETPERMISSIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetPermissionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetPermissionQueryParameterType(values []GetPermissionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetPermissionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..f1cea98 --- /dev/null +++ b/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the commit comment. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go b/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go new file mode 100644 index 0000000..f648646 --- /dev/null +++ b/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go @@ -0,0 +1,36 @@ +package checkruns +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + LATEST_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"latest", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := LATEST_GETFILTERQUERYPARAMETERTYPE + switch v { + case "latest": + result = LATEST_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go b/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go new file mode 100644 index 0000000..9bc3cab --- /dev/null +++ b/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go @@ -0,0 +1,39 @@ +package checkruns +import ( + "errors" +) +type GetStatusQueryParameterType int + +const ( + QUEUED_GETSTATUSQUERYPARAMETERTYPE GetStatusQueryParameterType = iota + IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + COMPLETED_GETSTATUSQUERYPARAMETERTYPE +) + +func (i GetStatusQueryParameterType) String() string { + return []string{"queued", "in_progress", "completed"}[i] +} +func ParseGetStatusQueryParameterType(v string) (any, error) { + result := QUEUED_GETSTATUSQUERYPARAMETERTYPE + switch v { + case "queued": + result = QUEUED_GETSTATUSQUERYPARAMETERTYPE + case "in_progress": + result = IN_PROGRESS_GETSTATUSQUERYPARAMETERTYPE + case "completed": + result = COMPLETED_GETSTATUSQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStatusQueryParameterType(values []GetStatusQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStatusQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go new file mode 100644 index 0000000..906bdb7 --- /dev/null +++ b/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetScopeQueryParameterType int + +const ( + DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE GetScopeQueryParameterType = iota + RUNTIME_GETSCOPEQUERYPARAMETERTYPE +) + +func (i GetScopeQueryParameterType) String() string { + return []string{"development", "runtime"}[i] +} +func ParseGetScopeQueryParameterType(v string) (any, error) { + result := DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE + switch v { + case "development": + result = DEVELOPMENT_GETSCOPEQUERYPARAMETERTYPE + case "runtime": + result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetScopeQueryParameterType(values []GetScopeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetScopeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go new file mode 100644 index 0000000..8418fe5 --- /dev/null +++ b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go @@ -0,0 +1,46 @@ +package item +import ( + "errors" +) +// **Required when `state` is `dismissed`.** A reason for dismissing the alert. +type WithAlert_numberPatchRequestBody_dismissed_reason int + +const ( + FIX_STARTED_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON WithAlert_numberPatchRequestBody_dismissed_reason = iota + INACCURATE_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + NO_BANDWIDTH_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + NOT_USED_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + TOLERABLE_RISK_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON +) + +func (i WithAlert_numberPatchRequestBody_dismissed_reason) String() string { + return []string{"fix_started", "inaccurate", "no_bandwidth", "not_used", "tolerable_risk"}[i] +} +func ParseWithAlert_numberPatchRequestBody_dismissed_reason(v string) (any, error) { + result := FIX_STARTED_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + switch v { + case "fix_started": + result = FIX_STARTED_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + case "inaccurate": + result = INACCURATE_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + case "no_bandwidth": + result = NO_BANDWIDTH_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + case "not_used": + result = NOT_USED_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + case "tolerable_risk": + result = TOLERABLE_RISK_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON + default: + return 0, errors.New("Unknown WithAlert_numberPatchRequestBody_dismissed_reason value: " + v) + } + return &result, nil +} +func SerializeWithAlert_numberPatchRequestBody_dismissed_reason(values []WithAlert_numberPatchRequestBody_dismissed_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithAlert_numberPatchRequestBody_dismissed_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go new file mode 100644 index 0000000..5815b20 --- /dev/null +++ b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The state of the Dependabot alert.A `dismissed_reason` must be provided when setting the state to `dismissed`. +type WithAlert_numberPatchRequestBody_state int + +const ( + DISMISSED_WITHALERT_NUMBERPATCHREQUESTBODY_STATE WithAlert_numberPatchRequestBody_state = iota + OPEN_WITHALERT_NUMBERPATCHREQUESTBODY_STATE +) + +func (i WithAlert_numberPatchRequestBody_state) String() string { + return []string{"dismissed", "open"}[i] +} +func ParseWithAlert_numberPatchRequestBody_state(v string) (any, error) { + result := DISMISSED_WITHALERT_NUMBERPATCHREQUESTBODY_STATE + switch v { + case "dismissed": + result = DISMISSED_WITHALERT_NUMBERPATCHREQUESTBODY_STATE + case "open": + result = OPEN_WITHALERT_NUMBERPATCHREQUESTBODY_STATE + default: + return 0, errors.New("Unknown WithAlert_numberPatchRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeWithAlert_numberPatchRequestBody_state(values []WithAlert_numberPatchRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithAlert_numberPatchRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go b/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go new file mode 100644 index 0000000..3c77664 --- /dev/null +++ b/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go @@ -0,0 +1,52 @@ +package statuses +import ( + "errors" +) +// The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. +type StatusesPostRequestBody_state int + +const ( + ERROR_STATUSESPOSTREQUESTBODY_STATE StatusesPostRequestBody_state = iota + FAILURE_STATUSESPOSTREQUESTBODY_STATE + INACTIVE_STATUSESPOSTREQUESTBODY_STATE + IN_PROGRESS_STATUSESPOSTREQUESTBODY_STATE + QUEUED_STATUSESPOSTREQUESTBODY_STATE + PENDING_STATUSESPOSTREQUESTBODY_STATE + SUCCESS_STATUSESPOSTREQUESTBODY_STATE +) + +func (i StatusesPostRequestBody_state) String() string { + return []string{"error", "failure", "inactive", "in_progress", "queued", "pending", "success"}[i] +} +func ParseStatusesPostRequestBody_state(v string) (any, error) { + result := ERROR_STATUSESPOSTREQUESTBODY_STATE + switch v { + case "error": + result = ERROR_STATUSESPOSTREQUESTBODY_STATE + case "failure": + result = FAILURE_STATUSESPOSTREQUESTBODY_STATE + case "inactive": + result = INACTIVE_STATUSESPOSTREQUESTBODY_STATE + case "in_progress": + result = IN_PROGRESS_STATUSESPOSTREQUESTBODY_STATE + case "queued": + result = QUEUED_STATUSESPOSTREQUESTBODY_STATE + case "pending": + result = PENDING_STATUSESPOSTREQUESTBODY_STATE + case "success": + result = SUCCESS_STATUSESPOSTREQUESTBODY_STATE + default: + return 0, errors.New("Unknown StatusesPostRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeStatusesPostRequestBody_state(values []StatusesPostRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i StatusesPostRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go new file mode 100644 index 0000000..238f674 --- /dev/null +++ b/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package forks +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + NEWEST_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + OLDEST_GETSORTQUERYPARAMETERTYPE + STARGAZERS_GETSORTQUERYPARAMETERTYPE + WATCHERS_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"newest", "oldest", "stargazers", "watchers"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := NEWEST_GETSORTQUERYPARAMETERTYPE + switch v { + case "newest": + result = NEWEST_GETSORTQUERYPARAMETERTYPE + case "oldest": + result = OLDEST_GETSORTQUERYPARAMETERTYPE + case "stargazers": + result = STARGAZERS_GETSORTQUERYPARAMETERTYPE + case "watchers": + result = WATCHERS_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go b/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go new file mode 100644 index 0000000..074ff8a --- /dev/null +++ b/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go @@ -0,0 +1,40 @@ +package tags +import ( + "errors" +) +// The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. +type TagsPostRequestBody_type int + +const ( + COMMIT_TAGSPOSTREQUESTBODY_TYPE TagsPostRequestBody_type = iota + TREE_TAGSPOSTREQUESTBODY_TYPE + BLOB_TAGSPOSTREQUESTBODY_TYPE +) + +func (i TagsPostRequestBody_type) String() string { + return []string{"commit", "tree", "blob"}[i] +} +func ParseTagsPostRequestBody_type(v string) (any, error) { + result := COMMIT_TAGSPOSTREQUESTBODY_TYPE + switch v { + case "commit": + result = COMMIT_TAGSPOSTREQUESTBODY_TYPE + case "tree": + result = TREE_TAGSPOSTREQUESTBODY_TYPE + case "blob": + result = BLOB_TAGSPOSTREQUESTBODY_TYPE + default: + return 0, errors.New("Unknown TagsPostRequestBody_type value: " + v) + } + return &result, nil +} +func SerializeTagsPostRequestBody_type(values []TagsPostRequestBody_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TagsPostRequestBody_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go new file mode 100644 index 0000000..f395936 --- /dev/null +++ b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go @@ -0,0 +1,46 @@ +package trees +import ( + "errors" +) +// The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. +type TreesPostRequestBody_tree_mode int + +const ( + ONEZEROZEROSIXFOURFOUR_TREESPOSTREQUESTBODY_TREE_MODE TreesPostRequestBody_tree_mode = iota + ONEZEROZEROSEVENFIVEFIVE_TREESPOSTREQUESTBODY_TREE_MODE + ZEROFOURZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE + ONESIXZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE + ONETWOZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE +) + +func (i TreesPostRequestBody_tree_mode) String() string { + return []string{"100644", "100755", "040000", "160000", "120000"}[i] +} +func ParseTreesPostRequestBody_tree_mode(v string) (any, error) { + result := ONEZEROZEROSIXFOURFOUR_TREESPOSTREQUESTBODY_TREE_MODE + switch v { + case "100644": + result = ONEZEROZEROSIXFOURFOUR_TREESPOSTREQUESTBODY_TREE_MODE + case "100755": + result = ONEZEROZEROSEVENFIVEFIVE_TREESPOSTREQUESTBODY_TREE_MODE + case "040000": + result = ZEROFOURZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE + case "160000": + result = ONESIXZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE + case "120000": + result = ONETWOZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE + default: + return 0, errors.New("Unknown TreesPostRequestBody_tree_mode value: " + v) + } + return &result, nil +} +func SerializeTreesPostRequestBody_tree_mode(values []TreesPostRequestBody_tree_mode) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TreesPostRequestBody_tree_mode) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go new file mode 100644 index 0000000..f30fd97 --- /dev/null +++ b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go @@ -0,0 +1,40 @@ +package trees +import ( + "errors" +) +// Either `blob`, `tree`, or `commit`. +type TreesPostRequestBody_tree_type int + +const ( + BLOB_TREESPOSTREQUESTBODY_TREE_TYPE TreesPostRequestBody_tree_type = iota + TREE_TREESPOSTREQUESTBODY_TREE_TYPE + COMMIT_TREESPOSTREQUESTBODY_TREE_TYPE +) + +func (i TreesPostRequestBody_tree_type) String() string { + return []string{"blob", "tree", "commit"}[i] +} +func ParseTreesPostRequestBody_tree_type(v string) (any, error) { + result := BLOB_TREESPOSTREQUESTBODY_TREE_TYPE + switch v { + case "blob": + result = BLOB_TREESPOSTREQUESTBODY_TREE_TYPE + case "tree": + result = TREE_TREESPOSTREQUESTBODY_TREE_TYPE + case "commit": + result = COMMIT_TREESPOSTREQUESTBODY_TREE_TYPE + default: + return 0, errors.New("Unknown TreesPostRequestBody_tree_type value: " + v) + } + return &result, nil +} +func SerializeTreesPostRequestBody_tree_type(values []TreesPostRequestBody_tree_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TreesPostRequestBody_tree_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go b/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go new file mode 100644 index 0000000..d6411ed --- /dev/null +++ b/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go @@ -0,0 +1,43 @@ +package importescaped +import ( + "errors" +) +// The type of version control system you are migrating from. +type ImportPatchRequestBody_vcs int + +const ( + SUBVERSION_IMPORTPATCHREQUESTBODY_VCS ImportPatchRequestBody_vcs = iota + TFVC_IMPORTPATCHREQUESTBODY_VCS + GIT_IMPORTPATCHREQUESTBODY_VCS + MERCURIAL_IMPORTPATCHREQUESTBODY_VCS +) + +func (i ImportPatchRequestBody_vcs) String() string { + return []string{"subversion", "tfvc", "git", "mercurial"}[i] +} +func ParseImportPatchRequestBody_vcs(v string) (any, error) { + result := SUBVERSION_IMPORTPATCHREQUESTBODY_VCS + switch v { + case "subversion": + result = SUBVERSION_IMPORTPATCHREQUESTBODY_VCS + case "tfvc": + result = TFVC_IMPORTPATCHREQUESTBODY_VCS + case "git": + result = GIT_IMPORTPATCHREQUESTBODY_VCS + case "mercurial": + result = MERCURIAL_IMPORTPATCHREQUESTBODY_VCS + default: + return 0, errors.New("Unknown ImportPatchRequestBody_vcs value: " + v) + } + return &result, nil +} +func SerializeImportPatchRequestBody_vcs(values []ImportPatchRequestBody_vcs) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ImportPatchRequestBody_vcs) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go b/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go new file mode 100644 index 0000000..aa419fb --- /dev/null +++ b/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go @@ -0,0 +1,43 @@ +package importescaped +import ( + "errors" +) +// The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. +type ImportPutRequestBody_vcs int + +const ( + SUBVERSION_IMPORTPUTREQUESTBODY_VCS ImportPutRequestBody_vcs = iota + GIT_IMPORTPUTREQUESTBODY_VCS + MERCURIAL_IMPORTPUTREQUESTBODY_VCS + TFVC_IMPORTPUTREQUESTBODY_VCS +) + +func (i ImportPutRequestBody_vcs) String() string { + return []string{"subversion", "git", "mercurial", "tfvc"}[i] +} +func ParseImportPutRequestBody_vcs(v string) (any, error) { + result := SUBVERSION_IMPORTPUTREQUESTBODY_VCS + switch v { + case "subversion": + result = SUBVERSION_IMPORTPUTREQUESTBODY_VCS + case "git": + result = GIT_IMPORTPUTREQUESTBODY_VCS + case "mercurial": + result = MERCURIAL_IMPORTPUTREQUESTBODY_VCS + case "tfvc": + result = TFVC_IMPORTPUTREQUESTBODY_VCS + default: + return 0, errors.New("Unknown ImportPutRequestBody_vcs value: " + v) + } + return &result, nil +} +func SerializeImportPutRequestBody_vcs(values []ImportPutRequestBody_vcs) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ImportPutRequestBody_vcs) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go b/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go new file mode 100644 index 0000000..f7db76e --- /dev/null +++ b/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go @@ -0,0 +1,37 @@ +package lfs +import ( + "errors" +) +// Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. +type LfsPatchRequestBody_use_lfs int + +const ( + OPT_IN_LFSPATCHREQUESTBODY_USE_LFS LfsPatchRequestBody_use_lfs = iota + OPT_OUT_LFSPATCHREQUESTBODY_USE_LFS +) + +func (i LfsPatchRequestBody_use_lfs) String() string { + return []string{"opt_in", "opt_out"}[i] +} +func ParseLfsPatchRequestBody_use_lfs(v string) (any, error) { + result := OPT_IN_LFSPATCHREQUESTBODY_USE_LFS + switch v { + case "opt_in": + result = OPT_IN_LFSPATCHREQUESTBODY_USE_LFS + case "opt_out": + result = OPT_OUT_LFSPATCHREQUESTBODY_USE_LFS + default: + return 0, errors.New("Unknown LfsPatchRequestBody_use_lfs value: " + v) + } + return &result, nil +} +func SerializeLfsPatchRequestBody_use_lfs(values []LfsPatchRequestBody_use_lfs) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i LfsPatchRequestBody_use_lfs) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go b/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go new file mode 100644 index 0000000..bae8cda --- /dev/null +++ b/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go @@ -0,0 +1,46 @@ +package item +import ( + "errors" +) +// The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. +type WithInvitation_PatchRequestBody_permissions int + +const ( + READ_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS WithInvitation_PatchRequestBody_permissions = iota + WRITE_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + MAINTAIN_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + TRIAGE_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + ADMIN_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS +) + +func (i WithInvitation_PatchRequestBody_permissions) String() string { + return []string{"read", "write", "maintain", "triage", "admin"}[i] +} +func ParseWithInvitation_PatchRequestBody_permissions(v string) (any, error) { + result := READ_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + switch v { + case "read": + result = READ_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + case "write": + result = WRITE_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + case "maintain": + result = MAINTAIN_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + case "triage": + result = TRIAGE_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + case "admin": + result = ADMIN_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS + default: + return 0, errors.New("Unknown WithInvitation_PatchRequestBody_permissions value: " + v) + } + return &result, nil +} +func SerializeWithInvitation_PatchRequestBody_permissions(values []WithInvitation_PatchRequestBody_permissions) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithInvitation_PatchRequestBody_permissions) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go new file mode 100644 index 0000000..ac25506 --- /dev/null +++ b/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go new file mode 100644 index 0000000..4ccff65 --- /dev/null +++ b/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..de9d202 --- /dev/null +++ b/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the issue comment. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go new file mode 100644 index 0000000..6aca6ec --- /dev/null +++ b/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package issues +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go new file mode 100644 index 0000000..ba962ac --- /dev/null +++ b/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + COMMENTS_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "comments"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "comments": + result = COMMENTS_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go b/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go new file mode 100644 index 0000000..5541510 --- /dev/null +++ b/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go b/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go new file mode 100644 index 0000000..5194ffe --- /dev/null +++ b/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go @@ -0,0 +1,43 @@ +package lock +import ( + "errors" +) +// The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: * `off-topic` * `too heated` * `resolved` * `spam` +type LockPutRequestBody_lock_reason int + +const ( + OFFTOPIC_LOCKPUTREQUESTBODY_LOCK_REASON LockPutRequestBody_lock_reason = iota + TOOHEATED_LOCKPUTREQUESTBODY_LOCK_REASON + RESOLVED_LOCKPUTREQUESTBODY_LOCK_REASON + SPAM_LOCKPUTREQUESTBODY_LOCK_REASON +) + +func (i LockPutRequestBody_lock_reason) String() string { + return []string{"off-topic", "too heated", "resolved", "spam"}[i] +} +func ParseLockPutRequestBody_lock_reason(v string) (any, error) { + result := OFFTOPIC_LOCKPUTREQUESTBODY_LOCK_REASON + switch v { + case "off-topic": + result = OFFTOPIC_LOCKPUTREQUESTBODY_LOCK_REASON + case "too heated": + result = TOOHEATED_LOCKPUTREQUESTBODY_LOCK_REASON + case "resolved": + result = RESOLVED_LOCKPUTREQUESTBODY_LOCK_REASON + case "spam": + result = SPAM_LOCKPUTREQUESTBODY_LOCK_REASON + default: + return 0, errors.New("Unknown LockPutRequestBody_lock_reason value: " + v) + } + return &result, nil +} +func SerializeLockPutRequestBody_lock_reason(values []LockPutRequestBody_lock_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i LockPutRequestBody_lock_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..f83b19b --- /dev/null +++ b/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the issue. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go new file mode 100644 index 0000000..c9bdc83 --- /dev/null +++ b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The open or closed state of the issue. +type WithIssue_numberPatchRequestBody_state int + +const ( + OPEN_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE WithIssue_numberPatchRequestBody_state = iota + CLOSED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE +) + +func (i WithIssue_numberPatchRequestBody_state) String() string { + return []string{"open", "closed"}[i] +} +func ParseWithIssue_numberPatchRequestBody_state(v string) (any, error) { + result := OPEN_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE + switch v { + case "open": + result = OPEN_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE + case "closed": + result = CLOSED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE + default: + return 0, errors.New("Unknown WithIssue_numberPatchRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeWithIssue_numberPatchRequestBody_state(values []WithIssue_numberPatchRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithIssue_numberPatchRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go new file mode 100644 index 0000000..f28bc40 --- /dev/null +++ b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The reason for the state change. Ignored unless `state` is changed. +type WithIssue_numberPatchRequestBody_state_reason int + +const ( + COMPLETED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON WithIssue_numberPatchRequestBody_state_reason = iota + NOT_PLANNED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON + REOPENED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON +) + +func (i WithIssue_numberPatchRequestBody_state_reason) String() string { + return []string{"completed", "not_planned", "reopened"}[i] +} +func ParseWithIssue_numberPatchRequestBody_state_reason(v string) (any, error) { + result := COMPLETED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON + switch v { + case "completed": + result = COMPLETED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON + case "not_planned": + result = NOT_PLANNED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON + case "reopened": + result = REOPENED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON + default: + return 0, errors.New("Unknown WithIssue_numberPatchRequestBody_state_reason value: " + v) + } + return &result, nil +} +func SerializeWithIssue_numberPatchRequestBody_state_reason(values []WithIssue_numberPatchRequestBody_state_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithIssue_numberPatchRequestBody_state_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go new file mode 100644 index 0000000..b041b3a --- /dev/null +++ b/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package milestones +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go new file mode 100644 index 0000000..4d69077 --- /dev/null +++ b/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package milestones +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + DUE_ON_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + COMPLETENESS_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"due_on", "completeness"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := DUE_ON_GETSORTQUERYPARAMETERTYPE + switch v { + case "due_on": + result = DUE_ON_GETSORTQUERYPARAMETERTYPE + case "completeness": + result = COMPLETENESS_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go b/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go new file mode 100644 index 0000000..11bfb71 --- /dev/null +++ b/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package milestones +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go b/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go new file mode 100644 index 0000000..042f6d7 --- /dev/null +++ b/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The state of the milestone. Either `open` or `closed`. +type WithMilestone_numberPatchRequestBody_state int + +const ( + OPEN_WITHMILESTONE_NUMBERPATCHREQUESTBODY_STATE WithMilestone_numberPatchRequestBody_state = iota + CLOSED_WITHMILESTONE_NUMBERPATCHREQUESTBODY_STATE +) + +func (i WithMilestone_numberPatchRequestBody_state) String() string { + return []string{"open", "closed"}[i] +} +func ParseWithMilestone_numberPatchRequestBody_state(v string) (any, error) { + result := OPEN_WITHMILESTONE_NUMBERPATCHREQUESTBODY_STATE + switch v { + case "open": + result = OPEN_WITHMILESTONE_NUMBERPATCHREQUESTBODY_STATE + case "closed": + result = CLOSED_WITHMILESTONE_NUMBERPATCHREQUESTBODY_STATE + default: + return 0, errors.New("Unknown WithMilestone_numberPatchRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeWithMilestone_numberPatchRequestBody_state(values []WithMilestone_numberPatchRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithMilestone_numberPatchRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go b/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go new file mode 100644 index 0000000..09bc854 --- /dev/null +++ b/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go @@ -0,0 +1,37 @@ +package milestones +import ( + "errors" +) +// The state of the milestone. Either `open` or `closed`. +type MilestonesPostRequestBody_state int + +const ( + OPEN_MILESTONESPOSTREQUESTBODY_STATE MilestonesPostRequestBody_state = iota + CLOSED_MILESTONESPOSTREQUESTBODY_STATE +) + +func (i MilestonesPostRequestBody_state) String() string { + return []string{"open", "closed"}[i] +} +func ParseMilestonesPostRequestBody_state(v string) (any, error) { + result := OPEN_MILESTONESPOSTREQUESTBODY_STATE + switch v { + case "open": + result = OPEN_MILESTONESPOSTREQUESTBODY_STATE + case "closed": + result = CLOSED_MILESTONESPOSTREQUESTBODY_STATE + default: + return 0, errors.New("Unknown MilestonesPostRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeMilestonesPostRequestBody_state(values []MilestonesPostRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MilestonesPostRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go b/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go new file mode 100644 index 0000000..8c56b3c --- /dev/null +++ b/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go @@ -0,0 +1,37 @@ +package pages +import ( + "errors" +) +// The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. +type PagesPostRequestBody_build_type int + +const ( + LEGACY_PAGESPOSTREQUESTBODY_BUILD_TYPE PagesPostRequestBody_build_type = iota + WORKFLOW_PAGESPOSTREQUESTBODY_BUILD_TYPE +) + +func (i PagesPostRequestBody_build_type) String() string { + return []string{"legacy", "workflow"}[i] +} +func ParsePagesPostRequestBody_build_type(v string) (any, error) { + result := LEGACY_PAGESPOSTREQUESTBODY_BUILD_TYPE + switch v { + case "legacy": + result = LEGACY_PAGESPOSTREQUESTBODY_BUILD_TYPE + case "workflow": + result = WORKFLOW_PAGESPOSTREQUESTBODY_BUILD_TYPE + default: + return 0, errors.New("Unknown PagesPostRequestBody_build_type value: " + v) + } + return &result, nil +} +func SerializePagesPostRequestBody_build_type(values []PagesPostRequestBody_build_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PagesPostRequestBody_build_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go b/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go new file mode 100644 index 0000000..a5f415e --- /dev/null +++ b/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go @@ -0,0 +1,37 @@ +package pages +import ( + "errors" +) +// The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` +type PagesPostRequestBody_source_path int + +const ( + SLASH_PAGESPOSTREQUESTBODY_SOURCE_PATH PagesPostRequestBody_source_path = iota + DOCS_PAGESPOSTREQUESTBODY_SOURCE_PATH +) + +func (i PagesPostRequestBody_source_path) String() string { + return []string{"/", "/docs"}[i] +} +func ParsePagesPostRequestBody_source_path(v string) (any, error) { + result := SLASH_PAGESPOSTREQUESTBODY_SOURCE_PATH + switch v { + case "/": + result = SLASH_PAGESPOSTREQUESTBODY_SOURCE_PATH + case "/docs": + result = DOCS_PAGESPOSTREQUESTBODY_SOURCE_PATH + default: + return 0, errors.New("Unknown PagesPostRequestBody_source_path value: " + v) + } + return &result, nil +} +func SerializePagesPostRequestBody_source_path(values []PagesPostRequestBody_source_path) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PagesPostRequestBody_source_path) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go b/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go new file mode 100644 index 0000000..737c6d0 --- /dev/null +++ b/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go @@ -0,0 +1,37 @@ +package pages +import ( + "errors" +) +// The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. +type PagesPutRequestBody_build_type int + +const ( + LEGACY_PAGESPUTREQUESTBODY_BUILD_TYPE PagesPutRequestBody_build_type = iota + WORKFLOW_PAGESPUTREQUESTBODY_BUILD_TYPE +) + +func (i PagesPutRequestBody_build_type) String() string { + return []string{"legacy", "workflow"}[i] +} +func ParsePagesPutRequestBody_build_type(v string) (any, error) { + result := LEGACY_PAGESPUTREQUESTBODY_BUILD_TYPE + switch v { + case "legacy": + result = LEGACY_PAGESPUTREQUESTBODY_BUILD_TYPE + case "workflow": + result = WORKFLOW_PAGESPUTREQUESTBODY_BUILD_TYPE + default: + return 0, errors.New("Unknown PagesPutRequestBody_build_type value: " + v) + } + return &result, nil +} +func SerializePagesPutRequestBody_build_type(values []PagesPutRequestBody_build_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PagesPutRequestBody_build_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go b/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go new file mode 100644 index 0000000..c4c4c6e --- /dev/null +++ b/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go @@ -0,0 +1,37 @@ +package pages +import ( + "errors" +) +// The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. +type PagesPutRequestBody_sourceMember1_path int + +const ( + SLASH_PAGESPUTREQUESTBODY_SOURCEMEMBER1_PATH PagesPutRequestBody_sourceMember1_path = iota + DOCS_PAGESPUTREQUESTBODY_SOURCEMEMBER1_PATH +) + +func (i PagesPutRequestBody_sourceMember1_path) String() string { + return []string{"/", "/docs"}[i] +} +func ParsePagesPutRequestBody_sourceMember1_path(v string) (any, error) { + result := SLASH_PAGESPUTREQUESTBODY_SOURCEMEMBER1_PATH + switch v { + case "/": + result = SLASH_PAGESPUTREQUESTBODY_SOURCEMEMBER1_PATH + case "/docs": + result = DOCS_PAGESPUTREQUESTBODY_SOURCEMEMBER1_PATH + default: + return 0, errors.New("Unknown PagesPutRequestBody_sourceMember1_path value: " + v) + } + return &result, nil +} +func SerializePagesPutRequestBody_sourceMember1_path(values []PagesPutRequestBody_sourceMember1_path) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PagesPutRequestBody_sourceMember1_path) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go b/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go new file mode 100644 index 0000000..985374b --- /dev/null +++ b/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package projects +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go new file mode 100644 index 0000000..ac25506 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go new file mode 100644 index 0000000..d29bef7 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package comments +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + CREATED_AT_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "created_at"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "created_at": + result = CREATED_AT_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..0cda3bd --- /dev/null +++ b/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the pull request review comment. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go new file mode 100644 index 0000000..f9e2cd9 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package pulls +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go new file mode 100644 index 0000000..5277532 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package pulls +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + POPULARITY_GETSORTQUERYPARAMETERTYPE + LONGRUNNING_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "popularity", "long-running"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "popularity": + result = POPULARITY_GETSORTQUERYPARAMETERTYPE + case "long-running": + result = LONGRUNNING_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go b/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go new file mode 100644 index 0000000..b23e031 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package pulls +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go b/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go new file mode 100644 index 0000000..2a4909f --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go @@ -0,0 +1,43 @@ +package codespaces +import ( + "errors" +) +// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. +type CodespacesPostRequestBody_geo int + +const ( + EUROPEWEST_CODESPACESPOSTREQUESTBODY_GEO CodespacesPostRequestBody_geo = iota + SOUTHEASTASIA_CODESPACESPOSTREQUESTBODY_GEO + USEAST_CODESPACESPOSTREQUESTBODY_GEO + USWEST_CODESPACESPOSTREQUESTBODY_GEO +) + +func (i CodespacesPostRequestBody_geo) String() string { + return []string{"EuropeWest", "SoutheastAsia", "UsEast", "UsWest"}[i] +} +func ParseCodespacesPostRequestBody_geo(v string) (any, error) { + result := EUROPEWEST_CODESPACESPOSTREQUESTBODY_GEO + switch v { + case "EuropeWest": + result = EUROPEWEST_CODESPACESPOSTREQUESTBODY_GEO + case "SoutheastAsia": + result = SOUTHEASTASIA_CODESPACESPOSTREQUESTBODY_GEO + case "UsEast": + result = USEAST_CODESPACESPOSTREQUESTBODY_GEO + case "UsWest": + result = USWEST_CODESPACESPOSTREQUESTBODY_GEO + default: + return 0, errors.New("Unknown CodespacesPostRequestBody_geo value: " + v) + } + return &result, nil +} +func SerializeCodespacesPostRequestBody_geo(values []CodespacesPostRequestBody_geo) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespacesPostRequestBody_geo) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go new file mode 100644 index 0000000..e9ed18e --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go @@ -0,0 +1,37 @@ +package comments +import ( + "errors" +) +// In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/enterprise-cloud@latest//articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. +type CommentsPostRequestBody_side int + +const ( + LEFT_COMMENTSPOSTREQUESTBODY_SIDE CommentsPostRequestBody_side = iota + RIGHT_COMMENTSPOSTREQUESTBODY_SIDE +) + +func (i CommentsPostRequestBody_side) String() string { + return []string{"LEFT", "RIGHT"}[i] +} +func ParseCommentsPostRequestBody_side(v string) (any, error) { + result := LEFT_COMMENTSPOSTREQUESTBODY_SIDE + switch v { + case "LEFT": + result = LEFT_COMMENTSPOSTREQUESTBODY_SIDE + case "RIGHT": + result = RIGHT_COMMENTSPOSTREQUESTBODY_SIDE + default: + return 0, errors.New("Unknown CommentsPostRequestBody_side value: " + v) + } + return &result, nil +} +func SerializeCommentsPostRequestBody_side(values []CommentsPostRequestBody_side) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CommentsPostRequestBody_side) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go new file mode 100644 index 0000000..07c41af --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go @@ -0,0 +1,40 @@ +package comments +import ( + "errors" +) +// **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/enterprise-cloud@latest//articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. +type CommentsPostRequestBody_start_side int + +const ( + LEFT_COMMENTSPOSTREQUESTBODY_START_SIDE CommentsPostRequestBody_start_side = iota + RIGHT_COMMENTSPOSTREQUESTBODY_START_SIDE + SIDE_COMMENTSPOSTREQUESTBODY_START_SIDE +) + +func (i CommentsPostRequestBody_start_side) String() string { + return []string{"LEFT", "RIGHT", "side"}[i] +} +func ParseCommentsPostRequestBody_start_side(v string) (any, error) { + result := LEFT_COMMENTSPOSTREQUESTBODY_START_SIDE + switch v { + case "LEFT": + result = LEFT_COMMENTSPOSTREQUESTBODY_START_SIDE + case "RIGHT": + result = RIGHT_COMMENTSPOSTREQUESTBODY_START_SIDE + case "side": + result = SIDE_COMMENTSPOSTREQUESTBODY_START_SIDE + default: + return 0, errors.New("Unknown CommentsPostRequestBody_start_side value: " + v) + } + return &result, nil +} +func SerializeCommentsPostRequestBody_start_side(values []CommentsPostRequestBody_start_side) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CommentsPostRequestBody_start_side) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go new file mode 100644 index 0000000..b7b643a --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go @@ -0,0 +1,37 @@ +package comments +import ( + "errors" +) +// The level at which the comment is targeted. +type CommentsPostRequestBody_subject_type int + +const ( + LINE_COMMENTSPOSTREQUESTBODY_SUBJECT_TYPE CommentsPostRequestBody_subject_type = iota + FILE_COMMENTSPOSTREQUESTBODY_SUBJECT_TYPE +) + +func (i CommentsPostRequestBody_subject_type) String() string { + return []string{"line", "file"}[i] +} +func ParseCommentsPostRequestBody_subject_type(v string) (any, error) { + result := LINE_COMMENTSPOSTREQUESTBODY_SUBJECT_TYPE + switch v { + case "line": + result = LINE_COMMENTSPOSTREQUESTBODY_SUBJECT_TYPE + case "file": + result = FILE_COMMENTSPOSTREQUESTBODY_SUBJECT_TYPE + default: + return 0, errors.New("Unknown CommentsPostRequestBody_subject_type value: " + v) + } + return &result, nil +} +func SerializeCommentsPostRequestBody_subject_type(values []CommentsPostRequestBody_subject_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CommentsPostRequestBody_subject_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go new file mode 100644 index 0000000..ac25506 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go new file mode 100644 index 0000000..4ccff65 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go b/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go new file mode 100644 index 0000000..9863cc0 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go @@ -0,0 +1,40 @@ +package merge +import ( + "errors" +) +// The merge method to use. +type MergePutRequestBody_merge_method int + +const ( + MERGE_MERGEPUTREQUESTBODY_MERGE_METHOD MergePutRequestBody_merge_method = iota + SQUASH_MERGEPUTREQUESTBODY_MERGE_METHOD + REBASE_MERGEPUTREQUESTBODY_MERGE_METHOD +) + +func (i MergePutRequestBody_merge_method) String() string { + return []string{"merge", "squash", "rebase"}[i] +} +func ParseMergePutRequestBody_merge_method(v string) (any, error) { + result := MERGE_MERGEPUTREQUESTBODY_MERGE_METHOD + switch v { + case "merge": + result = MERGE_MERGEPUTREQUESTBODY_MERGE_METHOD + case "squash": + result = SQUASH_MERGEPUTREQUESTBODY_MERGE_METHOD + case "rebase": + result = REBASE_MERGEPUTREQUESTBODY_MERGE_METHOD + default: + return 0, errors.New("Unknown MergePutRequestBody_merge_method value: " + v) + } + return &result, nil +} +func SerializeMergePutRequestBody_merge_method(values []MergePutRequestBody_merge_method) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MergePutRequestBody_merge_method) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go b/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go new file mode 100644 index 0000000..b2c73be --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go @@ -0,0 +1,33 @@ +package dismissals +import ( + "errors" +) +type DismissalsPutRequestBody_event int + +const ( + DISMISS_DISMISSALSPUTREQUESTBODY_EVENT DismissalsPutRequestBody_event = iota +) + +func (i DismissalsPutRequestBody_event) String() string { + return []string{"DISMISS"}[i] +} +func ParseDismissalsPutRequestBody_event(v string) (any, error) { + result := DISMISS_DISMISSALSPUTREQUESTBODY_EVENT + switch v { + case "DISMISS": + result = DISMISS_DISMISSALSPUTREQUESTBODY_EVENT + default: + return 0, errors.New("Unknown DismissalsPutRequestBody_event value: " + v) + } + return &result, nil +} +func SerializeDismissalsPutRequestBody_event(values []DismissalsPutRequestBody_event) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DismissalsPutRequestBody_event) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go b/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go new file mode 100644 index 0000000..245ec63 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go @@ -0,0 +1,40 @@ +package events +import ( + "errors" +) +// The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. +type EventsPostRequestBody_event int + +const ( + APPROVE_EVENTSPOSTREQUESTBODY_EVENT EventsPostRequestBody_event = iota + REQUEST_CHANGES_EVENTSPOSTREQUESTBODY_EVENT + COMMENT_EVENTSPOSTREQUESTBODY_EVENT +) + +func (i EventsPostRequestBody_event) String() string { + return []string{"APPROVE", "REQUEST_CHANGES", "COMMENT"}[i] +} +func ParseEventsPostRequestBody_event(v string) (any, error) { + result := APPROVE_EVENTSPOSTREQUESTBODY_EVENT + switch v { + case "APPROVE": + result = APPROVE_EVENTSPOSTREQUESTBODY_EVENT + case "REQUEST_CHANGES": + result = REQUEST_CHANGES_EVENTSPOSTREQUESTBODY_EVENT + case "COMMENT": + result = COMMENT_EVENTSPOSTREQUESTBODY_EVENT + default: + return 0, errors.New("Unknown EventsPostRequestBody_event value: " + v) + } + return &result, nil +} +func SerializeEventsPostRequestBody_event(values []EventsPostRequestBody_event) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i EventsPostRequestBody_event) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go b/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go new file mode 100644 index 0000000..1cbbc0d --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go @@ -0,0 +1,40 @@ +package reviews +import ( + "errors" +) +// The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. +type ReviewsPostRequestBody_event int + +const ( + APPROVE_REVIEWSPOSTREQUESTBODY_EVENT ReviewsPostRequestBody_event = iota + REQUEST_CHANGES_REVIEWSPOSTREQUESTBODY_EVENT + COMMENT_REVIEWSPOSTREQUESTBODY_EVENT +) + +func (i ReviewsPostRequestBody_event) String() string { + return []string{"APPROVE", "REQUEST_CHANGES", "COMMENT"}[i] +} +func ParseReviewsPostRequestBody_event(v string) (any, error) { + result := APPROVE_REVIEWSPOSTREQUESTBODY_EVENT + switch v { + case "APPROVE": + result = APPROVE_REVIEWSPOSTREQUESTBODY_EVENT + case "REQUEST_CHANGES": + result = REQUEST_CHANGES_REVIEWSPOSTREQUESTBODY_EVENT + case "COMMENT": + result = COMMENT_REVIEWSPOSTREQUESTBODY_EVENT + default: + return 0, errors.New("Unknown ReviewsPostRequestBody_event value: " + v) + } + return &result, nil +} +func SerializeReviewsPostRequestBody_event(values []ReviewsPostRequestBody_event) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReviewsPostRequestBody_event) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go b/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go new file mode 100644 index 0000000..802b2f7 --- /dev/null +++ b/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// State of this Pull Request. Either `open` or `closed`. +type WithPull_numberPatchRequestBody_state int + +const ( + OPEN_WITHPULL_NUMBERPATCHREQUESTBODY_STATE WithPull_numberPatchRequestBody_state = iota + CLOSED_WITHPULL_NUMBERPATCHREQUESTBODY_STATE +) + +func (i WithPull_numberPatchRequestBody_state) String() string { + return []string{"open", "closed"}[i] +} +func ParseWithPull_numberPatchRequestBody_state(v string) (any, error) { + result := OPEN_WITHPULL_NUMBERPATCHREQUESTBODY_STATE + switch v { + case "open": + result = OPEN_WITHPULL_NUMBERPATCHREQUESTBODY_STATE + case "closed": + result = CLOSED_WITHPULL_NUMBERPATCHREQUESTBODY_STATE + default: + return 0, errors.New("Unknown WithPull_numberPatchRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeWithPull_numberPatchRequestBody_state(values []WithPull_numberPatchRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithPull_numberPatchRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..5405ea2 --- /dev/null +++ b/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,48 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + LAUGH_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "laugh", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..3762908 --- /dev/null +++ b/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,49 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the release. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "laugh", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go b/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go new file mode 100644 index 0000000..cf78c14 --- /dev/null +++ b/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. +type WithRelease_PatchRequestBody_make_latest int + +const ( + TRUE_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST WithRelease_PatchRequestBody_make_latest = iota + FALSE_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST + LEGACY_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST +) + +func (i WithRelease_PatchRequestBody_make_latest) String() string { + return []string{"true", "false", "legacy"}[i] +} +func ParseWithRelease_PatchRequestBody_make_latest(v string) (any, error) { + result := TRUE_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST + switch v { + case "true": + result = TRUE_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST + case "false": + result = FALSE_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST + case "legacy": + result = LEGACY_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST + default: + return 0, errors.New("Unknown WithRelease_PatchRequestBody_make_latest value: " + v) + } + return &result, nil +} +func SerializeWithRelease_PatchRequestBody_make_latest(values []WithRelease_PatchRequestBody_make_latest) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithRelease_PatchRequestBody_make_latest) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go b/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go new file mode 100644 index 0000000..a76754f --- /dev/null +++ b/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go @@ -0,0 +1,40 @@ +package releases +import ( + "errors" +) +// Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. +type ReleasesPostRequestBody_make_latest int + +const ( + TRUE_RELEASESPOSTREQUESTBODY_MAKE_LATEST ReleasesPostRequestBody_make_latest = iota + FALSE_RELEASESPOSTREQUESTBODY_MAKE_LATEST + LEGACY_RELEASESPOSTREQUESTBODY_MAKE_LATEST +) + +func (i ReleasesPostRequestBody_make_latest) String() string { + return []string{"true", "false", "legacy"}[i] +} +func ParseReleasesPostRequestBody_make_latest(v string) (any, error) { + result := TRUE_RELEASESPOSTREQUESTBODY_MAKE_LATEST + switch v { + case "true": + result = TRUE_RELEASESPOSTREQUESTBODY_MAKE_LATEST + case "false": + result = FALSE_RELEASESPOSTREQUESTBODY_MAKE_LATEST + case "legacy": + result = LEGACY_RELEASESPOSTREQUESTBODY_MAKE_LATEST + default: + return 0, errors.New("Unknown ReleasesPostRequestBody_make_latest value: " + v) + } + return &result, nil +} +func SerializeReleasesPostRequestBody_make_latest(values []ReleasesPostRequestBody_make_latest) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReleasesPostRequestBody_make_latest) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_message.go b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_message.go new file mode 100644 index 0000000..8349a79 --- /dev/null +++ b/pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_merge_commit_message int + +const ( + PR_BODY_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE RepoPatchRequestBody_merge_commit_message = iota + PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + BLANK_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE +) + +func (i RepoPatchRequestBody_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseRepoPatchRequestBody_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown RepoPatchRequestBody_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeRepoPatchRequestBody_merge_commit_message(values []RepoPatchRequestBody_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepoPatchRequestBody_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go new file mode 100644 index 0000000..95b5c34 --- /dev/null +++ b/pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_merge_commit_title int + +const ( + PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE RepoPatchRequestBody_merge_commit_title = iota + MERGE_MESSAGE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE +) + +func (i RepoPatchRequestBody_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseRepoPatchRequestBody_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown RepoPatchRequestBody_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeRepoPatchRequestBody_merge_commit_title(values []RepoPatchRequestBody_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepoPatchRequestBody_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_message.go b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_message.go new file mode 100644 index 0000000..0f0d7e9 --- /dev/null +++ b/pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_squash_merge_commit_message int + +const ( + PR_BODY_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE RepoPatchRequestBody_squash_merge_commit_message = iota + COMMIT_MESSAGES_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i RepoPatchRequestBody_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseRepoPatchRequestBody_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown RepoPatchRequestBody_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeRepoPatchRequestBody_squash_merge_commit_message(values []RepoPatchRequestBody_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepoPatchRequestBody_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go new file mode 100644 index 0000000..6108d85 --- /dev/null +++ b/pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_squash_merge_commit_title int + +const ( + PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE RepoPatchRequestBody_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i RepoPatchRequestBody_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseRepoPatchRequestBody_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown RepoPatchRequestBody_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeRepoPatchRequestBody_squash_merge_commit_title(values []RepoPatchRequestBody_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepoPatchRequestBody_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/repo_patch_request_body_visibility.go b/pkg/github/repos/item/item/repo_patch_request_body_visibility.go new file mode 100644 index 0000000..7e48ad1 --- /dev/null +++ b/pkg/github/repos/item/item/repo_patch_request_body_visibility.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The visibility of the repository. +type RepoPatchRequestBody_visibility int + +const ( + PUBLIC_REPOPATCHREQUESTBODY_VISIBILITY RepoPatchRequestBody_visibility = iota + PRIVATE_REPOPATCHREQUESTBODY_VISIBILITY + INTERNAL_REPOPATCHREQUESTBODY_VISIBILITY +) + +func (i RepoPatchRequestBody_visibility) String() string { + return []string{"public", "private", "internal"}[i] +} +func ParseRepoPatchRequestBody_visibility(v string) (any, error) { + result := PUBLIC_REPOPATCHREQUESTBODY_VISIBILITY + switch v { + case "public": + result = PUBLIC_REPOPATCHREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_REPOPATCHREQUESTBODY_VISIBILITY + case "internal": + result = INTERNAL_REPOPATCHREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown RepoPatchRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeRepoPatchRequestBody_visibility(values []RepoPatchRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepoPatchRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go b/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go new file mode 100644 index 0000000..2e18033 --- /dev/null +++ b/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +type WithRuleset_PutRequestBody_target int + +const ( + BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET WithRuleset_PutRequestBody_target = iota + TAG_WITHRULESET_PUTREQUESTBODY_TARGET + PUSH_WITHRULESET_PUTREQUESTBODY_TARGET +) + +func (i WithRuleset_PutRequestBody_target) String() string { + return []string{"branch", "tag", "push"}[i] +} +func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { + result := BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET + switch v { + case "branch": + result = BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET + case "tag": + result = TAG_WITHRULESET_PUTREQUESTBODY_TARGET + case "push": + result = PUSH_WITHRULESET_PUTREQUESTBODY_TARGET + default: + return 0, errors.New("Unknown WithRuleset_PutRequestBody_target value: " + v) + } + return &result, nil +} +func SerializeWithRuleset_PutRequestBody_target(values []WithRuleset_PutRequestBody_target) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithRuleset_PutRequestBody_target) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go b/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go new file mode 100644 index 0000000..210257c --- /dev/null +++ b/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go @@ -0,0 +1,40 @@ +package rulesets +import ( + "errors" +) +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. +type RulesetsPostRequestBody_target int + +const ( + BRANCH_RULESETSPOSTREQUESTBODY_TARGET RulesetsPostRequestBody_target = iota + TAG_RULESETSPOSTREQUESTBODY_TARGET + PUSH_RULESETSPOSTREQUESTBODY_TARGET +) + +func (i RulesetsPostRequestBody_target) String() string { + return []string{"branch", "tag", "push"}[i] +} +func ParseRulesetsPostRequestBody_target(v string) (any, error) { + result := BRANCH_RULESETSPOSTREQUESTBODY_TARGET + switch v { + case "branch": + result = BRANCH_RULESETSPOSTREQUESTBODY_TARGET + case "tag": + result = TAG_RULESETSPOSTREQUESTBODY_TARGET + case "push": + result = PUSH_RULESETSPOSTREQUESTBODY_TARGET + default: + return 0, errors.New("Unknown RulesetsPostRequestBody_target value: " + v) + } + return &result, nil +} +func SerializeRulesetsPostRequestBody_target(values []RulesetsPostRequestBody_target) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RulesetsPostRequestBody_target) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go b/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go new file mode 100644 index 0000000..91a669a --- /dev/null +++ b/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go @@ -0,0 +1,42 @@ +package rulesuites +import ( + "errors" +) +type GetRule_suite_resultQueryParameterType int + +const ( + PASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE GetRule_suite_resultQueryParameterType = iota + FAIL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + BYPASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + ALL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE +) + +func (i GetRule_suite_resultQueryParameterType) String() string { + return []string{"pass", "fail", "bypass", "all"}[i] +} +func ParseGetRule_suite_resultQueryParameterType(v string) (any, error) { + result := PASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + switch v { + case "pass": + result = PASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + case "fail": + result = FAIL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + case "bypass": + result = BYPASS_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + case "all": + result = ALL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetRule_suite_resultQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetRule_suite_resultQueryParameterType(values []GetRule_suite_resultQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetRule_suite_resultQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go b/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go new file mode 100644 index 0000000..82dfab2 --- /dev/null +++ b/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go @@ -0,0 +1,42 @@ +package rulesuites +import ( + "errors" +) +type GetTime_periodQueryParameterType int + +const ( + HOUR_GETTIME_PERIODQUERYPARAMETERTYPE GetTime_periodQueryParameterType = iota + DAY_GETTIME_PERIODQUERYPARAMETERTYPE + WEEK_GETTIME_PERIODQUERYPARAMETERTYPE + MONTH_GETTIME_PERIODQUERYPARAMETERTYPE +) + +func (i GetTime_periodQueryParameterType) String() string { + return []string{"hour", "day", "week", "month"}[i] +} +func ParseGetTime_periodQueryParameterType(v string) (any, error) { + result := HOUR_GETTIME_PERIODQUERYPARAMETERTYPE + switch v { + case "hour": + result = HOUR_GETTIME_PERIODQUERYPARAMETERTYPE + case "day": + result = DAY_GETTIME_PERIODQUERYPARAMETERTYPE + case "week": + result = WEEK_GETTIME_PERIODQUERYPARAMETERTYPE + case "month": + result = MONTH_GETTIME_PERIODQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTime_periodQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTime_periodQueryParameterType(values []GetTime_periodQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTime_periodQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go new file mode 100644 index 0000000..70606a8 --- /dev/null +++ b/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go new file mode 100644 index 0000000..bc094ed --- /dev/null +++ b/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go b/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go new file mode 100644 index 0000000..382957f --- /dev/null +++ b/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go @@ -0,0 +1,36 @@ +package alerts +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + RESOLVED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "resolved"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "resolved": + result = RESOLVED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go new file mode 100644 index 0000000..41aa158 --- /dev/null +++ b/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package securityadvisories +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go new file mode 100644 index 0000000..9382245 --- /dev/null +++ b/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package securityadvisories +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + PUBLISHED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "published"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "published": + result = PUBLISHED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go b/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go new file mode 100644 index 0000000..4f106c1 --- /dev/null +++ b/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go @@ -0,0 +1,42 @@ +package securityadvisories +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + TRIAGE_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + DRAFT_GETSTATEQUERYPARAMETERTYPE + PUBLISHED_GETSTATEQUERYPARAMETERTYPE + CLOSED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"triage", "draft", "published", "closed"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := TRIAGE_GETSTATEQUERYPARAMETERTYPE + switch v { + case "triage": + result = TRIAGE_GETSTATEQUERYPARAMETERTYPE + case "draft": + result = DRAFT_GETSTATEQUERYPARAMETERTYPE + case "published": + result = PUBLISHED_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go b/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go new file mode 100644 index 0000000..433b01d --- /dev/null +++ b/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go @@ -0,0 +1,43 @@ +package item +import ( + "errors" +) +// The state of the status. +type WithShaPostRequestBody_state int + +const ( + ERROR_WITHSHAPOSTREQUESTBODY_STATE WithShaPostRequestBody_state = iota + FAILURE_WITHSHAPOSTREQUESTBODY_STATE + PENDING_WITHSHAPOSTREQUESTBODY_STATE + SUCCESS_WITHSHAPOSTREQUESTBODY_STATE +) + +func (i WithShaPostRequestBody_state) String() string { + return []string{"error", "failure", "pending", "success"}[i] +} +func ParseWithShaPostRequestBody_state(v string) (any, error) { + result := ERROR_WITHSHAPOSTREQUESTBODY_STATE + switch v { + case "error": + result = ERROR_WITHSHAPOSTREQUESTBODY_STATE + case "failure": + result = FAILURE_WITHSHAPOSTREQUESTBODY_STATE + case "pending": + result = PENDING_WITHSHAPOSTREQUESTBODY_STATE + case "success": + result = SUCCESS_WITHSHAPOSTREQUESTBODY_STATE + default: + return 0, errors.New("Unknown WithShaPostRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeWithShaPostRequestBody_state(values []WithShaPostRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithShaPostRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go b/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go new file mode 100644 index 0000000..d69029a --- /dev/null +++ b/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go @@ -0,0 +1,36 @@ +package clones +import ( + "errors" +) +type GetPerQueryParameterType int + +const ( + DAY_GETPERQUERYPARAMETERTYPE GetPerQueryParameterType = iota + WEEK_GETPERQUERYPARAMETERTYPE +) + +func (i GetPerQueryParameterType) String() string { + return []string{"day", "week"}[i] +} +func ParseGetPerQueryParameterType(v string) (any, error) { + result := DAY_GETPERQUERYPARAMETERTYPE + switch v { + case "day": + result = DAY_GETPERQUERYPARAMETERTYPE + case "week": + result = WEEK_GETPERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetPerQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetPerQueryParameterType(values []GetPerQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetPerQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go b/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go new file mode 100644 index 0000000..4816ad8 --- /dev/null +++ b/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go @@ -0,0 +1,36 @@ +package views +import ( + "errors" +) +type GetPerQueryParameterType int + +const ( + DAY_GETPERQUERYPARAMETERTYPE GetPerQueryParameterType = iota + WEEK_GETPERQUERYPARAMETERTYPE +) + +func (i GetPerQueryParameterType) String() string { + return []string{"day", "week"}[i] +} +func ParseGetPerQueryParameterType(v string) (any, error) { + result := DAY_GETPERQUERYPARAMETERTYPE + switch v { + case "day": + result = DAY_GETPERQUERYPARAMETERTYPE + case "week": + result = WEEK_GETPERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetPerQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetPerQueryParameterType(values []GetPerQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetPerQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item_item_actions_artifacts_get_response.go b/pkg/github/repos/item_item_actions_artifacts_get_response.go new file mode 100644 index 0000000..7ef41b2 --- /dev/null +++ b/pkg/github/repos/item_item_actions_artifacts_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsArtifactsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The artifacts property + artifacts []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable + // The total_count property + total_count *int32 +} +// NewItemItemActionsArtifactsGetResponse instantiates a new ItemItemActionsArtifactsGetResponse and sets the default values. +func NewItemItemActionsArtifactsGetResponse()(*ItemItemActionsArtifactsGetResponse) { + m := &ItemItemActionsArtifactsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsArtifactsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsArtifactsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsArtifactsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsArtifactsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArtifacts gets the artifacts property value. The artifacts property +// returns a []Artifactable when successful +func (m *ItemItemActionsArtifactsGetResponse) GetArtifacts()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable) { + return m.artifacts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsArtifactsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["artifacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateArtifactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable) + } + } + m.SetArtifacts(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsArtifactsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsArtifactsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetArtifacts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetArtifacts())) + for i, v := range m.GetArtifacts() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("artifacts", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsArtifactsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArtifacts sets the artifacts property value. The artifacts property +func (m *ItemItemActionsArtifactsGetResponse) SetArtifacts(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable)() { + m.artifacts = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsArtifactsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsArtifactsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArtifacts()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable) + GetTotalCount()(*int32) + SetArtifacts(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_artifacts_item_with_archive_format_item_request_builder.go b/pkg/github/repos/item_item_actions_artifacts_item_with_archive_format_item_request_builder.go new file mode 100644 index 0000000..3942f70 --- /dev/null +++ b/pkg/github/repos/item_item_actions_artifacts_item_with_archive_format_item_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\artifacts\{artifact_id}\{archive_format} +type ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilderInternal instantiates a new ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder and sets the default values. +func NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) { + m := &ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts/{artifact_id}/{archive_format}", pathParameters), + } + return m +} +// NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder instantiates a new ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder and sets the default values. +func NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` inthe response header to find the URL for the download. The `:archive_format` must be `zip`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/artifacts#download-an-artifact +func (m *ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` inthe response header to find the URL for the download. The `:archive_format` must be `zip`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder when successful +func (m *ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) { + return NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_artifacts_request_builder.go b/pkg/github/repos/item_item_actions_artifacts_request_builder.go new file mode 100644 index 0000000..9f70ab2 --- /dev/null +++ b/pkg/github/repos/item_item_actions_artifacts_request_builder.go @@ -0,0 +1,76 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsArtifactsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\artifacts +type ItemItemActionsArtifactsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsArtifactsRequestBuilderGetQueryParameters lists all artifacts for a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsArtifactsRequestBuilderGetQueryParameters struct { + // The name field of an artifact. When specified, only artifacts with this name will be returned. + Name *string `uriparametername:"name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByArtifact_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.artifacts.item collection +// returns a *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder when successful +func (m *ItemItemActionsArtifactsRequestBuilder) ByArtifact_id(artifact_id int32)(*ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["artifact_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(artifact_id), 10) + return NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsArtifactsRequestBuilderInternal instantiates a new ItemItemActionsArtifactsRequestBuilder and sets the default values. +func NewItemItemActionsArtifactsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsArtifactsRequestBuilder) { + m := &ItemItemActionsArtifactsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts{?name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsArtifactsRequestBuilder instantiates a new ItemItemActionsArtifactsRequestBuilder and sets the default values. +func NewItemItemActionsArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsArtifactsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsArtifactsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all artifacts for a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemActionsArtifactsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/artifacts#list-artifacts-for-a-repository +func (m *ItemItemActionsArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsArtifactsRequestBuilderGetQueryParameters])(ItemItemActionsArtifactsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsArtifactsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsArtifactsGetResponseable), nil +} +// ToGetRequestInformation lists all artifacts for a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsArtifactsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsArtifactsRequestBuilder when successful +func (m *ItemItemActionsArtifactsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsArtifactsRequestBuilder) { + return NewItemItemActionsArtifactsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_artifacts_with_artifact_item_request_builder.go b/pkg/github/repos/item_item_actions_artifacts_with_artifact_item_request_builder.go new file mode 100644 index 0000000..47c4fdd --- /dev/null +++ b/pkg/github/repos/item_item_actions_artifacts_with_artifact_item_request_builder.go @@ -0,0 +1,91 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\artifacts\{artifact_id} +type ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByArchive_format gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.artifacts.item.item collection +// returns a *ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder when successful +func (m *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) ByArchive_format(archive_format string)(*ItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if archive_format != "" { + urlTplParams["archive_format"] = archive_format + } + return NewItemItemActionsArtifactsItemWithArchive_formatItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilderInternal instantiates a new ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder and sets the default values. +func NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) { + m := &ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts/{artifact_id}", pathParameters), + } + return m +} +// NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilder instantiates a new ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder and sets the default values. +func NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an artifact for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/artifacts#delete-an-artifact +func (m *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific artifact for a workflow run.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Artifactable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/artifacts#get-an-artifact +func (m *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateArtifactFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable), nil +} +// ToDeleteRequestInformation deletes an artifact for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific artifact for a workflow run.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder when successful +func (m *ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsArtifactsWithArtifact_ItemRequestBuilder) { + return NewItemItemActionsArtifactsWithArtifact_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_cache_request_builder.go b/pkg/github/repos/item_item_actions_cache_request_builder.go new file mode 100644 index 0000000..dfbae82 --- /dev/null +++ b/pkg/github/repos/item_item_actions_cache_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsCacheRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\cache +type ItemItemActionsCacheRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsCacheRequestBuilderInternal instantiates a new ItemItemActionsCacheRequestBuilder and sets the default values. +func NewItemItemActionsCacheRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCacheRequestBuilder) { + m := &ItemItemActionsCacheRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/cache", pathParameters), + } + return m +} +// NewItemItemActionsCacheRequestBuilder instantiates a new ItemItemActionsCacheRequestBuilder and sets the default values. +func NewItemItemActionsCacheRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCacheRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsCacheRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemItemActionsCacheUsageRequestBuilder when successful +func (m *ItemItemActionsCacheRequestBuilder) Usage()(*ItemItemActionsCacheUsageRequestBuilder) { + return NewItemItemActionsCacheUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_cache_usage_request_builder.go b/pkg/github/repos/item_item_actions_cache_usage_request_builder.go new file mode 100644 index 0000000..2cfc2fd --- /dev/null +++ b/pkg/github/repos/item_item_actions_cache_usage_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsCacheUsageRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\cache\usage +type ItemItemActionsCacheUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsCacheUsageRequestBuilderInternal instantiates a new ItemItemActionsCacheUsageRequestBuilder and sets the default values. +func NewItemItemActionsCacheUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCacheUsageRequestBuilder) { + m := &ItemItemActionsCacheUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/cache/usage", pathParameters), + } + return m +} +// NewItemItemActionsCacheUsageRequestBuilder instantiates a new ItemItemActionsCacheUsageRequestBuilder and sets the default values. +func NewItemItemActionsCacheUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCacheUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsCacheUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets GitHub Actions cache usage for a repository.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsCacheUsageByRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#get-github-actions-cache-usage-for-a-repository +func (m *ItemItemActionsCacheUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsCacheUsageByRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheUsageByRepositoryable), nil +} +// ToGetRequestInformation gets GitHub Actions cache usage for a repository.The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsCacheUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsCacheUsageRequestBuilder when successful +func (m *ItemItemActionsCacheUsageRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsCacheUsageRequestBuilder) { + return NewItemItemActionsCacheUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_caches_request_builder.go b/pkg/github/repos/item_item_actions_caches_request_builder.go new file mode 100644 index 0000000..f1e74b5 --- /dev/null +++ b/pkg/github/repos/item_item_actions_caches_request_builder.go @@ -0,0 +1,118 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i496bb68fcc18ee3e149c324e776371af2675eaa1506db2cbc8692b1a7d86e871 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/actions/caches" +) + +// ItemItemActionsCachesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\caches +type ItemItemActionsCachesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsCachesRequestBuilderDeleteQueryParameters deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsCachesRequestBuilderDeleteQueryParameters struct { + // A key for identifying the cache. + Key *string `uriparametername:"key"` + // The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/`. To reference a pull request use `refs/pull//merge`. + Ref *string `uriparametername:"ref"` +} +// ItemItemActionsCachesRequestBuilderGetQueryParameters lists the GitHub Actions caches for a repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsCachesRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i496bb68fcc18ee3e149c324e776371af2675eaa1506db2cbc8692b1a7d86e871.GetDirectionQueryParameterType `uriparametername:"direction"` + // An explicit key or prefix for identifying the cache + Key *string `uriparametername:"key"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/`. To reference a pull request use `refs/pull//merge`. + Ref *string `uriparametername:"ref"` + // The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. + Sort *i496bb68fcc18ee3e149c324e776371af2675eaa1506db2cbc8692b1a7d86e871.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByCache_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.caches.item collection +// returns a *ItemItemActionsCachesWithCache_ItemRequestBuilder when successful +func (m *ItemItemActionsCachesRequestBuilder) ByCache_id(cache_id int32)(*ItemItemActionsCachesWithCache_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["cache_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(cache_id), 10) + return NewItemItemActionsCachesWithCache_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsCachesRequestBuilderInternal instantiates a new ItemItemActionsCachesRequestBuilder and sets the default values. +func NewItemItemActionsCachesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCachesRequestBuilder) { + m := &ItemItemActionsCachesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches{?direction*,key*,page*,per_page*,ref*,sort*}", pathParameters), + } + return m +} +// NewItemItemActionsCachesRequestBuilder instantiates a new ItemItemActionsCachesRequestBuilder and sets the default values. +func NewItemItemActionsCachesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCachesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsCachesRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsCacheListable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key +func (m *ItemItemActionsCachesRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsCachesRequestBuilderDeleteQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheListable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsCacheListFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheListable), nil +} +// Get lists the GitHub Actions caches for a repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsCacheListable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#list-github-actions-caches-for-a-repository +func (m *ItemItemActionsCachesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsCachesRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheListable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsCacheListFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsCacheListable), nil +} +// ToDeleteRequestInformation deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsCachesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsCachesRequestBuilderDeleteQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches?key={key}{&ref*}", m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation lists the GitHub Actions caches for a repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsCachesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsCachesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsCachesRequestBuilder when successful +func (m *ItemItemActionsCachesRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsCachesRequestBuilder) { + return NewItemItemActionsCachesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_caches_with_cache_item_request_builder.go b/pkg/github/repos/item_item_actions_caches_with_cache_item_request_builder.go new file mode 100644 index 0000000..8d74cec --- /dev/null +++ b/pkg/github/repos/item_item_actions_caches_with_cache_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsCachesWithCache_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\caches\{cache_id} +type ItemItemActionsCachesWithCache_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsCachesWithCache_ItemRequestBuilderInternal instantiates a new ItemItemActionsCachesWithCache_ItemRequestBuilder and sets the default values. +func NewItemItemActionsCachesWithCache_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCachesWithCache_ItemRequestBuilder) { + m := &ItemItemActionsCachesWithCache_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches/{cache_id}", pathParameters), + } + return m +} +// NewItemItemActionsCachesWithCache_ItemRequestBuilder instantiates a new ItemItemActionsCachesWithCache_ItemRequestBuilder and sets the default values. +func NewItemItemActionsCachesWithCache_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsCachesWithCache_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsCachesWithCache_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a GitHub Actions cache for a repository, using a cache ID.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id +func (m *ItemItemActionsCachesWithCache_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes a GitHub Actions cache for a repository, using a cache ID.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsCachesWithCache_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsCachesWithCache_ItemRequestBuilder when successful +func (m *ItemItemActionsCachesWithCache_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsCachesWithCache_ItemRequestBuilder) { + return NewItemItemActionsCachesWithCache_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_jobs_item_logs_request_builder.go b/pkg/github/repos/item_item_actions_jobs_item_logs_request_builder.go new file mode 100644 index 0000000..e041c26 --- /dev/null +++ b/pkg/github/repos/item_item_actions_jobs_item_logs_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsJobsItemLogsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs\{job_id}\logs +type ItemItemActionsJobsItemLogsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsJobsItemLogsRequestBuilderInternal instantiates a new ItemItemActionsJobsItemLogsRequestBuilder and sets the default values. +func NewItemItemActionsJobsItemLogsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsItemLogsRequestBuilder) { + m := &ItemItemActionsJobsItemLogsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}/logs", pathParameters), + } + return m +} +// NewItemItemActionsJobsItemLogsRequestBuilder instantiates a new ItemItemActionsJobsItemLogsRequestBuilder and sets the default values. +func NewItemItemActionsJobsItemLogsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsItemLogsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsJobsItemLogsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Lookfor `Location:` in the response header to find the URL for the download.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run +func (m *ItemItemActionsJobsItemLogsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Lookfor `Location:` in the response header to find the URL for the download.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsJobsItemLogsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsJobsItemLogsRequestBuilder when successful +func (m *ItemItemActionsJobsItemLogsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsJobsItemLogsRequestBuilder) { + return NewItemItemActionsJobsItemLogsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_jobs_item_rerun_post_request_body.go b/pkg/github/repos/item_item_actions_jobs_item_rerun_post_request_body.go new file mode 100644 index 0000000..317ac7a --- /dev/null +++ b/pkg/github/repos/item_item_actions_jobs_item_rerun_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsJobsItemRerunPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to enable debug logging for the re-run. + enable_debug_logging *bool +} +// NewItemItemActionsJobsItemRerunPostRequestBody instantiates a new ItemItemActionsJobsItemRerunPostRequestBody and sets the default values. +func NewItemItemActionsJobsItemRerunPostRequestBody()(*ItemItemActionsJobsItemRerunPostRequestBody) { + m := &ItemItemActionsJobsItemRerunPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsJobsItemRerunPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsJobsItemRerunPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsJobsItemRerunPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsJobsItemRerunPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnableDebugLogging gets the enable_debug_logging property value. Whether to enable debug logging for the re-run. +// returns a *bool when successful +func (m *ItemItemActionsJobsItemRerunPostRequestBody) GetEnableDebugLogging()(*bool) { + return m.enable_debug_logging +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsJobsItemRerunPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enable_debug_logging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableDebugLogging(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemActionsJobsItemRerunPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enable_debug_logging", m.GetEnableDebugLogging()) + 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 *ItemItemActionsJobsItemRerunPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnableDebugLogging sets the enable_debug_logging property value. Whether to enable debug logging for the re-run. +func (m *ItemItemActionsJobsItemRerunPostRequestBody) SetEnableDebugLogging(value *bool)() { + m.enable_debug_logging = value +} +type ItemItemActionsJobsItemRerunPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableDebugLogging()(*bool) + SetEnableDebugLogging(value *bool)() +} diff --git a/pkg/github/repos/item_item_actions_jobs_item_rerun_request_builder.go b/pkg/github/repos/item_item_actions_jobs_item_rerun_request_builder.go new file mode 100644 index 0000000..3d56f3a --- /dev/null +++ b/pkg/github/repos/item_item_actions_jobs_item_rerun_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsJobsItemRerunRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs\{job_id}\rerun +type ItemItemActionsJobsItemRerunRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsJobsItemRerunRequestBuilderInternal instantiates a new ItemItemActionsJobsItemRerunRequestBuilder and sets the default values. +func NewItemItemActionsJobsItemRerunRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsItemRerunRequestBuilder) { + m := &ItemItemActionsJobsItemRerunRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}/rerun", pathParameters), + } + return m +} +// NewItemItemActionsJobsItemRerunRequestBuilder instantiates a new ItemItemActionsJobsItemRerunRequestBuilder and sets the default values. +func NewItemItemActionsJobsItemRerunRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsItemRerunRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsJobsItemRerunRequestBuilderInternal(urlParams, requestAdapter) +} +// Post re-run a job and its dependent jobs in a workflow run.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run +func (m *ItemItemActionsJobsItemRerunRequestBuilder) Post(ctx context.Context, body ItemItemActionsJobsItemRerunPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation re-run a job and its dependent jobs in a workflow run.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsJobsItemRerunRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsJobsItemRerunPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsJobsItemRerunRequestBuilder when successful +func (m *ItemItemActionsJobsItemRerunRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsJobsItemRerunRequestBuilder) { + return NewItemItemActionsJobsItemRerunRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_jobs_request_builder.go b/pkg/github/repos/item_item_actions_jobs_request_builder.go new file mode 100644 index 0000000..110e7dd --- /dev/null +++ b/pkg/github/repos/item_item_actions_jobs_request_builder.go @@ -0,0 +1,34 @@ +package repos + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsJobsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs +type ItemItemActionsJobsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByJob_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.jobs.item collection +// returns a *ItemItemActionsJobsWithJob_ItemRequestBuilder when successful +func (m *ItemItemActionsJobsRequestBuilder) ByJob_id(job_id int32)(*ItemItemActionsJobsWithJob_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["job_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(job_id), 10) + return NewItemItemActionsJobsWithJob_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsJobsRequestBuilderInternal instantiates a new ItemItemActionsJobsRequestBuilder and sets the default values. +func NewItemItemActionsJobsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsRequestBuilder) { + m := &ItemItemActionsJobsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs", pathParameters), + } + return m +} +// NewItemItemActionsJobsRequestBuilder instantiates a new ItemItemActionsJobsRequestBuilder and sets the default values. +func NewItemItemActionsJobsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsJobsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_jobs_with_job_item_request_builder.go b/pkg/github/repos/item_item_actions_jobs_with_job_item_request_builder.go new file mode 100644 index 0000000..186507b --- /dev/null +++ b/pkg/github/repos/item_item_actions_jobs_with_job_item_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsJobsWithJob_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs\{job_id} +type ItemItemActionsJobsWithJob_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsJobsWithJob_ItemRequestBuilderInternal instantiates a new ItemItemActionsJobsWithJob_ItemRequestBuilder and sets the default values. +func NewItemItemActionsJobsWithJob_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsWithJob_ItemRequestBuilder) { + m := &ItemItemActionsJobsWithJob_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}", pathParameters), + } + return m +} +// NewItemItemActionsJobsWithJob_ItemRequestBuilder instantiates a new ItemItemActionsJobsWithJob_ItemRequestBuilder and sets the default values. +func NewItemItemActionsJobsWithJob_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsJobsWithJob_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsJobsWithJob_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a specific job in a workflow run.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Jobable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-jobs#get-a-job-for-a-workflow-run +func (m *ItemItemActionsJobsWithJob_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateJobFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable), nil +} +// Logs the logs property +// returns a *ItemItemActionsJobsItemLogsRequestBuilder when successful +func (m *ItemItemActionsJobsWithJob_ItemRequestBuilder) Logs()(*ItemItemActionsJobsItemLogsRequestBuilder) { + return NewItemItemActionsJobsItemLogsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rerun the rerun property +// returns a *ItemItemActionsJobsItemRerunRequestBuilder when successful +func (m *ItemItemActionsJobsWithJob_ItemRequestBuilder) Rerun()(*ItemItemActionsJobsItemRerunRequestBuilder) { + return NewItemItemActionsJobsItemRerunRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets a specific job in a workflow run.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsJobsWithJob_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsJobsWithJob_ItemRequestBuilder when successful +func (m *ItemItemActionsJobsWithJob_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsJobsWithJob_ItemRequestBuilder) { + return NewItemItemActionsJobsWithJob_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_oidc_customization_request_builder.go b/pkg/github/repos/item_item_actions_oidc_customization_request_builder.go new file mode 100644 index 0000000..add4b86 --- /dev/null +++ b/pkg/github/repos/item_item_actions_oidc_customization_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsOidcCustomizationRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\oidc\customization +type ItemItemActionsOidcCustomizationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsOidcCustomizationRequestBuilderInternal instantiates a new ItemItemActionsOidcCustomizationRequestBuilder and sets the default values. +func NewItemItemActionsOidcCustomizationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOidcCustomizationRequestBuilder) { + m := &ItemItemActionsOidcCustomizationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc/customization", pathParameters), + } + return m +} +// NewItemItemActionsOidcCustomizationRequestBuilder instantiates a new ItemItemActionsOidcCustomizationRequestBuilder and sets the default values. +func NewItemItemActionsOidcCustomizationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOidcCustomizationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsOidcCustomizationRequestBuilderInternal(urlParams, requestAdapter) +} +// Sub the sub property +// returns a *ItemItemActionsOidcCustomizationSubRequestBuilder when successful +func (m *ItemItemActionsOidcCustomizationRequestBuilder) Sub()(*ItemItemActionsOidcCustomizationSubRequestBuilder) { + return NewItemItemActionsOidcCustomizationSubRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_oidc_customization_sub_put_request_body.go b/pkg/github/repos/item_item_actions_oidc_customization_sub_put_request_body.go new file mode 100644 index 0000000..bc19ea6 --- /dev/null +++ b/pkg/github/repos/item_item_actions_oidc_customization_sub_put_request_body.go @@ -0,0 +1,116 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemActionsOidcCustomizationSubPutRequestBody actions OIDC subject customization for a repository +type ItemItemActionsOidcCustomizationSubPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. + include_claim_keys []string + // Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. + use_default *bool +} +// NewItemItemActionsOidcCustomizationSubPutRequestBody instantiates a new ItemItemActionsOidcCustomizationSubPutRequestBody and sets the default values. +func NewItemItemActionsOidcCustomizationSubPutRequestBody()(*ItemItemActionsOidcCustomizationSubPutRequestBody) { + m := &ItemItemActionsOidcCustomizationSubPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsOidcCustomizationSubPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsOidcCustomizationSubPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsOidcCustomizationSubPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["include_claim_keys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetIncludeClaimKeys(res) + } + return nil + } + res["use_default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseDefault(val) + } + return nil + } + return res +} +// GetIncludeClaimKeys gets the include_claim_keys property value. Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +// returns a []string when successful +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) GetIncludeClaimKeys()([]string) { + return m.include_claim_keys +} +// GetUseDefault gets the use_default property value. Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. +// returns a *bool when successful +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) GetUseDefault()(*bool) { + return m.use_default +} +// Serialize serializes information the current object +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIncludeClaimKeys() != nil { + err := writer.WriteCollectionOfStringValues("include_claim_keys", m.GetIncludeClaimKeys()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_default", m.GetUseDefault()) + 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 *ItemItemActionsOidcCustomizationSubPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncludeClaimKeys sets the include_claim_keys property value. Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) SetIncludeClaimKeys(value []string)() { + m.include_claim_keys = value +} +// SetUseDefault sets the use_default property value. Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. +func (m *ItemItemActionsOidcCustomizationSubPutRequestBody) SetUseDefault(value *bool)() { + m.use_default = value +} +type ItemItemActionsOidcCustomizationSubPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeClaimKeys()([]string) + GetUseDefault()(*bool) + SetIncludeClaimKeys(value []string)() + SetUseDefault(value *bool)() +} diff --git a/pkg/github/repos/item_item_actions_oidc_customization_sub_request_builder.go b/pkg/github/repos/item_item_actions_oidc_customization_sub_request_builder.go new file mode 100644 index 0000000..2f347f9 --- /dev/null +++ b/pkg/github/repos/item_item_actions_oidc_customization_sub_request_builder.go @@ -0,0 +1,102 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsOidcCustomizationSubRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\oidc\customization\sub +type ItemItemActionsOidcCustomizationSubRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsOidcCustomizationSubRequestBuilderInternal instantiates a new ItemItemActionsOidcCustomizationSubRequestBuilder and sets the default values. +func NewItemItemActionsOidcCustomizationSubRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOidcCustomizationSubRequestBuilder) { + m := &ItemItemActionsOidcCustomizationSubRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc/customization/sub", pathParameters), + } + return m +} +// NewItemItemActionsOidcCustomizationSubRequestBuilder instantiates a new ItemItemActionsOidcCustomizationSubRequestBuilder and sets the default values. +func NewItemItemActionsOidcCustomizationSubRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOidcCustomizationSubRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsOidcCustomizationSubRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the customization template for an OpenID Connect (OIDC) subject claim.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a OidcCustomSubRepoable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository +func (m *ItemItemActionsOidcCustomizationSubRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OidcCustomSubRepoable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOidcCustomSubRepoFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OidcCustomSubRepoable), nil +} +// Put sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository +func (m *ItemItemActionsOidcCustomizationSubRequestBuilder) Put(ctx context.Context, body ItemItemActionsOidcCustomizationSubPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToGetRequestInformation gets the customization template for an OpenID Connect (OIDC) subject claim.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsOidcCustomizationSubRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsOidcCustomizationSubRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemActionsOidcCustomizationSubPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsOidcCustomizationSubRequestBuilder when successful +func (m *ItemItemActionsOidcCustomizationSubRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsOidcCustomizationSubRequestBuilder) { + return NewItemItemActionsOidcCustomizationSubRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_oidc_request_builder.go b/pkg/github/repos/item_item_actions_oidc_request_builder.go new file mode 100644 index 0000000..c98d18a --- /dev/null +++ b/pkg/github/repos/item_item_actions_oidc_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsOidcRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\oidc +type ItemItemActionsOidcRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsOidcRequestBuilderInternal instantiates a new ItemItemActionsOidcRequestBuilder and sets the default values. +func NewItemItemActionsOidcRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOidcRequestBuilder) { + m := &ItemItemActionsOidcRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc", pathParameters), + } + return m +} +// NewItemItemActionsOidcRequestBuilder instantiates a new ItemItemActionsOidcRequestBuilder and sets the default values. +func NewItemItemActionsOidcRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOidcRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsOidcRequestBuilderInternal(urlParams, requestAdapter) +} +// Customization the customization property +// returns a *ItemItemActionsOidcCustomizationRequestBuilder when successful +func (m *ItemItemActionsOidcRequestBuilder) Customization()(*ItemItemActionsOidcCustomizationRequestBuilder) { + return NewItemItemActionsOidcCustomizationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_organization_secrets_get_response.go b/pkg/github/repos/item_item_actions_organization_secrets_get_response.go new file mode 100644 index 0000000..c845437 --- /dev/null +++ b/pkg/github/repos/item_item_actions_organization_secrets_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsOrganizationSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable + // The total_count property + total_count *int32 +} +// NewItemItemActionsOrganizationSecretsGetResponse instantiates a new ItemItemActionsOrganizationSecretsGetResponse and sets the default values. +func NewItemItemActionsOrganizationSecretsGetResponse()(*ItemItemActionsOrganizationSecretsGetResponse) { + m := &ItemItemActionsOrganizationSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsOrganizationSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsOrganizationSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsOrganizationSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsOrganizationSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsOrganizationSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []ActionsSecretable when successful +func (m *ItemItemActionsOrganizationSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsOrganizationSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsOrganizationSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsOrganizationSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemItemActionsOrganizationSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsOrganizationSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsOrganizationSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_organization_secrets_request_builder.go b/pkg/github/repos/item_item_actions_organization_secrets_request_builder.go new file mode 100644 index 0000000..79317d0 --- /dev/null +++ b/pkg/github/repos/item_item_actions_organization_secrets_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsOrganizationSecretsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\organization-secrets +type ItemItemActionsOrganizationSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsOrganizationSecretsRequestBuilderGetQueryParameters lists all organization secrets shared with a repository without revealing their encryptedvalues.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsOrganizationSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemActionsOrganizationSecretsRequestBuilderInternal instantiates a new ItemItemActionsOrganizationSecretsRequestBuilder and sets the default values. +func NewItemItemActionsOrganizationSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOrganizationSecretsRequestBuilder) { + m := &ItemItemActionsOrganizationSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/organization-secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsOrganizationSecretsRequestBuilder instantiates a new ItemItemActionsOrganizationSecretsRequestBuilder and sets the default values. +func NewItemItemActionsOrganizationSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOrganizationSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsOrganizationSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all organization secrets shared with a repository without revealing their encryptedvalues.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsOrganizationSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-repository-organization-secrets +func (m *ItemItemActionsOrganizationSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsOrganizationSecretsRequestBuilderGetQueryParameters])(ItemItemActionsOrganizationSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsOrganizationSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsOrganizationSecretsGetResponseable), nil +} +// ToGetRequestInformation lists all organization secrets shared with a repository without revealing their encryptedvalues.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsOrganizationSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsOrganizationSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsOrganizationSecretsRequestBuilder when successful +func (m *ItemItemActionsOrganizationSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsOrganizationSecretsRequestBuilder) { + return NewItemItemActionsOrganizationSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_organization_variables_get_response.go b/pkg/github/repos/item_item_actions_organization_variables_get_response.go new file mode 100644 index 0000000..528b710 --- /dev/null +++ b/pkg/github/repos/item_item_actions_organization_variables_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsOrganizationVariablesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The variables property + variables []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable +} +// NewItemItemActionsOrganizationVariablesGetResponse instantiates a new ItemItemActionsOrganizationVariablesGetResponse and sets the default values. +func NewItemItemActionsOrganizationVariablesGetResponse()(*ItemItemActionsOrganizationVariablesGetResponse) { + m := &ItemItemActionsOrganizationVariablesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsOrganizationVariablesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsOrganizationVariablesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsOrganizationVariablesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsOrganizationVariablesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsOrganizationVariablesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["variables"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsVariableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) + } + } + m.SetVariables(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsOrganizationVariablesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetVariables gets the variables property value. The variables property +// returns a []ActionsVariableable when successful +func (m *ItemItemActionsOrganizationVariablesGetResponse) GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) { + return m.variables +} +// Serialize serializes information the current object +func (m *ItemItemActionsOrganizationVariablesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetVariables() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVariables())) + for i, v := range m.GetVariables() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("variables", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemActionsOrganizationVariablesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsOrganizationVariablesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetVariables sets the variables property value. The variables property +func (m *ItemItemActionsOrganizationVariablesGetResponse) SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable)() { + m.variables = value +} +type ItemItemActionsOrganizationVariablesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) + SetTotalCount(value *int32)() + SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable)() +} diff --git a/pkg/github/repos/item_item_actions_organization_variables_request_builder.go b/pkg/github/repos/item_item_actions_organization_variables_request_builder.go new file mode 100644 index 0000000..26f094a --- /dev/null +++ b/pkg/github/repos/item_item_actions_organization_variables_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsOrganizationVariablesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\organization-variables +type ItemItemActionsOrganizationVariablesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsOrganizationVariablesRequestBuilderGetQueryParameters lists all organization variables shared with a repository.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsOrganizationVariablesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemActionsOrganizationVariablesRequestBuilderInternal instantiates a new ItemItemActionsOrganizationVariablesRequestBuilder and sets the default values. +func NewItemItemActionsOrganizationVariablesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOrganizationVariablesRequestBuilder) { + m := &ItemItemActionsOrganizationVariablesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/organization-variables{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsOrganizationVariablesRequestBuilder instantiates a new ItemItemActionsOrganizationVariablesRequestBuilder and sets the default values. +func NewItemItemActionsOrganizationVariablesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsOrganizationVariablesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsOrganizationVariablesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all organization variables shared with a repository.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsOrganizationVariablesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#list-repository-organization-variables +func (m *ItemItemActionsOrganizationVariablesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsOrganizationVariablesRequestBuilderGetQueryParameters])(ItemItemActionsOrganizationVariablesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsOrganizationVariablesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsOrganizationVariablesGetResponseable), nil +} +// ToGetRequestInformation lists all organization variables shared with a repository.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsOrganizationVariablesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsOrganizationVariablesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsOrganizationVariablesRequestBuilder when successful +func (m *ItemItemActionsOrganizationVariablesRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsOrganizationVariablesRequestBuilder) { + return NewItemItemActionsOrganizationVariablesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_permissions_access_request_builder.go b/pkg/github/repos/item_item_actions_permissions_access_request_builder.go new file mode 100644 index 0000000..853396d --- /dev/null +++ b/pkg/github/repos/item_item_actions_permissions_access_request_builder.go @@ -0,0 +1,83 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsPermissionsAccessRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\access +type ItemItemActionsPermissionsAccessRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsPermissionsAccessRequestBuilderInternal instantiates a new ItemItemActionsPermissionsAccessRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsAccessRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsAccessRequestBuilder) { + m := &ItemItemActionsPermissionsAccessRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/access", pathParameters), + } + return m +} +// NewItemItemActionsPermissionsAccessRequestBuilder instantiates a new ItemItemActionsPermissionsAccessRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsAccessRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsAccessRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsPermissionsAccessRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.This endpoint only applies to internal and private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)" and"[Allowing access to components in an internal repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsWorkflowAccessToRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-the-level-of-access-for-workflows-outside-of-the-repository +func (m *ItemItemActionsPermissionsAccessRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsWorkflowAccessToRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsWorkflowAccessToRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsWorkflowAccessToRepositoryable), nil +} +// Put sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.This endpoint only applies to internal and private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)" and"[Allowing access to components in an internal repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-the-level-of-access-for-workflows-outside-of-the-repository +func (m *ItemItemActionsPermissionsAccessRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsWorkflowAccessToRepositoryable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.This endpoint only applies to internal and private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)" and"[Allowing access to components in an internal repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsAccessRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.This endpoint only applies to internal and private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)" and"[Allowing access to components in an internal repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsAccessRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsWorkflowAccessToRepositoryable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsPermissionsAccessRequestBuilder when successful +func (m *ItemItemActionsPermissionsAccessRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsPermissionsAccessRequestBuilder) { + return NewItemItemActionsPermissionsAccessRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_permissions_put_request_body.go b/pkg/github/repos/item_item_actions_permissions_put_request_body.go new file mode 100644 index 0000000..c9e2a40 --- /dev/null +++ b/pkg/github/repos/item_item_actions_permissions_put_request_body.go @@ -0,0 +1,111 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsPermissionsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permissions policy that controls the actions and reusable workflows that are allowed to run. + allowed_actions *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions + // Whether GitHub Actions is enabled on the repository. + enabled *bool +} +// NewItemItemActionsPermissionsPutRequestBody instantiates a new ItemItemActionsPermissionsPutRequestBody and sets the default values. +func NewItemItemActionsPermissionsPutRequestBody()(*ItemItemActionsPermissionsPutRequestBody) { + m := &ItemItemActionsPermissionsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsPermissionsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsPermissionsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsPermissionsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsPermissionsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedActions gets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +// returns a *AllowedActions when successful +func (m *ItemItemActionsPermissionsPutRequestBody) GetAllowedActions()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions) { + return m.allowed_actions +} +// GetEnabled gets the enabled property value. Whether GitHub Actions is enabled on the repository. +// returns a *bool when successful +func (m *ItemItemActionsPermissionsPutRequestBody) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsPermissionsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseAllowedActions) + if err != nil { + return err + } + if val != nil { + m.SetAllowedActions(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemActionsPermissionsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedActions() != nil { + cast := (*m.GetAllowedActions()).String() + err := writer.WriteStringValue("allowed_actions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *ItemItemActionsPermissionsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedActions sets the allowed_actions property value. The permissions policy that controls the actions and reusable workflows that are allowed to run. +func (m *ItemItemActionsPermissionsPutRequestBody) SetAllowedActions(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)() { + m.allowed_actions = value +} +// SetEnabled sets the enabled property value. Whether GitHub Actions is enabled on the repository. +func (m *ItemItemActionsPermissionsPutRequestBody) SetEnabled(value *bool)() { + m.enabled = value +} +type ItemItemActionsPermissionsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedActions()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions) + GetEnabled()(*bool) + SetAllowedActions(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AllowedActions)() + SetEnabled(value *bool)() +} diff --git a/pkg/github/repos/item_item_actions_permissions_request_builder.go b/pkg/github/repos/item_item_actions_permissions_request_builder.go new file mode 100644 index 0000000..9436a55 --- /dev/null +++ b/pkg/github/repos/item_item_actions_permissions_request_builder.go @@ -0,0 +1,98 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsPermissionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions +type ItemItemActionsPermissionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Access the access property +// returns a *ItemItemActionsPermissionsAccessRequestBuilder when successful +func (m *ItemItemActionsPermissionsRequestBuilder) Access()(*ItemItemActionsPermissionsAccessRequestBuilder) { + return NewItemItemActionsPermissionsAccessRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsPermissionsRequestBuilderInternal instantiates a new ItemItemActionsPermissionsRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsRequestBuilder) { + m := &ItemItemActionsPermissionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions", pathParameters), + } + return m +} +// NewItemItemActionsPermissionsRequestBuilder instantiates a new ItemItemActionsPermissionsRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsPermissionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsRepositoryPermissionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-github-actions-permissions-for-a-repository +func (m *ItemItemActionsPermissionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsRepositoryPermissionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsRepositoryPermissionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsRepositoryPermissionsable), nil +} +// Put sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-github-actions-permissions-for-a-repository +func (m *ItemItemActionsPermissionsRequestBuilder) Put(ctx context.Context, body ItemItemActionsPermissionsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// SelectedActions the selectedActions property +// returns a *ItemItemActionsPermissionsSelectedActionsRequestBuilder when successful +func (m *ItemItemActionsPermissionsRequestBuilder) SelectedActions()(*ItemItemActionsPermissionsSelectedActionsRequestBuilder) { + return NewItemItemActionsPermissionsSelectedActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemActionsPermissionsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsPermissionsRequestBuilder when successful +func (m *ItemItemActionsPermissionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsPermissionsRequestBuilder) { + return NewItemItemActionsPermissionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} +// Workflow the workflow property +// returns a *ItemItemActionsPermissionsWorkflowRequestBuilder when successful +func (m *ItemItemActionsPermissionsRequestBuilder) Workflow()(*ItemItemActionsPermissionsWorkflowRequestBuilder) { + return NewItemItemActionsPermissionsWorkflowRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_permissions_selected_actions_request_builder.go b/pkg/github/repos/item_item_actions_permissions_selected_actions_request_builder.go new file mode 100644 index 0000000..6cbc486 --- /dev/null +++ b/pkg/github/repos/item_item_actions_permissions_selected_actions_request_builder.go @@ -0,0 +1,83 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsPermissionsSelectedActionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\selected-actions +type ItemItemActionsPermissionsSelectedActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsPermissionsSelectedActionsRequestBuilderInternal instantiates a new ItemItemActionsPermissionsSelectedActionsRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsSelectedActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsSelectedActionsRequestBuilder) { + m := &ItemItemActionsPermissionsSelectedActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/selected-actions", pathParameters), + } + return m +} +// NewItemItemActionsPermissionsSelectedActionsRequestBuilder instantiates a new ItemItemActionsPermissionsSelectedActionsRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsSelectedActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsSelectedActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsPermissionsSelectedActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a SelectedActionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-a-repository +func (m *ItemItemActionsPermissionsSelectedActionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSelectedActionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable), nil +} +// Put sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings and reusable workflows settings.To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-a-repository +func (m *ItemItemActionsPermissionsSelectedActionsRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsSelectedActionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."If the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings and reusable workflows settings.To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsSelectedActionsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SelectedActionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsPermissionsSelectedActionsRequestBuilder when successful +func (m *ItemItemActionsPermissionsSelectedActionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsPermissionsSelectedActionsRequestBuilder) { + return NewItemItemActionsPermissionsSelectedActionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_permissions_workflow_request_builder.go b/pkg/github/repos/item_item_actions_permissions_workflow_request_builder.go new file mode 100644 index 0000000..9341dc9 --- /dev/null +++ b/pkg/github/repos/item_item_actions_permissions_workflow_request_builder.go @@ -0,0 +1,83 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsPermissionsWorkflowRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\workflow +type ItemItemActionsPermissionsWorkflowRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsPermissionsWorkflowRequestBuilderInternal instantiates a new ItemItemActionsPermissionsWorkflowRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsWorkflowRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsWorkflowRequestBuilder) { + m := &ItemItemActionsPermissionsWorkflowRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/workflow", pathParameters), + } + return m +} +// NewItemItemActionsPermissionsWorkflowRequestBuilder instantiates a new ItemItemActionsPermissionsWorkflowRequestBuilder and sets the default values. +func NewItemItemActionsPermissionsWorkflowRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsPermissionsWorkflowRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsPermissionsWorkflowRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository,as well as if GitHub Actions can submit approving pull request reviews.For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsGetDefaultWorkflowPermissionsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-default-workflow-permissions-for-a-repository +func (m *ItemItemActionsPermissionsWorkflowRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsGetDefaultWorkflowPermissionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsGetDefaultWorkflowPermissionsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsGetDefaultWorkflowPermissionsable), nil +} +// Put sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actionscan submit approving pull request reviews.For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-default-workflow-permissions-for-a-repository +func (m *ItemItemActionsPermissionsWorkflowRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSetDefaultWorkflowPermissionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository,as well as if GitHub Actions can submit approving pull request reviews.For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsWorkflowRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actionscan submit approving pull request reviews.For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsPermissionsWorkflowRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSetDefaultWorkflowPermissionsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsPermissionsWorkflowRequestBuilder when successful +func (m *ItemItemActionsPermissionsWorkflowRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsPermissionsWorkflowRequestBuilder) { + return NewItemItemActionsPermissionsWorkflowRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_request_builder.go b/pkg/github/repos/item_item_actions_request_builder.go new file mode 100644 index 0000000..4c44cdd --- /dev/null +++ b/pkg/github/repos/item_item_actions_request_builder.go @@ -0,0 +1,88 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions +type ItemItemActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Artifacts the artifacts property +// returns a *ItemItemActionsArtifactsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Artifacts()(*ItemItemActionsArtifactsRequestBuilder) { + return NewItemItemActionsArtifactsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Cache the cache property +// returns a *ItemItemActionsCacheRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Cache()(*ItemItemActionsCacheRequestBuilder) { + return NewItemItemActionsCacheRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Caches the caches property +// returns a *ItemItemActionsCachesRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Caches()(*ItemItemActionsCachesRequestBuilder) { + return NewItemItemActionsCachesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsRequestBuilderInternal instantiates a new ItemItemActionsRequestBuilder and sets the default values. +func NewItemItemActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRequestBuilder) { + m := &ItemItemActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions", pathParameters), + } + return m +} +// NewItemItemActionsRequestBuilder instantiates a new ItemItemActionsRequestBuilder and sets the default values. +func NewItemItemActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Jobs the jobs property +// returns a *ItemItemActionsJobsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Jobs()(*ItemItemActionsJobsRequestBuilder) { + return NewItemItemActionsJobsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Oidc the oidc property +// returns a *ItemItemActionsOidcRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Oidc()(*ItemItemActionsOidcRequestBuilder) { + return NewItemItemActionsOidcRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// OrganizationSecrets the organizationSecrets property +// returns a *ItemItemActionsOrganizationSecretsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) OrganizationSecrets()(*ItemItemActionsOrganizationSecretsRequestBuilder) { + return NewItemItemActionsOrganizationSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// OrganizationVariables the organizationVariables property +// returns a *ItemItemActionsOrganizationVariablesRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) OrganizationVariables()(*ItemItemActionsOrganizationVariablesRequestBuilder) { + return NewItemItemActionsOrganizationVariablesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Permissions the permissions property +// returns a *ItemItemActionsPermissionsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Permissions()(*ItemItemActionsPermissionsRequestBuilder) { + return NewItemItemActionsPermissionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Runners the runners property +// returns a *ItemItemActionsRunnersRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Runners()(*ItemItemActionsRunnersRequestBuilder) { + return NewItemItemActionsRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Runs the runs property +// returns a *ItemItemActionsRunsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Runs()(*ItemItemActionsRunsRequestBuilder) { + return NewItemItemActionsRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Secrets the secrets property +// returns a *ItemItemActionsSecretsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Secrets()(*ItemItemActionsSecretsRequestBuilder) { + return NewItemItemActionsSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Variables the variables property +// returns a *ItemItemActionsVariablesRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Variables()(*ItemItemActionsVariablesRequestBuilder) { + return NewItemItemActionsVariablesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Workflows the workflows property +// returns a *ItemItemActionsWorkflowsRequestBuilder when successful +func (m *ItemItemActionsRequestBuilder) Workflows()(*ItemItemActionsWorkflowsRequestBuilder) { + return NewItemItemActionsWorkflowsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_runners_downloads_request_builder.go b/pkg/github/repos/item_item_actions_runners_downloads_request_builder.go new file mode 100644 index 0000000..60fb760 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_downloads_request_builder.go @@ -0,0 +1,60 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersDownloadsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\downloads +type ItemItemActionsRunnersDownloadsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunnersDownloadsRequestBuilderInternal instantiates a new ItemItemActionsRunnersDownloadsRequestBuilder and sets the default values. +func NewItemItemActionsRunnersDownloadsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersDownloadsRequestBuilder) { + m := &ItemItemActionsRunnersDownloadsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/downloads", pathParameters), + } + return m +} +// NewItemItemActionsRunnersDownloadsRequestBuilder instantiates a new ItemItemActionsRunnersDownloadsRequestBuilder and sets the default values. +func NewItemItemActionsRunnersDownloadsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersDownloadsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersDownloadsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists binaries for the runner application that you can download and run.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a []RunnerApplicationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-runner-applications-for-a-repository +func (m *ItemItemActionsRunnersDownloadsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerApplicationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerApplicationable) + } + } + return val, nil +} +// ToGetRequestInformation lists binaries for the runner application that you can download and run.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersDownloadsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersDownloadsRequestBuilder when successful +func (m *ItemItemActionsRunnersDownloadsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersDownloadsRequestBuilder) { + return NewItemItemActionsRunnersDownloadsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_generate_jitconfig_post_request_body.go b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_post_request_body.go new file mode 100644 index 0000000..bad5059 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_post_request_body.go @@ -0,0 +1,175 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsRunnersGenerateJitconfigPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. + labels []string + // The name of the new runner. + name *string + // The ID of the runner group to register the runner to. + runner_group_id *int32 + // The working directory to be used for job execution, relative to the runner install directory. + work_folder *string +} +// NewItemItemActionsRunnersGenerateJitconfigPostRequestBody instantiates a new ItemItemActionsRunnersGenerateJitconfigPostRequestBody and sets the default values. +func NewItemItemActionsRunnersGenerateJitconfigPostRequestBody()(*ItemItemActionsRunnersGenerateJitconfigPostRequestBody) { + m := &ItemItemActionsRunnersGenerateJitconfigPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + work_folderValue := "_work" + m.SetWorkFolder(&work_folderValue) + return m +} +// CreateItemItemActionsRunnersGenerateJitconfigPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersGenerateJitconfigPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersGenerateJitconfigPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + res["work_folder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkFolder(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +// returns a []string when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) GetLabels()([]string) { + return m.labels +} +// GetName gets the name property value. The name of the new runner. +// returns a *string when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) GetName()(*string) { + return m.name +} +// GetRunnerGroupId gets the runner_group_id property value. The ID of the runner group to register the runner to. +// returns a *int32 when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetWorkFolder gets the work_folder property value. The working directory to be used for job execution, relative to the runner install directory. +// returns a *string when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) GetWorkFolder()(*string) { + return m.work_folder +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("work_folder", m.GetWorkFolder()) + 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 *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +// SetName sets the name property value. The name of the new runner. +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRunnerGroupId sets the runner_group_id property value. The ID of the runner group to register the runner to. +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetWorkFolder sets the work_folder property value. The working directory to be used for job execution, relative to the runner install directory. +func (m *ItemItemActionsRunnersGenerateJitconfigPostRequestBody) SetWorkFolder(value *string)() { + m.work_folder = value +} +type ItemItemActionsRunnersGenerateJitconfigPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + GetName()(*string) + GetRunnerGroupId()(*int32) + GetWorkFolder()(*string) + SetLabels(value []string)() + SetName(value *string)() + SetRunnerGroupId(value *int32)() + SetWorkFolder(value *string)() +} diff --git a/pkg/github/repos/item_item_actions_runners_generate_jitconfig_post_response.go b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_post_response.go new file mode 100644 index 0000000..89c6c68 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_post_response.go @@ -0,0 +1,110 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersGenerateJitconfigPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The base64 encoded runner configuration. + encoded_jit_config *string + // A self hosted runner + runner i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable +} +// NewItemItemActionsRunnersGenerateJitconfigPostResponse instantiates a new ItemItemActionsRunnersGenerateJitconfigPostResponse and sets the default values. +func NewItemItemActionsRunnersGenerateJitconfigPostResponse()(*ItemItemActionsRunnersGenerateJitconfigPostResponse) { + m := &ItemItemActionsRunnersGenerateJitconfigPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersGenerateJitconfigPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncodedJitConfig gets the encoded_jit_config property value. The base64 encoded runner configuration. +// returns a *string when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) GetEncodedJitConfig()(*string) { + return m.encoded_jit_config +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encoded_jit_config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncodedJitConfig(val) + } + return nil + } + res["runner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunner(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)) + } + return nil + } + return res +} +// GetRunner gets the runner property value. A self hosted runner +// returns a Runnerable when successful +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) GetRunner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runner +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encoded_jit_config", m.GetEncodedJitConfig()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("runner", m.GetRunner()) + 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 *ItemItemActionsRunnersGenerateJitconfigPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncodedJitConfig sets the encoded_jit_config property value. The base64 encoded runner configuration. +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) SetEncodedJitConfig(value *string)() { + m.encoded_jit_config = value +} +// SetRunner sets the runner property value. A self hosted runner +func (m *ItemItemActionsRunnersGenerateJitconfigPostResponse) SetRunner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runner = value +} +type ItemItemActionsRunnersGenerateJitconfigPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncodedJitConfig()(*string) + GetRunner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + SetEncodedJitConfig(value *string)() + SetRunner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() +} diff --git a/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go new file mode 100644 index 0000000..5a44d87 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersGenerateJitconfigRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\generate-jitconfig +type ItemItemActionsRunnersGenerateJitconfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunnersGenerateJitconfigRequestBuilderInternal instantiates a new ItemItemActionsRunnersGenerateJitconfigRequestBuilder and sets the default values. +func NewItemItemActionsRunnersGenerateJitconfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersGenerateJitconfigRequestBuilder) { + m := &ItemItemActionsRunnersGenerateJitconfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/generate-jitconfig", pathParameters), + } + return m +} +// NewItemItemActionsRunnersGenerateJitconfigRequestBuilder instantiates a new ItemItemActionsRunnersGenerateJitconfigRequestBuilder and sets the default values. +func NewItemItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersGenerateJitconfigRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersGenerateJitconfigRequestBuilderInternal(urlParams, requestAdapter) +} +// Post generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the repository.OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersGenerateJitconfigPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-a-repository +func (m *ItemItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context.Context, body ItemItemActionsRunnersGenerateJitconfigPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemActionsRunnersGenerateJitconfigPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersGenerateJitconfigPostResponseable), nil +} +// ToPostRequestInformation generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the repository.OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersGenerateJitconfigRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsRunnersGenerateJitconfigPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersGenerateJitconfigRequestBuilder when successful +func (m *ItemItemActionsRunnersGenerateJitconfigRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersGenerateJitconfigRequestBuilder) { + return NewItemItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_get_response.go b/pkg/github/repos/item_item_actions_runners_get_response.go new file mode 100644 index 0000000..44ce49d --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The runners property + runners []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunnersGetResponse instantiates a new ItemItemActionsRunnersGetResponse and sets the default values. +func NewItemItemActionsRunnersGetResponse()(*ItemItemActionsRunnersGetResponse) { + m := &ItemItemActionsRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []Runnerable when successful +func (m *ItemItemActionsRunnersGetResponse) GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunnersGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemItemActionsRunnersGetResponse) SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunnersGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable) + GetTotalCount()(*int32) + SetRunners(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_delete_response.go b/pkg/github/repos/item_item_actions_runners_item_labels_delete_response.go new file mode 100644 index 0000000..0da4f09 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_delete_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersItemLabelsDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunnersItemLabelsDeleteResponse instantiates a new ItemItemActionsRunnersItemLabelsDeleteResponse and sets the default values. +func NewItemItemActionsRunnersItemLabelsDeleteResponse()(*ItemItemActionsRunnersItemLabelsDeleteResponse) { + m := &ItemItemActionsRunnersItemLabelsDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunnersItemLabelsDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunnersItemLabelsDeleteResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunnersItemLabelsDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_get_response.go b/pkg/github/repos/item_item_actions_runners_item_labels_get_response.go new file mode 100644 index 0000000..78befe0 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersItemLabelsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunnersItemLabelsGetResponse instantiates a new ItemItemActionsRunnersItemLabelsGetResponse and sets the default values. +func NewItemItemActionsRunnersItemLabelsGetResponse()(*ItemItemActionsRunnersItemLabelsGetResponse) { + m := &ItemItemActionsRunnersItemLabelsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemItemActionsRunnersItemLabelsGetResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunnersItemLabelsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunnersItemLabelsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemActionsRunnersItemLabelsGetResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunnersItemLabelsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunnersItemLabelsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_item_with_name_delete_response.go b/pkg/github/repos/item_item_actions_runners_item_labels_item_with_name_delete_response.go new file mode 100644 index 0000000..fc2216f --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_item_with_name_delete_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse instantiates a new ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse and sets the default values. +func NewItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse()(*ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) { + m := &ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_post_request_body.go b/pkg/github/repos/item_item_actions_runners_item_labels_post_request_body.go new file mode 100644 index 0000000..ea0e0ff --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_post_request_body.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsRunnersItemLabelsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to add to the runner. + labels []string +} +// NewItemItemActionsRunnersItemLabelsPostRequestBody instantiates a new ItemItemActionsRunnersItemLabelsPostRequestBody and sets the default values. +func NewItemItemActionsRunnersItemLabelsPostRequestBody()(*ItemItemActionsRunnersItemLabelsPostRequestBody) { + m := &ItemItemActionsRunnersItemLabelsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to add to the runner. +// returns a []string when successful +func (m *ItemItemActionsRunnersItemLabelsPostRequestBody) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemItemActionsRunnersItemLabelsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to add to the runner. +func (m *ItemItemActionsRunnersItemLabelsPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +type ItemItemActionsRunnersItemLabelsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_post_response.go b/pkg/github/repos/item_item_actions_runners_item_labels_post_response.go new file mode 100644 index 0000000..9e9c99f --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_post_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersItemLabelsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunnersItemLabelsPostResponse instantiates a new ItemItemActionsRunnersItemLabelsPostResponse and sets the default values. +func NewItemItemActionsRunnersItemLabelsPostResponse()(*ItemItemActionsRunnersItemLabelsPostResponse) { + m := &ItemItemActionsRunnersItemLabelsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemItemActionsRunnersItemLabelsPostResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunnersItemLabelsPostResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunnersItemLabelsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemActionsRunnersItemLabelsPostResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunnersItemLabelsPostResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunnersItemLabelsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_put_request_body.go b/pkg/github/repos/item_item_actions_runners_item_labels_put_request_body.go new file mode 100644 index 0000000..5614471 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_put_request_body.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsRunnersItemLabelsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. + labels []string +} +// NewItemItemActionsRunnersItemLabelsPutRequestBody instantiates a new ItemItemActionsRunnersItemLabelsPutRequestBody and sets the default values. +func NewItemItemActionsRunnersItemLabelsPutRequestBody()(*ItemItemActionsRunnersItemLabelsPutRequestBody) { + m := &ItemItemActionsRunnersItemLabelsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +// returns a []string when successful +func (m *ItemItemActionsRunnersItemLabelsPutRequestBody) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemItemActionsRunnersItemLabelsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +func (m *ItemItemActionsRunnersItemLabelsPutRequestBody) SetLabels(value []string)() { + m.labels = value +} +type ItemItemActionsRunnersItemLabelsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_put_response.go b/pkg/github/repos/item_item_actions_runners_item_labels_put_response.go new file mode 100644 index 0000000..6959a83 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_put_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunnersItemLabelsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunnersItemLabelsPutResponse instantiates a new ItemItemActionsRunnersItemLabelsPutResponse and sets the default values. +func NewItemItemActionsRunnersItemLabelsPutResponse()(*ItemItemActionsRunnersItemLabelsPutResponse) { + m := &ItemItemActionsRunnersItemLabelsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunnersItemLabelsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunnersItemLabelsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunnersItemLabelsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + } + } + m.SetLabels(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []RunnerLabelable when successful +func (m *ItemItemActionsRunnersItemLabelsPutResponse) GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) { + return m.labels +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunnersItemLabelsPutResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunnersItemLabelsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunnersItemLabelsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemActionsRunnersItemLabelsPutResponse) SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() { + m.labels = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunnersItemLabelsPutResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunnersItemLabelsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable) + GetTotalCount()(*int32) + SetLabels(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RunnerLabelable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_request_builder.go b/pkg/github/repos/item_item_actions_runners_item_labels_request_builder.go new file mode 100644 index 0000000..5dd684a --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_request_builder.go @@ -0,0 +1,178 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersItemLabelsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\{runner_id}\labels +type ItemItemActionsRunnersItemLabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.runners.item.labels.item collection +// returns a *ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) ByName(name string)(*ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsRunnersItemLabelsRequestBuilderInternal instantiates a new ItemItemActionsRunnersItemLabelsRequestBuilder and sets the default values. +func NewItemItemActionsRunnersItemLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersItemLabelsRequestBuilder) { + m := &ItemItemActionsRunnersItemLabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}/labels", pathParameters), + } + return m +} +// NewItemItemActionsRunnersItemLabelsRequestBuilder instantiates a new ItemItemActionsRunnersItemLabelsRequestBuilder and sets the default values. +func NewItemItemActionsRunnersItemLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersItemLabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersItemLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove all custom labels from a self-hosted runner configured in arepository. Returns the remaining read-only labels from the runner.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersItemLabelsDeleteResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemActionsRunnersItemLabelsDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersItemLabelsDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersItemLabelsDeleteResponseable), nil +} +// Get lists all labels for a self-hosted runner configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersItemLabelsGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-a-repository +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemActionsRunnersItemLabelsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersItemLabelsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersItemLabelsGetResponseable), nil +} +// Post adds custom labels to a self-hosted runner configured in a repository.Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersItemLabelsPostResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-a-repository +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) Post(ctx context.Context, body ItemItemActionsRunnersItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemActionsRunnersItemLabelsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersItemLabelsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersItemLabelsPostResponseable), nil +} +// Put remove all previous custom labels and set the new custom labels for a specificself-hosted runner configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersItemLabelsPutResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-a-repository +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) Put(ctx context.Context, body ItemItemActionsRunnersItemLabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemActionsRunnersItemLabelsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersItemLabelsPutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersItemLabelsPutResponseable), nil +} +// ToDeleteRequestInformation remove all custom labels from a self-hosted runner configured in arepository. Returns the remaining read-only labels from the runner.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation lists all labels for a self-hosted runner configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation adds custom labels to a self-hosted runner configured in a repository.Authenticated users must have admin access to the organization to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsRunnersItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation remove all previous custom labels and set the new custom labels for a specificself-hosted runner configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemActionsRunnersItemLabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersItemLabelsRequestBuilder when successful +func (m *ItemItemActionsRunnersItemLabelsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersItemLabelsRequestBuilder) { + return NewItemItemActionsRunnersItemLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_item_labels_with_name_item_request_builder.go b/pkg/github/repos/item_item_actions_runners_item_labels_with_name_item_request_builder.go new file mode 100644 index 0000000..7f9b061 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_item_labels_with_name_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\{runner_id}\labels\{name} +type ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal instantiates a new ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + m := &ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}/labels/{name}", pathParameters), + } + return m +} +// NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder instantiates a new ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove a custom label from a self-hosted runner configuredin a repository. Returns the remaining labels from the runner.This endpoint returns a `404 Not Found` status if the custom label is notpresent on the runner.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository +func (m *ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersItemLabelsItemWithNameDeleteResponseable), nil +} +// ToDeleteRequestInformation remove a custom label from a self-hosted runner configuredin a repository. Returns the remaining labels from the runner.This endpoint returns a `404 Not Found` status if the custom label is notpresent on the runner.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder) { + return NewItemItemActionsRunnersItemLabelsWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_registration_token_request_builder.go b/pkg/github/repos/item_item_actions_runners_registration_token_request_builder.go new file mode 100644 index 0000000..1b5f6f3 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_registration_token_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersRegistrationTokenRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\registration-token +type ItemItemActionsRunnersRegistrationTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunnersRegistrationTokenRequestBuilderInternal instantiates a new ItemItemActionsRunnersRegistrationTokenRequestBuilder and sets the default values. +func NewItemItemActionsRunnersRegistrationTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersRegistrationTokenRequestBuilder) { + m := &ItemItemActionsRunnersRegistrationTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/registration-token", pathParameters), + } + return m +} +// NewItemItemActionsRunnersRegistrationTokenRequestBuilder instantiates a new ItemItemActionsRunnersRegistrationTokenRequestBuilder and sets the default values. +func NewItemItemActionsRunnersRegistrationTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersRegistrationTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersRegistrationTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post returns a token that you can pass to the `config` script. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:```./config.sh --url https://github.com/octo-org --token TOKEN```Authenticated users must have admin access to the repository to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a AuthenticationTokenable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-registration-token-for-a-repository +func (m *ItemItemActionsRunnersRegistrationTokenRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthenticationTokenFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable), nil +} +// ToPostRequestInformation returns a token that you can pass to the `config` script. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:```./config.sh --url https://github.com/octo-org --token TOKEN```Authenticated users must have admin access to the repository to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersRegistrationTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersRegistrationTokenRequestBuilder when successful +func (m *ItemItemActionsRunnersRegistrationTokenRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersRegistrationTokenRequestBuilder) { + return NewItemItemActionsRunnersRegistrationTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_remove_token_request_builder.go b/pkg/github/repos/item_item_actions_runners_remove_token_request_builder.go new file mode 100644 index 0000000..640dd31 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_remove_token_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersRemoveTokenRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\remove-token +type ItemItemActionsRunnersRemoveTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunnersRemoveTokenRequestBuilderInternal instantiates a new ItemItemActionsRunnersRemoveTokenRequestBuilder and sets the default values. +func NewItemItemActionsRunnersRemoveTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersRemoveTokenRequestBuilder) { + m := &ItemItemActionsRunnersRemoveTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/remove-token", pathParameters), + } + return m +} +// NewItemItemActionsRunnersRemoveTokenRequestBuilder instantiates a new ItemItemActionsRunnersRemoveTokenRequestBuilder and sets the default values. +func NewItemItemActionsRunnersRemoveTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersRemoveTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersRemoveTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post returns a token that you can pass to the `config` script to remove a self-hosted runner from an repository. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:```./config.sh remove --token TOKEN```Authenticated users must have admin access to the repository to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a AuthenticationTokenable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-remove-token-for-a-repository +func (m *ItemItemActionsRunnersRemoveTokenRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuthenticationTokenFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuthenticationTokenable), nil +} +// ToPostRequestInformation returns a token that you can pass to the `config` script to remove a self-hosted runner from an repository. The token expires after one hour.For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:```./config.sh remove --token TOKEN```Authenticated users must have admin access to the repository to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersRemoveTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersRemoveTokenRequestBuilder when successful +func (m *ItemItemActionsRunnersRemoveTokenRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersRemoveTokenRequestBuilder) { + return NewItemItemActionsRunnersRemoveTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_request_builder.go b/pkg/github/repos/item_item_actions_runners_request_builder.go new file mode 100644 index 0000000..3d3f743 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_request_builder.go @@ -0,0 +1,96 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsRunnersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners +type ItemItemActionsRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunnersRequestBuilderGetQueryParameters lists all self-hosted runners configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsRunnersRequestBuilderGetQueryParameters struct { + // The name of a self-hosted runner. + Name *string `uriparametername:"name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRunner_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.runners.item collection +// returns a *ItemItemActionsRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemItemActionsRunnersRequestBuilder) ByRunner_id(runner_id int32)(*ItemItemActionsRunnersWithRunner_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["runner_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(runner_id), 10) + return NewItemItemActionsRunnersWithRunner_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsRunnersRequestBuilderInternal instantiates a new ItemItemActionsRunnersRequestBuilder and sets the default values. +func NewItemItemActionsRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersRequestBuilder) { + m := &ItemItemActionsRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners{?name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsRunnersRequestBuilder instantiates a new ItemItemActionsRunnersRequestBuilder and sets the default values. +func NewItemItemActionsRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Downloads the downloads property +// returns a *ItemItemActionsRunnersDownloadsRequestBuilder when successful +func (m *ItemItemActionsRunnersRequestBuilder) Downloads()(*ItemItemActionsRunnersDownloadsRequestBuilder) { + return NewItemItemActionsRunnersDownloadsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// GenerateJitconfig the generateJitconfig property +// returns a *ItemItemActionsRunnersGenerateJitconfigRequestBuilder when successful +func (m *ItemItemActionsRunnersRequestBuilder) GenerateJitconfig()(*ItemItemActionsRunnersGenerateJitconfigRequestBuilder) { + return NewItemItemActionsRunnersGenerateJitconfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get lists all self-hosted runners configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-self-hosted-runners-for-a-repository +func (m *ItemItemActionsRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunnersRequestBuilderGetQueryParameters])(ItemItemActionsRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunnersGetResponseable), nil +} +// RegistrationToken the registrationToken property +// returns a *ItemItemActionsRunnersRegistrationTokenRequestBuilder when successful +func (m *ItemItemActionsRunnersRequestBuilder) RegistrationToken()(*ItemItemActionsRunnersRegistrationTokenRequestBuilder) { + return NewItemItemActionsRunnersRegistrationTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RemoveToken the removeToken property +// returns a *ItemItemActionsRunnersRemoveTokenRequestBuilder when successful +func (m *ItemItemActionsRunnersRequestBuilder) RemoveToken()(*ItemItemActionsRunnersRemoveTokenRequestBuilder) { + return NewItemItemActionsRunnersRemoveTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all self-hosted runners configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersRequestBuilder when successful +func (m *ItemItemActionsRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersRequestBuilder) { + return NewItemItemActionsRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runners_with_runner_item_request_builder.go b/pkg/github/repos/item_item_actions_runners_with_runner_item_request_builder.go new file mode 100644 index 0000000..b1b18eb --- /dev/null +++ b/pkg/github/repos/item_item_actions_runners_with_runner_item_request_builder.go @@ -0,0 +1,84 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunnersWithRunner_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\{runner_id} +type ItemItemActionsRunnersWithRunner_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunnersWithRunner_ItemRequestBuilderInternal instantiates a new ItemItemActionsRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemItemActionsRunnersWithRunner_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersWithRunner_ItemRequestBuilder) { + m := &ItemItemActionsRunnersWithRunner_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}", pathParameters), + } + return m +} +// NewItemItemActionsRunnersWithRunner_ItemRequestBuilder instantiates a new ItemItemActionsRunnersWithRunner_ItemRequestBuilder and sets the default values. +func NewItemItemActionsRunnersWithRunner_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunnersWithRunner_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunnersWithRunner_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.Authenticated users must have admin access to the repository to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-a-repository +func (m *ItemItemActionsRunnersWithRunner_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific self-hosted runner configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Runnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-a-repository +func (m *ItemItemActionsRunnersWithRunner_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Runnerable), nil +} +// Labels the labels property +// returns a *ItemItemActionsRunnersItemLabelsRequestBuilder when successful +func (m *ItemItemActionsRunnersWithRunner_ItemRequestBuilder) Labels()(*ItemItemActionsRunnersItemLabelsRequestBuilder) { + return NewItemItemActionsRunnersItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.Authenticated users must have admin access to the repository to use this endpoint.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersWithRunner_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific self-hosted runner configured in a repository.Authenticated users must have admin access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunnersWithRunner_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunnersWithRunner_ItemRequestBuilder when successful +func (m *ItemItemActionsRunnersWithRunner_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunnersWithRunner_ItemRequestBuilder) { + return NewItemItemActionsRunnersWithRunner_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_get_response.go b/pkg/github/repos/item_item_actions_runs_get_response.go new file mode 100644 index 0000000..2a1c69a --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The workflow_runs property + workflow_runs []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable +} +// NewItemItemActionsRunsGetResponse instantiates a new ItemItemActionsRunsGetResponse and sets the default values. +func NewItemItemActionsRunsGetResponse()(*ItemItemActionsRunsGetResponse) { + m := &ItemItemActionsRunsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["workflow_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowRunFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable) + } + } + m.SetWorkflowRuns(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetWorkflowRuns gets the workflow_runs property value. The workflow_runs property +// returns a []WorkflowRunable when successful +func (m *ItemItemActionsRunsGetResponse) GetWorkflowRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable) { + return m.workflow_runs +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetWorkflowRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkflowRuns())) + for i, v := range m.GetWorkflowRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("workflow_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemActionsRunsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetWorkflowRuns sets the workflow_runs property value. The workflow_runs property +func (m *ItemItemActionsRunsGetResponse) SetWorkflowRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable)() { + m.workflow_runs = value +} +type ItemItemActionsRunsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetWorkflowRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable) + SetTotalCount(value *int32)() + SetWorkflowRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_approvals_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_approvals_request_builder.go new file mode 100644 index 0000000..96520ef --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_approvals_request_builder.go @@ -0,0 +1,60 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemApprovalsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\approvals +type ItemItemActionsRunsItemApprovalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemApprovalsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemApprovalsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemApprovalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemApprovalsRequestBuilder) { + m := &ItemItemActionsRunsItemApprovalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/approvals", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemApprovalsRequestBuilder instantiates a new ItemItemActionsRunsItemApprovalsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemApprovalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemApprovalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemApprovalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a []EnvironmentApprovalsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#get-the-review-history-for-a-workflow-run +func (m *ItemItemActionsRunsItemApprovalsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnvironmentApprovalsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEnvironmentApprovalsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnvironmentApprovalsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EnvironmentApprovalsable) + } + } + return val, nil +} +// ToGetRequestInformation anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemApprovalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemApprovalsRequestBuilder when successful +func (m *ItemItemActionsRunsItemApprovalsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemApprovalsRequestBuilder) { + return NewItemItemActionsRunsItemApprovalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_approve_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_approve_request_builder.go new file mode 100644 index 0000000..a052d61 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_approve_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemApproveRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\approve +type ItemItemActionsRunsItemApproveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemApproveRequestBuilderInternal instantiates a new ItemItemActionsRunsItemApproveRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemApproveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemApproveRequestBuilder) { + m := &ItemItemActionsRunsItemApproveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/approve", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemApproveRequestBuilder instantiates a new ItemItemActionsRunsItemApproveRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemApproveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemApproveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemApproveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/enterprise-cloud@latest//actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#approve-a-workflow-run-for-a-fork-pull-request +func (m *ItemItemActionsRunsItemApproveRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/enterprise-cloud@latest//actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemApproveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemApproveRequestBuilder when successful +func (m *ItemItemActionsRunsItemApproveRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemApproveRequestBuilder) { + return NewItemItemActionsRunsItemApproveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_artifacts_get_response.go b/pkg/github/repos/item_item_actions_runs_item_artifacts_get_response.go new file mode 100644 index 0000000..df1d9f0 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_artifacts_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunsItemArtifactsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The artifacts property + artifacts []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunsItemArtifactsGetResponse instantiates a new ItemItemActionsRunsItemArtifactsGetResponse and sets the default values. +func NewItemItemActionsRunsItemArtifactsGetResponse()(*ItemItemActionsRunsItemArtifactsGetResponse) { + m := &ItemItemActionsRunsItemArtifactsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsItemArtifactsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsItemArtifactsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsItemArtifactsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsItemArtifactsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArtifacts gets the artifacts property value. The artifacts property +// returns a []Artifactable when successful +func (m *ItemItemActionsRunsItemArtifactsGetResponse) GetArtifacts()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable) { + return m.artifacts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsItemArtifactsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["artifacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateArtifactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable) + } + } + m.SetArtifacts(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunsItemArtifactsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsItemArtifactsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetArtifacts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetArtifacts())) + for i, v := range m.GetArtifacts() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("artifacts", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunsItemArtifactsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArtifacts sets the artifacts property value. The artifacts property +func (m *ItemItemActionsRunsItemArtifactsGetResponse) SetArtifacts(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable)() { + m.artifacts = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunsItemArtifactsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunsItemArtifactsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArtifacts()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable) + GetTotalCount()(*int32) + SetArtifacts(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Artifactable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_artifacts_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_artifacts_request_builder.go new file mode 100644 index 0000000..e9e1a8d --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_artifacts_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsRunsItemArtifactsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\artifacts +type ItemItemActionsRunsItemArtifactsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunsItemArtifactsRequestBuilderGetQueryParameters lists artifacts for a workflow run.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsRunsItemArtifactsRequestBuilderGetQueryParameters struct { + // The name field of an artifact. When specified, only artifacts with this name will be returned. + Name *string `uriparametername:"name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemActionsRunsItemArtifactsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemArtifactsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemArtifactsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemArtifactsRequestBuilder) { + m := &ItemItemActionsRunsItemArtifactsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/artifacts{?name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemArtifactsRequestBuilder instantiates a new ItemItemActionsRunsItemArtifactsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemArtifactsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemArtifactsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemArtifactsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists artifacts for a workflow run.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemActionsRunsItemArtifactsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/artifacts#list-workflow-run-artifacts +func (m *ItemItemActionsRunsItemArtifactsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemArtifactsRequestBuilderGetQueryParameters])(ItemItemActionsRunsItemArtifactsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunsItemArtifactsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunsItemArtifactsGetResponseable), nil +} +// ToGetRequestInformation lists artifacts for a workflow run.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemArtifactsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemArtifactsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemArtifactsRequestBuilder when successful +func (m *ItemItemActionsRunsItemArtifactsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemArtifactsRequestBuilder) { + return NewItemItemActionsRunsItemArtifactsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_attempts_item_jobs_get_response.go b/pkg/github/repos/item_item_actions_runs_item_attempts_item_jobs_get_response.go new file mode 100644 index 0000000..a1e5481 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_attempts_item_jobs_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunsItemAttemptsItemJobsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The jobs property + jobs []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunsItemAttemptsItemJobsGetResponse instantiates a new ItemItemActionsRunsItemAttemptsItemJobsGetResponse and sets the default values. +func NewItemItemActionsRunsItemAttemptsItemJobsGetResponse()(*ItemItemActionsRunsItemAttemptsItemJobsGetResponse) { + m := &ItemItemActionsRunsItemAttemptsItemJobsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsItemAttemptsItemJobsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsItemAttemptsItemJobsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsItemAttemptsItemJobsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable) + } + } + m.SetJobs(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetJobs gets the jobs property value. The jobs property +// returns a []Jobable when successful +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) GetJobs()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable) { + return m.jobs +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobs())) + for i, v := range m.GetJobs() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("jobs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) SetJobs(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable)() { + m.jobs = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunsItemAttemptsItemJobsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunsItemAttemptsItemJobsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJobs()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable) + GetTotalCount()(*int32) + SetJobs(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_attempts_item_jobs_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_attempts_item_jobs_request_builder.go new file mode 100644 index 0000000..47a650f --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_attempts_item_jobs_request_builder.go @@ -0,0 +1,68 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts\{attempt_number}\jobs +type ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunsItemAttemptsItemJobsRequestBuilderGetQueryParameters lists jobs for a specific workflow run attempt. You can use parameters to narrow the list of results. For more informationabout using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsRunsItemAttemptsItemJobsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) { + m := &ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}/jobs{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilder instantiates a new ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists jobs for a specific workflow run attempt. You can use parameters to narrow the list of results. For more informationabout using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemActionsRunsItemAttemptsItemJobsGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt +func (m *ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemAttemptsItemJobsRequestBuilderGetQueryParameters])(ItemItemActionsRunsItemAttemptsItemJobsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunsItemAttemptsItemJobsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunsItemAttemptsItemJobsGetResponseable), nil +} +// ToGetRequestInformation lists jobs for a specific workflow run attempt. You can use parameters to narrow the list of results. For more informationabout using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemAttemptsItemJobsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder when successful +func (m *ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) { + return NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_attempts_item_logs_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_attempts_item_logs_request_builder.go new file mode 100644 index 0000000..463b5dc --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_attempts_item_logs_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts\{attempt_number}\logs +type ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) { + m := &ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}/logs", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilder instantiates a new ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after1 minute. Look for `Location:` in the response header to find the URL for the download.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#download-workflow-run-attempt-logs +func (m *ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after1 minute. Look for `Location:` in the response header to find the URL for the download.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder when successful +func (m *ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) { + return NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_attempts_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_attempts_request_builder.go new file mode 100644 index 0000000..3bd472b --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_attempts_request_builder.go @@ -0,0 +1,34 @@ +package repos + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsRunsItemAttemptsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts +type ItemItemActionsRunsItemAttemptsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAttempt_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.runs.item.attempts.item collection +// returns a *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder when successful +func (m *ItemItemActionsRunsItemAttemptsRequestBuilder) ByAttempt_number(attempt_number int32)(*ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["attempt_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(attempt_number), 10) + return NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsRunsItemAttemptsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemAttemptsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsRequestBuilder) { + m := &ItemItemActionsRunsItemAttemptsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemAttemptsRequestBuilder instantiates a new ItemItemActionsRunsItemAttemptsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemAttemptsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_actions_runs_item_attempts_with_attempt_number_item_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_attempts_with_attempt_number_item_request_builder.go new file mode 100644 index 0000000..be8b088 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_attempts_with_attempt_number_item_request_builder.go @@ -0,0 +1,72 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts\{attempt_number} +type ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderGetQueryParameters gets a specific workflow run attempt.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderGetQueryParameters struct { + // If `true` pull requests are omitted from the response (empty array). + Exclude_pull_requests *bool `uriparametername:"exclude_pull_requests"` +} +// NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderInternal instantiates a new ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) { + m := &ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}{?exclude_pull_requests*}", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder instantiates a new ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a specific workflow run attempt.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a WorkflowRunable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#get-a-workflow-run-attempt +func (m *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowRunFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable), nil +} +// Jobs the jobs property +// returns a *ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder when successful +func (m *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) Jobs()(*ItemItemActionsRunsItemAttemptsItemJobsRequestBuilder) { + return NewItemItemActionsRunsItemAttemptsItemJobsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Logs the logs property +// returns a *ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder when successful +func (m *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) Logs()(*ItemItemActionsRunsItemAttemptsItemLogsRequestBuilder) { + return NewItemItemActionsRunsItemAttemptsItemLogsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets a specific workflow run attempt.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder when successful +func (m *ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder) { + return NewItemItemActionsRunsItemAttemptsWithAttempt_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_cancel_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_cancel_request_builder.go new file mode 100644 index 0000000..e6c3f24 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_cancel_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemCancelRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\cancel +type ItemItemActionsRunsItemCancelRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemCancelRequestBuilderInternal instantiates a new ItemItemActionsRunsItemCancelRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemCancelRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemCancelRequestBuilder) { + m := &ItemItemActionsRunsItemCancelRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/cancel", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemCancelRequestBuilder instantiates a new ItemItemActionsRunsItemCancelRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemCancelRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemCancelRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemCancelRequestBuilderInternal(urlParams, requestAdapter) +} +// Post cancels a workflow run using its `id`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#cancel-a-workflow-run +func (m *ItemItemActionsRunsItemCancelRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation cancels a workflow run using its `id`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemCancelRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemCancelRequestBuilder when successful +func (m *ItemItemActionsRunsItemCancelRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemCancelRequestBuilder) { + return NewItemItemActionsRunsItemCancelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_deployment_protection_rule_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_deployment_protection_rule_request_builder.go new file mode 100644 index 0000000..2f3af13 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_deployment_protection_rule_request_builder.go @@ -0,0 +1,193 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\deployment_protection_rule +type ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Deployment_protection_rulePostRequestBody composed type wrapper for classes i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable +type Deployment_protection_rulePostRequestBody struct { + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable + deployment_protection_rulePostRequestBodyReviewCustomGatesCommentRequired i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable + deployment_protection_rulePostRequestBodyReviewCustomGatesStateRequired i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable + reviewCustomGatesCommentRequired i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable + reviewCustomGatesStateRequired i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable +} +// NewDeployment_protection_rulePostRequestBody instantiates a new Deployment_protection_rulePostRequestBody and sets the default values. +func NewDeployment_protection_rulePostRequestBody()(*Deployment_protection_rulePostRequestBody) { + m := &Deployment_protection_rulePostRequestBody{ + } + return m +} +// CreateDeployment_protection_rulePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeployment_protection_rulePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewDeployment_protection_rulePostRequestBody() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReviewCustomGatesCommentRequiredFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable); ok { + result.SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired(cast) + } + } else if val, err := parseNode.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReviewCustomGatesStateRequiredFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable); ok { + result.SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired(cast) + } + } else if val, err := parseNode.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReviewCustomGatesCommentRequiredFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable); ok { + result.SetReviewCustomGatesCommentRequired(cast) + } + } else if val, err := parseNode.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReviewCustomGatesStateRequiredFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable); ok { + result.SetReviewCustomGatesStateRequired(cast) + } + } + } + return result, nil +} +// GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired gets the reviewCustomGatesCommentRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable +// returns a ReviewCustomGatesCommentRequiredable when successful +func (m *Deployment_protection_rulePostRequestBody) GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable) { + return m.deployment_protection_rulePostRequestBodyReviewCustomGatesCommentRequired +} +// GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired gets the reviewCustomGatesStateRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable +// returns a ReviewCustomGatesStateRequiredable when successful +func (m *Deployment_protection_rulePostRequestBody) GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable) { + return m.deployment_protection_rulePostRequestBodyReviewCustomGatesStateRequired +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Deployment_protection_rulePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Deployment_protection_rulePostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetReviewCustomGatesCommentRequired gets the reviewCustomGatesCommentRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable +// returns a ReviewCustomGatesCommentRequiredable when successful +func (m *Deployment_protection_rulePostRequestBody) GetReviewCustomGatesCommentRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable) { + return m.reviewCustomGatesCommentRequired +} +// GetReviewCustomGatesStateRequired gets the reviewCustomGatesStateRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable +// returns a ReviewCustomGatesStateRequiredable when successful +func (m *Deployment_protection_rulePostRequestBody) GetReviewCustomGatesStateRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable) { + return m.reviewCustomGatesStateRequired +} +// Serialize serializes information the current object +func (m *Deployment_protection_rulePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired() != nil { + err := writer.WriteObjectValue("", m.GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired()) + if err != nil { + return err + } + } else if m.GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired() != nil { + err := writer.WriteObjectValue("", m.GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired()) + if err != nil { + return err + } + } else if m.GetReviewCustomGatesCommentRequired() != nil { + err := writer.WriteObjectValue("", m.GetReviewCustomGatesCommentRequired()) + if err != nil { + return err + } + } else if m.GetReviewCustomGatesStateRequired() != nil { + err := writer.WriteObjectValue("", m.GetReviewCustomGatesStateRequired()) + if err != nil { + return err + } + } + return nil +} +// SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired sets the reviewCustomGatesCommentRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable +func (m *Deployment_protection_rulePostRequestBody) SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable)() { + m.deployment_protection_rulePostRequestBodyReviewCustomGatesCommentRequired = value +} +// SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired sets the reviewCustomGatesStateRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable +func (m *Deployment_protection_rulePostRequestBody) SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable)() { + m.deployment_protection_rulePostRequestBodyReviewCustomGatesStateRequired = value +} +// SetReviewCustomGatesCommentRequired sets the reviewCustomGatesCommentRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable +func (m *Deployment_protection_rulePostRequestBody) SetReviewCustomGatesCommentRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable)() { + m.reviewCustomGatesCommentRequired = value +} +// SetReviewCustomGatesStateRequired sets the reviewCustomGatesStateRequired property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable +func (m *Deployment_protection_rulePostRequestBody) SetReviewCustomGatesStateRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable)() { + m.reviewCustomGatesStateRequired = value +} +type Deployment_protection_rulePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable) + GetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable) + GetReviewCustomGatesCommentRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable) + GetReviewCustomGatesStateRequired()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable) + SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesCommentRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable)() + SetDeploymentProtectionRulePostRequestBodyReviewCustomGatesStateRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable)() + SetReviewCustomGatesCommentRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesCommentRequiredable)() + SetReviewCustomGatesStateRequired(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCustomGatesStateRequiredable)() +} +// NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilderInternal instantiates a new ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) { + m := &ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/deployment_protection_rule", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder instantiates a new ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilderInternal(urlParams, requestAdapter) +} +// Post approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."**Note:** GitHub Apps can only review their own custom deployment protection rules.To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run +func (m *ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) Post(ctx context.Context, body Deployment_protection_rulePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."**Note:** GitHub Apps can only review their own custom deployment protection rules.To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) ToPostRequestInformation(ctx context.Context, body Deployment_protection_rulePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder when successful +func (m *ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) { + return NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_force_cancel_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_force_cancel_request_builder.go new file mode 100644 index 0000000..cdfe294 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_force_cancel_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemForceCancelRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\force-cancel +type ItemItemActionsRunsItemForceCancelRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemForceCancelRequestBuilderInternal instantiates a new ItemItemActionsRunsItemForceCancelRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemForceCancelRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemForceCancelRequestBuilder) { + m := &ItemItemActionsRunsItemForceCancelRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/force-cancel", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemForceCancelRequestBuilder instantiates a new ItemItemActionsRunsItemForceCancelRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemForceCancelRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemForceCancelRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemForceCancelRequestBuilderInternal(urlParams, requestAdapter) +} +// Post cancels a workflow run and bypasses conditions that would otherwise cause a workflow execution to continue, such as an `always()` condition on a job.You should only use this endpoint to cancel a workflow run when the workflow run is not responding to [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel`](/rest/actions/workflow-runs#cancel-a-workflow-run).OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#force-cancel-a-workflow-run +func (m *ItemItemActionsRunsItemForceCancelRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation cancels a workflow run and bypasses conditions that would otherwise cause a workflow execution to continue, such as an `always()` condition on a job.You should only use this endpoint to cancel a workflow run when the workflow run is not responding to [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel`](/rest/actions/workflow-runs#cancel-a-workflow-run).OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemForceCancelRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemForceCancelRequestBuilder when successful +func (m *ItemItemActionsRunsItemForceCancelRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemForceCancelRequestBuilder) { + return NewItemItemActionsRunsItemForceCancelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_jobs_get_response.go b/pkg/github/repos/item_item_actions_runs_item_jobs_get_response.go new file mode 100644 index 0000000..d3a6c6a --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_jobs_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsRunsItemJobsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The jobs property + jobs []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable + // The total_count property + total_count *int32 +} +// NewItemItemActionsRunsItemJobsGetResponse instantiates a new ItemItemActionsRunsItemJobsGetResponse and sets the default values. +func NewItemItemActionsRunsItemJobsGetResponse()(*ItemItemActionsRunsItemJobsGetResponse) { + m := &ItemItemActionsRunsItemJobsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsItemJobsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsItemJobsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsItemJobsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsItemJobsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsItemJobsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable) + } + } + m.SetJobs(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetJobs gets the jobs property value. The jobs property +// returns a []Jobable when successful +func (m *ItemItemActionsRunsItemJobsGetResponse) GetJobs()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable) { + return m.jobs +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsRunsItemJobsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsItemJobsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobs())) + for i, v := range m.GetJobs() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("jobs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsRunsItemJobsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *ItemItemActionsRunsItemJobsGetResponse) SetJobs(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable)() { + m.jobs = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsRunsItemJobsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsRunsItemJobsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJobs()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable) + GetTotalCount()(*int32) + SetJobs(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Jobable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_jobs_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_jobs_request_builder.go new file mode 100644 index 0000000..95a0915 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_jobs_request_builder.go @@ -0,0 +1,66 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iba620ede4eeebfea9de3a0225365b6855f27822e182fbdf23e943ead924ccba7 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/actions/runs/item/jobs" +) + +// ItemItemActionsRunsItemJobsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\jobs +type ItemItemActionsRunsItemJobsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunsItemJobsRequestBuilderGetQueryParameters lists jobs for a workflow run. You can use parameters to narrow the list of results. For more informationabout using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsRunsItemJobsRequestBuilderGetQueryParameters struct { + // Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. + Filter *iba620ede4eeebfea9de3a0225365b6855f27822e182fbdf23e943ead924ccba7.GetFilterQueryParameterType `uriparametername:"filter"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemActionsRunsItemJobsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemJobsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemJobsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemJobsRequestBuilder) { + m := &ItemItemActionsRunsItemJobsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/jobs{?filter*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemJobsRequestBuilder instantiates a new ItemItemActionsRunsItemJobsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemJobsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemJobsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemJobsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists jobs for a workflow run. You can use parameters to narrow the list of results. For more informationabout using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemActionsRunsItemJobsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-jobs#list-jobs-for-a-workflow-run +func (m *ItemItemActionsRunsItemJobsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemJobsRequestBuilderGetQueryParameters])(ItemItemActionsRunsItemJobsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunsItemJobsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunsItemJobsGetResponseable), nil +} +// ToGetRequestInformation lists jobs for a workflow run. You can use parameters to narrow the list of results. For more informationabout using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemJobsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsItemJobsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemJobsRequestBuilder when successful +func (m *ItemItemActionsRunsItemJobsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemJobsRequestBuilder) { + return NewItemItemActionsRunsItemJobsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_logs_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_logs_request_builder.go new file mode 100644 index 0000000..3769cb8 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_logs_request_builder.go @@ -0,0 +1,81 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemLogsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\logs +type ItemItemActionsRunsItemLogsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemLogsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemLogsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemLogsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemLogsRequestBuilder) { + m := &ItemItemActionsRunsItemLogsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/logs", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemLogsRequestBuilder instantiates a new ItemItemActionsRunsItemLogsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemLogsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemLogsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemLogsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes all logs for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#delete-workflow-run-logs +func (m *ItemItemActionsRunsItemLogsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for`Location:` in the response header to find the URL for the download.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#download-workflow-run-logs +func (m *ItemItemActionsRunsItemLogsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes all logs for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemLogsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for`Location:` in the response header to find the URL for the download.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemLogsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemLogsRequestBuilder when successful +func (m *ItemItemActionsRunsItemLogsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemLogsRequestBuilder) { + return NewItemItemActionsRunsItemLogsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_pending_deployments_post_request_body.go b/pkg/github/repos/item_item_actions_runs_item_pending_deployments_post_request_body.go new file mode 100644 index 0000000..bac4445 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_pending_deployments_post_request_body.go @@ -0,0 +1,115 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsRunsItemPending_deploymentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A comment to accompany the deployment review + comment *string + // The list of environment ids to approve or reject + environment_ids []int32 +} +// NewItemItemActionsRunsItemPending_deploymentsPostRequestBody instantiates a new ItemItemActionsRunsItemPending_deploymentsPostRequestBody and sets the default values. +func NewItemItemActionsRunsItemPending_deploymentsPostRequestBody()(*ItemItemActionsRunsItemPending_deploymentsPostRequestBody) { + m := &ItemItemActionsRunsItemPending_deploymentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsItemPending_deploymentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsItemPending_deploymentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsItemPending_deploymentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComment gets the comment property value. A comment to accompany the deployment review +// returns a *string when successful +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) GetComment()(*string) { + return m.comment +} +// GetEnvironmentIds gets the environment_ids property value. The list of environment ids to approve or reject +// returns a []int32 when successful +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) GetEnvironmentIds()([]int32) { + return m.environment_ids +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["environment_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetEnvironmentIds(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + if m.GetEnvironmentIds() != nil { + err := writer.WriteCollectionOfInt32Values("environment_ids", m.GetEnvironmentIds()) + 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 *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComment sets the comment property value. A comment to accompany the deployment review +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) SetComment(value *string)() { + m.comment = value +} +// SetEnvironmentIds sets the environment_ids property value. The list of environment ids to approve or reject +func (m *ItemItemActionsRunsItemPending_deploymentsPostRequestBody) SetEnvironmentIds(value []int32)() { + m.environment_ids = value +} +type ItemItemActionsRunsItemPending_deploymentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetEnvironmentIds()([]int32) + SetComment(value *string)() + SetEnvironmentIds(value []int32)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_pending_deployments_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_pending_deployments_request_builder.go new file mode 100644 index 0000000..66d01f4 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_pending_deployments_request_builder.go @@ -0,0 +1,94 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemPending_deploymentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\pending_deployments +type ItemItemActionsRunsItemPending_deploymentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemPending_deploymentsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemPending_deploymentsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemPending_deploymentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemPending_deploymentsRequestBuilder) { + m := &ItemItemActionsRunsItemPending_deploymentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/pending_deployments", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemPending_deploymentsRequestBuilder instantiates a new ItemItemActionsRunsItemPending_deploymentsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemPending_deploymentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemPending_deploymentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemPending_deploymentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get all deployment environments for a workflow run that are waiting for protection rules to pass.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a []PendingDeploymentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#get-pending-deployments-for-a-workflow-run +func (m *ItemItemActionsRunsItemPending_deploymentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PendingDeploymentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePendingDeploymentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PendingDeploymentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PendingDeploymentable) + } + } + return val, nil +} +// Post approve or reject pending deployments that are waiting on approval by a required reviewer.Required reviewers with read access to the repository contents and deployments can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a []Deploymentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run +func (m *ItemItemActionsRunsItemPending_deploymentsRequestBuilder) Post(ctx context.Context, body ItemItemActionsRunsItemPending_deploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable) + } + } + return val, nil +} +// ToGetRequestInformation get all deployment environments for a workflow run that are waiting for protection rules to pass.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemPending_deploymentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation approve or reject pending deployments that are waiting on approval by a required reviewer.Required reviewers with read access to the repository contents and deployments can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemPending_deploymentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsRunsItemPending_deploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemPending_deploymentsRequestBuilder when successful +func (m *ItemItemActionsRunsItemPending_deploymentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemPending_deploymentsRequestBuilder) { + return NewItemItemActionsRunsItemPending_deploymentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_rerun_failed_jobs_post_request_body.go b/pkg/github/repos/item_item_actions_runs_item_rerun_failed_jobs_post_request_body.go new file mode 100644 index 0000000..ca2e596 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_rerun_failed_jobs_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsRunsItemRerunFailedJobsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to enable debug logging for the re-run. + enable_debug_logging *bool +} +// NewItemItemActionsRunsItemRerunFailedJobsPostRequestBody instantiates a new ItemItemActionsRunsItemRerunFailedJobsPostRequestBody and sets the default values. +func NewItemItemActionsRunsItemRerunFailedJobsPostRequestBody()(*ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) { + m := &ItemItemActionsRunsItemRerunFailedJobsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsItemRerunFailedJobsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsItemRerunFailedJobsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsItemRerunFailedJobsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnableDebugLogging gets the enable_debug_logging property value. Whether to enable debug logging for the re-run. +// returns a *bool when successful +func (m *ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) GetEnableDebugLogging()(*bool) { + return m.enable_debug_logging +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enable_debug_logging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableDebugLogging(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enable_debug_logging", m.GetEnableDebugLogging()) + 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 *ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnableDebugLogging sets the enable_debug_logging property value. Whether to enable debug logging for the re-run. +func (m *ItemItemActionsRunsItemRerunFailedJobsPostRequestBody) SetEnableDebugLogging(value *bool)() { + m.enable_debug_logging = value +} +type ItemItemActionsRunsItemRerunFailedJobsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableDebugLogging()(*bool) + SetEnableDebugLogging(value *bool)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_rerun_failed_jobs_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_rerun_failed_jobs_request_builder.go new file mode 100644 index 0000000..83d2abb --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_rerun_failed_jobs_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemRerunFailedJobsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\rerun-failed-jobs +type ItemItemActionsRunsItemRerunFailedJobsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemRerunFailedJobsRequestBuilderInternal instantiates a new ItemItemActionsRunsItemRerunFailedJobsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemRerunFailedJobsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) { + m := &ItemItemActionsRunsItemRerunFailedJobsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/rerun-failed-jobs", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemRerunFailedJobsRequestBuilder instantiates a new ItemItemActionsRunsItemRerunFailedJobsRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemRerunFailedJobsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemRerunFailedJobsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run +func (m *ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) Post(ctx context.Context, body ItemItemActionsRunsItemRerunFailedJobsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsRunsItemRerunFailedJobsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemRerunFailedJobsRequestBuilder when successful +func (m *ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) { + return NewItemItemActionsRunsItemRerunFailedJobsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_rerun_post_request_body.go b/pkg/github/repos/item_item_actions_runs_item_rerun_post_request_body.go new file mode 100644 index 0000000..2522f36 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_rerun_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsRunsItemRerunPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to enable debug logging for the re-run. + enable_debug_logging *bool +} +// NewItemItemActionsRunsItemRerunPostRequestBody instantiates a new ItemItemActionsRunsItemRerunPostRequestBody and sets the default values. +func NewItemItemActionsRunsItemRerunPostRequestBody()(*ItemItemActionsRunsItemRerunPostRequestBody) { + m := &ItemItemActionsRunsItemRerunPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsRunsItemRerunPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsRunsItemRerunPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsRunsItemRerunPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsRunsItemRerunPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnableDebugLogging gets the enable_debug_logging property value. Whether to enable debug logging for the re-run. +// returns a *bool when successful +func (m *ItemItemActionsRunsItemRerunPostRequestBody) GetEnableDebugLogging()(*bool) { + return m.enable_debug_logging +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsRunsItemRerunPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enable_debug_logging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableDebugLogging(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemActionsRunsItemRerunPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enable_debug_logging", m.GetEnableDebugLogging()) + 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 *ItemItemActionsRunsItemRerunPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnableDebugLogging sets the enable_debug_logging property value. Whether to enable debug logging for the re-run. +func (m *ItemItemActionsRunsItemRerunPostRequestBody) SetEnableDebugLogging(value *bool)() { + m.enable_debug_logging = value +} +type ItemItemActionsRunsItemRerunPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableDebugLogging()(*bool) + SetEnableDebugLogging(value *bool)() +} diff --git a/pkg/github/repos/item_item_actions_runs_item_rerun_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_rerun_request_builder.go new file mode 100644 index 0000000..3af1a34 --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_rerun_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemRerunRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\rerun +type ItemItemActionsRunsItemRerunRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemRerunRequestBuilderInternal instantiates a new ItemItemActionsRunsItemRerunRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemRerunRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemRerunRequestBuilder) { + m := &ItemItemActionsRunsItemRerunRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/rerun", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemRerunRequestBuilder instantiates a new ItemItemActionsRunsItemRerunRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemRerunRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemRerunRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemRerunRequestBuilderInternal(urlParams, requestAdapter) +} +// Post re-runs your workflow run using its `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-a-workflow +func (m *ItemItemActionsRunsItemRerunRequestBuilder) Post(ctx context.Context, body ItemItemActionsRunsItemRerunPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation re-runs your workflow run using its `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemRerunRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsRunsItemRerunPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemRerunRequestBuilder when successful +func (m *ItemItemActionsRunsItemRerunRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemRerunRequestBuilder) { + return NewItemItemActionsRunsItemRerunRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go new file mode 100644 index 0000000..af6b21e --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsItemTimingRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\timing +type ItemItemActionsRunsItemTimingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsRunsItemTimingRequestBuilderInternal instantiates a new ItemItemActionsRunsItemTimingRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemTimingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemTimingRequestBuilder) { + m := &ItemItemActionsRunsItemTimingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/timing", pathParameters), + } + return m +} +// NewItemItemActionsRunsItemTimingRequestBuilder instantiates a new ItemItemActionsRunsItemTimingRequestBuilder and sets the default values. +func NewItemItemActionsRunsItemTimingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsItemTimingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsItemTimingRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub Enterprise Cloud-hosted runners. Usage is listed for each GitHub Enterprise Cloud-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a WorkflowRunUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#get-workflow-run-usage +func (m *ItemItemActionsRunsItemTimingRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowRunUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunUsageable), nil +} +// ToGetRequestInformation gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub Enterprise Cloud-hosted runners. Usage is listed for each GitHub Enterprise Cloud-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsItemTimingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsItemTimingRequestBuilder when successful +func (m *ItemItemActionsRunsItemTimingRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsItemTimingRequestBuilder) { + return NewItemItemActionsRunsItemTimingRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_request_builder.go b/pkg/github/repos/item_item_actions_runs_request_builder.go new file mode 100644 index 0000000..d4e8bcc --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_request_builder.go @@ -0,0 +1,92 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i8ed9e578f665ccb8d4d9460d40580250f7b2376cbeec8fc5c0ea5e2b95553986 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/actions/runs" +) + +// ItemItemActionsRunsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs +type ItemItemActionsRunsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunsRequestBuilderGetQueryParameters lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +type ItemItemActionsRunsRequestBuilderGetQueryParameters struct { + // Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. + Actor *string `uriparametername:"actor"` + // Returns workflow runs associated with a branch. Use the name of the branch of the `push`. + Branch *string `uriparametername:"branch"` + // Returns workflow runs with the `check_suite_id` that you specify. + Check_suite_id *int32 `uriparametername:"check_suite_id"` + // Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-cloud@latest//search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + Created *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"created"` + // Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/enterprise-cloud@latest//actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." + Event *string `uriparametername:"event"` + // If `true` pull requests are omitted from the response (empty array). + Exclude_pull_requests *bool `uriparametername:"exclude_pull_requests"` + // Only returns workflow runs that are associated with the specified `head_sha`. + Head_sha *string `uriparametername:"head_sha"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`. + Status *i8ed9e578f665ccb8d4d9460d40580250f7b2376cbeec8fc5c0ea5e2b95553986.GetStatusQueryParameterType `uriparametername:"status"` +} +// ByRun_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.runs.item collection +// returns a *ItemItemActionsRunsWithRun_ItemRequestBuilder when successful +func (m *ItemItemActionsRunsRequestBuilder) ByRun_id(run_id int32)(*ItemItemActionsRunsWithRun_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["run_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(run_id), 10) + return NewItemItemActionsRunsWithRun_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsRunsRequestBuilderInternal instantiates a new ItemItemActionsRunsRequestBuilder and sets the default values. +func NewItemItemActionsRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsRequestBuilder) { + m := &ItemItemActionsRunsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs{?actor*,branch*,check_suite_id*,created*,event*,exclude_pull_requests*,head_sha*,page*,per_page*,status*}", pathParameters), + } + return m +} +// NewItemItemActionsRunsRequestBuilder instantiates a new ItemItemActionsRunsRequestBuilder and sets the default values. +func NewItemItemActionsRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// returns a ItemItemActionsRunsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#list-workflow-runs-for-a-repository +func (m *ItemItemActionsRunsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsRequestBuilderGetQueryParameters])(ItemItemActionsRunsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsRunsGetResponseable), nil +} +// ToGetRequestInformation lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsRequestBuilder when successful +func (m *ItemItemActionsRunsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsRequestBuilder) { + return NewItemItemActionsRunsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go b/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go new file mode 100644 index 0000000..3b8d23d --- /dev/null +++ b/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go @@ -0,0 +1,149 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsRunsWithRun_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id} +type ItemItemActionsRunsWithRun_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsRunsWithRun_ItemRequestBuilderGetQueryParameters gets a specific workflow run.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsRunsWithRun_ItemRequestBuilderGetQueryParameters struct { + // If `true` pull requests are omitted from the response (empty array). + Exclude_pull_requests *bool `uriparametername:"exclude_pull_requests"` +} +// Approvals the approvals property +// returns a *ItemItemActionsRunsItemApprovalsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Approvals()(*ItemItemActionsRunsItemApprovalsRequestBuilder) { + return NewItemItemActionsRunsItemApprovalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Approve the approve property +// returns a *ItemItemActionsRunsItemApproveRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Approve()(*ItemItemActionsRunsItemApproveRequestBuilder) { + return NewItemItemActionsRunsItemApproveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Artifacts the artifacts property +// returns a *ItemItemActionsRunsItemArtifactsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Artifacts()(*ItemItemActionsRunsItemArtifactsRequestBuilder) { + return NewItemItemActionsRunsItemArtifactsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Attempts the attempts property +// returns a *ItemItemActionsRunsItemAttemptsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Attempts()(*ItemItemActionsRunsItemAttemptsRequestBuilder) { + return NewItemItemActionsRunsItemAttemptsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Cancel the cancel property +// returns a *ItemItemActionsRunsItemCancelRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Cancel()(*ItemItemActionsRunsItemCancelRequestBuilder) { + return NewItemItemActionsRunsItemCancelRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsRunsWithRun_ItemRequestBuilderInternal instantiates a new ItemItemActionsRunsWithRun_ItemRequestBuilder and sets the default values. +func NewItemItemActionsRunsWithRun_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsWithRun_ItemRequestBuilder) { + m := &ItemItemActionsRunsWithRun_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}{?exclude_pull_requests*}", pathParameters), + } + return m +} +// NewItemItemActionsRunsWithRun_ItemRequestBuilder instantiates a new ItemItemActionsRunsWithRun_ItemRequestBuilder and sets the default values. +func NewItemItemActionsRunsWithRun_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsRunsWithRun_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsRunsWithRun_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a specific workflow run.Anyone with write access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#delete-a-workflow-run +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Deployment_protection_rule the deployment_protection_rule property +// returns a *ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Deployment_protection_rule()(*ItemItemActionsRunsItemDeployment_protection_ruleRequestBuilder) { + return NewItemItemActionsRunsItemDeployment_protection_ruleRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ForceCancel the forceCancel property +// returns a *ItemItemActionsRunsItemForceCancelRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) ForceCancel()(*ItemItemActionsRunsItemForceCancelRequestBuilder) { + return NewItemItemActionsRunsItemForceCancelRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets a specific workflow run.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a WorkflowRunable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#get-a-workflow-run +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsWithRun_ItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowRunFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable), nil +} +// Jobs the jobs property +// returns a *ItemItemActionsRunsItemJobsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Jobs()(*ItemItemActionsRunsItemJobsRequestBuilder) { + return NewItemItemActionsRunsItemJobsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Logs the logs property +// returns a *ItemItemActionsRunsItemLogsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Logs()(*ItemItemActionsRunsItemLogsRequestBuilder) { + return NewItemItemActionsRunsItemLogsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Pending_deployments the pending_deployments property +// returns a *ItemItemActionsRunsItemPending_deploymentsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Pending_deployments()(*ItemItemActionsRunsItemPending_deploymentsRequestBuilder) { + return NewItemItemActionsRunsItemPending_deploymentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rerun the rerun property +// returns a *ItemItemActionsRunsItemRerunRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Rerun()(*ItemItemActionsRunsItemRerunRequestBuilder) { + return NewItemItemActionsRunsItemRerunRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// RerunFailedJobs the rerunFailedJobs property +// returns a *ItemItemActionsRunsItemRerunFailedJobsRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) RerunFailedJobs()(*ItemItemActionsRunsItemRerunFailedJobsRequestBuilder) { + return NewItemItemActionsRunsItemRerunFailedJobsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Timing the timing property +// returns a *ItemItemActionsRunsItemTimingRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Timing()(*ItemItemActionsRunsItemTimingRequestBuilder) { + return NewItemItemActionsRunsItemTimingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a specific workflow run.Anyone with write access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific workflow run.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsWithRun_ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsRunsWithRun_ItemRequestBuilder when successful +func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsRunsWithRun_ItemRequestBuilder) { + return NewItemItemActionsRunsWithRun_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_secrets_get_response.go b/pkg/github/repos/item_item_actions_secrets_get_response.go new file mode 100644 index 0000000..6cf6952 --- /dev/null +++ b/pkg/github/repos/item_item_actions_secrets_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable + // The total_count property + total_count *int32 +} +// NewItemItemActionsSecretsGetResponse instantiates a new ItemItemActionsSecretsGetResponse and sets the default values. +func NewItemItemActionsSecretsGetResponse()(*ItemItemActionsSecretsGetResponse) { + m := &ItemItemActionsSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []ActionsSecretable when successful +func (m *ItemItemActionsSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemActionsSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemActionsSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemItemActionsSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemActionsSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_actions_secrets_item_with_secret_name_put_request_body.go b/pkg/github/repos/item_item_actions_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..3add3c8 --- /dev/null +++ b/pkg/github/repos/item_item_actions_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-a-repository-public-key) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string +} +// NewItemItemActionsSecretsItemWithSecret_namePutRequestBody instantiates a new ItemItemActionsSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemItemActionsSecretsItemWithSecret_namePutRequestBody()(*ItemItemActionsSecretsItemWithSecret_namePutRequestBody) { + m := &ItemItemActionsSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-a-repository-public-key) endpoint. +// returns a *string when successful +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// Serialize serializes information the current object +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + 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 *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-a-repository-public-key) endpoint. +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *ItemItemActionsSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +type ItemItemActionsSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() +} diff --git a/pkg/github/repos/item_item_actions_secrets_public_key_request_builder.go b/pkg/github/repos/item_item_actions_secrets_public_key_request_builder.go new file mode 100644 index 0000000..d1e5874 --- /dev/null +++ b/pkg/github/repos/item_item_actions_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsSecretsPublicKeyRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\secrets\public-key +type ItemItemActionsSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsSecretsPublicKeyRequestBuilderInternal instantiates a new ItemItemActionsSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemActionsSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsSecretsPublicKeyRequestBuilder) { + m := &ItemItemActionsSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets/public-key", pathParameters), + } + return m +} +// NewItemItemActionsSecretsPublicKeyRequestBuilder instantiates a new ItemItemActionsSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemActionsSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-a-repository-public-key +func (m *ItemItemActionsSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsPublicKeyable), nil +} +// ToGetRequestInformation gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemActionsSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsSecretsPublicKeyRequestBuilder) { + return NewItemItemActionsSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_secrets_request_builder.go b/pkg/github/repos/item_item_actions_secrets_request_builder.go new file mode 100644 index 0000000..d362057 --- /dev/null +++ b/pkg/github/repos/item_item_actions_secrets_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsSecretsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\secrets +type ItemItemActionsSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsSecretsRequestBuilderGetQueryParameters lists all secrets available in a repository without revealing their encryptedvalues.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.secrets.item collection +// returns a *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemActionsSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemItemActionsSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsSecretsRequestBuilderInternal instantiates a new ItemItemActionsSecretsRequestBuilder and sets the default values. +func NewItemItemActionsSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsSecretsRequestBuilder) { + m := &ItemItemActionsSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsSecretsRequestBuilder instantiates a new ItemItemActionsSecretsRequestBuilder and sets the default values. +func NewItemItemActionsSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all secrets available in a repository without revealing their encryptedvalues.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-repository-secrets +func (m *ItemItemActionsSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsSecretsRequestBuilderGetQueryParameters])(ItemItemActionsSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemItemActionsSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemActionsSecretsRequestBuilder) PublicKey()(*ItemItemActionsSecretsPublicKeyRequestBuilder) { + return NewItemItemActionsSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all secrets available in a repository without revealing their encryptedvalues.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsSecretsRequestBuilder when successful +func (m *ItemItemActionsSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsSecretsRequestBuilder) { + return NewItemItemActionsSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_secrets_with_secret_name_item_request_builder.go b/pkg/github/repos/item_item_actions_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..070acf1 --- /dev/null +++ b/pkg/github/repos/item_item_actions_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\secrets\{secret_name} +type ItemItemActionsSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemItemActionsSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemActionsSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemItemActionsSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemItemActionsSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemItemActionsSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemActionsSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a secret in a repository using the secret name.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#delete-a-repository-secret +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a single repository secret without revealing its encrypted value.The authenticated user must have collaborator access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-a-repository-secret +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable), nil +} +// Put creates or updates a repository secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-a-repository-secret +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemItemActionsSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToDeleteRequestInformation deletes a secret in a repository using the secret name.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a single repository secret without revealing its encrypted value.The authenticated user must have collaborator access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates a repository secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemActionsSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsSecretsWithSecret_nameItemRequestBuilder) { + return NewItemItemActionsSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_variables_get_response.go b/pkg/github/repos/item_item_actions_variables_get_response.go new file mode 100644 index 0000000..759fedf --- /dev/null +++ b/pkg/github/repos/item_item_actions_variables_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsVariablesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The variables property + variables []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable +} +// NewItemItemActionsVariablesGetResponse instantiates a new ItemItemActionsVariablesGetResponse and sets the default values. +func NewItemItemActionsVariablesGetResponse()(*ItemItemActionsVariablesGetResponse) { + m := &ItemItemActionsVariablesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsVariablesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsVariablesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsVariablesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsVariablesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsVariablesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["variables"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsVariableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) + } + } + m.SetVariables(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsVariablesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetVariables gets the variables property value. The variables property +// returns a []ActionsVariableable when successful +func (m *ItemItemActionsVariablesGetResponse) GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) { + return m.variables +} +// Serialize serializes information the current object +func (m *ItemItemActionsVariablesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetVariables() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVariables())) + for i, v := range m.GetVariables() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("variables", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemActionsVariablesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsVariablesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetVariables sets the variables property value. The variables property +func (m *ItemItemActionsVariablesGetResponse) SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable)() { + m.variables = value +} +type ItemItemActionsVariablesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) + SetTotalCount(value *int32)() + SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable)() +} diff --git a/pkg/github/repos/item_item_actions_variables_item_with_name_patch_request_body.go b/pkg/github/repos/item_item_actions_variables_item_with_name_patch_request_body.go new file mode 100644 index 0000000..748b2d1 --- /dev/null +++ b/pkg/github/repos/item_item_actions_variables_item_with_name_patch_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsVariablesItemWithNamePatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the variable. + name *string + // The value of the variable. + value *string +} +// NewItemItemActionsVariablesItemWithNamePatchRequestBody instantiates a new ItemItemActionsVariablesItemWithNamePatchRequestBody and sets the default values. +func NewItemItemActionsVariablesItemWithNamePatchRequestBody()(*ItemItemActionsVariablesItemWithNamePatchRequestBody) { + m := &ItemItemActionsVariablesItemWithNamePatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsVariablesItemWithNamePatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsVariablesItemWithNamePatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsVariablesItemWithNamePatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) GetName()(*string) { + return m.name +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ItemItemActionsVariablesItemWithNamePatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name of the variable. +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ItemItemActionsVariablesItemWithNamePatchRequestBody) SetValue(value *string)() { + m.value = value +} +type ItemItemActionsVariablesItemWithNamePatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetValue()(*string) + SetName(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/repos/item_item_actions_variables_post_request_body.go b/pkg/github/repos/item_item_actions_variables_post_request_body.go new file mode 100644 index 0000000..d1b4f5d --- /dev/null +++ b/pkg/github/repos/item_item_actions_variables_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsVariablesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the variable. + name *string + // The value of the variable. + value *string +} +// NewItemItemActionsVariablesPostRequestBody instantiates a new ItemItemActionsVariablesPostRequestBody and sets the default values. +func NewItemItemActionsVariablesPostRequestBody()(*ItemItemActionsVariablesPostRequestBody) { + m := &ItemItemActionsVariablesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsVariablesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsVariablesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsVariablesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsVariablesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsVariablesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ItemItemActionsVariablesPostRequestBody) GetName()(*string) { + return m.name +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ItemItemActionsVariablesPostRequestBody) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemItemActionsVariablesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ItemItemActionsVariablesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name of the variable. +func (m *ItemItemActionsVariablesPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ItemItemActionsVariablesPostRequestBody) SetValue(value *string)() { + m.value = value +} +type ItemItemActionsVariablesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetValue()(*string) + SetName(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/repos/item_item_actions_variables_request_builder.go b/pkg/github/repos/item_item_actions_variables_request_builder.go new file mode 100644 index 0000000..5ab73ba --- /dev/null +++ b/pkg/github/repos/item_item_actions_variables_request_builder.go @@ -0,0 +1,107 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsVariablesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\variables +type ItemItemActionsVariablesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsVariablesRequestBuilderGetQueryParameters lists all repository variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemActionsVariablesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.variables.item collection +// returns a *ItemItemActionsVariablesWithNameItemRequestBuilder when successful +func (m *ItemItemActionsVariablesRequestBuilder) ByName(name string)(*ItemItemActionsVariablesWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemItemActionsVariablesWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsVariablesRequestBuilderInternal instantiates a new ItemItemActionsVariablesRequestBuilder and sets the default values. +func NewItemItemActionsVariablesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsVariablesRequestBuilder) { + m := &ItemItemActionsVariablesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsVariablesRequestBuilder instantiates a new ItemItemActionsVariablesRequestBuilder and sets the default values. +func NewItemItemActionsVariablesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsVariablesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsVariablesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all repository variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemActionsVariablesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#list-repository-variables +func (m *ItemItemActionsVariablesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsVariablesRequestBuilderGetQueryParameters])(ItemItemActionsVariablesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsVariablesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsVariablesGetResponseable), nil +} +// Post creates a repository variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#create-a-repository-variable +func (m *ItemItemActionsVariablesRequestBuilder) Post(ctx context.Context, body ItemItemActionsVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToGetRequestInformation lists all repository variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsVariablesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsVariablesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a repository variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsVariablesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsVariablesRequestBuilder when successful +func (m *ItemItemActionsVariablesRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsVariablesRequestBuilder) { + return NewItemItemActionsVariablesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_variables_with_name_item_request_builder.go b/pkg/github/repos/item_item_actions_variables_with_name_item_request_builder.go new file mode 100644 index 0000000..ac26fe3 --- /dev/null +++ b/pkg/github/repos/item_item_actions_variables_with_name_item_request_builder.go @@ -0,0 +1,105 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsVariablesWithNameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\variables\{name} +type ItemItemActionsVariablesWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsVariablesWithNameItemRequestBuilderInternal instantiates a new ItemItemActionsVariablesWithNameItemRequestBuilder and sets the default values. +func NewItemItemActionsVariablesWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsVariablesWithNameItemRequestBuilder) { + m := &ItemItemActionsVariablesWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables/{name}", pathParameters), + } + return m +} +// NewItemItemActionsVariablesWithNameItemRequestBuilder instantiates a new ItemItemActionsVariablesWithNameItemRequestBuilder and sets the default values. +func NewItemItemActionsVariablesWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsVariablesWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsVariablesWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a repository variable using the variable name.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#delete-a-repository-variable +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific variable in a repository.The authenticated user must have collaborator access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsVariableable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#get-a-repository-variable +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsVariableFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable), nil +} +// Patch updates a repository variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#update-a-repository-variable +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) Patch(ctx context.Context, body ItemItemActionsVariablesItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes a repository variable using the variable name.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific variable in a repository.The authenticated user must have collaborator access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a repository variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemActionsVariablesItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsVariablesWithNameItemRequestBuilder when successful +func (m *ItemItemActionsVariablesWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsVariablesWithNameItemRequestBuilder) { + return NewItemItemActionsVariablesWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_get_response.go b/pkg/github/repos/item_item_actions_workflows_get_response.go new file mode 100644 index 0000000..4221d72 --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsWorkflowsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The workflows property + workflows []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable +} +// NewItemItemActionsWorkflowsGetResponse instantiates a new ItemItemActionsWorkflowsGetResponse and sets the default values. +func NewItemItemActionsWorkflowsGetResponse()(*ItemItemActionsWorkflowsGetResponse) { + m := &ItemItemActionsWorkflowsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsWorkflowsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsWorkflowsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsWorkflowsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsWorkflowsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsWorkflowsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable) + } + } + m.SetWorkflows(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsWorkflowsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetWorkflows gets the workflows property value. The workflows property +// returns a []Workflowable when successful +func (m *ItemItemActionsWorkflowsGetResponse) GetWorkflows()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable) { + return m.workflows +} +// Serialize serializes information the current object +func (m *ItemItemActionsWorkflowsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetWorkflows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkflows())) + for i, v := range m.GetWorkflows() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("workflows", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemActionsWorkflowsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsWorkflowsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetWorkflows sets the workflows property value. The workflows property +func (m *ItemItemActionsWorkflowsGetResponse) SetWorkflows(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable)() { + m.workflows = value +} +type ItemItemActionsWorkflowsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetWorkflows()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable) + SetTotalCount(value *int32)() + SetWorkflows(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable)() +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_disable_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_disable_request_builder.go new file mode 100644 index 0000000..516215f --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_disable_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsWorkflowsItemDisableRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\disable +type ItemItemActionsWorkflowsItemDisableRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsWorkflowsItemDisableRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsItemDisableRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemDisableRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemDisableRequestBuilder) { + m := &ItemItemActionsWorkflowsItemDisableRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/disable", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsItemDisableRequestBuilder instantiates a new ItemItemActionsWorkflowsItemDisableRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemDisableRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemDisableRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsItemDisableRequestBuilderInternal(urlParams, requestAdapter) +} +// Put disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflows#disable-a-workflow +func (m *ItemItemActionsWorkflowsItemDisableRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPutRequestInformation disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsItemDisableRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsItemDisableRequestBuilder when successful +func (m *ItemItemActionsWorkflowsItemDisableRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsItemDisableRequestBuilder) { + return NewItemItemActionsWorkflowsItemDisableRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_dispatches_post_request_body.go b/pkg/github/repos/item_item_actions_workflows_item_dispatches_post_request_body.go new file mode 100644 index 0000000..d156f3a --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_dispatches_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemActionsWorkflowsItemDispatchesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. + inputs ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable + // The git reference for the workflow. The reference can be a branch or tag name. + ref *string +} +// NewItemItemActionsWorkflowsItemDispatchesPostRequestBody instantiates a new ItemItemActionsWorkflowsItemDispatchesPostRequestBody and sets the default values. +func NewItemItemActionsWorkflowsItemDispatchesPostRequestBody()(*ItemItemActionsWorkflowsItemDispatchesPostRequestBody) { + m := &ItemItemActionsWorkflowsItemDispatchesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsWorkflowsItemDispatchesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsWorkflowsItemDispatchesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsWorkflowsItemDispatchesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["inputs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInputs(val.(ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable)) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + return res +} +// GetInputs gets the inputs property value. Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. +// returns a ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable when successful +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) GetInputs()(ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable) { + return m.inputs +} +// GetRef gets the ref property value. The git reference for the workflow. The reference can be a branch or tag name. +// returns a *string when successful +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) GetRef()(*string) { + return m.ref +} +// Serialize serializes information the current object +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("inputs", m.GetInputs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + 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 *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetInputs sets the inputs property value. Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) SetInputs(value ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable)() { + m.inputs = value +} +// SetRef sets the ref property value. The git reference for the workflow. The reference can be a branch or tag name. +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody) SetRef(value *string)() { + m.ref = value +} +type ItemItemActionsWorkflowsItemDispatchesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInputs()(ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable) + GetRef()(*string) + SetInputs(value ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable)() + SetRef(value *string)() +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_dispatches_post_request_body_inputs.go b/pkg/github/repos/item_item_actions_workflows_item_dispatches_post_request_body_inputs.go new file mode 100644 index 0000000..29ed3ce --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_dispatches_post_request_body_inputs.go @@ -0,0 +1,52 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. +type ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs instantiates a new ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs and sets the default values. +func NewItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs()(*ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs) { + m := &ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputs) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemActionsWorkflowsItemDispatchesPostRequestBody_inputsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_dispatches_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_dispatches_request_builder.go new file mode 100644 index 0000000..37840d9 --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_dispatches_request_builder.go @@ -0,0 +1,55 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsWorkflowsItemDispatchesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\dispatches +type ItemItemActionsWorkflowsItemDispatchesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsWorkflowsItemDispatchesRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsItemDispatchesRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemDispatchesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemDispatchesRequestBuilder) { + m := &ItemItemActionsWorkflowsItemDispatchesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/dispatches", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsItemDispatchesRequestBuilder instantiates a new ItemItemActionsWorkflowsItemDispatchesRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemDispatchesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemDispatchesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsItemDispatchesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post you can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflows#create-a-workflow-dispatch-event +func (m *ItemItemActionsWorkflowsItemDispatchesRequestBuilder) Post(ctx context.Context, body ItemItemActionsWorkflowsItemDispatchesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation you can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)."OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsItemDispatchesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsWorkflowsItemDispatchesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsItemDispatchesRequestBuilder when successful +func (m *ItemItemActionsWorkflowsItemDispatchesRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsItemDispatchesRequestBuilder) { + return NewItemItemActionsWorkflowsItemDispatchesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_enable_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_enable_request_builder.go new file mode 100644 index 0000000..ccba796 --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_enable_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsWorkflowsItemEnableRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\enable +type ItemItemActionsWorkflowsItemEnableRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsWorkflowsItemEnableRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsItemEnableRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemEnableRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemEnableRequestBuilder) { + m := &ItemItemActionsWorkflowsItemEnableRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/enable", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsItemEnableRequestBuilder instantiates a new ItemItemActionsWorkflowsItemEnableRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemEnableRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemEnableRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsItemEnableRequestBuilderInternal(urlParams, requestAdapter) +} +// Put enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflows#enable-a-workflow +func (m *ItemItemActionsWorkflowsItemEnableRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToPutRequestInformation enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsItemEnableRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsItemEnableRequestBuilder when successful +func (m *ItemItemActionsWorkflowsItemEnableRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsItemEnableRequestBuilder) { + return NewItemItemActionsWorkflowsItemEnableRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_runs_get_response.go b/pkg/github/repos/item_item_actions_workflows_item_runs_get_response.go new file mode 100644 index 0000000..972073b --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_runs_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemActionsWorkflowsItemRunsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The workflow_runs property + workflow_runs []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable +} +// NewItemItemActionsWorkflowsItemRunsGetResponse instantiates a new ItemItemActionsWorkflowsItemRunsGetResponse and sets the default values. +func NewItemItemActionsWorkflowsItemRunsGetResponse()(*ItemItemActionsWorkflowsItemRunsGetResponse) { + m := &ItemItemActionsWorkflowsItemRunsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemActionsWorkflowsItemRunsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemActionsWorkflowsItemRunsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemActionsWorkflowsItemRunsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["workflow_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowRunFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable) + } + } + m.SetWorkflowRuns(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetWorkflowRuns gets the workflow_runs property value. The workflow_runs property +// returns a []WorkflowRunable when successful +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) GetWorkflowRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable) { + return m.workflow_runs +} +// Serialize serializes information the current object +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetWorkflowRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkflowRuns())) + for i, v := range m.GetWorkflowRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("workflow_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetWorkflowRuns sets the workflow_runs property value. The workflow_runs property +func (m *ItemItemActionsWorkflowsItemRunsGetResponse) SetWorkflowRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable)() { + m.workflow_runs = value +} +type ItemItemActionsWorkflowsItemRunsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetWorkflowRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable) + SetTotalCount(value *int32)() + SetWorkflowRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowRunable)() +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go new file mode 100644 index 0000000..b2fb7e0 --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go @@ -0,0 +1,81 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i5db427d25b4b85ca0db3612cbfe356a3952902b47a9c8701d9a0d82b4885ba46 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/actions/workflows/item/runs" +) + +// ItemItemActionsWorkflowsItemRunsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\runs +type ItemItemActionsWorkflowsItemRunsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters struct { + // Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. + Actor *string `uriparametername:"actor"` + // Returns workflow runs associated with a branch. Use the name of the branch of the `push`. + Branch *string `uriparametername:"branch"` + // Returns workflow runs with the `check_suite_id` that you specify. + Check_suite_id *int32 `uriparametername:"check_suite_id"` + // Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-cloud@latest//search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + Created *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"created"` + // Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/enterprise-cloud@latest//actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." + Event *string `uriparametername:"event"` + // If `true` pull requests are omitted from the response (empty array). + Exclude_pull_requests *bool `uriparametername:"exclude_pull_requests"` + // Only returns workflow runs that are associated with the specified `head_sha`. + Head_sha *string `uriparametername:"head_sha"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`. + Status *i5db427d25b4b85ca0db3612cbfe356a3952902b47a9c8701d9a0d82b4885ba46.GetStatusQueryParameterType `uriparametername:"status"` +} +// NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsItemRunsRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemRunsRequestBuilder) { + m := &ItemItemActionsWorkflowsItemRunsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/runs{?actor*,branch*,check_suite_id*,created*,event*,exclude_pull_requests*,head_sha*,page*,per_page*,status*}", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsItemRunsRequestBuilder instantiates a new ItemItemActionsWorkflowsItemRunsRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemRunsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemActionsWorkflowsItemRunsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#list-workflow-runs-for-a-workflow +func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters])(ItemItemActionsWorkflowsItemRunsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsWorkflowsItemRunsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsWorkflowsItemRunsGetResponseable), nil +} +// ToGetRequestInformation list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsItemRunsRequestBuilder when successful +func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsItemRunsRequestBuilder) { + return NewItemItemActionsWorkflowsItemRunsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_item_timing_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_timing_request_builder.go new file mode 100644 index 0000000..13e83fc --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_item_timing_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsWorkflowsItemTimingRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\timing +type ItemItemActionsWorkflowsItemTimingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsWorkflowsItemTimingRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsItemTimingRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemTimingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemTimingRequestBuilder) { + m := &ItemItemActionsWorkflowsItemTimingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/timing", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsItemTimingRequestBuilder instantiates a new ItemItemActionsWorkflowsItemTimingRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsItemTimingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsItemTimingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsItemTimingRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub Enterprise Cloud-hosted runners. Usage is listed for each GitHub Enterprise Cloud-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a WorkflowUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflows#get-workflow-usage +func (m *ItemItemActionsWorkflowsItemTimingRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WorkflowUsageable), nil +} +// ToGetRequestInformation gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub Enterprise Cloud-hosted runners. Usage is listed for each GitHub Enterprise Cloud-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsItemTimingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsItemTimingRequestBuilder when successful +func (m *ItemItemActionsWorkflowsItemTimingRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsItemTimingRequestBuilder) { + return NewItemItemActionsWorkflowsItemTimingRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_request_builder.go b/pkg/github/repos/item_item_actions_workflows_request_builder.go new file mode 100644 index 0000000..ff69ca3 --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_request_builder.go @@ -0,0 +1,74 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemActionsWorkflowsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows +type ItemItemActionsWorkflowsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActionsWorkflowsRequestBuilderGetQueryParameters lists the workflows in a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemActionsWorkflowsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByWorkflow_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.actions.workflows.item collection +// returns a *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder when successful +func (m *ItemItemActionsWorkflowsRequestBuilder) ByWorkflow_id(workflow_id int32)(*ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["workflow_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(workflow_id), 10) + return NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemActionsWorkflowsRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsRequestBuilder) { + m := &ItemItemActionsWorkflowsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsRequestBuilder instantiates a new ItemItemActionsWorkflowsRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the workflows in a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemActionsWorkflowsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflows#list-repository-workflows +func (m *ItemItemActionsWorkflowsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsWorkflowsRequestBuilderGetQueryParameters])(ItemItemActionsWorkflowsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsWorkflowsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemActionsWorkflowsGetResponseable), nil +} +// ToGetRequestInformation lists the workflows in a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsWorkflowsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsRequestBuilder when successful +func (m *ItemItemActionsWorkflowsRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsRequestBuilder) { + return NewItemItemActionsWorkflowsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_actions_workflows_with_workflow_item_request_builder.go b/pkg/github/repos/item_item_actions_workflows_with_workflow_item_request_builder.go new file mode 100644 index 0000000..22d636c --- /dev/null +++ b/pkg/github/repos/item_item_actions_workflows_with_workflow_item_request_builder.go @@ -0,0 +1,82 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id} +type ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) { + m := &ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}", pathParameters), + } + return m +} +// NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder instantiates a new ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder and sets the default values. +func NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Disable the disable property +// returns a *ItemItemActionsWorkflowsItemDisableRequestBuilder when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) Disable()(*ItemItemActionsWorkflowsItemDisableRequestBuilder) { + return NewItemItemActionsWorkflowsItemDisableRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Dispatches the dispatches property +// returns a *ItemItemActionsWorkflowsItemDispatchesRequestBuilder when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) Dispatches()(*ItemItemActionsWorkflowsItemDispatchesRequestBuilder) { + return NewItemItemActionsWorkflowsItemDispatchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Enable the enable property +// returns a *ItemItemActionsWorkflowsItemEnableRequestBuilder when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) Enable()(*ItemItemActionsWorkflowsItemEnableRequestBuilder) { + return NewItemItemActionsWorkflowsItemEnableRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets a specific workflow. You can replace `workflow_id` with the workflowfile name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a Workflowable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/workflows#get-a-workflow +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWorkflowFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Workflowable), nil +} +// Runs the runs property +// returns a *ItemItemActionsWorkflowsItemRunsRequestBuilder when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) Runs()(*ItemItemActionsWorkflowsItemRunsRequestBuilder) { + return NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Timing the timing property +// returns a *ItemItemActionsWorkflowsItemTimingRequestBuilder when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) Timing()(*ItemItemActionsWorkflowsItemTimingRequestBuilder) { + return NewItemItemActionsWorkflowsItemTimingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets a specific workflow. You can replace `workflow_id` with the workflowfile name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder when successful +func (m *ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder) { + return NewItemItemActionsWorkflowsWithWorkflow_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_activity_request_builder.go b/pkg/github/repos/item_item_activity_request_builder.go new file mode 100644 index 0000000..42ca098 --- /dev/null +++ b/pkg/github/repos/item_item_activity_request_builder.go @@ -0,0 +1,84 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ib37e34869e811df582ca7d33a04e21ffb04b609da48f184ddcb796e1b622cac1 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/activity" +) + +// ItemItemActivityRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\activity +type ItemItemActivityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemActivityRequestBuilderGetQueryParameters lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users.For more information about viewing repository activity,see "[Viewing activity and data for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository)." +type ItemItemActivityRequestBuilderGetQueryParameters struct { + // The activity type to filter by.For example, you can choose to filter by "force_push", to see all force pushes to the repository. + Activity_type *ib37e34869e811df582ca7d33a04e21ffb04b609da48f184ddcb796e1b622cac1.GetActivity_typeQueryParameterType `uriparametername:"activity_type"` + // The GitHub username to use to filter by the actor who performed the activity. + Actor *string `uriparametername:"actor"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *ib37e34869e811df582ca7d33a04e21ffb04b609da48f184ddcb796e1b622cac1.GetDirectionQueryParameterType `uriparametername:"direction"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The Git reference for the activities you want to list.The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch. + Ref *string `uriparametername:"ref"` + // The time period to filter by.For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours). + Time_period *ib37e34869e811df582ca7d33a04e21ffb04b609da48f184ddcb796e1b622cac1.GetTime_periodQueryParameterType `uriparametername:"time_period"` +} +// NewItemItemActivityRequestBuilderInternal instantiates a new ItemItemActivityRequestBuilder and sets the default values. +func NewItemItemActivityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActivityRequestBuilder) { + m := &ItemItemActivityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/activity{?activity_type*,actor*,after*,before*,direction*,per_page*,ref*,time_period*}", pathParameters), + } + return m +} +// NewItemItemActivityRequestBuilder instantiates a new ItemItemActivityRequestBuilder and sets the default values. +func NewItemItemActivityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemActivityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemActivityRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users.For more information about viewing repository activity,see "[Viewing activity and data for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository)." +// returns a []Activityable when successful +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-activities +func (m *ItemItemActivityRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActivityRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Activityable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActivityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Activityable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Activityable) + } + } + return val, nil +} +// ToGetRequestInformation lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users.For more information about viewing repository activity,see "[Viewing activity and data for your repository](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository)." +// returns a *RequestInformation when successful +func (m *ItemItemActivityRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActivityRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemActivityRequestBuilder when successful +func (m *ItemItemActivityRequestBuilder) WithUrl(rawUrl string)(*ItemItemActivityRequestBuilder) { + return NewItemItemActivityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_assignees_request_builder.go b/pkg/github/repos/item_item_assignees_request_builder.go new file mode 100644 index 0000000..4a0b66c --- /dev/null +++ b/pkg/github/repos/item_item_assignees_request_builder.go @@ -0,0 +1,83 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemAssigneesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\assignees +type ItemItemAssigneesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemAssigneesRequestBuilderGetQueryParameters lists the [available assignees](https://docs.github.com/enterprise-cloud@latest//articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. +type ItemItemAssigneesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByAssignee gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.assignees.item collection +// returns a *ItemItemAssigneesWithAssigneeItemRequestBuilder when successful +func (m *ItemItemAssigneesRequestBuilder) ByAssignee(assignee string)(*ItemItemAssigneesWithAssigneeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if assignee != "" { + urlTplParams["assignee"] = assignee + } + return NewItemItemAssigneesWithAssigneeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemAssigneesRequestBuilderInternal instantiates a new ItemItemAssigneesRequestBuilder and sets the default values. +func NewItemItemAssigneesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAssigneesRequestBuilder) { + m := &ItemItemAssigneesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/assignees{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemAssigneesRequestBuilder instantiates a new ItemItemAssigneesRequestBuilder and sets the default values. +func NewItemItemAssigneesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAssigneesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAssigneesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the [available assignees](https://docs.github.com/enterprise-cloud@latest//articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/assignees#list-assignees +func (m *ItemItemAssigneesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemAssigneesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the [available assignees](https://docs.github.com/enterprise-cloud@latest//articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. +// returns a *RequestInformation when successful +func (m *ItemItemAssigneesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemAssigneesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAssigneesRequestBuilder when successful +func (m *ItemItemAssigneesRequestBuilder) WithUrl(rawUrl string)(*ItemItemAssigneesRequestBuilder) { + return NewItemItemAssigneesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_assignees_with_assignee_item_request_builder.go b/pkg/github/repos/item_item_assignees_with_assignee_item_request_builder.go new file mode 100644 index 0000000..4d036f9 --- /dev/null +++ b/pkg/github/repos/item_item_assignees_with_assignee_item_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemAssigneesWithAssigneeItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\assignees\{assignee} +type ItemItemAssigneesWithAssigneeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemAssigneesWithAssigneeItemRequestBuilderInternal instantiates a new ItemItemAssigneesWithAssigneeItemRequestBuilder and sets the default values. +func NewItemItemAssigneesWithAssigneeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAssigneesWithAssigneeItemRequestBuilder) { + m := &ItemItemAssigneesWithAssigneeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/assignees/{assignee}", pathParameters), + } + return m +} +// NewItemItemAssigneesWithAssigneeItemRequestBuilder instantiates a new ItemItemAssigneesWithAssigneeItemRequestBuilder and sets the default values. +func NewItemItemAssigneesWithAssigneeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAssigneesWithAssigneeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAssigneesWithAssigneeItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get checks if a user has permission to be assigned to an issue in this repository.If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.Otherwise a `404` status code is returned. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/assignees#check-if-a-user-can-be-assigned +func (m *ItemItemAssigneesWithAssigneeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation checks if a user has permission to be assigned to an issue in this repository.If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.Otherwise a `404` status code is returned. +// returns a *RequestInformation when successful +func (m *ItemItemAssigneesWithAssigneeItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAssigneesWithAssigneeItemRequestBuilder when successful +func (m *ItemItemAssigneesWithAssigneeItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemAssigneesWithAssigneeItemRequestBuilder) { + return NewItemItemAssigneesWithAssigneeItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go new file mode 100644 index 0000000..820ff3a --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go @@ -0,0 +1,92 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attestations property + attestations []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse()(*ItemItemAttestationsItemWithSubject_digestGetResponse) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttestations gets the attestations property value. The attestations property +// returns a []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) GetAttestations()([]ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable) { + return m.attestations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + } + } + m.SetAttestations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttestations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttestations())) + for i, v := range m.GetAttestations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attestations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttestations sets the attestations property value. The attestations property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) SetAttestations(value []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() { + m.attestations = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestations()([]ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + SetAttestations(value []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go new file mode 100644 index 0000000..71b36e3 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable + // The repository_id property + repository_id *int32 +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() { + m.bundle = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) + GetRepositoryId()(*int32) + SetBundle(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go new file mode 100644 index 0000000..608b20c --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go @@ -0,0 +1,139 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dsseEnvelope property + dsseEnvelope ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetDsseEnvelope()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetVerificationMaterial()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetDsseEnvelope(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetVerificationMaterial(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go new file mode 100644 index 0000000..d482d9a --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go new file mode 100644 index 0000000..a526c65 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body.go b/pkg/github/repos/item_item_attestations_post_request_body.go new file mode 100644 index 0000000..988c270 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemItemAttestationsPostRequestBody_bundleable +} +// NewItemItemAttestationsPostRequestBody instantiates a new ItemItemAttestationsPostRequestBody and sets the default values. +func NewItemItemAttestationsPostRequestBody()(*ItemItemAttestationsPostRequestBody) { + m := &ItemItemAttestationsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemItemAttestationsPostRequestBody_bundleable when successful +func (m *ItemItemAttestationsPostRequestBody) GetBundle()(ItemItemAttestationsPostRequestBody_bundleable) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsPostRequestBody_bundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(ItemItemAttestationsPostRequestBody_bundleable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + 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 *ItemItemAttestationsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemItemAttestationsPostRequestBody) SetBundle(value ItemItemAttestationsPostRequestBody_bundleable)() { + m.bundle = value +} +type ItemItemAttestationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(ItemItemAttestationsPostRequestBody_bundleable) + SetBundle(value ItemItemAttestationsPostRequestBody_bundleable)() +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body_bundle.go b/pkg/github/repos/item_item_attestations_post_request_body_bundle.go new file mode 100644 index 0000000..2ff5fd5 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body_bundle.go @@ -0,0 +1,139 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemAttestationsPostRequestBody_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemItemAttestationsPostRequestBody_bundle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dsseEnvelope property + dsseEnvelope ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable +} +// NewItemItemAttestationsPostRequestBody_bundle instantiates a new ItemItemAttestationsPostRequestBody_bundle and sets the default values. +func NewItemItemAttestationsPostRequestBody_bundle()(*ItemItemAttestationsPostRequestBody_bundle) { + m := &ItemItemAttestationsPostRequestBody_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBody_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBody_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody_bundle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetDsseEnvelope()(ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsPostRequestBody_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetVerificationMaterial()(ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemItemAttestationsPostRequestBody_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemItemAttestationsPostRequestBody_bundle) SetDsseEnvelope(value ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemItemAttestationsPostRequestBody_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemItemAttestationsPostRequestBody_bundle) SetVerificationMaterial(value ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemItemAttestationsPostRequestBody_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable)() +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go b/pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go new file mode 100644 index 0000000..87a4c25 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsPostRequestBody_bundle_dsseEnvelope instantiates a new ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope and sets the default values. +func NewItemItemAttestationsPostRequestBody_bundle_dsseEnvelope()(*ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) { + m := &ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody_bundle_dsseEnvelope(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go b/pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go new file mode 100644 index 0000000..dcc88ce --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostRequestBody_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsPostRequestBody_bundle_verificationMaterial instantiates a new ItemItemAttestationsPostRequestBody_bundle_verificationMaterial and sets the default values. +func NewItemItemAttestationsPostRequestBody_bundle_verificationMaterial()(*ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) { + m := &ItemItemAttestationsPostRequestBody_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBody_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBody_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody_bundle_verificationMaterial(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_post_response.go b/pkg/github/repos/item_item_attestations_post_response.go new file mode 100644 index 0000000..e97c4a5 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_response.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the attestation. + id *int32 +} +// NewItemItemAttestationsPostResponse instantiates a new ItemItemAttestationsPostResponse and sets the default values. +func NewItemItemAttestationsPostResponse()(*ItemItemAttestationsPostResponse) { + m := &ItemItemAttestationsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAttestationsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the attestation. +// returns a *int32 when successful +func (m *ItemItemAttestationsPostResponse) GetId()(*int32) { + return m.id +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + 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 *ItemItemAttestationsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The ID of the attestation. +func (m *ItemItemAttestationsPostResponse) SetId(value *int32)() { + m.id = value +} +type ItemItemAttestationsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + SetId(value *int32)() +} diff --git a/pkg/github/repos/item_item_attestations_request_builder.go b/pkg/github/repos/item_item_attestations_request_builder.go new file mode 100644 index 0000000..bd1fb30 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_request_builder.go @@ -0,0 +1,79 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemAttestationsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\attestations +type ItemItemAttestationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySubject_digest gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.attestations.item collection +// returns a *ItemItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemItemAttestationsRequestBuilder) BySubject_digest(subject_digest string)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if subject_digest != "" { + urlTplParams["subject_digest"] = subject_digest + } + return NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemAttestationsRequestBuilderInternal instantiates a new ItemItemAttestationsRequestBuilder and sets the default values. +func NewItemItemAttestationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsRequestBuilder) { + m := &ItemItemAttestationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations", pathParameters), + } + return m +} +// NewItemItemAttestationsRequestBuilder instantiates a new ItemItemAttestationsRequestBuilder and sets the default values. +func NewItemItemAttestationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAttestationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemItemAttestationsPostResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-an-attestation +func (m *ItemItemAttestationsRequestBuilder) Post(ctx context.Context, body ItemItemAttestationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemAttestationsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemAttestationsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemAttestationsPostResponseable), nil +} +// ToPostRequestInformation store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemItemAttestationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemAttestationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAttestationsRequestBuilder when successful +func (m *ItemItemAttestationsRequestBuilder) WithUrl(rawUrl string)(*ItemItemAttestationsRequestBuilder) { + return NewItemItemAttestationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go b/pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go new file mode 100644 index 0000000..6852c72 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemAttestationsWithSubject_digestItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\attestations\{subject_digest} +type ItemItemAttestationsWithSubject_digestItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters list a collection of artifact attestations with a given subject digest that are associated with a repository.The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +type ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + m := &ItemItemAttestationsWithSubject_digestItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + } + return m +} +// NewItemItemAttestationsWithSubject_digestItemRequestBuilder instantiates a new ItemItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list a collection of artifact attestations with a given subject digest that are associated with a repository.The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemItemAttestationsItemWithSubject_digestGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-attestations +func (m *ItemItemAttestationsWithSubject_digestItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(ItemItemAttestationsItemWithSubject_digestGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemAttestationsItemWithSubject_digestGetResponseable), nil +} +// ToGetRequestInformation list a collection of artifact attestations with a given subject digest that are associated with a repository.The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemItemAttestationsWithSubject_digestItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemItemAttestationsWithSubject_digestItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + return NewItemItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_autolinks_post_request_body.go b/pkg/github/repos/item_item_autolinks_post_request_body.go new file mode 100644 index 0000000..bf822bd --- /dev/null +++ b/pkg/github/repos/item_item_autolinks_post_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAutolinksPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + is_alphanumeric *bool + // This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. + key_prefix *string + // The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. + url_template *string +} +// NewItemItemAutolinksPostRequestBody instantiates a new ItemItemAutolinksPostRequestBody and sets the default values. +func NewItemItemAutolinksPostRequestBody()(*ItemItemAutolinksPostRequestBody) { + m := &ItemItemAutolinksPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAutolinksPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAutolinksPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAutolinksPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemAutolinksPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAutolinksPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["is_alphanumeric"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAlphanumeric(val) + } + return nil + } + res["key_prefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyPrefix(val) + } + return nil + } + res["url_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrlTemplate(val) + } + return nil + } + return res +} +// GetIsAlphanumeric gets the is_alphanumeric property value. Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. +// returns a *bool when successful +func (m *ItemItemAutolinksPostRequestBody) GetIsAlphanumeric()(*bool) { + return m.is_alphanumeric +} +// GetKeyPrefix gets the key_prefix property value. This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. +// returns a *string when successful +func (m *ItemItemAutolinksPostRequestBody) GetKeyPrefix()(*string) { + return m.key_prefix +} +// GetUrlTemplate gets the url_template property value. The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. +// returns a *string when successful +func (m *ItemItemAutolinksPostRequestBody) GetUrlTemplate()(*string) { + return m.url_template +} +// Serialize serializes information the current object +func (m *ItemItemAutolinksPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("is_alphanumeric", m.GetIsAlphanumeric()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_prefix", m.GetKeyPrefix()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url_template", m.GetUrlTemplate()) + 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 *ItemItemAutolinksPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIsAlphanumeric sets the is_alphanumeric property value. Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. +func (m *ItemItemAutolinksPostRequestBody) SetIsAlphanumeric(value *bool)() { + m.is_alphanumeric = value +} +// SetKeyPrefix sets the key_prefix property value. This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. +func (m *ItemItemAutolinksPostRequestBody) SetKeyPrefix(value *string)() { + m.key_prefix = value +} +// SetUrlTemplate sets the url_template property value. The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. +func (m *ItemItemAutolinksPostRequestBody) SetUrlTemplate(value *string)() { + m.url_template = value +} +type ItemItemAutolinksPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsAlphanumeric()(*bool) + GetKeyPrefix()(*string) + GetUrlTemplate()(*string) + SetIsAlphanumeric(value *bool)() + SetKeyPrefix(value *string)() + SetUrlTemplate(value *string)() +} diff --git a/pkg/github/repos/item_item_autolinks_request_builder.go b/pkg/github/repos/item_item_autolinks_request_builder.go new file mode 100644 index 0000000..9c32b7e --- /dev/null +++ b/pkg/github/repos/item_item_autolinks_request_builder.go @@ -0,0 +1,106 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemAutolinksRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\autolinks +type ItemItemAutolinksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAutolink_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.autolinks.item collection +// returns a *ItemItemAutolinksWithAutolink_ItemRequestBuilder when successful +func (m *ItemItemAutolinksRequestBuilder) ByAutolink_id(autolink_id int32)(*ItemItemAutolinksWithAutolink_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["autolink_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(autolink_id), 10) + return NewItemItemAutolinksWithAutolink_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemAutolinksRequestBuilderInternal instantiates a new ItemItemAutolinksRequestBuilder and sets the default values. +func NewItemItemAutolinksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAutolinksRequestBuilder) { + m := &ItemItemAutolinksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/autolinks", pathParameters), + } + return m +} +// NewItemItemAutolinksRequestBuilder instantiates a new ItemItemAutolinksRequestBuilder and sets the default values. +func NewItemItemAutolinksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAutolinksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAutolinksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets all autolinks that are configured for a repository.Information about autolinks are only available to repository administrators. +// returns a []Autolinkable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/autolinks#get-all-autolinks-of-a-repository +func (m *ItemItemAutolinksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAutolinkFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable) + } + } + return val, nil +} +// Post users with admin access to the repository can create an autolink. +// returns a Autolinkable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/autolinks#create-an-autolink-reference-for-a-repository +func (m *ItemItemAutolinksRequestBuilder) Post(ctx context.Context, body ItemItemAutolinksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAutolinkFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable), nil +} +// ToGetRequestInformation gets all autolinks that are configured for a repository.Information about autolinks are only available to repository administrators. +// returns a *RequestInformation when successful +func (m *ItemItemAutolinksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation users with admin access to the repository can create an autolink. +// returns a *RequestInformation when successful +func (m *ItemItemAutolinksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemAutolinksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAutolinksRequestBuilder when successful +func (m *ItemItemAutolinksRequestBuilder) WithUrl(rawUrl string)(*ItemItemAutolinksRequestBuilder) { + return NewItemItemAutolinksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_autolinks_with_autolink_item_request_builder.go b/pkg/github/repos/item_item_autolinks_with_autolink_item_request_builder.go new file mode 100644 index 0000000..50d87ff --- /dev/null +++ b/pkg/github/repos/item_item_autolinks_with_autolink_item_request_builder.go @@ -0,0 +1,88 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemAutolinksWithAutolink_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\autolinks\{autolink_id} +type ItemItemAutolinksWithAutolink_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemAutolinksWithAutolink_ItemRequestBuilderInternal instantiates a new ItemItemAutolinksWithAutolink_ItemRequestBuilder and sets the default values. +func NewItemItemAutolinksWithAutolink_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAutolinksWithAutolink_ItemRequestBuilder) { + m := &ItemItemAutolinksWithAutolink_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/autolinks/{autolink_id}", pathParameters), + } + return m +} +// NewItemItemAutolinksWithAutolink_ItemRequestBuilder instantiates a new ItemItemAutolinksWithAutolink_ItemRequestBuilder and sets the default values. +func NewItemItemAutolinksWithAutolink_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAutolinksWithAutolink_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAutolinksWithAutolink_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete this deletes a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/autolinks#delete-an-autolink-reference-from-a-repository +func (m *ItemItemAutolinksWithAutolink_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get this returns a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. +// returns a Autolinkable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/autolinks#get-an-autolink-reference-of-a-repository +func (m *ItemItemAutolinksWithAutolink_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAutolinkFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Autolinkable), nil +} +// ToDeleteRequestInformation this deletes a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. +// returns a *RequestInformation when successful +func (m *ItemItemAutolinksWithAutolink_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation this returns a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. +// returns a *RequestInformation when successful +func (m *ItemItemAutolinksWithAutolink_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAutolinksWithAutolink_ItemRequestBuilder when successful +func (m *ItemItemAutolinksWithAutolink_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemAutolinksWithAutolink_ItemRequestBuilder) { + return NewItemItemAutolinksWithAutolink_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_automated_security_fixes_request_builder.go b/pkg/github/repos/item_item_automated_security_fixes_request_builder.go new file mode 100644 index 0000000..5572378 --- /dev/null +++ b/pkg/github/repos/item_item_automated_security_fixes_request_builder.go @@ -0,0 +1,101 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemAutomatedSecurityFixesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\automated-security-fixes +type ItemItemAutomatedSecurityFixesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemAutomatedSecurityFixesRequestBuilderInternal instantiates a new ItemItemAutomatedSecurityFixesRequestBuilder and sets the default values. +func NewItemItemAutomatedSecurityFixesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAutomatedSecurityFixesRequestBuilder) { + m := &ItemItemAutomatedSecurityFixesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/automated-security-fixes", pathParameters), + } + return m +} +// NewItemItemAutomatedSecurityFixesRequestBuilder instantiates a new ItemItemAutomatedSecurityFixesRequestBuilder and sets the default values. +func NewItemItemAutomatedSecurityFixesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAutomatedSecurityFixesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAutomatedSecurityFixesRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/enterprise-cloud@latest//articles/configuring-automated-security-fixes)". +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#disable-automated-security-fixes +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/enterprise-cloud@latest//articles/configuring-automated-security-fixes)". +// returns a CheckAutomatedSecurityFixesable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#check-if-automated-security-fixes-are-enabled-for-a-repository +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckAutomatedSecurityFixesable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckAutomatedSecurityFixesFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckAutomatedSecurityFixesable), nil +} +// Put enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/enterprise-cloud@latest//articles/configuring-automated-security-fixes)". +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#enable-automated-security-fixes +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/enterprise-cloud@latest//articles/configuring-automated-security-fixes)". +// returns a *RequestInformation when successful +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/enterprise-cloud@latest//articles/configuring-automated-security-fixes)". +// returns a *RequestInformation when successful +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/enterprise-cloud@latest//articles/configuring-automated-security-fixes)". +// returns a *RequestInformation when successful +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemAutomatedSecurityFixesRequestBuilder when successful +func (m *ItemItemAutomatedSecurityFixesRequestBuilder) WithUrl(rawUrl string)(*ItemItemAutomatedSecurityFixesRequestBuilder) { + return NewItemItemAutomatedSecurityFixesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_enforce_admins_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_enforce_admins_request_builder.go new file mode 100644 index 0000000..3a75636 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_enforce_admins_request_builder.go @@ -0,0 +1,111 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\enforce_admins +type ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) { + m := &ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/enforce_admins", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilder instantiates a new ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#delete-admin-branch-protection +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a ProtectedBranchAdminEnforcedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-admin-branch-protection +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchAdminEnforcedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable), nil +} +// Post protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. +// returns a ProtectedBranchAdminEnforcedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#set-admin-branch-protection +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchAdminEnforcedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable), nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) { + return NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body.go new file mode 100644 index 0000000..c3a8592 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body.go @@ -0,0 +1,370 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. + allow_deletions *bool + // Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." + allow_force_pushes *bool + // Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + allow_fork_syncing *bool + // If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. + block_creations *bool + // Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. + enforce_admins *bool + // Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + lock_branch *bool + // Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. + required_conversation_resolution *bool + // Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. + required_linear_history *bool + // Require at least one approving review on a pull request, before merging. Set to `null` to disable. + required_pull_request_reviews ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable + // Require status checks to pass before merging. Set to `null` to disable. + required_status_checks ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable + // Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. + restrictions ItemItemBranchesItemProtectionPutRequestBody_restrictionsable +} +// NewItemItemBranchesItemProtectionPutRequestBody instantiates a new ItemItemBranchesItemProtectionPutRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody()(*ItemItemBranchesItemProtectionPutRequestBody) { + m := &ItemItemBranchesItemProtectionPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowDeletions gets the allow_deletions property value. Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetAllowDeletions()(*bool) { + return m.allow_deletions +} +// GetAllowForcePushes gets the allow_force_pushes property value. Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetAllowForcePushes()(*bool) { + return m.allow_force_pushes +} +// GetAllowForkSyncing gets the allow_fork_syncing property value. Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetAllowForkSyncing()(*bool) { + return m.allow_fork_syncing +} +// GetBlockCreations gets the block_creations property value. If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetBlockCreations()(*bool) { + return m.block_creations +} +// GetEnforceAdmins gets the enforce_admins property value. Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetEnforceAdmins()(*bool) { + return m.enforce_admins +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_deletions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowDeletions(val) + } + return nil + } + res["allow_force_pushes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForcePushes(val) + } + return nil + } + res["allow_fork_syncing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForkSyncing(val) + } + return nil + } + res["block_creations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockCreations(val) + } + return nil + } + res["enforce_admins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforceAdmins(val) + } + return nil + } + res["lock_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockBranch(val) + } + return nil + } + res["required_conversation_resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiredConversationResolution(val) + } + return nil + } + res["required_linear_history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiredLinearHistory(val) + } + return nil + } + res["required_pull_request_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPullRequestReviews(val.(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable)) + } + return nil + } + res["required_status_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionPutRequestBody_required_status_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredStatusChecks(val.(ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable)) + } + return nil + } + res["restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionPutRequestBody_restrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestrictions(val.(ItemItemBranchesItemProtectionPutRequestBody_restrictionsable)) + } + return nil + } + return res +} +// GetLockBranch gets the lock_branch property value. Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetLockBranch()(*bool) { + return m.lock_branch +} +// GetRequiredConversationResolution gets the required_conversation_resolution property value. Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetRequiredConversationResolution()(*bool) { + return m.required_conversation_resolution +} +// GetRequiredLinearHistory gets the required_linear_history property value. Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetRequiredLinearHistory()(*bool) { + return m.required_linear_history +} +// GetRequiredPullRequestReviews gets the required_pull_request_reviews property value. Require at least one approving review on a pull request, before merging. Set to `null` to disable. +// returns a ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetRequiredPullRequestReviews()(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable) { + return m.required_pull_request_reviews +} +// GetRequiredStatusChecks gets the required_status_checks property value. Require status checks to pass before merging. Set to `null` to disable. +// returns a ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetRequiredStatusChecks()(ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable) { + return m.required_status_checks +} +// GetRestrictions gets the restrictions property value. Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. +// returns a ItemItemBranchesItemProtectionPutRequestBody_restrictionsable when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody) GetRestrictions()(ItemItemBranchesItemProtectionPutRequestBody_restrictionsable) { + return m.restrictions +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_deletions", m.GetAllowDeletions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_force_pushes", m.GetAllowForcePushes()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_fork_syncing", m.GetAllowForkSyncing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("block_creations", m.GetBlockCreations()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enforce_admins", m.GetEnforceAdmins()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("lock_branch", m.GetLockBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required_conversation_resolution", m.GetRequiredConversationResolution()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required_linear_history", m.GetRequiredLinearHistory()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_pull_request_reviews", m.GetRequiredPullRequestReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("required_status_checks", m.GetRequiredStatusChecks()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("restrictions", m.GetRestrictions()) + 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 *ItemItemBranchesItemProtectionPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowDeletions sets the allow_deletions property value. Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetAllowDeletions(value *bool)() { + m.allow_deletions = value +} +// SetAllowForcePushes sets the allow_force_pushes property value. Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetAllowForcePushes(value *bool)() { + m.allow_force_pushes = value +} +// SetAllowForkSyncing sets the allow_fork_syncing property value. Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetAllowForkSyncing(value *bool)() { + m.allow_fork_syncing = value +} +// SetBlockCreations sets the block_creations property value. If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetBlockCreations(value *bool)() { + m.block_creations = value +} +// SetEnforceAdmins sets the enforce_admins property value. Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetEnforceAdmins(value *bool)() { + m.enforce_admins = value +} +// SetLockBranch sets the lock_branch property value. Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetLockBranch(value *bool)() { + m.lock_branch = value +} +// SetRequiredConversationResolution sets the required_conversation_resolution property value. Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetRequiredConversationResolution(value *bool)() { + m.required_conversation_resolution = value +} +// SetRequiredLinearHistory sets the required_linear_history property value. Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetRequiredLinearHistory(value *bool)() { + m.required_linear_history = value +} +// SetRequiredPullRequestReviews sets the required_pull_request_reviews property value. Require at least one approving review on a pull request, before merging. Set to `null` to disable. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetRequiredPullRequestReviews(value ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable)() { + m.required_pull_request_reviews = value +} +// SetRequiredStatusChecks sets the required_status_checks property value. Require status checks to pass before merging. Set to `null` to disable. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetRequiredStatusChecks(value ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable)() { + m.required_status_checks = value +} +// SetRestrictions sets the restrictions property value. Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. +func (m *ItemItemBranchesItemProtectionPutRequestBody) SetRestrictions(value ItemItemBranchesItemProtectionPutRequestBody_restrictionsable)() { + m.restrictions = value +} +type ItemItemBranchesItemProtectionPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowDeletions()(*bool) + GetAllowForcePushes()(*bool) + GetAllowForkSyncing()(*bool) + GetBlockCreations()(*bool) + GetEnforceAdmins()(*bool) + GetLockBranch()(*bool) + GetRequiredConversationResolution()(*bool) + GetRequiredLinearHistory()(*bool) + GetRequiredPullRequestReviews()(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable) + GetRequiredStatusChecks()(ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable) + GetRestrictions()(ItemItemBranchesItemProtectionPutRequestBody_restrictionsable) + SetAllowDeletions(value *bool)() + SetAllowForcePushes(value *bool)() + SetAllowForkSyncing(value *bool)() + SetBlockCreations(value *bool)() + SetEnforceAdmins(value *bool)() + SetLockBranch(value *bool)() + SetRequiredConversationResolution(value *bool)() + SetRequiredLinearHistory(value *bool)() + SetRequiredPullRequestReviews(value ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable)() + SetRequiredStatusChecks(value ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable)() + SetRestrictions(value ItemItemBranchesItemProtectionPutRequestBody_restrictionsable)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews.go new file mode 100644 index 0000000..d42f935 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews.go @@ -0,0 +1,226 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews require at least one approving review on a pull request, before merging. Set to `null` to disable. +type ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Allow specific users, teams, or apps to bypass pull request requirements. + bypass_pull_request_allowances ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable + // Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + dismiss_stale_reviews *bool + // Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + dismissal_restrictions ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable + // Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-cloud@latest//articles/about-code-owners/) review them. + require_code_owner_reviews *bool + // Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + require_last_push_approval *bool + // Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. + required_approving_review_count *int32 +} +// NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews instantiates a new ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews()(*ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) { + m := &ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassPullRequestAllowances gets the bypass_pull_request_allowances property value. Allow specific users, teams, or apps to bypass pull request requirements. +// returns a ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetBypassPullRequestAllowances()(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable) { + return m.bypass_pull_request_allowances +} +// GetDismissalRestrictions gets the dismissal_restrictions property value. Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. +// returns a ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetDismissalRestrictions()(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable) { + return m.dismissal_restrictions +} +// GetDismissStaleReviews gets the dismiss_stale_reviews property value. Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetDismissStaleReviews()(*bool) { + return m.dismiss_stale_reviews +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_pull_request_allowances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBypassPullRequestAllowances(val.(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable)) + } + return nil + } + res["dismiss_stale_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissStaleReviews(val) + } + return nil + } + res["dismissal_restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalRestrictions(val.(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable)) + } + return nil + } + res["require_code_owner_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireCodeOwnerReviews(val) + } + return nil + } + res["require_last_push_approval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireLastPushApproval(val) + } + return nil + } + res["required_approving_review_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequiredApprovingReviewCount(val) + } + return nil + } + return res +} +// GetRequireCodeOwnerReviews gets the require_code_owner_reviews property value. Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-cloud@latest//articles/about-code-owners/) review them. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetRequireCodeOwnerReviews()(*bool) { + return m.require_code_owner_reviews +} +// GetRequiredApprovingReviewCount gets the required_approving_review_count property value. Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. +// returns a *int32 when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetRequiredApprovingReviewCount()(*int32) { + return m.required_approving_review_count +} +// GetRequireLastPushApproval gets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) GetRequireLastPushApproval()(*bool) { + return m.require_last_push_approval +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bypass_pull_request_allowances", m.GetBypassPullRequestAllowances()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dismissal_restrictions", m.GetDismissalRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dismiss_stale_reviews", m.GetDismissStaleReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("required_approving_review_count", m.GetRequiredApprovingReviewCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_code_owner_reviews", m.GetRequireCodeOwnerReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_last_push_approval", m.GetRequireLastPushApproval()) + 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 *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassPullRequestAllowances sets the bypass_pull_request_allowances property value. Allow specific users, teams, or apps to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetBypassPullRequestAllowances(value ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable)() { + m.bypass_pull_request_allowances = value +} +// SetDismissalRestrictions sets the dismissal_restrictions property value. Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetDismissalRestrictions(value ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable)() { + m.dismissal_restrictions = value +} +// SetDismissStaleReviews sets the dismiss_stale_reviews property value. Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetDismissStaleReviews(value *bool)() { + m.dismiss_stale_reviews = value +} +// SetRequireCodeOwnerReviews sets the require_code_owner_reviews property value. Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-cloud@latest//articles/about-code-owners/) review them. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetRequireCodeOwnerReviews(value *bool)() { + m.require_code_owner_reviews = value +} +// SetRequiredApprovingReviewCount sets the required_approving_review_count property value. Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetRequiredApprovingReviewCount(value *int32)() { + m.required_approving_review_count = value +} +// SetRequireLastPushApproval sets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews) SetRequireLastPushApproval(value *bool)() { + m.require_last_push_approval = value +} +type ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviewsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassPullRequestAllowances()(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable) + GetDismissalRestrictions()(ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable) + GetDismissStaleReviews()(*bool) + GetRequireCodeOwnerReviews()(*bool) + GetRequiredApprovingReviewCount()(*int32) + GetRequireLastPushApproval()(*bool) + SetBypassPullRequestAllowances(value ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable)() + SetDismissalRestrictions(value ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable)() + SetDismissStaleReviews(value *bool)() + SetRequireCodeOwnerReviews(value *bool)() + SetRequiredApprovingReviewCount(value *int32)() + SetRequireLastPushApproval(value *bool)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews_bypass_pull_request_allowances.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews_bypass_pull_request_allowances.go new file mode 100644 index 0000000..82fb601 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews_bypass_pull_request_allowances.go @@ -0,0 +1,157 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances allow specific users, teams, or apps to bypass pull request requirements. +type ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of app `slug`s allowed to bypass pull request requirements. + apps []string + // The list of team `slug`s allowed to bypass pull request requirements. + teams []string + // The list of user `login`s allowed to bypass pull request requirements. + users []string +} +// NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances instantiates a new ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances()(*ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) { + m := &ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of app `slug`s allowed to bypass pull request requirements. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of team `slug`s allowed to bypass pull request requirements. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) GetTeams()([]string) { + return m.teams +} +// GetUsers gets the users property value. The list of user `login`s allowed to bypass pull request requirements. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of app `slug`s allowed to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) SetApps(value []string)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of team `slug`s allowed to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) SetTeams(value []string)() { + m.teams = value +} +// SetUsers sets the users property value. The list of user `login`s allowed to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowancesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + GetTeams()([]string) + GetUsers()([]string) + SetApps(value []string)() + SetTeams(value []string)() + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews_dismissal_restrictions.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews_dismissal_restrictions.go new file mode 100644 index 0000000..4ca543e --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_pull_request_reviews_dismissal_restrictions.go @@ -0,0 +1,157 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. +type ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of app `slug`s with dismissal access + apps []string + // The list of team `slug`s with dismissal access + teams []string + // The list of user `login`s with dismissal access + users []string +} +// NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions instantiates a new ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions()(*ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) { + m := &ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of app `slug`s with dismissal access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of team `slug`s with dismissal access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) GetTeams()([]string) { + return m.teams +} +// GetUsers gets the users property value. The list of user `login`s with dismissal access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of app `slug`s with dismissal access +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) SetApps(value []string)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of team `slug`s with dismissal access +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) SetTeams(value []string)() { + m.teams = value +} +// SetUsers sets the users property value. The list of user `login`s with dismissal access +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + GetTeams()([]string) + GetUsers()([]string) + SetApps(value []string)() + SetTeams(value []string)() + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_status_checks.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_status_checks.go new file mode 100644 index 0000000..9fd190f --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_status_checks.go @@ -0,0 +1,160 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionPutRequestBody_required_status_checks require status checks to pass before merging. Set to `null` to disable. +type ItemItemBranchesItemProtectionPutRequestBody_required_status_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of status checks to require in order to merge into this branch. + checks []ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable + // **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + // Deprecated: + contexts []string + // Require branches to be up to date before merging. + strict *bool +} +// NewItemItemBranchesItemProtectionPutRequestBody_required_status_checks instantiates a new ItemItemBranchesItemProtectionPutRequestBody_required_status_checks and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody_required_status_checks()(*ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) { + m := &ItemItemBranchesItemProtectionPutRequestBody_required_status_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBody_required_status_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBody_required_status_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody_required_status_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChecks gets the checks property value. The list of status checks to require in order to merge into this branch. +// returns a []ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) GetChecks()([]ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable) { + return m.checks +} +// GetContexts gets the contexts property value. **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. +// Deprecated: +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) GetContexts()([]string) { + return m.contexts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable) + } + } + m.SetChecks(res) + } + return nil + } + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + res["strict"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStrict(val) + } + return nil + } + return res +} +// GetStrict gets the strict property value. Require branches to be up to date before merging. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) GetStrict()(*bool) { + return m.strict +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChecks())) + for i, v := range m.GetChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("checks", cast) + if err != nil { + return err + } + } + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("strict", m.GetStrict()) + 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 *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChecks sets the checks property value. The list of status checks to require in order to merge into this branch. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) SetChecks(value []ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable)() { + m.checks = value +} +// SetContexts sets the contexts property value. **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. +// Deprecated: +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) SetContexts(value []string)() { + m.contexts = value +} +// SetStrict sets the strict property value. Require branches to be up to date before merging. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks) SetStrict(value *bool)() { + m.strict = value +} +type ItemItemBranchesItemProtectionPutRequestBody_required_status_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecks()([]ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable) + GetContexts()([]string) + GetStrict()(*bool) + SetChecks(value []ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable)() + SetContexts(value []string)() + SetStrict(value *bool)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_status_checks_checks.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_status_checks_checks.go new file mode 100644 index 0000000..dfa7b90 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body_required_status_checks_checks.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. + app_id *int32 + // The name of the required check + context *string +} +// NewItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks instantiates a new ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks()(*ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) { + m := &ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. +// returns a *int32 when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) GetAppId()(*int32) { + return m.app_id +} +// GetContext gets the context property value. The name of the required check +// returns a *string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) GetContext()(*string) { + return m.context +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + 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 *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) SetAppId(value *int32)() { + m.app_id = value +} +// SetContext sets the context property value. The name of the required check +func (m *ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checks) SetContext(value *string)() { + m.context = value +} +type ItemItemBranchesItemProtectionPutRequestBody_required_status_checks_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int32) + GetContext()(*string) + SetAppId(value *int32)() + SetContext(value *string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_put_request_body_restrictions.go b/pkg/github/repos/item_item_branches_item_protection_put_request_body_restrictions.go new file mode 100644 index 0000000..04b9e93 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_put_request_body_restrictions.go @@ -0,0 +1,157 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionPutRequestBody_restrictions restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. +type ItemItemBranchesItemProtectionPutRequestBody_restrictions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of app `slug`s with push access + apps []string + // The list of team `slug`s with push access + teams []string + // The list of user `login`s with push access + users []string +} +// NewItemItemBranchesItemProtectionPutRequestBody_restrictions instantiates a new ItemItemBranchesItemProtectionPutRequestBody_restrictions and sets the default values. +func NewItemItemBranchesItemProtectionPutRequestBody_restrictions()(*ItemItemBranchesItemProtectionPutRequestBody_restrictions) { + m := &ItemItemBranchesItemProtectionPutRequestBody_restrictions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionPutRequestBody_restrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionPutRequestBody_restrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionPutRequestBody_restrictions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of app `slug`s with push access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of team `slug`s with push access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) GetTeams()([]string) { + return m.teams +} +// GetUsers gets the users property value. The list of user `login`s with push access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionPutRequestBody_restrictions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of app `slug`s with push access +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) SetApps(value []string)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of team `slug`s with push access +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) SetTeams(value []string)() { + m.teams = value +} +// SetUsers sets the users property value. The list of user `login`s with push access +func (m *ItemItemBranchesItemProtectionPutRequestBody_restrictions) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionPutRequestBody_restrictionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + GetTeams()([]string) + GetUsers()([]string) + SetApps(value []string)() + SetTeams(value []string)() + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_request_builder.go new file mode 100644 index 0000000..266e251 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_request_builder.go @@ -0,0 +1,152 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection +type ItemItemBranchesItemProtectionRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesItemProtectionRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequestBuilder) { + m := &ItemItemBranchesItemProtectionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRequestBuilder instantiates a new ItemItemBranchesItemProtectionRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#delete-branch-protection +func (m *ItemItemBranchesItemProtectionRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Enforce_admins the enforce_admins property +// returns a *ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) Enforce_admins()(*ItemItemBranchesItemProtectionEnforce_adminsRequestBuilder) { + return NewItemItemBranchesItemProtectionEnforce_adminsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a BranchProtectionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-branch-protection +func (m *ItemItemBranchesItemProtectionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchProtectionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBranchProtectionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchProtectionable), nil +} +// Put protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Protecting a branch requires admin or owner permissions to the repository.**Note**: Passing new arrays of `users` and `teams` replaces their previous values.**Note**: The list of users, apps, and teams in total is limited to 100 items. +// returns a ProtectedBranchable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#update-branch-protection +func (m *ItemItemBranchesItemProtectionRequestBuilder) Put(ctx context.Context, body ItemItemBranchesItemProtectionPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchable), nil +} +// Required_pull_request_reviews the required_pull_request_reviews property +// returns a *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) Required_pull_request_reviews()(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Required_signatures the required_signatures property +// returns a *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) Required_signatures()(*ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Required_status_checks the required_status_checks property +// returns a *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) Required_status_checks()(*ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Restrictions the restrictions property +// returns a *ItemItemBranchesItemProtectionRestrictionsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) Restrictions()(*ItemItemBranchesItemProtectionRestrictionsRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Protecting a branch requires admin or owner permissions to the repository.**Note**: Passing new arrays of `users` and `teams` replaces their previous values.**Note**: The list of users, apps, and teams in total is limited to 100 items. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRequestBuilder) { + return NewItemItemBranchesItemProtectionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body.go b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body.go new file mode 100644 index 0000000..344cafe --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body.go @@ -0,0 +1,225 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Allow specific users, teams, or apps to bypass pull request requirements. + bypass_pull_request_allowances ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable + // Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + dismiss_stale_reviews *bool + // Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + dismissal_restrictions ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable + // Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-cloud@latest//articles/about-code-owners/) have reviewed. + require_code_owner_reviews *bool + // Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + require_last_push_approval *bool + // Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. + required_approving_review_count *int32 +} +// NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody instantiates a new ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody()(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) { + m := &ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassPullRequestAllowances gets the bypass_pull_request_allowances property value. Allow specific users, teams, or apps to bypass pull request requirements. +// returns a ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetBypassPullRequestAllowances()(ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable) { + return m.bypass_pull_request_allowances +} +// GetDismissalRestrictions gets the dismissal_restrictions property value. Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. +// returns a ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetDismissalRestrictions()(ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable) { + return m.dismissal_restrictions +} +// GetDismissStaleReviews gets the dismiss_stale_reviews property value. Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetDismissStaleReviews()(*bool) { + return m.dismiss_stale_reviews +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_pull_request_allowances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBypassPullRequestAllowances(val.(ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable)) + } + return nil + } + res["dismiss_stale_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissStaleReviews(val) + } + return nil + } + res["dismissal_restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalRestrictions(val.(ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable)) + } + return nil + } + res["require_code_owner_reviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireCodeOwnerReviews(val) + } + return nil + } + res["require_last_push_approval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireLastPushApproval(val) + } + return nil + } + res["required_approving_review_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequiredApprovingReviewCount(val) + } + return nil + } + return res +} +// GetRequireCodeOwnerReviews gets the require_code_owner_reviews property value. Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-cloud@latest//articles/about-code-owners/) have reviewed. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetRequireCodeOwnerReviews()(*bool) { + return m.require_code_owner_reviews +} +// GetRequiredApprovingReviewCount gets the required_approving_review_count property value. Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. +// returns a *int32 when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetRequiredApprovingReviewCount()(*int32) { + return m.required_approving_review_count +} +// GetRequireLastPushApproval gets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) GetRequireLastPushApproval()(*bool) { + return m.require_last_push_approval +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bypass_pull_request_allowances", m.GetBypassPullRequestAllowances()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dismissal_restrictions", m.GetDismissalRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dismiss_stale_reviews", m.GetDismissStaleReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("required_approving_review_count", m.GetRequiredApprovingReviewCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_code_owner_reviews", m.GetRequireCodeOwnerReviews()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("require_last_push_approval", m.GetRequireLastPushApproval()) + 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 *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassPullRequestAllowances sets the bypass_pull_request_allowances property value. Allow specific users, teams, or apps to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetBypassPullRequestAllowances(value ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable)() { + m.bypass_pull_request_allowances = value +} +// SetDismissalRestrictions sets the dismissal_restrictions property value. Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetDismissalRestrictions(value ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable)() { + m.dismissal_restrictions = value +} +// SetDismissStaleReviews sets the dismiss_stale_reviews property value. Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetDismissStaleReviews(value *bool)() { + m.dismiss_stale_reviews = value +} +// SetRequireCodeOwnerReviews sets the require_code_owner_reviews property value. Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-cloud@latest//articles/about-code-owners/) have reviewed. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetRequireCodeOwnerReviews(value *bool)() { + m.require_code_owner_reviews = value +} +// SetRequiredApprovingReviewCount sets the required_approving_review_count property value. Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetRequiredApprovingReviewCount(value *int32)() { + m.required_approving_review_count = value +} +// SetRequireLastPushApproval sets the require_last_push_approval property value. Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody) SetRequireLastPushApproval(value *bool)() { + m.require_last_push_approval = value +} +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassPullRequestAllowances()(ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable) + GetDismissalRestrictions()(ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable) + GetDismissStaleReviews()(*bool) + GetRequireCodeOwnerReviews()(*bool) + GetRequiredApprovingReviewCount()(*int32) + GetRequireLastPushApproval()(*bool) + SetBypassPullRequestAllowances(value ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable)() + SetDismissalRestrictions(value ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable)() + SetDismissStaleReviews(value *bool)() + SetRequireCodeOwnerReviews(value *bool)() + SetRequiredApprovingReviewCount(value *int32)() + SetRequireLastPushApproval(value *bool)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body_bypass_pull_request_allowances.go b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body_bypass_pull_request_allowances.go new file mode 100644 index 0000000..90425c0 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body_bypass_pull_request_allowances.go @@ -0,0 +1,157 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances allow specific users, teams, or apps to bypass pull request requirements. +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of app `slug`s allowed to bypass pull request requirements. + apps []string + // The list of team `slug`s allowed to bypass pull request requirements. + teams []string + // The list of user `login`s allowed to bypass pull request requirements. + users []string +} +// NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances instantiates a new ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances and sets the default values. +func NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances()(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) { + m := &ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of app `slug`s allowed to bypass pull request requirements. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of team `slug`s allowed to bypass pull request requirements. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) GetTeams()([]string) { + return m.teams +} +// GetUsers gets the users property value. The list of user `login`s allowed to bypass pull request requirements. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of app `slug`s allowed to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) SetApps(value []string)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of team `slug`s allowed to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) SetTeams(value []string)() { + m.teams = value +} +// SetUsers sets the users property value. The list of user `login`s allowed to bypass pull request requirements. +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowancesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + GetTeams()([]string) + GetUsers()([]string) + SetApps(value []string)() + SetTeams(value []string)() + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body_dismissal_restrictions.go b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body_dismissal_restrictions.go new file mode 100644 index 0000000..23d5bc3 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_patch_request_body_dismissal_restrictions.go @@ -0,0 +1,157 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of app `slug`s with dismissal access + apps []string + // The list of team `slug`s with dismissal access + teams []string + // The list of user `login`s with dismissal access + users []string +} +// NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions instantiates a new ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions and sets the default values. +func NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions()(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) { + m := &ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The list of app `slug`s with dismissal access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The list of team `slug`s with dismissal access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) GetTeams()([]string) { + return m.teams +} +// GetUsers gets the users property value. The list of user `login`s with dismissal access +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + if err != nil { + return err + } + } + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The list of app `slug`s with dismissal access +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) SetApps(value []string)() { + m.apps = value +} +// SetTeams sets the teams property value. The list of team `slug`s with dismissal access +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) SetTeams(value []string)() { + m.teams = value +} +// SetUsers sets the users property value. The list of user `login`s with dismissal access +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictions) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBody_dismissal_restrictionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + GetTeams()([]string) + GetUsers()([]string) + SetApps(value []string)() + SetTeams(value []string)() + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_request_builder.go new file mode 100644 index 0000000..3b2d176 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_pull_request_reviews_request_builder.go @@ -0,0 +1,119 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_pull_request_reviews +type ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) { + m := &ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_pull_request_reviews", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder instantiates a new ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#delete-pull-request-review-protection +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a ProtectedBranchPullRequestReviewable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-pull-request-review-protection +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchPullRequestReviewable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchPullRequestReviewFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchPullRequestReviewable), nil +} +// Patch protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.**Note**: Passing new arrays of `users` and `teams` replaces their previous values. +// returns a ProtectedBranchPullRequestReviewable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#update-pull-request-review-protection +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) Patch(ctx context.Context, body ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchPullRequestReviewable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchPullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchPullRequestReviewable), nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.**Note**: Passing new arrays of `users` and `teams` replaces their previous values. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRequired_pull_request_reviewsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_pull_request_reviewsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_signatures_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_required_signatures_request_builder.go new file mode 100644 index 0000000..da96bac --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_signatures_request_builder.go @@ -0,0 +1,119 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_signatures +type ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) { + m := &ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_signatures", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilder instantiates a new ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#delete-commit-signature-protection +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/enterprise-cloud@latest//articles/signing-commits-with-gpg) in GitHub Help.**Note**: You must enable branch protection to require signed commits. +// returns a ProtectedBranchAdminEnforcedable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-commit-signature-protection +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchAdminEnforcedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable), nil +} +// Post protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. +// returns a ProtectedBranchAdminEnforcedable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#create-commit-signature-protection +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProtectedBranchAdminEnforcedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ProtectedBranchAdminEnforcedable), nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/enterprise-cloud@latest//articles/signing-commits-with-gpg) in GitHub Help.**Note**: You must enable branch protection to require signed commits. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRequired_signaturesRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_signaturesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_delete_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_delete_request_body_member1.go new file mode 100644 index 0000000..bc27734 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_delete_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the status checks + contexts []string +} +// NewItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1()(*ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContexts gets the contexts property value. The name of the status checks +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) GetContexts()([]string) { + return m.contexts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + 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 *ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContexts sets the contexts property value. The name of the status checks +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1) SetContexts(value []string)() { + m.contexts = value +} +type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContexts()([]string) + SetContexts(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_post_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_post_request_body_member1.go new file mode 100644 index 0000000..cb99264 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_post_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the status checks + contexts []string +} +// NewItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1()(*ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContexts gets the contexts property value. The name of the status checks +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) GetContexts()([]string) { + return m.contexts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + 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 *ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContexts sets the contexts property value. The name of the status checks +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1) SetContexts(value []string)() { + m.contexts = value +} +type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContexts()([]string) + SetContexts(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_put_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_put_request_body_member1.go new file mode 100644 index 0000000..d0a5e69 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_put_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the status checks + contexts []string +} +// NewItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1()(*ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContexts gets the contexts property value. The name of the status checks +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) GetContexts()([]string) { + return m.contexts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + 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 *ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContexts sets the contexts property value. The name of the status checks +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1) SetContexts(value []string)() { + m.contexts = value +} +type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContexts()([]string) + SetContexts(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_request_builder.go new file mode 100644 index 0000000..d322609 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_contexts_request_builder.go @@ -0,0 +1,577 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_status_checks\contexts +type ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ContextsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able, string +type ContextsDeleteRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able + contextsDeleteRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able + // Composed type representation for type string + contextsDeleteRequestBodyString *string + // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able + itemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able + // Composed type representation for type string + string *string +} +// NewContextsDeleteRequestBody instantiates a new ContextsDeleteRequestBody and sets the default values. +func NewContextsDeleteRequestBody()(*ContextsDeleteRequestBody) { + m := &ContextsDeleteRequestBody{ + } + return m +} +// CreateContextsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContextsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewContextsDeleteRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetContextsDeleteRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able when successful +func (m *ContextsDeleteRequestBody) GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) { + return m.contextsDeleteRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 +} +// GetContextsDeleteRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ContextsDeleteRequestBody) GetContextsDeleteRequestBodyString()(*string) { + return m.contextsDeleteRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContextsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ContextsDeleteRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able when successful +func (m *ContextsDeleteRequestBody) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ContextsDeleteRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ContextsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetContextsDeleteRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetContextsDeleteRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able +func (m *ContextsDeleteRequestBody) SetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() { + m.contextsDeleteRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 = value +} +// SetContextsDeleteRequestBodyString sets the string property value. Composed type representation for type string +func (m *ContextsDeleteRequestBody) SetContextsDeleteRequestBodyString(value *string)() { + m.contextsDeleteRequestBodyString = value +} +// SetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able +func (m *ContextsDeleteRequestBody) SetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ContextsDeleteRequestBody) SetString(value *string)() { + m.string = value +} +// ContextsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able, string +type ContextsPostRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able + contextsPostRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able + // Composed type representation for type string + contextsPostRequestBodyString *string + // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able + itemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able + // Composed type representation for type string + string *string +} +// NewContextsPostRequestBody instantiates a new ContextsPostRequestBody and sets the default values. +func NewContextsPostRequestBody()(*ContextsPostRequestBody) { + m := &ContextsPostRequestBody{ + } + return m +} +// CreateContextsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContextsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewContextsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetContextsPostRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able when successful +func (m *ContextsPostRequestBody) GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) { + return m.contextsPostRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 +} +// GetContextsPostRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ContextsPostRequestBody) GetContextsPostRequestBodyString()(*string) { + return m.contextsPostRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContextsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ContextsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able when successful +func (m *ContextsPostRequestBody) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ContextsPostRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ContextsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetContextsPostRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetContextsPostRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able +func (m *ContextsPostRequestBody) SetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() { + m.contextsPostRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 = value +} +// SetContextsPostRequestBodyString sets the string property value. Composed type representation for type string +func (m *ContextsPostRequestBody) SetContextsPostRequestBodyString(value *string)() { + m.contextsPostRequestBodyString = value +} +// SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able +func (m *ContextsPostRequestBody) SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ContextsPostRequestBody) SetString(value *string)() { + m.string = value +} +// ContextsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able, string +type ContextsPutRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able + contextsPutRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able + // Composed type representation for type string + contextsPutRequestBodyString *string + // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able + itemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able + // Composed type representation for type string + string *string +} +// NewContextsPutRequestBody instantiates a new ContextsPutRequestBody and sets the default values. +func NewContextsPutRequestBody()(*ContextsPutRequestBody) { + m := &ContextsPutRequestBody{ + } + return m +} +// CreateContextsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateContextsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewContextsPutRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetContextsPutRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able when successful +func (m *ContextsPutRequestBody) GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) { + return m.contextsPutRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 +} +// GetContextsPutRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ContextsPutRequestBody) GetContextsPutRequestBodyString()(*string) { + return m.contextsPutRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ContextsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ContextsPutRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able when successful +func (m *ContextsPutRequestBody) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ContextsPutRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ContextsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetContextsPutRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetContextsPutRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able +func (m *ContextsPutRequestBody) SetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() { + m.contextsPutRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 = value +} +// SetContextsPutRequestBodyString sets the string property value. Composed type representation for type string +func (m *ContextsPutRequestBody) SetContextsPutRequestBodyString(value *string)() { + m.contextsPutRequestBodyString = value +} +// SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able +func (m *ContextsPutRequestBody) SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ContextsPutRequestBody) SetString(value *string)() { + m.string = value +} +type ContextsDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) + GetContextsDeleteRequestBodyString()(*string) + GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) + GetString()(*string) + SetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() + SetContextsDeleteRequestBodyString(value *string)() + SetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() + SetString(value *string)() +} +type ContextsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) + GetContextsPostRequestBodyString()(*string) + GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) + GetString()(*string) + SetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() + SetContextsPostRequestBodyString(value *string)() + SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() + SetString(value *string)() +} +type ContextsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) + GetContextsPutRequestBodyString()(*string) + GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) + GetString()(*string) + SetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() + SetContextsPutRequestBodyString(value *string)() + SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() + SetString(value *string)() +} +// NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) { + m := &ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_status_checks/contexts", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder instantiates a new ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a []string when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#remove-status-check-contexts +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) Delete(ctx context.Context, body ContextsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]string, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "string", errorMapping) + if err != nil { + return nil, err + } + val := make([]string, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*string)) + } + } + return val, nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a []string when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-all-status-check-contexts +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]string, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "string", errorMapping) + if err != nil { + return nil, err + } + val := make([]string, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*string)) + } + } + return val, nil +} +// Post protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a []string when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#add-status-check-contexts +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) Post(ctx context.Context, body ContextsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]string, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "string", errorMapping) + if err != nil { + return nil, err + } + val := make([]string, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*string)) + } + } + return val, nil +} +// Put protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a []string when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#set-status-check-contexts +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) Put(ctx context.Context, body ContextsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]string, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "string", errorMapping) + if err != nil { + return nil, err + } + val := make([]string, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*string)) + } + } + return val, nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ContextsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ContextsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ContextsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_patch_request_body.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_patch_request_body.go new file mode 100644 index 0000000..8e17ff9 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_patch_request_body.go @@ -0,0 +1,159 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The list of status checks to require in order to merge into this branch. + checks []ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable + // **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + // Deprecated: + contexts []string + // Require branches to be up to date before merging. + strict *bool +} +// NewItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody instantiates a new ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody()(*ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) { + m := &ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_status_checksPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_status_checksPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetChecks gets the checks property value. The list of status checks to require in order to merge into this branch. +// returns a []ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) GetChecks()([]ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable) { + return m.checks +} +// GetContexts gets the contexts property value. **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. +// Deprecated: +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) GetContexts()([]string) { + return m.contexts +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable) + } + } + m.SetChecks(res) + } + return nil + } + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetContexts(res) + } + return nil + } + res["strict"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStrict(val) + } + return nil + } + return res +} +// GetStrict gets the strict property value. Require branches to be up to date before merging. +// returns a *bool when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) GetStrict()(*bool) { + return m.strict +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChecks())) + for i, v := range m.GetChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("checks", cast) + if err != nil { + return err + } + } + if m.GetContexts() != nil { + err := writer.WriteCollectionOfStringValues("contexts", m.GetContexts()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("strict", m.GetStrict()) + 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 *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetChecks sets the checks property value. The list of status checks to require in order to merge into this branch. +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) SetChecks(value []ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable)() { + m.checks = value +} +// SetContexts sets the contexts property value. **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. +// Deprecated: +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) SetContexts(value []string)() { + m.contexts = value +} +// SetStrict sets the strict property value. Require branches to be up to date before merging. +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody) SetStrict(value *bool)() { + m.strict = value +} +type ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecks()([]ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable) + GetContexts()([]string) + GetStrict()(*bool) + SetChecks(value []ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable)() + SetContexts(value []string)() + SetStrict(value *bool)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_patch_request_body_checks.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_patch_request_body_checks.go new file mode 100644 index 0000000..c7e1a36 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_patch_request_body_checks.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. + app_id *int32 + // The name of the required check + context *string +} +// NewItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks instantiates a new ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks()(*ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) { + m := &ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. +// returns a *int32 when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) GetAppId()(*int32) { + return m.app_id +} +// GetContext gets the context property value. The name of the required check +// returns a *string when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) GetContext()(*string) { + return m.context +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("context", m.GetContext()) + 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 *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) SetAppId(value *int32)() { + m.app_id = value +} +// SetContext sets the context property value. The name of the required check +func (m *ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checks) SetContext(value *string)() { + m.context = value +} +type ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBody_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int32) + GetContext()(*string) + SetAppId(value *int32)() + SetContext(value *string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_required_status_checks_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_request_builder.go new file mode 100644 index 0000000..116e5dc --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_required_status_checks_request_builder.go @@ -0,0 +1,125 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_status_checks +type ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) { + m := &ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_status_checks", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilder instantiates a new ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilderInternal(urlParams, requestAdapter) +} +// Contexts the contexts property +// returns a *ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) Contexts()(*ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#remove-status-check-protection +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a StatusCheckPolicyable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-status-checks-protection +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.StatusCheckPolicyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateStatusCheckPolicyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.StatusCheckPolicyable), nil +} +// Patch protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. +// returns a StatusCheckPolicyable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#update-status-check-protection +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) Patch(ctx context.Context, body ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.StatusCheckPolicyable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateStatusCheckPolicyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.StatusCheckPolicyable), nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRequired_status_checksPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRequired_status_checksRequestBuilder) { + return NewItemItemBranchesItemProtectionRequired_status_checksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body_member1.go new file mode 100644 index 0000000..5ce1f77 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + apps []string +} +// NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + 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 *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) SetApps(value []string)() { + m.apps = value +} +type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + SetApps(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body_member1.go new file mode 100644 index 0000000..a099409 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + apps []string +} +// NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + 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 *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) SetApps(value []string)() { + m.apps = value +} +type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + SetApps(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body_member1.go new file mode 100644 index 0000000..0e1ebc4 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. + apps []string +} +// NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApps gets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) GetApps()([]string) { + return m.apps +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetApps(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) + 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 *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApps sets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) SetApps(value []string)() { + m.apps = value +} +type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]string) + SetApps(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go new file mode 100644 index 0000000..c2b030a --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go @@ -0,0 +1,569 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions\apps +type ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// AppsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able, string +type AppsDeleteRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able + appsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able + // Composed type representation for type string + appsDeleteRequestBodyString *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able + // Composed type representation for type string + string *string +} +// NewAppsDeleteRequestBody instantiates a new AppsDeleteRequestBody and sets the default values. +func NewAppsDeleteRequestBody()(*AppsDeleteRequestBody) { + m := &AppsDeleteRequestBody{ + } + return m +} +// CreateAppsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAppsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewAppsDeleteRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetAppsDeleteRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able when successful +func (m *AppsDeleteRequestBody) GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) { + return m.appsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 +} +// GetAppsDeleteRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *AppsDeleteRequestBody) GetAppsDeleteRequestBodyString()(*string) { + return m.appsDeleteRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AppsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *AppsDeleteRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able when successful +func (m *AppsDeleteRequestBody) GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *AppsDeleteRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *AppsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetAppsDeleteRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetAppsDeleteRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able +func (m *AppsDeleteRequestBody) SetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() { + m.appsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 = value +} +// SetAppsDeleteRequestBodyString sets the string property value. Composed type representation for type string +func (m *AppsDeleteRequestBody) SetAppsDeleteRequestBodyString(value *string)() { + m.appsDeleteRequestBodyString = value +} +// SetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able +func (m *AppsDeleteRequestBody) SetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *AppsDeleteRequestBody) SetString(value *string)() { + m.string = value +} +// AppsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able, string +type AppsPostRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able + appsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able + // Composed type representation for type string + appsPostRequestBodyString *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able + // Composed type representation for type string + string *string +} +// NewAppsPostRequestBody instantiates a new AppsPostRequestBody and sets the default values. +func NewAppsPostRequestBody()(*AppsPostRequestBody) { + m := &AppsPostRequestBody{ + } + return m +} +// CreateAppsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAppsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewAppsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetAppsPostRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able when successful +func (m *AppsPostRequestBody) GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) { + return m.appsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 +} +// GetAppsPostRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *AppsPostRequestBody) GetAppsPostRequestBodyString()(*string) { + return m.appsPostRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AppsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *AppsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able when successful +func (m *AppsPostRequestBody) GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *AppsPostRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *AppsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetAppsPostRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetAppsPostRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able +func (m *AppsPostRequestBody) SetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() { + m.appsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 = value +} +// SetAppsPostRequestBodyString sets the string property value. Composed type representation for type string +func (m *AppsPostRequestBody) SetAppsPostRequestBodyString(value *string)() { + m.appsPostRequestBodyString = value +} +// SetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able +func (m *AppsPostRequestBody) SetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *AppsPostRequestBody) SetString(value *string)() { + m.string = value +} +// AppsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able, string +type AppsPutRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able + appsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able + // Composed type representation for type string + appsPutRequestBodyString *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able + // Composed type representation for type string + string *string +} +// NewAppsPutRequestBody instantiates a new AppsPutRequestBody and sets the default values. +func NewAppsPutRequestBody()(*AppsPutRequestBody) { + m := &AppsPutRequestBody{ + } + return m +} +// CreateAppsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAppsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewAppsPutRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetAppsPutRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able when successful +func (m *AppsPutRequestBody) GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) { + return m.appsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 +} +// GetAppsPutRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *AppsPutRequestBody) GetAppsPutRequestBodyString()(*string) { + return m.appsPutRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AppsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *AppsPutRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able when successful +func (m *AppsPutRequestBody) GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *AppsPutRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *AppsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetAppsPutRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetAppsPutRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able +func (m *AppsPutRequestBody) SetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() { + m.appsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 = value +} +// SetAppsPutRequestBodyString sets the string property value. Composed type representation for type string +func (m *AppsPutRequestBody) SetAppsPutRequestBodyString(value *string)() { + m.appsPutRequestBodyString = value +} +// SetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able +func (m *AppsPutRequestBody) SetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *AppsPutRequestBody) SetString(value *string)() { + m.string = value +} +type AppsDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) + GetAppsDeleteRequestBodyString()(*string) + GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) + GetString()(*string) + SetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() + SetAppsDeleteRequestBodyString(value *string)() + SetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() + SetString(value *string)() +} +type AppsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) + GetAppsPostRequestBodyString()(*string) + GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) + GetString()(*string) + SetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() + SetAppsPostRequestBodyString(value *string)() + SetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() + SetString(value *string)() +} +type AppsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) + GetAppsPutRequestBodyString()(*string) + GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) + GetString()(*string) + SetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() + SetAppsPutRequestBodyString(value *string)() + SetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() + SetString(value *string)() +} +// NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/apps", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of an app to push to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a []Integrationable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#remove-app-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Delete(ctx context.Context, body AppsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable) + } + } + return val, nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the GitHub Apps that have push access to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a []Integrationable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-apps-with-access-to-the-protected-branch +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable) + } + } + return val, nil +} +// Post protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified apps push access for this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a []Integrationable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#add-app-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Post(ctx context.Context, body AppsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable) + } + } + return val, nil +} +// Put protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a []Integrationable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#set-app-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Put(ctx context.Context, body AppsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIntegrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Integrationable) + } + } + return val, nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of an app to push to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body AppsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the GitHub Apps that have push access to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified apps push access for this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body AppsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPutRequestInformation(ctx context.Context, body AppsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_request_builder.go new file mode 100644 index 0000000..ac5c306 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_request_builder.go @@ -0,0 +1,98 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRestrictionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions +type ItemItemBranchesItemProtectionRestrictionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Apps the apps property +// returns a *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) Apps()(*ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemBranchesItemProtectionRestrictionsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsRequestBuilder) { + m := &ItemItemBranchesItemProtectionRestrictionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRestrictionsRequestBuilder instantiates a new ItemItemBranchesItemProtectionRestrictionsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRestrictionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Disables the ability to restrict who can push to this branch. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#delete-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists who has access to this protected branch.**Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. +// returns a BranchRestrictionPolicyable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchRestrictionPolicyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBranchRestrictionPolicyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchRestrictionPolicyable), nil +} +// Teams the teams property +// returns a *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) Teams()(*ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Disables the ability to restrict who can push to this branch. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists who has access to this protected branch.**Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// Users the users property +// returns a *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) Users()(*ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilderInternal(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. +// returns a *ItemItemBranchesItemProtectionRestrictionsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRestrictionsRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_delete_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_delete_request_body_member1.go new file mode 100644 index 0000000..a507a82 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_delete_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The slug values for teams + teams []string +} +// NewItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The slug values for teams +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) GetTeams()([]string) { + return m.teams +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + 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 *ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTeams sets the teams property value. The slug values for teams +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1) SetTeams(value []string)() { + m.teams = value +} +type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTeams()([]string) + SetTeams(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_post_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_post_request_body_member1.go new file mode 100644 index 0000000..68bec9b --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_post_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The slug values for teams + teams []string +} +// NewItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The slug values for teams +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) GetTeams()([]string) { + return m.teams +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + 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 *ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTeams sets the teams property value. The slug values for teams +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1) SetTeams(value []string)() { + m.teams = value +} +type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTeams()([]string) + SetTeams(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_put_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_put_request_body_member1.go new file mode 100644 index 0000000..dace748 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_put_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The slug values for teams + teams []string +} +// NewItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeams(res) + } + return nil + } + return res +} +// GetTeams gets the teams property value. The slug values for teams +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) GetTeams()([]string) { + return m.teams +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetTeams() != nil { + err := writer.WriteCollectionOfStringValues("teams", m.GetTeams()) + 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 *ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTeams sets the teams property value. The slug values for teams +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1) SetTeams(value []string)() { + m.teams = value +} +type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTeams()([]string) + SetTeams(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go new file mode 100644 index 0000000..6c8dabc --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go @@ -0,0 +1,569 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions\teams +type ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able, string +type TeamsDeleteRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able + // Composed type representation for type string + string *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able + teamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able + // Composed type representation for type string + teamsDeleteRequestBodyString *string +} +// NewTeamsDeleteRequestBody instantiates a new TeamsDeleteRequestBody and sets the default values. +func NewTeamsDeleteRequestBody()(*TeamsDeleteRequestBody) { + m := &TeamsDeleteRequestBody{ + } + return m +} +// CreateTeamsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTeamsDeleteRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetTeamsDeleteRequestBodyString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TeamsDeleteRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able when successful +func (m *TeamsDeleteRequestBody) GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *TeamsDeleteRequestBody) GetString()(*string) { + return m.string +} +// GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able when successful +func (m *TeamsDeleteRequestBody) GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) { + return m.teamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 +} +// GetTeamsDeleteRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *TeamsDeleteRequestBody) GetTeamsDeleteRequestBodyString()(*string) { + return m.teamsDeleteRequestBodyString +} +// Serialize serializes information the current object +func (m *TeamsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetTeamsDeleteRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetTeamsDeleteRequestBodyString()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able +func (m *TeamsDeleteRequestBody) SetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *TeamsDeleteRequestBody) SetString(value *string)() { + m.string = value +} +// SetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able +func (m *TeamsDeleteRequestBody) SetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() { + m.teamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 = value +} +// SetTeamsDeleteRequestBodyString sets the string property value. Composed type representation for type string +func (m *TeamsDeleteRequestBody) SetTeamsDeleteRequestBodyString(value *string)() { + m.teamsDeleteRequestBodyString = value +} +// TeamsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able, string +type TeamsPostRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able + // Composed type representation for type string + string *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able + teamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able + // Composed type representation for type string + teamsPostRequestBodyString *string +} +// NewTeamsPostRequestBody instantiates a new TeamsPostRequestBody and sets the default values. +func NewTeamsPostRequestBody()(*TeamsPostRequestBody) { + m := &TeamsPostRequestBody{ + } + return m +} +// CreateTeamsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTeamsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetTeamsPostRequestBodyString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TeamsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able when successful +func (m *TeamsPostRequestBody) GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *TeamsPostRequestBody) GetString()(*string) { + return m.string +} +// GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able when successful +func (m *TeamsPostRequestBody) GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) { + return m.teamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 +} +// GetTeamsPostRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *TeamsPostRequestBody) GetTeamsPostRequestBodyString()(*string) { + return m.teamsPostRequestBodyString +} +// Serialize serializes information the current object +func (m *TeamsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetTeamsPostRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetTeamsPostRequestBodyString()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able +func (m *TeamsPostRequestBody) SetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *TeamsPostRequestBody) SetString(value *string)() { + m.string = value +} +// SetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able +func (m *TeamsPostRequestBody) SetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() { + m.teamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 = value +} +// SetTeamsPostRequestBodyString sets the string property value. Composed type representation for type string +func (m *TeamsPostRequestBody) SetTeamsPostRequestBodyString(value *string)() { + m.teamsPostRequestBodyString = value +} +// TeamsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able, string +type TeamsPutRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able + // Composed type representation for type string + string *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able + teamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able + // Composed type representation for type string + teamsPutRequestBodyString *string +} +// NewTeamsPutRequestBody instantiates a new TeamsPutRequestBody and sets the default values. +func NewTeamsPutRequestBody()(*TeamsPutRequestBody) { + m := &TeamsPutRequestBody{ + } + return m +} +// CreateTeamsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTeamsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewTeamsPutRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetTeamsPutRequestBodyString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TeamsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *TeamsPutRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able when successful +func (m *TeamsPutRequestBody) GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *TeamsPutRequestBody) GetString()(*string) { + return m.string +} +// GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able when successful +func (m *TeamsPutRequestBody) GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) { + return m.teamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 +} +// GetTeamsPutRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *TeamsPutRequestBody) GetTeamsPutRequestBodyString()(*string) { + return m.teamsPutRequestBodyString +} +// Serialize serializes information the current object +func (m *TeamsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetTeamsPutRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetTeamsPutRequestBodyString()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able +func (m *TeamsPutRequestBody) SetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *TeamsPutRequestBody) SetString(value *string)() { + m.string = value +} +// SetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able +func (m *TeamsPutRequestBody) SetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() { + m.teamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 = value +} +// SetTeamsPutRequestBodyString sets the string property value. Composed type representation for type string +func (m *TeamsPutRequestBody) SetTeamsPutRequestBodyString(value *string)() { + m.teamsPutRequestBodyString = value +} +type TeamsDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) + GetString()(*string) + GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) + GetTeamsDeleteRequestBodyString()(*string) + SetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() + SetString(value *string)() + SetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() + SetTeamsDeleteRequestBodyString(value *string)() +} +type TeamsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) + GetString()(*string) + GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) + GetTeamsPostRequestBodyString()(*string) + SetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() + SetString(value *string)() + SetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() + SetTeamsPostRequestBodyString(value *string)() +} +type TeamsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) + GetString()(*string) + GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) + GetTeamsPutRequestBodyString()(*string) + SetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() + SetString(value *string)() + SetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() + SetTeamsPutRequestBodyString(value *string)() +} +// NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) { + m := &ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/teams", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder instantiates a new ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of a team to push to this branch. You can also remove push access for child teams. +// returns a []Teamable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#remove-team-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) Delete(ctx context.Context, body TeamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the teams who have push access to this branch. The list includes child teams. +// returns a []Teamable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-teams-with-access-to-the-protected-branch +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// Post protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified teams push access for this branch. You can also give push access to child teams. +// returns a []Teamable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#add-team-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) Post(ctx context.Context, body TeamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// Put protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. +// returns a []Teamable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#set-team-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) Put(ctx context.Context, body TeamsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of a team to push to this branch. You can also remove push access for child teams. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body TeamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the teams who have push access to this branch. The list includes child teams. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified teams push access for this branch. You can also give push access to child teams. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body TeamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) ToPutRequestInformation(ctx context.Context, body TeamsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body_member1.go new file mode 100644 index 0000000..9f01a92 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The username for users + users []string +} +// NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetUsers gets the users property value. The username for users +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsers sets the users property value. The username for users +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsers()([]string) + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body_member1.go new file mode 100644 index 0000000..7f7e50e --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The username for users + users []string +} +// NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetUsers gets the users property value. The username for users +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsers sets the users property value. The username for users +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsers()([]string) + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body_member1.go new file mode 100644 index 0000000..b809f50 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The username for users + users []string +} +// NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetUsers gets the users property value. The username for users +// returns a []string when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsers() != nil { + err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) + 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 *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsers sets the users property value. The username for users +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) SetUsers(value []string)() { + m.users = value +} +type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsers()([]string) + SetUsers(value []string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go new file mode 100644 index 0000000..3f11247 --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go @@ -0,0 +1,569 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions\users +type ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// UsersDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able, string +type UsersDeleteRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able + // Composed type representation for type string + string *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able + usersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able + // Composed type representation for type string + usersDeleteRequestBodyString *string +} +// NewUsersDeleteRequestBody instantiates a new UsersDeleteRequestBody and sets the default values. +func NewUsersDeleteRequestBody()(*UsersDeleteRequestBody) { + m := &UsersDeleteRequestBody{ + } + return m +} +// CreateUsersDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUsersDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewUsersDeleteRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetUsersDeleteRequestBodyString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UsersDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *UsersDeleteRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able when successful +func (m *UsersDeleteRequestBody) GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *UsersDeleteRequestBody) GetString()(*string) { + return m.string +} +// GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able when successful +func (m *UsersDeleteRequestBody) GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) { + return m.usersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 +} +// GetUsersDeleteRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *UsersDeleteRequestBody) GetUsersDeleteRequestBodyString()(*string) { + return m.usersDeleteRequestBodyString +} +// Serialize serializes information the current object +func (m *UsersDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetUsersDeleteRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetUsersDeleteRequestBodyString()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able +func (m *UsersDeleteRequestBody) SetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *UsersDeleteRequestBody) SetString(value *string)() { + m.string = value +} +// SetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able +func (m *UsersDeleteRequestBody) SetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() { + m.usersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 = value +} +// SetUsersDeleteRequestBodyString sets the string property value. Composed type representation for type string +func (m *UsersDeleteRequestBody) SetUsersDeleteRequestBodyString(value *string)() { + m.usersDeleteRequestBodyString = value +} +// UsersPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able, string +type UsersPostRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able + // Composed type representation for type string + string *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able + usersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able + // Composed type representation for type string + usersPostRequestBodyString *string +} +// NewUsersPostRequestBody instantiates a new UsersPostRequestBody and sets the default values. +func NewUsersPostRequestBody()(*UsersPostRequestBody) { + m := &UsersPostRequestBody{ + } + return m +} +// CreateUsersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUsersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewUsersPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetUsersPostRequestBodyString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UsersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *UsersPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able when successful +func (m *UsersPostRequestBody) GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *UsersPostRequestBody) GetString()(*string) { + return m.string +} +// GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able when successful +func (m *UsersPostRequestBody) GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) { + return m.usersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 +} +// GetUsersPostRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *UsersPostRequestBody) GetUsersPostRequestBodyString()(*string) { + return m.usersPostRequestBodyString +} +// Serialize serializes information the current object +func (m *UsersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetUsersPostRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetUsersPostRequestBodyString()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able +func (m *UsersPostRequestBody) SetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *UsersPostRequestBody) SetString(value *string)() { + m.string = value +} +// SetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able +func (m *UsersPostRequestBody) SetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() { + m.usersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 = value +} +// SetUsersPostRequestBodyString sets the string property value. Composed type representation for type string +func (m *UsersPostRequestBody) SetUsersPostRequestBodyString(value *string)() { + m.usersPostRequestBodyString = value +} +// UsersPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able, string +type UsersPutRequestBody struct { + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able + itemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able + // Composed type representation for type string + string *string + // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able + usersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able + // Composed type representation for type string + usersPutRequestBodyString *string +} +// NewUsersPutRequestBody instantiates a new UsersPutRequestBody and sets the default values. +func NewUsersPutRequestBody()(*UsersPutRequestBody) { + m := &UsersPutRequestBody{ + } + return m +} +// CreateUsersPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUsersPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewUsersPutRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetUsersPutRequestBodyString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UsersPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *UsersPutRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able when successful +func (m *UsersPutRequestBody) GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) { + return m.itemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *UsersPutRequestBody) GetString()(*string) { + return m.string +} +// GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able +// returns a ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able when successful +func (m *UsersPutRequestBody) GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) { + return m.usersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 +} +// GetUsersPutRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *UsersPutRequestBody) GetUsersPutRequestBodyString()(*string) { + return m.usersPutRequestBodyString +} +// Serialize serializes information the current object +func (m *UsersPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetUsersPutRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetUsersPutRequestBodyString()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able +func (m *UsersPutRequestBody) SetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() { + m.itemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *UsersPutRequestBody) SetString(value *string)() { + m.string = value +} +// SetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able +func (m *UsersPutRequestBody) SetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() { + m.usersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 = value +} +// SetUsersPutRequestBodyString sets the string property value. Composed type representation for type string +func (m *UsersPutRequestBody) SetUsersPutRequestBodyString(value *string)() { + m.usersPutRequestBodyString = value +} +type UsersDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) + GetString()(*string) + GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) + GetUsersDeleteRequestBodyString()(*string) + SetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() + SetString(value *string)() + SetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() + SetUsersDeleteRequestBodyString(value *string)() +} +type UsersPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) + GetString()(*string) + GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) + GetUsersPostRequestBodyString()(*string) + SetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() + SetString(value *string)() + SetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() + SetUsersPostRequestBodyString(value *string)() +} +type UsersPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) + GetString()(*string) + GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) + GetUsersPutRequestBodyString()(*string) + SetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() + SetString(value *string)() + SetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() + SetUsersPutRequestBodyString(value *string)() +} +// NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/users", pathParameters), + } + return m +} +// NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of a user to push to this branch.| Type | Description || ------- | --------------------------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | +// returns a []SimpleUserable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#remove-user-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Delete(ctx context.Context, body UsersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the people who have push access to this branch. +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#get-users-with-access-to-the-protected-branch +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// Post protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified people push access for this branch.| Type | Description || ------- | ----------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | +// returns a []SimpleUserable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#add-user-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Post(ctx context.Context, body UsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// Put protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.| Type | Description || ------- | ----------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | +// returns a []SimpleUserable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection#set-user-access-restrictions +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Put(ctx context.Context, body UsersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of a user to push to this branch.| Type | Description || ------- | --------------------------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body UsersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the people who have push access to this branch. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified people push access for this branch.| Type | Description || ------- | ----------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPostRequestInformation(ctx context.Context, body UsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.| Type | Description || ------- | ----------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPutRequestInformation(ctx context.Context, body UsersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder when successful +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) { + return NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_item_rename_post_request_body.go b/pkg/github/repos/item_item_branches_item_rename_post_request_body.go new file mode 100644 index 0000000..07dfc1c --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_rename_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemBranchesItemRenamePostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new name of the branch. + new_name *string +} +// NewItemItemBranchesItemRenamePostRequestBody instantiates a new ItemItemBranchesItemRenamePostRequestBody and sets the default values. +func NewItemItemBranchesItemRenamePostRequestBody()(*ItemItemBranchesItemRenamePostRequestBody) { + m := &ItemItemBranchesItemRenamePostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemBranchesItemRenamePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemBranchesItemRenamePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemRenamePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemBranchesItemRenamePostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemBranchesItemRenamePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["new_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewName(val) + } + return nil + } + return res +} +// GetNewName gets the new_name property value. The new name of the branch. +// returns a *string when successful +func (m *ItemItemBranchesItemRenamePostRequestBody) GetNewName()(*string) { + return m.new_name +} +// Serialize serializes information the current object +func (m *ItemItemBranchesItemRenamePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("new_name", m.GetNewName()) + 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 *ItemItemBranchesItemRenamePostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNewName sets the new_name property value. The new name of the branch. +func (m *ItemItemBranchesItemRenamePostRequestBody) SetNewName(value *string)() { + m.new_name = value +} +type ItemItemBranchesItemRenamePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNewName()(*string) + SetNewName(value *string)() +} diff --git a/pkg/github/repos/item_item_branches_item_rename_request_builder.go b/pkg/github/repos/item_item_branches_item_rename_request_builder.go new file mode 100644 index 0000000..b1b147a --- /dev/null +++ b/pkg/github/repos/item_item_branches_item_rename_request_builder.go @@ -0,0 +1,69 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesItemRenameRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\rename +type ItemItemBranchesItemRenameRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesItemRenameRequestBuilderInternal instantiates a new ItemItemBranchesItemRenameRequestBuilder and sets the default values. +func NewItemItemBranchesItemRenameRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemRenameRequestBuilder) { + m := &ItemItemBranchesItemRenameRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/rename", pathParameters), + } + return m +} +// NewItemItemBranchesItemRenameRequestBuilder instantiates a new ItemItemBranchesItemRenameRequestBuilder and sets the default values. +func NewItemItemBranchesItemRenameRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemRenameRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesItemRenameRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renames a branch in a repository.**Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/renaming-a-branch)".The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions.In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. +// returns a BranchWithProtectionable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branches#rename-a-branch +func (m *ItemItemBranchesItemRenameRequestBuilder) Post(ctx context.Context, body ItemItemBranchesItemRenamePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchWithProtectionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBranchWithProtectionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchWithProtectionable), nil +} +// ToPostRequestInformation renames a branch in a repository.**Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/enterprise-cloud@latest//github/administering-a-repository/renaming-a-branch)".The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions.In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. +// returns a *RequestInformation when successful +func (m *ItemItemBranchesItemRenameRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemBranchesItemRenamePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesItemRenameRequestBuilder when successful +func (m *ItemItemBranchesItemRenameRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesItemRenameRequestBuilder) { + return NewItemItemBranchesItemRenameRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_request_builder.go b/pkg/github/repos/item_item_branches_request_builder.go new file mode 100644 index 0000000..6f6dfe7 --- /dev/null +++ b/pkg/github/repos/item_item_branches_request_builder.go @@ -0,0 +1,84 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches +type ItemItemBranchesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemBranchesRequestBuilderGetQueryParameters list branches +type ItemItemBranchesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Setting to `true` returns only branches protected by branch protections or rulesets. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + Protected *bool `uriparametername:"protected"` +} +// ByBranch gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.branches.item collection +// returns a *ItemItemBranchesWithBranchItemRequestBuilder when successful +func (m *ItemItemBranchesRequestBuilder) ByBranch(branch string)(*ItemItemBranchesWithBranchItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if branch != "" { + urlTplParams["branch"] = branch + } + return NewItemItemBranchesWithBranchItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemBranchesRequestBuilderInternal instantiates a new ItemItemBranchesRequestBuilder and sets the default values. +func NewItemItemBranchesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesRequestBuilder) { + m := &ItemItemBranchesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches{?page*,per_page*,protected*}", pathParameters), + } + return m +} +// NewItemItemBranchesRequestBuilder instantiates a new ItemItemBranchesRequestBuilder and sets the default values. +func NewItemItemBranchesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list branches +// returns a []ShortBranchable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branches#list-branches +func (m *ItemItemBranchesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemBranchesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ShortBranchable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateShortBranchFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ShortBranchable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ShortBranchable) + } + } + return val, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemBranchesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemBranchesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesRequestBuilder when successful +func (m *ItemItemBranchesRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesRequestBuilder) { + return NewItemItemBranchesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_branches_with_branch_item_request_builder.go b/pkg/github/repos/item_item_branches_with_branch_item_request_builder.go new file mode 100644 index 0000000..fc8a5ba --- /dev/null +++ b/pkg/github/repos/item_item_branches_with_branch_item_request_builder.go @@ -0,0 +1,70 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemBranchesWithBranchItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch} +type ItemItemBranchesWithBranchItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemBranchesWithBranchItemRequestBuilderInternal instantiates a new ItemItemBranchesWithBranchItemRequestBuilder and sets the default values. +func NewItemItemBranchesWithBranchItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesWithBranchItemRequestBuilder) { + m := &ItemItemBranchesWithBranchItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}", pathParameters), + } + return m +} +// NewItemItemBranchesWithBranchItemRequestBuilder instantiates a new ItemItemBranchesWithBranchItemRequestBuilder and sets the default values. +func NewItemItemBranchesWithBranchItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesWithBranchItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemBranchesWithBranchItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get a branch +// returns a BranchWithProtectionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branches#get-a-branch +func (m *ItemItemBranchesWithBranchItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchWithProtectionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBranchWithProtectionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchWithProtectionable), nil +} +// Protection the protection property +// returns a *ItemItemBranchesItemProtectionRequestBuilder when successful +func (m *ItemItemBranchesWithBranchItemRequestBuilder) Protection()(*ItemItemBranchesItemProtectionRequestBuilder) { + return NewItemItemBranchesItemProtectionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rename the rename property +// returns a *ItemItemBranchesItemRenameRequestBuilder when successful +func (m *ItemItemBranchesWithBranchItemRequestBuilder) Rename()(*ItemItemBranchesItemRenameRequestBuilder) { + return NewItemItemBranchesItemRenameRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// returns a *RequestInformation when successful +func (m *ItemItemBranchesWithBranchItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemBranchesWithBranchItemRequestBuilder when successful +func (m *ItemItemBranchesWithBranchItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemBranchesWithBranchItemRequestBuilder) { + return NewItemItemBranchesWithBranchItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_runs_item_annotations_request_builder.go b/pkg/github/repos/item_item_check_runs_item_annotations_request_builder.go new file mode 100644 index 0000000..7dcdfa1 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_item_annotations_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckRunsItemAnnotationsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs\{check_run_id}\annotations +type ItemItemCheckRunsItemAnnotationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCheckRunsItemAnnotationsRequestBuilderGetQueryParameters lists annotations for a check run using the annotation `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +type ItemItemCheckRunsItemAnnotationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCheckRunsItemAnnotationsRequestBuilderInternal instantiates a new ItemItemCheckRunsItemAnnotationsRequestBuilder and sets the default values. +func NewItemItemCheckRunsItemAnnotationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsItemAnnotationsRequestBuilder) { + m := &ItemItemCheckRunsItemAnnotationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}/annotations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCheckRunsItemAnnotationsRequestBuilder instantiates a new ItemItemCheckRunsItemAnnotationsRequestBuilder and sets the default values. +func NewItemItemCheckRunsItemAnnotationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsItemAnnotationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckRunsItemAnnotationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists annotations for a check run using the annotation `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a []CheckAnnotationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#list-check-run-annotations +func (m *ItemItemCheckRunsItemAnnotationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCheckRunsItemAnnotationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckAnnotationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckAnnotationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckAnnotationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckAnnotationable) + } + } + return val, nil +} +// ToGetRequestInformation lists annotations for a check run using the annotation `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemCheckRunsItemAnnotationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCheckRunsItemAnnotationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckRunsItemAnnotationsRequestBuilder when successful +func (m *ItemItemCheckRunsItemAnnotationsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckRunsItemAnnotationsRequestBuilder) { + return NewItemItemCheckRunsItemAnnotationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_runs_item_rerequest_request_builder.go b/pkg/github/repos/item_item_check_runs_item_rerequest_request_builder.go new file mode 100644 index 0000000..17a3da4 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_item_rerequest_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckRunsItemRerequestRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs\{check_run_id}\rerequest +type ItemItemCheckRunsItemRerequestRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCheckRunsItemRerequestRequestBuilderInternal instantiates a new ItemItemCheckRunsItemRerequestRequestBuilder and sets the default values. +func NewItemItemCheckRunsItemRerequestRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsItemRerequestRequestBuilder) { + m := &ItemItemCheckRunsItemRerequestRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}/rerequest", pathParameters), + } + return m +} +// NewItemItemCheckRunsItemRerequestRequestBuilder instantiates a new ItemItemCheckRunsItemRerequestRequestBuilder and sets the default values. +func NewItemItemCheckRunsItemRerequestRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsItemRerequestRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckRunsItemRerequestRequestBuilderInternal(urlParams, requestAdapter) +} +// Post triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)".OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#rerequest-a-check-run +func (m *ItemItemCheckRunsItemRerequestRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/enterprise-cloud@latest//rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)".OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCheckRunsItemRerequestRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckRunsItemRerequestRequestBuilder when successful +func (m *ItemItemCheckRunsItemRerequestRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckRunsItemRerequestRequestBuilder) { + return NewItemItemCheckRunsItemRerequestRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_runs_item_with_check_run_patch_request_body_member1.go b/pkg/github/repos/item_item_check_runs_item_with_check_run_patch_request_body_member1.go new file mode 100644 index 0000000..ccd030e --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_item_with_check_run_patch_request_body_member1.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 instantiates a new ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 and sets the default values. +func NewItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1()(*ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1) { + m := &ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_check_runs_item_with_check_run_patch_request_body_member2.go b/pkg/github/repos/item_item_check_runs_item_with_check_run_patch_request_body_member2.go new file mode 100644 index 0000000..7eb9c55 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_item_with_check_run_patch_request_body_member2.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 instantiates a new ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 and sets the default values. +func NewItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2()(*ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2) { + m := &ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_check_runs_post_request_body_member1.go b/pkg/github/repos/item_item_check_runs_post_request_body_member1.go new file mode 100644 index 0000000..ad3b692 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_post_request_body_member1.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckRunsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemCheckRunsPostRequestBodyMember1 instantiates a new ItemItemCheckRunsPostRequestBodyMember1 and sets the default values. +func NewItemItemCheckRunsPostRequestBodyMember1()(*ItemItemCheckRunsPostRequestBodyMember1) { + m := &ItemItemCheckRunsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckRunsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckRunsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckRunsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckRunsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckRunsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemCheckRunsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCheckRunsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemCheckRunsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_check_runs_post_request_body_member2.go b/pkg/github/repos/item_item_check_runs_post_request_body_member2.go new file mode 100644 index 0000000..d491653 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_post_request_body_member2.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckRunsPostRequestBodyMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemCheckRunsPostRequestBodyMember2 instantiates a new ItemItemCheckRunsPostRequestBodyMember2 and sets the default values. +func NewItemItemCheckRunsPostRequestBodyMember2()(*ItemItemCheckRunsPostRequestBodyMember2) { + m := &ItemItemCheckRunsPostRequestBodyMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckRunsPostRequestBodyMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckRunsPostRequestBodyMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckRunsPostRequestBodyMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckRunsPostRequestBodyMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckRunsPostRequestBodyMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemCheckRunsPostRequestBodyMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCheckRunsPostRequestBodyMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemCheckRunsPostRequestBodyMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_check_runs_request_builder.go b/pkg/github/repos/item_item_check_runs_request_builder.go new file mode 100644 index 0000000..88e1186 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_request_builder.go @@ -0,0 +1,192 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckRunsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs +type ItemItemCheckRunsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CheckRunsPostRequestBody composed type wrapper for classes ItemItemCheckRunsPostRequestBodyMember1able, ItemItemCheckRunsPostRequestBodyMember2able +type CheckRunsPostRequestBody struct { + // Composed type representation for type ItemItemCheckRunsPostRequestBodyMember1able + checkRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1 ItemItemCheckRunsPostRequestBodyMember1able + // Composed type representation for type ItemItemCheckRunsPostRequestBodyMember2able + checkRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2 ItemItemCheckRunsPostRequestBodyMember2able + // Composed type representation for type ItemItemCheckRunsPostRequestBodyMember1able + itemItemCheckRunsPostRequestBodyMember1 ItemItemCheckRunsPostRequestBodyMember1able + // Composed type representation for type ItemItemCheckRunsPostRequestBodyMember2able + itemItemCheckRunsPostRequestBodyMember2 ItemItemCheckRunsPostRequestBodyMember2able +} +// NewCheckRunsPostRequestBody instantiates a new CheckRunsPostRequestBody and sets the default values. +func NewCheckRunsPostRequestBody()(*CheckRunsPostRequestBody) { + m := &CheckRunsPostRequestBody{ + } + return m +} +// CreateCheckRunsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCheckRunsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCheckRunsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1 gets the ItemItemCheckRunsPostRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember1able +// returns a ItemItemCheckRunsPostRequestBodyMember1able when successful +func (m *CheckRunsPostRequestBody) GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1()(ItemItemCheckRunsPostRequestBodyMember1able) { + return m.checkRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1 +} +// GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2 gets the ItemItemCheckRunsPostRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember2able +// returns a ItemItemCheckRunsPostRequestBodyMember2able when successful +func (m *CheckRunsPostRequestBody) GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2()(ItemItemCheckRunsPostRequestBodyMember2able) { + return m.checkRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2 +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CheckRunsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CheckRunsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemCheckRunsPostRequestBodyMember1 gets the ItemItemCheckRunsPostRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember1able +// returns a ItemItemCheckRunsPostRequestBodyMember1able when successful +func (m *CheckRunsPostRequestBody) GetItemItemCheckRunsPostRequestBodyMember1()(ItemItemCheckRunsPostRequestBodyMember1able) { + return m.itemItemCheckRunsPostRequestBodyMember1 +} +// GetItemItemCheckRunsPostRequestBodyMember2 gets the ItemItemCheckRunsPostRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember2able +// returns a ItemItemCheckRunsPostRequestBodyMember2able when successful +func (m *CheckRunsPostRequestBody) GetItemItemCheckRunsPostRequestBodyMember2()(ItemItemCheckRunsPostRequestBodyMember2able) { + return m.itemItemCheckRunsPostRequestBodyMember2 +} +// Serialize serializes information the current object +func (m *CheckRunsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetItemItemCheckRunsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemCheckRunsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemCheckRunsPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetItemItemCheckRunsPostRequestBodyMember2()) + if err != nil { + return err + } + } + return nil +} +// SetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1 sets the ItemItemCheckRunsPostRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember1able +func (m *CheckRunsPostRequestBody) SetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1(value ItemItemCheckRunsPostRequestBodyMember1able)() { + m.checkRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1 = value +} +// SetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2 sets the ItemItemCheckRunsPostRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember2able +func (m *CheckRunsPostRequestBody) SetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2(value ItemItemCheckRunsPostRequestBodyMember2able)() { + m.checkRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2 = value +} +// SetItemItemCheckRunsPostRequestBodyMember1 sets the ItemItemCheckRunsPostRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember1able +func (m *CheckRunsPostRequestBody) SetItemItemCheckRunsPostRequestBodyMember1(value ItemItemCheckRunsPostRequestBodyMember1able)() { + m.itemItemCheckRunsPostRequestBodyMember1 = value +} +// SetItemItemCheckRunsPostRequestBodyMember2 sets the ItemItemCheckRunsPostRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsPostRequestBodyMember2able +func (m *CheckRunsPostRequestBody) SetItemItemCheckRunsPostRequestBodyMember2(value ItemItemCheckRunsPostRequestBodyMember2able)() { + m.itemItemCheckRunsPostRequestBodyMember2 = value +} +type CheckRunsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1()(ItemItemCheckRunsPostRequestBodyMember1able) + GetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2()(ItemItemCheckRunsPostRequestBodyMember2able) + GetItemItemCheckRunsPostRequestBodyMember1()(ItemItemCheckRunsPostRequestBodyMember1able) + GetItemItemCheckRunsPostRequestBodyMember2()(ItemItemCheckRunsPostRequestBodyMember2able) + SetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember1(value ItemItemCheckRunsPostRequestBodyMember1able)() + SetCheckRunsPostRequestBodyItemItemCheckRunsPostRequestBodyMember2(value ItemItemCheckRunsPostRequestBodyMember2able)() + SetItemItemCheckRunsPostRequestBodyMember1(value ItemItemCheckRunsPostRequestBodyMember1able)() + SetItemItemCheckRunsPostRequestBodyMember2(value ItemItemCheckRunsPostRequestBodyMember2able)() +} +// ByCheck_run_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.checkRuns.item collection +// returns a *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder when successful +func (m *ItemItemCheckRunsRequestBuilder) ByCheck_run_id(check_run_id int32)(*ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["check_run_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(check_run_id), 10) + return NewItemItemCheckRunsWithCheck_run_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCheckRunsRequestBuilderInternal instantiates a new ItemItemCheckRunsRequestBuilder and sets the default values. +func NewItemItemCheckRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsRequestBuilder) { + m := &ItemItemCheckRunsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs", pathParameters), + } + return m +} +// NewItemItemCheckRunsRequestBuilder instantiates a new ItemItemCheckRunsRequestBuilder and sets the default values. +func NewItemItemCheckRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckRunsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a new check run for a specific commit in a repository.To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite.In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. +// returns a CheckRunable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#create-a-check-run +func (m *ItemItemCheckRunsRequestBuilder) Post(ctx context.Context, body CheckRunsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckRunFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable), nil +} +// ToPostRequestInformation creates a new check run for a specific commit in a repository.To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite.In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. +// returns a *RequestInformation when successful +func (m *ItemItemCheckRunsRequestBuilder) ToPostRequestInformation(ctx context.Context, body CheckRunsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckRunsRequestBuilder when successful +func (m *ItemItemCheckRunsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckRunsRequestBuilder) { + return NewItemItemCheckRunsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_runs_with_check_run_item_request_builder.go b/pkg/github/repos/item_item_check_runs_with_check_run_item_request_builder.go new file mode 100644 index 0000000..42781d9 --- /dev/null +++ b/pkg/github/repos/item_item_check_runs_with_check_run_item_request_builder.go @@ -0,0 +1,235 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckRunsWithCheck_run_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs\{check_run_id} +type ItemItemCheckRunsWithCheck_run_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// WithCheck_run_PatchRequestBody composed type wrapper for classes ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able, ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able +type WithCheck_run_PatchRequestBody struct { + // Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able + itemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able + // Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able + itemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able + // Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able + withCheck_run_PatchRequestBodyItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able + // Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able + withCheck_run_PatchRequestBodyItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able +} +// NewWithCheck_run_PatchRequestBody instantiates a new WithCheck_run_PatchRequestBody and sets the default values. +func NewWithCheck_run_PatchRequestBody()(*WithCheck_run_PatchRequestBody) { + m := &WithCheck_run_PatchRequestBody{ + } + return m +} +// CreateWithCheck_run_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWithCheck_run_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWithCheck_run_PatchRequestBody() + if parseNode != nil { + if val, err := parseNode.GetObjectValue(CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able); ok { + result.SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able); ok { + result.SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able); ok { + result.SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1(cast) + } + } else if val, err := parseNode.GetObjectValue(CreateItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able); ok { + result.SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2(cast) + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WithCheck_run_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WithCheck_run_PatchRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1 gets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able +// returns a ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able when successful +func (m *WithCheck_run_PatchRequestBody) GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able) { + return m.itemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 +} +// GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2 gets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able +// returns a ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able when successful +func (m *WithCheck_run_PatchRequestBody) GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able) { + return m.itemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 +} +// GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1 gets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able +// returns a ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able when successful +func (m *WithCheck_run_PatchRequestBody) GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able) { + return m.withCheck_run_PatchRequestBodyItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 +} +// GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2 gets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able +// returns a ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able when successful +func (m *WithCheck_run_PatchRequestBody) GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able) { + return m.withCheck_run_PatchRequestBodyItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 +} +// Serialize serializes information the current object +func (m *WithCheck_run_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1 sets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able +func (m *WithCheck_run_PatchRequestBody) SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able)() { + m.itemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 = value +} +// SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2 sets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able +func (m *WithCheck_run_PatchRequestBody) SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able)() { + m.itemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 = value +} +// SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1 sets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able +func (m *WithCheck_run_PatchRequestBody) SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able)() { + m.withCheck_run_PatchRequestBodyItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1 = value +} +// SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2 sets the ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 property value. Composed type representation for type ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able +func (m *WithCheck_run_PatchRequestBody) SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able)() { + m.withCheck_run_PatchRequestBodyItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2 = value +} +type WithCheck_run_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able) + GetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able) + GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able) + GetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2()(ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able) + SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able)() + SetItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able)() + SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember1(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember1able)() + SetWithCheckRunPatchRequestBodyItemItemCheckRunsItemWithCheckRunPatchRequestBodyMember2(value ItemItemCheckRunsItemWithCheck_run_PatchRequestBodyMember2able)() +} +// Annotations the annotations property +// returns a *ItemItemCheckRunsItemAnnotationsRequestBuilder when successful +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) Annotations()(*ItemItemCheckRunsItemAnnotationsRequestBuilder) { + return NewItemItemCheckRunsItemAnnotationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCheckRunsWithCheck_run_ItemRequestBuilderInternal instantiates a new ItemItemCheckRunsWithCheck_run_ItemRequestBuilder and sets the default values. +func NewItemItemCheckRunsWithCheck_run_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) { + m := &ItemItemCheckRunsWithCheck_run_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}", pathParameters), + } + return m +} +// NewItemItemCheckRunsWithCheck_run_ItemRequestBuilder instantiates a new ItemItemCheckRunsWithCheck_run_ItemRequestBuilder and sets the default values. +func NewItemItemCheckRunsWithCheck_run_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckRunsWithCheck_run_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a single check run using its `id`.**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a CheckRunable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#get-a-check-run +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckRunFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable), nil +} +// Patch updates a check run for a specific commit in a repository.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a CheckRunable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#update-a-check-run +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) Patch(ctx context.Context, body WithCheck_run_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckRunFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable), nil +} +// Rerequest the rerequest property +// returns a *ItemItemCheckRunsItemRerequestRequestBuilder when successful +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) Rerequest()(*ItemItemCheckRunsItemRerequestRequestBuilder) { + return NewItemItemCheckRunsItemRerequestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets a single check run using its `id`.**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a check run for a specific commit in a repository.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body WithCheck_run_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder when successful +func (m *ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckRunsWithCheck_run_ItemRequestBuilder) { + return NewItemItemCheckRunsWithCheck_run_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_suites_item_check_runs_get_response.go b/pkg/github/repos/item_item_check_suites_item_check_runs_get_response.go new file mode 100644 index 0000000..c01de1c --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_item_check_runs_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCheckSuitesItemCheckRunsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The check_runs property + check_runs []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable + // The total_count property + total_count *int32 +} +// NewItemItemCheckSuitesItemCheckRunsGetResponse instantiates a new ItemItemCheckSuitesItemCheckRunsGetResponse and sets the default values. +func NewItemItemCheckSuitesItemCheckRunsGetResponse()(*ItemItemCheckSuitesItemCheckRunsGetResponse) { + m := &ItemItemCheckSuitesItemCheckRunsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckSuitesItemCheckRunsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckSuitesItemCheckRunsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckSuitesItemCheckRunsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCheckRuns gets the check_runs property value. The check_runs property +// returns a []CheckRunable when successful +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) GetCheckRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable) { + return m.check_runs +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["check_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckRunFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable) + } + } + m.SetCheckRuns(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCheckRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCheckRuns())) + for i, v := range m.GetCheckRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("check_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCheckSuitesItemCheckRunsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCheckRuns sets the check_runs property value. The check_runs property +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) SetCheckRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable)() { + m.check_runs = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCheckSuitesItemCheckRunsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCheckSuitesItemCheckRunsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable) + GetTotalCount()(*int32) + SetCheckRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_check_suites_item_check_runs_request_builder.go b/pkg/github/repos/item_item_check_suites_item_check_runs_request_builder.go new file mode 100644 index 0000000..47f66f3 --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_item_check_runs_request_builder.go @@ -0,0 +1,70 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i86f465cfbdc6b1355085f7f2e8e8691b68283c288fac69734753746454f0360d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/checksuites/item/checkruns" +) + +// ItemItemCheckSuitesItemCheckRunsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\{check_suite_id}\check-runs +type ItemItemCheckSuitesItemCheckRunsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCheckSuitesItemCheckRunsRequestBuilderGetQueryParameters lists check runs for a check suite using its `id`.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +type ItemItemCheckSuitesItemCheckRunsRequestBuilderGetQueryParameters struct { + // Returns check runs with the specified `name`. + Check_name *string `uriparametername:"check_name"` + // Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. + Filter *i86f465cfbdc6b1355085f7f2e8e8691b68283c288fac69734753746454f0360d.GetFilterQueryParameterType `uriparametername:"filter"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Returns check runs with the specified `status`. + Status *i86f465cfbdc6b1355085f7f2e8e8691b68283c288fac69734753746454f0360d.GetStatusQueryParameterType `uriparametername:"status"` +} +// NewItemItemCheckSuitesItemCheckRunsRequestBuilderInternal instantiates a new ItemItemCheckSuitesItemCheckRunsRequestBuilder and sets the default values. +func NewItemItemCheckSuitesItemCheckRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesItemCheckRunsRequestBuilder) { + m := &ItemItemCheckSuitesItemCheckRunsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}/check-runs{?check_name*,filter*,page*,per_page*,status*}", pathParameters), + } + return m +} +// NewItemItemCheckSuitesItemCheckRunsRequestBuilder instantiates a new ItemItemCheckSuitesItemCheckRunsRequestBuilder and sets the default values. +func NewItemItemCheckSuitesItemCheckRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesItemCheckRunsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckSuitesItemCheckRunsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists check runs for a check suite using its `id`.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a ItemItemCheckSuitesItemCheckRunsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#list-check-runs-in-a-check-suite +func (m *ItemItemCheckSuitesItemCheckRunsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCheckSuitesItemCheckRunsRequestBuilderGetQueryParameters])(ItemItemCheckSuitesItemCheckRunsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCheckSuitesItemCheckRunsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCheckSuitesItemCheckRunsGetResponseable), nil +} +// ToGetRequestInformation lists check runs for a check suite using its `id`.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemCheckSuitesItemCheckRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCheckSuitesItemCheckRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckSuitesItemCheckRunsRequestBuilder when successful +func (m *ItemItemCheckSuitesItemCheckRunsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckSuitesItemCheckRunsRequestBuilder) { + return NewItemItemCheckSuitesItemCheckRunsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_suites_item_rerequest_request_builder.go b/pkg/github/repos/item_item_check_suites_item_rerequest_request_builder.go new file mode 100644 index 0000000..56661d4 --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_item_rerequest_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckSuitesItemRerequestRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\{check_suite_id}\rerequest +type ItemItemCheckSuitesItemRerequestRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCheckSuitesItemRerequestRequestBuilderInternal instantiates a new ItemItemCheckSuitesItemRerequestRequestBuilder and sets the default values. +func NewItemItemCheckSuitesItemRerequestRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesItemRerequestRequestBuilder) { + m := &ItemItemCheckSuitesItemRerequestRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}/rerequest", pathParameters), + } + return m +} +// NewItemItemCheckSuitesItemRerequestRequestBuilder instantiates a new ItemItemCheckSuitesItemRerequestRequestBuilder and sets the default values. +func NewItemItemCheckSuitesItemRerequestRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesItemRerequestRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckSuitesItemRerequestRequestBuilderInternal(urlParams, requestAdapter) +} +// Post triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#rerequest-a-check-suite +func (m *ItemItemCheckSuitesItemRerequestRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToPostRequestInformation triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCheckSuitesItemRerequestRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckSuitesItemRerequestRequestBuilder when successful +func (m *ItemItemCheckSuitesItemRerequestRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckSuitesItemRerequestRequestBuilder) { + return NewItemItemCheckSuitesItemRerequestRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_suites_post_request_body.go b/pkg/github/repos/item_item_check_suites_post_request_body.go new file mode 100644 index 0000000..8af87ab --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckSuitesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sha of the head commit. + head_sha *string +} +// NewItemItemCheckSuitesPostRequestBody instantiates a new ItemItemCheckSuitesPostRequestBody and sets the default values. +func NewItemItemCheckSuitesPostRequestBody()(*ItemItemCheckSuitesPostRequestBody) { + m := &ItemItemCheckSuitesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckSuitesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckSuitesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckSuitesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckSuitesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckSuitesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadSha(val) + } + return nil + } + return res +} +// GetHeadSha gets the head_sha property value. The sha of the head commit. +// returns a *string when successful +func (m *ItemItemCheckSuitesPostRequestBody) GetHeadSha()(*string) { + return m.head_sha +} +// Serialize serializes information the current object +func (m *ItemItemCheckSuitesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("head_sha", m.GetHeadSha()) + 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 *ItemItemCheckSuitesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetHeadSha sets the head_sha property value. The sha of the head commit. +func (m *ItemItemCheckSuitesPostRequestBody) SetHeadSha(value *string)() { + m.head_sha = value +} +type ItemItemCheckSuitesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHeadSha()(*string) + SetHeadSha(value *string)() +} diff --git a/pkg/github/repos/item_item_check_suites_preferences_patch_request_body.go b/pkg/github/repos/item_item_check_suites_preferences_patch_request_body.go new file mode 100644 index 0000000..54ecfbe --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_preferences_patch_request_body.go @@ -0,0 +1,92 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckSuitesPreferencesPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. + auto_trigger_checks []ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable +} +// NewItemItemCheckSuitesPreferencesPatchRequestBody instantiates a new ItemItemCheckSuitesPreferencesPatchRequestBody and sets the default values. +func NewItemItemCheckSuitesPreferencesPatchRequestBody()(*ItemItemCheckSuitesPreferencesPatchRequestBody) { + m := &ItemItemCheckSuitesPreferencesPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckSuitesPreferencesPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckSuitesPreferencesPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckSuitesPreferencesPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAutoTriggerChecks gets the auto_trigger_checks property value. Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. +// returns a []ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody) GetAutoTriggerChecks()([]ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable) { + return m.auto_trigger_checks +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auto_trigger_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable) + } + } + m.SetAutoTriggerChecks(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAutoTriggerChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAutoTriggerChecks())) + for i, v := range m.GetAutoTriggerChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("auto_trigger_checks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAutoTriggerChecks sets the auto_trigger_checks property value. Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody) SetAutoTriggerChecks(value []ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable)() { + m.auto_trigger_checks = value +} +type ItemItemCheckSuitesPreferencesPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoTriggerChecks()([]ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable) + SetAutoTriggerChecks(value []ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable)() +} diff --git a/pkg/github/repos/item_item_check_suites_preferences_patch_request_body_auto_trigger_checks.go b/pkg/github/repos/item_item_check_suites_preferences_patch_request_body_auto_trigger_checks.go new file mode 100644 index 0000000..5586afa --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_preferences_patch_request_body_auto_trigger_checks.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The `id` of the GitHub App. + app_id *int32 + // Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + setting *bool +} +// NewItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks instantiates a new ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks and sets the default values. +func NewItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks()(*ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) { + m := &ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAppId gets the app_id property value. The `id` of the GitHub App. +// returns a *int32 when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) GetAppId()(*int32) { + return m.app_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + return res +} +// GetSetting gets the setting property value. Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. +// returns a *bool when successful +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) GetSetting()(*bool) { + return m.setting +} +// Serialize serializes information the current object +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("app_id", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("setting", m.GetSetting()) + 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 *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAppId sets the app_id property value. The `id` of the GitHub App. +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) SetAppId(value *int32)() { + m.app_id = value +} +// SetSetting sets the setting property value. Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. +func (m *ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checks) SetSetting(value *bool)() { + m.setting = value +} +type ItemItemCheckSuitesPreferencesPatchRequestBody_auto_trigger_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int32) + GetSetting()(*bool) + SetAppId(value *int32)() + SetSetting(value *bool)() +} diff --git a/pkg/github/repos/item_item_check_suites_preferences_request_builder.go b/pkg/github/repos/item_item_check_suites_preferences_request_builder.go new file mode 100644 index 0000000..c9b5746 --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_preferences_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckSuitesPreferencesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\preferences +type ItemItemCheckSuitesPreferencesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCheckSuitesPreferencesRequestBuilderInternal instantiates a new ItemItemCheckSuitesPreferencesRequestBuilder and sets the default values. +func NewItemItemCheckSuitesPreferencesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesPreferencesRequestBuilder) { + m := &ItemItemCheckSuitesPreferencesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/preferences", pathParameters), + } + return m +} +// NewItemItemCheckSuitesPreferencesRequestBuilder instantiates a new ItemItemCheckSuitesPreferencesRequestBuilder and sets the default values. +func NewItemItemCheckSuitesPreferencesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesPreferencesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckSuitesPreferencesRequestBuilderInternal(urlParams, requestAdapter) +} +// Patch changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#create-a-check-suite).You must have admin permissions in the repository to set preferences for check suites. +// returns a CheckSuitePreferenceable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#update-repository-preferences-for-check-suites +func (m *ItemItemCheckSuitesPreferencesRequestBuilder) Patch(ctx context.Context, body ItemItemCheckSuitesPreferencesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuitePreferenceable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckSuitePreferenceFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuitePreferenceable), nil +} +// ToPatchRequestInformation changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#create-a-check-suite).You must have admin permissions in the repository to set preferences for check suites. +// returns a *RequestInformation when successful +func (m *ItemItemCheckSuitesPreferencesRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemCheckSuitesPreferencesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckSuitesPreferencesRequestBuilder when successful +func (m *ItemItemCheckSuitesPreferencesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckSuitesPreferencesRequestBuilder) { + return NewItemItemCheckSuitesPreferencesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_suites_request_builder.go b/pkg/github/repos/item_item_check_suites_request_builder.go new file mode 100644 index 0000000..8b6cdd0 --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_request_builder.go @@ -0,0 +1,77 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckSuitesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites +type ItemItemCheckSuitesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCheck_suite_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.checkSuites.item collection +// returns a *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder when successful +func (m *ItemItemCheckSuitesRequestBuilder) ByCheck_suite_id(check_suite_id int32)(*ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["check_suite_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(check_suite_id), 10) + return NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCheckSuitesRequestBuilderInternal instantiates a new ItemItemCheckSuitesRequestBuilder and sets the default values. +func NewItemItemCheckSuitesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesRequestBuilder) { + m := &ItemItemCheckSuitesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites", pathParameters), + } + return m +} +// NewItemItemCheckSuitesRequestBuilder instantiates a new ItemItemCheckSuitesRequestBuilder and sets the default values. +func NewItemItemCheckSuitesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckSuitesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-cloud@latest//rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#update-repository-preferences-for-check-suites)".**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a CheckSuiteable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#create-a-check-suite +func (m *ItemItemCheckSuitesRequestBuilder) Post(ctx context.Context, body ItemItemCheckSuitesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckSuiteFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable), nil +} +// Preferences the preferences property +// returns a *ItemItemCheckSuitesPreferencesRequestBuilder when successful +func (m *ItemItemCheckSuitesRequestBuilder) Preferences()(*ItemItemCheckSuitesPreferencesRequestBuilder) { + return NewItemItemCheckSuitesPreferencesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToPostRequestInformation creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-cloud@latest//rest/checks/runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#update-repository-preferences-for-check-suites)".**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth apps and personal access tokens (classic) cannot use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCheckSuitesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCheckSuitesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckSuitesRequestBuilder when successful +func (m *ItemItemCheckSuitesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckSuitesRequestBuilder) { + return NewItemItemCheckSuitesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_check_suites_with_check_suite_item_request_builder.go b/pkg/github/repos/item_item_check_suites_with_check_suite_item_request_builder.go new file mode 100644 index 0000000..12f6cbe --- /dev/null +++ b/pkg/github/repos/item_item_check_suites_with_check_suite_item_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\{check_suite_id} +type ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CheckRuns the checkRuns property +// returns a *ItemItemCheckSuitesItemCheckRunsRequestBuilder when successful +func (m *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) CheckRuns()(*ItemItemCheckSuitesItemCheckRunsRequestBuilder) { + return NewItemItemCheckSuitesItemCheckRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilderInternal instantiates a new ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder and sets the default values. +func NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) { + m := &ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}", pathParameters), + } + return m +} +// NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder instantiates a new ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder and sets the default values. +func NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a single check suite using its `id`.**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a CheckSuiteable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#get-a-check-suite +func (m *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckSuiteFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable), nil +} +// Rerequest the rerequest property +// returns a *ItemItemCheckSuitesItemRerequestRequestBuilder when successful +func (m *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) Rerequest()(*ItemItemCheckSuitesItemRerequestRequestBuilder) { + return NewItemItemCheckSuitesItemRerequestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets a single check suite using its `id`.**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder when successful +func (m *ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder) { + return NewItemItemCheckSuitesWithCheck_suite_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_alerts_item_instances_request_builder.go b/pkg/github/repos/item_item_code_scanning_alerts_item_instances_request_builder.go new file mode 100644 index 0000000..63e85a1 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_alerts_item_instances_request_builder.go @@ -0,0 +1,77 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningAlertsItemInstancesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number}\instances +type ItemItemCodeScanningAlertsItemInstancesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodeScanningAlertsItemInstancesRequestBuilderGetQueryParameters lists all instances of the specified code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +type ItemItemCodeScanningAlertsItemInstancesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + Ref *string `uriparametername:"ref"` +} +// NewItemItemCodeScanningAlertsItemInstancesRequestBuilderInternal instantiates a new ItemItemCodeScanningAlertsItemInstancesRequestBuilder and sets the default values. +func NewItemItemCodeScanningAlertsItemInstancesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAlertsItemInstancesRequestBuilder) { + m := &ItemItemCodeScanningAlertsItemInstancesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,ref*}", pathParameters), + } + return m +} +// NewItemItemCodeScanningAlertsItemInstancesRequestBuilder instantiates a new ItemItemCodeScanningAlertsItemInstancesRequestBuilder and sets the default values. +func NewItemItemCodeScanningAlertsItemInstancesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAlertsItemInstancesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningAlertsItemInstancesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all instances of the specified code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a []CodeScanningAlertInstanceable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Instances503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert +func (m *ItemItemCodeScanningAlertsItemInstancesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAlertsItemInstancesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertInstanceable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstances503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAlertInstanceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertInstanceable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertInstanceable) + } + } + return val, nil +} +// ToGetRequestInformation lists all instances of the specified code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAlertsItemInstancesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAlertsItemInstancesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningAlertsItemInstancesRequestBuilder when successful +func (m *ItemItemCodeScanningAlertsItemInstancesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningAlertsItemInstancesRequestBuilder) { + return NewItemItemCodeScanningAlertsItemInstancesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_alerts_item_with_alert_number_patch_request_body.go b/pkg/github/repos/item_item_code_scanning_alerts_item_with_alert_number_patch_request_body.go new file mode 100644 index 0000000..5f0cc9e --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_alerts_item_with_alert_number_patch_request_body.go @@ -0,0 +1,141 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The dismissal comment associated with the dismissal of the alert. + dismissed_comment *string + // **Required when the state is dismissed.** The reason for dismissing or closing the alert. + dismissed_reason *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertDismissedReason + // Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + state *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSetState +} +// NewItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody instantiates a new ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody and sets the default values. +func NewItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody()(*ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) { + m := &ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDismissedComment gets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +// returns a *string when successful +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetDismissedReason gets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +// returns a *CodeScanningAlertDismissedReason when successful +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) GetDismissedReason()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertDismissedReason) { + return m.dismissed_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + res["dismissed_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseCodeScanningAlertDismissedReason) + if err != nil { + return err + } + if val != nil { + m.SetDismissedReason(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertDismissedReason)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseCodeScanningAlertSetState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSetState)) + } + return nil + } + return res +} +// GetState gets the state property value. Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. +// returns a *CodeScanningAlertSetState when successful +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) GetState()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSetState) { + return m.state +} +// Serialize serializes information the current object +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + if m.GetDismissedReason() != nil { + cast := (*m.GetDismissedReason()).String() + err := writer.WriteStringValue("dismissed_reason", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDismissedComment sets the dismissed_comment property value. The dismissal comment associated with the dismissal of the alert. +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +// SetDismissedReason sets the dismissed_reason property value. **Required when the state is dismissed.** The reason for dismissing or closing the alert. +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) SetDismissedReason(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertDismissedReason)() { + m.dismissed_reason = value +} +// SetState sets the state property value. Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. +func (m *ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBody) SetState(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSetState)() { + m.state = value +} +type ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDismissedComment()(*string) + GetDismissedReason()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertDismissedReason) + GetState()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSetState) + SetDismissedComment(value *string)() + SetDismissedReason(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertDismissedReason)() + SetState(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSetState)() +} diff --git a/pkg/github/repos/item_item_code_scanning_alerts_request_builder.go b/pkg/github/repos/item_item_code_scanning_alerts_request_builder.go new file mode 100644 index 0000000..d52252d --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_alerts_request_builder.go @@ -0,0 +1,101 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i22b9d1f4e45c0fc1fad5bfaaf80ebac6ec530ac932d0178961dadb608b770f0a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/codescanning/alerts" +) + +// ItemItemCodeScanningAlertsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts +type ItemItemCodeScanningAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodeScanningAlertsRequestBuilderGetQueryParameters lists code scanning alerts.The response includes a `most_recent_instance` object.This provides details of the most recent instance of this alertfor the default branch (or for the specified Git reference if you used `ref` in the request).OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +type ItemItemCodeScanningAlertsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i22b9d1f4e45c0fc1fad5bfaaf80ebac6ec530ac932d0178961dadb608b770f0a.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + Ref *string `uriparametername:"ref"` + // If specified, only code scanning alerts with this severity will be returned. + Severity *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertSeverity `uriparametername:"severity"` + // The property by which to sort the results. + Sort *i22b9d1f4e45c0fc1fad5bfaaf80ebac6ec530ac932d0178961dadb608b770f0a.GetSortQueryParameterType `uriparametername:"sort"` + // If specified, only code scanning alerts with this state will be returned. + State *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertStateQuery `uriparametername:"state"` + // The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. + Tool_guid *string `uriparametername:"tool_guid"` + // The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. + Tool_name *string `uriparametername:"tool_name"` +} +// ByAlert_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.alerts.item collection +// returns a *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder when successful +func (m *ItemItemCodeScanningAlertsRequestBuilder) ByAlert_number(alert_number int32)(*ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["alert_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(alert_number), 10) + return NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningAlertsRequestBuilderInternal instantiates a new ItemItemCodeScanningAlertsRequestBuilder and sets the default values. +func NewItemItemCodeScanningAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAlertsRequestBuilder) { + m := &ItemItemCodeScanningAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?direction*,page*,per_page*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", pathParameters), + } + return m +} +// NewItemItemCodeScanningAlertsRequestBuilder instantiates a new ItemItemCodeScanningAlertsRequestBuilder and sets the default values. +func NewItemItemCodeScanningAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists code scanning alerts.The response includes a `most_recent_instance` object.This provides details of the most recent instance of this alertfor the default branch (or for the specified Git reference if you used `ref` in the request).OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a []CodeScanningAlertItemsable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Alerts503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-code-scanning-alerts-for-a-repository +func (m *ItemItemCodeScanningAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertItemsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAlerts503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAlertItemsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertItemsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertItemsable) + } + } + return val, nil +} +// ToGetRequestInformation lists code scanning alerts.The response includes a `most_recent_instance` object.This provides details of the most recent instance of this alertfor the default branch (or for the specified Git reference if you used `ref` in the request).OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningAlertsRequestBuilder when successful +func (m *ItemItemCodeScanningAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningAlertsRequestBuilder) { + return NewItemItemCodeScanningAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_alerts_with_alert_number_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_alerts_with_alert_number_item_request_builder.go new file mode 100644 index 0000000..69802cd --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_alerts_with_alert_number_item_request_builder.go @@ -0,0 +1,109 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number} +type ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilderInternal instantiates a new ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) { + m := &ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}", pathParameters), + } + return m +} +// NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder instantiates a new ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a single code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningAlertable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningAlert503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-a-code-scanning-alert +func (m *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAlert503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertable), nil +} +// Instances the instances property +// returns a *ItemItemCodeScanningAlertsItemInstancesRequestBuilder when successful +func (m *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) Instances()(*ItemItemCodeScanningAlertsItemInstancesRequestBuilder) { + return NewItemItemCodeScanningAlertsItemInstancesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch updates the status of a single code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningAlertable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningAlert503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#update-a-code-scanning-alert +func (m *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) Patch(ctx context.Context, body ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAlert503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAlertable), nil +} +// ToGetRequestInformation gets a single code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the status of a single code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemCodeScanningAlertsItemWithAlert_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder when successful +func (m *ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder) { + return NewItemItemCodeScanningAlertsWithAlert_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_analyses_request_builder.go b/pkg/github/repos/item_item_code_scanning_analyses_request_builder.go new file mode 100644 index 0000000..f4937c0 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_analyses_request_builder.go @@ -0,0 +1,99 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ifc6b8c88c506adf62b2ae18f4ceb0ef34b36d8de3d6c1834ce032d2e515ebfb5 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/codescanning/analyses" +) + +// ItemItemCodeScanningAnalysesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\analyses +type ItemItemCodeScanningAnalysesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodeScanningAnalysesRequestBuilderGetQueryParameters lists the details of all code scanning analyses for a repository,starting with the most recent.The response is paginated and you can use the `page` and `per_page` parametersto list the analyses you're interested in.By default 30 analyses are listed per page.The `rules_count` field in the response give the number of rulesthat were run in the analysis.For very old analyses this data is not available,and `0` is returned in this field.**Deprecation notice**:The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +type ItemItemCodeScanningAnalysesRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *ifc6b8c88c506adf62b2ae18f4ceb0ef34b36d8de3d6c1834ce032d2e515ebfb5.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + Ref *string `uriparametername:"ref"` + // Filter analyses belonging to the same SARIF upload. + Sarif_id *string `uriparametername:"sarif_id"` + // The property by which to sort the results. + Sort *ifc6b8c88c506adf62b2ae18f4ceb0ef34b36d8de3d6c1834ce032d2e515ebfb5.GetSortQueryParameterType `uriparametername:"sort"` + // The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. + Tool_guid *string `uriparametername:"tool_guid"` + // The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. + Tool_name *string `uriparametername:"tool_name"` +} +// ByAnalysis_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.analyses.item collection +// returns a *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningAnalysesRequestBuilder) ByAnalysis_id(analysis_id int32)(*ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["analysis_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(analysis_id), 10) + return NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningAnalysesRequestBuilderInternal instantiates a new ItemItemCodeScanningAnalysesRequestBuilder and sets the default values. +func NewItemItemCodeScanningAnalysesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAnalysesRequestBuilder) { + m := &ItemItemCodeScanningAnalysesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", pathParameters), + } + return m +} +// NewItemItemCodeScanningAnalysesRequestBuilder instantiates a new ItemItemCodeScanningAnalysesRequestBuilder and sets the default values. +func NewItemItemCodeScanningAnalysesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAnalysesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningAnalysesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the details of all code scanning analyses for a repository,starting with the most recent.The response is paginated and you can use the `page` and `per_page` parametersto list the analyses you're interested in.By default 30 analyses are listed per page.The `rules_count` field in the response give the number of rulesthat were run in the analysis.For very old analyses this data is not available,and `0` is returned in this field.**Deprecation notice**:The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a []CodeScanningAnalysisable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Analyses503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository +func (m *ItemItemCodeScanningAnalysesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAnalysesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAnalyses503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAnalysisFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisable) + } + } + return val, nil +} +// ToGetRequestInformation lists the details of all code scanning analyses for a repository,starting with the most recent.The response is paginated and you can use the `page` and `per_page` parametersto list the analyses you're interested in.By default 30 analyses are listed per page.The `rules_count` field in the response give the number of rulesthat were run in the analysis.For very old analyses this data is not available,and `0` is returned in this field.**Deprecation notice**:The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAnalysesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAnalysesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningAnalysesRequestBuilder when successful +func (m *ItemItemCodeScanningAnalysesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningAnalysesRequestBuilder) { + return NewItemItemCodeScanningAnalysesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go new file mode 100644 index 0000000..7994493 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go @@ -0,0 +1,107 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\analyses\{analysis_id} +type ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderDeleteQueryParameters deletes a specified code scanning analysis from a repository.You can delete one analysis at a time.To delete a series of analyses, start with the most recent analysis and work backwards.Conceptually, the process is similar to the undo function in a text editor.When you list the analyses for a repository,one or more will be identified as deletable in the response:```"deletable": true```An analysis is deletable when it's the most recent in a set of analyses.Typically, a repository will have multiple sets of analysesfor each enabled code scanning tool,where a set is determined by a unique combination of analysis values:* `ref`* `tool`* `category`If you attempt to delete an analysis that is not the most recent in a set,you'll get a 400 response with the message:```Analysis specified is not deletable.```The response from a successful `DELETE` operation provides you withtwo alternative URLs for deleting the next analysis in the set:`next_analysis_url` and `confirm_delete_url`.Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysisin a set. This is a useful option if you want to preserve at least one analysisfor the specified tool in your repository.Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`in the 200 response is `null`.As an example of the deletion process,let's imagine that you added a workflow that configured a particular code scanning toolto analyze the code in a repository. This tool has added 15 analyses:10 on the default branch, and another 5 on a topic branch.You therefore have two separate sets of analyses for this tool.You've now decided that you want to remove all of the analyses for the tool.To do this you must make 15 separate deletion requests.To start, you must find an analysis that's identified as deletable.Each set of analyses always has one that's identified as deletable.Having found the deletable analysis for one of the two sets,delete this analysis and then continue deleting the next analysis in the set until they're all deleted.Then repeat the process for the second set.The procedure therefore consists of a nested loop:**Outer loop**:* List the analyses for the repository, filtered by tool.* Parse this list to find a deletable analysis. If found: **Inner loop**: * Delete the identified analysis. * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +type ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderDeleteQueryParameters struct { + // Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` + Confirm_delete *string `uriparametername:"confirm_delete"` +} +// NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderInternal instantiates a new ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) { + m := &ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses/{analysis_id}{?confirm_delete*}", pathParameters), + } + return m +} +// NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder instantiates a new ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a specified code scanning analysis from a repository.You can delete one analysis at a time.To delete a series of analyses, start with the most recent analysis and work backwards.Conceptually, the process is similar to the undo function in a text editor.When you list the analyses for a repository,one or more will be identified as deletable in the response:```"deletable": true```An analysis is deletable when it's the most recent in a set of analyses.Typically, a repository will have multiple sets of analysesfor each enabled code scanning tool,where a set is determined by a unique combination of analysis values:* `ref`* `tool`* `category`If you attempt to delete an analysis that is not the most recent in a set,you'll get a 400 response with the message:```Analysis specified is not deletable.```The response from a successful `DELETE` operation provides you withtwo alternative URLs for deleting the next analysis in the set:`next_analysis_url` and `confirm_delete_url`.Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysisin a set. This is a useful option if you want to preserve at least one analysisfor the specified tool in your repository.Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`in the 200 response is `null`.As an example of the deletion process,let's imagine that you added a workflow that configured a particular code scanning toolto analyze the code in a repository. This tool has added 15 analyses:10 on the default branch, and another 5 on a topic branch.You therefore have two separate sets of analyses for this tool.You've now decided that you want to remove all of the analyses for the tool.To do this you must make 15 separate deletion requests.To start, you must find an analysis that's identified as deletable.Each set of analyses always has one that's identified as deletable.Having found the deletable analysis for one of the two sets,delete this analysis and then continue deleting the next analysis in the set until they're all deleted.Then repeat the process for the second set.The procedure therefore consists of a nested loop:**Outer loop**:* List the analyses for the repository, filtered by tool.* Parse this list to find a deletable analysis. If found: **Inner loop**: * Delete the identified analysis. * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningAnalysisDeletionable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningAnalysisDeletion503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository +func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderDeleteQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisDeletionable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAnalysisDeletion503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAnalysisDeletionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisDeletionable), nil +} +// Get gets a specified code scanning analysis for a repository.The default JSON response contains fields that describe the analysis.This includes the Git reference and commit SHA to which the analysis relates,the datetime of the analysis, the name of the code scanning tool,and the number of alerts.The `rules_count` field in the default response give the number of rulesthat were run in the analysis.For very old analyses this data is not available,and `0` is returned in this field.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningAnalysisable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningAnalysis503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository +func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAnalysis503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningAnalysisFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningAnalysisable), nil +} +// ToDeleteRequestInformation deletes a specified code scanning analysis from a repository.You can delete one analysis at a time.To delete a series of analyses, start with the most recent analysis and work backwards.Conceptually, the process is similar to the undo function in a text editor.When you list the analyses for a repository,one or more will be identified as deletable in the response:```"deletable": true```An analysis is deletable when it's the most recent in a set of analyses.Typically, a repository will have multiple sets of analysesfor each enabled code scanning tool,where a set is determined by a unique combination of analysis values:* `ref`* `tool`* `category`If you attempt to delete an analysis that is not the most recent in a set,you'll get a 400 response with the message:```Analysis specified is not deletable.```The response from a successful `DELETE` operation provides you withtwo alternative URLs for deleting the next analysis in the set:`next_analysis_url` and `confirm_delete_url`.Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysisin a set. This is a useful option if you want to preserve at least one analysisfor the specified tool in your repository.Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`in the 200 response is `null`.As an example of the deletion process,let's imagine that you added a workflow that configured a particular code scanning toolto analyze the code in a repository. This tool has added 15 analyses:10 on the default branch, and another 5 on a topic branch.You therefore have two separate sets of analyses for this tool.You've now decided that you want to remove all of the analyses for the tool.To do this you must make 15 separate deletion requests.To start, you must find an analysis that's identified as deletable.Each set of analyses always has one that's identified as deletable.Having found the deletable analysis for one of the two sets,delete this analysis and then continue deleting the next analysis in the set until they're all deleted.Then repeat the process for the second set.The procedure therefore consists of a nested loop:**Outer loop**:* List the analyses for the repository, filtered by tool.* Parse this list to find a deletable analysis. If found: **Inner loop**: * Delete the identified analysis. * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderDeleteQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specified code scanning analysis for a repository.The default JSON response contains fields that describe the analysis.This includes the Git reference and commit SHA to which the analysis relates,the datetime of the analysis, the name of the code scanning tool,and the number of alerts.The `rules_count` field in the default response give the number of rulesthat were run in the analysis.For very old analyses this data is not available,and `0` is returned in this field.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) { + return NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_databases_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_databases_request_builder.go new file mode 100644 index 0000000..ba385a0 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_databases_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlDatabasesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\databases +type ItemItemCodeScanningCodeqlDatabasesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByLanguage gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.codeql.databases.item collection +// returns a *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlDatabasesRequestBuilder) ByLanguage(language string)(*ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if language != "" { + urlTplParams["language"] = language + } + return NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlDatabasesRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlDatabasesRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlDatabasesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlDatabasesRequestBuilder) { + m := &ItemItemCodeScanningCodeqlDatabasesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/databases", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlDatabasesRequestBuilder instantiates a new ItemItemCodeScanningCodeqlDatabasesRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlDatabasesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlDatabasesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlDatabasesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the CodeQL databases that are available in a repository.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a []CodeScanningCodeqlDatabaseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Databases503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository +func (m *ItemItemCodeScanningCodeqlDatabasesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningCodeqlDatabaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDatabases503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningCodeqlDatabaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningCodeqlDatabaseable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningCodeqlDatabaseable) + } + } + return val, nil +} +// ToGetRequestInformation lists the CodeQL databases that are available in a repository.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlDatabasesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlDatabasesRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlDatabasesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlDatabasesRequestBuilder) { + return NewItemItemCodeScanningCodeqlDatabasesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go new file mode 100644 index 0000000..eda4e0d --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\databases\{language} +type ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/databases/{language}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningCodeqlDatabaseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningCodeqlDatabase503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-a-codeql-database-for-a-repository +func (m *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningCodeqlDatabaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningCodeqlDatabase503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningCodeqlDatabaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningCodeqlDatabaseable), nil +} +// ToGetRequestInformation gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) { + return NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_request_builder.go new file mode 100644 index 0000000..3f287a4 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_request_builder.go @@ -0,0 +1,33 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeScanningCodeqlRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql +type ItemItemCodeScanningCodeqlRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningCodeqlRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlRequestBuilder) { + m := &ItemItemCodeScanningCodeqlRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlRequestBuilder instantiates a new ItemItemCodeScanningCodeqlRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlRequestBuilderInternal(urlParams, requestAdapter) +} +// Databases the databases property +// returns a *ItemItemCodeScanningCodeqlDatabasesRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlRequestBuilder) Databases()(*ItemItemCodeScanningCodeqlDatabasesRequestBuilder) { + return NewItemItemCodeScanningCodeqlDatabasesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// VariantAnalyses the variantAnalyses property +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlRequestBuilder) VariantAnalyses()(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_item_with_repo_name_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_item_with_repo_name_item_request_builder.go new file mode 100644 index 0000000..1b375e7 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_item_with_repo_name_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos\{repo_owner}\{repo_name} +type ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the analysis status of a repository in a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningVariantAnalysisRepoTaskable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningVariantAnalysisRepoTask503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-the-analysis-status-of-a-repository-in-a-codeql-variant-analysis +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisRepoTaskable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningVariantAnalysisRepoTask503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningVariantAnalysisRepoTaskFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisRepoTaskable), nil +} +// ToGetRequestInformation gets the analysis status of a repository in a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_request_builder.go new file mode 100644 index 0000000..9c7f4f5 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos +type ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo_owner gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.codeql.variantAnalyses.item.repos.item collection +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) ByRepo_owner(repo_owner string)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo_owner != "" { + urlTplParams["repo_owner"] = repo_owner + } + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_with_repo_owner_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_with_repo_owner_item_request_builder.go new file mode 100644 index 0000000..2f83f1e --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_with_repo_owner_item_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos\{repo_owner} +type ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.codeql.variantAnalyses.item.repos.item.item collection +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) ByRepo_name(repo_name string)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo_name != "" { + urlTplParams["repo_name"] = repo_name + } + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_post_request_body.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_post_request_body.go new file mode 100644 index 0000000..fc3a430 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_post_request_body.go @@ -0,0 +1,197 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody struct { + // The language targeted by the CodeQL query + language *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisLanguage + // A Base64-encoded tarball containing a CodeQL query and all its dependencies + query_pack *string + // List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. + repositories []string + // List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. + repository_lists []string + // List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. + repository_owners []string +} +// NewItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody()(*ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody{ + } + return m +} +// CreateItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseCodeScanningVariantAnalysisLanguage) + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisLanguage)) + } + return nil + } + res["query_pack"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryPack(val) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_lists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositoryLists(res) + } + return nil + } + res["repository_owners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositoryOwners(res) + } + return nil + } + return res +} +// GetLanguage gets the language property value. The language targeted by the CodeQL query +// returns a *CodeScanningVariantAnalysisLanguage when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetLanguage()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisLanguage) { + return m.language +} +// GetQueryPack gets the query_pack property value. A Base64-encoded tarball containing a CodeQL query and all its dependencies +// returns a *string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetQueryPack()(*string) { + return m.query_pack +} +// GetRepositories gets the repositories property value. List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +// returns a []string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetRepositories()([]string) { + return m.repositories +} +// GetRepositoryLists gets the repository_lists property value. List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +// returns a []string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetRepositoryLists()([]string) { + return m.repository_lists +} +// GetRepositoryOwners gets the repository_owners property value. List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +// returns a []string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetRepositoryOwners()([]string) { + return m.repository_owners +} +// Serialize serializes information the current object +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLanguage() != nil { + cast := (*m.GetLanguage()).String() + err := writer.WriteStringValue("language", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("query_pack", m.GetQueryPack()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + err := writer.WriteCollectionOfStringValues("repositories", m.GetRepositories()) + if err != nil { + return err + } + } + if m.GetRepositoryLists() != nil { + err := writer.WriteCollectionOfStringValues("repository_lists", m.GetRepositoryLists()) + if err != nil { + return err + } + } + if m.GetRepositoryOwners() != nil { + err := writer.WriteCollectionOfStringValues("repository_owners", m.GetRepositoryOwners()) + if err != nil { + return err + } + } + return nil +} +// SetLanguage sets the language property value. The language targeted by the CodeQL query +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetLanguage(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisLanguage)() { + m.language = value +} +// SetQueryPack sets the query_pack property value. A Base64-encoded tarball containing a CodeQL query and all its dependencies +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetQueryPack(value *string)() { + m.query_pack = value +} +// SetRepositories sets the repositories property value. List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetRepositories(value []string)() { + m.repositories = value +} +// SetRepositoryLists sets the repository_lists property value. List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetRepositoryLists(value []string)() { + m.repository_lists = value +} +// SetRepositoryOwners sets the repository_owners property value. List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetRepositoryOwners(value []string)() { + m.repository_owners = value +} +type ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguage()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisLanguage) + GetQueryPack()(*string) + GetRepositories()([]string) + GetRepositoryLists()([]string) + GetRepositoryOwners()([]string) + SetLanguage(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisLanguage)() + SetQueryPack(value *string)() + SetRepositories(value []string)() + SetRepositoryLists(value []string)() + SetRepositoryOwners(value []string)() +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_request_builder.go new file mode 100644 index 0000000..8b1c127 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses +type ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCodeql_variant_analysis_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.codeql.variantAnalyses.item collection +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) ByCodeql_variant_analysis_id(codeql_variant_analysis_id int32)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["codeql_variant_analysis_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(codeql_variant_analysis_id), 10) + return NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/enterprise-cloud@latest//code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).Use the `owner` and `repo` parameters in the URL to specify the controller repository thatwill be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a CodeScanningVariantAnalysisable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 status code +// returns a CodeScanningVariantAnalysis503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#create-a-codeql-variant-analysis +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) Post(ctx context.Context, body ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningVariantAnalysisFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisable), nil +} +// ToPostRequestInformation creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/enterprise-cloud@latest//code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).Use the `owner` and `repo` parameters in the URL to specify the controller repository thatwill be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_with_codeql_variant_analysis_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_with_codeql_variant_analysis_item_request_builder.go new file mode 100644 index 0000000..1db1209 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_with_codeql_variant_analysis_item_request_builder.go @@ -0,0 +1,68 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id} +type ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the summary of a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningVariantAnalysisable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningVariantAnalysis503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-the-summary-of-a-codeql-variant-analysis +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningVariantAnalysisFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningVariantAnalysisable), nil +} +// Repos the repos property +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) Repos()(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets the summary of a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_default_setup_request_builder.go b/pkg/github/repos/item_item_code_scanning_default_setup_request_builder.go new file mode 100644 index 0000000..22ad24a --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_default_setup_request_builder.go @@ -0,0 +1,106 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningDefaultSetupRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\default-setup +type ItemItemCodeScanningDefaultSetupRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningDefaultSetupRequestBuilderInternal instantiates a new ItemItemCodeScanningDefaultSetupRequestBuilder and sets the default values. +func NewItemItemCodeScanningDefaultSetupRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningDefaultSetupRequestBuilder) { + m := &ItemItemCodeScanningDefaultSetupRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/default-setup", pathParameters), + } + return m +} +// NewItemItemCodeScanningDefaultSetupRequestBuilder instantiates a new ItemItemCodeScanningDefaultSetupRequestBuilder and sets the default values. +func NewItemItemCodeScanningDefaultSetupRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningDefaultSetupRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningDefaultSetupRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a code scanning default setup configuration.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningDefaultSetupable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningDefaultSetup503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration +func (m *ItemItemCodeScanningDefaultSetupRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningDefaultSetupable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningDefaultSetup503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningDefaultSetupFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningDefaultSetupable), nil +} +// Patch updates a code scanning default setup configuration.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a EmptyObject503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration +func (m *ItemItemCodeScanningDefaultSetupRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningDefaultSetupUpdateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObject503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToGetRequestInformation gets a code scanning default setup configuration.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningDefaultSetupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a code scanning default setup configuration.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningDefaultSetupRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningDefaultSetupUpdateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningDefaultSetupRequestBuilder when successful +func (m *ItemItemCodeScanningDefaultSetupRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningDefaultSetupRequestBuilder) { + return NewItemItemCodeScanningDefaultSetupRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_request_builder.go b/pkg/github/repos/item_item_code_scanning_request_builder.go new file mode 100644 index 0000000..0cbc1ba --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_request_builder.go @@ -0,0 +1,48 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeScanningRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning +type ItemItemCodeScanningRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemItemCodeScanningAlertsRequestBuilder when successful +func (m *ItemItemCodeScanningRequestBuilder) Alerts()(*ItemItemCodeScanningAlertsRequestBuilder) { + return NewItemItemCodeScanningAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Analyses the analyses property +// returns a *ItemItemCodeScanningAnalysesRequestBuilder when successful +func (m *ItemItemCodeScanningRequestBuilder) Analyses()(*ItemItemCodeScanningAnalysesRequestBuilder) { + return NewItemItemCodeScanningAnalysesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codeql the codeql property +// returns a *ItemItemCodeScanningCodeqlRequestBuilder when successful +func (m *ItemItemCodeScanningRequestBuilder) Codeql()(*ItemItemCodeScanningCodeqlRequestBuilder) { + return NewItemItemCodeScanningCodeqlRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningRequestBuilderInternal instantiates a new ItemItemCodeScanningRequestBuilder and sets the default values. +func NewItemItemCodeScanningRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningRequestBuilder) { + m := &ItemItemCodeScanningRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning", pathParameters), + } + return m +} +// NewItemItemCodeScanningRequestBuilder instantiates a new ItemItemCodeScanningRequestBuilder and sets the default values. +func NewItemItemCodeScanningRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningRequestBuilderInternal(urlParams, requestAdapter) +} +// DefaultSetup the defaultSetup property +// returns a *ItemItemCodeScanningDefaultSetupRequestBuilder when successful +func (m *ItemItemCodeScanningRequestBuilder) DefaultSetup()(*ItemItemCodeScanningDefaultSetupRequestBuilder) { + return NewItemItemCodeScanningDefaultSetupRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Sarifs the sarifs property +// returns a *ItemItemCodeScanningSarifsRequestBuilder when successful +func (m *ItemItemCodeScanningRequestBuilder) Sarifs()(*ItemItemCodeScanningSarifsRequestBuilder) { + return NewItemItemCodeScanningSarifsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_sarifs_post_request_body.go b/pkg/github/repos/item_item_code_scanning_sarifs_post_request_body.go new file mode 100644 index 0000000..f6230b9 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_sarifs_post_request_body.go @@ -0,0 +1,236 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCodeScanningSarifsPostRequestBody struct { + // The base directory used in the analysis, as it appears in the SARIF file.This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + checkout_uri *string + // The SHA of the commit to which the analysis you are uploading relates. + commit_sha *string + // The full Git reference, formatted as `refs/heads/`,`refs/tags/`, `refs/pull//merge`, or `refs/pull//head`. + ref *string + // A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secure-coding/sarif-support-for-code-scanning)." + sarif *string + // The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. + tool_name *string + // Whether the SARIF file will be validated according to the code scanning specifications.This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. + validate *bool +} +// NewItemItemCodeScanningSarifsPostRequestBody instantiates a new ItemItemCodeScanningSarifsPostRequestBody and sets the default values. +func NewItemItemCodeScanningSarifsPostRequestBody()(*ItemItemCodeScanningSarifsPostRequestBody) { + m := &ItemItemCodeScanningSarifsPostRequestBody{ + } + return m +} +// CreateItemItemCodeScanningSarifsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodeScanningSarifsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodeScanningSarifsPostRequestBody(), nil +} +// GetCheckoutUri gets the checkout_uri property value. The base directory used in the analysis, as it appears in the SARIF file.This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. +// returns a *string when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetCheckoutUri()(*string) { + return m.checkout_uri +} +// GetCommitSha gets the commit_sha property value. The SHA of the commit to which the analysis you are uploading relates. +// returns a *string when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetCommitSha()(*string) { + return m.commit_sha +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["checkout_uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckoutUri(val) + } + return nil + } + res["commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitSha(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["sarif"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSarif(val) + } + return nil + } + res["started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedAt(val) + } + return nil + } + res["tool_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetToolName(val) + } + return nil + } + res["validate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValidate(val) + } + return nil + } + return res +} +// GetRef gets the ref property value. The full Git reference, formatted as `refs/heads/`,`refs/tags/`, `refs/pull//merge`, or `refs/pull//head`. +// returns a *string when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetRef()(*string) { + return m.ref +} +// GetSarif gets the sarif property value. A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secure-coding/sarif-support-for-code-scanning)." +// returns a *string when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetSarif()(*string) { + return m.sarif +} +// GetStartedAt gets the started_at property value. The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.started_at +} +// GetToolName gets the tool_name property value. The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. +// returns a *string when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetToolName()(*string) { + return m.tool_name +} +// GetValidate gets the validate property value. Whether the SARIF file will be validated according to the code scanning specifications.This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. +// returns a *bool when successful +func (m *ItemItemCodeScanningSarifsPostRequestBody) GetValidate()(*bool) { + return m.validate +} +// Serialize serializes information the current object +func (m *ItemItemCodeScanningSarifsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("checkout_uri", m.GetCheckoutUri()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_sha", m.GetCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sarif", m.GetSarif()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("started_at", m.GetStartedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tool_name", m.GetToolName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("validate", m.GetValidate()) + if err != nil { + return err + } + } + return nil +} +// SetCheckoutUri sets the checkout_uri property value. The base directory used in the analysis, as it appears in the SARIF file.This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetCheckoutUri(value *string)() { + m.checkout_uri = value +} +// SetCommitSha sets the commit_sha property value. The SHA of the commit to which the analysis you are uploading relates. +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetCommitSha(value *string)() { + m.commit_sha = value +} +// SetRef sets the ref property value. The full Git reference, formatted as `refs/heads/`,`refs/tags/`, `refs/pull//merge`, or `refs/pull//head`. +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetRef(value *string)() { + m.ref = value +} +// SetSarif sets the sarif property value. A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secure-coding/sarif-support-for-code-scanning)." +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetSarif(value *string)() { + m.sarif = value +} +// SetStartedAt sets the started_at property value. The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.started_at = value +} +// SetToolName sets the tool_name property value. The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetToolName(value *string)() { + m.tool_name = value +} +// SetValidate sets the validate property value. Whether the SARIF file will be validated according to the code scanning specifications.This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. +func (m *ItemItemCodeScanningSarifsPostRequestBody) SetValidate(value *bool)() { + m.validate = value +} +type ItemItemCodeScanningSarifsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckoutUri()(*string) + GetCommitSha()(*string) + GetRef()(*string) + GetSarif()(*string) + GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetToolName()(*string) + GetValidate()(*bool) + SetCheckoutUri(value *string)() + SetCommitSha(value *string)() + SetRef(value *string)() + SetSarif(value *string)() + SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetToolName(value *string)() + SetValidate(value *bool)() +} diff --git a/pkg/github/repos/item_item_code_scanning_sarifs_request_builder.go b/pkg/github/repos/item_item_code_scanning_sarifs_request_builder.go new file mode 100644 index 0000000..ecef990 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_sarifs_request_builder.go @@ -0,0 +1,81 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningSarifsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\sarifs +type ItemItemCodeScanningSarifsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySarif_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codeScanning.sarifs.item collection +// returns a *ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningSarifsRequestBuilder) BySarif_id(sarif_id string)(*ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if sarif_id != "" { + urlTplParams["sarif_id"] = sarif_id + } + return NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningSarifsRequestBuilderInternal instantiates a new ItemItemCodeScanningSarifsRequestBuilder and sets the default values. +func NewItemItemCodeScanningSarifsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningSarifsRequestBuilder) { + m := &ItemItemCodeScanningSarifsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/sarifs", pathParameters), + } + return m +} +// NewItemItemCodeScanningSarifsRequestBuilder instantiates a new ItemItemCodeScanningSarifsRequestBuilder and sets the default values. +func NewItemItemCodeScanningSarifsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningSarifsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningSarifsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/troubleshooting-sarif)."There are two places where you can upload code scanning results. - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:```gzip -c analysis-data.sarif | base64 -w0```SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable.To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)."| **SARIF data** | **Maximum values** | **Additional limits** ||----------------------------------|:------------------:|----------------------------------------------------------------------------------|| Runs per file | 20 | || Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. || Rules per run | 25,000 | || Tool extensions per run | 100 | || Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. || Location per result | 1,000 | Only 100 locations will be included. || Tags per rule | 20 | Only 10 tags will be included. |The `202 Accepted` response includes an `id` value.You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint.For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)."OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.This endpoint is limited to 1,000 requests per hour for each user or app installation calling it. +// returns a CodeScanningSarifsReceiptable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningSarifsReceipt503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#upload-an-analysis-as-sarif-data +func (m *ItemItemCodeScanningSarifsRequestBuilder) Post(ctx context.Context, body ItemItemCodeScanningSarifsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningSarifsReceiptable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningSarifsReceipt503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningSarifsReceiptFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningSarifsReceiptable), nil +} +// ToPostRequestInformation uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/troubleshooting-sarif)."There are two places where you can upload code scanning results. - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:```gzip -c analysis-data.sarif | base64 -w0```SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable.To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)."| **SARIF data** | **Maximum values** | **Additional limits** ||----------------------------------|:------------------:|----------------------------------------------------------------------------------|| Runs per file | 20 | || Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. || Rules per run | 25,000 | || Tool extensions per run | 100 | || Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. || Location per result | 1,000 | Only 100 locations will be included. || Tags per rule | 20 | Only 10 tags will be included. |The `202 Accepted` response includes an `id` value.You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint.For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)."OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.This endpoint is limited to 1,000 requests per hour for each user or app installation calling it. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningSarifsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCodeScanningSarifsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningSarifsRequestBuilder when successful +func (m *ItemItemCodeScanningSarifsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningSarifsRequestBuilder) { + return NewItemItemCodeScanningSarifsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_sarifs_with_sarif_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_sarifs_with_sarif_item_request_builder.go new file mode 100644 index 0000000..2e7e20f --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_sarifs_with_sarif_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\sarifs\{sarif_id} +type ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilderInternal instantiates a new ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) { + m := &ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/sarifs/{sarif_id}", pathParameters), + } + return m +} +// NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder instantiates a new ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)."OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningSarifsStatusable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a CodeScanningSarifsStatus503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-information-about-a-sarif-upload +func (m *ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningSarifsStatusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningSarifsStatus503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeScanningSarifsStatusFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeScanningSarifsStatusable), nil +} +// ToGetRequestInformation gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)."OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder) { + return NewItemItemCodeScanningSarifsWithSarif_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codeowners_errors_request_builder.go b/pkg/github/repos/item_item_codeowners_errors_request_builder.go new file mode 100644 index 0000000..828afef --- /dev/null +++ b/pkg/github/repos/item_item_codeowners_errors_request_builder.go @@ -0,0 +1,62 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodeownersErrorsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codeowners\errors +type ItemItemCodeownersErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodeownersErrorsRequestBuilderGetQueryParameters list any syntax errors that are detected in the CODEOWNERSfile.For more information about the correct CODEOWNERS syntax,see "[About code owners](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." +type ItemItemCodeownersErrorsRequestBuilderGetQueryParameters struct { + // A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) + Ref *string `uriparametername:"ref"` +} +// NewItemItemCodeownersErrorsRequestBuilderInternal instantiates a new ItemItemCodeownersErrorsRequestBuilder and sets the default values. +func NewItemItemCodeownersErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeownersErrorsRequestBuilder) { + m := &ItemItemCodeownersErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codeowners/errors{?ref*}", pathParameters), + } + return m +} +// NewItemItemCodeownersErrorsRequestBuilder instantiates a new ItemItemCodeownersErrorsRequestBuilder and sets the default values. +func NewItemItemCodeownersErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeownersErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeownersErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list any syntax errors that are detected in the CODEOWNERSfile.For more information about the correct CODEOWNERS syntax,see "[About code owners](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." +// returns a CodeownersErrorsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-codeowners-errors +func (m *ItemItemCodeownersErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeownersErrorsRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeownersErrorsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeownersErrorsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeownersErrorsable), nil +} +// ToGetRequestInformation list any syntax errors that are detected in the CODEOWNERSfile.For more information about the correct CODEOWNERS syntax,see "[About code owners](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." +// returns a *RequestInformation when successful +func (m *ItemItemCodeownersErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeownersErrorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeownersErrorsRequestBuilder when successful +func (m *ItemItemCodeownersErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeownersErrorsRequestBuilder) { + return NewItemItemCodeownersErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codeowners_request_builder.go b/pkg/github/repos/item_item_codeowners_request_builder.go new file mode 100644 index 0000000..e9a545c --- /dev/null +++ b/pkg/github/repos/item_item_codeowners_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeownersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codeowners +type ItemItemCodeownersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeownersRequestBuilderInternal instantiates a new ItemItemCodeownersRequestBuilder and sets the default values. +func NewItemItemCodeownersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeownersRequestBuilder) { + m := &ItemItemCodeownersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codeowners", pathParameters), + } + return m +} +// NewItemItemCodeownersRequestBuilder instantiates a new ItemItemCodeownersRequestBuilder and sets the default values. +func NewItemItemCodeownersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeownersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeownersRequestBuilderInternal(urlParams, requestAdapter) +} +// Errors the errors property +// returns a *ItemItemCodeownersErrorsRequestBuilder when successful +func (m *ItemItemCodeownersRequestBuilder) Errors()(*ItemItemCodeownersErrorsRequestBuilder) { + return NewItemItemCodeownersErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_codespaces_devcontainers_get_response.go b/pkg/github/repos/item_item_codespaces_devcontainers_get_response.go new file mode 100644 index 0000000..33914b0 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_devcontainers_get_response.go @@ -0,0 +1,121 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCodespacesDevcontainersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The devcontainers property + devcontainers []ItemItemCodespacesDevcontainersGetResponse_devcontainersable + // The total_count property + total_count *int32 +} +// NewItemItemCodespacesDevcontainersGetResponse instantiates a new ItemItemCodespacesDevcontainersGetResponse and sets the default values. +func NewItemItemCodespacesDevcontainersGetResponse()(*ItemItemCodespacesDevcontainersGetResponse) { + m := &ItemItemCodespacesDevcontainersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesDevcontainersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesDevcontainersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesDevcontainersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesDevcontainersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDevcontainers gets the devcontainers property value. The devcontainers property +// returns a []ItemItemCodespacesDevcontainersGetResponse_devcontainersable when successful +func (m *ItemItemCodespacesDevcontainersGetResponse) GetDevcontainers()([]ItemItemCodespacesDevcontainersGetResponse_devcontainersable) { + return m.devcontainers +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesDevcontainersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["devcontainers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemCodespacesDevcontainersGetResponse_devcontainersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemCodespacesDevcontainersGetResponse_devcontainersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemCodespacesDevcontainersGetResponse_devcontainersable) + } + } + m.SetDevcontainers(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCodespacesDevcontainersGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesDevcontainersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDevcontainers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDevcontainers())) + for i, v := range m.GetDevcontainers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("devcontainers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCodespacesDevcontainersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDevcontainers sets the devcontainers property value. The devcontainers property +func (m *ItemItemCodespacesDevcontainersGetResponse) SetDevcontainers(value []ItemItemCodespacesDevcontainersGetResponse_devcontainersable)() { + m.devcontainers = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCodespacesDevcontainersGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCodespacesDevcontainersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevcontainers()([]ItemItemCodespacesDevcontainersGetResponse_devcontainersable) + GetTotalCount()(*int32) + SetDevcontainers(value []ItemItemCodespacesDevcontainersGetResponse_devcontainersable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_codespaces_devcontainers_get_response_devcontainers.go b/pkg/github/repos/item_item_codespaces_devcontainers_get_response_devcontainers.go new file mode 100644 index 0000000..d8e6828 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_devcontainers_get_response_devcontainers.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCodespacesDevcontainersGetResponse_devcontainers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The display_name property + display_name *string + // The name property + name *string + // The path property + path *string +} +// NewItemItemCodespacesDevcontainersGetResponse_devcontainers instantiates a new ItemItemCodespacesDevcontainersGetResponse_devcontainers and sets the default values. +func NewItemItemCodespacesDevcontainersGetResponse_devcontainers()(*ItemItemCodespacesDevcontainersGetResponse_devcontainers) { + m := &ItemItemCodespacesDevcontainersGetResponse_devcontainers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesDevcontainersGetResponse_devcontainersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesDevcontainersGetResponse_devcontainersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesDevcontainersGetResponse_devcontainers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the display_name property value. The display_name property +// returns a *string when successful +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) GetName()(*string) { + return m.name +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) GetPath()(*string) { + return m.path +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + 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 *ItemItemCodespacesDevcontainersGetResponse_devcontainers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the display_name property value. The display_name property +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) SetDisplayName(value *string)() { + m.display_name = value +} +// SetName sets the name property value. The name property +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) SetName(value *string)() { + m.name = value +} +// SetPath sets the path property value. The path property +func (m *ItemItemCodespacesDevcontainersGetResponse_devcontainers) SetPath(value *string)() { + m.path = value +} +type ItemItemCodespacesDevcontainersGetResponse_devcontainersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetName()(*string) + GetPath()(*string) + SetDisplayName(value *string)() + SetName(value *string)() + SetPath(value *string)() +} diff --git a/pkg/github/repos/item_item_codespaces_devcontainers_request_builder.go b/pkg/github/repos/item_item_codespaces_devcontainers_request_builder.go new file mode 100644 index 0000000..a5e1d68 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_devcontainers_request_builder.go @@ -0,0 +1,76 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesDevcontainersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\devcontainers +type ItemItemCodespacesDevcontainersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodespacesDevcontainersRequestBuilderGetQueryParameters lists the devcontainer.json files associated with a specified repository and the authenticated user. These filesspecify launchpoint configurations for codespaces created within the repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +type ItemItemCodespacesDevcontainersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCodespacesDevcontainersRequestBuilderInternal instantiates a new ItemItemCodespacesDevcontainersRequestBuilder and sets the default values. +func NewItemItemCodespacesDevcontainersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesDevcontainersRequestBuilder) { + m := &ItemItemCodespacesDevcontainersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/devcontainers{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCodespacesDevcontainersRequestBuilder instantiates a new ItemItemCodespacesDevcontainersRequestBuilder and sets the default values. +func NewItemItemCodespacesDevcontainersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesDevcontainersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesDevcontainersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the devcontainer.json files associated with a specified repository and the authenticated user. These filesspecify launchpoint configurations for codespaces created within the repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a ItemItemCodespacesDevcontainersGetResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#list-devcontainer-configurations-in-a-repository-for-the-authenticated-user +func (m *ItemItemCodespacesDevcontainersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesDevcontainersRequestBuilderGetQueryParameters])(ItemItemCodespacesDevcontainersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCodespacesDevcontainersGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCodespacesDevcontainersGetResponseable), nil +} +// ToGetRequestInformation lists the devcontainer.json files associated with a specified repository and the authenticated user. These filesspecify launchpoint configurations for codespaces created within the repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesDevcontainersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesDevcontainersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesDevcontainersRequestBuilder when successful +func (m *ItemItemCodespacesDevcontainersRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesDevcontainersRequestBuilder) { + return NewItemItemCodespacesDevcontainersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_get_response.go b/pkg/github/repos/item_item_codespaces_get_response.go new file mode 100644 index 0000000..7abf15b --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCodespacesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The codespaces property + codespaces []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable + // The total_count property + total_count *int32 +} +// NewItemItemCodespacesGetResponse instantiates a new ItemItemCodespacesGetResponse and sets the default values. +func NewItemItemCodespacesGetResponse()(*ItemItemCodespacesGetResponse) { + m := &ItemItemCodespacesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodespaces gets the codespaces property value. The codespaces property +// returns a []Codespaceable when successful +func (m *ItemItemCodespacesGetResponse) GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) { + return m.codespaces +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + } + } + m.SetCodespaces(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCodespacesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCodespaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCodespaces())) + for i, v := range m.GetCodespaces() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("codespaces", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCodespacesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodespaces sets the codespaces property value. The codespaces property +func (m *ItemItemCodespacesGetResponse) SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() { + m.codespaces = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCodespacesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCodespacesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + GetTotalCount()(*int32) + SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_codespaces_machines_get_response.go b/pkg/github/repos/item_item_codespaces_machines_get_response.go new file mode 100644 index 0000000..7c40ac3 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_machines_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCodespacesMachinesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The machines property + machines []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable + // The total_count property + total_count *int32 +} +// NewItemItemCodespacesMachinesGetResponse instantiates a new ItemItemCodespacesMachinesGetResponse and sets the default values. +func NewItemItemCodespacesMachinesGetResponse()(*ItemItemCodespacesMachinesGetResponse) { + m := &ItemItemCodespacesMachinesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesMachinesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesMachinesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesMachinesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesMachinesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesMachinesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["machines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceMachineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable) + } + } + m.SetMachines(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetMachines gets the machines property value. The machines property +// returns a []CodespaceMachineable when successful +func (m *ItemItemCodespacesMachinesGetResponse) GetMachines()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable) { + return m.machines +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCodespacesMachinesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesMachinesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMachines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMachines())) + for i, v := range m.GetMachines() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("machines", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCodespacesMachinesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMachines sets the machines property value. The machines property +func (m *ItemItemCodespacesMachinesGetResponse) SetMachines(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable)() { + m.machines = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCodespacesMachinesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCodespacesMachinesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMachines()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable) + GetTotalCount()(*int32) + SetMachines(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_codespaces_machines_request_builder.go b/pkg/github/repos/item_item_codespaces_machines_request_builder.go new file mode 100644 index 0000000..c3bd595 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_machines_request_builder.go @@ -0,0 +1,76 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesMachinesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\machines +type ItemItemCodespacesMachinesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodespacesMachinesRequestBuilderGetQueryParameters list the machine types available for a given repository based on its configuration.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +type ItemItemCodespacesMachinesRequestBuilderGetQueryParameters struct { + // IP for location auto-detection when proxying a request + Client_ip *string `uriparametername:"client_ip"` + // The location to check for available machines. Assigned by IP if not provided. + Location *string `uriparametername:"location"` + // The branch or commit to check for prebuild availability and devcontainer restrictions. + Ref *string `uriparametername:"ref"` +} +// NewItemItemCodespacesMachinesRequestBuilderInternal instantiates a new ItemItemCodespacesMachinesRequestBuilder and sets the default values. +func NewItemItemCodespacesMachinesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesMachinesRequestBuilder) { + m := &ItemItemCodespacesMachinesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/machines{?client_ip*,location*,ref*}", pathParameters), + } + return m +} +// NewItemItemCodespacesMachinesRequestBuilder instantiates a new ItemItemCodespacesMachinesRequestBuilder and sets the default values. +func NewItemItemCodespacesMachinesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesMachinesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesMachinesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the machine types available for a given repository based on its configuration.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a ItemItemCodespacesMachinesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/machines#list-available-machine-types-for-a-repository +func (m *ItemItemCodespacesMachinesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesMachinesRequestBuilderGetQueryParameters])(ItemItemCodespacesMachinesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCodespacesMachinesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCodespacesMachinesGetResponseable), nil +} +// ToGetRequestInformation list the machine types available for a given repository based on its configuration.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesMachinesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesMachinesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesMachinesRequestBuilder when successful +func (m *ItemItemCodespacesMachinesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesMachinesRequestBuilder) { + return NewItemItemCodespacesMachinesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_new_get_response.go b/pkg/github/repos/item_item_codespaces_new_get_response.go new file mode 100644 index 0000000..9f9ba3a --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_new_get_response.go @@ -0,0 +1,110 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCodespacesNewGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GitHub user. + billable_owner i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable + // The defaults property + defaults ItemItemCodespacesNewGetResponse_defaultsable +} +// NewItemItemCodespacesNewGetResponse instantiates a new ItemItemCodespacesNewGetResponse and sets the default values. +func NewItemItemCodespacesNewGetResponse()(*ItemItemCodespacesNewGetResponse) { + m := &ItemItemCodespacesNewGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesNewGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesNewGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesNewGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesNewGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBillableOwner gets the billable_owner property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *ItemItemCodespacesNewGetResponse) GetBillableOwner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) { + return m.billable_owner +} +// GetDefaults gets the defaults property value. The defaults property +// returns a ItemItemCodespacesNewGetResponse_defaultsable when successful +func (m *ItemItemCodespacesNewGetResponse) GetDefaults()(ItemItemCodespacesNewGetResponse_defaultsable) { + return m.defaults +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesNewGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["billable_owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillableOwner(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable)) + } + return nil + } + res["defaults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemCodespacesNewGetResponse_defaultsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaults(val.(ItemItemCodespacesNewGetResponse_defaultsable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesNewGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("billable_owner", m.GetBillableOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("defaults", m.GetDefaults()) + 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 *ItemItemCodespacesNewGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBillableOwner sets the billable_owner property value. A GitHub user. +func (m *ItemItemCodespacesNewGetResponse) SetBillableOwner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable)() { + m.billable_owner = value +} +// SetDefaults sets the defaults property value. The defaults property +func (m *ItemItemCodespacesNewGetResponse) SetDefaults(value ItemItemCodespacesNewGetResponse_defaultsable)() { + m.defaults = value +} +type ItemItemCodespacesNewGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillableOwner()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + GetDefaults()(ItemItemCodespacesNewGetResponse_defaultsable) + SetBillableOwner(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable)() + SetDefaults(value ItemItemCodespacesNewGetResponse_defaultsable)() +} diff --git a/pkg/github/repos/item_item_codespaces_new_get_response_defaults.go b/pkg/github/repos/item_item_codespaces_new_get_response_defaults.go new file mode 100644 index 0000000..5ed7834 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_new_get_response_defaults.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCodespacesNewGetResponse_defaults struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The devcontainer_path property + devcontainer_path *string + // The location property + location *string +} +// NewItemItemCodespacesNewGetResponse_defaults instantiates a new ItemItemCodespacesNewGetResponse_defaults and sets the default values. +func NewItemItemCodespacesNewGetResponse_defaults()(*ItemItemCodespacesNewGetResponse_defaults) { + m := &ItemItemCodespacesNewGetResponse_defaults{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesNewGetResponse_defaultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesNewGetResponse_defaultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesNewGetResponse_defaults(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesNewGetResponse_defaults) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDevcontainerPath gets the devcontainer_path property value. The devcontainer_path property +// returns a *string when successful +func (m *ItemItemCodespacesNewGetResponse_defaults) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesNewGetResponse_defaults) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + return res +} +// GetLocation gets the location property value. The location property +// returns a *string when successful +func (m *ItemItemCodespacesNewGetResponse_defaults) GetLocation()(*string) { + return m.location +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesNewGetResponse_defaults) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + 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 *ItemItemCodespacesNewGetResponse_defaults) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDevcontainerPath sets the devcontainer_path property value. The devcontainer_path property +func (m *ItemItemCodespacesNewGetResponse_defaults) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetLocation sets the location property value. The location property +func (m *ItemItemCodespacesNewGetResponse_defaults) SetLocation(value *string)() { + m.location = value +} +type ItemItemCodespacesNewGetResponse_defaultsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevcontainerPath()(*string) + GetLocation()(*string) + SetDevcontainerPath(value *string)() + SetLocation(value *string)() +} diff --git a/pkg/github/repos/item_item_codespaces_new_request_builder.go b/pkg/github/repos/item_item_codespaces_new_request_builder.go new file mode 100644 index 0000000..ed42be4 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_new_request_builder.go @@ -0,0 +1,72 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesNewRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\new +type ItemItemCodespacesNewRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodespacesNewRequestBuilderGetQueryParameters gets the default attributes for codespaces created by the user with the repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +type ItemItemCodespacesNewRequestBuilderGetQueryParameters struct { + // An alternative IP for default location auto-detection, such as when proxying a request. + Client_ip *string `uriparametername:"client_ip"` + // The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. + Ref *string `uriparametername:"ref"` +} +// NewItemItemCodespacesNewRequestBuilderInternal instantiates a new ItemItemCodespacesNewRequestBuilder and sets the default values. +func NewItemItemCodespacesNewRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesNewRequestBuilder) { + m := &ItemItemCodespacesNewRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/new{?client_ip*,ref*}", pathParameters), + } + return m +} +// NewItemItemCodespacesNewRequestBuilder instantiates a new ItemItemCodespacesNewRequestBuilder and sets the default values. +func NewItemItemCodespacesNewRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesNewRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesNewRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the default attributes for codespaces created by the user with the repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a ItemItemCodespacesNewGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#get-default-attributes-for-a-codespace +func (m *ItemItemCodespacesNewRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesNewRequestBuilderGetQueryParameters])(ItemItemCodespacesNewGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCodespacesNewGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCodespacesNewGetResponseable), nil +} +// ToGetRequestInformation gets the default attributes for codespaces created by the user with the repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesNewRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesNewRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesNewRequestBuilder when successful +func (m *ItemItemCodespacesNewRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesNewRequestBuilder) { + return NewItemItemCodespacesNewRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_permissions_check_request_builder.go b/pkg/github/repos/item_item_codespaces_permissions_check_request_builder.go new file mode 100644 index 0000000..e91d227 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_permissions_check_request_builder.go @@ -0,0 +1,76 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesPermissions_checkRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\permissions_check +type ItemItemCodespacesPermissions_checkRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodespacesPermissions_checkRequestBuilderGetQueryParameters checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +type ItemItemCodespacesPermissions_checkRequestBuilderGetQueryParameters struct { + // Path to the devcontainer.json configuration to use for the permission check. + Devcontainer_path *string `uriparametername:"devcontainer_path"` + // The git reference that points to the location of the devcontainer configuration to use for the permission check. The value of `ref` will typically be a branch name (`heads/BRANCH_NAME`). For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. + Ref *string `uriparametername:"ref"` +} +// NewItemItemCodespacesPermissions_checkRequestBuilderInternal instantiates a new ItemItemCodespacesPermissions_checkRequestBuilder and sets the default values. +func NewItemItemCodespacesPermissions_checkRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesPermissions_checkRequestBuilder) { + m := &ItemItemCodespacesPermissions_checkRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/permissions_check?devcontainer_path={devcontainer_path}&ref={ref}", pathParameters), + } + return m +} +// NewItemItemCodespacesPermissions_checkRequestBuilder instantiates a new ItemItemCodespacesPermissions_checkRequestBuilder and sets the default values. +func NewItemItemCodespacesPermissions_checkRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesPermissions_checkRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesPermissions_checkRequestBuilderInternal(urlParams, requestAdapter) +} +// Get checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespacesPermissionsCheckForDevcontainerable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a CodespacesPermissionsCheckForDevcontainer503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user +func (m *ItemItemCodespacesPermissions_checkRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesPermissions_checkRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesPermissionsCheckForDevcontainerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesPermissionsCheckForDevcontainer503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesPermissionsCheckForDevcontainerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesPermissionsCheckForDevcontainerable), nil +} +// ToGetRequestInformation checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesPermissions_checkRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesPermissions_checkRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesPermissions_checkRequestBuilder when successful +func (m *ItemItemCodespacesPermissions_checkRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesPermissions_checkRequestBuilder) { + return NewItemItemCodespacesPermissions_checkRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_post_request_body.go b/pkg/github/repos/item_item_codespaces_post_request_body.go new file mode 100644 index 0000000..cba3e36 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_post_request_body.go @@ -0,0 +1,341 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCodespacesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // IP for location auto-detection when proxying a request + client_ip *string + // Path to devcontainer.json config to use for this codespace + devcontainer_path *string + // Display name for this codespace + display_name *string + // Time in minutes before codespace stops from inactivity + idle_timeout_minutes *int32 + // The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. + location *string + // Machine type to use for this codespace + machine *string + // Whether to authorize requested permissions from devcontainer.json + multi_repo_permissions_opt_out *bool + // Git ref (typically a branch name) for this codespace + ref *string + // Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + retention_period_minutes *int32 + // Working directory for this codespace + working_directory *string +} +// NewItemItemCodespacesPostRequestBody instantiates a new ItemItemCodespacesPostRequestBody and sets the default values. +func NewItemItemCodespacesPostRequestBody()(*ItemItemCodespacesPostRequestBody) { + m := &ItemItemCodespacesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientIp gets the client_ip property value. IP for location auto-detection when proxying a request +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetClientIp()(*string) { + return m.client_ip +} +// GetDevcontainerPath gets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetDisplayName gets the display_name property value. Display name for this codespace +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientIp(val) + } + return nil + } + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["idle_timeout_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutMinutes(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachine(val) + } + return nil + } + res["multi_repo_permissions_opt_out"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMultiRepoPermissionsOptOut(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["retention_period_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRetentionPeriodMinutes(val) + } + return nil + } + res["working_directory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkingDirectory(val) + } + return nil + } + return res +} +// GetIdleTimeoutMinutes gets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +// returns a *int32 when successful +func (m *ItemItemCodespacesPostRequestBody) GetIdleTimeoutMinutes()(*int32) { + return m.idle_timeout_minutes +} +// GetLocation gets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetLocation()(*string) { + return m.location +} +// GetMachine gets the machine property value. Machine type to use for this codespace +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetMachine()(*string) { + return m.machine +} +// GetMultiRepoPermissionsOptOut gets the multi_repo_permissions_opt_out property value. Whether to authorize requested permissions from devcontainer.json +// returns a *bool when successful +func (m *ItemItemCodespacesPostRequestBody) GetMultiRepoPermissionsOptOut()(*bool) { + return m.multi_repo_permissions_opt_out +} +// GetRef gets the ref property value. Git ref (typically a branch name) for this codespace +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetRef()(*string) { + return m.ref +} +// GetRetentionPeriodMinutes gets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +// returns a *int32 when successful +func (m *ItemItemCodespacesPostRequestBody) GetRetentionPeriodMinutes()(*int32) { + return m.retention_period_minutes +} +// GetWorkingDirectory gets the working_directory property value. Working directory for this codespace +// returns a *string when successful +func (m *ItemItemCodespacesPostRequestBody) GetWorkingDirectory()(*string) { + return m.working_directory +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client_ip", m.GetClientIp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("idle_timeout_minutes", m.GetIdleTimeoutMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("multi_repo_permissions_opt_out", m.GetMultiRepoPermissionsOptOut()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("retention_period_minutes", m.GetRetentionPeriodMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("working_directory", m.GetWorkingDirectory()) + 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 *ItemItemCodespacesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientIp sets the client_ip property value. IP for location auto-detection when proxying a request +func (m *ItemItemCodespacesPostRequestBody) SetClientIp(value *string)() { + m.client_ip = value +} +// SetDevcontainerPath sets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +func (m *ItemItemCodespacesPostRequestBody) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetDisplayName sets the display_name property value. Display name for this codespace +func (m *ItemItemCodespacesPostRequestBody) SetDisplayName(value *string)() { + m.display_name = value +} +// SetIdleTimeoutMinutes sets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +func (m *ItemItemCodespacesPostRequestBody) SetIdleTimeoutMinutes(value *int32)() { + m.idle_timeout_minutes = value +} +// SetLocation sets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +func (m *ItemItemCodespacesPostRequestBody) SetLocation(value *string)() { + m.location = value +} +// SetMachine sets the machine property value. Machine type to use for this codespace +func (m *ItemItemCodespacesPostRequestBody) SetMachine(value *string)() { + m.machine = value +} +// SetMultiRepoPermissionsOptOut sets the multi_repo_permissions_opt_out property value. Whether to authorize requested permissions from devcontainer.json +func (m *ItemItemCodespacesPostRequestBody) SetMultiRepoPermissionsOptOut(value *bool)() { + m.multi_repo_permissions_opt_out = value +} +// SetRef sets the ref property value. Git ref (typically a branch name) for this codespace +func (m *ItemItemCodespacesPostRequestBody) SetRef(value *string)() { + m.ref = value +} +// SetRetentionPeriodMinutes sets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +func (m *ItemItemCodespacesPostRequestBody) SetRetentionPeriodMinutes(value *int32)() { + m.retention_period_minutes = value +} +// SetWorkingDirectory sets the working_directory property value. Working directory for this codespace +func (m *ItemItemCodespacesPostRequestBody) SetWorkingDirectory(value *string)() { + m.working_directory = value +} +type ItemItemCodespacesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientIp()(*string) + GetDevcontainerPath()(*string) + GetDisplayName()(*string) + GetIdleTimeoutMinutes()(*int32) + GetLocation()(*string) + GetMachine()(*string) + GetMultiRepoPermissionsOptOut()(*bool) + GetRef()(*string) + GetRetentionPeriodMinutes()(*int32) + GetWorkingDirectory()(*string) + SetClientIp(value *string)() + SetDevcontainerPath(value *string)() + SetDisplayName(value *string)() + SetIdleTimeoutMinutes(value *int32)() + SetLocation(value *string)() + SetMachine(value *string)() + SetMultiRepoPermissionsOptOut(value *bool)() + SetRef(value *string)() + SetRetentionPeriodMinutes(value *int32)() + SetWorkingDirectory(value *string)() +} diff --git a/pkg/github/repos/item_item_codespaces_request_builder.go b/pkg/github/repos/item_item_codespaces_request_builder.go new file mode 100644 index 0000000..f9e7cef --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_request_builder.go @@ -0,0 +1,142 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces +type ItemItemCodespacesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodespacesRequestBuilderGetQueryParameters lists the codespaces associated to a specified repository and the authenticated user.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +type ItemItemCodespacesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCodespacesRequestBuilderInternal instantiates a new ItemItemCodespacesRequestBuilder and sets the default values. +func NewItemItemCodespacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesRequestBuilder) { + m := &ItemItemCodespacesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCodespacesRequestBuilder instantiates a new ItemItemCodespacesRequestBuilder and sets the default values. +func NewItemItemCodespacesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesRequestBuilderInternal(urlParams, requestAdapter) +} +// Devcontainers the devcontainers property +// returns a *ItemItemCodespacesDevcontainersRequestBuilder when successful +func (m *ItemItemCodespacesRequestBuilder) Devcontainers()(*ItemItemCodespacesDevcontainersRequestBuilder) { + return NewItemItemCodespacesDevcontainersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get lists the codespaces associated to a specified repository and the authenticated user.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a ItemItemCodespacesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user +func (m *ItemItemCodespacesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesRequestBuilderGetQueryParameters])(ItemItemCodespacesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCodespacesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCodespacesGetResponseable), nil +} +// Machines the machines property +// returns a *ItemItemCodespacesMachinesRequestBuilder when successful +func (m *ItemItemCodespacesRequestBuilder) Machines()(*ItemItemCodespacesMachinesRequestBuilder) { + return NewItemItemCodespacesMachinesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// New the new property +// returns a *ItemItemCodespacesNewRequestBuilder when successful +func (m *ItemItemCodespacesRequestBuilder) New()(*ItemItemCodespacesNewRequestBuilder) { + return NewItemItemCodespacesNewRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Permissions_check the permissions_check property +// returns a *ItemItemCodespacesPermissions_checkRequestBuilder when successful +func (m *ItemItemCodespacesRequestBuilder) Permissions_check()(*ItemItemCodespacesPermissions_checkRequestBuilder) { + return NewItemItemCodespacesPermissions_checkRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Post creates a codespace owned by the authenticated user in the specified repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Codespace503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#create-a-codespace-in-a-repository +func (m *ItemItemCodespacesRequestBuilder) Post(ctx context.Context, body ItemItemCodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespace503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// Secrets the secrets property +// returns a *ItemItemCodespacesSecretsRequestBuilder when successful +func (m *ItemItemCodespacesRequestBuilder) Secrets()(*ItemItemCodespacesSecretsRequestBuilder) { + return NewItemItemCodespacesSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists the codespaces associated to a specified repository and the authenticated user.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a codespace owned by the authenticated user in the specified repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesRequestBuilder when successful +func (m *ItemItemCodespacesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesRequestBuilder) { + return NewItemItemCodespacesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_secrets_get_response.go b/pkg/github/repos/item_item_codespaces_secrets_get_response.go new file mode 100644 index 0000000..ce881ee --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_secrets_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCodespacesSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable + // The total_count property + total_count *int32 +} +// NewItemItemCodespacesSecretsGetResponse instantiates a new ItemItemCodespacesSecretsGetResponse and sets the default values. +func NewItemItemCodespacesSecretsGetResponse()(*ItemItemCodespacesSecretsGetResponse) { + m := &ItemItemCodespacesSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepoCodespacesSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []RepoCodespacesSecretable when successful +func (m *ItemItemCodespacesSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCodespacesSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCodespacesSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemItemCodespacesSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCodespacesSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCodespacesSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_codespaces_secrets_item_with_secret_name_put_request_body.go b/pkg/github/repos/item_item_codespaces_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..e25e851 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string +} +// NewItemItemCodespacesSecretsItemWithSecret_namePutRequestBody instantiates a new ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemItemCodespacesSecretsItemWithSecret_namePutRequestBody()(*ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) { + m := &ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCodespacesSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodespacesSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodespacesSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint. +// returns a *string when successful +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// Serialize serializes information the current object +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + 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 *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint. +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *ItemItemCodespacesSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +type ItemItemCodespacesSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() +} diff --git a/pkg/github/repos/item_item_codespaces_secrets_public_key_request_builder.go b/pkg/github/repos/item_item_codespaces_secrets_public_key_request_builder.go new file mode 100644 index 0000000..0998e8f --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesSecretsPublicKeyRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\secrets\public-key +type ItemItemCodespacesSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodespacesSecretsPublicKeyRequestBuilderInternal instantiates a new ItemItemCodespacesSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemCodespacesSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesSecretsPublicKeyRequestBuilder) { + m := &ItemItemCodespacesSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets/public-key", pathParameters), + } + return m +} +// NewItemItemCodespacesSecretsPublicKeyRequestBuilder instantiates a new ItemItemCodespacesSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemCodespacesSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a CodespacesPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#get-a-repository-public-key +func (m *ItemItemCodespacesSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesPublicKeyable), nil +} +// ToGetRequestInformation gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemCodespacesSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesSecretsPublicKeyRequestBuilder) { + return NewItemItemCodespacesSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_secrets_request_builder.go b/pkg/github/repos/item_item_codespaces_secrets_request_builder.go new file mode 100644 index 0000000..530d5f7 --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_secrets_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodespacesSecretsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\secrets +type ItemItemCodespacesSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCodespacesSecretsRequestBuilderGetQueryParameters lists all development environment secrets available in a repository without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemCodespacesSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.codespaces.secrets.item collection +// returns a *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemCodespacesSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodespacesSecretsRequestBuilderInternal instantiates a new ItemItemCodespacesSecretsRequestBuilder and sets the default values. +func NewItemItemCodespacesSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesSecretsRequestBuilder) { + m := &ItemItemCodespacesSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCodespacesSecretsRequestBuilder instantiates a new ItemItemCodespacesSecretsRequestBuilder and sets the default values. +func NewItemItemCodespacesSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all development environment secrets available in a repository without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemCodespacesSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#list-repository-secrets +func (m *ItemItemCodespacesSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesSecretsRequestBuilderGetQueryParameters])(ItemItemCodespacesSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCodespacesSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCodespacesSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemItemCodespacesSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemCodespacesSecretsRequestBuilder) PublicKey()(*ItemItemCodespacesSecretsPublicKeyRequestBuilder) { + return NewItemItemCodespacesSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all development environment secrets available in a repository without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodespacesSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesSecretsRequestBuilder when successful +func (m *ItemItemCodespacesSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesSecretsRequestBuilder) { + return NewItemItemCodespacesSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_codespaces_secrets_with_secret_name_item_request_builder.go b/pkg/github/repos/item_item_codespaces_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..fbc757d --- /dev/null +++ b/pkg/github/repos/item_item_codespaces_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\secrets\{secret_name} +type ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a development environment secret in a repository using the secret name.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#delete-a-repository-secret +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a single repository development environment secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a RepoCodespacesSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#get-a-repository-secret +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepoCodespacesSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoCodespacesSecretable), nil +} +// Put creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#create-or-update-a-repository-secret +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemItemCodespacesSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToDeleteRequestInformation deletes a development environment secret in a repository using the secret name.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a single repository development environment secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemCodespacesSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder) { + return NewItemItemCodespacesSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_collaborators_item_permission_request_builder.go b/pkg/github/repos/item_item_collaborators_item_permission_request_builder.go new file mode 100644 index 0000000..82e33d9 --- /dev/null +++ b/pkg/github/repos/item_item_collaborators_item_permission_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCollaboratorsItemPermissionRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\collaborators\{username}\permission +type ItemItemCollaboratorsItemPermissionRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCollaboratorsItemPermissionRequestBuilderInternal instantiates a new ItemItemCollaboratorsItemPermissionRequestBuilder and sets the default values. +func NewItemItemCollaboratorsItemPermissionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCollaboratorsItemPermissionRequestBuilder) { + m := &ItemItemCollaboratorsItemPermissionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators/{username}/permission", pathParameters), + } + return m +} +// NewItemItemCollaboratorsItemPermissionRequestBuilder instantiates a new ItemItemCollaboratorsItemPermissionRequestBuilder and sets the default values. +func NewItemItemCollaboratorsItemPermissionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCollaboratorsItemPermissionRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCollaboratorsItemPermissionRequestBuilderInternal(urlParams, requestAdapter) +} +// Get checks the repository permission of a collaborator. The possible repositorypermissions are `admin`, `write`, `read`, and `none`.*Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the`maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to thecollaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The`permissions` hash can also be used to determine which base level of access the collaborator has to the repository. +// returns a RepositoryCollaboratorPermissionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/collaborators#get-repository-permissions-for-a-user +func (m *ItemItemCollaboratorsItemPermissionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryCollaboratorPermissionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryCollaboratorPermissionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryCollaboratorPermissionable), nil +} +// ToGetRequestInformation checks the repository permission of a collaborator. The possible repositorypermissions are `admin`, `write`, `read`, and `none`.*Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the`maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to thecollaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The`permissions` hash can also be used to determine which base level of access the collaborator has to the repository. +// returns a *RequestInformation when successful +func (m *ItemItemCollaboratorsItemPermissionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCollaboratorsItemPermissionRequestBuilder when successful +func (m *ItemItemCollaboratorsItemPermissionRequestBuilder) WithUrl(rawUrl string)(*ItemItemCollaboratorsItemPermissionRequestBuilder) { + return NewItemItemCollaboratorsItemPermissionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_collaborators_item_with_username_put_request_body.go b/pkg/github/repos/item_item_collaborators_item_with_username_put_request_body.go new file mode 100644 index 0000000..b2e9f1d --- /dev/null +++ b/pkg/github/repos/item_item_collaborators_item_with_username_put_request_body.go @@ -0,0 +1,82 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCollaboratorsItemWithUsernamePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + permission *string +} +// NewItemItemCollaboratorsItemWithUsernamePutRequestBody instantiates a new ItemItemCollaboratorsItemWithUsernamePutRequestBody and sets the default values. +func NewItemItemCollaboratorsItemWithUsernamePutRequestBody()(*ItemItemCollaboratorsItemWithUsernamePutRequestBody) { + m := &ItemItemCollaboratorsItemWithUsernamePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + permissionValue := "push" + m.SetPermission(&permissionValue) + return m +} +// CreateItemItemCollaboratorsItemWithUsernamePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCollaboratorsItemWithUsernamePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCollaboratorsItemWithUsernamePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCollaboratorsItemWithUsernamePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCollaboratorsItemWithUsernamePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + return res +} +// GetPermission gets the permission property value. The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. +// returns a *string when successful +func (m *ItemItemCollaboratorsItemWithUsernamePutRequestBody) GetPermission()(*string) { + return m.permission +} +// Serialize serializes information the current object +func (m *ItemItemCollaboratorsItemWithUsernamePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("permission", m.GetPermission()) + 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 *ItemItemCollaboratorsItemWithUsernamePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPermission sets the permission property value. The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. +func (m *ItemItemCollaboratorsItemWithUsernamePutRequestBody) SetPermission(value *string)() { + m.permission = value +} +type ItemItemCollaboratorsItemWithUsernamePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPermission()(*string) + SetPermission(value *string)() +} diff --git a/pkg/github/repos/item_item_collaborators_request_builder.go b/pkg/github/repos/item_item_collaborators_request_builder.go new file mode 100644 index 0000000..34117cd --- /dev/null +++ b/pkg/github/repos/item_item_collaborators_request_builder.go @@ -0,0 +1,88 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i0fb0357f3304e4728f3dafd55b84db07f605827d212a20678dac150947d96e0d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/collaborators" +) + +// ItemItemCollaboratorsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\collaborators +type ItemItemCollaboratorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCollaboratorsRequestBuilderGetQueryParameters for organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.Team members will include the members of child teams.The authenticated user must have push access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. +type ItemItemCollaboratorsRequestBuilderGetQueryParameters struct { + // Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. + Affiliation *i0fb0357f3304e4728f3dafd55b84db07f605827d212a20678dac150947d96e0d.GetAffiliationQueryParameterType `uriparametername:"affiliation"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. + Permission *i0fb0357f3304e4728f3dafd55b84db07f605827d212a20678dac150947d96e0d.GetPermissionQueryParameterType `uriparametername:"permission"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.collaborators.item collection +// returns a *ItemItemCollaboratorsWithUsernameItemRequestBuilder when successful +func (m *ItemItemCollaboratorsRequestBuilder) ByUsername(username string)(*ItemItemCollaboratorsWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemItemCollaboratorsWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCollaboratorsRequestBuilderInternal instantiates a new ItemItemCollaboratorsRequestBuilder and sets the default values. +func NewItemItemCollaboratorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCollaboratorsRequestBuilder) { + m := &ItemItemCollaboratorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators{?affiliation*,page*,per_page*,permission*}", pathParameters), + } + return m +} +// NewItemItemCollaboratorsRequestBuilder instantiates a new ItemItemCollaboratorsRequestBuilder and sets the default values. +func NewItemItemCollaboratorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCollaboratorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCollaboratorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get for organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.Team members will include the members of child teams.The authenticated user must have push access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. +// returns a []Collaboratorable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/collaborators#list-repository-collaborators +func (m *ItemItemCollaboratorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCollaboratorsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Collaboratorable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCollaboratorFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Collaboratorable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Collaboratorable) + } + } + return val, nil +} +// ToGetRequestInformation for organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.Team members will include the members of child teams.The authenticated user must have push access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCollaboratorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCollaboratorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCollaboratorsRequestBuilder when successful +func (m *ItemItemCollaboratorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCollaboratorsRequestBuilder) { + return NewItemItemCollaboratorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go b/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go new file mode 100644 index 0000000..74e49f3 --- /dev/null +++ b/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go @@ -0,0 +1,123 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCollaboratorsWithUsernameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\collaborators\{username} +type ItemItemCollaboratorsWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCollaboratorsWithUsernameItemRequestBuilderInternal instantiates a new ItemItemCollaboratorsWithUsernameItemRequestBuilder and sets the default values. +func NewItemItemCollaboratorsWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCollaboratorsWithUsernameItemRequestBuilder) { + m := &ItemItemCollaboratorsWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators/{username}", pathParameters), + } + return m +} +// NewItemItemCollaboratorsWithUsernameItemRequestBuilder instantiates a new ItemItemCollaboratorsWithUsernameItemRequestBuilder and sets the default values. +func NewItemItemCollaboratorsWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCollaboratorsWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCollaboratorsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a collaborator from a repository.To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal.This endpoint also:- Cancels any outstanding invitations- Unasigns the user from any issues- Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories.- Unstars the repository- Updates access permissions to packagesRemoving a user as a collaborator has the following effects on forks: - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork. - If the user had their own fork of the repository, the fork will be deleted. - If the user still has read access to the repository, open pull requests by this user from a fork will be denied.**Note**: A user can still have access to the repository through organization permissions like base repository permissions.Although the API responds immediately, the additional permission updates might take some extra time to complete in the background.For more information on fork permissions, see "[About permissions and visibility of forks](https://docs.github.com/enterprise-cloud@latest//pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/collaborators#remove-a-repository-collaborator +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get for organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.Team members will include the members of child teams.The authenticated user must have push access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Permission the permission property +// returns a *ItemItemCollaboratorsItemPermissionRequestBuilder when successful +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) Permission()(*ItemItemCollaboratorsItemPermissionRequestBuilder) { + return NewItemItemCollaboratorsItemPermissionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Put this endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations).**Updating an existing collaborator's permission level**The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.**Rate limits**You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. +// returns a RepositoryInvitationable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/collaborators#add-a-repository-collaborator +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) Put(ctx context.Context, body ItemItemCollaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryInvitationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable), nil +} +// ToDeleteRequestInformation removes a collaborator from a repository.To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal.This endpoint also:- Cancels any outstanding invitations- Unasigns the user from any issues- Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories.- Unstars the repository- Updates access permissions to packagesRemoving a user as a collaborator has the following effects on forks: - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork. - If the user had their own fork of the repository, the fork will be deleted. - If the user still has read access to the repository, open pull requests by this user from a fork will be denied.**Note**: A user can still have access to the repository through organization permissions like base repository permissions.Although the API responds immediately, the additional permission updates might take some extra time to complete in the background.For more information on fork permissions, see "[About permissions and visibility of forks](https://docs.github.com/enterprise-cloud@latest//pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". +// returns a *RequestInformation when successful +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation for organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.Team members will include the members of child teams.The authenticated user must have push access to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation this endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations).**Updating an existing collaborator's permission level**The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.**Rate limits**You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. +// returns a *RequestInformation when successful +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemCollaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCollaboratorsWithUsernameItemRequestBuilder when successful +func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCollaboratorsWithUsernameItemRequestBuilder) { + return NewItemItemCollaboratorsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_comments_item_reactions_post_request_body.go b/pkg/github/repos/item_item_comments_item_reactions_post_request_body.go new file mode 100644 index 0000000..be6052c --- /dev/null +++ b/pkg/github/repos/item_item_comments_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCommentsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemCommentsItemReactionsPostRequestBody instantiates a new ItemItemCommentsItemReactionsPostRequestBody and sets the default values. +func NewItemItemCommentsItemReactionsPostRequestBody()(*ItemItemCommentsItemReactionsPostRequestBody) { + m := &ItemItemCommentsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCommentsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCommentsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCommentsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCommentsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCommentsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemCommentsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemCommentsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemCommentsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_comments_item_reactions_request_builder.go b/pkg/github/repos/item_item_comments_item_reactions_request_builder.go new file mode 100644 index 0000000..ebbccc9 --- /dev/null +++ b/pkg/github/repos/item_item_comments_item_reactions_request_builder.go @@ -0,0 +1,120 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i2fae9cc2db8815e9c78ea9d8ef126c9151f143f15d5cb23f4ca960ece1a5e8db "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/comments/item/reactions" +) + +// ItemItemCommentsItemReactionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments\{comment_id}\reactions +type ItemItemCommentsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommentsItemReactionsRequestBuilderGetQueryParameters list the reactions to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). +type ItemItemCommentsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment. + Content *i2fae9cc2db8815e9c78ea9d8ef126c9151f143f15d5cb23f4ca960ece1a5e8db.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.comments.item.reactions.item collection +// returns a *ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemCommentsItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCommentsItemReactionsRequestBuilderInternal instantiates a new ItemItemCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemItemCommentsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsItemReactionsRequestBuilder) { + m := &ItemItemCommentsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommentsItemReactionsRequestBuilder instantiates a new ItemItemCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemItemCommentsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommentsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). +// returns a []Reactionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-commit-comment +func (m *ItemItemCommentsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommentsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. +// returns a Reactionable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-commit-comment +func (m *ItemItemCommentsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). +// returns a *RequestInformation when successful +func (m *ItemItemCommentsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommentsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. +// returns a *RequestInformation when successful +func (m *ItemItemCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommentsItemReactionsRequestBuilder when successful +func (m *ItemItemCommentsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommentsItemReactionsRequestBuilder) { + return NewItemItemCommentsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_comments_item_reactions_with_reaction_item_request_builder.go b/pkg/github/repos/item_item_comments_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..722f054 --- /dev/null +++ b/pkg/github/repos/item_item_comments_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments\{comment_id}\reactions\{reaction_id} +type ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.Delete a reaction to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-a-commit-comment-reaction +func (m *ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.Delete a reaction to a [commit comment](https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment). +// returns a *RequestInformation when successful +func (m *ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemItemCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_comments_item_with_comment_patch_request_body.go b/pkg/github/repos/item_item_comments_item_with_comment_patch_request_body.go new file mode 100644 index 0000000..b4fd240 --- /dev/null +++ b/pkg/github/repos/item_item_comments_item_with_comment_patch_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCommentsItemWithComment_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contents of the comment + body *string +} +// NewItemItemCommentsItemWithComment_PatchRequestBody instantiates a new ItemItemCommentsItemWithComment_PatchRequestBody and sets the default values. +func NewItemItemCommentsItemWithComment_PatchRequestBody()(*ItemItemCommentsItemWithComment_PatchRequestBody) { + m := &ItemItemCommentsItemWithComment_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCommentsItemWithComment_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCommentsItemWithComment_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The contents of the comment +// returns a *string when successful +func (m *ItemItemCommentsItemWithComment_PatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCommentsItemWithComment_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemCommentsItemWithComment_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemCommentsItemWithComment_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The contents of the comment +func (m *ItemItemCommentsItemWithComment_PatchRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemCommentsItemWithComment_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_comments_request_builder.go b/pkg/github/repos/item_item_comments_request_builder.go new file mode 100644 index 0000000..f691a44 --- /dev/null +++ b/pkg/github/repos/item_item_comments_request_builder.go @@ -0,0 +1,78 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments +type ItemItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommentsRequestBuilderGetQueryParameters lists the commit comments for a specified repository. Comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemCommentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.comments.item collection +// returns a *ItemItemCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemItemCommentsWithComment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10) + return NewItemItemCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCommentsRequestBuilderInternal instantiates a new ItemItemCommentsRequestBuilder and sets the default values. +func NewItemItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsRequestBuilder) { + m := &ItemItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommentsRequestBuilder instantiates a new ItemItemCommentsRequestBuilder and sets the default values. +func NewItemItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the commit comments for a specified repository. Comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []CommitCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#list-commit-comments-for-a-repository +func (m *ItemItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable) + } + } + return val, nil +} +// ToGetRequestInformation lists the commit comments for a specified repository. Comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommentsRequestBuilder when successful +func (m *ItemItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommentsRequestBuilder) { + return NewItemItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_comments_with_comment_item_request_builder.go b/pkg/github/repos/item_item_comments_with_comment_item_request_builder.go new file mode 100644 index 0000000..521e401 --- /dev/null +++ b/pkg/github/repos/item_item_comments_with_comment_item_request_builder.go @@ -0,0 +1,127 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommentsWithComment_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments\{comment_id} +type ItemItemCommentsWithComment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCommentsWithComment_ItemRequestBuilderInternal instantiates a new ItemItemCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemCommentsWithComment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsWithComment_ItemRequestBuilder) { + m := &ItemItemCommentsWithComment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}", pathParameters), + } + return m +} +// NewItemItemCommentsWithComment_ItemRequestBuilder instantiates a new ItemItemCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemCommentsWithComment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommentsWithComment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommentsWithComment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a commit comment +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#delete-a-commit-comment +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specified commit comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a CommitCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#get-a-commit-comment +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable), nil +} +// Patch updates the contents of a specified commit comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a CommitCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#update-a-commit-comment +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable), nil +} +// Reactions the reactions property +// returns a *ItemItemCommentsItemReactionsRequestBuilder when successful +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) Reactions()(*ItemItemCommentsItemReactionsRequestBuilder) { + return NewItemItemCommentsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// returns a *RequestInformation when successful +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specified commit comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the contents of a specified commit comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemCommentsWithComment_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommentsWithComment_ItemRequestBuilder) { + return NewItemItemCommentsWithComment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go b/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go new file mode 100644 index 0000000..9b78783 --- /dev/null +++ b/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go @@ -0,0 +1,111 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsCommit_shaItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id} +type ItemItemCommitsCommit_shaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +type ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BranchesWhereHead the branchesWhereHead property +// returns a *ItemItemCommitsItemBranchesWhereHeadRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) BranchesWhereHead()(*ItemItemCommitsItemBranchesWhereHeadRequestBuilder) { + return NewItemItemCommitsItemBranchesWhereHeadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckRuns the checkRuns property +// returns a *ItemItemCommitsItemCheckRunsRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) CheckRuns()(*ItemItemCommitsItemCheckRunsRequestBuilder) { + return NewItemItemCommitsItemCheckRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckSuites the checkSuites property +// returns a *ItemItemCommitsItemCheckSuitesRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) CheckSuites()(*ItemItemCommitsItemCheckSuitesRequestBuilder) { + return NewItemItemCommitsItemCheckSuitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemItemCommitsItemCommentsRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Comments()(*ItemItemCommitsItemCommentsRequestBuilder) { + return NewItemItemCommitsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCommitsCommit_shaItemRequestBuilderInternal instantiates a new ItemItemCommitsCommit_shaItemRequestBuilder and sets the default values. +func NewItemItemCommitsCommit_shaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsCommit_shaItemRequestBuilder) { + m := &ItemItemCommitsCommit_shaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsCommit_shaItemRequestBuilder instantiates a new ItemItemCommitsCommit_shaItemRequestBuilder and sets the default values. +func NewItemItemCommitsCommit_shaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsCommit_shaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsCommit_shaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a Commitable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// returns a Commit503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#get-a-commit +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommit503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable), nil +} +// Pulls the pulls property +// returns a *ItemItemCommitsItemPullsRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Pulls()(*ItemItemCommitsItemPullsRequestBuilder) { + return NewItemItemCommitsItemPullsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Status the status property +// returns a *ItemItemCommitsItemStatusRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Status()(*ItemItemCommitsItemStatusRequestBuilder) { + return NewItemItemCommitsItemStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Statuses the statuses property +// returns a *ItemItemCommitsItemStatusesRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Statuses()(*ItemItemCommitsItemStatusesRequestBuilder) { + return NewItemItemCommitsItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsCommit_shaItemRequestBuilder when successful +func (m *ItemItemCommitsCommit_shaItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsCommit_shaItemRequestBuilder) { + return NewItemItemCommitsCommit_shaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go b/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go new file mode 100644 index 0000000..c567c93 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go @@ -0,0 +1,66 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsItemBranchesWhereHeadRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\branches-where-head +type ItemItemCommitsItemBranchesWhereHeadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCommitsItemBranchesWhereHeadRequestBuilderInternal instantiates a new ItemItemCommitsItemBranchesWhereHeadRequestBuilder and sets the default values. +func NewItemItemCommitsItemBranchesWhereHeadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemBranchesWhereHeadRequestBuilder) { + m := &ItemItemCommitsItemBranchesWhereHeadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/branches-where-head", pathParameters), + } + return m +} +// NewItemItemCommitsItemBranchesWhereHeadRequestBuilder instantiates a new ItemItemCommitsItemBranchesWhereHeadRequestBuilder and sets the default values. +func NewItemItemCommitsItemBranchesWhereHeadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemBranchesWhereHeadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemBranchesWhereHeadRequestBuilderInternal(urlParams, requestAdapter) +} +// Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. +// returns a []BranchShortable when successful +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-branches-for-head-commit +func (m *ItemItemCommitsItemBranchesWhereHeadRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchShortable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBranchShortFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchShortable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BranchShortable) + } + } + return val, nil +} +// ToGetRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemBranchesWhereHeadRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemBranchesWhereHeadRequestBuilder when successful +func (m *ItemItemCommitsItemBranchesWhereHeadRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemBranchesWhereHeadRequestBuilder) { + return NewItemItemCommitsItemBranchesWhereHeadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_check_runs_get_response.go b/pkg/github/repos/item_item_commits_item_check_runs_get_response.go new file mode 100644 index 0000000..15c7906 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_check_runs_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCommitsItemCheckRunsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The check_runs property + check_runs []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable + // The total_count property + total_count *int32 +} +// NewItemItemCommitsItemCheckRunsGetResponse instantiates a new ItemItemCommitsItemCheckRunsGetResponse and sets the default values. +func NewItemItemCommitsItemCheckRunsGetResponse()(*ItemItemCommitsItemCheckRunsGetResponse) { + m := &ItemItemCommitsItemCheckRunsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCommitsItemCheckRunsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCommitsItemCheckRunsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCommitsItemCheckRunsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCommitsItemCheckRunsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCheckRuns gets the check_runs property value. The check_runs property +// returns a []CheckRunable when successful +func (m *ItemItemCommitsItemCheckRunsGetResponse) GetCheckRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable) { + return m.check_runs +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCommitsItemCheckRunsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["check_runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckRunFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable) + } + } + m.SetCheckRuns(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCommitsItemCheckRunsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCommitsItemCheckRunsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCheckRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCheckRuns())) + for i, v := range m.GetCheckRuns() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("check_runs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCommitsItemCheckRunsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCheckRuns sets the check_runs property value. The check_runs property +func (m *ItemItemCommitsItemCheckRunsGetResponse) SetCheckRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable)() { + m.check_runs = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCommitsItemCheckRunsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCommitsItemCheckRunsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckRuns()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable) + GetTotalCount()(*int32) + SetCheckRuns(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckRunable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_commits_item_check_runs_request_builder.go b/pkg/github/repos/item_item_commits_item_check_runs_request_builder.go new file mode 100644 index 0000000..a5c9114 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_check_runs_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ica58dcd957bfdfd2e65fe1269306e6a2c95c0c80e331b8e2b81f5e93d575f659 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/commits/item/checkruns" +) + +// ItemItemCommitsItemCheckRunsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\check-runs +type ItemItemCommitsItemCheckRunsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsItemCheckRunsRequestBuilderGetQueryParameters lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/enterprise-cloud@latest//rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/enterprise-cloud@latest//rest/reference/checks#list-check-runs-in-a-check-suite) endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +type ItemItemCommitsItemCheckRunsRequestBuilderGetQueryParameters struct { + App_id *int32 `uriparametername:"app_id"` + // Returns check runs with the specified `name`. + Check_name *string `uriparametername:"check_name"` + // Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. + Filter *ica58dcd957bfdfd2e65fe1269306e6a2c95c0c80e331b8e2b81f5e93d575f659.GetFilterQueryParameterType `uriparametername:"filter"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Returns check runs with the specified `status`. + Status *ica58dcd957bfdfd2e65fe1269306e6a2c95c0c80e331b8e2b81f5e93d575f659.GetStatusQueryParameterType `uriparametername:"status"` +} +// NewItemItemCommitsItemCheckRunsRequestBuilderInternal instantiates a new ItemItemCommitsItemCheckRunsRequestBuilder and sets the default values. +func NewItemItemCommitsItemCheckRunsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemCheckRunsRequestBuilder) { + m := &ItemItemCommitsItemCheckRunsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/check-runs{?app_id*,check_name*,filter*,page*,per_page*,status*}", pathParameters), + } + return m +} +// NewItemItemCommitsItemCheckRunsRequestBuilder instantiates a new ItemItemCommitsItemCheckRunsRequestBuilder and sets the default values. +func NewItemItemCommitsItemCheckRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemCheckRunsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemCheckRunsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/enterprise-cloud@latest//rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/enterprise-cloud@latest//rest/reference/checks#list-check-runs-in-a-check-suite) endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a ItemItemCommitsItemCheckRunsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/runs#list-check-runs-for-a-git-reference +func (m *ItemItemCommitsItemCheckRunsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemCheckRunsRequestBuilderGetQueryParameters])(ItemItemCommitsItemCheckRunsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCommitsItemCheckRunsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCommitsItemCheckRunsGetResponseable), nil +} +// ToGetRequestInformation lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/enterprise-cloud@latest//rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/enterprise-cloud@latest//rest/reference/checks#list-check-runs-in-a-check-suite) endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemCheckRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemCheckRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemCheckRunsRequestBuilder when successful +func (m *ItemItemCommitsItemCheckRunsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemCheckRunsRequestBuilder) { + return NewItemItemCommitsItemCheckRunsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_check_suites_get_response.go b/pkg/github/repos/item_item_commits_item_check_suites_get_response.go new file mode 100644 index 0000000..664ae02 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_check_suites_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemCommitsItemCheckSuitesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The check_suites property + check_suites []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable + // The total_count property + total_count *int32 +} +// NewItemItemCommitsItemCheckSuitesGetResponse instantiates a new ItemItemCommitsItemCheckSuitesGetResponse and sets the default values. +func NewItemItemCommitsItemCheckSuitesGetResponse()(*ItemItemCommitsItemCheckSuitesGetResponse) { + m := &ItemItemCommitsItemCheckSuitesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCommitsItemCheckSuitesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCommitsItemCheckSuitesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCommitsItemCheckSuitesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCommitsItemCheckSuitesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCheckSuites gets the check_suites property value. The check_suites property +// returns a []CheckSuiteable when successful +func (m *ItemItemCommitsItemCheckSuitesGetResponse) GetCheckSuites()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable) { + return m.check_suites +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCommitsItemCheckSuitesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["check_suites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCheckSuiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable) + } + } + m.SetCheckSuites(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemCommitsItemCheckSuitesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemCommitsItemCheckSuitesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCheckSuites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCheckSuites())) + for i, v := range m.GetCheckSuites() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("check_suites", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemCommitsItemCheckSuitesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCheckSuites sets the check_suites property value. The check_suites property +func (m *ItemItemCommitsItemCheckSuitesGetResponse) SetCheckSuites(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable)() { + m.check_suites = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemCommitsItemCheckSuitesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemCommitsItemCheckSuitesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckSuites()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable) + GetTotalCount()(*int32) + SetCheckSuites(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CheckSuiteable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_commits_item_check_suites_request_builder.go b/pkg/github/repos/item_item_commits_item_check_suites_request_builder.go new file mode 100644 index 0000000..70a4ee0 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_check_suites_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCommitsItemCheckSuitesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\check-suites +type ItemItemCommitsItemCheckSuitesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsItemCheckSuitesRequestBuilderGetQueryParameters lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +type ItemItemCommitsItemCheckSuitesRequestBuilderGetQueryParameters struct { + // Filters check suites by GitHub App `id`. + App_id *int32 `uriparametername:"app_id"` + // Returns check runs with the specified `name`. + Check_name *string `uriparametername:"check_name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCommitsItemCheckSuitesRequestBuilderInternal instantiates a new ItemItemCommitsItemCheckSuitesRequestBuilder and sets the default values. +func NewItemItemCommitsItemCheckSuitesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemCheckSuitesRequestBuilder) { + m := &ItemItemCommitsItemCheckSuitesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/check-suites{?app_id*,check_name*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsItemCheckSuitesRequestBuilder instantiates a new ItemItemCommitsItemCheckSuitesRequestBuilder and sets the default values. +func NewItemItemCommitsItemCheckSuitesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemCheckSuitesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemCheckSuitesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a ItemItemCommitsItemCheckSuitesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/checks/suites#list-check-suites-for-a-git-reference +func (m *ItemItemCommitsItemCheckSuitesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemCheckSuitesRequestBuilderGetQueryParameters])(ItemItemCommitsItemCheckSuitesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemCommitsItemCheckSuitesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemCommitsItemCheckSuitesGetResponseable), nil +} +// ToGetRequestInformation lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name.**Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemCheckSuitesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemCheckSuitesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemCheckSuitesRequestBuilder when successful +func (m *ItemItemCommitsItemCheckSuitesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemCheckSuitesRequestBuilder) { + return NewItemItemCommitsItemCheckSuitesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_comments_post_request_body.go b/pkg/github/repos/item_item_commits_item_comments_post_request_body.go new file mode 100644 index 0000000..ed36957 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_comments_post_request_body.go @@ -0,0 +1,167 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemCommitsItemCommentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contents of the comment. + body *string + // **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + line *int32 + // Relative path of the file to comment on. + path *string + // Line index in the diff to comment on. + position *int32 +} +// NewItemItemCommitsItemCommentsPostRequestBody instantiates a new ItemItemCommitsItemCommentsPostRequestBody and sets the default values. +func NewItemItemCommitsItemCommentsPostRequestBody()(*ItemItemCommitsItemCommentsPostRequestBody) { + m := &ItemItemCommitsItemCommentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemCommitsItemCommentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCommitsItemCommentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCommitsItemCommentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemCommitsItemCommentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The contents of the comment. +// returns a *string when successful +func (m *ItemItemCommitsItemCommentsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCommitsItemCommentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + return res +} +// GetLine gets the line property value. **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. +// returns a *int32 when successful +func (m *ItemItemCommitsItemCommentsPostRequestBody) GetLine()(*int32) { + return m.line +} +// GetPath gets the path property value. Relative path of the file to comment on. +// returns a *string when successful +func (m *ItemItemCommitsItemCommentsPostRequestBody) GetPath()(*string) { + return m.path +} +// GetPosition gets the position property value. Line index in the diff to comment on. +// returns a *int32 when successful +func (m *ItemItemCommitsItemCommentsPostRequestBody) GetPosition()(*int32) { + return m.position +} +// Serialize serializes information the current object +func (m *ItemItemCommitsItemCommentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + 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 *ItemItemCommitsItemCommentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The contents of the comment. +func (m *ItemItemCommitsItemCommentsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetLine sets the line property value. **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. +func (m *ItemItemCommitsItemCommentsPostRequestBody) SetLine(value *int32)() { + m.line = value +} +// SetPath sets the path property value. Relative path of the file to comment on. +func (m *ItemItemCommitsItemCommentsPostRequestBody) SetPath(value *string)() { + m.path = value +} +// SetPosition sets the position property value. Line index in the diff to comment on. +func (m *ItemItemCommitsItemCommentsPostRequestBody) SetPosition(value *int32)() { + m.position = value +} +type ItemItemCommitsItemCommentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetLine()(*int32) + GetPath()(*string) + GetPosition()(*int32) + SetBody(value *string)() + SetLine(value *int32)() + SetPath(value *string)() + SetPosition(value *int32)() +} diff --git a/pkg/github/repos/item_item_commits_item_comments_request_builder.go b/pkg/github/repos/item_item_commits_item_comments_request_builder.go new file mode 100644 index 0000000..f76811f --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_comments_request_builder.go @@ -0,0 +1,104 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsItemCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\comments +type ItemItemCommitsItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsItemCommentsRequestBuilderGetQueryParameters lists the comments for a specified commit.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemCommitsItemCommentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCommitsItemCommentsRequestBuilderInternal instantiates a new ItemItemCommitsItemCommentsRequestBuilder and sets the default values. +func NewItemItemCommitsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemCommentsRequestBuilder) { + m := &ItemItemCommitsItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/comments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsItemCommentsRequestBuilder instantiates a new ItemItemCommitsItemCommentsRequestBuilder and sets the default values. +func NewItemItemCommitsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the comments for a specified commit.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []CommitCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#list-commit-comments +func (m *ItemItemCommitsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable) + } + } + return val, nil +} +// Post create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a CommitCommentable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/comments#create-a-commit-comment +func (m *ItemItemCommitsItemCommentsRequestBuilder) Post(ctx context.Context, body ItemItemCommitsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitCommentable), nil +} +// ToGetRequestInformation lists the comments for a specified commit.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCommitsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemCommentsRequestBuilder when successful +func (m *ItemItemCommitsItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemCommentsRequestBuilder) { + return NewItemItemCommitsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_pulls_request_builder.go b/pkg/github/repos/item_item_commits_item_pulls_request_builder.go new file mode 100644 index 0000000..b00c3fb --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_pulls_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsItemPullsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\pulls +type ItemItemCommitsItemPullsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsItemPullsRequestBuilderGetQueryParameters lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit.To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. +type ItemItemCommitsItemPullsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCommitsItemPullsRequestBuilderInternal instantiates a new ItemItemCommitsItemPullsRequestBuilder and sets the default values. +func NewItemItemCommitsItemPullsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemPullsRequestBuilder) { + m := &ItemItemCommitsItemPullsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/pulls{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsItemPullsRequestBuilder instantiates a new ItemItemCommitsItemPullsRequestBuilder and sets the default values. +func NewItemItemCommitsItemPullsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemPullsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemPullsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit.To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. +// returns a []PullRequestSimpleable when successful +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-pull-requests-associated-with-a-commit +func (m *ItemItemCommitsItemPullsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemPullsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable) + } + } + return val, nil +} +// ToGetRequestInformation lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit.To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemPullsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemPullsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemPullsRequestBuilder when successful +func (m *ItemItemCommitsItemPullsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemPullsRequestBuilder) { + return NewItemItemCommitsItemPullsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_status_request_builder.go b/pkg/github/repos/item_item_commits_item_status_request_builder.go new file mode 100644 index 0000000..25d96f5 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_status_request_builder.go @@ -0,0 +1,68 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsItemStatusRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\status +type ItemItemCommitsItemStatusRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsItemStatusRequestBuilderGetQueryParameters users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.Additionally, a combined `state` is returned. The `state` is one of:* **failure** if any of the contexts report as `error` or `failure`* **pending** if there are no statuses or a context is `pending`* **success** if the latest status for all contexts is `success` +type ItemItemCommitsItemStatusRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCommitsItemStatusRequestBuilderInternal instantiates a new ItemItemCommitsItemStatusRequestBuilder and sets the default values. +func NewItemItemCommitsItemStatusRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemStatusRequestBuilder) { + m := &ItemItemCommitsItemStatusRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/status{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsItemStatusRequestBuilder instantiates a new ItemItemCommitsItemStatusRequestBuilder and sets the default values. +func NewItemItemCommitsItemStatusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemStatusRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemStatusRequestBuilderInternal(urlParams, requestAdapter) +} +// Get users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.Additionally, a combined `state` is returned. The `state` is one of:* **failure** if any of the contexts report as `error` or `failure`* **pending** if there are no statuses or a context is `pending`* **success** if the latest status for all contexts is `success` +// returns a CombinedCommitStatusable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses#get-the-combined-status-for-a-specific-reference +func (m *ItemItemCommitsItemStatusRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemStatusRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedCommitStatusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCombinedCommitStatusFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedCommitStatusable), nil +} +// ToGetRequestInformation users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.Additionally, a combined `state` is returned. The `state` is one of:* **failure** if any of the contexts report as `error` or `failure`* **pending** if there are no statuses or a context is `pending`* **success** if the latest status for all contexts is `success` +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemStatusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemStatusRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemStatusRequestBuilder when successful +func (m *ItemItemCommitsItemStatusRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemStatusRequestBuilder) { + return NewItemItemCommitsItemStatusRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_item_statuses_request_builder.go b/pkg/github/repos/item_item_commits_item_statuses_request_builder.go new file mode 100644 index 0000000..dafebf7 --- /dev/null +++ b/pkg/github/repos/item_item_commits_item_statuses_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsItemStatusesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\statuses +type ItemItemCommitsItemStatusesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsItemStatusesRequestBuilderGetQueryParameters users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. +type ItemItemCommitsItemStatusesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCommitsItemStatusesRequestBuilderInternal instantiates a new ItemItemCommitsItemStatusesRequestBuilder and sets the default values. +func NewItemItemCommitsItemStatusesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemStatusesRequestBuilder) { + m := &ItemItemCommitsItemStatusesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/statuses{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsItemStatusesRequestBuilder instantiates a new ItemItemCommitsItemStatusesRequestBuilder and sets the default values. +func NewItemItemCommitsItemStatusesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsItemStatusesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsItemStatusesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. +// returns a []Statusable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses#list-commit-statuses-for-a-reference +func (m *ItemItemCommitsItemStatusesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemStatusesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Statusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateStatusFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Statusable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Statusable) + } + } + return val, nil +} +// ToGetRequestInformation users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. +// returns a *RequestInformation when successful +func (m *ItemItemCommitsItemStatusesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsItemStatusesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsItemStatusesRequestBuilder when successful +func (m *ItemItemCommitsItemStatusesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsItemStatusesRequestBuilder) { + return NewItemItemCommitsItemStatusesRequestBuilder(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 new file mode 100644 index 0000000..26fa0df --- /dev/null +++ b/pkg/github/repos/item_item_commits_request_builder.go @@ -0,0 +1,102 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommitsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits +type ItemItemCommitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsRequestBuilderGetQueryParameters **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +type ItemItemCommitsRequestBuilderGetQueryParameters struct { + // GitHub username or email address to use to filter by commit author. + Author *string `uriparametername:"author"` + // GitHub username or email address to use to filter by commit committer. + Committer *string `uriparametername:"committer"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // Only commits containing this file path will be returned. + Path *string `uriparametername:"path"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). + Sha *string `uriparametername:"sha"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. + Until *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"until"` +} +// ByCommit_shaId gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.commits.item collection +// returns a *ItemItemCommitsCommit_shaItemRequestBuilder when successful +func (m *ItemItemCommitsRequestBuilder) ByCommit_shaId(commit_shaId string)(*ItemItemCommitsCommit_shaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if commit_shaId != "" { + urlTplParams["commit_sha%2Did"] = commit_shaId + } + return NewItemItemCommitsCommit_shaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCommitsRequestBuilderInternal instantiates a new ItemItemCommitsRequestBuilder and sets the default values. +func NewItemItemCommitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsRequestBuilder) { + m := &ItemItemCommitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits{?author*,committer*,page*,path*,per_page*,sha*,since*,until*}", pathParameters), + } + return m +} +// NewItemItemCommitsRequestBuilder instantiates a new ItemItemCommitsRequestBuilder and sets the default values. +func NewItemItemCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a []Commitable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits +func (m *ItemItemCommitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable) + } + } + return val, nil +} +// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemCommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommitsRequestBuilder when successful +func (m *ItemItemCommitsRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsRequestBuilder) { + return NewItemItemCommitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_community_profile_request_builder.go b/pkg/github/repos/item_item_community_profile_request_builder.go new file mode 100644 index 0000000..25a1c3b --- /dev/null +++ b/pkg/github/repos/item_item_community_profile_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCommunityProfileRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\community\profile +type ItemItemCommunityProfileRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCommunityProfileRequestBuilderInternal instantiates a new ItemItemCommunityProfileRequestBuilder and sets the default values. +func NewItemItemCommunityProfileRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommunityProfileRequestBuilder) { + m := &ItemItemCommunityProfileRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/community/profile", pathParameters), + } + return m +} +// NewItemItemCommunityProfileRequestBuilder instantiates a new ItemItemCommunityProfileRequestBuilder and sets the default values. +func NewItemItemCommunityProfileRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommunityProfileRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommunityProfileRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns all community profile metrics for a repository. The repository cannot be a fork.The returned metrics include an overall health score, the repository description, the presence of documentation, thedetected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,README, and CONTRIBUTING files.The `health_percentage` score is defined as a percentage of how many ofthe recommended community health files are present. For more information, see"[About community profiles for public repositories](https://docs.github.com/enterprise-cloud@latest//communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories)."`content_reports_enabled` is only returned for organization-owned repositories. +// returns a CommunityProfileable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/community#get-community-profile-metrics +func (m *ItemItemCommunityProfileRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommunityProfileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommunityProfileFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommunityProfileable), nil +} +// ToGetRequestInformation returns all community profile metrics for a repository. The repository cannot be a fork.The returned metrics include an overall health score, the repository description, the presence of documentation, thedetected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,README, and CONTRIBUTING files.The `health_percentage` score is defined as a percentage of how many ofthe recommended community health files are present. For more information, see"[About community profiles for public repositories](https://docs.github.com/enterprise-cloud@latest//communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories)."`content_reports_enabled` is only returned for organization-owned repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCommunityProfileRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCommunityProfileRequestBuilder when successful +func (m *ItemItemCommunityProfileRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommunityProfileRequestBuilder) { + return NewItemItemCommunityProfileRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_community_request_builder.go b/pkg/github/repos/item_item_community_request_builder.go new file mode 100644 index 0000000..abd3925 --- /dev/null +++ b/pkg/github/repos/item_item_community_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCommunityRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\community +type ItemItemCommunityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCommunityRequestBuilderInternal instantiates a new ItemItemCommunityRequestBuilder and sets the default values. +func NewItemItemCommunityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommunityRequestBuilder) { + m := &ItemItemCommunityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/community", pathParameters), + } + return m +} +// NewItemItemCommunityRequestBuilder instantiates a new ItemItemCommunityRequestBuilder and sets the default values. +func NewItemItemCommunityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommunityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommunityRequestBuilderInternal(urlParams, requestAdapter) +} +// Profile the profile property +// returns a *ItemItemCommunityProfileRequestBuilder when successful +func (m *ItemItemCommunityRequestBuilder) Profile()(*ItemItemCommunityProfileRequestBuilder) { + return NewItemItemCommunityProfileRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_compare_request_builder.go b/pkg/github/repos/item_item_compare_request_builder.go new file mode 100644 index 0000000..71d97ba --- /dev/null +++ b/pkg/github/repos/item_item_compare_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCompareRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\compare +type ItemItemCompareRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByBasehead gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.compare.item collection +// returns a *ItemItemCompareWithBaseheadItemRequestBuilder when successful +func (m *ItemItemCompareRequestBuilder) ByBasehead(basehead string)(*ItemItemCompareWithBaseheadItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if basehead != "" { + urlTplParams["basehead"] = basehead + } + return NewItemItemCompareWithBaseheadItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCompareRequestBuilderInternal instantiates a new ItemItemCompareRequestBuilder and sets the default values. +func NewItemItemCompareRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCompareRequestBuilder) { + m := &ItemItemCompareRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/compare", pathParameters), + } + return m +} +// NewItemItemCompareRequestBuilder instantiates a new ItemItemCompareRequestBuilder and sets the default values. +func NewItemItemCompareRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCompareRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCompareRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go new file mode 100644 index 0000000..3b44e7d --- /dev/null +++ b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go @@ -0,0 +1,72 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemCompareWithBaseheadItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\compare\{basehead} +type ItemItemCompareWithBaseheadItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +type ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemCompareWithBaseheadItemRequestBuilderInternal instantiates a new ItemItemCompareWithBaseheadItemRequestBuilder and sets the default values. +func NewItemItemCompareWithBaseheadItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCompareWithBaseheadItemRequestBuilder) { + m := &ItemItemCompareWithBaseheadItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/compare/{basehead}{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCompareWithBaseheadItemRequestBuilder instantiates a new ItemItemCompareWithBaseheadItemRequestBuilder and sets the default values. +func NewItemItemCompareWithBaseheadItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCompareWithBaseheadItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCompareWithBaseheadItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a CommitComparisonable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// returns a CommitComparison503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#compare-two-commits +func (m *ItemItemCompareWithBaseheadItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitComparisonable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitComparison503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitComparisonFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitComparisonable), nil +} +// ToGetRequestInformation compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemCompareWithBaseheadItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCompareWithBaseheadItemRequestBuilder when successful +func (m *ItemItemCompareWithBaseheadItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCompareWithBaseheadItemRequestBuilder) { + return NewItemItemCompareWithBaseheadItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_contents_item_with_path_delete_request_body.go b/pkg/github/repos/item_item_contents_item_with_path_delete_request_body.go new file mode 100644 index 0000000..4440e95 --- /dev/null +++ b/pkg/github/repos/item_item_contents_item_with_path_delete_request_body.go @@ -0,0 +1,196 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemContentsItemWithPathDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // object containing information about the author. + author ItemItemContentsItemWithPathDeleteRequestBody_authorable + // The branch name. Default: the repository’s default branch + branch *string + // object containing information about the committer. + committer ItemItemContentsItemWithPathDeleteRequestBody_committerable + // The commit message. + message *string + // The blob SHA of the file being deleted. + sha *string +} +// NewItemItemContentsItemWithPathDeleteRequestBody instantiates a new ItemItemContentsItemWithPathDeleteRequestBody and sets the default values. +func NewItemItemContentsItemWithPathDeleteRequestBody()(*ItemItemContentsItemWithPathDeleteRequestBody) { + m := &ItemItemContentsItemWithPathDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemContentsItemWithPathDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemContentsItemWithPathDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemContentsItemWithPathDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. object containing information about the author. +// returns a ItemItemContentsItemWithPathDeleteRequestBody_authorable when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetAuthor()(ItemItemContentsItemWithPathDeleteRequestBody_authorable) { + return m.author +} +// GetBranch gets the branch property value. The branch name. Default: the repository’s default branch +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetBranch()(*string) { + return m.branch +} +// GetCommitter gets the committer property value. object containing information about the committer. +// returns a ItemItemContentsItemWithPathDeleteRequestBody_committerable when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetCommitter()(ItemItemContentsItemWithPathDeleteRequestBody_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemContentsItemWithPathDeleteRequestBody_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(ItemItemContentsItemWithPathDeleteRequestBody_authorable)) + } + return nil + } + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemContentsItemWithPathDeleteRequestBody_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(ItemItemContentsItemWithPathDeleteRequestBody_committerable)) + } + 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 + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The commit message. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetMessage()(*string) { + return m.message +} +// GetSha gets the sha property value. The blob SHA of the file being deleted. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ItemItemContentsItemWithPathDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branch", m.GetBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ItemItemContentsItemWithPathDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. object containing information about the author. +func (m *ItemItemContentsItemWithPathDeleteRequestBody) SetAuthor(value ItemItemContentsItemWithPathDeleteRequestBody_authorable)() { + m.author = value +} +// SetBranch sets the branch property value. The branch name. Default: the repository’s default branch +func (m *ItemItemContentsItemWithPathDeleteRequestBody) SetBranch(value *string)() { + m.branch = value +} +// SetCommitter sets the committer property value. object containing information about the committer. +func (m *ItemItemContentsItemWithPathDeleteRequestBody) SetCommitter(value ItemItemContentsItemWithPathDeleteRequestBody_committerable)() { + m.committer = value +} +// SetMessage sets the message property value. The commit message. +func (m *ItemItemContentsItemWithPathDeleteRequestBody) SetMessage(value *string)() { + m.message = value +} +// SetSha sets the sha property value. The blob SHA of the file being deleted. +func (m *ItemItemContentsItemWithPathDeleteRequestBody) SetSha(value *string)() { + m.sha = value +} +type ItemItemContentsItemWithPathDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(ItemItemContentsItemWithPathDeleteRequestBody_authorable) + GetBranch()(*string) + GetCommitter()(ItemItemContentsItemWithPathDeleteRequestBody_committerable) + GetMessage()(*string) + GetSha()(*string) + SetAuthor(value ItemItemContentsItemWithPathDeleteRequestBody_authorable)() + SetBranch(value *string)() + SetCommitter(value ItemItemContentsItemWithPathDeleteRequestBody_committerable)() + SetMessage(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/repos/item_item_contents_item_with_path_delete_request_body_author.go b/pkg/github/repos/item_item_contents_item_with_path_delete_request_body_author.go new file mode 100644 index 0000000..329e76f --- /dev/null +++ b/pkg/github/repos/item_item_contents_item_with_path_delete_request_body_author.go @@ -0,0 +1,110 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemContentsItemWithPathDeleteRequestBody_author object containing information about the author. +type ItemItemContentsItemWithPathDeleteRequestBody_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email of the author (or committer) of the commit + email *string + // The name of the author (or committer) of the commit + name *string +} +// NewItemItemContentsItemWithPathDeleteRequestBody_author instantiates a new ItemItemContentsItemWithPathDeleteRequestBody_author and sets the default values. +func NewItemItemContentsItemWithPathDeleteRequestBody_author()(*ItemItemContentsItemWithPathDeleteRequestBody_author) { + m := &ItemItemContentsItemWithPathDeleteRequestBody_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemContentsItemWithPathDeleteRequestBody_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemContentsItemWithPathDeleteRequestBody_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemContentsItemWithPathDeleteRequestBody_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemContentsItemWithPathDeleteRequestBody_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email of the author (or committer) of the commit +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author (or committer) of the commit +func (m *ItemItemContentsItemWithPathDeleteRequestBody_author) SetName(value *string)() { + m.name = value +} +type ItemItemContentsItemWithPathDeleteRequestBody_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_contents_item_with_path_delete_request_body_committer.go b/pkg/github/repos/item_item_contents_item_with_path_delete_request_body_committer.go new file mode 100644 index 0000000..12d49e5 --- /dev/null +++ b/pkg/github/repos/item_item_contents_item_with_path_delete_request_body_committer.go @@ -0,0 +1,110 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemContentsItemWithPathDeleteRequestBody_committer object containing information about the committer. +type ItemItemContentsItemWithPathDeleteRequestBody_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The email of the author (or committer) of the commit + email *string + // The name of the author (or committer) of the commit + name *string +} +// NewItemItemContentsItemWithPathDeleteRequestBody_committer instantiates a new ItemItemContentsItemWithPathDeleteRequestBody_committer and sets the default values. +func NewItemItemContentsItemWithPathDeleteRequestBody_committer()(*ItemItemContentsItemWithPathDeleteRequestBody_committer) { + m := &ItemItemContentsItemWithPathDeleteRequestBody_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemContentsItemWithPathDeleteRequestBody_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemContentsItemWithPathDeleteRequestBody_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemContentsItemWithPathDeleteRequestBody_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmail gets the email property value. The email of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemContentsItemWithPathDeleteRequestBody_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmail sets the email property value. The email of the author (or committer) of the commit +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author (or committer) of the commit +func (m *ItemItemContentsItemWithPathDeleteRequestBody_committer) SetName(value *string)() { + m.name = value +} +type ItemItemContentsItemWithPathDeleteRequestBody_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_contents_item_with_path_put_request_body.go b/pkg/github/repos/item_item_contents_item_with_path_put_request_body.go new file mode 100644 index 0000000..865ae58 --- /dev/null +++ b/pkg/github/repos/item_item_contents_item_with_path_put_request_body.go @@ -0,0 +1,225 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemContentsItemWithPathPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + author ItemItemContentsItemWithPathPutRequestBody_authorable + // The branch name. Default: the repository’s default branch. + branch *string + // The person that committed the file. Default: the authenticated user. + committer ItemItemContentsItemWithPathPutRequestBody_committerable + // The new file content, using Base64 encoding. + content *string + // The commit message. + message *string + // **Required if you are updating a file**. The blob SHA of the file being replaced. + sha *string +} +// NewItemItemContentsItemWithPathPutRequestBody instantiates a new ItemItemContentsItemWithPathPutRequestBody and sets the default values. +func NewItemItemContentsItemWithPathPutRequestBody()(*ItemItemContentsItemWithPathPutRequestBody) { + m := &ItemItemContentsItemWithPathPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemContentsItemWithPathPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemContentsItemWithPathPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemContentsItemWithPathPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. +// returns a ItemItemContentsItemWithPathPutRequestBody_authorable when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetAuthor()(ItemItemContentsItemWithPathPutRequestBody_authorable) { + return m.author +} +// GetBranch gets the branch property value. The branch name. Default: the repository’s default branch. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetBranch()(*string) { + return m.branch +} +// GetCommitter gets the committer property value. The person that committed the file. Default: the authenticated user. +// returns a ItemItemContentsItemWithPathPutRequestBody_committerable when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetCommitter()(ItemItemContentsItemWithPathPutRequestBody_committerable) { + return m.committer +} +// GetContent gets the content property value. The new file content, using Base64 encoding. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetContent()(*string) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemContentsItemWithPathPutRequestBody_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(ItemItemContentsItemWithPathPutRequestBody_authorable)) + } + return nil + } + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemContentsItemWithPathPutRequestBody_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(ItemItemContentsItemWithPathPutRequestBody_committerable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(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 + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The commit message. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetMessage()(*string) { + return m.message +} +// GetSha gets the sha property value. **Required if you are updating a file**. The blob SHA of the file being replaced. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ItemItemContentsItemWithPathPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("branch", m.GetBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ItemItemContentsItemWithPathPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. +func (m *ItemItemContentsItemWithPathPutRequestBody) SetAuthor(value ItemItemContentsItemWithPathPutRequestBody_authorable)() { + m.author = value +} +// SetBranch sets the branch property value. The branch name. Default: the repository’s default branch. +func (m *ItemItemContentsItemWithPathPutRequestBody) SetBranch(value *string)() { + m.branch = value +} +// SetCommitter sets the committer property value. The person that committed the file. Default: the authenticated user. +func (m *ItemItemContentsItemWithPathPutRequestBody) SetCommitter(value ItemItemContentsItemWithPathPutRequestBody_committerable)() { + m.committer = value +} +// SetContent sets the content property value. The new file content, using Base64 encoding. +func (m *ItemItemContentsItemWithPathPutRequestBody) SetContent(value *string)() { + m.content = value +} +// SetMessage sets the message property value. The commit message. +func (m *ItemItemContentsItemWithPathPutRequestBody) SetMessage(value *string)() { + m.message = value +} +// SetSha sets the sha property value. **Required if you are updating a file**. The blob SHA of the file being replaced. +func (m *ItemItemContentsItemWithPathPutRequestBody) SetSha(value *string)() { + m.sha = value +} +type ItemItemContentsItemWithPathPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(ItemItemContentsItemWithPathPutRequestBody_authorable) + GetBranch()(*string) + GetCommitter()(ItemItemContentsItemWithPathPutRequestBody_committerable) + GetContent()(*string) + GetMessage()(*string) + GetSha()(*string) + SetAuthor(value ItemItemContentsItemWithPathPutRequestBody_authorable)() + SetBranch(value *string)() + SetCommitter(value ItemItemContentsItemWithPathPutRequestBody_committerable)() + SetContent(value *string)() + SetMessage(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/repos/item_item_contents_item_with_path_put_request_body_author.go b/pkg/github/repos/item_item_contents_item_with_path_put_request_body_author.go new file mode 100644 index 0000000..698132c --- /dev/null +++ b/pkg/github/repos/item_item_contents_item_with_path_put_request_body_author.go @@ -0,0 +1,139 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemContentsItemWithPathPutRequestBody_author the author of the file. Default: The `committer` or the authenticated user if you omit `committer`. +type ItemItemContentsItemWithPathPutRequestBody_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. + email *string + // The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. + name *string +} +// NewItemItemContentsItemWithPathPutRequestBody_author instantiates a new ItemItemContentsItemWithPathPutRequestBody_author and sets the default values. +func NewItemItemContentsItemWithPathPutRequestBody_author()(*ItemItemContentsItemWithPathPutRequestBody_author) { + m := &ItemItemContentsItemWithPathPutRequestBody_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemContentsItemWithPathPutRequestBody_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemContentsItemWithPathPutRequestBody_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemContentsItemWithPathPutRequestBody_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_author) GetDate()(*string) { + return m.date +} +// GetEmail gets the email property value. The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemContentsItemWithPathPutRequestBody_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemContentsItemWithPathPutRequestBody_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *ItemItemContentsItemWithPathPutRequestBody_author) SetDate(value *string)() { + m.date = value +} +// SetEmail sets the email property value. The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. +func (m *ItemItemContentsItemWithPathPutRequestBody_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. +func (m *ItemItemContentsItemWithPathPutRequestBody_author) SetName(value *string)() { + m.name = value +} +type ItemItemContentsItemWithPathPutRequestBody_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetEmail()(*string) + GetName()(*string) + SetDate(value *string)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_contents_item_with_path_put_request_body_committer.go b/pkg/github/repos/item_item_contents_item_with_path_put_request_body_committer.go new file mode 100644 index 0000000..10461c7 --- /dev/null +++ b/pkg/github/repos/item_item_contents_item_with_path_put_request_body_committer.go @@ -0,0 +1,139 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemContentsItemWithPathPutRequestBody_committer the person that committed the file. Default: the authenticated user. +type ItemItemContentsItemWithPathPutRequestBody_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date property + date *string + // The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. + email *string + // The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. + name *string +} +// NewItemItemContentsItemWithPathPutRequestBody_committer instantiates a new ItemItemContentsItemWithPathPutRequestBody_committer and sets the default values. +func NewItemItemContentsItemWithPathPutRequestBody_committer()(*ItemItemContentsItemWithPathPutRequestBody_committer) { + m := &ItemItemContentsItemWithPathPutRequestBody_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemContentsItemWithPathPutRequestBody_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemContentsItemWithPathPutRequestBody_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemContentsItemWithPathPutRequestBody_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. The date property +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) GetDate()(*string) { + return m.date +} +// GetEmail gets the email property value. The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. +// returns a *string when successful +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemContentsItemWithPathPutRequestBody_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. The date property +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) SetDate(value *string)() { + m.date = value +} +// SetEmail sets the email property value. The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. +func (m *ItemItemContentsItemWithPathPutRequestBody_committer) SetName(value *string)() { + m.name = value +} +type ItemItemContentsItemWithPathPutRequestBody_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetEmail()(*string) + GetName()(*string) + SetDate(value *string)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_contents_request_builder.go b/pkg/github/repos/item_item_contents_request_builder.go new file mode 100644 index 0000000..6b63f32 --- /dev/null +++ b/pkg/github/repos/item_item_contents_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemContentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\contents +type ItemItemContentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByPath gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.contents.item collection +// returns a *ItemItemContentsWithPathItemRequestBuilder when successful +func (m *ItemItemContentsRequestBuilder) ByPath(path string)(*ItemItemContentsWithPathItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if path != "" { + urlTplParams["path"] = path + } + return NewItemItemContentsWithPathItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemContentsRequestBuilderInternal instantiates a new ItemItemContentsRequestBuilder and sets the default values. +func NewItemItemContentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemContentsRequestBuilder) { + m := &ItemItemContentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents", pathParameters), + } + return m +} +// NewItemItemContentsRequestBuilder instantiates a new ItemItemContentsRequestBuilder and sets the default values. +func NewItemItemContentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemContentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemContentsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_contents_with_path_item_request_builder.go b/pkg/github/repos/item_item_contents_with_path_item_request_builder.go new file mode 100644 index 0000000..a9aeaa4 --- /dev/null +++ b/pkg/github/repos/item_item_contents_with_path_item_request_builder.go @@ -0,0 +1,286 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemContentsWithPathItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\contents\{path} +type ItemItemContentsWithPathItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemContentsWithPathItemRequestBuilderGetQueryParameters gets the contents of a file or directory in a repository. Specify the file path or directory with the `path` parameter. If you omit the `path` parameter, you will receive the contents of the repository's root directory.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents for files and symlinks.- **`application/vnd.github.html+json`**: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).- **`application/vnd.github.object+json`**: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an `entries` attribute containing the array of objects.If the content is a directory, the response will be an array of objects, one object for each item in the directory. When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule".If the content is a symlink and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself.If the content is a submodule, the `submodule_git_url` field identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values.**Notes**:- To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree).- This API has an upper limit of 1,000 files for a directory. If you need to retrievemore files, use the [Git Trees API](https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree).- Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.- If the requested file's size is: - 1 MB or smaller: All features of this endpoint are supported. - Between 1-100 MB: Only the `raw` or `object` custom media types are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an emptystring and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. - Greater than 100 MB: This endpoint is not supported. +type ItemItemContentsWithPathItemRequestBuilderGetQueryParameters struct { + // The name of the commit/branch/tag. Default: the repository’s default branch. + Ref *string `uriparametername:"ref"` +} +// WithPathGetResponse composed type wrapper for classes i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable, []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able +type WithPathGetResponse struct { + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable + contentFile i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable + contentSubmodule i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable + contentSymlink i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable + // Composed type representation for type []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able + withPathGetResponseMember1 []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able +} +// NewWithPathGetResponse instantiates a new WithPathGetResponse and sets the default values. +func NewWithPathGetResponse()(*WithPathGetResponse) { + m := &WithPathGetResponse{ + } + return m +} +// CreateWithPathGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWithPathGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWithPathGetResponse() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWithPathGetResponseMember1FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able) + } + } + result.SetWithPathGetResponseMember1(cast) + } + return result, nil +} +// GetContentFile gets the contentFile property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable +// returns a ContentFileable when successful +func (m *WithPathGetResponse) GetContentFile()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable) { + return m.contentFile +} +// GetContentSubmodule gets the contentSubmodule property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable +// returns a ContentSubmoduleable when successful +func (m *WithPathGetResponse) GetContentSubmodule()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable) { + return m.contentSubmodule +} +// GetContentSymlink gets the contentSymlink property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable +// returns a ContentSymlinkable when successful +func (m *WithPathGetResponse) GetContentSymlink()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable) { + return m.contentSymlink +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WithPathGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WithPathGetResponse) GetIsComposedType()(bool) { + return true +} +// GetWithPathGetResponseMember1 gets the WithPathGetResponseMember1 property value. Composed type representation for type []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able +// returns a []WithPathGetResponseMember1able when successful +func (m *WithPathGetResponse) GetWithPathGetResponseMember1()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able) { + return m.withPathGetResponseMember1 +} +// Serialize serializes information the current object +func (m *WithPathGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContentFile() != nil { + err := writer.WriteObjectValue("", m.GetContentFile()) + if err != nil { + return err + } + } else if m.GetContentSubmodule() != nil { + err := writer.WriteObjectValue("", m.GetContentSubmodule()) + if err != nil { + return err + } + } else if m.GetContentSymlink() != nil { + err := writer.WriteObjectValue("", m.GetContentSymlink()) + if err != nil { + return err + } + } else if m.GetWithPathGetResponseMember1() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWithPathGetResponseMember1())) + for i, v := range m.GetWithPathGetResponseMember1() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } + return nil +} +// SetContentFile sets the contentFile property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable +func (m *WithPathGetResponse) SetContentFile(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable)() { + m.contentFile = value +} +// SetContentSubmodule sets the contentSubmodule property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable +func (m *WithPathGetResponse) SetContentSubmodule(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable)() { + m.contentSubmodule = value +} +// SetContentSymlink sets the contentSymlink property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable +func (m *WithPathGetResponse) SetContentSymlink(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable)() { + m.contentSymlink = value +} +// SetWithPathGetResponseMember1 sets the WithPathGetResponseMember1 property value. Composed type representation for type []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able +func (m *WithPathGetResponse) SetWithPathGetResponseMember1(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able)() { + m.withPathGetResponseMember1 = value +} +type WithPathGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentFile()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable) + GetContentSubmodule()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable) + GetContentSymlink()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable) + GetWithPathGetResponseMember1()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able) + SetContentFile(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable)() + SetContentSubmodule(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSubmoduleable)() + SetContentSymlink(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentSymlinkable)() + SetWithPathGetResponseMember1(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WithPathGetResponseMember1able)() +} +// NewItemItemContentsWithPathItemRequestBuilderInternal instantiates a new ItemItemContentsWithPathItemRequestBuilder and sets the default values. +func NewItemItemContentsWithPathItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemContentsWithPathItemRequestBuilder) { + m := &ItemItemContentsWithPathItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents/{path}{?ref*}", pathParameters), + } + return m +} +// NewItemItemContentsWithPathItemRequestBuilder instantiates a new ItemItemContentsWithPathItemRequestBuilder and sets the default values. +func NewItemItemContentsWithPathItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemContentsWithPathItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemContentsWithPathItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a file in a repository.You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.**Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-cloud@latest//rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. +// returns a FileCommitable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a FileCommit503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#delete-a-file +func (m *ItemItemContentsWithPathItemRequestBuilder) Delete(ctx context.Context, body ItemItemContentsItemWithPathDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FileCommitable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFileCommit503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFileCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FileCommitable), nil +} +// Get gets the contents of a file or directory in a repository. Specify the file path or directory with the `path` parameter. If you omit the `path` parameter, you will receive the contents of the repository's root directory.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents for files and symlinks.- **`application/vnd.github.html+json`**: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).- **`application/vnd.github.object+json`**: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an `entries` attribute containing the array of objects.If the content is a directory, the response will be an array of objects, one object for each item in the directory. When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule".If the content is a symlink and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself.If the content is a submodule, the `submodule_git_url` field identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values.**Notes**:- To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree).- This API has an upper limit of 1,000 files for a directory. If you need to retrievemore files, use the [Git Trees API](https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree).- Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.- If the requested file's size is: - 1 MB or smaller: All features of this endpoint are supported. - Between 1-100 MB: Only the `raw` or `object` custom media types are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an emptystring and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. - Greater than 100 MB: This endpoint is not supported. +// returns a WithPathGetResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#get-repository-content +func (m *ItemItemContentsWithPathItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemContentsWithPathItemRequestBuilderGetQueryParameters])(WithPathGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateWithPathGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(WithPathGetResponseable), nil +} +// Put creates a new file or replaces an existing file in a repository.**Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-cloud@latest//rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. +// returns a FileCommitable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#create-or-update-file-contents +func (m *ItemItemContentsWithPathItemRequestBuilder) Put(ctx context.Context, body ItemItemContentsItemWithPathPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FileCommitable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFileCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FileCommitable), nil +} +// ToDeleteRequestInformation deletes a file in a repository.You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.**Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-cloud@latest//rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. +// returns a *RequestInformation when successful +func (m *ItemItemContentsWithPathItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemContentsItemWithPathDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation gets the contents of a file or directory in a repository. Specify the file path or directory with the `path` parameter. If you omit the `path` parameter, you will receive the contents of the repository's root directory.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents for files and symlinks.- **`application/vnd.github.html+json`**: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).- **`application/vnd.github.object+json`**: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an `entries` attribute containing the array of objects.If the content is a directory, the response will be an array of objects, one object for each item in the directory. When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule".If the content is a symlink and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself.If the content is a submodule, the `submodule_git_url` field identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values.**Notes**:- To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree).- This API has an upper limit of 1,000 files for a directory. If you need to retrievemore files, use the [Git Trees API](https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree).- Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.- If the requested file's size is: - 1 MB or smaller: All features of this endpoint are supported. - Between 1-100 MB: Only the `raw` or `object` custom media types are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an emptystring and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. - Greater than 100 MB: This endpoint is not supported. +// returns a *RequestInformation when successful +func (m *ItemItemContentsWithPathItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemContentsWithPathItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates a new file or replaces an existing file in a repository.**Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-cloud@latest//rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. +// returns a *RequestInformation when successful +func (m *ItemItemContentsWithPathItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemContentsItemWithPathPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemContentsWithPathItemRequestBuilder when successful +func (m *ItemItemContentsWithPathItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemContentsWithPathItemRequestBuilder) { + return NewItemItemContentsWithPathItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_contributors_request_builder.go b/pkg/github/repos/item_item_contributors_request_builder.go new file mode 100644 index 0000000..7a452af --- /dev/null +++ b/pkg/github/repos/item_item_contributors_request_builder.go @@ -0,0 +1,75 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemContributorsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\contributors +type ItemItemContributorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemContributorsRequestBuilderGetQueryParameters lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. +type ItemItemContributorsRequestBuilderGetQueryParameters struct { + // Set to `1` or `true` to include anonymous contributors in results. + Anon *string `uriparametername:"anon"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemContributorsRequestBuilderInternal instantiates a new ItemItemContributorsRequestBuilder and sets the default values. +func NewItemItemContributorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemContributorsRequestBuilder) { + m := &ItemItemContributorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contributors{?anon*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemContributorsRequestBuilder instantiates a new ItemItemContributorsRequestBuilder and sets the default values. +func NewItemItemContributorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemContributorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemContributorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. +// returns a []Contributorable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-contributors +func (m *ItemItemContributorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemContributorsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Contributorable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateContributorFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Contributorable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Contributorable) + } + } + return val, nil +} +// ToGetRequestInformation lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. +// returns a *RequestInformation when successful +func (m *ItemItemContributorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemContributorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemContributorsRequestBuilder when successful +func (m *ItemItemContributorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemContributorsRequestBuilder) { + return NewItemItemContributorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependabot_alerts_item_with_alert_number_patch_request_body.go b/pkg/github/repos/item_item_dependabot_alerts_item_with_alert_number_patch_request_body.go new file mode 100644 index 0000000..60e7716 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_alerts_item_with_alert_number_patch_request_body.go @@ -0,0 +1,61 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody struct { + // An optional comment associated with dismissing the alert. + dismissed_comment *string +} +// NewItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody instantiates a new ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody and sets the default values. +func NewItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody()(*ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody) { + m := &ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody{ + } + return m +} +// CreateItemItemDependabotAlertsItemWithAlert_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDependabotAlertsItemWithAlert_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody(), nil +} +// GetDismissedComment gets the dismissed_comment property value. An optional comment associated with dismissing the alert. +// returns a *string when successful +func (m *ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody) GetDismissedComment()(*string) { + return m.dismissed_comment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dismissed_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDismissedComment(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dismissed_comment", m.GetDismissedComment()) + if err != nil { + return err + } + } + return nil +} +// SetDismissedComment sets the dismissed_comment property value. An optional comment associated with dismissing the alert. +func (m *ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBody) SetDismissedComment(value *string)() { + m.dismissed_comment = value +} +type ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDismissedComment()(*string) + SetDismissedComment(value *string)() +} diff --git a/pkg/github/repos/item_item_dependabot_alerts_request_builder.go b/pkg/github/repos/item_item_dependabot_alerts_request_builder.go new file mode 100644 index 0000000..eca76cf --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_alerts_request_builder.go @@ -0,0 +1,115 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ia923be11ce5ebc3a458be409140439c7fb35124f1d0ecdd2442c934d7434365e "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/dependabot/alerts" +) + +// ItemItemDependabotAlertsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\alerts +type ItemItemDependabotAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemDependabotAlertsRequestBuilderGetQueryParameters oAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +type ItemItemDependabotAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *ia923be11ce5ebc3a458be409140439c7fb35124f1d0ecdd2442c934d7434365e.GetDirectionQueryParameterType `uriparametername:"direction"` + // A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + Ecosystem *string `uriparametername:"ecosystem"` + // **Deprecated**. The number of results per page (max 100), starting from the first matching result.This parameter must not be used in combination with `last`.Instead, use `per_page` in combination with `after` to fetch the first page of results. + First *int32 `uriparametername:"first"` + // **Deprecated**. The number of results per page (max 100), starting from the last matching result.This parameter must not be used in combination with `first`.Instead, use `per_page` in combination with `before` to fetch the last page of results. + Last *int32 `uriparametername:"last"` + // A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. + Manifest *string `uriparametername:"manifest"` + // A comma-separated list of package names. If specified, only alerts for these packages will be returned. + Package *string `uriparametername:"package"` + // **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. + // Deprecated: + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + // Deprecated: + Per_page *int32 `uriparametername:"per_page"` + // The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + Scope *ia923be11ce5ebc3a458be409140439c7fb35124f1d0ecdd2442c934d7434365e.GetScopeQueryParameterType `uriparametername:"scope"` + // A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` + Severity *string `uriparametername:"severity"` + // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed. + Sort *ia923be11ce5ebc3a458be409140439c7fb35124f1d0ecdd2442c934d7434365e.GetSortQueryParameterType `uriparametername:"sort"` + // A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` + State *string `uriparametername:"state"` +} +// ByAlert_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.dependabot.alerts.item collection +// returns a *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder when successful +func (m *ItemItemDependabotAlertsRequestBuilder) ByAlert_number(alert_number int32)(*ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["alert_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(alert_number), 10) + return NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDependabotAlertsRequestBuilderInternal instantiates a new ItemItemDependabotAlertsRequestBuilder and sets the default values. +func NewItemItemDependabotAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotAlertsRequestBuilder) { + m := &ItemItemDependabotAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts{?after*,before*,direction*,ecosystem*,first*,last*,manifest*,package*,page*,per_page*,scope*,severity*,sort*,state*}", pathParameters), + } + return m +} +// NewItemItemDependabotAlertsRequestBuilder instantiates a new ItemItemDependabotAlertsRequestBuilder and sets the default values. +func NewItemItemDependabotAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependabotAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get oAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a []DependabotAlertable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts#list-dependabot-alerts-for-a-repository +func (m *ItemItemDependabotAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDependabotAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable) + } + } + return val, nil +} +// ToGetRequestInformation oAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDependabotAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependabotAlertsRequestBuilder when successful +func (m *ItemItemDependabotAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependabotAlertsRequestBuilder) { + return NewItemItemDependabotAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependabot_alerts_with_alert_number_item_request_builder.go b/pkg/github/repos/item_item_dependabot_alerts_with_alert_number_item_request_builder.go new file mode 100644 index 0000000..35442a7 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_alerts_with_alert_number_item_request_builder.go @@ -0,0 +1,106 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\alerts\{alert_number} +type ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilderInternal instantiates a new ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder and sets the default values. +func NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) { + m := &ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts/{alert_number}", pathParameters), + } + return m +} +// NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilder instantiates a new ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder and sets the default values. +func NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get oAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a DependabotAlertable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts#get-a-dependabot-alert +func (m *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable), nil +} +// Patch the authenticated user must have access to security alerts for the repository to use this endpoint. For more information, see "[Granting access to security alerts](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)."OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a DependabotAlertable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/alerts#update-a-dependabot-alert +func (m *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) Patch(ctx context.Context, body ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotAlertable), nil +} +// ToGetRequestInformation oAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation the authenticated user must have access to security alerts for the repository to use this endpoint. For more information, see "[Granting access to security alerts](https://docs.github.com/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)."OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemDependabotAlertsItemWithAlert_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder when successful +func (m *ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependabotAlertsWithAlert_numberItemRequestBuilder) { + return NewItemItemDependabotAlertsWithAlert_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependabot_request_builder.go b/pkg/github/repos/item_item_dependabot_request_builder.go new file mode 100644 index 0000000..ca39c11 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_request_builder.go @@ -0,0 +1,33 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemDependabotRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot +type ItemItemDependabotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemItemDependabotAlertsRequestBuilder when successful +func (m *ItemItemDependabotRequestBuilder) Alerts()(*ItemItemDependabotAlertsRequestBuilder) { + return NewItemItemDependabotAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDependabotRequestBuilderInternal instantiates a new ItemItemDependabotRequestBuilder and sets the default values. +func NewItemItemDependabotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotRequestBuilder) { + m := &ItemItemDependabotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot", pathParameters), + } + return m +} +// NewItemItemDependabotRequestBuilder instantiates a new ItemItemDependabotRequestBuilder and sets the default values. +func NewItemItemDependabotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependabotRequestBuilderInternal(urlParams, requestAdapter) +} +// Secrets the secrets property +// returns a *ItemItemDependabotSecretsRequestBuilder when successful +func (m *ItemItemDependabotRequestBuilder) Secrets()(*ItemItemDependabotSecretsRequestBuilder) { + return NewItemItemDependabotSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_dependabot_secrets_get_response.go b/pkg/github/repos/item_item_dependabot_secrets_get_response.go new file mode 100644 index 0000000..006d267 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_secrets_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemDependabotSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable + // The total_count property + total_count *int32 +} +// NewItemItemDependabotSecretsGetResponse instantiates a new ItemItemDependabotSecretsGetResponse and sets the default values. +func NewItemItemDependabotSecretsGetResponse()(*ItemItemDependabotSecretsGetResponse) { + m := &ItemItemDependabotSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemDependabotSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDependabotSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDependabotSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDependabotSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDependabotSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []DependabotSecretable when successful +func (m *ItemItemDependabotSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemDependabotSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemDependabotSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemDependabotSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemItemDependabotSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemDependabotSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemDependabotSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_dependabot_secrets_item_with_secret_name_put_request_body.go b/pkg/github/repos/item_item_dependabot_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..ffd6804 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemDependabotSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-a-repository-public-key) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string +} +// NewItemItemDependabotSecretsItemWithSecret_namePutRequestBody instantiates a new ItemItemDependabotSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemItemDependabotSecretsItemWithSecret_namePutRequestBody()(*ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) { + m := &ItemItemDependabotSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemDependabotSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDependabotSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDependabotSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-a-repository-public-key) endpoint. +// returns a *string when successful +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// Serialize serializes information the current object +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + 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 *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-a-repository-public-key) endpoint. +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *ItemItemDependabotSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +type ItemItemDependabotSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() +} diff --git a/pkg/github/repos/item_item_dependabot_secrets_public_key_request_builder.go b/pkg/github/repos/item_item_dependabot_secrets_public_key_request_builder.go new file mode 100644 index 0000000..468a2a2 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDependabotSecretsPublicKeyRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\secrets\public-key +type ItemItemDependabotSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDependabotSecretsPublicKeyRequestBuilderInternal instantiates a new ItemItemDependabotSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemDependabotSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotSecretsPublicKeyRequestBuilder) { + m := &ItemItemDependabotSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets/public-key", pathParameters), + } + return m +} +// NewItemItemDependabotSecretsPublicKeyRequestBuilder instantiates a new ItemItemDependabotSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemDependabotSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependabotSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets. Anyone with read accessto the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private. +// returns a DependabotPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-a-repository-public-key +func (m *ItemItemDependabotSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotPublicKeyable), nil +} +// ToGetRequestInformation gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets. Anyone with read accessto the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependabotSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemDependabotSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependabotSecretsPublicKeyRequestBuilder) { + return NewItemItemDependabotSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependabot_secrets_request_builder.go b/pkg/github/repos/item_item_dependabot_secrets_request_builder.go new file mode 100644 index 0000000..0f499aa --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_secrets_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemDependabotSecretsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\secrets +type ItemItemDependabotSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemDependabotSecretsRequestBuilderGetQueryParameters lists all secrets available in a repository without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemDependabotSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.dependabot.secrets.item collection +// returns a *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemDependabotSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDependabotSecretsRequestBuilderInternal instantiates a new ItemItemDependabotSecretsRequestBuilder and sets the default values. +func NewItemItemDependabotSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotSecretsRequestBuilder) { + m := &ItemItemDependabotSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemDependabotSecretsRequestBuilder instantiates a new ItemItemDependabotSecretsRequestBuilder and sets the default values. +func NewItemItemDependabotSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependabotSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all secrets available in a repository without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemDependabotSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#list-repository-secrets +func (m *ItemItemDependabotSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDependabotSecretsRequestBuilderGetQueryParameters])(ItemItemDependabotSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemDependabotSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemDependabotSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemItemDependabotSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemDependabotSecretsRequestBuilder) PublicKey()(*ItemItemDependabotSecretsPublicKeyRequestBuilder) { + return NewItemItemDependabotSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all secrets available in a repository without revealing their encryptedvalues.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDependabotSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependabotSecretsRequestBuilder when successful +func (m *ItemItemDependabotSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependabotSecretsRequestBuilder) { + return NewItemItemDependabotSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependabot_secrets_with_secret_name_item_request_builder.go b/pkg/github/repos/item_item_dependabot_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..d93ca45 --- /dev/null +++ b/pkg/github/repos/item_item_dependabot_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\secrets\{secret_name} +type ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a secret in a repository using the secret name.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#delete-a-repository-secret +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a single repository secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a DependabotSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#get-a-repository-secret +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependabotSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependabotSecretable), nil +} +// Put creates or updates a repository secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependabot/secrets#create-or-update-a-repository-secret +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemItemDependabotSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToDeleteRequestInformation deletes a secret in a repository using the secret name.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a single repository secret without revealing its encrypted value.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates a repository secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemDependabotSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependabotSecretsWithSecret_nameItemRequestBuilder) { + return NewItemItemDependabotSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependency_graph_compare_request_builder.go b/pkg/github/repos/item_item_dependency_graph_compare_request_builder.go new file mode 100644 index 0000000..dfcee64 --- /dev/null +++ b/pkg/github/repos/item_item_dependency_graph_compare_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemDependencyGraphCompareRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\compare +type ItemItemDependencyGraphCompareRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByBasehead gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.dependencyGraph.compare.item collection +// returns a *ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder when successful +func (m *ItemItemDependencyGraphCompareRequestBuilder) ByBasehead(basehead string)(*ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if basehead != "" { + urlTplParams["basehead"] = basehead + } + return NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDependencyGraphCompareRequestBuilderInternal instantiates a new ItemItemDependencyGraphCompareRequestBuilder and sets the default values. +func NewItemItemDependencyGraphCompareRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphCompareRequestBuilder) { + m := &ItemItemDependencyGraphCompareRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/compare", pathParameters), + } + return m +} +// NewItemItemDependencyGraphCompareRequestBuilder instantiates a new ItemItemDependencyGraphCompareRequestBuilder and sets the default values. +func NewItemItemDependencyGraphCompareRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphCompareRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependencyGraphCompareRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_dependency_graph_compare_with_basehead_item_request_builder.go b/pkg/github/repos/item_item_dependency_graph_compare_with_basehead_item_request_builder.go new file mode 100644 index 0000000..9ec29b1 --- /dev/null +++ b/pkg/github/repos/item_item_dependency_graph_compare_with_basehead_item_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\compare\{basehead} +type ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderGetQueryParameters gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. +type ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderGetQueryParameters struct { + // The full path, relative to the repository root, of the dependency manifest file. + Name *string `uriparametername:"name"` +} +// NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderInternal instantiates a new ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder and sets the default values. +func NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) { + m := &ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/compare/{basehead}{?name*}", pathParameters), + } + return m +} +// NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder instantiates a new ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder and sets the default values. +func NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. +// returns a []DependencyGraphDiffable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependency-graph/dependency-review#get-a-diff-of-the-dependencies-between-commits +func (m *ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependencyGraphDiffable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependencyGraphDiffFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependencyGraphDiffable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependencyGraphDiffable) + } + } + return val, nil +} +// ToGetRequestInformation gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. +// returns a *RequestInformation when successful +func (m *ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder when successful +func (m *ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder) { + return NewItemItemDependencyGraphCompareWithBaseheadItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependency_graph_request_builder.go b/pkg/github/repos/item_item_dependency_graph_request_builder.go new file mode 100644 index 0000000..3662dca --- /dev/null +++ b/pkg/github/repos/item_item_dependency_graph_request_builder.go @@ -0,0 +1,38 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemDependencyGraphRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph +type ItemItemDependencyGraphRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Compare the compare property +// returns a *ItemItemDependencyGraphCompareRequestBuilder when successful +func (m *ItemItemDependencyGraphRequestBuilder) Compare()(*ItemItemDependencyGraphCompareRequestBuilder) { + return NewItemItemDependencyGraphCompareRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDependencyGraphRequestBuilderInternal instantiates a new ItemItemDependencyGraphRequestBuilder and sets the default values. +func NewItemItemDependencyGraphRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphRequestBuilder) { + m := &ItemItemDependencyGraphRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph", pathParameters), + } + return m +} +// NewItemItemDependencyGraphRequestBuilder instantiates a new ItemItemDependencyGraphRequestBuilder and sets the default values. +func NewItemItemDependencyGraphRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependencyGraphRequestBuilderInternal(urlParams, requestAdapter) +} +// Sbom the sbom property +// returns a *ItemItemDependencyGraphSbomRequestBuilder when successful +func (m *ItemItemDependencyGraphRequestBuilder) Sbom()(*ItemItemDependencyGraphSbomRequestBuilder) { + return NewItemItemDependencyGraphSbomRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Snapshots the snapshots property +// returns a *ItemItemDependencyGraphSnapshotsRequestBuilder when successful +func (m *ItemItemDependencyGraphRequestBuilder) Snapshots()(*ItemItemDependencyGraphSnapshotsRequestBuilder) { + return NewItemItemDependencyGraphSnapshotsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_dependency_graph_sbom_request_builder.go b/pkg/github/repos/item_item_dependency_graph_sbom_request_builder.go new file mode 100644 index 0000000..d1be914 --- /dev/null +++ b/pkg/github/repos/item_item_dependency_graph_sbom_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDependencyGraphSbomRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\sbom +type ItemItemDependencyGraphSbomRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDependencyGraphSbomRequestBuilderInternal instantiates a new ItemItemDependencyGraphSbomRequestBuilder and sets the default values. +func NewItemItemDependencyGraphSbomRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphSbomRequestBuilder) { + m := &ItemItemDependencyGraphSbomRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/sbom", pathParameters), + } + return m +} +// NewItemItemDependencyGraphSbomRequestBuilder instantiates a new ItemItemDependencyGraphSbomRequestBuilder and sets the default values. +func NewItemItemDependencyGraphSbomRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphSbomRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependencyGraphSbomRequestBuilderInternal(urlParams, requestAdapter) +} +// Get exports the software bill of materials (SBOM) for a repository in SPDX JSON format. +// returns a DependencyGraphSpdxSbomable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependency-graph/sboms#export-a-software-bill-of-materials-sbom-for-a-repository +func (m *ItemItemDependencyGraphSbomRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependencyGraphSpdxSbomable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDependencyGraphSpdxSbomFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DependencyGraphSpdxSbomable), nil +} +// ToGetRequestInformation exports the software bill of materials (SBOM) for a repository in SPDX JSON format. +// returns a *RequestInformation when successful +func (m *ItemItemDependencyGraphSbomRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependencyGraphSbomRequestBuilder when successful +func (m *ItemItemDependencyGraphSbomRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependencyGraphSbomRequestBuilder) { + return NewItemItemDependencyGraphSbomRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dependency_graph_snapshots_post_response.go b/pkg/github/repos/item_item_dependency_graph_snapshots_post_response.go new file mode 100644 index 0000000..c531312 --- /dev/null +++ b/pkg/github/repos/item_item_dependency_graph_snapshots_post_response.go @@ -0,0 +1,167 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemDependencyGraphSnapshotsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time at which the snapshot was created. + created_at *string + // ID of the created snapshot. + id *int32 + // A message providing further details about the result, such as why the dependencies were not updated. + message *string + // Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. + result *string +} +// NewItemItemDependencyGraphSnapshotsPostResponse instantiates a new ItemItemDependencyGraphSnapshotsPostResponse and sets the default values. +func NewItemItemDependencyGraphSnapshotsPostResponse()(*ItemItemDependencyGraphSnapshotsPostResponse) { + m := &ItemItemDependencyGraphSnapshotsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemDependencyGraphSnapshotsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDependencyGraphSnapshotsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDependencyGraphSnapshotsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDependencyGraphSnapshotsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The time at which the snapshot was created. +// returns a *string when successful +func (m *ItemItemDependencyGraphSnapshotsPostResponse) GetCreatedAt()(*string) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDependencyGraphSnapshotsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResult(val) + } + return nil + } + return res +} +// GetId gets the id property value. ID of the created snapshot. +// returns a *int32 when successful +func (m *ItemItemDependencyGraphSnapshotsPostResponse) GetId()(*int32) { + return m.id +} +// GetMessage gets the message property value. A message providing further details about the result, such as why the dependencies were not updated. +// returns a *string when successful +func (m *ItemItemDependencyGraphSnapshotsPostResponse) GetMessage()(*string) { + return m.message +} +// GetResult gets the result property value. Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. +// returns a *string when successful +func (m *ItemItemDependencyGraphSnapshotsPostResponse) GetResult()(*string) { + return m.result +} +// Serialize serializes information the current object +func (m *ItemItemDependencyGraphSnapshotsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("result", m.GetResult()) + 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 *ItemItemDependencyGraphSnapshotsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The time at which the snapshot was created. +func (m *ItemItemDependencyGraphSnapshotsPostResponse) SetCreatedAt(value *string)() { + m.created_at = value +} +// SetId sets the id property value. ID of the created snapshot. +func (m *ItemItemDependencyGraphSnapshotsPostResponse) SetId(value *int32)() { + m.id = value +} +// SetMessage sets the message property value. A message providing further details about the result, such as why the dependencies were not updated. +func (m *ItemItemDependencyGraphSnapshotsPostResponse) SetMessage(value *string)() { + m.message = value +} +// SetResult sets the result property value. Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. +func (m *ItemItemDependencyGraphSnapshotsPostResponse) SetResult(value *string)() { + m.result = value +} +type ItemItemDependencyGraphSnapshotsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*string) + GetId()(*int32) + GetMessage()(*string) + GetResult()(*string) + SetCreatedAt(value *string)() + SetId(value *int32)() + SetMessage(value *string)() + SetResult(value *string)() +} diff --git a/pkg/github/repos/item_item_dependency_graph_snapshots_request_builder.go b/pkg/github/repos/item_item_dependency_graph_snapshots_request_builder.go new file mode 100644 index 0000000..1f4f27d --- /dev/null +++ b/pkg/github/repos/item_item_dependency_graph_snapshots_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDependencyGraphSnapshotsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\snapshots +type ItemItemDependencyGraphSnapshotsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDependencyGraphSnapshotsRequestBuilderInternal instantiates a new ItemItemDependencyGraphSnapshotsRequestBuilder and sets the default values. +func NewItemItemDependencyGraphSnapshotsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphSnapshotsRequestBuilder) { + m := &ItemItemDependencyGraphSnapshotsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/snapshots", pathParameters), + } + return m +} +// NewItemItemDependencyGraphSnapshotsRequestBuilder instantiates a new ItemItemDependencyGraphSnapshotsRequestBuilder and sets the default values. +func NewItemItemDependencyGraphSnapshotsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependencyGraphSnapshotsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDependencyGraphSnapshotsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post create a new snapshot of a repository's dependencies.The authenticated user must have access to the repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemDependencyGraphSnapshotsPostResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repository +func (m *ItemItemDependencyGraphSnapshotsRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Snapshotable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemDependencyGraphSnapshotsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemDependencyGraphSnapshotsPostResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemDependencyGraphSnapshotsPostResponseable), nil +} +// ToPostRequestInformation create a new snapshot of a repository's dependencies.The authenticated user must have access to the repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDependencyGraphSnapshotsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Snapshotable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDependencyGraphSnapshotsRequestBuilder when successful +func (m *ItemItemDependencyGraphSnapshotsRequestBuilder) WithUrl(rawUrl string)(*ItemItemDependencyGraphSnapshotsRequestBuilder) { + return NewItemItemDependencyGraphSnapshotsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_deployments_item_statuses_post_request_body.go b/pkg/github/repos/item_item_deployments_item_statuses_post_request_body.go new file mode 100644 index 0000000..b1edea5 --- /dev/null +++ b/pkg/github/repos/item_item_deployments_item_statuses_post_request_body.go @@ -0,0 +1,225 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemDeploymentsItemStatusesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` + auto_inactive *bool + // A short description of the status. The maximum description length is 140 characters. + description *string + // Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used. + environment *string + // Sets the URL for accessing your environment. Default: `""` + environment_url *string + // The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + log_url *string + // The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + target_url *string +} +// NewItemItemDeploymentsItemStatusesPostRequestBody instantiates a new ItemItemDeploymentsItemStatusesPostRequestBody and sets the default values. +func NewItemItemDeploymentsItemStatusesPostRequestBody()(*ItemItemDeploymentsItemStatusesPostRequestBody) { + m := &ItemItemDeploymentsItemStatusesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemDeploymentsItemStatusesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDeploymentsItemStatusesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDeploymentsItemStatusesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAutoInactive gets the auto_inactive property value. Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` +// returns a *bool when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetAutoInactive()(*bool) { + return m.auto_inactive +} +// GetDescription gets the description property value. A short description of the status. The maximum description length is 140 characters. +// returns a *string when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetEnvironment gets the environment property value. Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used. +// returns a *string when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetEnvironment()(*string) { + return m.environment +} +// GetEnvironmentUrl gets the environment_url property value. Sets the URL for accessing your environment. Default: `""` +// returns a *string when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetEnvironmentUrl()(*string) { + return m.environment_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auto_inactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoInactive(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["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["environment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentUrl(val) + } + return nil + } + res["log_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogUrl(val) + } + return nil + } + res["target_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + return res +} +// GetLogUrl gets the log_url property value. The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` +// returns a *string when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetLogUrl()(*string) { + return m.log_url +} +// GetTargetUrl gets the target_url property value. The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. +// returns a *string when successful +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) GetTargetUrl()(*string) { + return m.target_url +} +// Serialize serializes information the current object +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("auto_inactive", m.GetAutoInactive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment_url", m.GetEnvironmentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("log_url", m.GetLogUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_url", m.GetTargetUrl()) + 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 *ItemItemDeploymentsItemStatusesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAutoInactive sets the auto_inactive property value. Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) SetAutoInactive(value *bool)() { + m.auto_inactive = value +} +// SetDescription sets the description property value. A short description of the status. The maximum description length is 140 characters. +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetEnvironment sets the environment property value. Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used. +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) SetEnvironment(value *string)() { + m.environment = value +} +// SetEnvironmentUrl sets the environment_url property value. Sets the URL for accessing your environment. Default: `""` +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) SetEnvironmentUrl(value *string)() { + m.environment_url = value +} +// SetLogUrl sets the log_url property value. The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) SetLogUrl(value *string)() { + m.log_url = value +} +// SetTargetUrl sets the target_url property value. The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. +func (m *ItemItemDeploymentsItemStatusesPostRequestBody) SetTargetUrl(value *string)() { + m.target_url = value +} +type ItemItemDeploymentsItemStatusesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoInactive()(*bool) + GetDescription()(*string) + GetEnvironment()(*string) + GetEnvironmentUrl()(*string) + GetLogUrl()(*string) + GetTargetUrl()(*string) + SetAutoInactive(value *bool)() + SetDescription(value *string)() + SetEnvironment(value *string)() + SetEnvironmentUrl(value *string)() + SetLogUrl(value *string)() + SetTargetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go b/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go new file mode 100644 index 0000000..ceaf1f8 --- /dev/null +++ b/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go @@ -0,0 +1,117 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDeploymentsItemStatusesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments\{deployment_id}\statuses +type ItemItemDeploymentsItemStatusesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemDeploymentsItemStatusesRequestBuilderGetQueryParameters users with pull access can view deployment statuses for a deployment: +type ItemItemDeploymentsItemStatusesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByStatus_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.deployments.item.statuses.item collection +// returns a *ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder when successful +func (m *ItemItemDeploymentsItemStatusesRequestBuilder) ByStatus_id(status_id int32)(*ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["status_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(status_id), 10) + return NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDeploymentsItemStatusesRequestBuilderInternal instantiates a new ItemItemDeploymentsItemStatusesRequestBuilder and sets the default values. +func NewItemItemDeploymentsItemStatusesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsItemStatusesRequestBuilder) { + m := &ItemItemDeploymentsItemStatusesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemDeploymentsItemStatusesRequestBuilder instantiates a new ItemItemDeploymentsItemStatusesRequestBuilder and sets the default values. +func NewItemItemDeploymentsItemStatusesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsItemStatusesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDeploymentsItemStatusesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get users with pull access can view deployment statuses for a deployment: +// returns a []DeploymentStatusable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/statuses#list-deployment-statuses +func (m *ItemItemDeploymentsItemStatusesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDeploymentsItemStatusesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentStatusFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable) + } + } + return val, nil +} +// Post users with `push` access can create deployment statuses for a given deployment.OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. +// returns a DeploymentStatusable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/statuses#create-a-deployment-status +func (m *ItemItemDeploymentsItemStatusesRequestBuilder) Post(ctx context.Context, body ItemItemDeploymentsItemStatusesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentStatusFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable), nil +} +// ToGetRequestInformation users with pull access can view deployment statuses for a deployment: +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsItemStatusesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDeploymentsItemStatusesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation users with `push` access can create deployment statuses for a given deployment.OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsItemStatusesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemDeploymentsItemStatusesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDeploymentsItemStatusesRequestBuilder when successful +func (m *ItemItemDeploymentsItemStatusesRequestBuilder) WithUrl(rawUrl string)(*ItemItemDeploymentsItemStatusesRequestBuilder) { + return NewItemItemDeploymentsItemStatusesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_deployments_item_statuses_with_status_item_request_builder.go b/pkg/github/repos/item_item_deployments_item_statuses_with_status_item_request_builder.go new file mode 100644 index 0000000..3b77de9 --- /dev/null +++ b/pkg/github/repos/item_item_deployments_item_statuses_with_status_item_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments\{deployment_id}\statuses\{status_id} +type ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilderInternal instantiates a new ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder and sets the default values. +func NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) { + m := &ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses/{status_id}", pathParameters), + } + return m +} +// NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder instantiates a new ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder and sets the default values. +func NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get users with pull access can view a deployment status for a deployment: +// returns a DeploymentStatusable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/statuses#get-a-deployment-status +func (m *ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentStatusFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentStatusable), nil +} +// ToGetRequestInformation users with pull access can view a deployment status for a deployment: +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder when successful +func (m *ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder) { + return NewItemItemDeploymentsItemStatusesWithStatus_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_deployments_post_request_body.go b/pkg/github/repos/item_item_deployments_post_request_body.go new file mode 100644 index 0000000..83f5e2c --- /dev/null +++ b/pkg/github/repos/item_item_deployments_post_request_body.go @@ -0,0 +1,322 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemDeploymentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + auto_merge *bool + // Short description of the deployment. + description *string + // Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + environment *string + // The payload property + payload *string + // Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + production_environment *bool + // The ref to deploy. This can be a branch, tag, or SHA. + ref *string + // The [status](https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. + required_contexts []string + // Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + task *string + // Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + transient_environment *bool +} +// NewItemItemDeploymentsPostRequestBody instantiates a new ItemItemDeploymentsPostRequestBody and sets the default values. +func NewItemItemDeploymentsPostRequestBody()(*ItemItemDeploymentsPostRequestBody) { + m := &ItemItemDeploymentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + environmentValue := "production" + m.SetEnvironment(&environmentValue) + taskValue := "deploy" + m.SetTask(&taskValue) + return m +} +// CreateItemItemDeploymentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDeploymentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDeploymentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDeploymentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAutoMerge gets the auto_merge property value. Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. +// returns a *bool when successful +func (m *ItemItemDeploymentsPostRequestBody) GetAutoMerge()(*bool) { + return m.auto_merge +} +// GetDescription gets the description property value. Short description of the deployment. +// returns a *string when successful +func (m *ItemItemDeploymentsPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetEnvironment gets the environment property value. Name for the target deployment environment (e.g., `production`, `staging`, `qa`). +// returns a *string when successful +func (m *ItemItemDeploymentsPostRequestBody) GetEnvironment()(*string) { + return m.environment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDeploymentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auto_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoMerge(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["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["production_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProductionEnvironment(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["required_contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRequiredContexts(res) + } + return nil + } + res["task"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTask(val) + } + return nil + } + res["transient_environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTransientEnvironment(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *ItemItemDeploymentsPostRequestBody) GetPayload()(*string) { + return m.payload +} +// GetProductionEnvironment gets the production_environment property value. Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. +// returns a *bool when successful +func (m *ItemItemDeploymentsPostRequestBody) GetProductionEnvironment()(*bool) { + return m.production_environment +} +// GetRef gets the ref property value. The ref to deploy. This can be a branch, tag, or SHA. +// returns a *string when successful +func (m *ItemItemDeploymentsPostRequestBody) GetRef()(*string) { + return m.ref +} +// GetRequiredContexts gets the required_contexts property value. The [status](https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. +// returns a []string when successful +func (m *ItemItemDeploymentsPostRequestBody) GetRequiredContexts()([]string) { + return m.required_contexts +} +// GetTask gets the task property value. Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). +// returns a *string when successful +func (m *ItemItemDeploymentsPostRequestBody) GetTask()(*string) { + return m.task +} +// GetTransientEnvironment gets the transient_environment property value. Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` +// returns a *bool when successful +func (m *ItemItemDeploymentsPostRequestBody) GetTransientEnvironment()(*bool) { + return m.transient_environment +} +// Serialize serializes information the current object +func (m *ItemItemDeploymentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("auto_merge", m.GetAutoMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("production_environment", m.GetProductionEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + if m.GetRequiredContexts() != nil { + err := writer.WriteCollectionOfStringValues("required_contexts", m.GetRequiredContexts()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("task", m.GetTask()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("transient_environment", m.GetTransientEnvironment()) + 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 *ItemItemDeploymentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAutoMerge sets the auto_merge property value. Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. +func (m *ItemItemDeploymentsPostRequestBody) SetAutoMerge(value *bool)() { + m.auto_merge = value +} +// SetDescription sets the description property value. Short description of the deployment. +func (m *ItemItemDeploymentsPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetEnvironment sets the environment property value. Name for the target deployment environment (e.g., `production`, `staging`, `qa`). +func (m *ItemItemDeploymentsPostRequestBody) SetEnvironment(value *string)() { + m.environment = value +} +// SetPayload sets the payload property value. The payload property +func (m *ItemItemDeploymentsPostRequestBody) SetPayload(value *string)() { + m.payload = value +} +// SetProductionEnvironment sets the production_environment property value. Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. +func (m *ItemItemDeploymentsPostRequestBody) SetProductionEnvironment(value *bool)() { + m.production_environment = value +} +// SetRef sets the ref property value. The ref to deploy. This can be a branch, tag, or SHA. +func (m *ItemItemDeploymentsPostRequestBody) SetRef(value *string)() { + m.ref = value +} +// SetRequiredContexts sets the required_contexts property value. The [status](https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. +func (m *ItemItemDeploymentsPostRequestBody) SetRequiredContexts(value []string)() { + m.required_contexts = value +} +// SetTask sets the task property value. Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). +func (m *ItemItemDeploymentsPostRequestBody) SetTask(value *string)() { + m.task = value +} +// SetTransientEnvironment sets the transient_environment property value. Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` +func (m *ItemItemDeploymentsPostRequestBody) SetTransientEnvironment(value *bool)() { + m.transient_environment = value +} +type ItemItemDeploymentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoMerge()(*bool) + GetDescription()(*string) + GetEnvironment()(*string) + GetPayload()(*string) + GetProductionEnvironment()(*bool) + GetRef()(*string) + GetRequiredContexts()([]string) + GetTask()(*string) + GetTransientEnvironment()(*bool) + SetAutoMerge(value *bool)() + SetDescription(value *string)() + SetEnvironment(value *string)() + SetPayload(value *string)() + SetProductionEnvironment(value *bool)() + SetRef(value *string)() + SetRequiredContexts(value []string)() + SetTask(value *string)() + SetTransientEnvironment(value *bool)() +} diff --git a/pkg/github/repos/item_item_deployments_request_builder.go b/pkg/github/repos/item_item_deployments_request_builder.go new file mode 100644 index 0000000..1f7a852 --- /dev/null +++ b/pkg/github/repos/item_item_deployments_request_builder.go @@ -0,0 +1,121 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDeploymentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments +type ItemItemDeploymentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemDeploymentsRequestBuilderGetQueryParameters simple filtering of deployments is available via query parameters: +type ItemItemDeploymentsRequestBuilderGetQueryParameters struct { + // The name of the environment that was deployed to (e.g., `staging` or `production`). + Environment *string `uriparametername:"environment"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The name of the ref. This can be a branch, tag, or SHA. + Ref *string `uriparametername:"ref"` + // The SHA recorded at creation time. + Sha *string `uriparametername:"sha"` + // The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + Task *string `uriparametername:"task"` +} +// ByDeployment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.deployments.item collection +// returns a *ItemItemDeploymentsWithDeployment_ItemRequestBuilder when successful +func (m *ItemItemDeploymentsRequestBuilder) ByDeployment_id(deployment_id int32)(*ItemItemDeploymentsWithDeployment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["deployment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(deployment_id), 10) + return NewItemItemDeploymentsWithDeployment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemDeploymentsRequestBuilderInternal instantiates a new ItemItemDeploymentsRequestBuilder and sets the default values. +func NewItemItemDeploymentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsRequestBuilder) { + m := &ItemItemDeploymentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments{?environment*,page*,per_page*,ref*,sha*,task*}", pathParameters), + } + return m +} +// NewItemItemDeploymentsRequestBuilder instantiates a new ItemItemDeploymentsRequestBuilder and sets the default values. +func NewItemItemDeploymentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDeploymentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get simple filtering of deployments is available via query parameters: +// returns a []Deploymentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments#list-deployments +func (m *ItemItemDeploymentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDeploymentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable) + } + } + return val, nil +} +// Post deployments offer a few configurable parameters with certain defaults.The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Cloud we often deploy branches and verify thembefore we merge a pull request.The `environment` parameter allows deployments to be issued to different runtime environments. Teams often havemultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parametermakes it easier to track which environments have requested deployments. The default environment is `production`.The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. Ifthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API willreturn a failure response.By default, [commit statuses](https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses) for every submitted context must be in a `success`state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or tospecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you donot require any contexts or create any commit statuses, the deployment will always succeed.The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON textfield that will be passed on when a deployment event is dispatched.The `task` parameter is used by the deployment system to allow different execution paths. In the web world this mightbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile anapplication with debugging enabled.Merged branch response:You will see this response when GitHub automatically merges the base branch into the topic branch instead of creatinga deployment. This auto-merge happens when:* Auto-merge option is enabled in the repository* Topic branch does not include the latest changes on the base branch, which is `master` in the response example* There are no merge conflictsIf there are no new commits in the base branch, a new request to create a deployment should give a successfulresponse.Merge conflict response:This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can'tbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.Failed commit status checks:This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. +// returns a Deploymentable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments#create-a-deployment +func (m *ItemItemDeploymentsRequestBuilder) Post(ctx context.Context, body ItemItemDeploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable), nil +} +// ToGetRequestInformation simple filtering of deployments is available via query parameters: +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemDeploymentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation deployments offer a few configurable parameters with certain defaults.The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Cloud we often deploy branches and verify thembefore we merge a pull request.The `environment` parameter allows deployments to be issued to different runtime environments. Teams often havemultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parametermakes it easier to track which environments have requested deployments. The default environment is `production`.The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. Ifthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API willreturn a failure response.By default, [commit statuses](https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses) for every submitted context must be in a `success`state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or tospecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you donot require any contexts or create any commit statuses, the deployment will always succeed.The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON textfield that will be passed on when a deployment event is dispatched.The `task` parameter is used by the deployment system to allow different execution paths. In the web world this mightbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile anapplication with debugging enabled.Merged branch response:You will see this response when GitHub automatically merges the base branch into the topic branch instead of creatinga deployment. This auto-merge happens when:* Auto-merge option is enabled in the repository* Topic branch does not include the latest changes on the base branch, which is `master` in the response example* There are no merge conflictsIf there are no new commits in the base branch, a new request to create a deployment should give a successfulresponse.Merge conflict response:This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can'tbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.Failed commit status checks:This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemDeploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDeploymentsRequestBuilder when successful +func (m *ItemItemDeploymentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemDeploymentsRequestBuilder) { + return NewItemItemDeploymentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_deployments_with_deployment_item_request_builder.go b/pkg/github/repos/item_item_deployments_with_deployment_item_request_builder.go new file mode 100644 index 0000000..c9cd0a2 --- /dev/null +++ b/pkg/github/repos/item_item_deployments_with_deployment_item_request_builder.go @@ -0,0 +1,94 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDeploymentsWithDeployment_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments\{deployment_id} +type ItemItemDeploymentsWithDeployment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDeploymentsWithDeployment_ItemRequestBuilderInternal instantiates a new ItemItemDeploymentsWithDeployment_ItemRequestBuilder and sets the default values. +func NewItemItemDeploymentsWithDeployment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsWithDeployment_ItemRequestBuilder) { + m := &ItemItemDeploymentsWithDeployment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}", pathParameters), + } + return m +} +// NewItemItemDeploymentsWithDeployment_ItemRequestBuilder instantiates a new ItemItemDeploymentsWithDeployment_ItemRequestBuilder and sets the default values. +func NewItemItemDeploymentsWithDeployment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDeploymentsWithDeployment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDeploymentsWithDeployment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete if the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment.To set a deployment as inactive, you must:* Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.* Mark the active deployment as inactive by adding any non-successful deployment status.For more information, see "[Create a deployment](https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-cloud@latest//rest/deployments/statuses#create-a-deployment-status)."OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments#delete-a-deployment +func (m *ItemItemDeploymentsWithDeployment_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get a deployment +// returns a Deploymentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments#get-a-deployment +func (m *ItemItemDeploymentsWithDeployment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Deploymentable), nil +} +// Statuses the statuses property +// returns a *ItemItemDeploymentsItemStatusesRequestBuilder when successful +func (m *ItemItemDeploymentsWithDeployment_ItemRequestBuilder) Statuses()(*ItemItemDeploymentsItemStatusesRequestBuilder) { + return NewItemItemDeploymentsItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation if the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment.To set a deployment as inactive, you must:* Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.* Mark the active deployment as inactive by adding any non-successful deployment status.For more information, see "[Create a deployment](https://docs.github.com/enterprise-cloud@latest//rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-cloud@latest//rest/deployments/statuses#create-a-deployment-status)."OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsWithDeployment_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemDeploymentsWithDeployment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDeploymentsWithDeployment_ItemRequestBuilder when successful +func (m *ItemItemDeploymentsWithDeployment_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemDeploymentsWithDeployment_ItemRequestBuilder) { + return NewItemItemDeploymentsWithDeployment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_dispatches_post_request_body.go b/pkg/github/repos/item_item_dispatches_post_request_body.go new file mode 100644 index 0000000..a463fda --- /dev/null +++ b/pkg/github/repos/item_item_dispatches_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemDispatchesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. + client_payload ItemItemDispatchesPostRequestBody_client_payloadable + // A custom webhook event name. Must be 100 characters or fewer. + event_type *string +} +// NewItemItemDispatchesPostRequestBody instantiates a new ItemItemDispatchesPostRequestBody and sets the default values. +func NewItemItemDispatchesPostRequestBody()(*ItemItemDispatchesPostRequestBody) { + m := &ItemItemDispatchesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemDispatchesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDispatchesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDispatchesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDispatchesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientPayload gets the client_payload property value. JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. +// returns a ItemItemDispatchesPostRequestBody_client_payloadable when successful +func (m *ItemItemDispatchesPostRequestBody) GetClientPayload()(ItemItemDispatchesPostRequestBody_client_payloadable) { + return m.client_payload +} +// GetEventType gets the event_type property value. A custom webhook event name. Must be 100 characters or fewer. +// returns a *string when successful +func (m *ItemItemDispatchesPostRequestBody) GetEventType()(*string) { + return m.event_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDispatchesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemDispatchesPostRequestBody_client_payloadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClientPayload(val.(ItemItemDispatchesPostRequestBody_client_payloadable)) + } + return nil + } + res["event_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventType(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemDispatchesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("client_payload", m.GetClientPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("event_type", m.GetEventType()) + 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 *ItemItemDispatchesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientPayload sets the client_payload property value. JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. +func (m *ItemItemDispatchesPostRequestBody) SetClientPayload(value ItemItemDispatchesPostRequestBody_client_payloadable)() { + m.client_payload = value +} +// SetEventType sets the event_type property value. A custom webhook event name. Must be 100 characters or fewer. +func (m *ItemItemDispatchesPostRequestBody) SetEventType(value *string)() { + m.event_type = value +} +type ItemItemDispatchesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientPayload()(ItemItemDispatchesPostRequestBody_client_payloadable) + GetEventType()(*string) + SetClientPayload(value ItemItemDispatchesPostRequestBody_client_payloadable)() + SetEventType(value *string)() +} diff --git a/pkg/github/repos/item_item_dispatches_post_request_body_client_payload.go b/pkg/github/repos/item_item_dispatches_post_request_body_client_payload.go new file mode 100644 index 0000000..1e325ee --- /dev/null +++ b/pkg/github/repos/item_item_dispatches_post_request_body_client_payload.go @@ -0,0 +1,52 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemDispatchesPostRequestBody_client_payload jSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. +type ItemItemDispatchesPostRequestBody_client_payload struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemDispatchesPostRequestBody_client_payload instantiates a new ItemItemDispatchesPostRequestBody_client_payload and sets the default values. +func NewItemItemDispatchesPostRequestBody_client_payload()(*ItemItemDispatchesPostRequestBody_client_payload) { + m := &ItemItemDispatchesPostRequestBody_client_payload{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemDispatchesPostRequestBody_client_payloadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemDispatchesPostRequestBody_client_payloadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemDispatchesPostRequestBody_client_payload(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemDispatchesPostRequestBody_client_payload) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemDispatchesPostRequestBody_client_payload) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemDispatchesPostRequestBody_client_payload) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemDispatchesPostRequestBody_client_payload) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemDispatchesPostRequestBody_client_payloadable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_dispatches_request_builder.go b/pkg/github/repos/item_item_dispatches_request_builder.go new file mode 100644 index 0000000..1dbe809 --- /dev/null +++ b/pkg/github/repos/item_item_dispatches_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemDispatchesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dispatches +type ItemItemDispatchesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemDispatchesRequestBuilderInternal instantiates a new ItemItemDispatchesRequestBuilder and sets the default values. +func NewItemItemDispatchesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDispatchesRequestBuilder) { + m := &ItemItemDispatchesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dispatches", pathParameters), + } + return m +} +// NewItemItemDispatchesRequestBuilder instantiates a new ItemItemDispatchesRequestBuilder and sets the default values. +func NewItemItemDispatchesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDispatchesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemDispatchesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post you can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Cloud to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#repository_dispatch)."The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.This input example shows how you can use the `client_payload` as a test to debug your workflow.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-a-repository-dispatch-event +func (m *ItemItemDispatchesRequestBuilder) Post(ctx context.Context, body ItemItemDispatchesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation you can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Cloud to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#repository_dispatch)."The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.This input example shows how you can use the `client_payload` as a test to debug your workflow.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemDispatchesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemDispatchesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemDispatchesRequestBuilder when successful +func (m *ItemItemDispatchesRequestBuilder) WithUrl(rawUrl string)(*ItemItemDispatchesRequestBuilder) { + return NewItemItemDispatchesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_get_response.go b/pkg/github/repos/item_item_environments_get_response.go new file mode 100644 index 0000000..2ae3ad0 --- /dev/null +++ b/pkg/github/repos/item_item_environments_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The environments property + environments []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable + // The number of environments in this repository + total_count *int32 +} +// NewItemItemEnvironmentsGetResponse instantiates a new ItemItemEnvironmentsGetResponse and sets the default values. +func NewItemItemEnvironmentsGetResponse()(*ItemItemEnvironmentsGetResponse) { + m := &ItemItemEnvironmentsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnvironments gets the environments property value. The environments property +// returns a []Environmentable when successful +func (m *ItemItemEnvironmentsGetResponse) GetEnvironments()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable) { + return m.environments +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["environments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEnvironmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable) + } + } + m.SetEnvironments(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The number of environments in this repository +// returns a *int32 when successful +func (m *ItemItemEnvironmentsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnvironments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEnvironments())) + for i, v := range m.GetEnvironments() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("environments", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemEnvironmentsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnvironments sets the environments property value. The environments property +func (m *ItemItemEnvironmentsGetResponse) SetEnvironments(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable)() { + m.environments = value +} +// SetTotalCount sets the total_count property value. The number of environments in this repository +func (m *ItemItemEnvironmentsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemEnvironmentsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnvironments()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable) + GetTotalCount()(*int32) + SetEnvironments(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_branch_policies_get_response.go b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_get_response.go new file mode 100644 index 0000000..ca54f80 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The branch_policies property + branch_policies []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable + // The number of deployment branch policies for the environment. + total_count *int32 +} +// NewItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse instantiates a new ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse and sets the default values. +func NewItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse()(*ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) { + m := &ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBranchPolicies gets the branch_policies property value. The branch_policies property +// returns a []DeploymentBranchPolicyable when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) GetBranchPolicies()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable) { + return m.branch_policies +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["branch_policies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentBranchPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable) + } + } + m.SetBranchPolicies(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The number of deployment branch policies for the environment. +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBranchPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBranchPolicies())) + for i, v := range m.GetBranchPolicies() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("branch_policies", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBranchPolicies sets the branch_policies property value. The branch_policies property +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) SetBranchPolicies(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable)() { + m.branch_policies = value +} +// SetTotalCount sets the total_count property value. The number of deployment branch policies for the environment. +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBranchPolicies()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable) + GetTotalCount()(*int32) + SetBranchPolicies(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go new file mode 100644 index 0000000..7df2382 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go @@ -0,0 +1,106 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment-branch-policies +type ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderGetQueryParameters lists the deployment branch policies for an environment.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByBranch_policy_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.environments.item.deploymentBranchPolicies.item collection +// returns a *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) ByBranch_policy_id(branch_policy_id int32)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["branch_policy_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(branch_policy_id), 10) + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) { + m := &ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder instantiates a new ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the deployment branch policies for an environment.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/branch-policies#list-deployment-branch-policies +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderGetQueryParameters])(ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemEnvironmentsItemDeploymentBranchPoliciesGetResponseable), nil +} +// Post creates a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a DeploymentBranchPolicyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/branch-policies#create-a-deployment-branch-policy +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyNamePatternWithTypeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentBranchPolicyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable), nil +} +// ToGetRequestInformation lists the deployment branch policies for an environment.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyNamePatternWithTypeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) { + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_branch_policies_with_branch_policy_item_request_builder.go b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_with_branch_policy_item_request_builder.go new file mode 100644 index 0000000..0249864 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_with_branch_policy_item_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment-branch-policies\{branch_policy_id} +type ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) { + m := &ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder instantiates a new ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/branch-policies#delete-a-deployment-branch-policy +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a deployment branch or tag policy for an environment.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a DeploymentBranchPolicyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/branch-policies#get-a-deployment-branch-policy +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentBranchPolicyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable), nil +} +// Put updates a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a DeploymentBranchPolicyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/branch-policies#update-a-deployment-branch-policy +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyNamePatternable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentBranchPolicyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyable), nil +} +// ToDeleteRequestInformation deletes a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a deployment branch or tag policy for an environment.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation updates a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicyNamePatternable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder) { + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesWithBranch_policy_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_protection_rules_apps_get_response.go b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_apps_get_response.go new file mode 100644 index 0000000..f2ea3b6 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_apps_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The available_custom_deployment_protection_rule_integrations property + available_custom_deployment_protection_rule_integrations []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable + // The total number of custom deployment protection rule integrations available for this environment. + total_count *int32 +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse()(*ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) { + m := &ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvailableCustomDeploymentProtectionRuleIntegrations gets the available_custom_deployment_protection_rule_integrations property value. The available_custom_deployment_protection_rule_integrations property +// returns a []CustomDeploymentRuleAppable when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) GetAvailableCustomDeploymentProtectionRuleIntegrations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable) { + return m.available_custom_deployment_protection_rule_integrations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["available_custom_deployment_protection_rule_integrations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCustomDeploymentRuleAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable) + } + } + m.SetAvailableCustomDeploymentProtectionRuleIntegrations(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total number of custom deployment protection rule integrations available for this environment. +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAvailableCustomDeploymentProtectionRuleIntegrations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAvailableCustomDeploymentProtectionRuleIntegrations())) + for i, v := range m.GetAvailableCustomDeploymentProtectionRuleIntegrations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("available_custom_deployment_protection_rule_integrations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvailableCustomDeploymentProtectionRuleIntegrations sets the available_custom_deployment_protection_rule_integrations property value. The available_custom_deployment_protection_rule_integrations property +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) SetAvailableCustomDeploymentProtectionRuleIntegrations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable)() { + m.available_custom_deployment_protection_rule_integrations = value +} +// SetTotalCount sets the total_count property value. The total number of custom deployment protection rule integrations available for this environment. +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvailableCustomDeploymentProtectionRuleIntegrations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable) + GetTotalCount()(*int32) + SetAvailableCustomDeploymentProtectionRuleIntegrations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomDeploymentRuleAppable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_protection_rules_apps_request_builder.go b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_apps_request_builder.go new file mode 100644 index 0000000..d90f9a3 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_apps_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment_protection_rules\apps +type ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderGetQueryParameters gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)".OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) { + m := &ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules/apps{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)".OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#list-custom-deployment-rule-integrations-available-for-an-environment +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderGetQueryParameters])(ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemEnvironmentsItemDeployment_protection_rulesAppsGetResponseable), nil +} +// ToGetRequestInformation gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app)".OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_protection_rules_get_response.go b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_get_response.go new file mode 100644 index 0000000..7c0c87d --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The custom_deployment_protection_rules property + custom_deployment_protection_rules []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable + // The number of enabled custom deployment protection rules for this environment + total_count *int32 +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesGetResponse instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesGetResponse()(*ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) { + m := &ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemDeployment_protection_rulesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemDeployment_protection_rulesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomDeploymentProtectionRules gets the custom_deployment_protection_rules property value. The custom_deployment_protection_rules property +// returns a []DeploymentProtectionRuleable when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) GetCustomDeploymentProtectionRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable) { + return m.custom_deployment_protection_rules +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_deployment_protection_rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentProtectionRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable) + } + } + m.SetCustomDeploymentProtectionRules(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The number of enabled custom deployment protection rules for this environment +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCustomDeploymentProtectionRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomDeploymentProtectionRules())) + for i, v := range m.GetCustomDeploymentProtectionRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("custom_deployment_protection_rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomDeploymentProtectionRules sets the custom_deployment_protection_rules property value. The custom_deployment_protection_rules property +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) SetCustomDeploymentProtectionRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable)() { + m.custom_deployment_protection_rules = value +} +// SetTotalCount sets the total_count property value. The number of enabled custom deployment protection rules for this environment +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemEnvironmentsItemDeployment_protection_rulesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomDeploymentProtectionRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable) + GetTotalCount()(*int32) + SetCustomDeploymentProtectionRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_protection_rules_post_request_body.go b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_post_request_body.go new file mode 100644 index 0000000..6f415ee --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the custom app that will be enabled on the environment. + integration_id *int32 +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody()(*ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) { + m := &ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["integration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIntegrationId(val) + } + return nil + } + return res +} +// GetIntegrationId gets the integration_id property value. The ID of the custom app that will be enabled on the environment. +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) GetIntegrationId()(*int32) { + return m.integration_id +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("integration_id", m.GetIntegrationId()) + 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 *ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIntegrationId sets the integration_id property value. The ID of the custom app that will be enabled on the environment. +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBody) SetIntegrationId(value *int32)() { + m.integration_id = value +} +type ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntegrationId()(*int32) + SetIntegrationId(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_protection_rules_request_builder.go b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_request_builder.go new file mode 100644 index 0000000..4c1026a --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_request_builder.go @@ -0,0 +1,104 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment_protection_rules +type ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Apps the apps property +// returns a *ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) Apps()(*ItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilder) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ByProtection_rule_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.environments.item.deployment_protection_rules.item collection +// returns a *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) ByProtection_rule_id(protection_rule_id int32)(*ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["protection_rule_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(protection_rule_id), 10) + return NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) { + m := &ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemEnvironmentsItemDeployment_protection_rulesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#get-all-deployment-protection-rules-for-an-environment +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemEnvironmentsItemDeployment_protection_rulesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemEnvironmentsItemDeployment_protection_rulesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemEnvironmentsItemDeployment_protection_rulesGetResponseable), nil +} +// Post enable a custom deployment protection rule for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a DeploymentProtectionRuleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#create-a-custom-deployment-protection-rule-on-an-environment +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) Post(ctx context.Context, body ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentProtectionRuleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable), nil +} +// ToGetRequestInformation gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation enable a custom deployment protection rule for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemEnvironmentsItemDeployment_protection_rulesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_deployment_protection_rules_with_protection_rule_item_request_builder.go b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_with_protection_rule_item_request_builder.go new file mode 100644 index 0000000..f24a619 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_deployment_protection_rules_with_protection_rule_item_request_builder.go @@ -0,0 +1,79 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment_protection_rules\{protection_rule_id} +type ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) { + m := &ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder instantiates a new ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete disables a custom deployment protection rule for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#disable-a-custom-protection-rule-for-an-environment +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a DeploymentProtectionRuleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/protection-rules#get-a-custom-deployment-protection-rule +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentProtectionRuleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentProtectionRuleable), nil +} +// ToDeleteRequestInformation disables a custom deployment protection rule for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/enterprise-cloud@latest//actions/deployment/targeting-different-environments/using-environments-for-deployment)."For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesWithProtection_rule_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_secrets_get_response.go b/pkg/github/repos/item_item_environments_item_secrets_get_response.go new file mode 100644 index 0000000..d3e44cf --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_secrets_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable + // The total_count property + total_count *int32 +} +// NewItemItemEnvironmentsItemSecretsGetResponse instantiates a new ItemItemEnvironmentsItemSecretsGetResponse and sets the default values. +func NewItemItemEnvironmentsItemSecretsGetResponse()(*ItemItemEnvironmentsItemSecretsGetResponse) { + m := &ItemItemEnvironmentsItemSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []ActionsSecretable when successful +func (m *ItemItemEnvironmentsItemSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemItemEnvironmentsItemSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *ItemItemEnvironmentsItemSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemEnvironmentsItemSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemItemEnvironmentsItemSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_secrets_item_with_secret_name_put_request_body.go b/pkg/github/repos/item_item_environments_item_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..8b2b0bf --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-environment-public-key) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string +} +// NewItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody instantiates a new ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody()(*ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) { + m := &ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-environment-public-key) endpoint. +// returns a *string when successful +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + 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 *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-environment-public-key) endpoint. +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +type ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() +} diff --git a/pkg/github/repos/item_item_environments_item_secrets_public_key_request_builder.go b/pkg/github/repos/item_item_environments_item_secrets_public_key_request_builder.go new file mode 100644 index 0000000..35a66ec --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\secrets\public-key +type ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) { + m := &ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets/public-key", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder instantiates a new ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the public key for an environment, which you need to encrypt environmentsecrets. You need to encrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-environment-public-key +func (m *ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsPublicKeyable), nil +} +// ToGetRequestInformation get the public key for an environment, which you need to encrypt environmentsecrets. You need to encrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) { + return NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_secrets_request_builder.go b/pkg/github/repos/item_item_environments_item_secrets_request_builder.go new file mode 100644 index 0000000..041bcc3 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_secrets_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemEnvironmentsItemSecretsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\secrets +type ItemItemEnvironmentsItemSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEnvironmentsItemSecretsRequestBuilderGetQueryParameters lists all secrets available in an environment without revealing theirencrypted values.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemEnvironmentsItemSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.environments.item.secrets.item collection +// returns a *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemSecretsRequestBuilder) BySecret_name(secret_name string)(*ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemEnvironmentsItemSecretsRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemSecretsRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemSecretsRequestBuilder) { + m := &ItemItemEnvironmentsItemSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemSecretsRequestBuilder instantiates a new ItemItemEnvironmentsItemSecretsRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all secrets available in an environment without revealing theirencrypted values.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemEnvironmentsItemSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#list-environment-secrets +func (m *ItemItemEnvironmentsItemSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemSecretsRequestBuilderGetQueryParameters])(ItemItemEnvironmentsItemSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemEnvironmentsItemSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemEnvironmentsItemSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder when successful +func (m *ItemItemEnvironmentsItemSecretsRequestBuilder) PublicKey()(*ItemItemEnvironmentsItemSecretsPublicKeyRequestBuilder) { + return NewItemItemEnvironmentsItemSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all secrets available in an environment without revealing theirencrypted values.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemSecretsRequestBuilder when successful +func (m *ItemItemEnvironmentsItemSecretsRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemSecretsRequestBuilder) { + return NewItemItemEnvironmentsItemSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_secrets_with_secret_name_item_request_builder.go b/pkg/github/repos/item_item_environments_item_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..d390d97 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\secrets\{secret_name} +type ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) { + m := &ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets/{secret_name}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder instantiates a new ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a secret in an environment using the secret name.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#delete-an-environment-secret +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a single environment secret without revealing its encrypted value.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#get-an-environment-secret +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsSecretable), nil +} +// Put creates or updates an environment secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/secrets#create-or-update-an-environment-secret +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToDeleteRequestInformation deletes a secret in an environment using the secret name.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a single environment secret without revealing its encrypted value.Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates an environment secret with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemEnvironmentsItemSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder) { + return NewItemItemEnvironmentsItemSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_variables_get_response.go b/pkg/github/repos/item_item_environments_item_variables_get_response.go new file mode 100644 index 0000000..6ad9fef --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_variables_get_response.go @@ -0,0 +1,122 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemVariablesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The total_count property + total_count *int32 + // The variables property + variables []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable +} +// NewItemItemEnvironmentsItemVariablesGetResponse instantiates a new ItemItemEnvironmentsItemVariablesGetResponse and sets the default values. +func NewItemItemEnvironmentsItemVariablesGetResponse()(*ItemItemEnvironmentsItemVariablesGetResponse) { + m := &ItemItemEnvironmentsItemVariablesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemVariablesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemVariablesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemVariablesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemVariablesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemVariablesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["variables"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsVariableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) + } + } + m.SetVariables(res) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemVariablesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// GetVariables gets the variables property value. The variables property +// returns a []ActionsVariableable when successful +func (m *ItemItemEnvironmentsItemVariablesGetResponse) GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) { + return m.variables +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemVariablesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + if err != nil { + return err + } + } + if m.GetVariables() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVariables())) + for i, v := range m.GetVariables() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("variables", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemEnvironmentsItemVariablesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemItemEnvironmentsItemVariablesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +// SetVariables sets the variables property value. The variables property +func (m *ItemItemEnvironmentsItemVariablesGetResponse) SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable)() { + m.variables = value +} +type ItemItemEnvironmentsItemVariablesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalCount()(*int32) + GetVariables()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable) + SetTotalCount(value *int32)() + SetVariables(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable)() +} diff --git a/pkg/github/repos/item_item_environments_item_variables_item_with_name_patch_request_body.go b/pkg/github/repos/item_item_environments_item_variables_item_with_name_patch_request_body.go new file mode 100644 index 0000000..4e6e931 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_variables_item_with_name_patch_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the variable. + name *string + // The value of the variable. + value *string +} +// NewItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody instantiates a new ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody and sets the default values. +func NewItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody()(*ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) { + m := &ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) GetName()(*string) { + return m.name +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name of the variable. +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBody) SetValue(value *string)() { + m.value = value +} +type ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetValue()(*string) + SetName(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/repos/item_item_environments_item_variables_post_request_body.go b/pkg/github/repos/item_item_environments_item_variables_post_request_body.go new file mode 100644 index 0000000..dff25b3 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_variables_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemEnvironmentsItemVariablesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the variable. + name *string + // The value of the variable. + value *string +} +// NewItemItemEnvironmentsItemVariablesPostRequestBody instantiates a new ItemItemEnvironmentsItemVariablesPostRequestBody and sets the default values. +func NewItemItemEnvironmentsItemVariablesPostRequestBody()(*ItemItemEnvironmentsItemVariablesPostRequestBody) { + m := &ItemItemEnvironmentsItemVariablesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemVariablesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemVariablesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemVariablesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the variable. +// returns a *string when successful +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) GetName()(*string) { + return m.name +} +// GetValue gets the value property value. The value of the variable. +// returns a *string when successful +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *ItemItemEnvironmentsItemVariablesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name of the variable. +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetValue sets the value property value. The value of the variable. +func (m *ItemItemEnvironmentsItemVariablesPostRequestBody) SetValue(value *string)() { + m.value = value +} +type ItemItemEnvironmentsItemVariablesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetValue()(*string) + SetName(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/repos/item_item_environments_item_variables_request_builder.go b/pkg/github/repos/item_item_environments_item_variables_request_builder.go new file mode 100644 index 0000000..e295726 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_variables_request_builder.go @@ -0,0 +1,107 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemVariablesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\variables +type ItemItemEnvironmentsItemVariablesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEnvironmentsItemVariablesRequestBuilderGetQueryParameters lists all environment variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemEnvironmentsItemVariablesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.environments.item.variables.item collection +// returns a *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) ByName(name string)(*ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemEnvironmentsItemVariablesRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemVariablesRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemVariablesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemVariablesRequestBuilder) { + m := &ItemItemEnvironmentsItemVariablesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemVariablesRequestBuilder instantiates a new ItemItemEnvironmentsItemVariablesRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemVariablesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemVariablesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemVariablesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all environment variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ItemItemEnvironmentsItemVariablesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#list-environment-variables +func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemVariablesRequestBuilderGetQueryParameters])(ItemItemEnvironmentsItemVariablesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemEnvironmentsItemVariablesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemEnvironmentsItemVariablesGetResponseable), nil +} +// Post create an environment variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a EmptyObjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#create-an-environment-variable +func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) Post(ctx context.Context, body ItemItemEnvironmentsItemVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// ToGetRequestInformation lists all environment variables.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsItemVariablesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create an environment variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemEnvironmentsItemVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemVariablesRequestBuilder when successful +func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemVariablesRequestBuilder) { + return NewItemItemEnvironmentsItemVariablesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_variables_with_name_item_request_builder.go b/pkg/github/repos/item_item_environments_item_variables_with_name_item_request_builder.go new file mode 100644 index 0000000..5b701e7 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_variables_with_name_item_request_builder.go @@ -0,0 +1,105 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\variables\{name} +type ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilderInternal instantiates a new ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) { + m := &ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables/{name}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder instantiates a new ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an environment variable using the variable name.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#delete-an-environment-variable +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a specific variable in an environment.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a ActionsVariableable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#get-an-environment-variable +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsVariableFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsVariableable), nil +} +// Patch updates an environment variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/actions/variables#update-an-environment-variable +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) Patch(ctx context.Context, body ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes an environment variable using the variable name.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a specific variable in an environment.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates an environment variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemEnvironmentsItemVariablesItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder when successful +func (m *ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder) { + return NewItemItemEnvironmentsItemVariablesWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_item_with_environment_name_put_request_body.go b/pkg/github/repos/item_item_environments_item_with_environment_name_put_request_body.go new file mode 100644 index 0000000..ee19c2f --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_with_environment_name_put_request_body.go @@ -0,0 +1,161 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody struct { + // The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. + deployment_branch_policy i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicySettingsable + // Whether or not a user who created the job is prevented from approving their own job. + prevent_self_review *bool + // The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + reviewers []ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable + // The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + wait_timer *int32 +} +// NewItemItemEnvironmentsItemWithEnvironment_namePutRequestBody instantiates a new ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody and sets the default values. +func NewItemItemEnvironmentsItemWithEnvironment_namePutRequestBody()(*ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) { + m := &ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody{ + } + return m +} +// CreateItemItemEnvironmentsItemWithEnvironment_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemWithEnvironment_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemWithEnvironment_namePutRequestBody(), nil +} +// GetDeploymentBranchPolicy gets the deployment_branch_policy property value. The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +// returns a DeploymentBranchPolicySettingsable when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) GetDeploymentBranchPolicy()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicySettingsable) { + return m.deployment_branch_policy +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deployment_branch_policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeploymentBranchPolicySettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentBranchPolicy(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicySettingsable)) + } + return nil + } + res["prevent_self_review"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPreventSelfReview(val) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable) + } + } + m.SetReviewers(res) + } + return nil + } + res["wait_timer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWaitTimer(val) + } + return nil + } + return res +} +// GetPreventSelfReview gets the prevent_self_review property value. Whether or not a user who created the job is prevented from approving their own job. +// returns a *bool when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) GetPreventSelfReview()(*bool) { + return m.prevent_self_review +} +// GetReviewers gets the reviewers property value. The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +// returns a []ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) GetReviewers()([]ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable) { + return m.reviewers +} +// GetWaitTimer gets the wait_timer property value. The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) GetWaitTimer()(*int32) { + return m.wait_timer +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("deployment_branch_policy", m.GetDeploymentBranchPolicy()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prevent_self_review", m.GetPreventSelfReview()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("wait_timer", m.GetWaitTimer()) + if err != nil { + return err + } + } + return nil +} +// SetDeploymentBranchPolicy sets the deployment_branch_policy property value. The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) SetDeploymentBranchPolicy(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicySettingsable)() { + m.deployment_branch_policy = value +} +// SetPreventSelfReview sets the prevent_self_review property value. Whether or not a user who created the job is prevented from approving their own job. +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) SetPreventSelfReview(value *bool)() { + m.prevent_self_review = value +} +// SetReviewers sets the reviewers property value. The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) SetReviewers(value []ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable)() { + m.reviewers = value +} +// SetWaitTimer sets the wait_timer property value. The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody) SetWaitTimer(value *int32)() { + m.wait_timer = value +} +type ItemItemEnvironmentsItemWithEnvironment_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeploymentBranchPolicy()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicySettingsable) + GetPreventSelfReview()(*bool) + GetReviewers()([]ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable) + GetWaitTimer()(*int32) + SetDeploymentBranchPolicy(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentBranchPolicySettingsable)() + SetPreventSelfReview(value *bool)() + SetReviewers(value []ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable)() + SetWaitTimer(value *int32)() +} diff --git a/pkg/github/repos/item_item_environments_item_with_environment_name_put_request_body_reviewers.go b/pkg/github/repos/item_item_environments_item_with_environment_name_put_request_body_reviewers.go new file mode 100644 index 0000000..36760a5 --- /dev/null +++ b/pkg/github/repos/item_item_environments_item_with_environment_name_put_request_body_reviewers.go @@ -0,0 +1,111 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id of the user or team who can review the deployment + id *int32 + // The type of reviewer. + typeEscaped *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentReviewerType +} +// NewItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers instantiates a new ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers and sets the default values. +func NewItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers()(*ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) { + m := &ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseDeploymentReviewerType) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentReviewerType)) + } + return nil + } + return res +} +// GetId gets the id property value. The id of the user or team who can review the deployment +// returns a *int32 when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) GetId()(*int32) { + return m.id +} +// GetTypeEscaped gets the type property value. The type of reviewer. +// returns a *DeploymentReviewerType when successful +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) GetTypeEscaped()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentReviewerType) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id of the user or team who can review the deployment +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) SetId(value *int32)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type of reviewer. +func (m *ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewers) SetTypeEscaped(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentReviewerType)() { + m.typeEscaped = value +} +type ItemItemEnvironmentsItemWithEnvironment_namePutRequestBody_reviewersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetTypeEscaped()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentReviewerType) + SetId(value *int32)() + SetTypeEscaped(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeploymentReviewerType)() +} diff --git a/pkg/github/repos/item_item_environments_request_builder.go b/pkg/github/repos/item_item_environments_request_builder.go new file mode 100644 index 0000000..81aa4f0 --- /dev/null +++ b/pkg/github/repos/item_item_environments_request_builder.go @@ -0,0 +1,75 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemEnvironmentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments +type ItemItemEnvironmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEnvironmentsRequestBuilderGetQueryParameters lists the environments for a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +type ItemItemEnvironmentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByEnvironment_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.environments.item collection +// returns a *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder when successful +func (m *ItemItemEnvironmentsRequestBuilder) ByEnvironment_name(environment_name string)(*ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if environment_name != "" { + urlTplParams["environment_name"] = environment_name + } + return NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemEnvironmentsRequestBuilderInternal instantiates a new ItemItemEnvironmentsRequestBuilder and sets the default values. +func NewItemItemEnvironmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsRequestBuilder) { + m := &ItemItemEnvironmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsRequestBuilder instantiates a new ItemItemEnvironmentsRequestBuilder and sets the default values. +func NewItemItemEnvironmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the environments for a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a ItemItemEnvironmentsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/environments#list-environments +func (m *ItemItemEnvironmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsRequestBuilderGetQueryParameters])(ItemItemEnvironmentsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemEnvironmentsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemEnvironmentsGetResponseable), nil +} +// ToGetRequestInformation lists the environments for a repository.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEnvironmentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEnvironmentsRequestBuilder when successful +func (m *ItemItemEnvironmentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsRequestBuilder) { + return NewItemItemEnvironmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_environments_with_environment_name_item_request_builder.go b/pkg/github/repos/item_item_environments_with_environment_name_item_request_builder.go new file mode 100644 index 0000000..6b0dad5 --- /dev/null +++ b/pkg/github/repos/item_item_environments_with_environment_name_item_request_builder.go @@ -0,0 +1,134 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name} +type ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilderInternal instantiates a new ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) { + m := &ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}", pathParameters), + } + return m +} +// NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder instantiates a new ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder and sets the default values. +func NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete oAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/environments#delete-an-environment +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Deployment_protection_rules the deployment_protection_rules property +// returns a *ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) Deployment_protection_rules()(*ItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilder) { + return NewItemItemEnvironmentsItemDeployment_protection_rulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// DeploymentBranchPolicies the deploymentBranchPolicies property +// returns a *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) DeploymentBranchPolicies()(*ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) { + return NewItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)."Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a Environmentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/environments#get-an-environment +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEnvironmentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable), nil +} +// Put create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."**Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)."**Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Environmentable when successful +// returns a BasicError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deployments/environments#create-or-update-an-environment +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) Put(ctx context.Context, body ItemItemEnvironmentsItemWithEnvironment_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEnvironmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Environmentable), nil +} +// Secrets the secrets property +// returns a *ItemItemEnvironmentsItemSecretsRequestBuilder when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) Secrets()(*ItemItemEnvironmentsItemSecretsRequestBuilder) { + return NewItemItemEnvironmentsItemSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation oAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)."Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."**Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)."**Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemEnvironmentsItemWithEnvironment_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// Variables the variables property +// returns a *ItemItemEnvironmentsItemVariablesRequestBuilder when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) Variables()(*ItemItemEnvironmentsItemVariablesRequestBuilder) { + return NewItemItemEnvironmentsItemVariablesRequestBuilderInternal(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. +// returns a *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder when successful +func (m *ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder) { + return NewItemItemEnvironmentsWithEnvironment_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_events_request_builder.go b/pkg/github/repos/item_item_events_request_builder.go new file mode 100644 index 0000000..cf33363 --- /dev/null +++ b/pkg/github/repos/item_item_events_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemEventsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\events +type ItemItemEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemEventsRequestBuilderGetQueryParameters **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. +type ItemItemEventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemEventsRequestBuilderInternal instantiates a new ItemItemEventsRequestBuilder and sets the default values. +func NewItemItemEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEventsRequestBuilder) { + m := &ItemItemEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemEventsRequestBuilder instantiates a new ItemItemEventsRequestBuilder and sets the default values. +func NewItemItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-repository-events +func (m *ItemItemEventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// ToGetRequestInformation **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. +// returns a *RequestInformation when successful +func (m *ItemItemEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemEventsRequestBuilder when successful +func (m *ItemItemEventsRequestBuilder) WithUrl(rawUrl string)(*ItemItemEventsRequestBuilder) { + return NewItemItemEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_forks_post_request_body.go b/pkg/github/repos/item_item_forks_post_request_body.go new file mode 100644 index 0000000..762c276 --- /dev/null +++ b/pkg/github/repos/item_item_forks_post_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemForksPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // When forking from an existing repository, fork with only the default branch. + default_branch_only *bool + // When forking from an existing repository, a new name for the fork. + name *string + // Optional parameter to specify the organization name if forking into an organization. + organization *string +} +// NewItemItemForksPostRequestBody instantiates a new ItemItemForksPostRequestBody and sets the default values. +func NewItemItemForksPostRequestBody()(*ItemItemForksPostRequestBody) { + m := &ItemItemForksPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemForksPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemForksPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemForksPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemForksPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDefaultBranchOnly gets the default_branch_only property value. When forking from an existing repository, fork with only the default branch. +// returns a *bool when successful +func (m *ItemItemForksPostRequestBody) GetDefaultBranchOnly()(*bool) { + return m.default_branch_only +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemForksPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["default_branch_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranchOnly(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["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val) + } + return nil + } + return res +} +// GetName gets the name property value. When forking from an existing repository, a new name for the fork. +// returns a *string when successful +func (m *ItemItemForksPostRequestBody) GetName()(*string) { + return m.name +} +// GetOrganization gets the organization property value. Optional parameter to specify the organization name if forking into an organization. +// returns a *string when successful +func (m *ItemItemForksPostRequestBody) GetOrganization()(*string) { + return m.organization +} +// Serialize serializes information the current object +func (m *ItemItemForksPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("default_branch_only", m.GetDefaultBranchOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization", m.GetOrganization()) + 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 *ItemItemForksPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDefaultBranchOnly sets the default_branch_only property value. When forking from an existing repository, fork with only the default branch. +func (m *ItemItemForksPostRequestBody) SetDefaultBranchOnly(value *bool)() { + m.default_branch_only = value +} +// SetName sets the name property value. When forking from an existing repository, a new name for the fork. +func (m *ItemItemForksPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetOrganization sets the organization property value. Optional parameter to specify the organization name if forking into an organization. +func (m *ItemItemForksPostRequestBody) SetOrganization(value *string)() { + m.organization = value +} +type ItemItemForksPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultBranchOnly()(*bool) + GetName()(*string) + GetOrganization()(*string) + SetDefaultBranchOnly(value *bool)() + SetName(value *string)() + SetOrganization(value *string)() +} diff --git a/pkg/github/repos/item_item_forks_request_builder.go b/pkg/github/repos/item_item_forks_request_builder.go new file mode 100644 index 0000000..bfe1c5d --- /dev/null +++ b/pkg/github/repos/item_item_forks_request_builder.go @@ -0,0 +1,114 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i9f9d6d1dd3351a181dc9da5e1d877aa9313634a61c6b3bc2333d758359ac1d8f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/forks" +) + +// ItemItemForksRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\forks +type ItemItemForksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemForksRequestBuilderGetQueryParameters list forks +type ItemItemForksRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The sort order. `stargazers` will sort by star count. + Sort *i9f9d6d1dd3351a181dc9da5e1d877aa9313634a61c6b3bc2333d758359ac1d8f.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewItemItemForksRequestBuilderInternal instantiates a new ItemItemForksRequestBuilder and sets the default values. +func NewItemItemForksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemForksRequestBuilder) { + m := &ItemItemForksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/forks{?page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewItemItemForksRequestBuilder instantiates a new ItemItemForksRequestBuilder and sets the default values. +func NewItemItemForksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemForksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemForksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list forks +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 400 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/forks#list-forks +func (m *ItemItemForksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemForksRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// Post create a fork for the authenticated user.**Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api).**Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. +// returns a FullRepositoryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/forks#create-a-fork +func (m *ItemItemForksRequestBuilder) Post(ctx context.Context, body ItemItemForksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemForksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemForksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a fork for the authenticated user.**Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api).**Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. +// returns a *RequestInformation when successful +func (m *ItemItemForksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemForksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemForksRequestBuilder when successful +func (m *ItemItemForksRequestBuilder) WithUrl(rawUrl string)(*ItemItemForksRequestBuilder) { + return NewItemItemForksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_generate_post_request_body.go b/pkg/github/repos/item_item_generate_post_request_body.go new file mode 100644 index 0000000..7dd8fd0 --- /dev/null +++ b/pkg/github/repos/item_item_generate_post_request_body.go @@ -0,0 +1,196 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGeneratePostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A short description of the new repository. + description *string + // Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + include_all_branches *bool + // The name of the new repository. + name *string + // The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. + owner *string + // Either `true` to create a new private repository or `false` to create a new public one. + private *bool +} +// NewItemItemGeneratePostRequestBody instantiates a new ItemItemGeneratePostRequestBody and sets the default values. +func NewItemItemGeneratePostRequestBody()(*ItemItemGeneratePostRequestBody) { + m := &ItemItemGeneratePostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGeneratePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGeneratePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGeneratePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGeneratePostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A short description of the new repository. +// returns a *string when successful +func (m *ItemItemGeneratePostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGeneratePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["include_all_branches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncludeAllBranches(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["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwner(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 + } + return res +} +// GetIncludeAllBranches gets the include_all_branches property value. Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. +// returns a *bool when successful +func (m *ItemItemGeneratePostRequestBody) GetIncludeAllBranches()(*bool) { + return m.include_all_branches +} +// GetName gets the name property value. The name of the new repository. +// returns a *string when successful +func (m *ItemItemGeneratePostRequestBody) GetName()(*string) { + return m.name +} +// GetOwner gets the owner property value. The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. +// returns a *string when successful +func (m *ItemItemGeneratePostRequestBody) GetOwner()(*string) { + return m.owner +} +// GetPrivate gets the private property value. Either `true` to create a new private repository or `false` to create a new public one. +// returns a *bool when successful +func (m *ItemItemGeneratePostRequestBody) GetPrivate()(*bool) { + return m.private +} +// Serialize serializes information the current object +func (m *ItemItemGeneratePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("include_all_branches", m.GetIncludeAllBranches()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + 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 *ItemItemGeneratePostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A short description of the new repository. +func (m *ItemItemGeneratePostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetIncludeAllBranches sets the include_all_branches property value. Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. +func (m *ItemItemGeneratePostRequestBody) SetIncludeAllBranches(value *bool)() { + m.include_all_branches = value +} +// SetName sets the name property value. The name of the new repository. +func (m *ItemItemGeneratePostRequestBody) SetName(value *string)() { + m.name = value +} +// SetOwner sets the owner property value. The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. +func (m *ItemItemGeneratePostRequestBody) SetOwner(value *string)() { + m.owner = value +} +// SetPrivate sets the private property value. Either `true` to create a new private repository or `false` to create a new public one. +func (m *ItemItemGeneratePostRequestBody) SetPrivate(value *bool)() { + m.private = value +} +type ItemItemGeneratePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetIncludeAllBranches()(*bool) + GetName()(*string) + GetOwner()(*string) + GetPrivate()(*bool) + SetDescription(value *string)() + SetIncludeAllBranches(value *bool)() + SetName(value *string)() + SetOwner(value *string)() + SetPrivate(value *bool)() +} diff --git a/pkg/github/repos/item_item_generate_request_builder.go b/pkg/github/repos/item_item_generate_request_builder.go new file mode 100644 index 0000000..a2983e1 --- /dev/null +++ b/pkg/github/repos/item_item_generate_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGenerateRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\generate +type ItemItemGenerateRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGenerateRequestBuilderInternal instantiates a new ItemItemGenerateRequestBuilder and sets the default values. +func NewItemItemGenerateRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGenerateRequestBuilder) { + m := &ItemItemGenerateRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/generate", pathParameters), + } + return m +} +// NewItemItemGenerateRequestBuilder instantiates a new ItemItemGenerateRequestBuilder and sets the default values. +func NewItemItemGenerateRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGenerateRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGenerateRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. +// returns a FullRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-a-repository-using-a-template +func (m *ItemItemGenerateRequestBuilder) Post(ctx context.Context, body ItemItemGeneratePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// ToPostRequestInformation creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemGenerateRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGeneratePostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGenerateRequestBuilder when successful +func (m *ItemItemGenerateRequestBuilder) WithUrl(rawUrl string)(*ItemItemGenerateRequestBuilder) { + return NewItemItemGenerateRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_blobs_post_request_body.go b/pkg/github/repos/item_item_git_blobs_post_request_body.go new file mode 100644 index 0000000..6aaa85a --- /dev/null +++ b/pkg/github/repos/item_item_git_blobs_post_request_body.go @@ -0,0 +1,111 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitBlobsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new blob's content. + content *string + // The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + encoding *string +} +// NewItemItemGitBlobsPostRequestBody instantiates a new ItemItemGitBlobsPostRequestBody and sets the default values. +func NewItemItemGitBlobsPostRequestBody()(*ItemItemGitBlobsPostRequestBody) { + m := &ItemItemGitBlobsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + encodingValue := "utf-8" + m.SetEncoding(&encodingValue) + return m +} +// CreateItemItemGitBlobsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitBlobsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitBlobsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitBlobsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContent gets the content property value. The new blob's content. +// returns a *string when successful +func (m *ItemItemGitBlobsPostRequestBody) GetContent()(*string) { + return m.content +} +// GetEncoding gets the encoding property value. The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. +// returns a *string when successful +func (m *ItemItemGitBlobsPostRequestBody) GetEncoding()(*string) { + return m.encoding +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitBlobsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["encoding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncoding(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemGitBlobsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("encoding", m.GetEncoding()) + 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 *ItemItemGitBlobsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContent sets the content property value. The new blob's content. +func (m *ItemItemGitBlobsPostRequestBody) SetContent(value *string)() { + m.content = value +} +// SetEncoding sets the encoding property value. The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. +func (m *ItemItemGitBlobsPostRequestBody) SetEncoding(value *string)() { + m.encoding = value +} +type ItemItemGitBlobsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetEncoding()(*string) + SetContent(value *string)() + SetEncoding(value *string)() +} diff --git a/pkg/github/repos/item_item_git_blobs_request_builder.go b/pkg/github/repos/item_item_git_blobs_request_builder.go new file mode 100644 index 0000000..2d5cb05 --- /dev/null +++ b/pkg/github/repos/item_item_git_blobs_request_builder.go @@ -0,0 +1,82 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitBlobsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\blobs +type ItemItemGitBlobsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByFile_sha gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.blobs.item collection +// returns a *ItemItemGitBlobsWithFile_shaItemRequestBuilder when successful +func (m *ItemItemGitBlobsRequestBuilder) ByFile_sha(file_sha string)(*ItemItemGitBlobsWithFile_shaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if file_sha != "" { + urlTplParams["file_sha"] = file_sha + } + return NewItemItemGitBlobsWithFile_shaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitBlobsRequestBuilderInternal instantiates a new ItemItemGitBlobsRequestBuilder and sets the default values. +func NewItemItemGitBlobsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitBlobsRequestBuilder) { + m := &ItemItemGitBlobsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/blobs", pathParameters), + } + return m +} +// NewItemItemGitBlobsRequestBuilder instantiates a new ItemItemGitBlobsRequestBuilder and sets the default values. +func NewItemItemGitBlobsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitBlobsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitBlobsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post create a blob +// returns a ShortBlobable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/blobs#create-a-blob +func (m *ItemItemGitBlobsRequestBuilder) Post(ctx context.Context, body ItemItemGitBlobsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ShortBlobable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateShortBlobFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ShortBlobable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemGitBlobsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitBlobsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitBlobsRequestBuilder when successful +func (m *ItemItemGitBlobsRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitBlobsRequestBuilder) { + return NewItemItemGitBlobsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go b/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go new file mode 100644 index 0000000..1bb1853 --- /dev/null +++ b/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitBlobsWithFile_shaItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\blobs\{file_sha} +type ItemItemGitBlobsWithFile_shaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGitBlobsWithFile_shaItemRequestBuilderInternal instantiates a new ItemItemGitBlobsWithFile_shaItemRequestBuilder and sets the default values. +func NewItemItemGitBlobsWithFile_shaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitBlobsWithFile_shaItemRequestBuilder) { + m := &ItemItemGitBlobsWithFile_shaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/blobs/{file_sha}", pathParameters), + } + return m +} +// NewItemItemGitBlobsWithFile_shaItemRequestBuilder instantiates a new ItemItemGitBlobsWithFile_shaItemRequestBuilder and sets the default values. +func NewItemItemGitBlobsWithFile_shaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitBlobsWithFile_shaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitBlobsWithFile_shaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the `content` in the response will always be Base64 encoded.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw blob data.- **`application/vnd.github+json`**: Returns a JSON representation of the blob with `content` as a base64 encoded string. This is the default if no media type is specified.**Note** This endpoint supports blobs up to 100 megabytes in size. +// returns a Blobable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/blobs#get-a-blob +func (m *ItemItemGitBlobsWithFile_shaItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Blobable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBlobFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Blobable), nil +} +// ToGetRequestInformation the `content` in the response will always be Base64 encoded.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw blob data.- **`application/vnd.github+json`**: Returns a JSON representation of the blob with `content` as a base64 encoded string. This is the default if no media type is specified.**Note** This endpoint supports blobs up to 100 megabytes in size. +// returns a *RequestInformation when successful +func (m *ItemItemGitBlobsWithFile_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitBlobsWithFile_shaItemRequestBuilder when successful +func (m *ItemItemGitBlobsWithFile_shaItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitBlobsWithFile_shaItemRequestBuilder) { + return NewItemItemGitBlobsWithFile_shaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_commits_post_request_body.go b/pkg/github/repos/item_item_git_commits_post_request_body.go new file mode 100644 index 0000000..76c2644 --- /dev/null +++ b/pkg/github/repos/item_item_git_commits_post_request_body.go @@ -0,0 +1,231 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitCommitsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. + author ItemItemGitCommitsPostRequestBody_authorable + // Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. + committer ItemItemGitCommitsPostRequestBody_committerable + // The commit message + message *string + // The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + parents []string + // The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. + signature *string + // The SHA of the tree object this commit points to + tree *string +} +// NewItemItemGitCommitsPostRequestBody instantiates a new ItemItemGitCommitsPostRequestBody and sets the default values. +func NewItemItemGitCommitsPostRequestBody()(*ItemItemGitCommitsPostRequestBody) { + m := &ItemItemGitCommitsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitCommitsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitCommitsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitCommitsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitCommitsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAuthor gets the author property value. Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. +// returns a ItemItemGitCommitsPostRequestBody_authorable when successful +func (m *ItemItemGitCommitsPostRequestBody) GetAuthor()(ItemItemGitCommitsPostRequestBody_authorable) { + return m.author +} +// GetCommitter gets the committer property value. Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. +// returns a ItemItemGitCommitsPostRequestBody_committerable when successful +func (m *ItemItemGitCommitsPostRequestBody) GetCommitter()(ItemItemGitCommitsPostRequestBody_committerable) { + return m.committer +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitCommitsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemGitCommitsPostRequestBody_authorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(ItemItemGitCommitsPostRequestBody_authorable)) + } + return nil + } + res["committer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemGitCommitsPostRequestBody_committerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCommitter(val.(ItemItemGitCommitsPostRequestBody_committerable)) + } + 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 + } + res["parents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetParents(res) + } + return nil + } + res["signature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignature(val) + } + return nil + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTree(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The commit message +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody) GetMessage()(*string) { + return m.message +} +// GetParents gets the parents property value. The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. +// returns a []string when successful +func (m *ItemItemGitCommitsPostRequestBody) GetParents()([]string) { + return m.parents +} +// GetSignature gets the signature property value. The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody) GetSignature()(*string) { + return m.signature +} +// GetTree gets the tree property value. The SHA of the tree object this commit points to +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody) GetTree()(*string) { + return m.tree +} +// Serialize serializes information the current object +func (m *ItemItemGitCommitsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("committer", m.GetCommitter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + if m.GetParents() != nil { + err := writer.WriteCollectionOfStringValues("parents", m.GetParents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signature", m.GetSignature()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tree", m.GetTree()) + 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 *ItemItemGitCommitsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAuthor sets the author property value. Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. +func (m *ItemItemGitCommitsPostRequestBody) SetAuthor(value ItemItemGitCommitsPostRequestBody_authorable)() { + m.author = value +} +// SetCommitter sets the committer property value. Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. +func (m *ItemItemGitCommitsPostRequestBody) SetCommitter(value ItemItemGitCommitsPostRequestBody_committerable)() { + m.committer = value +} +// SetMessage sets the message property value. The commit message +func (m *ItemItemGitCommitsPostRequestBody) SetMessage(value *string)() { + m.message = value +} +// SetParents sets the parents property value. The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. +func (m *ItemItemGitCommitsPostRequestBody) SetParents(value []string)() { + m.parents = value +} +// SetSignature sets the signature property value. The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. +func (m *ItemItemGitCommitsPostRequestBody) SetSignature(value *string)() { + m.signature = value +} +// SetTree sets the tree property value. The SHA of the tree object this commit points to +func (m *ItemItemGitCommitsPostRequestBody) SetTree(value *string)() { + m.tree = value +} +type ItemItemGitCommitsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(ItemItemGitCommitsPostRequestBody_authorable) + GetCommitter()(ItemItemGitCommitsPostRequestBody_committerable) + GetMessage()(*string) + GetParents()([]string) + GetSignature()(*string) + GetTree()(*string) + SetAuthor(value ItemItemGitCommitsPostRequestBody_authorable)() + SetCommitter(value ItemItemGitCommitsPostRequestBody_committerable)() + SetMessage(value *string)() + SetParents(value []string)() + SetSignature(value *string)() + SetTree(value *string)() +} diff --git a/pkg/github/repos/item_item_git_commits_post_request_body_author.go b/pkg/github/repos/item_item_git_commits_post_request_body_author.go new file mode 100644 index 0000000..7f6fdae --- /dev/null +++ b/pkg/github/repos/item_item_git_commits_post_request_body_author.go @@ -0,0 +1,140 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemGitCommitsPostRequestBody_author information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. +type ItemItemGitCommitsPostRequestBody_author struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The email of the author (or committer) of the commit + email *string + // The name of the author (or committer) of the commit + name *string +} +// NewItemItemGitCommitsPostRequestBody_author instantiates a new ItemItemGitCommitsPostRequestBody_author and sets the default values. +func NewItemItemGitCommitsPostRequestBody_author()(*ItemItemGitCommitsPostRequestBody_author) { + m := &ItemItemGitCommitsPostRequestBody_author{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitCommitsPostRequestBody_authorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitCommitsPostRequestBody_authorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitCommitsPostRequestBody_author(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitCommitsPostRequestBody_author) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *ItemItemGitCommitsPostRequestBody_author) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. The email of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody_author) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitCommitsPostRequestBody_author) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody_author) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemGitCommitsPostRequestBody_author) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemGitCommitsPostRequestBody_author) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *ItemItemGitCommitsPostRequestBody_author) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. The email of the author (or committer) of the commit +func (m *ItemItemGitCommitsPostRequestBody_author) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author (or committer) of the commit +func (m *ItemItemGitCommitsPostRequestBody_author) SetName(value *string)() { + m.name = value +} +type ItemItemGitCommitsPostRequestBody_authorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_git_commits_post_request_body_committer.go b/pkg/github/repos/item_item_git_commits_post_request_body_committer.go new file mode 100644 index 0000000..05ab58b --- /dev/null +++ b/pkg/github/repos/item_item_git_commits_post_request_body_committer.go @@ -0,0 +1,140 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemGitCommitsPostRequestBody_committer information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. +type ItemItemGitCommitsPostRequestBody_committer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The email of the author (or committer) of the commit + email *string + // The name of the author (or committer) of the commit + name *string +} +// NewItemItemGitCommitsPostRequestBody_committer instantiates a new ItemItemGitCommitsPostRequestBody_committer and sets the default values. +func NewItemItemGitCommitsPostRequestBody_committer()(*ItemItemGitCommitsPostRequestBody_committer) { + m := &ItemItemGitCommitsPostRequestBody_committer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitCommitsPostRequestBody_committerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitCommitsPostRequestBody_committerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitCommitsPostRequestBody_committer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitCommitsPostRequestBody_committer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *ItemItemGitCommitsPostRequestBody_committer) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. The email of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody_committer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitCommitsPostRequestBody_committer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author (or committer) of the commit +// returns a *string when successful +func (m *ItemItemGitCommitsPostRequestBody_committer) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemGitCommitsPostRequestBody_committer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemGitCommitsPostRequestBody_committer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *ItemItemGitCommitsPostRequestBody_committer) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. The email of the author (or committer) of the commit +func (m *ItemItemGitCommitsPostRequestBody_committer) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author (or committer) of the commit +func (m *ItemItemGitCommitsPostRequestBody_committer) SetName(value *string)() { + m.name = value +} +type ItemItemGitCommitsPostRequestBody_committerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_git_commits_request_builder.go b/pkg/github/repos/item_item_git_commits_request_builder.go new file mode 100644 index 0000000..90029cd --- /dev/null +++ b/pkg/github/repos/item_item_git_commits_request_builder.go @@ -0,0 +1,81 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitCommitsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\commits +type ItemItemGitCommitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCommit_sha gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.commits.item collection +// returns a *ItemItemGitCommitsWithCommit_shaItemRequestBuilder when successful +func (m *ItemItemGitCommitsRequestBuilder) ByCommit_sha(commit_sha string)(*ItemItemGitCommitsWithCommit_shaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if commit_sha != "" { + urlTplParams["commit_sha"] = commit_sha + } + return NewItemItemGitCommitsWithCommit_shaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitCommitsRequestBuilderInternal instantiates a new ItemItemGitCommitsRequestBuilder and sets the default values. +func NewItemItemGitCommitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitCommitsRequestBuilder) { + m := &ItemItemGitCommitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/commits", pathParameters), + } + return m +} +// NewItemItemGitCommitsRequestBuilder instantiates a new ItemItemGitCommitsRequestBuilder and sets the default values. +func NewItemItemGitCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitCommitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitCommitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a GitCommitable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/commits#create-a-commit +func (m *ItemItemGitCommitsRequestBuilder) Post(ctx context.Context, body ItemItemGitCommitsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitCommitable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitCommitable), nil +} +// ToPostRequestInformation creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemGitCommitsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitCommitsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitCommitsRequestBuilder when successful +func (m *ItemItemGitCommitsRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitCommitsRequestBuilder) { + return NewItemItemGitCommitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go b/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go new file mode 100644 index 0000000..9f51f32 --- /dev/null +++ b/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitCommitsWithCommit_shaItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\commits\{commit_sha} +type ItemItemGitCommitsWithCommit_shaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGitCommitsWithCommit_shaItemRequestBuilderInternal instantiates a new ItemItemGitCommitsWithCommit_shaItemRequestBuilder and sets the default values. +func NewItemItemGitCommitsWithCommit_shaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitCommitsWithCommit_shaItemRequestBuilder) { + m := &ItemItemGitCommitsWithCommit_shaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/commits/{commit_sha}", pathParameters), + } + return m +} +// NewItemItemGitCommitsWithCommit_shaItemRequestBuilder instantiates a new ItemItemGitCommitsWithCommit_shaItemRequestBuilder and sets the default values. +func NewItemItemGitCommitsWithCommit_shaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitCommitsWithCommit_shaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitCommitsWithCommit_shaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a GitCommitable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/commits#get-a-commit-object +func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitCommitable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitCommitable), nil +} +// ToGetRequestInformation gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitCommitsWithCommit_shaItemRequestBuilder when successful +func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitCommitsWithCommit_shaItemRequestBuilder) { + return NewItemItemGitCommitsWithCommit_shaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_matching_refs_request_builder.go b/pkg/github/repos/item_item_git_matching_refs_request_builder.go new file mode 100644 index 0000000..fdb48f1 --- /dev/null +++ b/pkg/github/repos/item_item_git_matching_refs_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemGitMatchingRefsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\matching-refs +type ItemItemGitMatchingRefsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRef gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.matchingRefs.item collection +// returns a *ItemItemGitMatchingRefsWithRefItemRequestBuilder when successful +func (m *ItemItemGitMatchingRefsRequestBuilder) ByRef(ref string)(*ItemItemGitMatchingRefsWithRefItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ref != "" { + urlTplParams["ref"] = ref + } + return NewItemItemGitMatchingRefsWithRefItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitMatchingRefsRequestBuilderInternal instantiates a new ItemItemGitMatchingRefsRequestBuilder and sets the default values. +func NewItemItemGitMatchingRefsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitMatchingRefsRequestBuilder) { + m := &ItemItemGitMatchingRefsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/matching-refs", pathParameters), + } + return m +} +// NewItemItemGitMatchingRefsRequestBuilder instantiates a new ItemItemGitMatchingRefsRequestBuilder and sets the default values. +func NewItemItemGitMatchingRefsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitMatchingRefsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitMatchingRefsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go b/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go new file mode 100644 index 0000000..a16f90c --- /dev/null +++ b/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go @@ -0,0 +1,64 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitMatchingRefsWithRefItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\matching-refs\{ref} +type ItemItemGitMatchingRefsWithRefItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGitMatchingRefsWithRefItemRequestBuilderInternal instantiates a new ItemItemGitMatchingRefsWithRefItemRequestBuilder and sets the default values. +func NewItemItemGitMatchingRefsWithRefItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitMatchingRefsWithRefItemRequestBuilder) { + m := &ItemItemGitMatchingRefsWithRefItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/matching-refs/{ref}", pathParameters), + } + return m +} +// NewItemItemGitMatchingRefsWithRefItemRequestBuilder instantiates a new ItemItemGitMatchingRefsWithRefItemRequestBuilder and sets the default values. +func NewItemItemGitMatchingRefsWithRefItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitMatchingRefsWithRefItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitMatchingRefsWithRefItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.**Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. +// returns a []GitRefable when successful +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/refs#list-matching-references +func (m *ItemItemGitMatchingRefsWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitRefFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable) + } + } + return val, nil +} +// ToGetRequestInformation returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.**Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. +// returns a *RequestInformation when successful +func (m *ItemItemGitMatchingRefsWithRefItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitMatchingRefsWithRefItemRequestBuilder when successful +func (m *ItemItemGitMatchingRefsWithRefItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitMatchingRefsWithRefItemRequestBuilder) { + return NewItemItemGitMatchingRefsWithRefItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_ref_request_builder.go b/pkg/github/repos/item_item_git_ref_request_builder.go new file mode 100644 index 0000000..6c83a52 --- /dev/null +++ b/pkg/github/repos/item_item_git_ref_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemGitRefRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\ref +type ItemItemGitRefRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRef gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.ref.item collection +// returns a *ItemItemGitRefWithRefItemRequestBuilder when successful +func (m *ItemItemGitRefRequestBuilder) ByRef(ref string)(*ItemItemGitRefWithRefItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ref != "" { + urlTplParams["ref"] = ref + } + return NewItemItemGitRefWithRefItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitRefRequestBuilderInternal instantiates a new ItemItemGitRefRequestBuilder and sets the default values. +func NewItemItemGitRefRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefRequestBuilder) { + m := &ItemItemGitRefRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/ref", pathParameters), + } + return m +} +// NewItemItemGitRefRequestBuilder instantiates a new ItemItemGitRefRequestBuilder and sets the default values. +func NewItemItemGitRefRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitRefRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go b/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go new file mode 100644 index 0000000..e2287e2 --- /dev/null +++ b/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitRefWithRefItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\ref\{ref} +type ItemItemGitRefWithRefItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGitRefWithRefItemRequestBuilderInternal instantiates a new ItemItemGitRefWithRefItemRequestBuilder and sets the default values. +func NewItemItemGitRefWithRefItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefWithRefItemRequestBuilder) { + m := &ItemItemGitRefWithRefItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/ref/{ref}", pathParameters), + } + return m +} +// NewItemItemGitRefWithRefItemRequestBuilder instantiates a new ItemItemGitRefWithRefItemRequestBuilder and sets the default values. +func NewItemItemGitRefWithRefItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefWithRefItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitRefWithRefItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.**Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". +// returns a GitRefable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/refs#get-a-reference +func (m *ItemItemGitRefWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitRefFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable), nil +} +// ToGetRequestInformation returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.**Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". +// returns a *RequestInformation when successful +func (m *ItemItemGitRefWithRefItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitRefWithRefItemRequestBuilder when successful +func (m *ItemItemGitRefWithRefItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitRefWithRefItemRequestBuilder) { + return NewItemItemGitRefWithRefItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_refs_item_with_ref_patch_request_body.go b/pkg/github/repos/item_item_git_refs_item_with_ref_patch_request_body.go new file mode 100644 index 0000000..3ba5f77 --- /dev/null +++ b/pkg/github/repos/item_item_git_refs_item_with_ref_patch_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitRefsItemWithRefPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + force *bool + // The SHA1 value to set this reference to + sha *string +} +// NewItemItemGitRefsItemWithRefPatchRequestBody instantiates a new ItemItemGitRefsItemWithRefPatchRequestBody and sets the default values. +func NewItemItemGitRefsItemWithRefPatchRequestBody()(*ItemItemGitRefsItemWithRefPatchRequestBody) { + m := &ItemItemGitRefsItemWithRefPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitRefsItemWithRefPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitRefsItemWithRefPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitRefsItemWithRefPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["force"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetForce(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetForce gets the force property value. Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. +// returns a *bool when successful +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) GetForce()(*bool) { + return m.force +} +// GetSha gets the sha property value. The SHA1 value to set this reference to +// returns a *string when successful +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("force", m.GetForce()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ItemItemGitRefsItemWithRefPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetForce sets the force property value. Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) SetForce(value *bool)() { + m.force = value +} +// SetSha sets the sha property value. The SHA1 value to set this reference to +func (m *ItemItemGitRefsItemWithRefPatchRequestBody) SetSha(value *string)() { + m.sha = value +} +type ItemItemGitRefsItemWithRefPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetForce()(*bool) + GetSha()(*string) + SetForce(value *bool)() + SetSha(value *string)() +} diff --git a/pkg/github/repos/item_item_git_refs_post_request_body.go b/pkg/github/repos/item_item_git_refs_post_request_body.go new file mode 100644 index 0000000..2b225bf --- /dev/null +++ b/pkg/github/repos/item_item_git_refs_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitRefsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. + ref *string + // The SHA1 value for this reference. + sha *string +} +// NewItemItemGitRefsPostRequestBody instantiates a new ItemItemGitRefsPostRequestBody and sets the default values. +func NewItemItemGitRefsPostRequestBody()(*ItemItemGitRefsPostRequestBody) { + m := &ItemItemGitRefsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitRefsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitRefsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitRefsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitRefsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitRefsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetRef gets the ref property value. The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. +// returns a *string when successful +func (m *ItemItemGitRefsPostRequestBody) GetRef()(*string) { + return m.ref +} +// GetSha gets the sha property value. The SHA1 value for this reference. +// returns a *string when successful +func (m *ItemItemGitRefsPostRequestBody) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ItemItemGitRefsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ItemItemGitRefsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRef sets the ref property value. The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. +func (m *ItemItemGitRefsPostRequestBody) SetRef(value *string)() { + m.ref = value +} +// SetSha sets the sha property value. The SHA1 value for this reference. +func (m *ItemItemGitRefsPostRequestBody) SetSha(value *string)() { + m.sha = value +} +type ItemItemGitRefsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRef()(*string) + GetSha()(*string) + SetRef(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/repos/item_item_git_refs_request_builder.go b/pkg/github/repos/item_item_git_refs_request_builder.go new file mode 100644 index 0000000..a34e81a --- /dev/null +++ b/pkg/github/repos/item_item_git_refs_request_builder.go @@ -0,0 +1,79 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitRefsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\refs +type ItemItemGitRefsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRef gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.refs.item collection +// returns a *ItemItemGitRefsWithRefItemRequestBuilder when successful +func (m *ItemItemGitRefsRequestBuilder) ByRef(ref string)(*ItemItemGitRefsWithRefItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ref != "" { + urlTplParams["ref"] = ref + } + return NewItemItemGitRefsWithRefItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitRefsRequestBuilderInternal instantiates a new ItemItemGitRefsRequestBuilder and sets the default values. +func NewItemItemGitRefsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefsRequestBuilder) { + m := &ItemItemGitRefsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/refs", pathParameters), + } + return m +} +// NewItemItemGitRefsRequestBuilder instantiates a new ItemItemGitRefsRequestBuilder and sets the default values. +func NewItemItemGitRefsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitRefsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. +// returns a GitRefable when successful +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference +func (m *ItemItemGitRefsRequestBuilder) Post(ctx context.Context, body ItemItemGitRefsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitRefFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable), nil +} +// ToPostRequestInformation creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. +// returns a *RequestInformation when successful +func (m *ItemItemGitRefsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitRefsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitRefsRequestBuilder when successful +func (m *ItemItemGitRefsRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitRefsRequestBuilder) { + return NewItemItemGitRefsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go b/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go new file mode 100644 index 0000000..28c1671 --- /dev/null +++ b/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go @@ -0,0 +1,96 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitRefsWithRefItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\refs\{ref} +type ItemItemGitRefsWithRefItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGitRefsWithRefItemRequestBuilderInternal instantiates a new ItemItemGitRefsWithRefItemRequestBuilder and sets the default values. +func NewItemItemGitRefsWithRefItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefsWithRefItemRequestBuilder) { + m := &ItemItemGitRefsWithRefItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/refs/{ref}", pathParameters), + } + return m +} +// NewItemItemGitRefsWithRefItemRequestBuilder instantiates a new ItemItemGitRefsWithRefItemRequestBuilder and sets the default values. +func NewItemItemGitRefsWithRefItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRefsWithRefItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitRefsWithRefItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes the provided reference. +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/refs#delete-a-reference +func (m *ItemItemGitRefsWithRefItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Patch updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. +// returns a GitRefable when successful +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/refs#update-a-reference +func (m *ItemItemGitRefsWithRefItemRequestBuilder) Patch(ctx context.Context, body ItemItemGitRefsItemWithRefPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitRefFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitRefable), nil +} +// ToDeleteRequestInformation deletes the provided reference. +// returns a *RequestInformation when successful +func (m *ItemItemGitRefsWithRefItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. +// returns a *RequestInformation when successful +func (m *ItemItemGitRefsWithRefItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemGitRefsItemWithRefPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitRefsWithRefItemRequestBuilder when successful +func (m *ItemItemGitRefsWithRefItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitRefsWithRefItemRequestBuilder) { + return NewItemItemGitRefsWithRefItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_request_builder.go b/pkg/github/repos/item_item_git_request_builder.go new file mode 100644 index 0000000..eb9451b --- /dev/null +++ b/pkg/github/repos/item_item_git_request_builder.go @@ -0,0 +1,58 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemGitRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git +type ItemItemGitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Blobs the blobs property +// returns a *ItemItemGitBlobsRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) Blobs()(*ItemItemGitBlobsRequestBuilder) { + return NewItemItemGitBlobsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commits the commits property +// returns a *ItemItemGitCommitsRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) Commits()(*ItemItemGitCommitsRequestBuilder) { + return NewItemItemGitCommitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitRequestBuilderInternal instantiates a new ItemItemGitRequestBuilder and sets the default values. +func NewItemItemGitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRequestBuilder) { + m := &ItemItemGitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git", pathParameters), + } + return m +} +// NewItemItemGitRequestBuilder instantiates a new ItemItemGitRequestBuilder and sets the default values. +func NewItemItemGitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitRequestBuilderInternal(urlParams, requestAdapter) +} +// MatchingRefs the matchingRefs property +// returns a *ItemItemGitMatchingRefsRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) MatchingRefs()(*ItemItemGitMatchingRefsRequestBuilder) { + return NewItemItemGitMatchingRefsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Ref the ref property +// returns a *ItemItemGitRefRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) Ref()(*ItemItemGitRefRequestBuilder) { + return NewItemItemGitRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Refs the refs property +// returns a *ItemItemGitRefsRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) Refs()(*ItemItemGitRefsRequestBuilder) { + return NewItemItemGitRefsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tags the tags property +// returns a *ItemItemGitTagsRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) Tags()(*ItemItemGitTagsRequestBuilder) { + return NewItemItemGitTagsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Trees the trees property +// returns a *ItemItemGitTreesRequestBuilder when successful +func (m *ItemItemGitRequestBuilder) Trees()(*ItemItemGitTreesRequestBuilder) { + return NewItemItemGitTreesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_git_tags_post_request_body.go b/pkg/github/repos/item_item_git_tags_post_request_body.go new file mode 100644 index 0000000..2e85db9 --- /dev/null +++ b/pkg/github/repos/item_item_git_tags_post_request_body.go @@ -0,0 +1,167 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitTagsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The tag message. + message *string + // The SHA of the git object this is tagging. + object *string + // The tag's name. This is typically a version (e.g., "v0.0.1"). + tag *string + // An object with information about the individual creating the tag. + tagger ItemItemGitTagsPostRequestBody_taggerable +} +// NewItemItemGitTagsPostRequestBody instantiates a new ItemItemGitTagsPostRequestBody and sets the default values. +func NewItemItemGitTagsPostRequestBody()(*ItemItemGitTagsPostRequestBody) { + m := &ItemItemGitTagsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitTagsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitTagsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitTagsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitTagsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitTagsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["object"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObject(val) + } + return nil + } + res["tag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTag(val) + } + return nil + } + res["tagger"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemGitTagsPostRequestBody_taggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTagger(val.(ItemItemGitTagsPostRequestBody_taggerable)) + } + return nil + } + return res +} +// GetMessage gets the message property value. The tag message. +// returns a *string when successful +func (m *ItemItemGitTagsPostRequestBody) GetMessage()(*string) { + return m.message +} +// GetObject gets the object property value. The SHA of the git object this is tagging. +// returns a *string when successful +func (m *ItemItemGitTagsPostRequestBody) GetObject()(*string) { + return m.object +} +// GetTag gets the tag property value. The tag's name. This is typically a version (e.g., "v0.0.1"). +// returns a *string when successful +func (m *ItemItemGitTagsPostRequestBody) GetTag()(*string) { + return m.tag +} +// GetTagger gets the tagger property value. An object with information about the individual creating the tag. +// returns a ItemItemGitTagsPostRequestBody_taggerable when successful +func (m *ItemItemGitTagsPostRequestBody) GetTagger()(ItemItemGitTagsPostRequestBody_taggerable) { + return m.tagger +} +// Serialize serializes information the current object +func (m *ItemItemGitTagsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("object", m.GetObject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tag", m.GetTag()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tagger", m.GetTagger()) + 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 *ItemItemGitTagsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The tag message. +func (m *ItemItemGitTagsPostRequestBody) SetMessage(value *string)() { + m.message = value +} +// SetObject sets the object property value. The SHA of the git object this is tagging. +func (m *ItemItemGitTagsPostRequestBody) SetObject(value *string)() { + m.object = value +} +// SetTag sets the tag property value. The tag's name. This is typically a version (e.g., "v0.0.1"). +func (m *ItemItemGitTagsPostRequestBody) SetTag(value *string)() { + m.tag = value +} +// SetTagger sets the tagger property value. An object with information about the individual creating the tag. +func (m *ItemItemGitTagsPostRequestBody) SetTagger(value ItemItemGitTagsPostRequestBody_taggerable)() { + m.tagger = value +} +type ItemItemGitTagsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetObject()(*string) + GetTag()(*string) + GetTagger()(ItemItemGitTagsPostRequestBody_taggerable) + SetMessage(value *string)() + SetObject(value *string)() + SetTag(value *string)() + SetTagger(value ItemItemGitTagsPostRequestBody_taggerable)() +} diff --git a/pkg/github/repos/item_item_git_tags_post_request_body_tagger.go b/pkg/github/repos/item_item_git_tags_post_request_body_tagger.go new file mode 100644 index 0000000..a952dc9 --- /dev/null +++ b/pkg/github/repos/item_item_git_tags_post_request_body_tagger.go @@ -0,0 +1,140 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemGitTagsPostRequestBody_tagger an object with information about the individual creating the tag. +type ItemItemGitTagsPostRequestBody_tagger struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The email of the author of the tag + email *string + // The name of the author of the tag + name *string +} +// NewItemItemGitTagsPostRequestBody_tagger instantiates a new ItemItemGitTagsPostRequestBody_tagger and sets the default values. +func NewItemItemGitTagsPostRequestBody_tagger()(*ItemItemGitTagsPostRequestBody_tagger) { + m := &ItemItemGitTagsPostRequestBody_tagger{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitTagsPostRequestBody_taggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitTagsPostRequestBody_taggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitTagsPostRequestBody_tagger(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitTagsPostRequestBody_tagger) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *ItemItemGitTagsPostRequestBody_tagger) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetEmail gets the email property value. The email of the author of the tag +// returns a *string when successful +func (m *ItemItemGitTagsPostRequestBody_tagger) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitTagsPostRequestBody_tagger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the author of the tag +// returns a *string when successful +func (m *ItemItemGitTagsPostRequestBody_tagger) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemGitTagsPostRequestBody_tagger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemGitTagsPostRequestBody_tagger) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *ItemItemGitTagsPostRequestBody_tagger) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetEmail sets the email property value. The email of the author of the tag +func (m *ItemItemGitTagsPostRequestBody_tagger) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name of the author of the tag +func (m *ItemItemGitTagsPostRequestBody_tagger) SetName(value *string)() { + m.name = value +} +type ItemItemGitTagsPostRequestBody_taggerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetName()(*string) + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_git_tags_request_builder.go b/pkg/github/repos/item_item_git_tags_request_builder.go new file mode 100644 index 0000000..9d938f1 --- /dev/null +++ b/pkg/github/repos/item_item_git_tags_request_builder.go @@ -0,0 +1,79 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitTagsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\tags +type ItemItemGitTagsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTag_sha gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.tags.item collection +// returns a *ItemItemGitTagsWithTag_shaItemRequestBuilder when successful +func (m *ItemItemGitTagsRequestBuilder) ByTag_sha(tag_sha string)(*ItemItemGitTagsWithTag_shaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if tag_sha != "" { + urlTplParams["tag_sha"] = tag_sha + } + return NewItemItemGitTagsWithTag_shaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitTagsRequestBuilderInternal instantiates a new ItemItemGitTagsRequestBuilder and sets the default values. +func NewItemItemGitTagsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTagsRequestBuilder) { + m := &ItemItemGitTagsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/tags", pathParameters), + } + return m +} +// NewItemItemGitTagsRequestBuilder instantiates a new ItemItemGitTagsRequestBuilder and sets the default values. +func NewItemItemGitTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTagsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitTagsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a GitTagable when successful +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/tags#create-a-tag-object +func (m *ItemItemGitTagsRequestBuilder) Post(ctx context.Context, body ItemItemGitTagsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTagable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitTagFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTagable), nil +} +// ToPostRequestInformation note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemGitTagsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitTagsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitTagsRequestBuilder when successful +func (m *ItemItemGitTagsRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitTagsRequestBuilder) { + return NewItemItemGitTagsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go b/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go new file mode 100644 index 0000000..893af3a --- /dev/null +++ b/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitTagsWithTag_shaItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\tags\{tag_sha} +type ItemItemGitTagsWithTag_shaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemGitTagsWithTag_shaItemRequestBuilderInternal instantiates a new ItemItemGitTagsWithTag_shaItemRequestBuilder and sets the default values. +func NewItemItemGitTagsWithTag_shaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTagsWithTag_shaItemRequestBuilder) { + m := &ItemItemGitTagsWithTag_shaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/tags/{tag_sha}", pathParameters), + } + return m +} +// NewItemItemGitTagsWithTag_shaItemRequestBuilder instantiates a new ItemItemGitTagsWithTag_shaItemRequestBuilder and sets the default values. +func NewItemItemGitTagsWithTag_shaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTagsWithTag_shaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitTagsWithTag_shaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a GitTagable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/tags#get-a-tag +func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTagable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitTagFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTagable), nil +} +// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// returns a *RequestInformation when successful +func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitTagsWithTag_shaItemRequestBuilder when successful +func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitTagsWithTag_shaItemRequestBuilder) { + return NewItemItemGitTagsWithTag_shaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_trees_post_request_body.go b/pkg/github/repos/item_item_git_trees_post_request_body.go new file mode 100644 index 0000000..5a10e21 --- /dev/null +++ b/pkg/github/repos/item_item_git_trees_post_request_body.go @@ -0,0 +1,121 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitTreesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + base_tree *string + // Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + tree []ItemItemGitTreesPostRequestBody_treeable +} +// NewItemItemGitTreesPostRequestBody instantiates a new ItemItemGitTreesPostRequestBody and sets the default values. +func NewItemItemGitTreesPostRequestBody()(*ItemItemGitTreesPostRequestBody) { + m := &ItemItemGitTreesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitTreesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitTreesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitTreesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitTreesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBaseTree gets the base_tree property value. The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. +// returns a *string when successful +func (m *ItemItemGitTreesPostRequestBody) GetBaseTree()(*string) { + return m.base_tree +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitTreesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseTree(val) + } + return nil + } + res["tree"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemGitTreesPostRequestBody_treeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemGitTreesPostRequestBody_treeable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemGitTreesPostRequestBody_treeable) + } + } + m.SetTree(res) + } + return nil + } + return res +} +// GetTree gets the tree property value. Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. +// returns a []ItemItemGitTreesPostRequestBody_treeable when successful +func (m *ItemItemGitTreesPostRequestBody) GetTree()([]ItemItemGitTreesPostRequestBody_treeable) { + return m.tree +} +// Serialize serializes information the current object +func (m *ItemItemGitTreesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("base_tree", m.GetBaseTree()) + if err != nil { + return err + } + } + if m.GetTree() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTree())) + for i, v := range m.GetTree() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("tree", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemGitTreesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBaseTree sets the base_tree property value. The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. +func (m *ItemItemGitTreesPostRequestBody) SetBaseTree(value *string)() { + m.base_tree = value +} +// SetTree sets the tree property value. Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. +func (m *ItemItemGitTreesPostRequestBody) SetTree(value []ItemItemGitTreesPostRequestBody_treeable)() { + m.tree = value +} +type ItemItemGitTreesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseTree()(*string) + GetTree()([]ItemItemGitTreesPostRequestBody_treeable) + SetBaseTree(value *string)() + SetTree(value []ItemItemGitTreesPostRequestBody_treeable)() +} diff --git a/pkg/github/repos/item_item_git_trees_post_request_body_tree.go b/pkg/github/repos/item_item_git_trees_post_request_body_tree.go new file mode 100644 index 0000000..80f0fba --- /dev/null +++ b/pkg/github/repos/item_item_git_trees_post_request_body_tree.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemGitTreesPostRequestBody_tree struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + content *string + // The file referenced in the tree. + path *string + // The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + sha *string +} +// NewItemItemGitTreesPostRequestBody_tree instantiates a new ItemItemGitTreesPostRequestBody_tree and sets the default values. +func NewItemItemGitTreesPostRequestBody_tree()(*ItemItemGitTreesPostRequestBody_tree) { + m := &ItemItemGitTreesPostRequestBody_tree{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemGitTreesPostRequestBody_treeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemGitTreesPostRequestBody_treeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemGitTreesPostRequestBody_tree(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemGitTreesPostRequestBody_tree) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContent gets the content property value. The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. +// returns a *string when successful +func (m *ItemItemGitTreesPostRequestBody_tree) GetContent()(*string) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemGitTreesPostRequestBody_tree) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetPath gets the path property value. The file referenced in the tree. +// returns a *string when successful +func (m *ItemItemGitTreesPostRequestBody_tree) GetPath()(*string) { + return m.path +} +// GetSha gets the sha property value. The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. +// returns a *string when successful +func (m *ItemItemGitTreesPostRequestBody_tree) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ItemItemGitTreesPostRequestBody_tree) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ItemItemGitTreesPostRequestBody_tree) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContent sets the content property value. The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. +func (m *ItemItemGitTreesPostRequestBody_tree) SetContent(value *string)() { + m.content = value +} +// SetPath sets the path property value. The file referenced in the tree. +func (m *ItemItemGitTreesPostRequestBody_tree) SetPath(value *string)() { + m.path = value +} +// SetSha sets the sha property value. The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. +func (m *ItemItemGitTreesPostRequestBody_tree) SetSha(value *string)() { + m.sha = value +} +type ItemItemGitTreesPostRequestBody_treeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetPath()(*string) + GetSha()(*string) + SetContent(value *string)() + SetPath(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/repos/item_item_git_trees_request_builder.go b/pkg/github/repos/item_item_git_trees_request_builder.go new file mode 100644 index 0000000..2808290 --- /dev/null +++ b/pkg/github/repos/item_item_git_trees_request_builder.go @@ -0,0 +1,83 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitTreesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\trees +type ItemItemGitTreesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTree_sha gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.git.trees.item collection +// returns a *ItemItemGitTreesWithTree_shaItemRequestBuilder when successful +func (m *ItemItemGitTreesRequestBuilder) ByTree_sha(tree_sha string)(*ItemItemGitTreesWithTree_shaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if tree_sha != "" { + urlTplParams["tree_sha"] = tree_sha + } + return NewItemItemGitTreesWithTree_shaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemGitTreesRequestBuilderInternal instantiates a new ItemItemGitTreesRequestBuilder and sets the default values. +func NewItemItemGitTreesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTreesRequestBuilder) { + m := &ItemItemGitTreesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/trees", pathParameters), + } + return m +} +// NewItemItemGitTreesRequestBuilder instantiates a new ItemItemGitTreesRequestBuilder and sets the default values. +func NewItemItemGitTreesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTreesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitTreesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post the tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/enterprise-cloud@latest//rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#update-a-reference)."Returns an error if you try to delete a file that does not exist. +// returns a GitTreeable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/trees#create-a-tree +func (m *ItemItemGitTreesRequestBuilder) Post(ctx context.Context, body ItemItemGitTreesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTreeable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitTreeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTreeable), nil +} +// ToPostRequestInformation the tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/enterprise-cloud@latest//rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#update-a-reference)."Returns an error if you try to delete a file that does not exist. +// returns a *RequestInformation when successful +func (m *ItemItemGitTreesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitTreesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitTreesRequestBuilder when successful +func (m *ItemItemGitTreesRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitTreesRequestBuilder) { + return NewItemItemGitTreesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go b/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go new file mode 100644 index 0000000..1aa1d9b --- /dev/null +++ b/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go @@ -0,0 +1,70 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemGitTreesWithTree_shaItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\trees\{tree_sha} +type ItemItemGitTreesWithTree_shaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemGitTreesWithTree_shaItemRequestBuilderGetQueryParameters returns a single tree using the SHA1 value or ref name for that tree.If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.**Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. +type ItemItemGitTreesWithTree_shaItemRequestBuilderGetQueryParameters struct { + // Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. + Recursive *string `uriparametername:"recursive"` +} +// NewItemItemGitTreesWithTree_shaItemRequestBuilderInternal instantiates a new ItemItemGitTreesWithTree_shaItemRequestBuilder and sets the default values. +func NewItemItemGitTreesWithTree_shaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTreesWithTree_shaItemRequestBuilder) { + m := &ItemItemGitTreesWithTree_shaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/trees/{tree_sha}{?recursive*}", pathParameters), + } + return m +} +// NewItemItemGitTreesWithTree_shaItemRequestBuilder instantiates a new ItemItemGitTreesWithTree_shaItemRequestBuilder and sets the default values. +func NewItemItemGitTreesWithTree_shaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemGitTreesWithTree_shaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemGitTreesWithTree_shaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a single tree using the SHA1 value or ref name for that tree.If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.**Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. +// returns a GitTreeable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/git/trees#get-a-tree +func (m *ItemItemGitTreesWithTree_shaItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemGitTreesWithTree_shaItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTreeable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGitTreeFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GitTreeable), nil +} +// ToGetRequestInformation returns a single tree using the SHA1 value or ref name for that tree.If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.**Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. +// returns a *RequestInformation when successful +func (m *ItemItemGitTreesWithTree_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemGitTreesWithTree_shaItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemGitTreesWithTree_shaItemRequestBuilder when successful +func (m *ItemItemGitTreesWithTree_shaItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemGitTreesWithTree_shaItemRequestBuilder) { + return NewItemItemGitTreesWithTree_shaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_config_patch_request_body.go b/pkg/github/repos/item_item_hooks_item_config_patch_request_body.go new file mode 100644 index 0000000..c1224dd --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_config_patch_request_body.go @@ -0,0 +1,149 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemHooksItemConfigPatchRequestBody struct { + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string +} +// NewItemItemHooksItemConfigPatchRequestBody instantiates a new ItemItemHooksItemConfigPatchRequestBody and sets the default values. +func NewItemItemHooksItemConfigPatchRequestBody()(*ItemItemHooksItemConfigPatchRequestBody) { + m := &ItemItemHooksItemConfigPatchRequestBody{ + } + return m +} +// CreateItemItemHooksItemConfigPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemHooksItemConfigPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemHooksItemConfigPatchRequestBody(), nil +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *ItemItemHooksItemConfigPatchRequestBody) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemHooksItemConfigPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *ItemItemHooksItemConfigPatchRequestBody) GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *ItemItemHooksItemConfigPatchRequestBody) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *ItemItemHooksItemConfigPatchRequestBody) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ItemItemHooksItemConfigPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *ItemItemHooksItemConfigPatchRequestBody) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *ItemItemHooksItemConfigPatchRequestBody) SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *ItemItemHooksItemConfigPatchRequestBody) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *ItemItemHooksItemConfigPatchRequestBody) SetUrl(value *string)() { + m.url = value +} +type ItemItemHooksItemConfigPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_hooks_item_config_request_builder.go b/pkg/github/repos/item_item_hooks_item_config_request_builder.go new file mode 100644 index 0000000..e83707d --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_config_request_builder.go @@ -0,0 +1,88 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksItemConfigRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\config +type ItemItemHooksItemConfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemHooksItemConfigRequestBuilderInternal instantiates a new ItemItemHooksItemConfigRequestBuilder and sets the default values. +func NewItemItemHooksItemConfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemConfigRequestBuilder) { + m := &ItemItemHooksItemConfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/config", pathParameters), + } + return m +} +// NewItemItemHooksItemConfigRequestBuilder instantiates a new ItemItemHooksItemConfigRequestBuilder and sets the default values. +func NewItemItemHooksItemConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemConfigRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksItemConfigRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/webhooks/repos#get-a-repository-webhook)."OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint. +// returns a WebhookConfigable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#get-a-webhook-configuration-for-a-repository +func (m *ItemItemHooksItemConfigRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable), nil +} +// Patch updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/webhooks/repos#update-a-repository-webhook)."OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint. +// returns a WebhookConfigable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#update-a-webhook-configuration-for-a-repository +func (m *ItemItemHooksItemConfigRequestBuilder) Patch(ctx context.Context, body ItemItemHooksItemConfigPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable), nil +} +// ToGetRequestInformation returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/webhooks/repos#get-a-repository-webhook)."OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemConfigRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/webhooks/repos#update-a-repository-webhook)."OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemConfigRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemHooksItemConfigPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksItemConfigRequestBuilder when successful +func (m *ItemItemHooksItemConfigRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksItemConfigRequestBuilder) { + return NewItemItemHooksItemConfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_deliveries_item_attempts_post_response.go b/pkg/github/repos/item_item_hooks_item_deliveries_item_attempts_post_response.go new file mode 100644 index 0000000..5637957 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_deliveries_item_attempts_post_response.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemHooksItemDeliveriesItemAttemptsPostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemHooksItemDeliveriesItemAttemptsPostResponse instantiates a new ItemItemHooksItemDeliveriesItemAttemptsPostResponse and sets the default values. +func NewItemItemHooksItemDeliveriesItemAttemptsPostResponse()(*ItemItemHooksItemDeliveriesItemAttemptsPostResponse) { + m := &ItemItemHooksItemDeliveriesItemAttemptsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemHooksItemDeliveriesItemAttemptsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemHooksItemDeliveriesItemAttemptsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemHooksItemDeliveriesItemAttemptsPostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemHooksItemDeliveriesItemAttemptsPostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemHooksItemDeliveriesItemAttemptsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemHooksItemDeliveriesItemAttemptsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemHooksItemDeliveriesItemAttemptsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemHooksItemDeliveriesItemAttemptsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_hooks_item_deliveries_item_attempts_request_builder.go b/pkg/github/repos/item_item_hooks_item_deliveries_item_attempts_request_builder.go new file mode 100644 index 0000000..8d32968 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_deliveries_item_attempts_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\deliveries\{delivery_id}\attempts +type ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal instantiates a new ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder and sets the default values. +func NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + m := &ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", pathParameters), + } + return m +} +// NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilder instantiates a new ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder and sets the default values. +func NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post redeliver a webhook delivery for a webhook configured in a repository. +// returns a ItemItemHooksItemDeliveriesItemAttemptsPostResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#redeliver-a-delivery-for-a-repository-webhook +func (m *ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemHooksItemDeliveriesItemAttemptsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemHooksItemDeliveriesItemAttemptsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemHooksItemDeliveriesItemAttemptsPostResponseable), nil +} +// ToPostRequestInformation redeliver a webhook delivery for a webhook configured in a repository. +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder when successful +func (m *ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + return NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go b/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go new file mode 100644 index 0000000..0ad96a6 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go @@ -0,0 +1,85 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksItemDeliveriesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\deliveries +type ItemItemHooksItemDeliveriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemHooksItemDeliveriesRequestBuilderGetQueryParameters returns a list of webhook deliveries for a webhook configured in a repository. +type ItemItemHooksItemDeliveriesRequestBuilderGetQueryParameters struct { + // Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. + Cursor *string `uriparametername:"cursor"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + Redelivery *bool `uriparametername:"redelivery"` +} +// ByDelivery_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.hooks.item.deliveries.item collection +// returns a *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder when successful +func (m *ItemItemHooksItemDeliveriesRequestBuilder) ByDelivery_id(delivery_id int32)(*ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["delivery_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(delivery_id), 10) + return NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemHooksItemDeliveriesRequestBuilderInternal instantiates a new ItemItemHooksItemDeliveriesRequestBuilder and sets the default values. +func NewItemItemHooksItemDeliveriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesRequestBuilder) { + m := &ItemItemHooksItemDeliveriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries{?cursor*,per_page*,redelivery*}", pathParameters), + } + return m +} +// NewItemItemHooksItemDeliveriesRequestBuilder instantiates a new ItemItemHooksItemDeliveriesRequestBuilder and sets the default values. +func NewItemItemHooksItemDeliveriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksItemDeliveriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a list of webhook deliveries for a webhook configured in a repository. +// returns a []HookDeliveryItemable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#list-deliveries-for-a-repository-webhook +func (m *ItemItemHooksItemDeliveriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemHooksItemDeliveriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookDeliveryItemFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryItemable) + } + } + return val, nil +} +// ToGetRequestInformation returns a list of webhook deliveries for a webhook configured in a repository. +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemDeliveriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemHooksItemDeliveriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksItemDeliveriesRequestBuilder when successful +func (m *ItemItemHooksItemDeliveriesRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksItemDeliveriesRequestBuilder) { + return NewItemItemHooksItemDeliveriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_deliveries_with_delivery_item_request_builder.go b/pkg/github/repos/item_item_hooks_item_deliveries_with_delivery_item_request_builder.go new file mode 100644 index 0000000..d2c7526 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_deliveries_with_delivery_item_request_builder.go @@ -0,0 +1,68 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\deliveries\{delivery_id} +type ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Attempts the attempts property +// returns a *ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder when successful +func (m *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) Attempts()(*ItemItemHooksItemDeliveriesItemAttemptsRequestBuilder) { + return NewItemItemHooksItemDeliveriesItemAttemptsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal instantiates a new ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder and sets the default values. +func NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + m := &ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries/{delivery_id}", pathParameters), + } + return m +} +// NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder instantiates a new ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder and sets the default values. +func NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a delivery for a webhook configured in a repository. +// returns a HookDeliveryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#get-a-delivery-for-a-repository-webhook +func (m *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookDeliveryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.HookDeliveryable), nil +} +// ToGetRequestInformation returns a delivery for a webhook configured in a repository. +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder when successful +func (m *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder) { + return NewItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_pings_request_builder.go b/pkg/github/repos/item_item_hooks_item_pings_request_builder.go new file mode 100644 index 0000000..1b4b248 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_pings_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksItemPingsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\pings +type ItemItemHooksItemPingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemHooksItemPingsRequestBuilderInternal instantiates a new ItemItemHooksItemPingsRequestBuilder and sets the default values. +func NewItemItemHooksItemPingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemPingsRequestBuilder) { + m := &ItemItemHooksItemPingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/pings", pathParameters), + } + return m +} +// NewItemItemHooksItemPingsRequestBuilder instantiates a new ItemItemHooksItemPingsRequestBuilder and sets the default values. +func NewItemItemHooksItemPingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemPingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksItemPingsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post this will trigger a [ping event](https://docs.github.com/enterprise-cloud@latest//webhooks/#ping-event) to be sent to the hook. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#ping-a-repository-webhook +func (m *ItemItemHooksItemPingsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation this will trigger a [ping event](https://docs.github.com/enterprise-cloud@latest//webhooks/#ping-event) to be sent to the hook. +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemPingsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksItemPingsRequestBuilder when successful +func (m *ItemItemHooksItemPingsRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksItemPingsRequestBuilder) { + return NewItemItemHooksItemPingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_tests_request_builder.go b/pkg/github/repos/item_item_hooks_item_tests_request_builder.go new file mode 100644 index 0000000..3782fa9 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_tests_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksItemTestsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\tests +type ItemItemHooksItemTestsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemHooksItemTestsRequestBuilderInternal instantiates a new ItemItemHooksItemTestsRequestBuilder and sets the default values. +func NewItemItemHooksItemTestsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemTestsRequestBuilder) { + m := &ItemItemHooksItemTestsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/tests", pathParameters), + } + return m +} +// NewItemItemHooksItemTestsRequestBuilder instantiates a new ItemItemHooksItemTestsRequestBuilder and sets the default values. +func NewItemItemHooksItemTestsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemTestsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksItemTestsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post this will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.**Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#test-the-push-repository-webhook +func (m *ItemItemHooksItemTestsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation this will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.**Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` +// returns a *RequestInformation when successful +func (m *ItemItemHooksItemTestsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksItemTestsRequestBuilder when successful +func (m *ItemItemHooksItemTestsRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksItemTestsRequestBuilder) { + return NewItemItemHooksItemTestsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_item_with_hook_patch_request_body.go b/pkg/github/repos/item_item_hooks_item_with_hook_patch_request_body.go new file mode 100644 index 0000000..74d16c6 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_item_with_hook_patch_request_body.go @@ -0,0 +1,215 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemHooksItemWithHook_PatchRequestBody struct { + // Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + active *bool + // Determines a list of events to be added to the list of events that the Hook triggers for. + add_events []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Configuration object of the webhook + config i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable + // Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + events []string + // Determines a list of events to be removed from the list of events that the Hook triggers for. + remove_events []string +} +// NewItemItemHooksItemWithHook_PatchRequestBody instantiates a new ItemItemHooksItemWithHook_PatchRequestBody and sets the default values. +func NewItemItemHooksItemWithHook_PatchRequestBody()(*ItemItemHooksItemWithHook_PatchRequestBody) { + m := &ItemItemHooksItemWithHook_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemHooksItemWithHook_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemHooksItemWithHook_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemHooksItemWithHook_PatchRequestBody(), nil +} +// GetActive gets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +// returns a *bool when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetActive()(*bool) { + return m.active +} +// GetAddEvents gets the add_events property value. Determines a list of events to be added to the list of events that the Hook triggers for. +// returns a []string when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetAddEvents()([]string) { + return m.add_events +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfig gets the config property value. Configuration object of the webhook +// returns a WebhookConfigable when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetConfig()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable) { + return m.config +} +// GetEvents gets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. +// returns a []string when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["add_events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAddEvents(res) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfig(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable)) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["remove_events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRemoveEvents(res) + } + return nil + } + return res +} +// GetRemoveEvents gets the remove_events property value. Determines a list of events to be removed from the list of events that the Hook triggers for. +// returns a []string when successful +func (m *ItemItemHooksItemWithHook_PatchRequestBody) GetRemoveEvents()([]string) { + return m.remove_events +} +// Serialize serializes information the current object +func (m *ItemItemHooksItemWithHook_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + if m.GetAddEvents() != nil { + err := writer.WriteCollectionOfStringValues("add_events", m.GetAddEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("config", m.GetConfig()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + if m.GetRemoveEvents() != nil { + err := writer.WriteCollectionOfStringValues("remove_events", m.GetRemoveEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +func (m *ItemItemHooksItemWithHook_PatchRequestBody) SetActive(value *bool)() { + m.active = value +} +// SetAddEvents sets the add_events property value. Determines a list of events to be added to the list of events that the Hook triggers for. +func (m *ItemItemHooksItemWithHook_PatchRequestBody) SetAddEvents(value []string)() { + m.add_events = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemHooksItemWithHook_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfig sets the config property value. Configuration object of the webhook +func (m *ItemItemHooksItemWithHook_PatchRequestBody) SetConfig(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable)() { + m.config = value +} +// SetEvents sets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. +func (m *ItemItemHooksItemWithHook_PatchRequestBody) SetEvents(value []string)() { + m.events = value +} +// SetRemoveEvents sets the remove_events property value. Determines a list of events to be removed from the list of events that the Hook triggers for. +func (m *ItemItemHooksItemWithHook_PatchRequestBody) SetRemoveEvents(value []string)() { + m.remove_events = value +} +type ItemItemHooksItemWithHook_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetAddEvents()([]string) + GetConfig()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable) + GetEvents()([]string) + GetRemoveEvents()([]string) + SetActive(value *bool)() + SetAddEvents(value []string)() + SetConfig(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigable)() + SetEvents(value []string)() + SetRemoveEvents(value []string)() +} diff --git a/pkg/github/repos/item_item_hooks_post_request_body.go b/pkg/github/repos/item_item_hooks_post_request_body.go new file mode 100644 index 0000000..26b73e5 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_post_request_body.go @@ -0,0 +1,154 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemHooksPostRequestBody struct { + // Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + active *bool + // Key/value pairs to provide settings for this webhook. + config ItemItemHooksPostRequestBody_configable + // Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. + events []string + // Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. + name *string +} +// NewItemItemHooksPostRequestBody instantiates a new ItemItemHooksPostRequestBody and sets the default values. +func NewItemItemHooksPostRequestBody()(*ItemItemHooksPostRequestBody) { + m := &ItemItemHooksPostRequestBody{ + } + return m +} +// CreateItemItemHooksPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemHooksPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemHooksPostRequestBody(), nil +} +// GetActive gets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +// returns a *bool when successful +func (m *ItemItemHooksPostRequestBody) GetActive()(*bool) { + return m.active +} +// GetConfig gets the config property value. Key/value pairs to provide settings for this webhook. +// returns a ItemItemHooksPostRequestBody_configable when successful +func (m *ItemItemHooksPostRequestBody) GetConfig()(ItemItemHooksPostRequestBody_configable) { + return m.config +} +// GetEvents gets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. +// returns a []string when successful +func (m *ItemItemHooksPostRequestBody) GetEvents()([]string) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemHooksPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["config"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemHooksPostRequestBody_configFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfig(val.(ItemItemHooksPostRequestBody_configable)) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEvents(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. +// returns a *string when successful +func (m *ItemItemHooksPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemHooksPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("config", m.GetConfig()) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + err := writer.WriteCollectionOfStringValues("events", m.GetEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. +func (m *ItemItemHooksPostRequestBody) SetActive(value *bool)() { + m.active = value +} +// SetConfig sets the config property value. Key/value pairs to provide settings for this webhook. +func (m *ItemItemHooksPostRequestBody) SetConfig(value ItemItemHooksPostRequestBody_configable)() { + m.config = value +} +// SetEvents sets the events property value. Determines what [events](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads) the hook is triggered for. +func (m *ItemItemHooksPostRequestBody) SetEvents(value []string)() { + m.events = value +} +// SetName sets the name property value. Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. +func (m *ItemItemHooksPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemItemHooksPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetConfig()(ItemItemHooksPostRequestBody_configable) + GetEvents()([]string) + GetName()(*string) + SetActive(value *bool)() + SetConfig(value ItemItemHooksPostRequestBody_configable)() + SetEvents(value []string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_hooks_post_request_body_config.go b/pkg/github/repos/item_item_hooks_post_request_body_config.go new file mode 100644 index 0000000..c08c5f2 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_post_request_body_config.go @@ -0,0 +1,169 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksPostRequestBody_config key/value pairs to provide settings for this webhook. +type ItemItemHooksPostRequestBody_config struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + content_type *string + // The insecure_ssl property + insecure_ssl i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable + // If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). + secret *string + // The URL to which the payloads will be delivered. + url *string +} +// NewItemItemHooksPostRequestBody_config instantiates a new ItemItemHooksPostRequestBody_config and sets the default values. +func NewItemItemHooksPostRequestBody_config()(*ItemItemHooksPostRequestBody_config) { + m := &ItemItemHooksPostRequestBody_config{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemHooksPostRequestBody_configFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemHooksPostRequestBody_configFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemHooksPostRequestBody_config(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemHooksPostRequestBody_config) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContentType gets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +// returns a *string when successful +func (m *ItemItemHooksPostRequestBody_config) GetContentType()(*string) { + return m.content_type +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemHooksPostRequestBody_config) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["insecure_ssl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateWebhookConfigInsecureSslFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInsecureSsl(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)) + } + return nil + } + res["secret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecret(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetInsecureSsl gets the insecure_ssl property value. The insecure_ssl property +// returns a WebhookConfigInsecureSslable when successful +func (m *ItemItemHooksPostRequestBody_config) GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) { + return m.insecure_ssl +} +// GetSecret gets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +// returns a *string when successful +func (m *ItemItemHooksPostRequestBody_config) GetSecret()(*string) { + return m.secret +} +// GetUrl gets the url property value. The URL to which the payloads will be delivered. +// returns a *string when successful +func (m *ItemItemHooksPostRequestBody_config) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ItemItemHooksPostRequestBody_config) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content_type", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("insecure_ssl", m.GetInsecureSsl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secret", m.GetSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemHooksPostRequestBody_config) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContentType sets the content_type property value. The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +func (m *ItemItemHooksPostRequestBody_config) SetContentType(value *string)() { + m.content_type = value +} +// SetInsecureSsl sets the insecure_ssl property value. The insecure_ssl property +func (m *ItemItemHooksPostRequestBody_config) SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() { + m.insecure_ssl = value +} +// SetSecret sets the secret property value. If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#delivery-headers). +func (m *ItemItemHooksPostRequestBody_config) SetSecret(value *string)() { + m.secret = value +} +// SetUrl sets the url property value. The URL to which the payloads will be delivered. +func (m *ItemItemHooksPostRequestBody_config) SetUrl(value *string)() { + m.url = value +} +type ItemItemHooksPostRequestBody_configable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetInsecureSsl()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable) + GetSecret()(*string) + GetUrl()(*string) + SetContentType(value *string)() + SetInsecureSsl(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.WebhookConfigInsecureSslable)() + SetSecret(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_hooks_request_builder.go b/pkg/github/repos/item_item_hooks_request_builder.go new file mode 100644 index 0000000..d34647e --- /dev/null +++ b/pkg/github/repos/item_item_hooks_request_builder.go @@ -0,0 +1,121 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks +type ItemItemHooksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemHooksRequestBuilderGetQueryParameters lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. +type ItemItemHooksRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByHook_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.hooks.item collection +// returns a *ItemItemHooksWithHook_ItemRequestBuilder when successful +func (m *ItemItemHooksRequestBuilder) ByHook_id(hook_id int32)(*ItemItemHooksWithHook_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["hook_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(hook_id), 10) + return NewItemItemHooksWithHook_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemHooksRequestBuilderInternal instantiates a new ItemItemHooksRequestBuilder and sets the default values. +func NewItemItemHooksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksRequestBuilder) { + m := &ItemItemHooksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemHooksRequestBuilder instantiates a new ItemItemHooksRequestBuilder and sets the default values. +func NewItemItemHooksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. +// returns a []Hookable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#list-repository-webhooks +func (m *ItemItemHooksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemHooksRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable) + } + } + return val, nil +} +// Post repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks canshare the same `config` as long as those webhooks do not have any `events` that overlap. +// returns a Hookable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#create-a-repository-webhook +func (m *ItemItemHooksRequestBuilder) Post(ctx context.Context, body ItemItemHooksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable), nil +} +// ToGetRequestInformation lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. +// returns a *RequestInformation when successful +func (m *ItemItemHooksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemHooksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks canshare the same `config` as long as those webhooks do not have any `events` that overlap. +// returns a *RequestInformation when successful +func (m *ItemItemHooksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemHooksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksRequestBuilder when successful +func (m *ItemItemHooksRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksRequestBuilder) { + return NewItemItemHooksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_hooks_with_hook_item_request_builder.go b/pkg/github/repos/item_item_hooks_with_hook_item_request_builder.go new file mode 100644 index 0000000..40a38a4 --- /dev/null +++ b/pkg/github/repos/item_item_hooks_with_hook_item_request_builder.go @@ -0,0 +1,144 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemHooksWithHook_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id} +type ItemItemHooksWithHook_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Config the config property +// returns a *ItemItemHooksItemConfigRequestBuilder when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Config()(*ItemItemHooksItemConfigRequestBuilder) { + return NewItemItemHooksItemConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemHooksWithHook_ItemRequestBuilderInternal instantiates a new ItemItemHooksWithHook_ItemRequestBuilder and sets the default values. +func NewItemItemHooksWithHook_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksWithHook_ItemRequestBuilder) { + m := &ItemItemHooksWithHook_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}", pathParameters), + } + return m +} +// NewItemItemHooksWithHook_ItemRequestBuilder instantiates a new ItemItemHooksWithHook_ItemRequestBuilder and sets the default values. +func NewItemItemHooksWithHook_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksWithHook_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemHooksWithHook_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a repository webhook +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#delete-a-repository-webhook +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Deliveries the deliveries property +// returns a *ItemItemHooksItemDeliveriesRequestBuilder when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Deliveries()(*ItemItemHooksItemDeliveriesRequestBuilder) { + return NewItemItemHooksItemDeliveriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)." +// returns a Hookable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#get-a-repository-webhook +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable), nil +} +// Patch updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)." +// returns a Hookable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/webhooks#update-a-repository-webhook +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemHooksItemWithHook_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHookFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hookable), nil +} +// Pings the pings property +// returns a *ItemItemHooksItemPingsRequestBuilder when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Pings()(*ItemItemHooksItemPingsRequestBuilder) { + return NewItemItemHooksItemPingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tests the tests property +// returns a *ItemItemHooksItemTestsRequestBuilder when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) Tests()(*ItemItemHooksItemTestsRequestBuilder) { + return NewItemItemHooksItemTestsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// returns a *RequestInformation when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)." +// returns a *RequestInformation when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)." +// returns a *RequestInformation when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemHooksItemWithHook_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemHooksWithHook_ItemRequestBuilder when successful +func (m *ItemItemHooksWithHook_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemHooksWithHook_ItemRequestBuilder) { + return NewItemItemHooksWithHook_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_import_authors_item_with_author_patch_request_body.go b/pkg/github/repos/item_item_import_authors_item_with_author_patch_request_body.go new file mode 100644 index 0000000..b26705c --- /dev/null +++ b/pkg/github/repos/item_item_import_authors_item_with_author_patch_request_body.go @@ -0,0 +1,90 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemImportAuthorsItemWithAuthor_PatchRequestBody struct { + // The new Git author email. + email *string + // The new Git author name. + name *string +} +// NewItemItemImportAuthorsItemWithAuthor_PatchRequestBody instantiates a new ItemItemImportAuthorsItemWithAuthor_PatchRequestBody and sets the default values. +func NewItemItemImportAuthorsItemWithAuthor_PatchRequestBody()(*ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) { + m := &ItemItemImportAuthorsItemWithAuthor_PatchRequestBody{ + } + return m +} +// CreateItemItemImportAuthorsItemWithAuthor_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemImportAuthorsItemWithAuthor_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemImportAuthorsItemWithAuthor_PatchRequestBody(), nil +} +// GetEmail gets the email property value. The new Git author email. +// returns a *string when successful +func (m *ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The new Git author name. +// returns a *string when successful +func (m *ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetEmail sets the email property value. The new Git author email. +func (m *ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The new Git author name. +func (m *ItemItemImportAuthorsItemWithAuthor_PatchRequestBody) SetName(value *string)() { + m.name = value +} +type ItemItemImportAuthorsItemWithAuthor_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + SetEmail(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_import_authors_request_builder.go b/pkg/github/repos/item_item_import_authors_request_builder.go new file mode 100644 index 0000000..0d4ff2c --- /dev/null +++ b/pkg/github/repos/item_item_import_authors_request_builder.go @@ -0,0 +1,86 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemImportAuthorsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\authors +type ItemItemImportAuthorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemImportAuthorsRequestBuilderGetQueryParameters each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Enterprise Cloud Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `.This endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +type ItemItemImportAuthorsRequestBuilderGetQueryParameters struct { + // A user ID. Only return users with an ID greater than this ID. + Since *int32 `uriparametername:"since"` +} +// ByAuthor_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.import.authors.item collection +// Deprecated: +// returns a *ItemItemImportAuthorsWithAuthor_ItemRequestBuilder when successful +func (m *ItemItemImportAuthorsRequestBuilder) ByAuthor_id(author_id int32)(*ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["author_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(author_id), 10) + return NewItemItemImportAuthorsWithAuthor_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemImportAuthorsRequestBuilderInternal instantiates a new ItemItemImportAuthorsRequestBuilder and sets the default values. +func NewItemItemImportAuthorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportAuthorsRequestBuilder) { + m := &ItemItemImportAuthorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/authors{?since*}", pathParameters), + } + return m +} +// NewItemItemImportAuthorsRequestBuilder instantiates a new ItemItemImportAuthorsRequestBuilder and sets the default values. +func NewItemItemImportAuthorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportAuthorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemImportAuthorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Enterprise Cloud Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `.This endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a []PorterAuthorable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#get-commit-authors +func (m *ItemItemImportAuthorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemImportAuthorsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterAuthorable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePorterAuthorFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterAuthorable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterAuthorable) + } + } + return val, nil +} +// ToGetRequestInformation each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Enterprise Cloud Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `.This endpoint and the [Map a commit author](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportAuthorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemImportAuthorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemImportAuthorsRequestBuilder when successful +func (m *ItemItemImportAuthorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemImportAuthorsRequestBuilder) { + return NewItemItemImportAuthorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_import_authors_with_author_item_request_builder.go b/pkg/github/repos/item_item_import_authors_with_author_item_request_builder.go new file mode 100644 index 0000000..5c3ec2a --- /dev/null +++ b/pkg/github/repos/item_item_import_authors_with_author_item_request_builder.go @@ -0,0 +1,72 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemImportAuthorsWithAuthor_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\authors\{author_id} +type ItemItemImportAuthorsWithAuthor_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemImportAuthorsWithAuthor_ItemRequestBuilderInternal instantiates a new ItemItemImportAuthorsWithAuthor_ItemRequestBuilder and sets the default values. +func NewItemItemImportAuthorsWithAuthor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) { + m := &ItemItemImportAuthorsWithAuthor_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/authors/{author_id}", pathParameters), + } + return m +} +// NewItemItemImportAuthorsWithAuthor_ItemRequestBuilder instantiates a new ItemItemImportAuthorsWithAuthor_ItemRequestBuilder and sets the default values. +func NewItemItemImportAuthorsWithAuthor_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemImportAuthorsWithAuthor_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Patch update an author's identity for the import. Your application can continue updating authors any time before you pushnew commits to the repository.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a PorterAuthorable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#map-a-commit-author +func (m *ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemImportAuthorsItemWithAuthor_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterAuthorable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePorterAuthorFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterAuthorable), nil +} +// ToPatchRequestInformation update an author's identity for the import. Your application can continue updating authors any time before you pushnew commits to the repository.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemImportAuthorsItemWithAuthor_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemImportAuthorsWithAuthor_ItemRequestBuilder when successful +func (m *ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemImportAuthorsWithAuthor_ItemRequestBuilder) { + return NewItemItemImportAuthorsWithAuthor_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_import_large_files_request_builder.go b/pkg/github/repos/item_item_import_large_files_request_builder.go new file mode 100644 index 0000000..8101394 --- /dev/null +++ b/pkg/github/repos/item_item_import_large_files_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemImportLarge_filesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\large_files +type ItemItemImportLarge_filesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemImportLarge_filesRequestBuilderInternal instantiates a new ItemItemImportLarge_filesRequestBuilder and sets the default values. +func NewItemItemImportLarge_filesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportLarge_filesRequestBuilder) { + m := &ItemItemImportLarge_filesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/large_files", pathParameters), + } + return m +} +// NewItemItemImportLarge_filesRequestBuilder instantiates a new ItemItemImportLarge_filesRequestBuilder and sets the default values. +func NewItemItemImportLarge_filesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportLarge_filesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemImportLarge_filesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list files larger than 100MB found during the import**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a []PorterLargeFileable when successful +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#get-large-files +func (m *ItemItemImportLarge_filesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterLargeFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePorterLargeFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterLargeFileable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PorterLargeFileable) + } + } + return val, nil +} +// ToGetRequestInformation list files larger than 100MB found during the import**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportLarge_filesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemImportLarge_filesRequestBuilder when successful +func (m *ItemItemImportLarge_filesRequestBuilder) WithUrl(rawUrl string)(*ItemItemImportLarge_filesRequestBuilder) { + return NewItemItemImportLarge_filesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_import_lfs_patch_request_body.go b/pkg/github/repos/item_item_import_lfs_patch_request_body.go new file mode 100644 index 0000000..c81c162 --- /dev/null +++ b/pkg/github/repos/item_item_import_lfs_patch_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemImportLfsPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemImportLfsPatchRequestBody instantiates a new ItemItemImportLfsPatchRequestBody and sets the default values. +func NewItemItemImportLfsPatchRequestBody()(*ItemItemImportLfsPatchRequestBody) { + m := &ItemItemImportLfsPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemImportLfsPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemImportLfsPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemImportLfsPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemImportLfsPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemImportLfsPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemImportLfsPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemImportLfsPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemImportLfsPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_import_lfs_request_builder.go b/pkg/github/repos/item_item_import_lfs_request_builder.go new file mode 100644 index 0000000..17dcfe0 --- /dev/null +++ b/pkg/github/repos/item_item_import_lfs_request_builder.go @@ -0,0 +1,70 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemImportLfsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\lfs +type ItemItemImportLfsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemImportLfsRequestBuilderInternal instantiates a new ItemItemImportLfsRequestBuilder and sets the default values. +func NewItemItemImportLfsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportLfsRequestBuilder) { + m := &ItemItemImportLfsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/lfs", pathParameters), + } + return m +} +// NewItemItemImportLfsRequestBuilder instantiates a new ItemItemImportLfsRequestBuilder and sets the default values. +func NewItemItemImportLfsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportLfsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemImportLfsRequestBuilderInternal(urlParams, requestAdapter) +} +// Patch you can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This abilityis powered by [Git LFS](https://git-lfs.com).You can learn more about our LFS feature and working with large files [on our helpsite](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files).**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a ImportEscapedable when successful +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-git-lfs-preference +func (m *ItemItemImportLfsRequestBuilder) Patch(ctx context.Context, body ItemItemImportLfsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateImportEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable), nil +} +// ToPatchRequestInformation you can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This abilityis powered by [Git LFS](https://git-lfs.com).You can learn more about our LFS feature and working with large files [on our helpsite](https://docs.github.com/enterprise-cloud@latest//repositories/working-with-files/managing-large-files).**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportLfsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemImportLfsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemImportLfsRequestBuilder when successful +func (m *ItemItemImportLfsRequestBuilder) WithUrl(rawUrl string)(*ItemItemImportLfsRequestBuilder) { + return NewItemItemImportLfsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_import_patch_request_body.go b/pkg/github/repos/item_item_import_patch_request_body.go new file mode 100644 index 0000000..dae3f7d --- /dev/null +++ b/pkg/github/repos/item_item_import_patch_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemImportPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // For a tfvc import, the name of the project that is being imported. + tfvc_project *string + // The password to provide to the originating repository. + vcs_password *string + // The username to provide to the originating repository. + vcs_username *string +} +// NewItemItemImportPatchRequestBody instantiates a new ItemItemImportPatchRequestBody and sets the default values. +func NewItemItemImportPatchRequestBody()(*ItemItemImportPatchRequestBody) { + m := &ItemItemImportPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemImportPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemImportPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemImportPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemImportPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemImportPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["tfvc_project"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTfvcProject(val) + } + return nil + } + res["vcs_password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcsPassword(val) + } + return nil + } + res["vcs_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcsUsername(val) + } + return nil + } + return res +} +// GetTfvcProject gets the tfvc_project property value. For a tfvc import, the name of the project that is being imported. +// returns a *string when successful +func (m *ItemItemImportPatchRequestBody) GetTfvcProject()(*string) { + return m.tfvc_project +} +// GetVcsPassword gets the vcs_password property value. The password to provide to the originating repository. +// returns a *string when successful +func (m *ItemItemImportPatchRequestBody) GetVcsPassword()(*string) { + return m.vcs_password +} +// GetVcsUsername gets the vcs_username property value. The username to provide to the originating repository. +// returns a *string when successful +func (m *ItemItemImportPatchRequestBody) GetVcsUsername()(*string) { + return m.vcs_username +} +// Serialize serializes information the current object +func (m *ItemItemImportPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("tfvc_project", m.GetTfvcProject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs_password", m.GetVcsPassword()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs_username", m.GetVcsUsername()) + 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 *ItemItemImportPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTfvcProject sets the tfvc_project property value. For a tfvc import, the name of the project that is being imported. +func (m *ItemItemImportPatchRequestBody) SetTfvcProject(value *string)() { + m.tfvc_project = value +} +// SetVcsPassword sets the vcs_password property value. The password to provide to the originating repository. +func (m *ItemItemImportPatchRequestBody) SetVcsPassword(value *string)() { + m.vcs_password = value +} +// SetVcsUsername sets the vcs_username property value. The username to provide to the originating repository. +func (m *ItemItemImportPatchRequestBody) SetVcsUsername(value *string)() { + m.vcs_username = value +} +type ItemItemImportPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTfvcProject()(*string) + GetVcsPassword()(*string) + GetVcsUsername()(*string) + SetTfvcProject(value *string)() + SetVcsPassword(value *string)() + SetVcsUsername(value *string)() +} diff --git a/pkg/github/repos/item_item_import_put_request_body.go b/pkg/github/repos/item_item_import_put_request_body.go new file mode 100644 index 0000000..ebf405c --- /dev/null +++ b/pkg/github/repos/item_item_import_put_request_body.go @@ -0,0 +1,167 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemImportPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // For a tfvc import, the name of the project that is being imported. + tfvc_project *string + // If authentication is required, the password to provide to `vcs_url`. + vcs_password *string + // The URL of the originating repository. + vcs_url *string + // If authentication is required, the username to provide to `vcs_url`. + vcs_username *string +} +// NewItemItemImportPutRequestBody instantiates a new ItemItemImportPutRequestBody and sets the default values. +func NewItemItemImportPutRequestBody()(*ItemItemImportPutRequestBody) { + m := &ItemItemImportPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemImportPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemImportPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemImportPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemImportPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemImportPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["tfvc_project"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTfvcProject(val) + } + return nil + } + res["vcs_password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcsPassword(val) + } + return nil + } + res["vcs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcsUrl(val) + } + return nil + } + res["vcs_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVcsUsername(val) + } + return nil + } + return res +} +// GetTfvcProject gets the tfvc_project property value. For a tfvc import, the name of the project that is being imported. +// returns a *string when successful +func (m *ItemItemImportPutRequestBody) GetTfvcProject()(*string) { + return m.tfvc_project +} +// GetVcsPassword gets the vcs_password property value. If authentication is required, the password to provide to `vcs_url`. +// returns a *string when successful +func (m *ItemItemImportPutRequestBody) GetVcsPassword()(*string) { + return m.vcs_password +} +// GetVcsUrl gets the vcs_url property value. The URL of the originating repository. +// returns a *string when successful +func (m *ItemItemImportPutRequestBody) GetVcsUrl()(*string) { + return m.vcs_url +} +// GetVcsUsername gets the vcs_username property value. If authentication is required, the username to provide to `vcs_url`. +// returns a *string when successful +func (m *ItemItemImportPutRequestBody) GetVcsUsername()(*string) { + return m.vcs_username +} +// Serialize serializes information the current object +func (m *ItemItemImportPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("tfvc_project", m.GetTfvcProject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs_password", m.GetVcsPassword()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs_url", m.GetVcsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vcs_username", m.GetVcsUsername()) + 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 *ItemItemImportPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTfvcProject sets the tfvc_project property value. For a tfvc import, the name of the project that is being imported. +func (m *ItemItemImportPutRequestBody) SetTfvcProject(value *string)() { + m.tfvc_project = value +} +// SetVcsPassword sets the vcs_password property value. If authentication is required, the password to provide to `vcs_url`. +func (m *ItemItemImportPutRequestBody) SetVcsPassword(value *string)() { + m.vcs_password = value +} +// SetVcsUrl sets the vcs_url property value. The URL of the originating repository. +func (m *ItemItemImportPutRequestBody) SetVcsUrl(value *string)() { + m.vcs_url = value +} +// SetVcsUsername sets the vcs_username property value. If authentication is required, the username to provide to `vcs_url`. +func (m *ItemItemImportPutRequestBody) SetVcsUsername(value *string)() { + m.vcs_username = value +} +type ItemItemImportPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTfvcProject()(*string) + GetVcsPassword()(*string) + GetVcsUrl()(*string) + GetVcsUsername()(*string) + SetTfvcProject(value *string)() + SetVcsPassword(value *string)() + SetVcsUrl(value *string)() + SetVcsUsername(value *string)() +} diff --git a/pkg/github/repos/item_item_import_request_builder.go b/pkg/github/repos/item_item_import_request_builder.go new file mode 100644 index 0000000..ef04303 --- /dev/null +++ b/pkg/github/repos/item_item_import_request_builder.go @@ -0,0 +1,188 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemImportRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import +type ItemItemImportRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Authors the authors property +// returns a *ItemItemImportAuthorsRequestBuilder when successful +func (m *ItemItemImportRequestBuilder) Authors()(*ItemItemImportAuthorsRequestBuilder) { + return NewItemItemImportAuthorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemImportRequestBuilderInternal instantiates a new ItemItemImportRequestBuilder and sets the default values. +func NewItemItemImportRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportRequestBuilder) { + m := &ItemItemImportRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import", pathParameters), + } + return m +} +// NewItemItemImportRequestBuilder instantiates a new ItemItemImportRequestBuilder and sets the default values. +func NewItemItemImportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemImportRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemImportRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete stop an import for a repository.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#cancel-an-import +func (m *ItemItemImportRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get view the progress of an import.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).**Import status**This section includes details about the possible values of the `status` field of the Import Progress response.An import that does not have errors will progress through these steps:* `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.* `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).* `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.* `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub Enterprise Cloud. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects".* `complete` - the import is complete, and the repository is ready on GitHub Enterprise Cloud.If there are problems, you will see one of these in the `status` field:* `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.* `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.* `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#start-an-import) with the correct URL.* `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.**The project_choices field**When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.**Git LFS related fields**This section includes details about Git LFS related fields that may be present in the Import Progress response.* `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.* `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. +// Deprecated: +// returns a ImportEscapedable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#get-an-import-status +func (m *ItemItemImportRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateImportEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable), nil +} +// Large_files the large_files property +// returns a *ItemItemImportLarge_filesRequestBuilder when successful +func (m *ItemItemImportRequestBuilder) Large_files()(*ItemItemImportLarge_filesRequestBuilder) { + return NewItemItemImportLarge_filesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Lfs the lfs property +// returns a *ItemItemImportLfsRequestBuilder when successful +func (m *ItemItemImportRequestBuilder) Lfs()(*ItemItemImportLfsRequestBuilder) { + return NewItemItemImportLfsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch an import can be updated with credentials or a project choice by passing in the appropriate parameters in this APIrequest. If no parameters are provided, the import will be restarted.Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress willhave the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.You can select the project to import by providing one of the objects in the `project_choices` array in the update request.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a ImportEscapedable when successful +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import +func (m *ItemItemImportRequestBuilder) Patch(ctx context.Context, body ItemItemImportPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateImportEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable), nil +} +// Put start a source import to a GitHub Enterprise Cloud repository using GitHub Enterprise Cloud Importer.Importing into a GitHub Enterprise Cloud repository with GitHub Actions enabled is not supported and willreturn a status `422 Unprocessable Entity` response.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a ImportEscapedable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#start-an-import +func (m *ItemItemImportRequestBuilder) Put(ctx context.Context, body ItemItemImportPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateImportEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ImportEscapedable), nil +} +// ToDeleteRequestInformation stop an import for a repository.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation view the progress of an import.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).**Import status**This section includes details about the possible values of the `status` field of the Import Progress response.An import that does not have errors will progress through these steps:* `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.* `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).* `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.* `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub Enterprise Cloud. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects".* `complete` - the import is complete, and the repository is ready on GitHub Enterprise Cloud.If there are problems, you will see one of these in the `status` field:* `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.* `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.* `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#start-an-import) with the correct URL.* `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/enterprise-cloud@latest//rest/migrations/source-imports#update-an-import) section.**The project_choices field**When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.**Git LFS related fields**This section includes details about Git LFS related fields that may be present in the Import Progress response.* `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.* `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation an import can be updated with credentials or a project choice by passing in the appropriate parameters in this APIrequest. If no parameters are provided, the import will be restarted.Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress willhave the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.You can select the project to import by providing one of the objects in the `project_choices` array in the update request.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemImportPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation start a source import to a GitHub Enterprise Cloud repository using GitHub Enterprise Cloud Importer.Importing into a GitHub Enterprise Cloud repository with GitHub Actions enabled is not supported and willreturn a status `422 Unprocessable Entity` response.**Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemImportRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemImportPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemImportRequestBuilder when successful +func (m *ItemItemImportRequestBuilder) WithUrl(rawUrl string)(*ItemItemImportRequestBuilder) { + return NewItemItemImportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_installation_request_builder.go b/pkg/github/repos/item_item_installation_request_builder.go new file mode 100644 index 0000000..0d59c31 --- /dev/null +++ b/pkg/github/repos/item_item_installation_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemInstallationRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\installation +type ItemItemInstallationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemInstallationRequestBuilderInternal instantiates a new ItemItemInstallationRequestBuilder and sets the default values. +func NewItemItemInstallationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInstallationRequestBuilder) { + m := &ItemItemInstallationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/installation", pathParameters), + } + return m +} +// NewItemItemInstallationRequestBuilder instantiates a new ItemItemInstallationRequestBuilder and sets the default values. +func NewItemItemInstallationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInstallationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemInstallationRequestBuilderInternal(urlParams, requestAdapter) +} +// Get enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a Installationable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-a-repository-installation-for-the-authenticated-app +func (m *ItemItemInstallationRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable), nil +} +// ToGetRequestInformation enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemInstallationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemInstallationRequestBuilder when successful +func (m *ItemItemInstallationRequestBuilder) WithUrl(rawUrl string)(*ItemItemInstallationRequestBuilder) { + return NewItemItemInstallationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_interaction_limits_request_builder.go b/pkg/github/repos/item_item_interaction_limits_request_builder.go new file mode 100644 index 0000000..676852d --- /dev/null +++ b/pkg/github/repos/item_item_interaction_limits_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemInteractionLimitsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\interaction-limits +type ItemItemInteractionLimitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemInteractionLimitsRequestBuilderInternal instantiates a new ItemItemInteractionLimitsRequestBuilder and sets the default values. +func NewItemItemInteractionLimitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInteractionLimitsRequestBuilder) { + m := &ItemItemInteractionLimitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/interaction-limits", pathParameters), + } + return m +} +// NewItemItemInteractionLimitsRequestBuilder instantiates a new ItemItemInteractionLimitsRequestBuilder and sets the default values. +func NewItemItemInteractionLimitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInteractionLimitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemInteractionLimitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/repos#remove-interaction-restrictions-for-a-repository +func (m *ItemItemInteractionLimitsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. +// returns a InteractionLimitResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/repos#get-interaction-restrictions-for-a-repository +func (m *ItemItemInteractionLimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInteractionLimitResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable), nil +} +// Put temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. +// returns a InteractionLimitResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/repos#set-interaction-restrictions-for-a-repository +func (m *ItemItemInteractionLimitsRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInteractionLimitResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable), nil +} +// ToDeleteRequestInformation removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. +// returns a *RequestInformation when successful +func (m *ItemItemInteractionLimitsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. +// returns a *RequestInformation when successful +func (m *ItemItemInteractionLimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. +// returns a *RequestInformation when successful +func (m *ItemItemInteractionLimitsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemInteractionLimitsRequestBuilder when successful +func (m *ItemItemInteractionLimitsRequestBuilder) WithUrl(rawUrl string)(*ItemItemInteractionLimitsRequestBuilder) { + return NewItemItemInteractionLimitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_invitations_item_with_invitation_patch_request_body.go b/pkg/github/repos/item_item_invitations_item_with_invitation_patch_request_body.go new file mode 100644 index 0000000..c78762d --- /dev/null +++ b/pkg/github/repos/item_item_invitations_item_with_invitation_patch_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemInvitationsItemWithInvitation_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemInvitationsItemWithInvitation_PatchRequestBody instantiates a new ItemItemInvitationsItemWithInvitation_PatchRequestBody and sets the default values. +func NewItemItemInvitationsItemWithInvitation_PatchRequestBody()(*ItemItemInvitationsItemWithInvitation_PatchRequestBody) { + m := &ItemItemInvitationsItemWithInvitation_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemInvitationsItemWithInvitation_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemInvitationsItemWithInvitation_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemInvitationsItemWithInvitation_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemInvitationsItemWithInvitation_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemInvitationsItemWithInvitation_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemInvitationsItemWithInvitation_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemInvitationsItemWithInvitation_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemInvitationsItemWithInvitation_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_invitations_request_builder.go b/pkg/github/repos/item_item_invitations_request_builder.go new file mode 100644 index 0000000..4c3909c --- /dev/null +++ b/pkg/github/repos/item_item_invitations_request_builder.go @@ -0,0 +1,78 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemInvitationsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\invitations +type ItemItemInvitationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemInvitationsRequestBuilderGetQueryParameters when authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. +type ItemItemInvitationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByInvitation_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.invitations.item collection +// returns a *ItemItemInvitationsWithInvitation_ItemRequestBuilder when successful +func (m *ItemItemInvitationsRequestBuilder) ByInvitation_id(invitation_id int32)(*ItemItemInvitationsWithInvitation_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["invitation_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(invitation_id), 10) + return NewItemItemInvitationsWithInvitation_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemInvitationsRequestBuilderInternal instantiates a new ItemItemInvitationsRequestBuilder and sets the default values. +func NewItemItemInvitationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInvitationsRequestBuilder) { + m := &ItemItemInvitationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/invitations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemInvitationsRequestBuilder instantiates a new ItemItemInvitationsRequestBuilder and sets the default values. +func NewItemItemInvitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInvitationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemInvitationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get when authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. +// returns a []RepositoryInvitationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations#list-repository-invitations +func (m *ItemItemInvitationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemInvitationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryInvitationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable) + } + } + return val, nil +} +// ToGetRequestInformation when authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. +// returns a *RequestInformation when successful +func (m *ItemItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemInvitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemInvitationsRequestBuilder when successful +func (m *ItemItemInvitationsRequestBuilder) WithUrl(rawUrl string)(*ItemItemInvitationsRequestBuilder) { + return NewItemItemInvitationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_invitations_with_invitation_item_request_builder.go b/pkg/github/repos/item_item_invitations_with_invitation_item_request_builder.go new file mode 100644 index 0000000..92a9e3f --- /dev/null +++ b/pkg/github/repos/item_item_invitations_with_invitation_item_request_builder.go @@ -0,0 +1,81 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemInvitationsWithInvitation_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\invitations\{invitation_id} +type ItemItemInvitationsWithInvitation_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemInvitationsWithInvitation_ItemRequestBuilderInternal instantiates a new ItemItemInvitationsWithInvitation_ItemRequestBuilder and sets the default values. +func NewItemItemInvitationsWithInvitation_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInvitationsWithInvitation_ItemRequestBuilder) { + m := &ItemItemInvitationsWithInvitation_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/invitations/{invitation_id}", pathParameters), + } + return m +} +// NewItemItemInvitationsWithInvitation_ItemRequestBuilder instantiates a new ItemItemInvitationsWithInvitation_ItemRequestBuilder and sets the default values. +func NewItemItemInvitationsWithInvitation_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemInvitationsWithInvitation_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemInvitationsWithInvitation_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a repository invitation +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations#delete-a-repository-invitation +func (m *ItemItemInvitationsWithInvitation_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Patch update a repository invitation +// returns a RepositoryInvitationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations#update-a-repository-invitation +func (m *ItemItemInvitationsWithInvitation_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemInvitationsItemWithInvitation_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryInvitationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemInvitationsWithInvitation_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemInvitationsWithInvitation_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemInvitationsItemWithInvitation_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemInvitationsWithInvitation_ItemRequestBuilder when successful +func (m *ItemItemInvitationsWithInvitation_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemInvitationsWithInvitation_ItemRequestBuilder) { + return NewItemItemInvitationsWithInvitation_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_comments_item_reactions_post_request_body.go b/pkg/github/repos/item_item_issues_comments_item_reactions_post_request_body.go new file mode 100644 index 0000000..01f1b54 --- /dev/null +++ b/pkg/github/repos/item_item_issues_comments_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesCommentsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemIssuesCommentsItemReactionsPostRequestBody instantiates a new ItemItemIssuesCommentsItemReactionsPostRequestBody and sets the default values. +func NewItemItemIssuesCommentsItemReactionsPostRequestBody()(*ItemItemIssuesCommentsItemReactionsPostRequestBody) { + m := &ItemItemIssuesCommentsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesCommentsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesCommentsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesCommentsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesCommentsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesCommentsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesCommentsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesCommentsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemIssuesCommentsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go b/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go new file mode 100644 index 0000000..b29f3c9 --- /dev/null +++ b/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go @@ -0,0 +1,120 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i02899c7cb415cf8b7b0f626dca8d11805ca7e3670f54c463cede3a2288f9b6b5 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/issues/comments/item/reactions" +) + +// ItemItemIssuesCommentsItemReactionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments\{comment_id}\reactions +type ItemItemIssuesCommentsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesCommentsItemReactionsRequestBuilderGetQueryParameters list the reactions to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). +type ItemItemIssuesCommentsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment. + Content *i02899c7cb415cf8b7b0f626dca8d11805ca7e3670f54c463cede3a2288f9b6b5.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.comments.item.reactions.item collection +// returns a *ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesCommentsItemReactionsRequestBuilderInternal instantiates a new ItemItemIssuesCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsItemReactionsRequestBuilder) { + m := &ItemItemIssuesCommentsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesCommentsItemReactionsRequestBuilder instantiates a new ItemItemIssuesCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesCommentsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). +// returns a []Reactionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-an-issue-comment +func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesCommentsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. +// returns a Reactionable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-an-issue-comment +func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemItemIssuesCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesCommentsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesCommentsItemReactionsRequestBuilder when successful +func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesCommentsItemReactionsRequestBuilder) { + return NewItemItemIssuesCommentsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_comments_item_reactions_with_reaction_item_request_builder.go b/pkg/github/repos/item_item_issues_comments_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..3457062 --- /dev/null +++ b/pkg/github/repos/item_item_issues_comments_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments\{comment_id}\reactions\{reaction_id} +type ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.Delete a reaction to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-an-issue-comment-reaction +func (m *ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.Delete a reaction to an [issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment). +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemItemIssuesCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_comments_item_with_comment_patch_request_body.go b/pkg/github/repos/item_item_issues_comments_item_with_comment_patch_request_body.go new file mode 100644 index 0000000..77996dc --- /dev/null +++ b/pkg/github/repos/item_item_issues_comments_item_with_comment_patch_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesCommentsItemWithComment_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contents of the comment. + body *string +} +// NewItemItemIssuesCommentsItemWithComment_PatchRequestBody instantiates a new ItemItemIssuesCommentsItemWithComment_PatchRequestBody and sets the default values. +func NewItemItemIssuesCommentsItemWithComment_PatchRequestBody()(*ItemItemIssuesCommentsItemWithComment_PatchRequestBody) { + m := &ItemItemIssuesCommentsItemWithComment_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesCommentsItemWithComment_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesCommentsItemWithComment_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The contents of the comment. +// returns a *string when successful +func (m *ItemItemIssuesCommentsItemWithComment_PatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesCommentsItemWithComment_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesCommentsItemWithComment_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemIssuesCommentsItemWithComment_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The contents of the comment. +func (m *ItemItemIssuesCommentsItemWithComment_PatchRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemIssuesCommentsItemWithComment_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_issues_comments_request_builder.go b/pkg/github/repos/item_item_issues_comments_request_builder.go new file mode 100644 index 0000000..8c9fb1b --- /dev/null +++ b/pkg/github/repos/item_item_issues_comments_request_builder.go @@ -0,0 +1,92 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i0f231337bdeeb6cda421e5fb2cbbbb603365351a49ed9bdeec2a1d082adca732 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/issues/comments" +) + +// ItemItemIssuesCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments +type ItemItemIssuesCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesCommentsRequestBuilderGetQueryParameters you can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request.By default, issue comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemIssuesCommentsRequestBuilderGetQueryParameters struct { + // Either `asc` or `desc`. Ignored without the `sort` parameter. + Direction *i0f231337bdeeb6cda421e5fb2cbbbb603365351a49ed9bdeec2a1d082adca732.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // The property to sort the results by. + Sort *i0f231337bdeeb6cda421e5fb2cbbbb603365351a49ed9bdeec2a1d082adca732.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.comments.item collection +// returns a *ItemItemIssuesCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemIssuesCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemItemIssuesCommentsWithComment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10) + return NewItemItemIssuesCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesCommentsRequestBuilderInternal instantiates a new ItemItemIssuesCommentsRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsRequestBuilder) { + m := &ItemItemIssuesCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments{?direction*,page*,per_page*,since*,sort*}", pathParameters), + } + return m +} +// NewItemItemIssuesCommentsRequestBuilder instantiates a new ItemItemIssuesCommentsRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request.By default, issue comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []IssueCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#list-issue-comments-for-a-repository +func (m *ItemItemIssuesCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable) + } + } + return val, nil +} +// ToGetRequestInformation you can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request.By default, issue comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesCommentsRequestBuilder when successful +func (m *ItemItemIssuesCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesCommentsRequestBuilder) { + return NewItemItemIssuesCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_comments_with_comment_item_request_builder.go b/pkg/github/repos/item_item_issues_comments_with_comment_item_request_builder.go new file mode 100644 index 0000000..283388e --- /dev/null +++ b/pkg/github/repos/item_item_issues_comments_with_comment_item_request_builder.go @@ -0,0 +1,123 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesCommentsWithComment_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments\{comment_id} +type ItemItemIssuesCommentsWithComment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesCommentsWithComment_ItemRequestBuilderInternal instantiates a new ItemItemIssuesCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsWithComment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsWithComment_ItemRequestBuilder) { + m := &ItemItemIssuesCommentsWithComment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}", pathParameters), + } + return m +} +// NewItemItemIssuesCommentsWithComment_ItemRequestBuilder instantiates a new ItemItemIssuesCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesCommentsWithComment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesCommentsWithComment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesCommentsWithComment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete you can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#delete-an-issue-comment +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get you can use the REST API to get comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a IssueCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#get-an-issue-comment +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable), nil +} +// Patch you can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a IssueCommentable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#update-an-issue-comment +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemIssuesCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable), nil +} +// Reactions the reactions property +// returns a *ItemItemIssuesCommentsItemReactionsRequestBuilder when successful +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) Reactions()(*ItemItemIssuesCommentsItemReactionsRequestBuilder) { + return NewItemItemIssuesCommentsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation you can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation you can use the REST API to get comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation you can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemIssuesCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemIssuesCommentsWithComment_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesCommentsWithComment_ItemRequestBuilder) { + return NewItemItemIssuesCommentsWithComment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_events_request_builder.go b/pkg/github/repos/item_item_issues_events_request_builder.go new file mode 100644 index 0000000..0d6fbf7 --- /dev/null +++ b/pkg/github/repos/item_item_issues_events_request_builder.go @@ -0,0 +1,82 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesEventsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\events +type ItemItemIssuesEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesEventsRequestBuilderGetQueryParameters lists events for a repository. +type ItemItemIssuesEventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByEvent_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.events.item collection +// returns a *ItemItemIssuesEventsWithEvent_ItemRequestBuilder when successful +func (m *ItemItemIssuesEventsRequestBuilder) ByEvent_id(event_id int32)(*ItemItemIssuesEventsWithEvent_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["event_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(event_id), 10) + return NewItemItemIssuesEventsWithEvent_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesEventsRequestBuilderInternal instantiates a new ItemItemIssuesEventsRequestBuilder and sets the default values. +func NewItemItemIssuesEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesEventsRequestBuilder) { + m := &ItemItemIssuesEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesEventsRequestBuilder instantiates a new ItemItemIssuesEventsRequestBuilder and sets the default values. +func NewItemItemIssuesEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists events for a repository. +// returns a []IssueEventable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/events#list-issue-events-for-a-repository +func (m *ItemItemIssuesEventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesEventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueEventFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventable) + } + } + return val, nil +} +// ToGetRequestInformation lists events for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesEventsRequestBuilder when successful +func (m *ItemItemIssuesEventsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesEventsRequestBuilder) { + return NewItemItemIssuesEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_events_with_event_item_request_builder.go b/pkg/github/repos/item_item_issues_events_with_event_item_request_builder.go new file mode 100644 index 0000000..f3d7359 --- /dev/null +++ b/pkg/github/repos/item_item_issues_events_with_event_item_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesEventsWithEvent_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\events\{event_id} +type ItemItemIssuesEventsWithEvent_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesEventsWithEvent_ItemRequestBuilderInternal instantiates a new ItemItemIssuesEventsWithEvent_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesEventsWithEvent_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesEventsWithEvent_ItemRequestBuilder) { + m := &ItemItemIssuesEventsWithEvent_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/events/{event_id}", pathParameters), + } + return m +} +// NewItemItemIssuesEventsWithEvent_ItemRequestBuilder instantiates a new ItemItemIssuesEventsWithEvent_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesEventsWithEvent_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesEventsWithEvent_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesEventsWithEvent_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a single event by the event id. +// returns a IssueEventable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/events#get-an-issue-event +func (m *ItemItemIssuesEventsWithEvent_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueEventFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventable), nil +} +// ToGetRequestInformation gets a single event by the event id. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesEventsWithEvent_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesEventsWithEvent_ItemRequestBuilder when successful +func (m *ItemItemIssuesEventsWithEvent_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesEventsWithEvent_ItemRequestBuilder) { + return NewItemItemIssuesEventsWithEvent_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_assignees_delete_request_body.go b/pkg/github/repos/item_item_issues_item_assignees_delete_request_body.go new file mode 100644 index 0000000..4fb7a2d --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_assignees_delete_request_body.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemAssigneesDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + assignees []string +} +// NewItemItemIssuesItemAssigneesDeleteRequestBody instantiates a new ItemItemIssuesItemAssigneesDeleteRequestBody and sets the default values. +func NewItemItemIssuesItemAssigneesDeleteRequestBody()(*ItemItemIssuesItemAssigneesDeleteRequestBody) { + m := &ItemItemIssuesItemAssigneesDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemAssigneesDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemAssigneesDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemAssigneesDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemAssigneesDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignees gets the assignees property value. Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ +// returns a []string when successful +func (m *ItemItemIssuesItemAssigneesDeleteRequestBody) GetAssignees()([]string) { + return m.assignees +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemAssigneesDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAssignees(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemAssigneesDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignees() != nil { + err := writer.WriteCollectionOfStringValues("assignees", m.GetAssignees()) + 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 *ItemItemIssuesItemAssigneesDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignees sets the assignees property value. Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ +func (m *ItemItemIssuesItemAssigneesDeleteRequestBody) SetAssignees(value []string)() { + m.assignees = value +} +type ItemItemIssuesItemAssigneesDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignees()([]string) + SetAssignees(value []string)() +} diff --git a/pkg/github/repos/item_item_issues_item_assignees_post_request_body.go b/pkg/github/repos/item_item_issues_item_assignees_post_request_body.go new file mode 100644 index 0000000..7ae722e --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_assignees_post_request_body.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemAssigneesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ + assignees []string +} +// NewItemItemIssuesItemAssigneesPostRequestBody instantiates a new ItemItemIssuesItemAssigneesPostRequestBody and sets the default values. +func NewItemItemIssuesItemAssigneesPostRequestBody()(*ItemItemIssuesItemAssigneesPostRequestBody) { + m := &ItemItemIssuesItemAssigneesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemAssigneesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemAssigneesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemAssigneesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemAssigneesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignees gets the assignees property value. Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ +// returns a []string when successful +func (m *ItemItemIssuesItemAssigneesPostRequestBody) GetAssignees()([]string) { + return m.assignees +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemAssigneesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAssignees(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemAssigneesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignees() != nil { + err := writer.WriteCollectionOfStringValues("assignees", m.GetAssignees()) + 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 *ItemItemIssuesItemAssigneesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignees sets the assignees property value. Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ +func (m *ItemItemIssuesItemAssigneesPostRequestBody) SetAssignees(value []string)() { + m.assignees = value +} +type ItemItemIssuesItemAssigneesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignees()([]string) + SetAssignees(value []string)() +} diff --git a/pkg/github/repos/item_item_issues_item_assignees_request_builder.go b/pkg/github/repos/item_item_issues_item_assignees_request_builder.go new file mode 100644 index 0000000..c07a324 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_assignees_request_builder.go @@ -0,0 +1,104 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemAssigneesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\assignees +type ItemItemIssuesItemAssigneesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAssignee gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.item.assignees.item collection +// returns a *ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder when successful +func (m *ItemItemIssuesItemAssigneesRequestBuilder) ByAssignee(assignee string)(*ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if assignee != "" { + urlTplParams["assignee"] = assignee + } + return NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesItemAssigneesRequestBuilderInternal instantiates a new ItemItemIssuesItemAssigneesRequestBuilder and sets the default values. +func NewItemItemIssuesItemAssigneesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemAssigneesRequestBuilder) { + m := &ItemItemIssuesItemAssigneesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/assignees", pathParameters), + } + return m +} +// NewItemItemIssuesItemAssigneesRequestBuilder instantiates a new ItemItemIssuesItemAssigneesRequestBuilder and sets the default values. +func NewItemItemIssuesItemAssigneesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemAssigneesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemAssigneesRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes one or more assignees from an issue. +// returns a Issueable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/assignees#remove-assignees-from-an-issue +func (m *ItemItemIssuesItemAssigneesRequestBuilder) Delete(ctx context.Context, body ItemItemIssuesItemAssigneesDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable), nil +} +// Post adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. +// returns a Issueable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/assignees#add-assignees-to-an-issue +func (m *ItemItemIssuesItemAssigneesRequestBuilder) Post(ctx context.Context, body ItemItemIssuesItemAssigneesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable), nil +} +// ToDeleteRequestInformation removes one or more assignees from an issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemAssigneesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemIssuesItemAssigneesDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPostRequestInformation adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemAssigneesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemAssigneesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemAssigneesRequestBuilder when successful +func (m *ItemItemIssuesItemAssigneesRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemAssigneesRequestBuilder) { + return NewItemItemIssuesItemAssigneesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_assignees_with_assignee_item_request_builder.go b/pkg/github/repos/item_item_issues_item_assignees_with_assignee_item_request_builder.go new file mode 100644 index 0000000..3d9ed3b --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_assignees_with_assignee_item_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\assignees\{assignee} +type ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilderInternal instantiates a new ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder and sets the default values. +func NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) { + m := &ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/assignees/{assignee}", pathParameters), + } + return m +} +// NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder instantiates a new ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder and sets the default values. +func NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get checks if a user has permission to be assigned to a specific issue.If the `assignee` can be assigned to this issue, a `204` status code with no content is returned.Otherwise a `404` status code is returned. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/assignees#check-if-a-user-can-be-assigned-to-a-issue +func (m *ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation checks if a user has permission to be assigned to a specific issue.If the `assignee` can be assigned to this issue, a `204` status code with no content is returned.Otherwise a `404` status code is returned. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder when successful +func (m *ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder) { + return NewItemItemIssuesItemAssigneesWithAssigneeItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_comments_post_request_body.go b/pkg/github/repos/item_item_issues_item_comments_post_request_body.go new file mode 100644 index 0000000..c85f841 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_comments_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemCommentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contents of the comment. + body *string +} +// NewItemItemIssuesItemCommentsPostRequestBody instantiates a new ItemItemIssuesItemCommentsPostRequestBody and sets the default values. +func NewItemItemIssuesItemCommentsPostRequestBody()(*ItemItemIssuesItemCommentsPostRequestBody) { + m := &ItemItemIssuesItemCommentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemCommentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemCommentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemCommentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemCommentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The contents of the comment. +// returns a *string when successful +func (m *ItemItemIssuesItemCommentsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemCommentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemCommentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemIssuesItemCommentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The contents of the comment. +func (m *ItemItemIssuesItemCommentsPostRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemIssuesItemCommentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_issues_item_comments_request_builder.go b/pkg/github/repos/item_item_issues_item_comments_request_builder.go new file mode 100644 index 0000000..28d11b7 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_comments_request_builder.go @@ -0,0 +1,117 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\comments +type ItemItemIssuesItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesItemCommentsRequestBuilderGetQueryParameters you can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.Issue comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemIssuesItemCommentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// NewItemItemIssuesItemCommentsRequestBuilderInternal instantiates a new ItemItemIssuesItemCommentsRequestBuilder and sets the default values. +func NewItemItemIssuesItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemCommentsRequestBuilder) { + m := &ItemItemIssuesItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/comments{?page*,per_page*,since*}", pathParameters), + } + return m +} +// NewItemItemIssuesItemCommentsRequestBuilder instantiates a new ItemItemIssuesItemCommentsRequestBuilder and sets the default values. +func NewItemItemIssuesItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.Issue comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []IssueCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#list-issue-comments +func (m *ItemItemIssuesItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable) + } + } + return val, nil +} +// Post you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a IssueCommentable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#create-an-issue-comment +func (m *ItemItemIssuesItemCommentsRequestBuilder) Post(ctx context.Context, body ItemItemIssuesItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueCommentable), nil +} +// ToGetRequestInformation you can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.Issue comments are ordered by ascending ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemCommentsRequestBuilder when successful +func (m *ItemItemIssuesItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemCommentsRequestBuilder) { + return NewItemItemIssuesItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_events_request_builder.go b/pkg/github/repos/item_item_issues_item_events_request_builder.go new file mode 100644 index 0000000..91df485 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_events_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemEventsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\events +type ItemItemIssuesItemEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesItemEventsRequestBuilderGetQueryParameters lists all events for an issue. +type ItemItemIssuesItemEventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemIssuesItemEventsRequestBuilderInternal instantiates a new ItemItemIssuesItemEventsRequestBuilder and sets the default values. +func NewItemItemIssuesItemEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemEventsRequestBuilder) { + m := &ItemItemIssuesItemEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesItemEventsRequestBuilder instantiates a new ItemItemIssuesItemEventsRequestBuilder and sets the default values. +func NewItemItemIssuesItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all events for an issue. +// returns a []IssueEventForIssueable when successful +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/events#list-issue-events +func (m *ItemItemIssuesItemEventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemEventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventForIssueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueEventForIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventForIssueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueEventForIssueable) + } + } + return val, nil +} +// ToGetRequestInformation lists all events for an issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemEventsRequestBuilder when successful +func (m *ItemItemIssuesItemEventsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemEventsRequestBuilder) { + return NewItemItemIssuesItemEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_labels_post_request_body_member1.go b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member1.go new file mode 100644 index 0000000..3cdf62a --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#set-labels-for-an-issue)." + labels []string +} +// NewItemItemIssuesItemLabelsPostRequestBodyMember1 instantiates a new ItemItemIssuesItemLabelsPostRequestBodyMember1 and sets the default values. +func NewItemItemIssuesItemLabelsPostRequestBodyMember1()(*ItemItemIssuesItemLabelsPostRequestBodyMember1) { + m := &ItemItemIssuesItemLabelsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#set-labels-for-an-issue)." +// returns a []string when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember1) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemItemIssuesItemLabelsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#set-labels-for-an-issue)." +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember1) SetLabels(value []string)() { + m.labels = value +} +type ItemItemIssuesItemLabelsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/repos/item_item_issues_item_labels_post_request_body_member2.go b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member2.go new file mode 100644 index 0000000..ea62452 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member2.go @@ -0,0 +1,92 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPostRequestBodyMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable +} +// NewItemItemIssuesItemLabelsPostRequestBodyMember2 instantiates a new ItemItemIssuesItemLabelsPostRequestBodyMember2 and sets the default values. +func NewItemItemIssuesItemLabelsPostRequestBodyMember2()(*ItemItemIssuesItemLabelsPostRequestBodyMember2) { + m := &ItemItemIssuesItemLabelsPostRequestBodyMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPostRequestBodyMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPostRequestBodyMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPostRequestBodyMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPostRequestBodyMember2_labelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2) GetLabels()([]ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2) SetLabels(value []ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable)() { + m.labels = value +} +type ItemItemIssuesItemLabelsPostRequestBodyMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable) + SetLabels(value []ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable)() +} diff --git a/pkg/github/repos/item_item_issues_item_labels_post_request_body_member2_labels.go b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member2_labels.go new file mode 100644 index 0000000..444ea9a --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member2_labels.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPostRequestBodyMember2_labels struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name property + name *string +} +// NewItemItemIssuesItemLabelsPostRequestBodyMember2_labels instantiates a new ItemItemIssuesItemLabelsPostRequestBodyMember2_labels and sets the default values. +func NewItemItemIssuesItemLabelsPostRequestBodyMember2_labels()(*ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) { + m := &ItemItemIssuesItemLabelsPostRequestBodyMember2_labels{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPostRequestBodyMember2_labelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPostRequestBodyMember2_labelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPostRequestBodyMember2_labels(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name property +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember2_labels) SetName(value *string)() { + m.name = value +} +type ItemItemIssuesItemLabelsPostRequestBodyMember2_labelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_issues_item_labels_post_request_body_member3.go b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member3.go new file mode 100644 index 0000000..5495d2d --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_post_request_body_member3.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPostRequestBodyMember3 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemIssuesItemLabelsPostRequestBodyMember3 instantiates a new ItemItemIssuesItemLabelsPostRequestBodyMember3 and sets the default values. +func NewItemItemIssuesItemLabelsPostRequestBodyMember3()(*ItemItemIssuesItemLabelsPostRequestBodyMember3) { + m := &ItemItemIssuesItemLabelsPostRequestBodyMember3{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPostRequestBodyMember3FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPostRequestBodyMember3FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPostRequestBodyMember3(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember3) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember3) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember3) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemLabelsPostRequestBodyMember3) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemIssuesItemLabelsPostRequestBodyMember3able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_issues_item_labels_put_request_body_member1.go b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member1.go new file mode 100644 index 0000000..185e7c8 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member1.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPutRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#add-labels-to-an-issue)." + labels []string +} +// NewItemItemIssuesItemLabelsPutRequestBodyMember1 instantiates a new ItemItemIssuesItemLabelsPutRequestBodyMember1 and sets the default values. +func NewItemItemIssuesItemLabelsPutRequestBodyMember1()(*ItemItemIssuesItemLabelsPutRequestBodyMember1) { + m := &ItemItemIssuesItemLabelsPutRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPutRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#add-labels-to-an-issue)." +// returns a []string when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember1) GetLabels()([]string) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + 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 *ItemItemIssuesItemLabelsPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#add-labels-to-an-issue)." +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember1) SetLabels(value []string)() { + m.labels = value +} +type ItemItemIssuesItemLabelsPutRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]string) + SetLabels(value []string)() +} diff --git a/pkg/github/repos/item_item_issues_item_labels_put_request_body_member2.go b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member2.go new file mode 100644 index 0000000..5d5c56e --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member2.go @@ -0,0 +1,92 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPutRequestBodyMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The labels property + labels []ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable +} +// NewItemItemIssuesItemLabelsPutRequestBodyMember2 instantiates a new ItemItemIssuesItemLabelsPutRequestBodyMember2 and sets the default values. +func NewItemItemIssuesItemLabelsPutRequestBodyMember2()(*ItemItemIssuesItemLabelsPutRequestBodyMember2) { + m := &ItemItemIssuesItemLabelsPutRequestBodyMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPutRequestBodyMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPutRequestBodyMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPutRequestBodyMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPutRequestBodyMember2_labelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable) + } + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +// returns a []ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2) GetLabels()([]ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable) { + return m.labels +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabels sets the labels property value. The labels property +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2) SetLabels(value []ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable)() { + m.labels = value +} +type ItemItemIssuesItemLabelsPutRequestBodyMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable) + SetLabels(value []ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable)() +} diff --git a/pkg/github/repos/item_item_issues_item_labels_put_request_body_member2_labels.go b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member2_labels.go new file mode 100644 index 0000000..4aac85d --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member2_labels.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPutRequestBodyMember2_labels struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name property + name *string +} +// NewItemItemIssuesItemLabelsPutRequestBodyMember2_labels instantiates a new ItemItemIssuesItemLabelsPutRequestBodyMember2_labels and sets the default values. +func NewItemItemIssuesItemLabelsPutRequestBodyMember2_labels()(*ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) { + m := &ItemItemIssuesItemLabelsPutRequestBodyMember2_labels{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPutRequestBodyMember2_labelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPutRequestBodyMember2_labelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPutRequestBodyMember2_labels(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. The name property +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember2_labels) SetName(value *string)() { + m.name = value +} +type ItemItemIssuesItemLabelsPutRequestBodyMember2_labelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_issues_item_labels_put_request_body_member3.go b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member3.go new file mode 100644 index 0000000..dd7c1f5 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_put_request_body_member3.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLabelsPutRequestBodyMember3 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemIssuesItemLabelsPutRequestBodyMember3 instantiates a new ItemItemIssuesItemLabelsPutRequestBodyMember3 and sets the default values. +func NewItemItemIssuesItemLabelsPutRequestBodyMember3()(*ItemItemIssuesItemLabelsPutRequestBodyMember3) { + m := &ItemItemIssuesItemLabelsPutRequestBodyMember3{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLabelsPutRequestBodyMember3FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLabelsPutRequestBodyMember3FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLabelsPutRequestBodyMember3(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember3) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember3) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember3) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemLabelsPutRequestBodyMember3) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemIssuesItemLabelsPutRequestBodyMember3able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_issues_item_labels_request_builder.go b/pkg/github/repos/item_item_issues_item_labels_request_builder.go new file mode 100644 index 0000000..074fdae --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_request_builder.go @@ -0,0 +1,671 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemLabelsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\labels +type ItemItemIssuesItemLabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesItemLabelsRequestBuilderGetQueryParameters lists all labels for an issue. +type ItemItemIssuesItemLabelsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// LabelsPostRequestBody composed type wrapper for classes ItemItemIssuesItemLabelsPostRequestBodyMember1able, ItemItemIssuesItemLabelsPostRequestBodyMember2able, string, []ItemItemIssuesItemLabelsPostRequestBodyMember3able +type LabelsPostRequestBody struct { + // Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able + itemItemIssuesItemLabelsPostRequestBodyMember1 ItemItemIssuesItemLabelsPostRequestBodyMember1able + // Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember2able + itemItemIssuesItemLabelsPostRequestBodyMember2 ItemItemIssuesItemLabelsPostRequestBodyMember2able + // Composed type representation for type []ItemItemIssuesItemLabelsPostRequestBodyMember3able + itemItemIssuesItemLabelsPostRequestBodyMember3 []ItemItemIssuesItemLabelsPostRequestBodyMember3able + // Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able + labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1 ItemItemIssuesItemLabelsPostRequestBodyMember1able + // Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember2able + labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2 ItemItemIssuesItemLabelsPostRequestBodyMember2able + // Composed type representation for type []ItemItemIssuesItemLabelsPostRequestBodyMember3able + labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3 []ItemItemIssuesItemLabelsPostRequestBodyMember3able + // Composed type representation for type string + labelsPostRequestBodyString *string + // Composed type representation for type string + string *string +} +// NewLabelsPostRequestBody instantiates a new LabelsPostRequestBody and sets the default values. +func NewLabelsPostRequestBody()(*LabelsPostRequestBody) { + m := &LabelsPostRequestBody{ + } + return m +} +// CreateLabelsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewLabelsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetLabelsPostRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPostRequestBodyMember3FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemItemIssuesItemLabelsPostRequestBodyMember3able, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemItemIssuesItemLabelsPostRequestBodyMember3able) + } + } + result.SetItemItemIssuesItemLabelsPostRequestBodyMember3(cast) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPostRequestBodyMember3FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemItemIssuesItemLabelsPostRequestBodyMember3able, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemItemIssuesItemLabelsPostRequestBodyMember3able) + } + } + result.SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3(cast) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LabelsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *LabelsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemIssuesItemLabelsPostRequestBodyMember1 gets the ItemItemIssuesItemLabelsPostRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able +// returns a ItemItemIssuesItemLabelsPostRequestBodyMember1able when successful +func (m *LabelsPostRequestBody) GetItemItemIssuesItemLabelsPostRequestBodyMember1()(ItemItemIssuesItemLabelsPostRequestBodyMember1able) { + return m.itemItemIssuesItemLabelsPostRequestBodyMember1 +} +// GetItemItemIssuesItemLabelsPostRequestBodyMember2 gets the ItemItemIssuesItemLabelsPostRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember2able +// returns a ItemItemIssuesItemLabelsPostRequestBodyMember2able when successful +func (m *LabelsPostRequestBody) GetItemItemIssuesItemLabelsPostRequestBodyMember2()(ItemItemIssuesItemLabelsPostRequestBodyMember2able) { + return m.itemItemIssuesItemLabelsPostRequestBodyMember2 +} +// GetItemItemIssuesItemLabelsPostRequestBodyMember3 gets the ItemItemIssuesItemLabelsPostRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPostRequestBodyMember3able +// returns a []ItemItemIssuesItemLabelsPostRequestBodyMember3able when successful +func (m *LabelsPostRequestBody) GetItemItemIssuesItemLabelsPostRequestBodyMember3()([]ItemItemIssuesItemLabelsPostRequestBodyMember3able) { + return m.itemItemIssuesItemLabelsPostRequestBodyMember3 +} +// GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1 gets the ItemItemIssuesItemLabelsPostRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able +// returns a ItemItemIssuesItemLabelsPostRequestBodyMember1able when successful +func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1()(ItemItemIssuesItemLabelsPostRequestBodyMember1able) { + return m.labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1 +} +// GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2 gets the ItemItemIssuesItemLabelsPostRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember2able +// returns a ItemItemIssuesItemLabelsPostRequestBodyMember2able when successful +func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2()(ItemItemIssuesItemLabelsPostRequestBodyMember2able) { + return m.labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2 +} +// GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3 gets the ItemItemIssuesItemLabelsPostRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPostRequestBodyMember3able +// returns a []ItemItemIssuesItemLabelsPostRequestBodyMember3able when successful +func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3()([]ItemItemIssuesItemLabelsPostRequestBodyMember3able) { + return m.labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3 +} +// GetLabelsPostRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyString()(*string) { + return m.labelsPostRequestBodyString +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *LabelsPostRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *LabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemIssuesItemLabelsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemIssuesItemLabelsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemIssuesItemLabelsPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetItemItemIssuesItemLabelsPostRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetLabelsPostRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetLabelsPostRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetItemItemIssuesItemLabelsPostRequestBodyMember3() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemItemIssuesItemLabelsPostRequestBodyMember3())) + for i, v := range m.GetItemItemIssuesItemLabelsPostRequestBodyMember3() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } else if m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3())) + for i, v := range m.GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } + return nil +} +// SetItemItemIssuesItemLabelsPostRequestBodyMember1 sets the ItemItemIssuesItemLabelsPostRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able +func (m *LabelsPostRequestBody) SetItemItemIssuesItemLabelsPostRequestBodyMember1(value ItemItemIssuesItemLabelsPostRequestBodyMember1able)() { + m.itemItemIssuesItemLabelsPostRequestBodyMember1 = value +} +// SetItemItemIssuesItemLabelsPostRequestBodyMember2 sets the ItemItemIssuesItemLabelsPostRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember2able +func (m *LabelsPostRequestBody) SetItemItemIssuesItemLabelsPostRequestBodyMember2(value ItemItemIssuesItemLabelsPostRequestBodyMember2able)() { + m.itemItemIssuesItemLabelsPostRequestBodyMember2 = value +} +// SetItemItemIssuesItemLabelsPostRequestBodyMember3 sets the ItemItemIssuesItemLabelsPostRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPostRequestBodyMember3able +func (m *LabelsPostRequestBody) SetItemItemIssuesItemLabelsPostRequestBodyMember3(value []ItemItemIssuesItemLabelsPostRequestBodyMember3able)() { + m.itemItemIssuesItemLabelsPostRequestBodyMember3 = value +} +// SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1 sets the ItemItemIssuesItemLabelsPostRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able +func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1(value ItemItemIssuesItemLabelsPostRequestBodyMember1able)() { + m.labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1 = value +} +// SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2 sets the ItemItemIssuesItemLabelsPostRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember2able +func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2(value ItemItemIssuesItemLabelsPostRequestBodyMember2able)() { + m.labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2 = value +} +// SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3 sets the ItemItemIssuesItemLabelsPostRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPostRequestBodyMember3able +func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3(value []ItemItemIssuesItemLabelsPostRequestBodyMember3able)() { + m.labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3 = value +} +// SetLabelsPostRequestBodyString sets the string property value. Composed type representation for type string +func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyString(value *string)() { + m.labelsPostRequestBodyString = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *LabelsPostRequestBody) SetString(value *string)() { + m.string = value +} +// LabelsPutRequestBody composed type wrapper for classes ItemItemIssuesItemLabelsPutRequestBodyMember1able, ItemItemIssuesItemLabelsPutRequestBodyMember2able, string, []ItemItemIssuesItemLabelsPutRequestBodyMember3able +type LabelsPutRequestBody struct { + // Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able + itemItemIssuesItemLabelsPutRequestBodyMember1 ItemItemIssuesItemLabelsPutRequestBodyMember1able + // Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember2able + itemItemIssuesItemLabelsPutRequestBodyMember2 ItemItemIssuesItemLabelsPutRequestBodyMember2able + // Composed type representation for type []ItemItemIssuesItemLabelsPutRequestBodyMember3able + itemItemIssuesItemLabelsPutRequestBodyMember3 []ItemItemIssuesItemLabelsPutRequestBodyMember3able + // Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able + labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1 ItemItemIssuesItemLabelsPutRequestBodyMember1able + // Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember2able + labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2 ItemItemIssuesItemLabelsPutRequestBodyMember2able + // Composed type representation for type []ItemItemIssuesItemLabelsPutRequestBodyMember3able + labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3 []ItemItemIssuesItemLabelsPutRequestBodyMember3able + // Composed type representation for type string + labelsPutRequestBodyString *string + // Composed type representation for type string + string *string +} +// NewLabelsPutRequestBody instantiates a new LabelsPutRequestBody and sets the default values. +func NewLabelsPutRequestBody()(*LabelsPutRequestBody) { + m := &LabelsPutRequestBody{ + } + return m +} +// CreateLabelsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabelsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewLabelsPutRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetLabelsPutRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPutRequestBodyMember3FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemItemIssuesItemLabelsPutRequestBodyMember3able, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemItemIssuesItemLabelsPutRequestBodyMember3able) + } + } + result.SetItemItemIssuesItemLabelsPutRequestBodyMember3(cast) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPutRequestBodyMember3FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemItemIssuesItemLabelsPutRequestBodyMember3able, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemItemIssuesItemLabelsPutRequestBodyMember3able) + } + } + result.SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3(cast) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LabelsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *LabelsPutRequestBody) GetIsComposedType()(bool) { + return true +} +// GetItemItemIssuesItemLabelsPutRequestBodyMember1 gets the ItemItemIssuesItemLabelsPutRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able +// returns a ItemItemIssuesItemLabelsPutRequestBodyMember1able when successful +func (m *LabelsPutRequestBody) GetItemItemIssuesItemLabelsPutRequestBodyMember1()(ItemItemIssuesItemLabelsPutRequestBodyMember1able) { + return m.itemItemIssuesItemLabelsPutRequestBodyMember1 +} +// GetItemItemIssuesItemLabelsPutRequestBodyMember2 gets the ItemItemIssuesItemLabelsPutRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember2able +// returns a ItemItemIssuesItemLabelsPutRequestBodyMember2able when successful +func (m *LabelsPutRequestBody) GetItemItemIssuesItemLabelsPutRequestBodyMember2()(ItemItemIssuesItemLabelsPutRequestBodyMember2able) { + return m.itemItemIssuesItemLabelsPutRequestBodyMember2 +} +// GetItemItemIssuesItemLabelsPutRequestBodyMember3 gets the ItemItemIssuesItemLabelsPutRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPutRequestBodyMember3able +// returns a []ItemItemIssuesItemLabelsPutRequestBodyMember3able when successful +func (m *LabelsPutRequestBody) GetItemItemIssuesItemLabelsPutRequestBodyMember3()([]ItemItemIssuesItemLabelsPutRequestBodyMember3able) { + return m.itemItemIssuesItemLabelsPutRequestBodyMember3 +} +// GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1 gets the ItemItemIssuesItemLabelsPutRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able +// returns a ItemItemIssuesItemLabelsPutRequestBodyMember1able when successful +func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1()(ItemItemIssuesItemLabelsPutRequestBodyMember1able) { + return m.labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1 +} +// GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2 gets the ItemItemIssuesItemLabelsPutRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember2able +// returns a ItemItemIssuesItemLabelsPutRequestBodyMember2able when successful +func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2()(ItemItemIssuesItemLabelsPutRequestBodyMember2able) { + return m.labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2 +} +// GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3 gets the ItemItemIssuesItemLabelsPutRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPutRequestBodyMember3able +// returns a []ItemItemIssuesItemLabelsPutRequestBodyMember3able when successful +func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3()([]ItemItemIssuesItemLabelsPutRequestBodyMember3able) { + return m.labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3 +} +// GetLabelsPutRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyString()(*string) { + return m.labelsPutRequestBodyString +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *LabelsPutRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *LabelsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemIssuesItemLabelsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemIssuesItemLabelsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetItemItemIssuesItemLabelsPutRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetItemItemIssuesItemLabelsPutRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetLabelsPutRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetLabelsPutRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetItemItemIssuesItemLabelsPutRequestBodyMember3() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemItemIssuesItemLabelsPutRequestBodyMember3())) + for i, v := range m.GetItemItemIssuesItemLabelsPutRequestBodyMember3() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } else if m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3())) + for i, v := range m.GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } + return nil +} +// SetItemItemIssuesItemLabelsPutRequestBodyMember1 sets the ItemItemIssuesItemLabelsPutRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able +func (m *LabelsPutRequestBody) SetItemItemIssuesItemLabelsPutRequestBodyMember1(value ItemItemIssuesItemLabelsPutRequestBodyMember1able)() { + m.itemItemIssuesItemLabelsPutRequestBodyMember1 = value +} +// SetItemItemIssuesItemLabelsPutRequestBodyMember2 sets the ItemItemIssuesItemLabelsPutRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember2able +func (m *LabelsPutRequestBody) SetItemItemIssuesItemLabelsPutRequestBodyMember2(value ItemItemIssuesItemLabelsPutRequestBodyMember2able)() { + m.itemItemIssuesItemLabelsPutRequestBodyMember2 = value +} +// SetItemItemIssuesItemLabelsPutRequestBodyMember3 sets the ItemItemIssuesItemLabelsPutRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPutRequestBodyMember3able +func (m *LabelsPutRequestBody) SetItemItemIssuesItemLabelsPutRequestBodyMember3(value []ItemItemIssuesItemLabelsPutRequestBodyMember3able)() { + m.itemItemIssuesItemLabelsPutRequestBodyMember3 = value +} +// SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1 sets the ItemItemIssuesItemLabelsPutRequestBodyMember1 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able +func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1(value ItemItemIssuesItemLabelsPutRequestBodyMember1able)() { + m.labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1 = value +} +// SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2 sets the ItemItemIssuesItemLabelsPutRequestBodyMember2 property value. Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember2able +func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2(value ItemItemIssuesItemLabelsPutRequestBodyMember2able)() { + m.labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2 = value +} +// SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3 sets the ItemItemIssuesItemLabelsPutRequestBodyMember3 property value. Composed type representation for type []ItemItemIssuesItemLabelsPutRequestBodyMember3able +func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3(value []ItemItemIssuesItemLabelsPutRequestBodyMember3able)() { + m.labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3 = value +} +// SetLabelsPutRequestBodyString sets the string property value. Composed type representation for type string +func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyString(value *string)() { + m.labelsPutRequestBodyString = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *LabelsPutRequestBody) SetString(value *string)() { + m.string = value +} +type LabelsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemIssuesItemLabelsPostRequestBodyMember1()(ItemItemIssuesItemLabelsPostRequestBodyMember1able) + GetItemItemIssuesItemLabelsPostRequestBodyMember2()(ItemItemIssuesItemLabelsPostRequestBodyMember2able) + GetItemItemIssuesItemLabelsPostRequestBodyMember3()([]ItemItemIssuesItemLabelsPostRequestBodyMember3able) + GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1()(ItemItemIssuesItemLabelsPostRequestBodyMember1able) + GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2()(ItemItemIssuesItemLabelsPostRequestBodyMember2able) + GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3()([]ItemItemIssuesItemLabelsPostRequestBodyMember3able) + GetLabelsPostRequestBodyString()(*string) + GetString()(*string) + SetItemItemIssuesItemLabelsPostRequestBodyMember1(value ItemItemIssuesItemLabelsPostRequestBodyMember1able)() + SetItemItemIssuesItemLabelsPostRequestBodyMember2(value ItemItemIssuesItemLabelsPostRequestBodyMember2able)() + SetItemItemIssuesItemLabelsPostRequestBodyMember3(value []ItemItemIssuesItemLabelsPostRequestBodyMember3able)() + SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember1(value ItemItemIssuesItemLabelsPostRequestBodyMember1able)() + SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2(value ItemItemIssuesItemLabelsPostRequestBodyMember2able)() + SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3(value []ItemItemIssuesItemLabelsPostRequestBodyMember3able)() + SetLabelsPostRequestBodyString(value *string)() + SetString(value *string)() +} +type LabelsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemIssuesItemLabelsPutRequestBodyMember1()(ItemItemIssuesItemLabelsPutRequestBodyMember1able) + GetItemItemIssuesItemLabelsPutRequestBodyMember2()(ItemItemIssuesItemLabelsPutRequestBodyMember2able) + GetItemItemIssuesItemLabelsPutRequestBodyMember3()([]ItemItemIssuesItemLabelsPutRequestBodyMember3able) + GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1()(ItemItemIssuesItemLabelsPutRequestBodyMember1able) + GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2()(ItemItemIssuesItemLabelsPutRequestBodyMember2able) + GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3()([]ItemItemIssuesItemLabelsPutRequestBodyMember3able) + GetLabelsPutRequestBodyString()(*string) + GetString()(*string) + SetItemItemIssuesItemLabelsPutRequestBodyMember1(value ItemItemIssuesItemLabelsPutRequestBodyMember1able)() + SetItemItemIssuesItemLabelsPutRequestBodyMember2(value ItemItemIssuesItemLabelsPutRequestBodyMember2able)() + SetItemItemIssuesItemLabelsPutRequestBodyMember3(value []ItemItemIssuesItemLabelsPutRequestBodyMember3able)() + SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember1(value ItemItemIssuesItemLabelsPutRequestBodyMember1able)() + SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2(value ItemItemIssuesItemLabelsPutRequestBodyMember2able)() + SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3(value []ItemItemIssuesItemLabelsPutRequestBodyMember3able)() + SetLabelsPutRequestBodyString(value *string)() + SetString(value *string)() +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.item.labels.item collection +// returns a *ItemItemIssuesItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemItemIssuesItemLabelsRequestBuilder) ByName(name string)(*ItemItemIssuesItemLabelsWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemItemIssuesItemLabelsWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesItemLabelsRequestBuilderInternal instantiates a new ItemItemIssuesItemLabelsRequestBuilder and sets the default values. +func NewItemItemIssuesItemLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemLabelsRequestBuilder) { + m := &ItemItemIssuesItemLabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesItemLabelsRequestBuilder instantiates a new ItemItemIssuesItemLabelsRequestBuilder and sets the default values. +func NewItemItemIssuesItemLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemLabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes all labels from an issue. +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#remove-all-labels-from-an-issue +func (m *ItemItemIssuesItemLabelsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get lists all labels for an issue. +// returns a []Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#list-labels-for-an-issue +func (m *ItemItemIssuesItemLabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemLabelsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable) + } + } + return val, nil +} +// Post adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. +// returns a []Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#add-labels-to-an-issue +func (m *ItemItemIssuesItemLabelsRequestBuilder) Post(ctx context.Context, body LabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable) + } + } + return val, nil +} +// Put removes any previous labels and sets the new labels for an issue. +// returns a []Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#set-labels-for-an-issue +func (m *ItemItemIssuesItemLabelsRequestBuilder) Put(ctx context.Context, body LabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable) + } + } + return val, nil +} +// ToDeleteRequestInformation removes all labels from an issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLabelsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation lists all labels for an issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemLabelsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body LabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation removes any previous labels and sets the new labels for an issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLabelsRequestBuilder) ToPutRequestInformation(ctx context.Context, body LabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemLabelsRequestBuilder when successful +func (m *ItemItemIssuesItemLabelsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemLabelsRequestBuilder) { + return NewItemItemIssuesItemLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_labels_with_name_item_request_builder.go b/pkg/github/repos/item_item_issues_item_labels_with_name_item_request_builder.go new file mode 100644 index 0000000..340bff7 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_labels_with_name_item_request_builder.go @@ -0,0 +1,66 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemLabelsWithNameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\labels\{name} +type ItemItemIssuesItemLabelsWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesItemLabelsWithNameItemRequestBuilderInternal instantiates a new ItemItemIssuesItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemItemIssuesItemLabelsWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemLabelsWithNameItemRequestBuilder) { + m := &ItemItemIssuesItemLabelsWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels/{name}", pathParameters), + } + return m +} +// NewItemItemIssuesItemLabelsWithNameItemRequestBuilder instantiates a new ItemItemIssuesItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemItemIssuesItemLabelsWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemLabelsWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemLabelsWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. +// returns a []Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#remove-a-label-from-an-issue +func (m *ItemItemIssuesItemLabelsWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable) + } + } + return val, nil +} +// ToDeleteRequestInformation removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLabelsWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemItemIssuesItemLabelsWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemLabelsWithNameItemRequestBuilder) { + return NewItemItemIssuesItemLabelsWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_lock_put_request_body.go b/pkg/github/repos/item_item_issues_item_lock_put_request_body.go new file mode 100644 index 0000000..9a8d2db --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_lock_put_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemLockPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemIssuesItemLockPutRequestBody instantiates a new ItemItemIssuesItemLockPutRequestBody and sets the default values. +func NewItemItemIssuesItemLockPutRequestBody()(*ItemItemIssuesItemLockPutRequestBody) { + m := &ItemItemIssuesItemLockPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemLockPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemLockPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemLockPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemLockPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemLockPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemLockPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemLockPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemIssuesItemLockPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_issues_item_lock_request_builder.go b/pkg/github/repos/item_item_issues_item_lock_request_builder.go new file mode 100644 index 0000000..3634a52 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_lock_request_builder.go @@ -0,0 +1,96 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemLockRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\lock +type ItemItemIssuesItemLockRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesItemLockRequestBuilderInternal instantiates a new ItemItemIssuesItemLockRequestBuilder and sets the default values. +func NewItemItemIssuesItemLockRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemLockRequestBuilder) { + m := &ItemItemIssuesItemLockRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/lock", pathParameters), + } + return m +} +// NewItemItemIssuesItemLockRequestBuilder instantiates a new ItemItemIssuesItemLockRequestBuilder and sets the default values. +func NewItemItemIssuesItemLockRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemLockRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemLockRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete users with push access can unlock an issue's conversation. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#unlock-an-issue +func (m *ItemItemIssuesItemLockRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put users with push access can lock an issue or pull request's conversation.Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#lock-an-issue +func (m *ItemItemIssuesItemLockRequestBuilder) Put(ctx context.Context, body ItemItemIssuesItemLockPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation users with push access can unlock an issue's conversation. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLockRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation users with push access can lock an issue or pull request's conversation.Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemLockRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemIssuesItemLockPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemLockRequestBuilder when successful +func (m *ItemItemIssuesItemLockRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemLockRequestBuilder) { + return NewItemItemIssuesItemLockRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_reactions_post_request_body.go b/pkg/github/repos/item_item_issues_item_reactions_post_request_body.go new file mode 100644 index 0000000..f0d0002 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemIssuesItemReactionsPostRequestBody instantiates a new ItemItemIssuesItemReactionsPostRequestBody and sets the default values. +func NewItemItemIssuesItemReactionsPostRequestBody()(*ItemItemIssuesItemReactionsPostRequestBody) { + m := &ItemItemIssuesItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemIssuesItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_issues_item_reactions_request_builder.go b/pkg/github/repos/item_item_issues_item_reactions_request_builder.go new file mode 100644 index 0000000..ff997c2 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_reactions_request_builder.go @@ -0,0 +1,122 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i91b86ac0c3458587609db1510f7791ce57f70756e0b811f4fe3774e14bc99d9b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/issues/item/reactions" +) + +// ItemItemIssuesItemReactionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\reactions +type ItemItemIssuesItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesItemReactionsRequestBuilderGetQueryParameters list the reactions to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). +type ItemItemIssuesItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue. + Content *i91b86ac0c3458587609db1510f7791ce57f70756e0b811f4fe3774e14bc99d9b.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.item.reactions.item collection +// returns a *ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemIssuesItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesItemReactionsRequestBuilderInternal instantiates a new ItemItemIssuesItemReactionsRequestBuilder and sets the default values. +func NewItemItemIssuesItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemReactionsRequestBuilder) { + m := &ItemItemIssuesItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesItemReactionsRequestBuilder instantiates a new ItemItemIssuesItemReactionsRequestBuilder and sets the default values. +func NewItemItemIssuesItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). +// returns a []Reactionable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-an-issue +func (m *ItemItemIssuesItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. +// returns a Reactionable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-an-issue +func (m *ItemItemIssuesItemReactionsRequestBuilder) Post(ctx context.Context, body ItemItemIssuesItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemReactionsRequestBuilder when successful +func (m *ItemItemIssuesItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemReactionsRequestBuilder) { + return NewItemItemIssuesItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_reactions_with_reaction_item_request_builder.go b/pkg/github/repos/item_item_issues_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..f584189 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\reactions\{reaction_id} +type ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.Delete a reaction to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-an-issue-reaction +func (m *ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.Delete a reaction to an [issue](https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue). +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemItemIssuesItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_timeline_request_builder.go b/pkg/github/repos/item_item_issues_item_timeline_request_builder.go new file mode 100644 index 0000000..c518d91 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_timeline_request_builder.go @@ -0,0 +1,73 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesItemTimelineRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\timeline +type ItemItemIssuesItemTimelineRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesItemTimelineRequestBuilderGetQueryParameters list all timeline events for an issue. +type ItemItemIssuesItemTimelineRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemIssuesItemTimelineRequestBuilderInternal instantiates a new ItemItemIssuesItemTimelineRequestBuilder and sets the default values. +func NewItemItemIssuesItemTimelineRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemTimelineRequestBuilder) { + m := &ItemItemIssuesItemTimelineRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/timeline{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesItemTimelineRequestBuilder instantiates a new ItemItemIssuesItemTimelineRequestBuilder and sets the default values. +func NewItemItemIssuesItemTimelineRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemTimelineRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemTimelineRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all timeline events for an issue. +// returns a []TimelineIssueEventsable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/timeline#list-timeline-events-for-an-issue +func (m *ItemItemIssuesItemTimelineRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemTimelineRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TimelineIssueEventsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTimelineIssueEventsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TimelineIssueEventsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TimelineIssueEventsable) + } + } + return val, nil +} +// ToGetRequestInformation list all timeline events for an issue. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemTimelineRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemTimelineRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemTimelineRequestBuilder when successful +func (m *ItemItemIssuesItemTimelineRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemTimelineRequestBuilder) { + return NewItemItemIssuesItemTimelineRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_with_issue_number_patch_request_body.go b/pkg/github/repos/item_item_issues_item_with_issue_number_patch_request_body.go new file mode 100644 index 0000000..237c669 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_with_issue_number_patch_request_body.go @@ -0,0 +1,425 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemWithIssue_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Username to assign to this issue. **This field is deprecated.** + assignee *string + // Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. + assignees []string + // The contents of the issue. + body *string + // Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped. + labels []string + // The milestone property + milestone ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable + // The title of the issue. + title ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable +} +// ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone composed type wrapper for classes int32, string +type ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone struct { + // Composed type representation for type int32 + integer *int32 + // Composed type representation for type string + string *string +} +// NewItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone instantiates a new ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone and sets the default values. +func NewItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone()(*ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) { + m := &ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone{ + } + return m +} +// CreateItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetInt32Value(); val != nil { + if err != nil { + return nil, err + } + result.SetInteger(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetInteger gets the integer property value. Composed type representation for type int32 +// returns a *int32 when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) GetInteger()(*int32) { + return m.integer +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInteger() != nil { + err := writer.WriteInt32Value("", m.GetInteger()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetInteger sets the integer property value. Composed type representation for type int32 +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) SetInteger(value *int32)() { + m.integer = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestone) SetString(value *string)() { + m.string = value +} +// ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title composed type wrapper for classes int32, string +type ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title struct { + // Composed type representation for type int32 + integer *int32 + // Composed type representation for type string + string *string +} +// NewItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title instantiates a new ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title and sets the default values. +func NewItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title()(*ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) { + m := &ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title{ + } + return m +} +// CreateItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetInt32Value(); val != nil { + if err != nil { + return nil, err + } + result.SetInteger(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetInteger gets the integer property value. Composed type representation for type int32 +// returns a *int32 when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) GetInteger()(*int32) { + return m.integer +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInteger() != nil { + err := writer.WriteInt32Value("", m.GetInteger()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetInteger sets the integer property value. Composed type representation for type int32 +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) SetInteger(value *int32)() { + m.integer = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_title) SetString(value *string)() { + m.string = value +} +type ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInteger()(*int32) + GetString()(*string) + SetInteger(value *int32)() + SetString(value *string)() +} +type ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInteger()(*int32) + GetString()(*string) + SetInteger(value *int32)() + SetString(value *string)() +} +// NewItemItemIssuesItemWithIssue_numberPatchRequestBody instantiates a new ItemItemIssuesItemWithIssue_numberPatchRequestBody and sets the default values. +func NewItemItemIssuesItemWithIssue_numberPatchRequestBody()(*ItemItemIssuesItemWithIssue_numberPatchRequestBody) { + m := &ItemItemIssuesItemWithIssue_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemWithIssue_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemWithIssue_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemWithIssue_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. Username to assign to this issue. **This field is deprecated.** +// returns a *string when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetAssignee()(*string) { + return m.assignee +} +// GetAssignees gets the assignees property value. Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. +// returns a []string when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetAssignees()([]string) { + return m.assignees +} +// GetBody gets the body property value. The contents of the issue. +// returns a *string when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAssignees(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable)) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTitle(val.(ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable)) + } + return nil + } + return res +} +// GetLabels gets the labels property value. Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped. +// returns a []string when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetLabels()([]string) { + return m.labels +} +// GetMilestone gets the milestone property value. The milestone property +// returns a ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetMilestone()(ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable) { + return m.milestone +} +// GetTitle gets the title property value. The title of the issue. +// returns a ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable when successful +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) GetTitle()(ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + err := writer.WriteCollectionOfStringValues("assignees", m.GetAssignees()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("title", m.GetTitle()) + 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 *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. Username to assign to this issue. **This field is deprecated.** +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetAssignee(value *string)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetAssignees(value []string)() { + m.assignees = value +} +// SetBody sets the body property value. The contents of the issue. +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetBody(value *string)() { + m.body = value +} +// SetLabels sets the labels property value. Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped. +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetLabels(value []string)() { + m.labels = value +} +// SetMilestone sets the milestone property value. The milestone property +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetMilestone(value ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable)() { + m.milestone = value +} +// SetTitle sets the title property value. The title of the issue. +func (m *ItemItemIssuesItemWithIssue_numberPatchRequestBody) SetTitle(value ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable)() { + m.title = value +} +type ItemItemIssuesItemWithIssue_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignee()(*string) + GetAssignees()([]string) + GetBody()(*string) + GetLabels()([]string) + GetMilestone()(ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable) + GetTitle()(ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable) + SetAssignee(value *string)() + SetAssignees(value []string)() + SetBody(value *string)() + SetLabels(value []string)() + SetMilestone(value ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_milestoneable)() + SetTitle(value ItemItemIssuesItemWithIssue_numberPatchRequestBody_WithIssue_numberPatchRequestBody_titleable)() +} diff --git a/pkg/github/repos/item_item_issues_post_request_body.go b/pkg/github/repos/item_item_issues_post_request_body.go new file mode 100644 index 0000000..cb50642 --- /dev/null +++ b/pkg/github/repos/item_item_issues_post_request_body.go @@ -0,0 +1,425 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + assignee *string + // Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + assignees []string + // The contents of the issue. + body *string + // Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + labels []string + // The milestone property + milestone ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable + // The title of the issue. + title ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable +} +// ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone composed type wrapper for classes int32, string +type ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone struct { + // Composed type representation for type int32 + integer *int32 + // Composed type representation for type string + string *string +} +// NewItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone instantiates a new ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone and sets the default values. +func NewItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone()(*ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) { + m := &ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone{ + } + return m +} +// CreateItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetInt32Value(); val != nil { + if err != nil { + return nil, err + } + result.SetInteger(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetInteger gets the integer property value. Composed type representation for type int32 +// returns a *int32 when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) GetInteger()(*int32) { + return m.integer +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInteger() != nil { + err := writer.WriteInt32Value("", m.GetInteger()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetInteger sets the integer property value. Composed type representation for type int32 +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) SetInteger(value *int32)() { + m.integer = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestone) SetString(value *string)() { + m.string = value +} +// ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title composed type wrapper for classes int32, string +type ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title struct { + // Composed type representation for type int32 + integer *int32 + // Composed type representation for type string + string *string +} +// NewItemItemIssuesPostRequestBody_IssuesPostRequestBody_title instantiates a new ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title and sets the default values. +func NewItemItemIssuesPostRequestBody_IssuesPostRequestBody_title()(*ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) { + m := &ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title{ + } + return m +} +// CreateItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemItemIssuesPostRequestBody_IssuesPostRequestBody_title() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetInt32Value(); val != nil { + if err != nil { + return nil, err + } + result.SetInteger(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetInteger gets the integer property value. Composed type representation for type int32 +// returns a *int32 when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) GetInteger()(*int32) { + return m.integer +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInteger() != nil { + err := writer.WriteInt32Value("", m.GetInteger()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetInteger sets the integer property value. Composed type representation for type int32 +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) SetInteger(value *int32)() { + m.integer = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ItemItemIssuesPostRequestBody_IssuesPostRequestBody_title) SetString(value *string)() { + m.string = value +} +type ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInteger()(*int32) + GetString()(*string) + SetInteger(value *int32)() + SetString(value *string)() +} +type ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInteger()(*int32) + GetString()(*string) + SetInteger(value *int32)() + SetString(value *string)() +} +// NewItemItemIssuesPostRequestBody instantiates a new ItemItemIssuesPostRequestBody and sets the default values. +func NewItemItemIssuesPostRequestBody()(*ItemItemIssuesPostRequestBody) { + m := &ItemItemIssuesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAssignee gets the assignee property value. Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ +// returns a *string when successful +func (m *ItemItemIssuesPostRequestBody) GetAssignee()(*string) { + return m.assignee +} +// GetAssignees gets the assignees property value. Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ +// returns a []string when successful +func (m *ItemItemIssuesPostRequestBody) GetAssignees()([]string) { + return m.assignees +} +// GetBody gets the body property value. The contents of the issue. +// returns a *string when successful +func (m *ItemItemIssuesPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignee(val) + } + return nil + } + res["assignees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAssignees(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetLabels(res) + } + return nil + } + res["milestone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMilestone(val.(ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable)) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTitle(val.(ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable)) + } + return nil + } + return res +} +// GetLabels gets the labels property value. Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ +// returns a []string when successful +func (m *ItemItemIssuesPostRequestBody) GetLabels()([]string) { + return m.labels +} +// GetMilestone gets the milestone property value. The milestone property +// returns a ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable when successful +func (m *ItemItemIssuesPostRequestBody) GetMilestone()(ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable) { + return m.milestone +} +// GetTitle gets the title property value. The title of the issue. +// returns a ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable when successful +func (m *ItemItemIssuesPostRequestBody) GetTitle()(ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemIssuesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("assignee", m.GetAssignee()) + if err != nil { + return err + } + } + if m.GetAssignees() != nil { + err := writer.WriteCollectionOfStringValues("assignees", m.GetAssignees()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", m.GetLabels()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("milestone", m.GetMilestone()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("title", m.GetTitle()) + 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 *ItemItemIssuesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAssignee sets the assignee property value. Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ +func (m *ItemItemIssuesPostRequestBody) SetAssignee(value *string)() { + m.assignee = value +} +// SetAssignees sets the assignees property value. Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ +func (m *ItemItemIssuesPostRequestBody) SetAssignees(value []string)() { + m.assignees = value +} +// SetBody sets the body property value. The contents of the issue. +func (m *ItemItemIssuesPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetLabels sets the labels property value. Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ +func (m *ItemItemIssuesPostRequestBody) SetLabels(value []string)() { + m.labels = value +} +// SetMilestone sets the milestone property value. The milestone property +func (m *ItemItemIssuesPostRequestBody) SetMilestone(value ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable)() { + m.milestone = value +} +// SetTitle sets the title property value. The title of the issue. +func (m *ItemItemIssuesPostRequestBody) SetTitle(value ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable)() { + m.title = value +} +type ItemItemIssuesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignee()(*string) + GetAssignees()([]string) + GetBody()(*string) + GetLabels()([]string) + GetMilestone()(ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable) + GetTitle()(ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable) + SetAssignee(value *string)() + SetAssignees(value []string)() + SetBody(value *string)() + SetLabels(value []string)() + SetMilestone(value ItemItemIssuesPostRequestBody_IssuesPostRequestBody_milestoneable)() + SetTitle(value ItemItemIssuesPostRequestBody_IssuesPostRequestBody_titleable)() +} diff --git a/pkg/github/repos/item_item_issues_request_builder.go b/pkg/github/repos/item_item_issues_request_builder.go new file mode 100644 index 0000000..7ee407f --- /dev/null +++ b/pkg/github/repos/item_item_issues_request_builder.go @@ -0,0 +1,159 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i9100b48fb51d8d4dd37e82dd5e06dc99d474eda9c69f6b68676b03363441f27d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/issues" +) + +// ItemItemIssuesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues +type ItemItemIssuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesRequestBuilderGetQueryParameters list issues in a repository. Only open issues will be listed.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemIssuesRequestBuilderGetQueryParameters struct { + // Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. + Assignee *string `uriparametername:"assignee"` + // The user that created the issue. + Creator *string `uriparametername:"creator"` + // The direction to sort the results by. + Direction *i9100b48fb51d8d4dd37e82dd5e06dc99d474eda9c69f6b68676b03363441f27d.GetDirectionQueryParameterType `uriparametername:"direction"` + // A list of comma separated label names. Example: `bug,ui,@high` + Labels *string `uriparametername:"labels"` + // A user that's mentioned in the issue. + Mentioned *string `uriparametername:"mentioned"` + // If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. + Milestone *string `uriparametername:"milestone"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // What to sort results by. + Sort *i9100b48fb51d8d4dd37e82dd5e06dc99d474eda9c69f6b68676b03363441f27d.GetSortQueryParameterType `uriparametername:"sort"` + // Indicates the state of the issues to return. + State *i9100b48fb51d8d4dd37e82dd5e06dc99d474eda9c69f6b68676b03363441f27d.GetStateQueryParameterType `uriparametername:"state"` +} +// ByIssue_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.issues.item collection +// returns a *ItemItemIssuesWithIssue_numberItemRequestBuilder when successful +func (m *ItemItemIssuesRequestBuilder) ByIssue_number(issue_number int32)(*ItemItemIssuesWithIssue_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["issue_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(issue_number), 10) + return NewItemItemIssuesWithIssue_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemItemIssuesCommentsRequestBuilder when successful +func (m *ItemItemIssuesRequestBuilder) Comments()(*ItemItemIssuesCommentsRequestBuilder) { + return NewItemItemIssuesCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesRequestBuilderInternal instantiates a new ItemItemIssuesRequestBuilder and sets the default values. +func NewItemItemIssuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesRequestBuilder) { + m := &ItemItemIssuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues{?assignee*,creator*,direction*,labels*,mentioned*,milestone*,page*,per_page*,since*,sort*,state*}", pathParameters), + } + return m +} +// NewItemItemIssuesRequestBuilder instantiates a new ItemItemIssuesRequestBuilder and sets the default values. +func NewItemItemIssuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Events the events property +// returns a *ItemItemIssuesEventsRequestBuilder when successful +func (m *ItemItemIssuesRequestBuilder) Events()(*ItemItemIssuesEventsRequestBuilder) { + return NewItemItemIssuesEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list issues in a repository. Only open issues will be listed.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []Issueable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#list-repository-issues +func (m *ItemItemIssuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable) + } + } + return val, nil +} +// Post any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/enterprise-cloud@latest//articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a Issueable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a Issue503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#create-an-issue +func (m *ItemItemIssuesRequestBuilder) Post(ctx context.Context, body ItemItemIssuesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssue503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable), nil +} +// ToGetRequestInformation list issues in a repository. Only open issues will be listed.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/enterprise-cloud@latest//articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesRequestBuilder when successful +func (m *ItemItemIssuesRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesRequestBuilder) { + return NewItemItemIssuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_with_issue_number_item_request_builder.go b/pkg/github/repos/item_item_issues_with_issue_number_item_request_builder.go new file mode 100644 index 0000000..b3641b2 --- /dev/null +++ b/pkg/github/repos/item_item_issues_with_issue_number_item_request_builder.go @@ -0,0 +1,141 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemIssuesWithIssue_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number} +type ItemItemIssuesWithIssue_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Assignees the assignees property +// returns a *ItemItemIssuesItemAssigneesRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Assignees()(*ItemItemIssuesItemAssigneesRequestBuilder) { + return NewItemItemIssuesItemAssigneesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemItemIssuesItemCommentsRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Comments()(*ItemItemIssuesItemCommentsRequestBuilder) { + return NewItemItemIssuesItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemIssuesWithIssue_numberItemRequestBuilderInternal instantiates a new ItemItemIssuesWithIssue_numberItemRequestBuilder and sets the default values. +func NewItemItemIssuesWithIssue_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesWithIssue_numberItemRequestBuilder) { + m := &ItemItemIssuesWithIssue_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}", pathParameters), + } + return m +} +// NewItemItemIssuesWithIssue_numberItemRequestBuilder instantiates a new ItemItemIssuesWithIssue_numberItemRequestBuilder and sets the default values. +func NewItemItemIssuesWithIssue_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesWithIssue_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesWithIssue_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Events the events property +// returns a *ItemItemIssuesItemEventsRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Events()(*ItemItemIssuesItemEventsRequestBuilder) { + return NewItemItemIssuesItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was[transferred](https://docs.github.com/enterprise-cloud@latest//articles/transferring-an-issue-to-another-repository/) to another repository. Ifthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the APIreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has readaccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribeto the [`issues`](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#issues) webhook.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a Issueable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#get-an-issue +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable), nil +} +// Labels the labels property +// returns a *ItemItemIssuesItemLabelsRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Labels()(*ItemItemIssuesItemLabelsRequestBuilder) { + return NewItemItemIssuesItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Lock the lock property +// returns a *ItemItemIssuesItemLockRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Lock()(*ItemItemIssuesItemLockRequestBuilder) { + return NewItemItemIssuesItemLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch issue owners and users with push access can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a Issueable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a Issue503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#update-an-issue +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Patch(ctx context.Context, body ItemItemIssuesItemWithIssue_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssue503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable), nil +} +// Reactions the reactions property +// returns a *ItemItemIssuesItemReactionsRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Reactions()(*ItemItemIssuesItemReactionsRequestBuilder) { + return NewItemItemIssuesItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Timeline the timeline property +// returns a *ItemItemIssuesItemTimelineRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Timeline()(*ItemItemIssuesItemTimelineRequestBuilder) { + return NewItemItemIssuesItemTimelineRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation the API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was[transferred](https://docs.github.com/enterprise-cloud@latest//articles/transferring-an-issue-to-another-repository/) to another repository. Ifthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the APIreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has readaccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribeto the [`issues`](https://docs.github.com/enterprise-cloud@latest//webhooks/event-payloads/#issues) webhook.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation issue owners and users with push access can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemIssuesItemWithIssue_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesWithIssue_numberItemRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesWithIssue_numberItemRequestBuilder) { + return NewItemItemIssuesWithIssue_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_keys_post_request_body.go b/pkg/github/repos/item_item_keys_post_request_body.go new file mode 100644 index 0000000..4f3fddb --- /dev/null +++ b/pkg/github/repos/item_item_keys_post_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemKeysPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contents of the key. + key *string + // If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/enterprise-cloud@latest//articles/permission-levels-for-a-user-account-repository/)." + read_only *bool + // A name for the key. + title *string +} +// NewItemItemKeysPostRequestBody instantiates a new ItemItemKeysPostRequestBody and sets the default values. +func NewItemItemKeysPostRequestBody()(*ItemItemKeysPostRequestBody) { + m := &ItemItemKeysPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemKeysPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemKeysPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemKeysPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemKeysPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemKeysPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["read_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReadOnly(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The contents of the key. +// returns a *string when successful +func (m *ItemItemKeysPostRequestBody) GetKey()(*string) { + return m.key +} +// GetReadOnly gets the read_only property value. If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/enterprise-cloud@latest//articles/permission-levels-for-a-user-account-repository/)." +// returns a *bool when successful +func (m *ItemItemKeysPostRequestBody) GetReadOnly()(*bool) { + return m.read_only +} +// GetTitle gets the title property value. A name for the key. +// returns a *string when successful +func (m *ItemItemKeysPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemKeysPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("read_only", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemItemKeysPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The contents of the key. +func (m *ItemItemKeysPostRequestBody) SetKey(value *string)() { + m.key = value +} +// SetReadOnly sets the read_only property value. If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-cloud@latest//articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/enterprise-cloud@latest//articles/permission-levels-for-a-user-account-repository/)." +func (m *ItemItemKeysPostRequestBody) SetReadOnly(value *bool)() { + m.read_only = value +} +// SetTitle sets the title property value. A name for the key. +func (m *ItemItemKeysPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemItemKeysPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetReadOnly()(*bool) + GetTitle()(*string) + SetKey(value *string)() + SetReadOnly(value *bool)() + SetTitle(value *string)() +} diff --git a/pkg/github/repos/item_item_keys_request_builder.go b/pkg/github/repos/item_item_keys_request_builder.go new file mode 100644 index 0000000..bc1093f --- /dev/null +++ b/pkg/github/repos/item_item_keys_request_builder.go @@ -0,0 +1,112 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemKeysRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\keys +type ItemItemKeysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemKeysRequestBuilderGetQueryParameters list deploy keys +type ItemItemKeysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByKey_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.keys.item collection +// returns a *ItemItemKeysWithKey_ItemRequestBuilder when successful +func (m *ItemItemKeysRequestBuilder) ByKey_id(key_id int32)(*ItemItemKeysWithKey_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["key_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(key_id), 10) + return NewItemItemKeysWithKey_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemKeysRequestBuilderInternal instantiates a new ItemItemKeysRequestBuilder and sets the default values. +func NewItemItemKeysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemKeysRequestBuilder) { + m := &ItemItemKeysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemKeysRequestBuilder instantiates a new ItemItemKeysRequestBuilder and sets the default values. +func NewItemItemKeysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemKeysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemKeysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list deploy keys +// returns a []DeployKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys/deploy-keys#list-deploy-keys +func (m *ItemItemKeysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemKeysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeployKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable) + } + } + return val, nil +} +// Post you can create a read-only deploy key. +// returns a DeployKeyable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys/deploy-keys#create-a-deploy-key +func (m *ItemItemKeysRequestBuilder) Post(ctx context.Context, body ItemItemKeysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeployKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemKeysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemKeysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation you can create a read-only deploy key. +// returns a *RequestInformation when successful +func (m *ItemItemKeysRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemKeysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemKeysRequestBuilder when successful +func (m *ItemItemKeysRequestBuilder) WithUrl(rawUrl string)(*ItemItemKeysRequestBuilder) { + return NewItemItemKeysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_keys_with_key_item_request_builder.go b/pkg/github/repos/item_item_keys_with_key_item_request_builder.go new file mode 100644 index 0000000..8788472 --- /dev/null +++ b/pkg/github/repos/item_item_keys_with_key_item_request_builder.go @@ -0,0 +1,82 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemKeysWithKey_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\keys\{key_id} +type ItemItemKeysWithKey_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemKeysWithKey_ItemRequestBuilderInternal instantiates a new ItemItemKeysWithKey_ItemRequestBuilder and sets the default values. +func NewItemItemKeysWithKey_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemKeysWithKey_ItemRequestBuilder) { + m := &ItemItemKeysWithKey_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys/{key_id}", pathParameters), + } + return m +} +// NewItemItemKeysWithKey_ItemRequestBuilder instantiates a new ItemItemKeysWithKey_ItemRequestBuilder and sets the default values. +func NewItemItemKeysWithKey_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemKeysWithKey_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemKeysWithKey_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys/deploy-keys#delete-a-deploy-key +func (m *ItemItemKeysWithKey_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get get a deploy key +// returns a DeployKeyable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/deploy-keys/deploy-keys#get-a-deploy-key +func (m *ItemItemKeysWithKey_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDeployKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DeployKeyable), nil +} +// ToDeleteRequestInformation deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. +// returns a *RequestInformation when successful +func (m *ItemItemKeysWithKey_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemKeysWithKey_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemKeysWithKey_ItemRequestBuilder when successful +func (m *ItemItemKeysWithKey_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemKeysWithKey_ItemRequestBuilder) { + return NewItemItemKeysWithKey_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_labels_item_with_name_patch_request_body.go b/pkg/github/repos/item_item_labels_item_with_name_patch_request_body.go new file mode 100644 index 0000000..3b1e16a --- /dev/null +++ b/pkg/github/repos/item_item_labels_item_with_name_patch_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemLabelsItemWithNamePatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + color *string + // A short description of the label. Must be 100 characters or fewer. + description *string + // The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." + new_name *string +} +// NewItemItemLabelsItemWithNamePatchRequestBody instantiates a new ItemItemLabelsItemWithNamePatchRequestBody and sets the default values. +func NewItemItemLabelsItemWithNamePatchRequestBody()(*ItemItemLabelsItemWithNamePatchRequestBody) { + m := &ItemItemLabelsItemWithNamePatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemLabelsItemWithNamePatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemLabelsItemWithNamePatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemLabelsItemWithNamePatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemLabelsItemWithNamePatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. +// returns a *string when successful +func (m *ItemItemLabelsItemWithNamePatchRequestBody) GetColor()(*string) { + return m.color +} +// GetDescription gets the description property value. A short description of the label. Must be 100 characters or fewer. +// returns a *string when successful +func (m *ItemItemLabelsItemWithNamePatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemLabelsItemWithNamePatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(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["new_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewName(val) + } + return nil + } + return res +} +// GetNewName gets the new_name property value. The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." +// returns a *string when successful +func (m *ItemItemLabelsItemWithNamePatchRequestBody) GetNewName()(*string) { + return m.new_name +} +// Serialize serializes information the current object +func (m *ItemItemLabelsItemWithNamePatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("new_name", m.GetNewName()) + 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 *ItemItemLabelsItemWithNamePatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. +func (m *ItemItemLabelsItemWithNamePatchRequestBody) SetColor(value *string)() { + m.color = value +} +// SetDescription sets the description property value. A short description of the label. Must be 100 characters or fewer. +func (m *ItemItemLabelsItemWithNamePatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetNewName sets the new_name property value. The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." +func (m *ItemItemLabelsItemWithNamePatchRequestBody) SetNewName(value *string)() { + m.new_name = value +} +type ItemItemLabelsItemWithNamePatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDescription()(*string) + GetNewName()(*string) + SetColor(value *string)() + SetDescription(value *string)() + SetNewName(value *string)() +} diff --git a/pkg/github/repos/item_item_labels_post_request_body.go b/pkg/github/repos/item_item_labels_post_request_body.go new file mode 100644 index 0000000..aced5da --- /dev/null +++ b/pkg/github/repos/item_item_labels_post_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemLabelsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + color *string + // A short description of the label. Must be 100 characters or fewer. + description *string + // The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." + name *string +} +// NewItemItemLabelsPostRequestBody instantiates a new ItemItemLabelsPostRequestBody and sets the default values. +func NewItemItemLabelsPostRequestBody()(*ItemItemLabelsPostRequestBody) { + m := &ItemItemLabelsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemLabelsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemLabelsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemLabelsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetColor gets the color property value. The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. +// returns a *string when successful +func (m *ItemItemLabelsPostRequestBody) GetColor()(*string) { + return m.color +} +// GetDescription gets the description property value. A short description of the label. Must be 100 characters or fewer. +// returns a *string when successful +func (m *ItemItemLabelsPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemLabelsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." +// returns a *string when successful +func (m *ItemItemLabelsPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemLabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemLabelsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetColor sets the color property value. The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. +func (m *ItemItemLabelsPostRequestBody) SetColor(value *string)() { + m.color = value +} +// SetDescription sets the description property value. A short description of the label. Must be 100 characters or fewer. +func (m *ItemItemLabelsPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." +func (m *ItemItemLabelsPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemItemLabelsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDescription()(*string) + GetName()(*string) + SetColor(value *string)() + SetDescription(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_labels_request_builder.go b/pkg/github/repos/item_item_labels_request_builder.go new file mode 100644 index 0000000..435a40b --- /dev/null +++ b/pkg/github/repos/item_item_labels_request_builder.go @@ -0,0 +1,120 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemLabelsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\labels +type ItemItemLabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemLabelsRequestBuilderGetQueryParameters lists all labels for a repository. +type ItemItemLabelsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByName gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.labels.item collection +// returns a *ItemItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemItemLabelsRequestBuilder) ByName(name string)(*ItemItemLabelsWithNameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if name != "" { + urlTplParams["name"] = name + } + return NewItemItemLabelsWithNameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemLabelsRequestBuilderInternal instantiates a new ItemItemLabelsRequestBuilder and sets the default values. +func NewItemItemLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLabelsRequestBuilder) { + m := &ItemItemLabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemLabelsRequestBuilder instantiates a new ItemItemLabelsRequestBuilder and sets the default values. +func NewItemItemLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all labels for a repository. +// returns a []Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#list-labels-for-a-repository +func (m *ItemItemLabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemLabelsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable) + } + } + return val, nil +} +// Post creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/). +// returns a Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#create-a-label +func (m *ItemItemLabelsRequestBuilder) Post(ctx context.Context, body ItemItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable), nil +} +// ToGetRequestInformation lists all labels for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemLabelsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/). +// returns a *RequestInformation when successful +func (m *ItemItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemLabelsRequestBuilder when successful +func (m *ItemItemLabelsRequestBuilder) WithUrl(rawUrl string)(*ItemItemLabelsRequestBuilder) { + return NewItemItemLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_labels_with_name_item_request_builder.go b/pkg/github/repos/item_item_labels_with_name_item_request_builder.go new file mode 100644 index 0000000..2cd7cc1 --- /dev/null +++ b/pkg/github/repos/item_item_labels_with_name_item_request_builder.go @@ -0,0 +1,114 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemLabelsWithNameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\labels\{name} +type ItemItemLabelsWithNameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemLabelsWithNameItemRequestBuilderInternal instantiates a new ItemItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemItemLabelsWithNameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLabelsWithNameItemRequestBuilder) { + m := &ItemItemLabelsWithNameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels/{name}", pathParameters), + } + return m +} +// NewItemItemLabelsWithNameItemRequestBuilder instantiates a new ItemItemLabelsWithNameItemRequestBuilder and sets the default values. +func NewItemItemLabelsWithNameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLabelsWithNameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemLabelsWithNameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a label using the given label name. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#delete-a-label +func (m *ItemItemLabelsWithNameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a label using the given name. +// returns a Labelable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#get-a-label +func (m *ItemItemLabelsWithNameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable), nil +} +// Patch updates a label using the given label name. +// returns a Labelable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#update-a-label +func (m *ItemItemLabelsWithNameItemRequestBuilder) Patch(ctx context.Context, body ItemItemLabelsItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable), nil +} +// ToDeleteRequestInformation deletes a label using the given label name. +// returns a *RequestInformation when successful +func (m *ItemItemLabelsWithNameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a label using the given name. +// returns a *RequestInformation when successful +func (m *ItemItemLabelsWithNameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a label using the given label name. +// returns a *RequestInformation when successful +func (m *ItemItemLabelsWithNameItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemLabelsItemWithNamePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemLabelsWithNameItemRequestBuilder when successful +func (m *ItemItemLabelsWithNameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemLabelsWithNameItemRequestBuilder) { + return NewItemItemLabelsWithNameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_languages_request_builder.go b/pkg/github/repos/item_item_languages_request_builder.go new file mode 100644 index 0000000..2546538 --- /dev/null +++ b/pkg/github/repos/item_item_languages_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemLanguagesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\languages +type ItemItemLanguagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemLanguagesRequestBuilderInternal instantiates a new ItemItemLanguagesRequestBuilder and sets the default values. +func NewItemItemLanguagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLanguagesRequestBuilder) { + m := &ItemItemLanguagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/languages", pathParameters), + } + return m +} +// NewItemItemLanguagesRequestBuilder instantiates a new ItemItemLanguagesRequestBuilder and sets the default values. +func NewItemItemLanguagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLanguagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemLanguagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. +// returns a Languageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-languages +func (m *ItemItemLanguagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Languageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLanguageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Languageable), nil +} +// ToGetRequestInformation lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. +// returns a *RequestInformation when successful +func (m *ItemItemLanguagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemLanguagesRequestBuilder when successful +func (m *ItemItemLanguagesRequestBuilder) WithUrl(rawUrl string)(*ItemItemLanguagesRequestBuilder) { + return NewItemItemLanguagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_lfs_put_response.go b/pkg/github/repos/item_item_lfs_put_response.go new file mode 100644 index 0000000..b3a8ede --- /dev/null +++ b/pkg/github/repos/item_item_lfs_put_response.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemLfsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemLfsPutResponse instantiates a new ItemItemLfsPutResponse and sets the default values. +func NewItemItemLfsPutResponse()(*ItemItemLfsPutResponse) { + m := &ItemItemLfsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemLfsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemLfsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemLfsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemLfsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemLfsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemLfsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemLfsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemLfsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_lfs_request_builder.go b/pkg/github/repos/item_item_lfs_request_builder.go new file mode 100644 index 0000000..32729bc --- /dev/null +++ b/pkg/github/repos/item_item_lfs_request_builder.go @@ -0,0 +1,78 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemLfsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\lfs +type ItemItemLfsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemLfsRequestBuilderInternal instantiates a new ItemItemLfsRequestBuilder and sets the default values. +func NewItemItemLfsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLfsRequestBuilder) { + m := &ItemItemLfsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/lfs", pathParameters), + } + return m +} +// NewItemItemLfsRequestBuilder instantiates a new ItemItemLfsRequestBuilder and sets the default values. +func NewItemItemLfsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLfsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemLfsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete disables Git LFS for a repository.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/lfs#disable-git-lfs-for-a-repository +func (m *ItemItemLfsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put enables Git LFS for a repository.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a ItemItemLfsPutResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/lfs#enable-git-lfs-for-a-repository +func (m *ItemItemLfsRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemLfsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemLfsPutResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemLfsPutResponseable), nil +} +// ToDeleteRequestInformation disables Git LFS for a repository.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemLfsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation enables Git LFS for a repository.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemLfsRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemLfsRequestBuilder when successful +func (m *ItemItemLfsRequestBuilder) WithUrl(rawUrl string)(*ItemItemLfsRequestBuilder) { + return NewItemItemLfsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_license_request_builder.go b/pkg/github/repos/item_item_license_request_builder.go new file mode 100644 index 0000000..3e229bb --- /dev/null +++ b/pkg/github/repos/item_item_license_request_builder.go @@ -0,0 +1,66 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemLicenseRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\license +type ItemItemLicenseRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemLicenseRequestBuilderGetQueryParameters this method returns the contents of the repository's license file, if one is detected.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw contents of the license.- **`application/vnd.github.html+json`**: Returns the license contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +type ItemItemLicenseRequestBuilderGetQueryParameters struct { + // The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. + Ref *string `uriparametername:"ref"` +} +// NewItemItemLicenseRequestBuilderInternal instantiates a new ItemItemLicenseRequestBuilder and sets the default values. +func NewItemItemLicenseRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLicenseRequestBuilder) { + m := &ItemItemLicenseRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/license{?ref*}", pathParameters), + } + return m +} +// NewItemItemLicenseRequestBuilder instantiates a new ItemItemLicenseRequestBuilder and sets the default values. +func NewItemItemLicenseRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemLicenseRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemLicenseRequestBuilderInternal(urlParams, requestAdapter) +} +// Get this method returns the contents of the repository's license file, if one is detected.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw contents of the license.- **`application/vnd.github.html+json`**: Returns the license contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +// returns a LicenseContentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/licenses/licenses#get-the-license-for-a-repository +func (m *ItemItemLicenseRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemLicenseRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LicenseContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLicenseContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LicenseContentable), nil +} +// ToGetRequestInformation this method returns the contents of the repository's license file, if one is detected.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw contents of the license.- **`application/vnd.github.html+json`**: Returns the license contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +// returns a *RequestInformation when successful +func (m *ItemItemLicenseRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemLicenseRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemLicenseRequestBuilder when successful +func (m *ItemItemLicenseRequestBuilder) WithUrl(rawUrl string)(*ItemItemLicenseRequestBuilder) { + return NewItemItemLicenseRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_merge_upstream_post_request_body.go b/pkg/github/repos/item_item_merge_upstream_post_request_body.go new file mode 100644 index 0000000..72115ee --- /dev/null +++ b/pkg/github/repos/item_item_merge_upstream_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemMergeUpstreamPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the branch which should be updated to match upstream. + branch *string +} +// NewItemItemMergeUpstreamPostRequestBody instantiates a new ItemItemMergeUpstreamPostRequestBody and sets the default values. +func NewItemItemMergeUpstreamPostRequestBody()(*ItemItemMergeUpstreamPostRequestBody) { + m := &ItemItemMergeUpstreamPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemMergeUpstreamPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemMergeUpstreamPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemMergeUpstreamPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemMergeUpstreamPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBranch gets the branch property value. The name of the branch which should be updated to match upstream. +// returns a *string when successful +func (m *ItemItemMergeUpstreamPostRequestBody) GetBranch()(*string) { + return m.branch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemMergeUpstreamPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemMergeUpstreamPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("branch", m.GetBranch()) + 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 *ItemItemMergeUpstreamPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBranch sets the branch property value. The name of the branch which should be updated to match upstream. +func (m *ItemItemMergeUpstreamPostRequestBody) SetBranch(value *string)() { + m.branch = value +} +type ItemItemMergeUpstreamPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBranch()(*string) + SetBranch(value *string)() +} diff --git a/pkg/github/repos/item_item_merge_upstream_request_builder.go b/pkg/github/repos/item_item_merge_upstream_request_builder.go new file mode 100644 index 0000000..4eeef18 --- /dev/null +++ b/pkg/github/repos/item_item_merge_upstream_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemMergeUpstreamRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\merge-upstream +type ItemItemMergeUpstreamRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemMergeUpstreamRequestBuilderInternal instantiates a new ItemItemMergeUpstreamRequestBuilder and sets the default values. +func NewItemItemMergeUpstreamRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMergeUpstreamRequestBuilder) { + m := &ItemItemMergeUpstreamRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/merge-upstream", pathParameters), + } + return m +} +// NewItemItemMergeUpstreamRequestBuilder instantiates a new ItemItemMergeUpstreamRequestBuilder and sets the default values. +func NewItemItemMergeUpstreamRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMergeUpstreamRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemMergeUpstreamRequestBuilderInternal(urlParams, requestAdapter) +} +// Post sync a branch of a forked repository to keep it up-to-date with the upstream repository. +// returns a MergedUpstreamable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository +func (m *ItemItemMergeUpstreamRequestBuilder) Post(ctx context.Context, body ItemItemMergeUpstreamPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MergedUpstreamable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMergedUpstreamFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MergedUpstreamable), nil +} +// ToPostRequestInformation sync a branch of a forked repository to keep it up-to-date with the upstream repository. +// returns a *RequestInformation when successful +func (m *ItemItemMergeUpstreamRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemMergeUpstreamPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemMergeUpstreamRequestBuilder when successful +func (m *ItemItemMergeUpstreamRequestBuilder) WithUrl(rawUrl string)(*ItemItemMergeUpstreamRequestBuilder) { + return NewItemItemMergeUpstreamRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_merges_post_request_body.go b/pkg/github/repos/item_item_merges_post_request_body.go new file mode 100644 index 0000000..cb29726 --- /dev/null +++ b/pkg/github/repos/item_item_merges_post_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemMergesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the base branch that the head will be merged into. + base *string + // Commit message to use for the merge commit. If omitted, a default message will be used. + commit_message *string + // The head to merge. This can be a branch name or a commit SHA1. + head *string +} +// NewItemItemMergesPostRequestBody instantiates a new ItemItemMergesPostRequestBody and sets the default values. +func NewItemItemMergesPostRequestBody()(*ItemItemMergesPostRequestBody) { + m := &ItemItemMergesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemMergesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemMergesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemMergesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemMergesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBase gets the base property value. The name of the base branch that the head will be merged into. +// returns a *string when successful +func (m *ItemItemMergesPostRequestBody) GetBase()(*string) { + return m.base +} +// GetCommitMessage gets the commit_message property value. Commit message to use for the merge commit. If omitted, a default message will be used. +// returns a *string when successful +func (m *ItemItemMergesPostRequestBody) GetCommitMessage()(*string) { + return m.commit_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemMergesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBase(val) + } + return nil + } + res["commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitMessage(val) + } + return nil + } + res["head"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHead(val) + } + return nil + } + return res +} +// GetHead gets the head property value. The head to merge. This can be a branch name or a commit SHA1. +// returns a *string when successful +func (m *ItemItemMergesPostRequestBody) GetHead()(*string) { + return m.head +} +// Serialize serializes information the current object +func (m *ItemItemMergesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("base", m.GetBase()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_message", m.GetCommitMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head", m.GetHead()) + 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 *ItemItemMergesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBase sets the base property value. The name of the base branch that the head will be merged into. +func (m *ItemItemMergesPostRequestBody) SetBase(value *string)() { + m.base = value +} +// SetCommitMessage sets the commit_message property value. Commit message to use for the merge commit. If omitted, a default message will be used. +func (m *ItemItemMergesPostRequestBody) SetCommitMessage(value *string)() { + m.commit_message = value +} +// SetHead sets the head property value. The head to merge. This can be a branch name or a commit SHA1. +func (m *ItemItemMergesPostRequestBody) SetHead(value *string)() { + m.head = value +} +type ItemItemMergesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBase()(*string) + GetCommitMessage()(*string) + GetHead()(*string) + SetBase(value *string)() + SetCommitMessage(value *string)() + SetHead(value *string)() +} diff --git a/pkg/github/repos/item_item_merges_request_builder.go b/pkg/github/repos/item_item_merges_request_builder.go new file mode 100644 index 0000000..a5bb0a5 --- /dev/null +++ b/pkg/github/repos/item_item_merges_request_builder.go @@ -0,0 +1,66 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemMergesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\merges +type ItemItemMergesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemMergesRequestBuilderInternal instantiates a new ItemItemMergesRequestBuilder and sets the default values. +func NewItemItemMergesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMergesRequestBuilder) { + m := &ItemItemMergesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/merges", pathParameters), + } + return m +} +// NewItemItemMergesRequestBuilder instantiates a new ItemItemMergesRequestBuilder and sets the default values. +func NewItemItemMergesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMergesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemMergesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post merge a branch +// returns a Commitable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/branches/branches#merge-a-branch +func (m *ItemItemMergesRequestBuilder) Post(ctx context.Context, body ItemItemMergesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemMergesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemMergesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemMergesRequestBuilder when successful +func (m *ItemItemMergesRequestBuilder) WithUrl(rawUrl string)(*ItemItemMergesRequestBuilder) { + return NewItemItemMergesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_milestones_item_labels_request_builder.go b/pkg/github/repos/item_item_milestones_item_labels_request_builder.go new file mode 100644 index 0000000..c63fd2c --- /dev/null +++ b/pkg/github/repos/item_item_milestones_item_labels_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemMilestonesItemLabelsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\milestones\{milestone_number}\labels +type ItemItemMilestonesItemLabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemMilestonesItemLabelsRequestBuilderGetQueryParameters lists labels for issues in a milestone. +type ItemItemMilestonesItemLabelsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemMilestonesItemLabelsRequestBuilderInternal instantiates a new ItemItemMilestonesItemLabelsRequestBuilder and sets the default values. +func NewItemItemMilestonesItemLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMilestonesItemLabelsRequestBuilder) { + m := &ItemItemMilestonesItemLabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones/{milestone_number}/labels{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemMilestonesItemLabelsRequestBuilder instantiates a new ItemItemMilestonesItemLabelsRequestBuilder and sets the default values. +func NewItemItemMilestonesItemLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMilestonesItemLabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemMilestonesItemLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists labels for issues in a milestone. +// returns a []Labelable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/labels#list-labels-for-issues-in-a-milestone +func (m *ItemItemMilestonesItemLabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemMilestonesItemLabelsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Labelable) + } + } + return val, nil +} +// ToGetRequestInformation lists labels for issues in a milestone. +// returns a *RequestInformation when successful +func (m *ItemItemMilestonesItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemMilestonesItemLabelsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemMilestonesItemLabelsRequestBuilder when successful +func (m *ItemItemMilestonesItemLabelsRequestBuilder) WithUrl(rawUrl string)(*ItemItemMilestonesItemLabelsRequestBuilder) { + return NewItemItemMilestonesItemLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_milestones_item_with_milestone_number_patch_request_body.go b/pkg/github/repos/item_item_milestones_item_with_milestone_number_patch_request_body.go new file mode 100644 index 0000000..5794f09 --- /dev/null +++ b/pkg/github/repos/item_item_milestones_item_with_milestone_number_patch_request_body.go @@ -0,0 +1,139 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemMilestonesItemWithMilestone_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A description of the milestone. + description *string + // The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + due_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The title of the milestone. + title *string +} +// NewItemItemMilestonesItemWithMilestone_numberPatchRequestBody instantiates a new ItemItemMilestonesItemWithMilestone_numberPatchRequestBody and sets the default values. +func NewItemItemMilestonesItemWithMilestone_numberPatchRequestBody()(*ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) { + m := &ItemItemMilestonesItemWithMilestone_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemMilestonesItemWithMilestone_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemMilestonesItemWithMilestone_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemMilestonesItemWithMilestone_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A description of the milestone. +// returns a *string when successful +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetDueOn gets the due_on property value. The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.due_on +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["due_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueOn(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The title of the milestone. +// returns a *string when successful +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("due_on", m.GetDueOn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A description of the milestone. +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetDueOn sets the due_on property value. The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.due_on = value +} +// SetTitle sets the title property value. The title of the milestone. +func (m *ItemItemMilestonesItemWithMilestone_numberPatchRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemItemMilestonesItemWithMilestone_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTitle()(*string) + SetDescription(value *string)() + SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTitle(value *string)() +} diff --git a/pkg/github/repos/item_item_milestones_post_request_body.go b/pkg/github/repos/item_item_milestones_post_request_body.go new file mode 100644 index 0000000..25cae05 --- /dev/null +++ b/pkg/github/repos/item_item_milestones_post_request_body.go @@ -0,0 +1,139 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemMilestonesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A description of the milestone. + description *string + // The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + due_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The title of the milestone. + title *string +} +// NewItemItemMilestonesPostRequestBody instantiates a new ItemItemMilestonesPostRequestBody and sets the default values. +func NewItemItemMilestonesPostRequestBody()(*ItemItemMilestonesPostRequestBody) { + m := &ItemItemMilestonesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemMilestonesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemMilestonesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemMilestonesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemMilestonesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. A description of the milestone. +// returns a *string when successful +func (m *ItemItemMilestonesPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetDueOn gets the due_on property value. The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *ItemItemMilestonesPostRequestBody) GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.due_on +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemMilestonesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["due_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueOn(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The title of the milestone. +// returns a *string when successful +func (m *ItemItemMilestonesPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemMilestonesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("due_on", m.GetDueOn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemItemMilestonesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. A description of the milestone. +func (m *ItemItemMilestonesPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetDueOn sets the due_on property value. The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *ItemItemMilestonesPostRequestBody) SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.due_on = value +} +// SetTitle sets the title property value. The title of the milestone. +func (m *ItemItemMilestonesPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemItemMilestonesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDueOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTitle()(*string) + SetDescription(value *string)() + SetDueOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTitle(value *string)() +} diff --git a/pkg/github/repos/item_item_milestones_request_builder.go b/pkg/github/repos/item_item_milestones_request_builder.go new file mode 100644 index 0000000..0cf3471 --- /dev/null +++ b/pkg/github/repos/item_item_milestones_request_builder.go @@ -0,0 +1,126 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i758c0aea2c63b30ec34d1f5eaa31b3a07a5a088d00f5d496d4cdaec63aeebc4c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/milestones" +) + +// ItemItemMilestonesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\milestones +type ItemItemMilestonesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemMilestonesRequestBuilderGetQueryParameters lists milestones for a repository. +type ItemItemMilestonesRequestBuilderGetQueryParameters struct { + // The direction of the sort. Either `asc` or `desc`. + Direction *i758c0aea2c63b30ec34d1f5eaa31b3a07a5a088d00f5d496d4cdaec63aeebc4c.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // What to sort results by. Either `due_on` or `completeness`. + Sort *i758c0aea2c63b30ec34d1f5eaa31b3a07a5a088d00f5d496d4cdaec63aeebc4c.GetSortQueryParameterType `uriparametername:"sort"` + // The state of the milestone. Either `open`, `closed`, or `all`. + State *i758c0aea2c63b30ec34d1f5eaa31b3a07a5a088d00f5d496d4cdaec63aeebc4c.GetStateQueryParameterType `uriparametername:"state"` +} +// ByMilestone_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.milestones.item collection +// returns a *ItemItemMilestonesWithMilestone_numberItemRequestBuilder when successful +func (m *ItemItemMilestonesRequestBuilder) ByMilestone_number(milestone_number int32)(*ItemItemMilestonesWithMilestone_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["milestone_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(milestone_number), 10) + return NewItemItemMilestonesWithMilestone_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemMilestonesRequestBuilderInternal instantiates a new ItemItemMilestonesRequestBuilder and sets the default values. +func NewItemItemMilestonesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMilestonesRequestBuilder) { + m := &ItemItemMilestonesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones{?direction*,page*,per_page*,sort*,state*}", pathParameters), + } + return m +} +// NewItemItemMilestonesRequestBuilder instantiates a new ItemItemMilestonesRequestBuilder and sets the default values. +func NewItemItemMilestonesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMilestonesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemMilestonesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists milestones for a repository. +// returns a []Milestoneable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/milestones#list-milestones +func (m *ItemItemMilestonesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemMilestonesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMilestoneFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable) + } + } + return val, nil +} +// Post creates a milestone. +// returns a Milestoneable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/milestones#create-a-milestone +func (m *ItemItemMilestonesRequestBuilder) Post(ctx context.Context, body ItemItemMilestonesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMilestoneFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable), nil +} +// ToGetRequestInformation lists milestones for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemMilestonesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemMilestonesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a milestone. +// returns a *RequestInformation when successful +func (m *ItemItemMilestonesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemMilestonesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemMilestonesRequestBuilder when successful +func (m *ItemItemMilestonesRequestBuilder) WithUrl(rawUrl string)(*ItemItemMilestonesRequestBuilder) { + return NewItemItemMilestonesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_milestones_with_milestone_number_item_request_builder.go b/pkg/github/repos/item_item_milestones_with_milestone_number_item_request_builder.go new file mode 100644 index 0000000..267d0f6 --- /dev/null +++ b/pkg/github/repos/item_item_milestones_with_milestone_number_item_request_builder.go @@ -0,0 +1,123 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemMilestonesWithMilestone_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\milestones\{milestone_number} +type ItemItemMilestonesWithMilestone_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemMilestonesWithMilestone_numberItemRequestBuilderInternal instantiates a new ItemItemMilestonesWithMilestone_numberItemRequestBuilder and sets the default values. +func NewItemItemMilestonesWithMilestone_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMilestonesWithMilestone_numberItemRequestBuilder) { + m := &ItemItemMilestonesWithMilestone_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones/{milestone_number}", pathParameters), + } + return m +} +// NewItemItemMilestonesWithMilestone_numberItemRequestBuilder instantiates a new ItemItemMilestonesWithMilestone_numberItemRequestBuilder and sets the default values. +func NewItemItemMilestonesWithMilestone_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemMilestonesWithMilestone_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemMilestonesWithMilestone_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a milestone using the given milestone number. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/milestones#delete-a-milestone +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a milestone using the given milestone number. +// returns a Milestoneable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/milestones#get-a-milestone +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMilestoneFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable), nil +} +// Labels the labels property +// returns a *ItemItemMilestonesItemLabelsRequestBuilder when successful +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) Labels()(*ItemItemMilestonesItemLabelsRequestBuilder) { + return NewItemItemMilestonesItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update a milestone +// returns a Milestoneable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/milestones#update-a-milestone +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) Patch(ctx context.Context, body ItemItemMilestonesItemWithMilestone_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMilestoneFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Milestoneable), nil +} +// ToDeleteRequestInformation deletes a milestone using the given milestone number. +// returns a *RequestInformation when successful +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a milestone using the given milestone number. +// returns a *RequestInformation when successful +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemMilestonesItemWithMilestone_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemMilestonesWithMilestone_numberItemRequestBuilder when successful +func (m *ItemItemMilestonesWithMilestone_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemMilestonesWithMilestone_numberItemRequestBuilder) { + return NewItemItemMilestonesWithMilestone_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_notifications_put_request_body.go b/pkg/github/repos/item_item_notifications_put_request_body.go new file mode 100644 index 0000000..79d00d4 --- /dev/null +++ b/pkg/github/repos/item_item_notifications_put_request_body.go @@ -0,0 +1,81 @@ +package repos + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemNotificationsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + last_read_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewItemItemNotificationsPutRequestBody instantiates a new ItemItemNotificationsPutRequestBody and sets the default values. +func NewItemItemNotificationsPutRequestBody()(*ItemItemNotificationsPutRequestBody) { + m := &ItemItemNotificationsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemNotificationsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemNotificationsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemNotificationsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemNotificationsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemNotificationsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["last_read_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReadAt(val) + } + return nil + } + return res +} +// GetLastReadAt gets the last_read_at property value. Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. +// returns a *Time when successful +func (m *ItemItemNotificationsPutRequestBody) GetLastReadAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_read_at +} +// Serialize serializes information the current object +func (m *ItemItemNotificationsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("last_read_at", m.GetLastReadAt()) + 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 *ItemItemNotificationsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLastReadAt sets the last_read_at property value. Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. +func (m *ItemItemNotificationsPutRequestBody) SetLastReadAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_read_at = value +} +type ItemItemNotificationsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastReadAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetLastReadAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/repos/item_item_notifications_put_response.go b/pkg/github/repos/item_item_notifications_put_response.go new file mode 100644 index 0000000..9e60f7a --- /dev/null +++ b/pkg/github/repos/item_item_notifications_put_response.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemNotificationsPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string + // The url property + url *string +} +// NewItemItemNotificationsPutResponse instantiates a new ItemItemNotificationsPutResponse and sets the default values. +func NewItemItemNotificationsPutResponse()(*ItemItemNotificationsPutResponse) { + m := &ItemItemNotificationsPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemNotificationsPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemNotificationsPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemNotificationsPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemNotificationsPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemNotificationsPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ItemItemNotificationsPutResponse) GetMessage()(*string) { + return m.message +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ItemItemNotificationsPutResponse) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ItemItemNotificationsPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemNotificationsPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *ItemItemNotificationsPutResponse) SetMessage(value *string)() { + m.message = value +} +// SetUrl sets the url property value. The url property +func (m *ItemItemNotificationsPutResponse) SetUrl(value *string)() { + m.url = value +} +type ItemItemNotificationsPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetUrl()(*string) + SetMessage(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_notifications_request_builder.go b/pkg/github/repos/item_item_notifications_request_builder.go new file mode 100644 index 0000000..fe9bf69 --- /dev/null +++ b/pkg/github/repos/item_item_notifications_request_builder.go @@ -0,0 +1,107 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemNotificationsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\notifications +type ItemItemNotificationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemNotificationsRequestBuilderGetQueryParameters lists all notifications for the current user in the specified repository. +type ItemItemNotificationsRequestBuilderGetQueryParameters struct { + // If `true`, show notifications marked as read. + All *bool `uriparametername:"all"` + // Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Before *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"before"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // If `true`, only shows notifications in which the user is directly participating or mentioned. + Participating *bool `uriparametername:"participating"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// NewItemItemNotificationsRequestBuilderInternal instantiates a new ItemItemNotificationsRequestBuilder and sets the default values. +func NewItemItemNotificationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemNotificationsRequestBuilder) { + m := &ItemItemNotificationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/notifications{?all*,before*,page*,participating*,per_page*,since*}", pathParameters), + } + return m +} +// NewItemItemNotificationsRequestBuilder instantiates a new ItemItemNotificationsRequestBuilder and sets the default values. +func NewItemItemNotificationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemNotificationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemNotificationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all notifications for the current user in the specified repository. +// returns a []Threadable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#list-repository-notifications-for-the-authenticated-user +func (m *ItemItemNotificationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemNotificationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateThreadFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Threadable) + } + } + return val, nil +} +// Put marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Cloud will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. +// returns a ItemItemNotificationsPutResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#mark-repository-notifications-as-read +func (m *ItemItemNotificationsRequestBuilder) Put(ctx context.Context, body ItemItemNotificationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemNotificationsPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemNotificationsPutResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemNotificationsPutResponseable), nil +} +// ToGetRequestInformation lists all notifications for the current user in the specified repository. +// returns a *RequestInformation when successful +func (m *ItemItemNotificationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemNotificationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Cloud will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. +// returns a *RequestInformation when successful +func (m *ItemItemNotificationsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemNotificationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemNotificationsRequestBuilder when successful +func (m *ItemItemNotificationsRequestBuilder) WithUrl(rawUrl string)(*ItemItemNotificationsRequestBuilder) { + return NewItemItemNotificationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_builds_latest_request_builder.go b/pkg/github/repos/item_item_pages_builds_latest_request_builder.go new file mode 100644 index 0000000..4915640 --- /dev/null +++ b/pkg/github/repos/item_item_pages_builds_latest_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesBuildsLatestRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\builds\latest +type ItemItemPagesBuildsLatestRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPagesBuildsLatestRequestBuilderInternal instantiates a new ItemItemPagesBuildsLatestRequestBuilder and sets the default values. +func NewItemItemPagesBuildsLatestRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesBuildsLatestRequestBuilder) { + m := &ItemItemPagesBuildsLatestRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds/latest", pathParameters), + } + return m +} +// NewItemItemPagesBuildsLatestRequestBuilder instantiates a new ItemItemPagesBuildsLatestRequestBuilder and sets the default values. +func NewItemItemPagesBuildsLatestRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesBuildsLatestRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesBuildsLatestRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about the single most recent build of a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a PageBuildable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#get-latest-pages-build +func (m *ItemItemPagesBuildsLatestRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageBuildFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable), nil +} +// ToGetRequestInformation gets information about the single most recent build of a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesBuildsLatestRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesBuildsLatestRequestBuilder when successful +func (m *ItemItemPagesBuildsLatestRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesBuildsLatestRequestBuilder) { + return NewItemItemPagesBuildsLatestRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_builds_request_builder.go b/pkg/github/repos/item_item_pages_builds_request_builder.go new file mode 100644 index 0000000..d9884b3 --- /dev/null +++ b/pkg/github/repos/item_item_pages_builds_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesBuildsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\builds +type ItemItemPagesBuildsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPagesBuildsRequestBuilderGetQueryParameters lists builts of a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemItemPagesBuildsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByBuild_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pages.builds.item collection +// returns a *ItemItemPagesBuildsWithBuild_ItemRequestBuilder when successful +func (m *ItemItemPagesBuildsRequestBuilder) ByBuild_id(build_id int32)(*ItemItemPagesBuildsWithBuild_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["build_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(build_id), 10) + return NewItemItemPagesBuildsWithBuild_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPagesBuildsRequestBuilderInternal instantiates a new ItemItemPagesBuildsRequestBuilder and sets the default values. +func NewItemItemPagesBuildsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesBuildsRequestBuilder) { + m := &ItemItemPagesBuildsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemPagesBuildsRequestBuilder instantiates a new ItemItemPagesBuildsRequestBuilder and sets the default values. +func NewItemItemPagesBuildsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesBuildsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesBuildsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists builts of a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a []PageBuildable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#list-apiname-pages-builds +func (m *ItemItemPagesBuildsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPagesBuildsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageBuildFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable) + } + } + return val, nil +} +// Latest the latest property +// returns a *ItemItemPagesBuildsLatestRequestBuilder when successful +func (m *ItemItemPagesBuildsRequestBuilder) Latest()(*ItemItemPagesBuildsLatestRequestBuilder) { + return NewItemItemPagesBuildsLatestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Post you can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. +// returns a PageBuildStatusable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#request-a-apiname-pages-build +func (m *ItemItemPagesBuildsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildStatusable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageBuildStatusFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildStatusable), nil +} +// ToGetRequestInformation lists builts of a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesBuildsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPagesBuildsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation you can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. +// returns a *RequestInformation when successful +func (m *ItemItemPagesBuildsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesBuildsRequestBuilder when successful +func (m *ItemItemPagesBuildsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesBuildsRequestBuilder) { + return NewItemItemPagesBuildsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_builds_with_build_item_request_builder.go b/pkg/github/repos/item_item_pages_builds_with_build_item_request_builder.go new file mode 100644 index 0000000..b630f7c --- /dev/null +++ b/pkg/github/repos/item_item_pages_builds_with_build_item_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesBuildsWithBuild_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\builds\{build_id} +type ItemItemPagesBuildsWithBuild_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPagesBuildsWithBuild_ItemRequestBuilderInternal instantiates a new ItemItemPagesBuildsWithBuild_ItemRequestBuilder and sets the default values. +func NewItemItemPagesBuildsWithBuild_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesBuildsWithBuild_ItemRequestBuilder) { + m := &ItemItemPagesBuildsWithBuild_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds/{build_id}", pathParameters), + } + return m +} +// NewItemItemPagesBuildsWithBuild_ItemRequestBuilder instantiates a new ItemItemPagesBuildsWithBuild_ItemRequestBuilder and sets the default values. +func NewItemItemPagesBuildsWithBuild_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesBuildsWithBuild_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesBuildsWithBuild_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about a GitHub Enterprise Cloud Pages build.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a PageBuildable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#get-apiname-pages-build +func (m *ItemItemPagesBuildsWithBuild_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageBuildFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageBuildable), nil +} +// ToGetRequestInformation gets information about a GitHub Enterprise Cloud Pages build.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesBuildsWithBuild_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesBuildsWithBuild_ItemRequestBuilder when successful +func (m *ItemItemPagesBuildsWithBuild_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesBuildsWithBuild_ItemRequestBuilder) { + return NewItemItemPagesBuildsWithBuild_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_deployments_item_cancel_request_builder.go b/pkg/github/repos/item_item_pages_deployments_item_cancel_request_builder.go new file mode 100644 index 0000000..793a600 --- /dev/null +++ b/pkg/github/repos/item_item_pages_deployments_item_cancel_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesDeploymentsItemCancelRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\deployments\{pages_deployment_id}\cancel +type ItemItemPagesDeploymentsItemCancelRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPagesDeploymentsItemCancelRequestBuilderInternal instantiates a new ItemItemPagesDeploymentsItemCancelRequestBuilder and sets the default values. +func NewItemItemPagesDeploymentsItemCancelRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesDeploymentsItemCancelRequestBuilder) { + m := &ItemItemPagesDeploymentsItemCancelRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments/{pages_deployment_id}/cancel", pathParameters), + } + return m +} +// NewItemItemPagesDeploymentsItemCancelRequestBuilder instantiates a new ItemItemPagesDeploymentsItemCancelRequestBuilder and sets the default values. +func NewItemItemPagesDeploymentsItemCancelRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesDeploymentsItemCancelRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesDeploymentsItemCancelRequestBuilderInternal(urlParams, requestAdapter) +} +// Post cancels a GitHub Pages deployment.The authenticated user must have write permissions for the GitHub Pages site. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#cancel-a-github-pages-deployment +func (m *ItemItemPagesDeploymentsItemCancelRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation cancels a GitHub Pages deployment.The authenticated user must have write permissions for the GitHub Pages site. +// returns a *RequestInformation when successful +func (m *ItemItemPagesDeploymentsItemCancelRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesDeploymentsItemCancelRequestBuilder when successful +func (m *ItemItemPagesDeploymentsItemCancelRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesDeploymentsItemCancelRequestBuilder) { + return NewItemItemPagesDeploymentsItemCancelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_deployments_post_request_body.go b/pkg/github/repos/item_item_pages_deployments_post_request_body.go new file mode 100644 index 0000000..6c394be --- /dev/null +++ b/pkg/github/repos/item_item_pages_deployments_post_request_body.go @@ -0,0 +1,201 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemPagesDeploymentsPostRequestBody the object used to create GitHub Pages deployment +type ItemItemPagesDeploymentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required. + artifact_id *float64 + // The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required. + artifact_url *string + // The target environment for this GitHub Pages deployment. + environment *string + // The OIDC token issued by GitHub Actions certifying the origin of the deployment. + oidc_token *string + // A unique string that represents the version of the build for this deployment. + pages_build_version *string +} +// NewItemItemPagesDeploymentsPostRequestBody instantiates a new ItemItemPagesDeploymentsPostRequestBody and sets the default values. +func NewItemItemPagesDeploymentsPostRequestBody()(*ItemItemPagesDeploymentsPostRequestBody) { + m := &ItemItemPagesDeploymentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + environmentValue := "github-pages" + m.SetEnvironment(&environmentValue) + pages_build_versionValue := "GITHUB_SHA" + m.SetPagesBuildVersion(&pages_build_versionValue) + return m +} +// CreateItemItemPagesDeploymentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPagesDeploymentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPagesDeploymentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArtifactId gets the artifact_id property value. The ID of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required. +// returns a *float64 when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetArtifactId()(*float64) { + return m.artifact_id +} +// GetArtifactUrl gets the artifact_url property value. The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required. +// returns a *string when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetArtifactUrl()(*string) { + return m.artifact_url +} +// GetEnvironment gets the environment property value. The target environment for this GitHub Pages deployment. +// returns a *string when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetEnvironment()(*string) { + return m.environment +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["artifact_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetArtifactId(val) + } + return nil + } + res["artifact_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArtifactUrl(val) + } + return nil + } + res["environment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironment(val) + } + return nil + } + res["oidc_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOidcToken(val) + } + return nil + } + res["pages_build_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPagesBuildVersion(val) + } + return nil + } + return res +} +// GetOidcToken gets the oidc_token property value. The OIDC token issued by GitHub Actions certifying the origin of the deployment. +// returns a *string when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetOidcToken()(*string) { + return m.oidc_token +} +// GetPagesBuildVersion gets the pages_build_version property value. A unique string that represents the version of the build for this deployment. +// returns a *string when successful +func (m *ItemItemPagesDeploymentsPostRequestBody) GetPagesBuildVersion()(*string) { + return m.pages_build_version +} +// Serialize serializes information the current object +func (m *ItemItemPagesDeploymentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat64Value("artifact_id", m.GetArtifactId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("artifact_url", m.GetArtifactUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("environment", m.GetEnvironment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oidc_token", m.GetOidcToken()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pages_build_version", m.GetPagesBuildVersion()) + 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 *ItemItemPagesDeploymentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArtifactId sets the artifact_id property value. The ID of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required. +func (m *ItemItemPagesDeploymentsPostRequestBody) SetArtifactId(value *float64)() { + m.artifact_id = value +} +// SetArtifactUrl sets the artifact_url property value. The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required. +func (m *ItemItemPagesDeploymentsPostRequestBody) SetArtifactUrl(value *string)() { + m.artifact_url = value +} +// SetEnvironment sets the environment property value. The target environment for this GitHub Pages deployment. +func (m *ItemItemPagesDeploymentsPostRequestBody) SetEnvironment(value *string)() { + m.environment = value +} +// SetOidcToken sets the oidc_token property value. The OIDC token issued by GitHub Actions certifying the origin of the deployment. +func (m *ItemItemPagesDeploymentsPostRequestBody) SetOidcToken(value *string)() { + m.oidc_token = value +} +// SetPagesBuildVersion sets the pages_build_version property value. A unique string that represents the version of the build for this deployment. +func (m *ItemItemPagesDeploymentsPostRequestBody) SetPagesBuildVersion(value *string)() { + m.pages_build_version = value +} +type ItemItemPagesDeploymentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArtifactId()(*float64) + GetArtifactUrl()(*string) + GetEnvironment()(*string) + GetOidcToken()(*string) + GetPagesBuildVersion()(*string) + SetArtifactId(value *float64)() + SetArtifactUrl(value *string)() + SetEnvironment(value *string)() + SetOidcToken(value *string)() + SetPagesBuildVersion(value *string)() +} diff --git a/pkg/github/repos/item_item_pages_deployments_request_builder.go b/pkg/github/repos/item_item_pages_deployments_request_builder.go new file mode 100644 index 0000000..ec3c13d --- /dev/null +++ b/pkg/github/repos/item_item_pages_deployments_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesDeploymentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\deployments +type ItemItemPagesDeploymentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByPages_deployment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pages.deployments.item collection +// returns a *ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder when successful +func (m *ItemItemPagesDeploymentsRequestBuilder) ByPages_deployment_id(pages_deployment_id int32)(*ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["pages_deployment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(pages_deployment_id), 10) + return NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPagesDeploymentsRequestBuilderInternal instantiates a new ItemItemPagesDeploymentsRequestBuilder and sets the default values. +func NewItemItemPagesDeploymentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesDeploymentsRequestBuilder) { + m := &ItemItemPagesDeploymentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments", pathParameters), + } + return m +} +// NewItemItemPagesDeploymentsRequestBuilder instantiates a new ItemItemPagesDeploymentsRequestBuilder and sets the default values. +func NewItemItemPagesDeploymentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesDeploymentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesDeploymentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post create a GitHub Pages deployment for a repository.The authenticated user must have write permission to the repository. +// returns a PageDeploymentable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#create-a-github-pages-deployment +func (m *ItemItemPagesDeploymentsRequestBuilder) Post(ctx context.Context, body ItemItemPagesDeploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageDeploymentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageDeploymentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PageDeploymentable), nil +} +// ToPostRequestInformation create a GitHub Pages deployment for a repository.The authenticated user must have write permission to the repository. +// returns a *RequestInformation when successful +func (m *ItemItemPagesDeploymentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPagesDeploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesDeploymentsRequestBuilder when successful +func (m *ItemItemPagesDeploymentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesDeploymentsRequestBuilder) { + return NewItemItemPagesDeploymentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_deployments_with_pages_deployment_item_request_builder.go b/pkg/github/repos/item_item_pages_deployments_with_pages_deployment_item_request_builder.go new file mode 100644 index 0000000..91352f4 --- /dev/null +++ b/pkg/github/repos/item_item_pages_deployments_with_pages_deployment_item_request_builder.go @@ -0,0 +1,66 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\deployments\{pages_deployment_id} +type ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Cancel the cancel property +// returns a *ItemItemPagesDeploymentsItemCancelRequestBuilder when successful +func (m *ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) Cancel()(*ItemItemPagesDeploymentsItemCancelRequestBuilder) { + return NewItemItemPagesDeploymentsItemCancelRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilderInternal instantiates a new ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder and sets the default values. +func NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) { + m := &ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments/{pages_deployment_id}", pathParameters), + } + return m +} +// NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder instantiates a new ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder and sets the default values. +func NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the current status of a GitHub Pages deployment.The authenticated user must have read permission for the GitHub Pages site. +// returns a PagesDeploymentStatusable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#get-the-status-of-a-github-pages-deployment +func (m *ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PagesDeploymentStatusable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePagesDeploymentStatusFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PagesDeploymentStatusable), nil +} +// ToGetRequestInformation gets the current status of a GitHub Pages deployment.The authenticated user must have read permission for the GitHub Pages site. +// returns a *RequestInformation when successful +func (m *ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder when successful +func (m *ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder) { + return NewItemItemPagesDeploymentsWithPages_deployment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_health_request_builder.go b/pkg/github/repos/item_item_pages_health_request_builder.go new file mode 100644 index 0000000..212daf9 --- /dev/null +++ b/pkg/github/repos/item_item_pages_health_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesHealthRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\health +type ItemItemPagesHealthRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPagesHealthRequestBuilderInternal instantiates a new ItemItemPagesHealthRequestBuilder and sets the default values. +func NewItemItemPagesHealthRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesHealthRequestBuilder) { + m := &ItemItemPagesHealthRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/health", pathParameters), + } + return m +} +// NewItemItemPagesHealthRequestBuilder instantiates a new ItemItemPagesHealthRequestBuilder and sets the default values. +func NewItemItemPagesHealthRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesHealthRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesHealthRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a PagesHealthCheckable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#get-a-dns-health-check-for-github-pages +func (m *ItemItemPagesHealthRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PagesHealthCheckable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePagesHealthCheckFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PagesHealthCheckable), nil +} +// ToGetRequestInformation gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesHealthRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesHealthRequestBuilder when successful +func (m *ItemItemPagesHealthRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesHealthRequestBuilder) { + return NewItemItemPagesHealthRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pages_post_request_body.go b/pkg/github/repos/item_item_pages_post_request_body.go new file mode 100644 index 0000000..ed62902 --- /dev/null +++ b/pkg/github/repos/item_item_pages_post_request_body.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemPagesPostRequestBody the source branch and directory used to publish your Pages site. +type ItemItemPagesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The source branch and directory used to publish your Pages site. + source ItemItemPagesPostRequestBody_sourceable +} +// NewItemItemPagesPostRequestBody instantiates a new ItemItemPagesPostRequestBody and sets the default values. +func NewItemItemPagesPostRequestBody()(*ItemItemPagesPostRequestBody) { + m := &ItemItemPagesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPagesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPagesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPagesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPagesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPagesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemPagesPostRequestBody_sourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(ItemItemPagesPostRequestBody_sourceable)) + } + return nil + } + return res +} +// GetSource gets the source property value. The source branch and directory used to publish your Pages site. +// returns a ItemItemPagesPostRequestBody_sourceable when successful +func (m *ItemItemPagesPostRequestBody) GetSource()(ItemItemPagesPostRequestBody_sourceable) { + return m.source +} +// Serialize serializes information the current object +func (m *ItemItemPagesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("source", m.GetSource()) + 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 *ItemItemPagesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSource sets the source property value. The source branch and directory used to publish your Pages site. +func (m *ItemItemPagesPostRequestBody) SetSource(value ItemItemPagesPostRequestBody_sourceable)() { + m.source = value +} +type ItemItemPagesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSource()(ItemItemPagesPostRequestBody_sourceable) + SetSource(value ItemItemPagesPostRequestBody_sourceable)() +} diff --git a/pkg/github/repos/item_item_pages_post_request_body_source.go b/pkg/github/repos/item_item_pages_post_request_body_source.go new file mode 100644 index 0000000..7ae5f6c --- /dev/null +++ b/pkg/github/repos/item_item_pages_post_request_body_source.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemPagesPostRequestBody_source the source branch and directory used to publish your Pages site. +type ItemItemPagesPostRequestBody_source struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repository branch used to publish your site's source files. + branch *string +} +// NewItemItemPagesPostRequestBody_source instantiates a new ItemItemPagesPostRequestBody_source and sets the default values. +func NewItemItemPagesPostRequestBody_source()(*ItemItemPagesPostRequestBody_source) { + m := &ItemItemPagesPostRequestBody_source{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPagesPostRequestBody_sourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPagesPostRequestBody_sourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPagesPostRequestBody_source(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPagesPostRequestBody_source) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBranch gets the branch property value. The repository branch used to publish your site's source files. +// returns a *string when successful +func (m *ItemItemPagesPostRequestBody_source) GetBranch()(*string) { + return m.branch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPagesPostRequestBody_source) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPagesPostRequestBody_source) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("branch", m.GetBranch()) + 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 *ItemItemPagesPostRequestBody_source) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBranch sets the branch property value. The repository branch used to publish your site's source files. +func (m *ItemItemPagesPostRequestBody_source) SetBranch(value *string)() { + m.branch = value +} +type ItemItemPagesPostRequestBody_sourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBranch()(*string) + SetBranch(value *string)() +} diff --git a/pkg/github/repos/item_item_pages_put_request_body.go b/pkg/github/repos/item_item_pages_put_request_body.go new file mode 100644 index 0000000..8571eff --- /dev/null +++ b/pkg/github/repos/item_item_pages_put_request_body.go @@ -0,0 +1,251 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPagesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/enterprise-cloud@latest//pages/configuring-a-custom-domain-for-your-github-pages-site)." + cname *string + // Specify whether HTTPS should be enforced for the repository. + https_enforced *bool + // Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. + public *bool + // The source property + source ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable +} +// ItemItemPagesPutRequestBody_PagesPutRequestBody_source composed type wrapper for classes ItemItemPagesPutRequestBody_sourceMember1able, string +type ItemItemPagesPutRequestBody_PagesPutRequestBody_source struct { + // Composed type representation for type ItemItemPagesPutRequestBody_sourceMember1able + itemItemPagesPutRequestBody_sourceMember1 ItemItemPagesPutRequestBody_sourceMember1able + // Composed type representation for type string + string *string +} +// NewItemItemPagesPutRequestBody_PagesPutRequestBody_source instantiates a new ItemItemPagesPutRequestBody_PagesPutRequestBody_source and sets the default values. +func NewItemItemPagesPutRequestBody_PagesPutRequestBody_source()(*ItemItemPagesPutRequestBody_PagesPutRequestBody_source) { + m := &ItemItemPagesPutRequestBody_PagesPutRequestBody_source{ + } + return m +} +// CreateItemItemPagesPutRequestBody_PagesPutRequestBody_sourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPagesPutRequestBody_PagesPutRequestBody_sourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewItemItemPagesPutRequestBody_PagesPutRequestBody_source() + if parseNode != nil { + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetObjectValue(CreateItemItemPagesPutRequestBody_sourceMember1FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + if cast, ok := val.(ItemItemPagesPutRequestBody_sourceMember1able); ok { + result.SetItemItemPagesPutRequestBodySourceMember1(cast) + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) GetIsComposedType()(bool) { + return true +} +// GetItemItemPagesPutRequestBodySourceMember1 gets the ItemItemPagesPutRequestBody_sourceMember1 property value. Composed type representation for type ItemItemPagesPutRequestBody_sourceMember1able +// returns a ItemItemPagesPutRequestBody_sourceMember1able when successful +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) GetItemItemPagesPutRequestBodySourceMember1()(ItemItemPagesPutRequestBody_sourceMember1able) { + return m.itemItemPagesPutRequestBody_sourceMember1 +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetItemItemPagesPutRequestBodySourceMember1() != nil { + err := writer.WriteObjectValue("", m.GetItemItemPagesPutRequestBodySourceMember1()) + if err != nil { + return err + } + } + return nil +} +// SetItemItemPagesPutRequestBodySourceMember1 sets the ItemItemPagesPutRequestBody_sourceMember1 property value. Composed type representation for type ItemItemPagesPutRequestBody_sourceMember1able +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) SetItemItemPagesPutRequestBodySourceMember1(value ItemItemPagesPutRequestBody_sourceMember1able)() { + m.itemItemPagesPutRequestBody_sourceMember1 = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *ItemItemPagesPutRequestBody_PagesPutRequestBody_source) SetString(value *string)() { + m.string = value +} +type ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemPagesPutRequestBodySourceMember1()(ItemItemPagesPutRequestBody_sourceMember1able) + GetString()(*string) + SetItemItemPagesPutRequestBodySourceMember1(value ItemItemPagesPutRequestBody_sourceMember1able)() + SetString(value *string)() +} +// NewItemItemPagesPutRequestBody instantiates a new ItemItemPagesPutRequestBody and sets the default values. +func NewItemItemPagesPutRequestBody()(*ItemItemPagesPutRequestBody) { + m := &ItemItemPagesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPagesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPagesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPagesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPagesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCname gets the cname property value. Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/enterprise-cloud@latest//pages/configuring-a-custom-domain-for-your-github-pages-site)." +// returns a *string when successful +func (m *ItemItemPagesPutRequestBody) GetCname()(*string) { + return m.cname +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPagesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCname(val) + } + return nil + } + res["https_enforced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHttpsEnforced(val) + } + return nil + } + res["public"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublic(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemPagesPutRequestBody_PagesPutRequestBody_sourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable)) + } + return nil + } + return res +} +// GetHttpsEnforced gets the https_enforced property value. Specify whether HTTPS should be enforced for the repository. +// returns a *bool when successful +func (m *ItemItemPagesPutRequestBody) GetHttpsEnforced()(*bool) { + return m.https_enforced +} +// GetPublic gets the public property value. Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. +// returns a *bool when successful +func (m *ItemItemPagesPutRequestBody) GetPublic()(*bool) { + return m.public +} +// GetSource gets the source property value. The source property +// returns a ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable when successful +func (m *ItemItemPagesPutRequestBody) GetSource()(ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable) { + return m.source +} +// Serialize serializes information the current object +func (m *ItemItemPagesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cname", m.GetCname()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("https_enforced", m.GetHttpsEnforced()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public", m.GetPublic()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("source", m.GetSource()) + 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 *ItemItemPagesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCname sets the cname property value. Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/enterprise-cloud@latest//pages/configuring-a-custom-domain-for-your-github-pages-site)." +func (m *ItemItemPagesPutRequestBody) SetCname(value *string)() { + m.cname = value +} +// SetHttpsEnforced sets the https_enforced property value. Specify whether HTTPS should be enforced for the repository. +func (m *ItemItemPagesPutRequestBody) SetHttpsEnforced(value *bool)() { + m.https_enforced = value +} +// SetPublic sets the public property value. Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. +func (m *ItemItemPagesPutRequestBody) SetPublic(value *bool)() { + m.public = value +} +// SetSource sets the source property value. The source property +func (m *ItemItemPagesPutRequestBody) SetSource(value ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable)() { + m.source = value +} +type ItemItemPagesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCname()(*string) + GetHttpsEnforced()(*bool) + GetPublic()(*bool) + GetSource()(ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable) + SetCname(value *string)() + SetHttpsEnforced(value *bool)() + SetPublic(value *bool)() + SetSource(value ItemItemPagesPutRequestBody_PagesPutRequestBody_sourceable)() +} diff --git a/pkg/github/repos/item_item_pages_put_request_body_source_member1.go b/pkg/github/repos/item_item_pages_put_request_body_source_member1.go new file mode 100644 index 0000000..a4f3895 --- /dev/null +++ b/pkg/github/repos/item_item_pages_put_request_body_source_member1.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemPagesPutRequestBody_sourceMember1 update the source for the repository. Must include the branch name and path. +type ItemItemPagesPutRequestBody_sourceMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repository branch used to publish your site's source files. + branch *string +} +// NewItemItemPagesPutRequestBody_sourceMember1 instantiates a new ItemItemPagesPutRequestBody_sourceMember1 and sets the default values. +func NewItemItemPagesPutRequestBody_sourceMember1()(*ItemItemPagesPutRequestBody_sourceMember1) { + m := &ItemItemPagesPutRequestBody_sourceMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPagesPutRequestBody_sourceMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPagesPutRequestBody_sourceMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPagesPutRequestBody_sourceMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPagesPutRequestBody_sourceMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBranch gets the branch property value. The repository branch used to publish your site's source files. +// returns a *string when successful +func (m *ItemItemPagesPutRequestBody_sourceMember1) GetBranch()(*string) { + return m.branch +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPagesPutRequestBody_sourceMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBranch(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPagesPutRequestBody_sourceMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("branch", m.GetBranch()) + 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 *ItemItemPagesPutRequestBody_sourceMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBranch sets the branch property value. The repository branch used to publish your site's source files. +func (m *ItemItemPagesPutRequestBody_sourceMember1) SetBranch(value *string)() { + m.branch = value +} +type ItemItemPagesPutRequestBody_sourceMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBranch()(*string) + SetBranch(value *string)() +} diff --git a/pkg/github/repos/item_item_pages_request_builder.go b/pkg/github/repos/item_item_pages_request_builder.go new file mode 100644 index 0000000..966bb41 --- /dev/null +++ b/pkg/github/repos/item_item_pages_request_builder.go @@ -0,0 +1,179 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPagesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages +type ItemItemPagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Builds the builds property +// returns a *ItemItemPagesBuildsRequestBuilder when successful +func (m *ItemItemPagesRequestBuilder) Builds()(*ItemItemPagesBuildsRequestBuilder) { + return NewItemItemPagesBuildsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPagesRequestBuilderInternal instantiates a new ItemItemPagesRequestBuilder and sets the default values. +func NewItemItemPagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesRequestBuilder) { + m := &ItemItemPagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages", pathParameters), + } + return m +} +// NewItemItemPagesRequestBuilder instantiates a new ItemItemPagesRequestBuilder and sets the default values. +func NewItemItemPagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a GitHub Enterprise Cloud Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#delete-a-apiname-pages-site +func (m *ItemItemPagesRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Deployments the deployments property +// returns a *ItemItemPagesDeploymentsRequestBuilder when successful +func (m *ItemItemPagesRequestBuilder) Deployments()(*ItemItemPagesDeploymentsRequestBuilder) { + return NewItemItemPagesDeploymentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets information about a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Pageable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#get-a-apiname-pages-site +func (m *ItemItemPagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Pageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Pageable), nil +} +// Health the health property +// returns a *ItemItemPagesHealthRequestBuilder when successful +func (m *ItemItemPagesRequestBuilder) Health()(*ItemItemPagesHealthRequestBuilder) { + return NewItemItemPagesHealthRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Post configures a GitHub Enterprise Cloud Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)."The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Pageable when successful +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#create-a-apiname-pages-site +func (m *ItemItemPagesRequestBuilder) Post(ctx context.Context, body ItemItemPagesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Pageable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePageFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Pageable), nil +} +// Put updates information for a GitHub Enterprise Cloud Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pages/pages#update-information-about-a-apiname-pages-site +func (m *ItemItemPagesRequestBuilder) Put(ctx context.Context, body ItemItemPagesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes a GitHub Enterprise Cloud Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets information about a GitHub Enterprise Cloud Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation configures a GitHub Enterprise Cloud Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)."The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPagesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation updates information for a GitHub Enterprise Cloud Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPagesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemPagesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPagesRequestBuilder when successful +func (m *ItemItemPagesRequestBuilder) WithUrl(rawUrl string)(*ItemItemPagesRequestBuilder) { + return NewItemItemPagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_private_vulnerability_reporting_get_response.go b/pkg/github/repos/item_item_private_vulnerability_reporting_get_response.go new file mode 100644 index 0000000..1734e92 --- /dev/null +++ b/pkg/github/repos/item_item_private_vulnerability_reporting_get_response.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPrivateVulnerabilityReportingGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether or not private vulnerability reporting is enabled for the repository. + enabled *bool +} +// NewItemItemPrivateVulnerabilityReportingGetResponse instantiates a new ItemItemPrivateVulnerabilityReportingGetResponse and sets the default values. +func NewItemItemPrivateVulnerabilityReportingGetResponse()(*ItemItemPrivateVulnerabilityReportingGetResponse) { + m := &ItemItemPrivateVulnerabilityReportingGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPrivateVulnerabilityReportingGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPrivateVulnerabilityReportingGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPrivateVulnerabilityReportingGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPrivateVulnerabilityReportingGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. Whether or not private vulnerability reporting is enabled for the repository. +// returns a *bool when successful +func (m *ItemItemPrivateVulnerabilityReportingGetResponse) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPrivateVulnerabilityReportingGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPrivateVulnerabilityReportingGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + 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 *ItemItemPrivateVulnerabilityReportingGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. Whether or not private vulnerability reporting is enabled for the repository. +func (m *ItemItemPrivateVulnerabilityReportingGetResponse) SetEnabled(value *bool)() { + m.enabled = value +} +type ItemItemPrivateVulnerabilityReportingGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + SetEnabled(value *bool)() +} diff --git a/pkg/github/repos/item_item_private_vulnerability_reporting_request_builder.go b/pkg/github/repos/item_item_private_vulnerability_reporting_request_builder.go new file mode 100644 index 0000000..47d6ee2 --- /dev/null +++ b/pkg/github/repos/item_item_private_vulnerability_reporting_request_builder.go @@ -0,0 +1,115 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPrivateVulnerabilityReportingRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\private-vulnerability-reporting +type ItemItemPrivateVulnerabilityReportingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPrivateVulnerabilityReportingRequestBuilderInternal instantiates a new ItemItemPrivateVulnerabilityReportingRequestBuilder and sets the default values. +func NewItemItemPrivateVulnerabilityReportingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPrivateVulnerabilityReportingRequestBuilder) { + m := &ItemItemPrivateVulnerabilityReportingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/private-vulnerability-reporting", pathParameters), + } + return m +} +// NewItemItemPrivateVulnerabilityReportingRequestBuilder instantiates a new ItemItemPrivateVulnerabilityReportingRequestBuilder and sets the default values. +func NewItemItemPrivateVulnerabilityReportingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPrivateVulnerabilityReportingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPrivateVulnerabilityReportingRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete disables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". +// returns a BasicError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#disable-private-vulnerability-reporting-for-a-repository +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get returns a boolean indicating whether or not private vulnerability reporting is enabled for the repository. For more information, see "[Evaluating the security settings of a repository](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)". +// returns a ItemItemPrivateVulnerabilityReportingGetResponseable when successful +// returns a BasicError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#check-if-private-vulnerability-reporting-is-enabled-for-a-repository +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemPrivateVulnerabilityReportingGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemPrivateVulnerabilityReportingGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemPrivateVulnerabilityReportingGetResponseable), nil +} +// Put enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." +// returns a BasicError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#enable-private-vulnerability-reporting-for-a-repository +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation disables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". +// returns a *RequestInformation when successful +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + return requestInfo, nil +} +// ToGetRequestInformation returns a boolean indicating whether or not private vulnerability reporting is enabled for the repository. For more information, see "[Evaluating the security settings of a repository](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)". +// returns a *RequestInformation when successful +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." +// returns a *RequestInformation when successful +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPrivateVulnerabilityReportingRequestBuilder when successful +func (m *ItemItemPrivateVulnerabilityReportingRequestBuilder) WithUrl(rawUrl string)(*ItemItemPrivateVulnerabilityReportingRequestBuilder) { + return NewItemItemPrivateVulnerabilityReportingRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_projects_post_request_body.go b/pkg/github/repos/item_item_projects_post_request_body.go new file mode 100644 index 0000000..8e34c90 --- /dev/null +++ b/pkg/github/repos/item_item_projects_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemProjectsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the project. + body *string + // The name of the project. + name *string +} +// NewItemItemProjectsPostRequestBody instantiates a new ItemItemProjectsPostRequestBody and sets the default values. +func NewItemItemProjectsPostRequestBody()(*ItemItemProjectsPostRequestBody) { + m := &ItemItemProjectsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemProjectsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemProjectsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemProjectsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemProjectsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The description of the project. +// returns a *string when successful +func (m *ItemItemProjectsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemProjectsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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 + } + return res +} +// GetName gets the name property value. The name of the project. +// returns a *string when successful +func (m *ItemItemProjectsPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemItemProjectsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemItemProjectsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The description of the project. +func (m *ItemItemProjectsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetName sets the name property value. The name of the project. +func (m *ItemItemProjectsPostRequestBody) SetName(value *string)() { + m.name = value +} +type ItemItemProjectsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetName()(*string) + SetBody(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/repos/item_item_projects_request_builder.go b/pkg/github/repos/item_item_projects_request_builder.go new file mode 100644 index 0000000..9b961ff --- /dev/null +++ b/pkg/github/repos/item_item_projects_request_builder.go @@ -0,0 +1,125 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i88ad702ded1e5781cb81f70fa5de3bf6472caa070e8baa09544fcabc28fff485 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/projects" +) + +// ItemItemProjectsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\projects +type ItemItemProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemProjectsRequestBuilderGetQueryParameters lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +type ItemItemProjectsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Indicates the state of the projects to return. + State *i88ad702ded1e5781cb81f70fa5de3bf6472caa070e8baa09544fcabc28fff485.GetStateQueryParameterType `uriparametername:"state"` +} +// NewItemItemProjectsRequestBuilderInternal instantiates a new ItemItemProjectsRequestBuilder and sets the default values. +func NewItemItemProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemProjectsRequestBuilder) { + m := &ItemItemProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/projects{?page*,per_page*,state*}", pathParameters), + } + return m +} +// NewItemItemProjectsRequestBuilder instantiates a new ItemItemProjectsRequestBuilder and sets the default values. +func NewItemItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemProjectsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a []Projectable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#list-repository-projects +func (m *ItemItemProjectsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemProjectsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable) + } + } + return val, nil +} +// Post creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a Projectable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#create-a-repository-project +func (m *ItemItemProjectsRequestBuilder) Post(ctx context.Context, body ItemItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "410": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable), nil +} +// ToGetRequestInformation lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *ItemItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *ItemItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemProjectsRequestBuilder when successful +func (m *ItemItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemItemProjectsRequestBuilder) { + return NewItemItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_properties_request_builder.go b/pkg/github/repos/item_item_properties_request_builder.go new file mode 100644 index 0000000..0ed8e86 --- /dev/null +++ b/pkg/github/repos/item_item_properties_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemPropertiesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\properties +type ItemItemPropertiesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPropertiesRequestBuilderInternal instantiates a new ItemItemPropertiesRequestBuilder and sets the default values. +func NewItemItemPropertiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPropertiesRequestBuilder) { + m := &ItemItemPropertiesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/properties", pathParameters), + } + return m +} +// NewItemItemPropertiesRequestBuilder instantiates a new ItemItemPropertiesRequestBuilder and sets the default values. +func NewItemItemPropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPropertiesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPropertiesRequestBuilderInternal(urlParams, requestAdapter) +} +// Values the values property +// returns a *ItemItemPropertiesValuesRequestBuilder when successful +func (m *ItemItemPropertiesRequestBuilder) Values()(*ItemItemPropertiesValuesRequestBuilder) { + return NewItemItemPropertiesValuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_properties_values_patch_request_body.go b/pkg/github/repos/item_item_properties_values_patch_request_body.go new file mode 100644 index 0000000..c0f0d3e --- /dev/null +++ b/pkg/github/repos/item_item_properties_values_patch_request_body.go @@ -0,0 +1,93 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemPropertiesValuesPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A list of custom property names and associated values to apply to the repositories. + properties []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable +} +// NewItemItemPropertiesValuesPatchRequestBody instantiates a new ItemItemPropertiesValuesPatchRequestBody and sets the default values. +func NewItemItemPropertiesValuesPatchRequestBody()(*ItemItemPropertiesValuesPatchRequestBody) { + m := &ItemItemPropertiesValuesPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPropertiesValuesPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPropertiesValuesPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPropertiesValuesPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPropertiesValuesPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPropertiesValuesPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCustomPropertyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) + } + } + m.SetProperties(res) + } + return nil + } + return res +} +// GetProperties gets the properties property value. A list of custom property names and associated values to apply to the repositories. +// returns a []CustomPropertyValueable when successful +func (m *ItemItemPropertiesValuesPatchRequestBody) GetProperties()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) { + return m.properties +} +// Serialize serializes information the current object +func (m *ItemItemPropertiesValuesPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemPropertiesValuesPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetProperties sets the properties property value. A list of custom property names and associated values to apply to the repositories. +func (m *ItemItemPropertiesValuesPatchRequestBody) SetProperties(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable)() { + m.properties = value +} +type ItemItemPropertiesValuesPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProperties()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) + SetProperties(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable)() +} diff --git a/pkg/github/repos/item_item_properties_values_request_builder.go b/pkg/github/repos/item_item_properties_values_request_builder.go new file mode 100644 index 0000000..8a24094 --- /dev/null +++ b/pkg/github/repos/item_item_properties_values_request_builder.go @@ -0,0 +1,101 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPropertiesValuesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\properties\values +type ItemItemPropertiesValuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPropertiesValuesRequestBuilderInternal instantiates a new ItemItemPropertiesValuesRequestBuilder and sets the default values. +func NewItemItemPropertiesValuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPropertiesValuesRequestBuilder) { + m := &ItemItemPropertiesValuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/properties/values", pathParameters), + } + return m +} +// NewItemItemPropertiesValuesRequestBuilder instantiates a new ItemItemPropertiesValuesRequestBuilder and sets the default values. +func NewItemItemPropertiesValuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPropertiesValuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPropertiesValuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets all custom property values that are set for a repository.Users with read access to the repository can use this endpoint. +// returns a []CustomPropertyValueable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/custom-properties#get-all-custom-property-values-for-a-repository +func (m *ItemItemPropertiesValuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCustomPropertyValueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CustomPropertyValueable) + } + } + return val, nil +} +// Patch create new or update existing custom property values for a repository.Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.Repository admins and other users with the repository-level "edit custom property values" fine-grained permission can use this endpoint. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository +func (m *ItemItemPropertiesValuesRequestBuilder) Patch(ctx context.Context, body ItemItemPropertiesValuesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets all custom property values that are set for a repository.Users with read access to the repository can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPropertiesValuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation create new or update existing custom property values for a repository.Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.Repository admins and other users with the repository-level "edit custom property values" fine-grained permission can use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPropertiesValuesRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemPropertiesValuesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPropertiesValuesRequestBuilder when successful +func (m *ItemItemPropertiesValuesRequestBuilder) WithUrl(rawUrl string)(*ItemItemPropertiesValuesRequestBuilder) { + return NewItemItemPropertiesValuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_comments_item_reactions_post_request_body.go b/pkg/github/repos/item_item_pulls_comments_item_reactions_post_request_body.go new file mode 100644 index 0000000..27ac2c6 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_comments_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsCommentsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemPullsCommentsItemReactionsPostRequestBody instantiates a new ItemItemPullsCommentsItemReactionsPostRequestBody and sets the default values. +func NewItemItemPullsCommentsItemReactionsPostRequestBody()(*ItemItemPullsCommentsItemReactionsPostRequestBody) { + m := &ItemItemPullsCommentsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsCommentsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsCommentsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsCommentsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsCommentsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsCommentsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsCommentsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemPullsCommentsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemPullsCommentsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go b/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go new file mode 100644 index 0000000..3fc11d1 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go @@ -0,0 +1,120 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i321f0f50ee6dc84005fec00fc7e73bfa5818890de3db7f246c21734d64a1219e "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/pulls/comments/item/reactions" +) + +// ItemItemPullsCommentsItemReactionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments\{comment_id}\reactions +type ItemItemPullsCommentsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsCommentsItemReactionsRequestBuilderGetQueryParameters list the reactions to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). +type ItemItemPullsCommentsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment. + Content *i321f0f50ee6dc84005fec00fc7e73bfa5818890de3db7f246c21734d64a1219e.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pulls.comments.item.reactions.item collection +// returns a *ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsCommentsItemReactionsRequestBuilderInternal instantiates a new ItemItemPullsCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemItemPullsCommentsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsItemReactionsRequestBuilder) { + m := &ItemItemPullsCommentsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemPullsCommentsItemReactionsRequestBuilder instantiates a new ItemItemPullsCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemItemPullsCommentsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsCommentsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). +// returns a []Reactionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-pull-request-review-comment +func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsCommentsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. +// returns a Reactionable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-pull-request-review-comment +func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemItemPullsCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsCommentsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsCommentsItemReactionsRequestBuilder when successful +func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsCommentsItemReactionsRequestBuilder) { + return NewItemItemPullsCommentsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_comments_item_reactions_with_reaction_item_request_builder.go b/pkg/github/repos/item_item_pulls_comments_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..d1c64da --- /dev/null +++ b/pkg/github/repos/item_item_pulls_comments_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments\{comment_id}\reactions\{reaction_id} +type ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-a-pull-request-comment-reaction +func (m *ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request). +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemItemPullsCommentsItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_comments_item_with_comment_patch_request_body.go b/pkg/github/repos/item_item_pulls_comments_item_with_comment_patch_request_body.go new file mode 100644 index 0000000..60c34fe --- /dev/null +++ b/pkg/github/repos/item_item_pulls_comments_item_with_comment_patch_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsCommentsItemWithComment_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The text of the reply to the review comment. + body *string +} +// NewItemItemPullsCommentsItemWithComment_PatchRequestBody instantiates a new ItemItemPullsCommentsItemWithComment_PatchRequestBody and sets the default values. +func NewItemItemPullsCommentsItemWithComment_PatchRequestBody()(*ItemItemPullsCommentsItemWithComment_PatchRequestBody) { + m := &ItemItemPullsCommentsItemWithComment_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsCommentsItemWithComment_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsCommentsItemWithComment_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsCommentsItemWithComment_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The text of the reply to the review comment. +// returns a *string when successful +func (m *ItemItemPullsCommentsItemWithComment_PatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsCommentsItemWithComment_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsCommentsItemWithComment_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemPullsCommentsItemWithComment_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The text of the reply to the review comment. +func (m *ItemItemPullsCommentsItemWithComment_PatchRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemPullsCommentsItemWithComment_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_comments_request_builder.go b/pkg/github/repos/item_item_pulls_comments_request_builder.go new file mode 100644 index 0000000..6f5849f --- /dev/null +++ b/pkg/github/repos/item_item_pulls_comments_request_builder.go @@ -0,0 +1,85 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ie0d0b18d13817bbb2d167c68615b4c17bb446c000b0dbf429c24b5efaad109e2 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/pulls/comments" +) + +// ItemItemPullsCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments +type ItemItemPullsCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsCommentsRequestBuilderGetQueryParameters lists review comments for all pull requests in a repository. By default,review comments are in ascending order by ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsCommentsRequestBuilderGetQueryParameters struct { + // The direction to sort results. Ignored without `sort` parameter. + Direction *ie0d0b18d13817bbb2d167c68615b4c17bb446c000b0dbf429c24b5efaad109e2.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + Sort *ie0d0b18d13817bbb2d167c68615b4c17bb446c000b0dbf429c24b5efaad109e2.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pulls.comments.item collection +// returns a *ItemItemPullsCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemPullsCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemItemPullsCommentsWithComment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10) + return NewItemItemPullsCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsCommentsRequestBuilderInternal instantiates a new ItemItemPullsCommentsRequestBuilder and sets the default values. +func NewItemItemPullsCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsRequestBuilder) { + m := &ItemItemPullsCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments{?direction*,page*,per_page*,since*,sort*}", pathParameters), + } + return m +} +// NewItemItemPullsCommentsRequestBuilder instantiates a new ItemItemPullsCommentsRequestBuilder and sets the default values. +func NewItemItemPullsCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists review comments for all pull requests in a repository. By default,review comments are in ascending order by ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []PullRequestReviewCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#list-review-comments-in-a-repository +func (m *ItemItemPullsCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable) + } + } + return val, nil +} +// ToGetRequestInformation lists review comments for all pull requests in a repository. By default,review comments are in ascending order by ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsCommentsRequestBuilder when successful +func (m *ItemItemPullsCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsCommentsRequestBuilder) { + return NewItemItemPullsCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_comments_with_comment_item_request_builder.go b/pkg/github/repos/item_item_pulls_comments_with_comment_item_request_builder.go new file mode 100644 index 0000000..7a8bd0e --- /dev/null +++ b/pkg/github/repos/item_item_pulls_comments_with_comment_item_request_builder.go @@ -0,0 +1,124 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsCommentsWithComment_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments\{comment_id} +type ItemItemPullsCommentsWithComment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsCommentsWithComment_ItemRequestBuilderInternal instantiates a new ItemItemPullsCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemPullsCommentsWithComment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsWithComment_ItemRequestBuilder) { + m := &ItemItemPullsCommentsWithComment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}", pathParameters), + } + return m +} +// NewItemItemPullsCommentsWithComment_ItemRequestBuilder instantiates a new ItemItemPullsCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemPullsCommentsWithComment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsCommentsWithComment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsCommentsWithComment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a review comment. +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#delete-a-review-comment-for-a-pull-request +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get provides details for a specified review comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#get-a-review-comment-for-a-pull-request +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable), nil +} +// Patch edits the content of a specified review comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#update-a-review-comment-for-a-pull-request +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemPullsCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable), nil +} +// Reactions the reactions property +// returns a *ItemItemPullsCommentsItemReactionsRequestBuilder when successful +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) Reactions()(*ItemItemPullsCommentsItemReactionsRequestBuilder) { + return NewItemItemPullsCommentsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a review comment. +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation provides details for a specified review comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation edits the content of a specified review comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemPullsCommentsItemWithComment_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemPullsCommentsWithComment_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsCommentsWithComment_ItemRequestBuilder) { + return NewItemItemPullsCommentsWithComment_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_codespaces_post_request_body.go b/pkg/github/repos/item_item_pulls_item_codespaces_post_request_body.go new file mode 100644 index 0000000..7ec711f --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_codespaces_post_request_body.go @@ -0,0 +1,312 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemCodespacesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // IP for location auto-detection when proxying a request + client_ip *string + // Path to devcontainer.json config to use for this codespace + devcontainer_path *string + // Display name for this codespace + display_name *string + // Time in minutes before codespace stops from inactivity + idle_timeout_minutes *int32 + // The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. + location *string + // Machine type to use for this codespace + machine *string + // Whether to authorize requested permissions from devcontainer.json + multi_repo_permissions_opt_out *bool + // Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + retention_period_minutes *int32 + // Working directory for this codespace + working_directory *string +} +// NewItemItemPullsItemCodespacesPostRequestBody instantiates a new ItemItemPullsItemCodespacesPostRequestBody and sets the default values. +func NewItemItemPullsItemCodespacesPostRequestBody()(*ItemItemPullsItemCodespacesPostRequestBody) { + m := &ItemItemPullsItemCodespacesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemCodespacesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemCodespacesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemCodespacesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientIp gets the client_ip property value. IP for location auto-detection when proxying a request +// returns a *string when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetClientIp()(*string) { + return m.client_ip +} +// GetDevcontainerPath gets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +// returns a *string when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetDisplayName gets the display_name property value. Display name for this codespace +// returns a *string when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientIp(val) + } + return nil + } + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["idle_timeout_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutMinutes(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachine(val) + } + return nil + } + res["multi_repo_permissions_opt_out"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMultiRepoPermissionsOptOut(val) + } + return nil + } + res["retention_period_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRetentionPeriodMinutes(val) + } + return nil + } + res["working_directory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkingDirectory(val) + } + return nil + } + return res +} +// GetIdleTimeoutMinutes gets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +// returns a *int32 when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetIdleTimeoutMinutes()(*int32) { + return m.idle_timeout_minutes +} +// GetLocation gets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +// returns a *string when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetLocation()(*string) { + return m.location +} +// GetMachine gets the machine property value. Machine type to use for this codespace +// returns a *string when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetMachine()(*string) { + return m.machine +} +// GetMultiRepoPermissionsOptOut gets the multi_repo_permissions_opt_out property value. Whether to authorize requested permissions from devcontainer.json +// returns a *bool when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetMultiRepoPermissionsOptOut()(*bool) { + return m.multi_repo_permissions_opt_out +} +// GetRetentionPeriodMinutes gets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +// returns a *int32 when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetRetentionPeriodMinutes()(*int32) { + return m.retention_period_minutes +} +// GetWorkingDirectory gets the working_directory property value. Working directory for this codespace +// returns a *string when successful +func (m *ItemItemPullsItemCodespacesPostRequestBody) GetWorkingDirectory()(*string) { + return m.working_directory +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemCodespacesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client_ip", m.GetClientIp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("idle_timeout_minutes", m.GetIdleTimeoutMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("multi_repo_permissions_opt_out", m.GetMultiRepoPermissionsOptOut()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("retention_period_minutes", m.GetRetentionPeriodMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("working_directory", m.GetWorkingDirectory()) + 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 *ItemItemPullsItemCodespacesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientIp sets the client_ip property value. IP for location auto-detection when proxying a request +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetClientIp(value *string)() { + m.client_ip = value +} +// SetDevcontainerPath sets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetDisplayName sets the display_name property value. Display name for this codespace +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetDisplayName(value *string)() { + m.display_name = value +} +// SetIdleTimeoutMinutes sets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetIdleTimeoutMinutes(value *int32)() { + m.idle_timeout_minutes = value +} +// SetLocation sets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetLocation(value *string)() { + m.location = value +} +// SetMachine sets the machine property value. Machine type to use for this codespace +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetMachine(value *string)() { + m.machine = value +} +// SetMultiRepoPermissionsOptOut sets the multi_repo_permissions_opt_out property value. Whether to authorize requested permissions from devcontainer.json +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetMultiRepoPermissionsOptOut(value *bool)() { + m.multi_repo_permissions_opt_out = value +} +// SetRetentionPeriodMinutes sets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetRetentionPeriodMinutes(value *int32)() { + m.retention_period_minutes = value +} +// SetWorkingDirectory sets the working_directory property value. Working directory for this codespace +func (m *ItemItemPullsItemCodespacesPostRequestBody) SetWorkingDirectory(value *string)() { + m.working_directory = value +} +type ItemItemPullsItemCodespacesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientIp()(*string) + GetDevcontainerPath()(*string) + GetDisplayName()(*string) + GetIdleTimeoutMinutes()(*int32) + GetLocation()(*string) + GetMachine()(*string) + GetMultiRepoPermissionsOptOut()(*bool) + GetRetentionPeriodMinutes()(*int32) + GetWorkingDirectory()(*string) + SetClientIp(value *string)() + SetDevcontainerPath(value *string)() + SetDisplayName(value *string)() + SetIdleTimeoutMinutes(value *int32)() + SetLocation(value *string)() + SetMachine(value *string)() + SetMultiRepoPermissionsOptOut(value *bool)() + SetRetentionPeriodMinutes(value *int32)() + SetWorkingDirectory(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_codespaces_request_builder.go b/pkg/github/repos/item_item_pulls_item_codespaces_request_builder.go new file mode 100644 index 0000000..273dec7 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_codespaces_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemCodespacesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\codespaces +type ItemItemPullsItemCodespacesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemCodespacesRequestBuilderInternal instantiates a new ItemItemPullsItemCodespacesRequestBuilder and sets the default values. +func NewItemItemPullsItemCodespacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCodespacesRequestBuilder) { + m := &ItemItemPullsItemCodespacesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/codespaces", pathParameters), + } + return m +} +// NewItemItemPullsItemCodespacesRequestBuilder instantiates a new ItemItemPullsItemCodespacesRequestBuilder and sets the default values. +func NewItemItemPullsItemCodespacesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCodespacesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemCodespacesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a codespace owned by the authenticated user for the specified pull request.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Codespace503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#create-a-codespace-from-a-pull-request +func (m *ItemItemPullsItemCodespacesRequestBuilder) Post(ctx context.Context, body ItemItemPullsItemCodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespace503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// ToPostRequestInformation creates a codespace owned by the authenticated user for the specified pull request.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemCodespacesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemCodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemCodespacesRequestBuilder when successful +func (m *ItemItemPullsItemCodespacesRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemCodespacesRequestBuilder) { + return NewItemItemPullsItemCodespacesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_comments_item_replies_post_request_body.go b/pkg/github/repos/item_item_pulls_item_comments_item_replies_post_request_body.go new file mode 100644 index 0000000..fb82874 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_comments_item_replies_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemCommentsItemRepliesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The text of the review comment. + body *string +} +// NewItemItemPullsItemCommentsItemRepliesPostRequestBody instantiates a new ItemItemPullsItemCommentsItemRepliesPostRequestBody and sets the default values. +func NewItemItemPullsItemCommentsItemRepliesPostRequestBody()(*ItemItemPullsItemCommentsItemRepliesPostRequestBody) { + m := &ItemItemPullsItemCommentsItemRepliesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemCommentsItemRepliesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemCommentsItemRepliesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemCommentsItemRepliesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemCommentsItemRepliesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The text of the review comment. +// returns a *string when successful +func (m *ItemItemPullsItemCommentsItemRepliesPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemCommentsItemRepliesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemCommentsItemRepliesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemPullsItemCommentsItemRepliesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The text of the review comment. +func (m *ItemItemPullsItemCommentsItemRepliesPostRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemPullsItemCommentsItemRepliesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go b/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go new file mode 100644 index 0000000..af36666 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemCommentsItemRepliesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\comments\{comment_id}\replies +type ItemItemPullsItemCommentsItemRepliesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemCommentsItemRepliesRequestBuilderInternal instantiates a new ItemItemPullsItemCommentsItemRepliesRequestBuilder and sets the default values. +func NewItemItemPullsItemCommentsItemRepliesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommentsItemRepliesRequestBuilder) { + m := &ItemItemPullsItemCommentsItemRepliesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments/{comment_id}/replies", pathParameters), + } + return m +} +// NewItemItemPullsItemCommentsItemRepliesRequestBuilder instantiates a new ItemItemPullsItemCommentsItemRepliesRequestBuilder and sets the default values. +func NewItemItemPullsItemCommentsItemRepliesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommentsItemRepliesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemCommentsItemRepliesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#create-a-reply-for-a-review-comment +func (m *ItemItemPullsItemCommentsItemRepliesRequestBuilder) Post(ctx context.Context, body ItemItemPullsItemCommentsItemRepliesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable), nil +} +// ToPostRequestInformation creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemCommentsItemRepliesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemCommentsItemRepliesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemCommentsItemRepliesRequestBuilder when successful +func (m *ItemItemPullsItemCommentsItemRepliesRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemCommentsItemRepliesRequestBuilder) { + return NewItemItemPullsItemCommentsItemRepliesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_comments_post_request_body.go b/pkg/github/repos/item_item_pulls_item_comments_post_request_body.go new file mode 100644 index 0000000..2c4801f --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_comments_post_request_body.go @@ -0,0 +1,257 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemCommentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The text of the review comment. + body *string + // The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + commit_id *string + // The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + in_reply_to *int32 + // **Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + line *int32 + // The relative path to the file that necessitates a comment. + path *string + // **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + // Deprecated: + position *int32 + // **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/enterprise-cloud@latest//articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + start_line *int32 +} +// NewItemItemPullsItemCommentsPostRequestBody instantiates a new ItemItemPullsItemCommentsPostRequestBody and sets the default values. +func NewItemItemPullsItemCommentsPostRequestBody()(*ItemItemPullsItemCommentsPostRequestBody) { + m := &ItemItemPullsItemCommentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemCommentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemCommentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemCommentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The text of the review comment. +// returns a *string when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetCommitId gets the commit_id property value. The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. +// returns a *string when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetCommitId()(*string) { + return m.commit_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + res["in_reply_to"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInReplyTo(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + return res +} +// GetInReplyTo gets the in_reply_to property value. The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. +// returns a *int32 when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetInReplyTo()(*int32) { + return m.in_reply_to +} +// GetLine gets the line property value. **Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. +// returns a *int32 when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetLine()(*int32) { + return m.line +} +// GetPath gets the path property value. The relative path to the file that necessitates a comment. +// returns a *string when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetPath()(*string) { + return m.path +} +// GetPosition gets the position property value. **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. +// Deprecated: +// returns a *int32 when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetPosition()(*int32) { + return m.position +} +// GetStartLine gets the start_line property value. **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/enterprise-cloud@latest//articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. +// returns a *int32 when successful +func (m *ItemItemPullsItemCommentsPostRequestBody) GetStartLine()(*int32) { + return m.start_line +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemCommentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("in_reply_to", m.GetInReplyTo()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + 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 *ItemItemPullsItemCommentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The text of the review comment. +func (m *ItemItemPullsItemCommentsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetCommitId sets the commit_id property value. The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. +func (m *ItemItemPullsItemCommentsPostRequestBody) SetCommitId(value *string)() { + m.commit_id = value +} +// SetInReplyTo sets the in_reply_to property value. The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. +func (m *ItemItemPullsItemCommentsPostRequestBody) SetInReplyTo(value *int32)() { + m.in_reply_to = value +} +// SetLine sets the line property value. **Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. +func (m *ItemItemPullsItemCommentsPostRequestBody) SetLine(value *int32)() { + m.line = value +} +// SetPath sets the path property value. The relative path to the file that necessitates a comment. +func (m *ItemItemPullsItemCommentsPostRequestBody) SetPath(value *string)() { + m.path = value +} +// SetPosition sets the position property value. **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. +// Deprecated: +func (m *ItemItemPullsItemCommentsPostRequestBody) SetPosition(value *int32)() { + m.position = value +} +// SetStartLine sets the start_line property value. **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/enterprise-cloud@latest//articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. +func (m *ItemItemPullsItemCommentsPostRequestBody) SetStartLine(value *int32)() { + m.start_line = value +} +type ItemItemPullsItemCommentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetCommitId()(*string) + GetInReplyTo()(*int32) + GetLine()(*int32) + GetPath()(*string) + GetPosition()(*int32) + GetStartLine()(*int32) + SetBody(value *string)() + SetCommitId(value *string)() + SetInReplyTo(value *int32)() + SetLine(value *int32)() + SetPath(value *string)() + SetPosition(value *int32)() + SetStartLine(value *int32)() +} diff --git a/pkg/github/repos/item_item_pulls_item_comments_request_builder.go b/pkg/github/repos/item_item_pulls_item_comments_request_builder.go new file mode 100644 index 0000000..6137490 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_comments_request_builder.go @@ -0,0 +1,123 @@ +package repos + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i5defbba0f3fc3df6d4d3983216a036c509822ca12cd373be6a7a1bb22fb0fc56 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/pulls/item/comments" +) + +// ItemItemPullsItemCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\comments +type ItemItemPullsItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsItemCommentsRequestBuilderGetQueryParameters lists all review comments for a specified pull request. By default, review commentsare in ascending order by ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsItemCommentsRequestBuilderGetQueryParameters struct { + // The direction to sort results. Ignored without `sort` parameter. + Direction *i5defbba0f3fc3df6d4d3983216a036c509822ca12cd373be6a7a1bb22fb0fc56.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // The property to sort the results by. + Sort *i5defbba0f3fc3df6d4d3983216a036c509822ca12cd373be6a7a1bb22fb0fc56.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pulls.item.comments.item collection +// returns a *ItemItemPullsItemCommentsWithComment_ItemRequestBuilder when successful +func (m *ItemItemPullsItemCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemItemPullsItemCommentsWithComment_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10) + return NewItemItemPullsItemCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsItemCommentsRequestBuilderInternal instantiates a new ItemItemPullsItemCommentsRequestBuilder and sets the default values. +func NewItemItemPullsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommentsRequestBuilder) { + m := &ItemItemPullsItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments{?direction*,page*,per_page*,since*,sort*}", pathParameters), + } + return m +} +// NewItemItemPullsItemCommentsRequestBuilder instantiates a new ItemItemPullsItemCommentsRequestBuilder and sets the default values. +func NewItemItemPullsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all review comments for a specified pull request. By default, review commentsare in ascending order by ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []PullRequestReviewCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#list-review-comments-on-a-pull-request +func (m *ItemItemPullsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable) + } + } + return val, nil +} +// Post creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewCommentable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/comments#create-a-review-comment-for-a-pull-request +func (m *ItemItemPullsItemCommentsRequestBuilder) Post(ctx context.Context, body ItemItemPullsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewCommentable), nil +} +// ToGetRequestInformation lists all review comments for a specified pull request. By default, review commentsare in ascending order by ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/enterprise-cloud@latest//rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemCommentsRequestBuilder when successful +func (m *ItemItemPullsItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemCommentsRequestBuilder) { + return NewItemItemPullsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_comments_with_comment_item_request_builder.go b/pkg/github/repos/item_item_pulls_item_comments_with_comment_item_request_builder.go new file mode 100644 index 0000000..9ab0a75 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_comments_with_comment_item_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemPullsItemCommentsWithComment_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\comments\{comment_id} +type ItemItemPullsItemCommentsWithComment_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemCommentsWithComment_ItemRequestBuilderInternal instantiates a new ItemItemPullsItemCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemPullsItemCommentsWithComment_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommentsWithComment_ItemRequestBuilder) { + m := &ItemItemPullsItemCommentsWithComment_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments/{comment_id}", pathParameters), + } + return m +} +// NewItemItemPullsItemCommentsWithComment_ItemRequestBuilder instantiates a new ItemItemPullsItemCommentsWithComment_ItemRequestBuilder and sets the default values. +func NewItemItemPullsItemCommentsWithComment_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommentsWithComment_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemCommentsWithComment_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Replies the replies property +// returns a *ItemItemPullsItemCommentsItemRepliesRequestBuilder when successful +func (m *ItemItemPullsItemCommentsWithComment_ItemRequestBuilder) Replies()(*ItemItemPullsItemCommentsItemRepliesRequestBuilder) { + return NewItemItemPullsItemCommentsItemRepliesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_pulls_item_commits_request_builder.go b/pkg/github/repos/item_item_pulls_item_commits_request_builder.go new file mode 100644 index 0000000..bbf8623 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_commits_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemCommitsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\commits +type ItemItemPullsItemCommitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsItemCommitsRequestBuilderGetQueryParameters lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsItemCommitsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemPullsItemCommitsRequestBuilderInternal instantiates a new ItemItemPullsItemCommitsRequestBuilder and sets the default values. +func NewItemItemPullsItemCommitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommitsRequestBuilder) { + m := &ItemItemPullsItemCommitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/commits{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemPullsItemCommitsRequestBuilder instantiates a new ItemItemPullsItemCommitsRequestBuilder and sets the default values. +func NewItemItemPullsItemCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemCommitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemCommitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []Commitable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-commits-on-a-pull-request +func (m *ItemItemPullsItemCommitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemCommitsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Commitable) + } + } + return val, nil +} +// ToGetRequestInformation lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemCommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemCommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemCommitsRequestBuilder when successful +func (m *ItemItemPullsItemCommitsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemCommitsRequestBuilder) { + return NewItemItemPullsItemCommitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_files_request_builder.go b/pkg/github/repos/item_item_pulls_item_files_request_builder.go new file mode 100644 index 0000000..1d75124 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_files_request_builder.go @@ -0,0 +1,75 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemFilesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\files +type ItemItemPullsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsItemFilesRequestBuilderGetQueryParameters lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsItemFilesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemPullsItemFilesRequestBuilderInternal instantiates a new ItemItemPullsItemFilesRequestBuilder and sets the default values. +func NewItemItemPullsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemFilesRequestBuilder) { + m := &ItemItemPullsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/files{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemPullsItemFilesRequestBuilder instantiates a new ItemItemPullsItemFilesRequestBuilder and sets the default values. +func NewItemItemPullsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []DiffEntryable when successful +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// returns a Files503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests-files +func (m *ItemItemPullsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemFilesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DiffEntryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFiles503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateDiffEntryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DiffEntryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.DiffEntryable) + } + } + return val, nil +} +// ToGetRequestInformation lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemFilesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemFilesRequestBuilder when successful +func (m *ItemItemPullsItemFilesRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemFilesRequestBuilder) { + return NewItemItemPullsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_merge_put_request_body.go b/pkg/github/repos/item_item_pulls_item_merge_put_request_body.go new file mode 100644 index 0000000..f1a9d48 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_merge_put_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemMergePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Extra detail to append to automatic commit message. + commit_message *string + // Title for the automatic commit message. + commit_title *string + // SHA that pull request head must match to allow merge. + sha *string +} +// NewItemItemPullsItemMergePutRequestBody instantiates a new ItemItemPullsItemMergePutRequestBody and sets the default values. +func NewItemItemPullsItemMergePutRequestBody()(*ItemItemPullsItemMergePutRequestBody) { + m := &ItemItemPullsItemMergePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemMergePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemMergePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemMergePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemMergePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCommitMessage gets the commit_message property value. Extra detail to append to automatic commit message. +// returns a *string when successful +func (m *ItemItemPullsItemMergePutRequestBody) GetCommitMessage()(*string) { + return m.commit_message +} +// GetCommitTitle gets the commit_title property value. Title for the automatic commit message. +// returns a *string when successful +func (m *ItemItemPullsItemMergePutRequestBody) GetCommitTitle()(*string) { + return m.commit_title +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemMergePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitMessage(val) + } + return nil + } + res["commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitTitle(val) + } + return nil + } + res["sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha(val) + } + return nil + } + return res +} +// GetSha gets the sha property value. SHA that pull request head must match to allow merge. +// returns a *string when successful +func (m *ItemItemPullsItemMergePutRequestBody) GetSha()(*string) { + return m.sha +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemMergePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("commit_message", m.GetCommitMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_title", m.GetCommitTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha", m.GetSha()) + 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 *ItemItemPullsItemMergePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCommitMessage sets the commit_message property value. Extra detail to append to automatic commit message. +func (m *ItemItemPullsItemMergePutRequestBody) SetCommitMessage(value *string)() { + m.commit_message = value +} +// SetCommitTitle sets the commit_title property value. Title for the automatic commit message. +func (m *ItemItemPullsItemMergePutRequestBody) SetCommitTitle(value *string)() { + m.commit_title = value +} +// SetSha sets the sha property value. SHA that pull request head must match to allow merge. +func (m *ItemItemPullsItemMergePutRequestBody) SetSha(value *string)() { + m.sha = value +} +type ItemItemPullsItemMergePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommitMessage()(*string) + GetCommitTitle()(*string) + GetSha()(*string) + SetCommitMessage(value *string)() + SetCommitTitle(value *string)() + SetSha(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_merge_request_builder.go b/pkg/github/repos/item_item_pulls_item_merge_request_builder.go new file mode 100644 index 0000000..863f32e --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_merge_request_builder.go @@ -0,0 +1,95 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemMergeRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\merge +type ItemItemPullsItemMergeRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemMergeRequestBuilderInternal instantiates a new ItemItemPullsItemMergeRequestBuilder and sets the default values. +func NewItemItemPullsItemMergeRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemMergeRequestBuilder) { + m := &ItemItemPullsItemMergeRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/merge", pathParameters), + } + return m +} +// NewItemItemPullsItemMergeRequestBuilder instantiates a new ItemItemPullsItemMergeRequestBuilder and sets the default values. +func NewItemItemPullsItemMergeRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemMergeRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemMergeRequestBuilderInternal(urlParams, requestAdapter) +} +// Get checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#check-if-a-pull-request-has-been-merged +func (m *ItemItemPullsItemMergeRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)." +// returns a PullRequestMergeResultable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ItemItemPullsItemPullRequestMergeResult405Error error when the service returns a 405 status code +// returns a ItemItemPullsItemPullRequestMergeResult409Error error when the service returns a 409 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#merge-a-pull-request +func (m *ItemItemPullsItemMergeRequestBuilder) Put(ctx context.Context, body ItemItemPullsItemMergePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestMergeResultable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "405": CreateItemItemPullsItemPullRequestMergeResult405ErrorFromDiscriminatorValue, + "409": CreateItemItemPullsItemPullRequestMergeResult409ErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestMergeResultFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestMergeResultable), nil +} +// ToGetRequestInformation checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemMergeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)." +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemMergeRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemPullsItemMergePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemMergeRequestBuilder when successful +func (m *ItemItemPullsItemMergeRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemMergeRequestBuilder) { + return NewItemItemPullsItemMergeRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_pull_request_merge_result405_error.go b/pkg/github/repos/item_item_pulls_item_pull_request_merge_result405_error.go new file mode 100644 index 0000000..81a2074 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_pull_request_merge_result405_error.go @@ -0,0 +1,117 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemPullRequestMergeResult405Error 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 +} +// NewItemItemPullsItemPullRequestMergeResult405Error instantiates a new ItemItemPullsItemPullRequestMergeResult405Error and sets the default values. +func NewItemItemPullsItemPullRequestMergeResult405Error()(*ItemItemPullsItemPullRequestMergeResult405Error) { + m := &ItemItemPullsItemPullRequestMergeResult405Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemPullRequestMergeResult405ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemPullRequestMergeResult405ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemPullRequestMergeResult405Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemItemPullsItemPullRequestMergeResult405Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemPullRequestMergeResult405Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemItemPullsItemPullRequestMergeResult405Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemPullRequestMergeResult405Error) 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 +// returns a *string when successful +func (m *ItemItemPullsItemPullRequestMergeResult405Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemPullRequestMergeResult405Error) 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 *ItemItemPullsItemPullRequestMergeResult405Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemItemPullsItemPullRequestMergeResult405Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemItemPullsItemPullRequestMergeResult405Error) SetMessage(value *string)() { + m.message = value +} +type ItemItemPullsItemPullRequestMergeResult405Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_pull_request_merge_result409_error.go b/pkg/github/repos/item_item_pulls_item_pull_request_merge_result409_error.go new file mode 100644 index 0000000..0ffb26f --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_pull_request_merge_result409_error.go @@ -0,0 +1,117 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemPullRequestMergeResult409Error 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 +} +// NewItemItemPullsItemPullRequestMergeResult409Error instantiates a new ItemItemPullsItemPullRequestMergeResult409Error and sets the default values. +func NewItemItemPullsItemPullRequestMergeResult409Error()(*ItemItemPullsItemPullRequestMergeResult409Error) { + m := &ItemItemPullsItemPullRequestMergeResult409Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemPullRequestMergeResult409ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemPullRequestMergeResult409ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemPullRequestMergeResult409Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemItemPullsItemPullRequestMergeResult409Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemPullRequestMergeResult409Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemItemPullsItemPullRequestMergeResult409Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemPullRequestMergeResult409Error) 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 +// returns a *string when successful +func (m *ItemItemPullsItemPullRequestMergeResult409Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemPullRequestMergeResult409Error) 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 *ItemItemPullsItemPullRequestMergeResult409Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemItemPullsItemPullRequestMergeResult409Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemItemPullsItemPullRequestMergeResult409Error) SetMessage(value *string)() { + m.message = value +} +type ItemItemPullsItemPullRequestMergeResult409Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_requested_reviewers_delete_request_body.go b/pkg/github/repos/item_item_pulls_item_requested_reviewers_delete_request_body.go new file mode 100644 index 0000000..c463cd1 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_requested_reviewers_delete_request_body.go @@ -0,0 +1,121 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemRequested_reviewersDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of user `login`s that will be removed. + reviewers []string + // An array of team `slug`s that will be removed. + team_reviewers []string +} +// NewItemItemPullsItemRequested_reviewersDeleteRequestBody instantiates a new ItemItemPullsItemRequested_reviewersDeleteRequestBody and sets the default values. +func NewItemItemPullsItemRequested_reviewersDeleteRequestBody()(*ItemItemPullsItemRequested_reviewersDeleteRequestBody) { + m := &ItemItemPullsItemRequested_reviewersDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemRequested_reviewersDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemRequested_reviewersDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemRequested_reviewersDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetReviewers(res) + } + return nil + } + res["team_reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeamReviewers(res) + } + return nil + } + return res +} +// GetReviewers gets the reviewers property value. An array of user `login`s that will be removed. +// returns a []string when successful +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) GetReviewers()([]string) { + return m.reviewers +} +// GetTeamReviewers gets the team_reviewers property value. An array of team `slug`s that will be removed. +// returns a []string when successful +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) GetTeamReviewers()([]string) { + return m.team_reviewers +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetReviewers() != nil { + err := writer.WriteCollectionOfStringValues("reviewers", m.GetReviewers()) + if err != nil { + return err + } + } + if m.GetTeamReviewers() != nil { + err := writer.WriteCollectionOfStringValues("team_reviewers", m.GetTeamReviewers()) + 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 *ItemItemPullsItemRequested_reviewersDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReviewers sets the reviewers property value. An array of user `login`s that will be removed. +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) SetReviewers(value []string)() { + m.reviewers = value +} +// SetTeamReviewers sets the team_reviewers property value. An array of team `slug`s that will be removed. +func (m *ItemItemPullsItemRequested_reviewersDeleteRequestBody) SetTeamReviewers(value []string)() { + m.team_reviewers = value +} +type ItemItemPullsItemRequested_reviewersDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReviewers()([]string) + GetTeamReviewers()([]string) + SetReviewers(value []string)() + SetTeamReviewers(value []string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_requested_reviewers_post_request_body.go b/pkg/github/repos/item_item_pulls_item_requested_reviewers_post_request_body.go new file mode 100644 index 0000000..878559f --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_requested_reviewers_post_request_body.go @@ -0,0 +1,121 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemRequested_reviewersPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of user `login`s that will be requested. + reviewers []string + // An array of team `slug`s that will be requested. + team_reviewers []string +} +// NewItemItemPullsItemRequested_reviewersPostRequestBody instantiates a new ItemItemPullsItemRequested_reviewersPostRequestBody and sets the default values. +func NewItemItemPullsItemRequested_reviewersPostRequestBody()(*ItemItemPullsItemRequested_reviewersPostRequestBody) { + m := &ItemItemPullsItemRequested_reviewersPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemRequested_reviewersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemRequested_reviewersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemRequested_reviewersPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetReviewers(res) + } + return nil + } + res["team_reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetTeamReviewers(res) + } + return nil + } + return res +} +// GetReviewers gets the reviewers property value. An array of user `login`s that will be requested. +// returns a []string when successful +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) GetReviewers()([]string) { + return m.reviewers +} +// GetTeamReviewers gets the team_reviewers property value. An array of team `slug`s that will be requested. +// returns a []string when successful +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) GetTeamReviewers()([]string) { + return m.team_reviewers +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetReviewers() != nil { + err := writer.WriteCollectionOfStringValues("reviewers", m.GetReviewers()) + if err != nil { + return err + } + } + if m.GetTeamReviewers() != nil { + err := writer.WriteCollectionOfStringValues("team_reviewers", m.GetTeamReviewers()) + 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 *ItemItemPullsItemRequested_reviewersPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReviewers sets the reviewers property value. An array of user `login`s that will be requested. +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) SetReviewers(value []string)() { + m.reviewers = value +} +// SetTeamReviewers sets the team_reviewers property value. An array of team `slug`s that will be requested. +func (m *ItemItemPullsItemRequested_reviewersPostRequestBody) SetTeamReviewers(value []string)() { + m.team_reviewers = value +} +type ItemItemPullsItemRequested_reviewersPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReviewers()([]string) + GetTeamReviewers()([]string) + SetReviewers(value []string)() + SetTeamReviewers(value []string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go b/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go new file mode 100644 index 0000000..2a3a612 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go @@ -0,0 +1,127 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemRequested_reviewersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\requested_reviewers +type ItemItemPullsItemRequested_reviewersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemRequested_reviewersRequestBuilderInternal instantiates a new ItemItemPullsItemRequested_reviewersRequestBuilder and sets the default values. +func NewItemItemPullsItemRequested_reviewersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemRequested_reviewersRequestBuilder) { + m := &ItemItemPullsItemRequested_reviewersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/requested_reviewers", pathParameters), + } + return m +} +// NewItemItemPullsItemRequested_reviewersRequestBuilder instantiates a new ItemItemPullsItemRequested_reviewersRequestBuilder and sets the default values. +func NewItemItemPullsItemRequested_reviewersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemRequested_reviewersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemRequested_reviewersRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes review requests from a pull request for a given set of users and/or teams. +// returns a PullRequestSimpleable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/review-requests#remove-requested-reviewers-from-a-pull-request +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) Delete(ctx context.Context, body ItemItemPullsItemRequested_reviewersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable), nil +} +// Get gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#list-reviews-for-a-pull-request) operation. +// returns a PullRequestReviewRequestable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/review-requests#get-all-requested-reviewers-for-a-pull-request +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewRequestable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewRequestFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewRequestable), nil +} +// Post requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)." +// returns a PullRequestSimpleable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/review-requests#request-reviewers-for-a-pull-request +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) Post(ctx context.Context, body ItemItemPullsItemRequested_reviewersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable), nil +} +// ToDeleteRequestInformation removes review requests from a pull request for a given set of users and/or teams. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemPullsItemRequested_reviewersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#list-reviews-for-a-pull-request) operation. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)." +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemRequested_reviewersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemRequested_reviewersRequestBuilder when successful +func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemRequested_reviewersRequestBuilder) { + return NewItemItemPullsItemRequested_reviewersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_item_comments_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_item_comments_request_builder.go new file mode 100644 index 0000000..a02624b --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_item_comments_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemReviewsItemCommentsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id}\comments +type ItemItemPullsItemReviewsItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsItemReviewsItemCommentsRequestBuilderGetQueryParameters lists comments for a specific pull request review.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsItemReviewsItemCommentsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemPullsItemReviewsItemCommentsRequestBuilderInternal instantiates a new ItemItemPullsItemReviewsItemCommentsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsItemCommentsRequestBuilder) { + m := &ItemItemPullsItemReviewsItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/comments{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemPullsItemReviewsItemCommentsRequestBuilder instantiates a new ItemItemPullsItemReviewsItemCommentsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemReviewsItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists comments for a specific pull request review.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []ReviewCommentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#list-comments-for-a-pull-request-review +func (m *ItemItemPullsItemReviewsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemReviewsItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReviewCommentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReviewCommentable) + } + } + return val, nil +} +// ToGetRequestInformation lists comments for a specific pull request review.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemReviewsItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemReviewsItemCommentsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemReviewsItemCommentsRequestBuilder) { + return NewItemItemPullsItemReviewsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_item_dismissals_put_request_body.go b/pkg/github/repos/item_item_pulls_item_reviews_item_dismissals_put_request_body.go new file mode 100644 index 0000000..729c18a --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_item_dismissals_put_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemReviewsItemDismissalsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message for the pull request review dismissal + message *string +} +// NewItemItemPullsItemReviewsItemDismissalsPutRequestBody instantiates a new ItemItemPullsItemReviewsItemDismissalsPutRequestBody and sets the default values. +func NewItemItemPullsItemReviewsItemDismissalsPutRequestBody()(*ItemItemPullsItemReviewsItemDismissalsPutRequestBody) { + m := &ItemItemPullsItemReviewsItemDismissalsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemReviewsItemDismissalsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemReviewsItemDismissalsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemReviewsItemDismissalsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemReviewsItemDismissalsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemReviewsItemDismissalsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 for the pull request review dismissal +// returns a *string when successful +func (m *ItemItemPullsItemReviewsItemDismissalsPutRequestBody) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemReviewsItemDismissalsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemItemPullsItemReviewsItemDismissalsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message for the pull request review dismissal +func (m *ItemItemPullsItemReviewsItemDismissalsPutRequestBody) SetMessage(value *string)() { + m.message = value +} +type ItemItemPullsItemReviewsItemDismissalsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + SetMessage(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_item_dismissals_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_item_dismissals_request_builder.go new file mode 100644 index 0000000..2820859 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_item_dismissals_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemReviewsItemDismissalsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id}\dismissals +type ItemItemPullsItemReviewsItemDismissalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemReviewsItemDismissalsRequestBuilderInternal instantiates a new ItemItemPullsItemReviewsItemDismissalsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsItemDismissalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsItemDismissalsRequestBuilder) { + m := &ItemItemPullsItemReviewsItemDismissalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/dismissals", pathParameters), + } + return m +} +// NewItemItemPullsItemReviewsItemDismissalsRequestBuilder instantiates a new ItemItemPullsItemReviewsItemDismissalsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsItemDismissalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsItemDismissalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemReviewsItemDismissalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Put dismisses a specified review on a pull request.**Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection),you must be a repository administrator or be included in the list of people or teamswho can dismiss pull request reviews.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#dismiss-a-review-for-a-pull-request +func (m *ItemItemPullsItemReviewsItemDismissalsRequestBuilder) Put(ctx context.Context, body ItemItemPullsItemReviewsItemDismissalsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable), nil +} +// ToPutRequestInformation dismisses a specified review on a pull request.**Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-cloud@latest//rest/branches/branch-protection),you must be a repository administrator or be included in the list of people or teamswho can dismiss pull request reviews.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsItemDismissalsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemPullsItemReviewsItemDismissalsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemReviewsItemDismissalsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsItemDismissalsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemReviewsItemDismissalsRequestBuilder) { + return NewItemItemPullsItemReviewsItemDismissalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_item_events_post_request_body.go b/pkg/github/repos/item_item_pulls_item_reviews_item_events_post_request_body.go new file mode 100644 index 0000000..fb65079 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_item_events_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemReviewsItemEventsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The body text of the pull request review + body *string +} +// NewItemItemPullsItemReviewsItemEventsPostRequestBody instantiates a new ItemItemPullsItemReviewsItemEventsPostRequestBody and sets the default values. +func NewItemItemPullsItemReviewsItemEventsPostRequestBody()(*ItemItemPullsItemReviewsItemEventsPostRequestBody) { + m := &ItemItemPullsItemReviewsItemEventsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemReviewsItemEventsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemReviewsItemEventsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemReviewsItemEventsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemReviewsItemEventsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The body text of the pull request review +// returns a *string when successful +func (m *ItemItemPullsItemReviewsItemEventsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemReviewsItemEventsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemReviewsItemEventsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemPullsItemReviewsItemEventsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The body text of the pull request review +func (m *ItemItemPullsItemReviewsItemEventsPostRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemPullsItemReviewsItemEventsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_item_events_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_item_events_request_builder.go new file mode 100644 index 0000000..d3344ff --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_item_events_request_builder.go @@ -0,0 +1,69 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemReviewsItemEventsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id}\events +type ItemItemPullsItemReviewsItemEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemReviewsItemEventsRequestBuilderInternal instantiates a new ItemItemPullsItemReviewsItemEventsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsItemEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsItemEventsRequestBuilder) { + m := &ItemItemPullsItemReviewsItemEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/events", pathParameters), + } + return m +} +// NewItemItemPullsItemReviewsItemEventsRequestBuilder instantiates a new ItemItemPullsItemReviewsItemEventsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsItemEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemReviewsItemEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#create-a-review-for-a-pull-request)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#submit-a-review-for-a-pull-request +func (m *ItemItemPullsItemReviewsItemEventsRequestBuilder) Post(ctx context.Context, body ItemItemPullsItemReviewsItemEventsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable), nil +} +// ToPostRequestInformation submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#create-a-review-for-a-pull-request)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsItemEventsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemReviewsItemEventsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemReviewsItemEventsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsItemEventsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemReviewsItemEventsRequestBuilder) { + return NewItemItemPullsItemReviewsItemEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_item_with_review_put_request_body.go b/pkg/github/repos/item_item_pulls_item_reviews_item_with_review_put_request_body.go new file mode 100644 index 0000000..455fee4 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_item_with_review_put_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemReviewsItemWithReview_PutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The body text of the pull request review. + body *string +} +// NewItemItemPullsItemReviewsItemWithReview_PutRequestBody instantiates a new ItemItemPullsItemReviewsItemWithReview_PutRequestBody and sets the default values. +func NewItemItemPullsItemReviewsItemWithReview_PutRequestBody()(*ItemItemPullsItemReviewsItemWithReview_PutRequestBody) { + m := &ItemItemPullsItemReviewsItemWithReview_PutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemReviewsItemWithReview_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemReviewsItemWithReview_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemReviewsItemWithReview_PutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemReviewsItemWithReview_PutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The body text of the pull request review. +// returns a *string when successful +func (m *ItemItemPullsItemReviewsItemWithReview_PutRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemReviewsItemWithReview_PutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemReviewsItemWithReview_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemItemPullsItemReviewsItemWithReview_PutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The body text of the pull request review. +func (m *ItemItemPullsItemReviewsItemWithReview_PutRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemItemPullsItemReviewsItemWithReview_PutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_post_request_body.go b/pkg/github/repos/item_item_pulls_item_reviews_post_request_body.go new file mode 100644 index 0000000..0f0449b --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_post_request_body.go @@ -0,0 +1,150 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemReviewsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + body *string + // Use the following table to specify the location, destination, and contents of the draft review comment. + comments []ItemItemPullsItemReviewsPostRequestBody_commentsable + // The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + commit_id *string +} +// NewItemItemPullsItemReviewsPostRequestBody instantiates a new ItemItemPullsItemReviewsPostRequestBody and sets the default values. +func NewItemItemPullsItemReviewsPostRequestBody()(*ItemItemPullsItemReviewsPostRequestBody) { + m := &ItemItemPullsItemReviewsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemReviewsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemReviewsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemReviewsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemReviewsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. +// returns a *string when successful +func (m *ItemItemPullsItemReviewsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetComments gets the comments property value. Use the following table to specify the location, destination, and contents of the draft review comment. +// returns a []ItemItemPullsItemReviewsPostRequestBody_commentsable when successful +func (m *ItemItemPullsItemReviewsPostRequestBody) GetComments()([]ItemItemPullsItemReviewsPostRequestBody_commentsable) { + return m.comments +} +// GetCommitId gets the commit_id property value. The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. +// returns a *string when successful +func (m *ItemItemPullsItemReviewsPostRequestBody) GetCommitId()(*string) { + return m.commit_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemReviewsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemPullsItemReviewsPostRequestBody_commentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemPullsItemReviewsPostRequestBody_commentsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemPullsItemReviewsPostRequestBody_commentsable) + } + } + m.SetComments(res) + } + return nil + } + res["commit_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommitId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemReviewsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commit_id", m.GetCommitId()) + 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 *ItemItemPullsItemReviewsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. +func (m *ItemItemPullsItemReviewsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetComments sets the comments property value. Use the following table to specify the location, destination, and contents of the draft review comment. +func (m *ItemItemPullsItemReviewsPostRequestBody) SetComments(value []ItemItemPullsItemReviewsPostRequestBody_commentsable)() { + m.comments = value +} +// SetCommitId sets the commit_id property value. The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. +func (m *ItemItemPullsItemReviewsPostRequestBody) SetCommitId(value *string)() { + m.commit_id = value +} +type ItemItemPullsItemReviewsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetComments()([]ItemItemPullsItemReviewsPostRequestBody_commentsable) + GetCommitId()(*string) + SetBody(value *string)() + SetComments(value []ItemItemPullsItemReviewsPostRequestBody_commentsable)() + SetCommitId(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_post_request_body_comments.go b/pkg/github/repos/item_item_pulls_item_reviews_post_request_body_comments.go new file mode 100644 index 0000000..23a8e03 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_post_request_body_comments.go @@ -0,0 +1,254 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemReviewsPostRequestBody_comments struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Text of the review comment. + body *string + // The line property + line *int32 + // The relative path to the file that necessitates a review comment. + path *string + // The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + position *int32 + // The side property + side *string + // The start_line property + start_line *int32 + // The start_side property + start_side *string +} +// NewItemItemPullsItemReviewsPostRequestBody_comments instantiates a new ItemItemPullsItemReviewsPostRequestBody_comments and sets the default values. +func NewItemItemPullsItemReviewsPostRequestBody_comments()(*ItemItemPullsItemReviewsPostRequestBody_comments) { + m := &ItemItemPullsItemReviewsPostRequestBody_comments{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemReviewsPostRequestBody_commentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemReviewsPostRequestBody_commentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemReviewsPostRequestBody_comments(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. Text of the review comment. +// returns a *string when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLine(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + res["side"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSide(val) + } + return nil + } + res["start_line"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartLine(val) + } + return nil + } + res["start_side"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStartSide(val) + } + return nil + } + return res +} +// GetLine gets the line property value. The line property +// returns a *int32 when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetLine()(*int32) { + return m.line +} +// GetPath gets the path property value. The relative path to the file that necessitates a review comment. +// returns a *string when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetPath()(*string) { + return m.path +} +// GetPosition gets the position property value. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. +// returns a *int32 when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetPosition()(*int32) { + return m.position +} +// GetSide gets the side property value. The side property +// returns a *string when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetSide()(*string) { + return m.side +} +// GetStartLine gets the start_line property value. The start_line property +// returns a *int32 when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetStartLine()(*int32) { + return m.start_line +} +// GetStartSide gets the start_side property value. The start_side property +// returns a *string when successful +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) GetStartSide()(*string) { + return m.start_side +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("line", m.GetLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("side", m.GetSide()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("start_line", m.GetStartLine()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("start_side", m.GetStartSide()) + 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 *ItemItemPullsItemReviewsPostRequestBody_comments) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. Text of the review comment. +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetBody(value *string)() { + m.body = value +} +// SetLine sets the line property value. The line property +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetLine(value *int32)() { + m.line = value +} +// SetPath sets the path property value. The relative path to the file that necessitates a review comment. +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetPath(value *string)() { + m.path = value +} +// SetPosition sets the position property value. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetPosition(value *int32)() { + m.position = value +} +// SetSide sets the side property value. The side property +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetSide(value *string)() { + m.side = value +} +// SetStartLine sets the start_line property value. The start_line property +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetStartLine(value *int32)() { + m.start_line = value +} +// SetStartSide sets the start_side property value. The start_side property +func (m *ItemItemPullsItemReviewsPostRequestBody_comments) SetStartSide(value *string)() { + m.start_side = value +} +type ItemItemPullsItemReviewsPostRequestBody_commentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetLine()(*int32) + GetPath()(*string) + GetPosition()(*int32) + GetSide()(*string) + GetStartLine()(*int32) + GetStartSide()(*string) + SetBody(value *string)() + SetLine(value *int32)() + SetPath(value *string)() + SetPosition(value *int32)() + SetSide(value *string)() + SetStartLine(value *int32)() + SetStartSide(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go new file mode 100644 index 0000000..6b64c5f --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go @@ -0,0 +1,115 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemReviewsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews +type ItemItemPullsItemReviewsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsItemReviewsRequestBuilderGetQueryParameters lists all reviews for a specified pull request. The list of reviews returns in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsItemReviewsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReview_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pulls.item.reviews.item collection +// returns a *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder when successful +func (m *ItemItemPullsItemReviewsRequestBuilder) ByReview_id(review_id int32)(*ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["review_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(review_id), 10) + return NewItemItemPullsItemReviewsWithReview_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsItemReviewsRequestBuilderInternal instantiates a new ItemItemPullsItemReviewsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsRequestBuilder) { + m := &ItemItemPullsItemReviewsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemPullsItemReviewsRequestBuilder instantiates a new ItemItemPullsItemReviewsRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemReviewsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all reviews for a specified pull request. The list of reviews returns in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []PullRequestReviewable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#list-reviews-for-a-pull-request +func (m *ItemItemPullsItemReviewsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemReviewsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable) + } + } + return val, nil +} +// Post creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#create-a-review-for-a-pull-request +func (m *ItemItemPullsItemReviewsRequestBuilder) Post(ctx context.Context, body ItemItemPullsItemReviewsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable), nil +} +// ToGetRequestInformation lists all reviews for a specified pull request. The list of reviews returns in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemReviewsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemReviewsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemReviewsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemReviewsRequestBuilder) { + return NewItemItemPullsItemReviewsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_reviews_with_review_item_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_with_review_item_request_builder.go new file mode 100644 index 0000000..0f2ce56 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_reviews_with_review_item_request_builder.go @@ -0,0 +1,144 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemReviewsWithReview_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id} +type ItemItemPullsItemReviewsWithReview_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Comments the comments property +// returns a *ItemItemPullsItemReviewsItemCommentsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) Comments()(*ItemItemPullsItemReviewsItemCommentsRequestBuilder) { + return NewItemItemPullsItemReviewsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsItemReviewsWithReview_ItemRequestBuilderInternal instantiates a new ItemItemPullsItemReviewsWithReview_ItemRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsWithReview_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) { + m := &ItemItemPullsItemReviewsWithReview_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}", pathParameters), + } + return m +} +// NewItemItemPullsItemReviewsWithReview_ItemRequestBuilder instantiates a new ItemItemPullsItemReviewsWithReview_ItemRequestBuilder and sets the default values. +func NewItemItemPullsItemReviewsWithReview_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemReviewsWithReview_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#delete-a-pending-review-for-a-pull-request +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable), nil +} +// Dismissals the dismissals property +// returns a *ItemItemPullsItemReviewsItemDismissalsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) Dismissals()(*ItemItemPullsItemReviewsItemDismissalsRequestBuilder) { + return NewItemItemPullsItemReviewsItemDismissalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Events the events property +// returns a *ItemItemPullsItemReviewsItemEventsRequestBuilder when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) Events()(*ItemItemPullsItemReviewsItemEventsRequestBuilder) { + return NewItemItemPullsItemReviewsItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get retrieves a pull request review by its ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#get-a-review-for-a-pull-request +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable), nil +} +// Put updates the contents of a specified review summary comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestReviewable when successful +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/reviews#update-a-review-for-a-pull-request +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) Put(ctx context.Context, body ItemItemPullsItemReviewsItemWithReview_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestReviewFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestReviewable), nil +} +// ToDeleteRequestInformation deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation retrieves a pull request review by its ID.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation updates the contents of a specified review summary comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemPullsItemReviewsItemWithReview_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder when successful +func (m *ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemReviewsWithReview_ItemRequestBuilder) { + return NewItemItemPullsItemReviewsWithReview_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_update_branch_put_request_body.go b/pkg/github/repos/item_item_pulls_item_update_branch_put_request_body.go new file mode 100644 index 0000000..6c630f4 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_update_branch_put_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemUpdateBranchPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. + expected_head_sha *string +} +// NewItemItemPullsItemUpdateBranchPutRequestBody instantiates a new ItemItemPullsItemUpdateBranchPutRequestBody and sets the default values. +func NewItemItemPullsItemUpdateBranchPutRequestBody()(*ItemItemPullsItemUpdateBranchPutRequestBody) { + m := &ItemItemPullsItemUpdateBranchPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemUpdateBranchPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemUpdateBranchPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemUpdateBranchPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemUpdateBranchPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpectedHeadSha gets the expected_head_sha property value. The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. +// returns a *string when successful +func (m *ItemItemPullsItemUpdateBranchPutRequestBody) GetExpectedHeadSha()(*string) { + return m.expected_head_sha +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemUpdateBranchPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expected_head_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExpectedHeadSha(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemUpdateBranchPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("expected_head_sha", m.GetExpectedHeadSha()) + 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 *ItemItemPullsItemUpdateBranchPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpectedHeadSha sets the expected_head_sha property value. The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-cloud@latest//rest/commits/commits#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. +func (m *ItemItemPullsItemUpdateBranchPutRequestBody) SetExpectedHeadSha(value *string)() { + m.expected_head_sha = value +} +type ItemItemPullsItemUpdateBranchPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpectedHeadSha()(*string) + SetExpectedHeadSha(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_update_branch_put_response.go b/pkg/github/repos/item_item_pulls_item_update_branch_put_response.go new file mode 100644 index 0000000..56409bc --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_update_branch_put_response.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemUpdateBranchPutResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The message property + message *string + // The url property + url *string +} +// NewItemItemPullsItemUpdateBranchPutResponse instantiates a new ItemItemPullsItemUpdateBranchPutResponse and sets the default values. +func NewItemItemPullsItemUpdateBranchPutResponse()(*ItemItemPullsItemUpdateBranchPutResponse) { + m := &ItemItemPullsItemUpdateBranchPutResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemUpdateBranchPutResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemUpdateBranchPutResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemUpdateBranchPutResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemUpdateBranchPutResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemUpdateBranchPutResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *ItemItemPullsItemUpdateBranchPutResponse) GetMessage()(*string) { + return m.message +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *ItemItemPullsItemUpdateBranchPutResponse) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemUpdateBranchPutResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemPullsItemUpdateBranchPutResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *ItemItemPullsItemUpdateBranchPutResponse) SetMessage(value *string)() { + m.message = value +} +// SetUrl sets the url property value. The url property +func (m *ItemItemPullsItemUpdateBranchPutResponse) SetUrl(value *string)() { + m.url = value +} +type ItemItemPullsItemUpdateBranchPutResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetUrl()(*string) + SetMessage(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_item_update_branch_request_builder.go b/pkg/github/repos/item_item_pulls_item_update_branch_request_builder.go new file mode 100644 index 0000000..902f3f4 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_update_branch_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsItemUpdateBranchRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\update-branch +type ItemItemPullsItemUpdateBranchRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemPullsItemUpdateBranchRequestBuilderInternal instantiates a new ItemItemPullsItemUpdateBranchRequestBuilder and sets the default values. +func NewItemItemPullsItemUpdateBranchRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemUpdateBranchRequestBuilder) { + m := &ItemItemPullsItemUpdateBranchRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/update-branch", pathParameters), + } + return m +} +// NewItemItemPullsItemUpdateBranchRequestBuilder instantiates a new ItemItemPullsItemUpdateBranchRequestBuilder and sets the default values. +func NewItemItemPullsItemUpdateBranchRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsItemUpdateBranchRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsItemUpdateBranchRequestBuilderInternal(urlParams, requestAdapter) +} +// Put updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. +// returns a ItemItemPullsItemUpdateBranchPutResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#update-a-pull-request-branch +func (m *ItemItemPullsItemUpdateBranchRequestBuilder) Put(ctx context.Context, body ItemItemPullsItemUpdateBranchPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemPullsItemUpdateBranchPutResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemPullsItemUpdateBranchPutResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemPullsItemUpdateBranchPutResponseable), nil +} +// ToPutRequestInformation updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. +// returns a *RequestInformation when successful +func (m *ItemItemPullsItemUpdateBranchRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemPullsItemUpdateBranchPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsItemUpdateBranchRequestBuilder when successful +func (m *ItemItemPullsItemUpdateBranchRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsItemUpdateBranchRequestBuilder) { + return NewItemItemPullsItemUpdateBranchRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_item_with_pull_number_patch_request_body.go b/pkg/github/repos/item_item_pulls_item_with_pull_number_patch_request_body.go new file mode 100644 index 0000000..94357f2 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_item_with_pull_number_patch_request_body.go @@ -0,0 +1,167 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsItemWithPull_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + base *string + // The contents of the pull request. + body *string + // Indicates whether [maintainers can modify](https://docs.github.com/enterprise-cloud@latest//articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + maintainer_can_modify *bool + // The title of the pull request. + title *string +} +// NewItemItemPullsItemWithPull_numberPatchRequestBody instantiates a new ItemItemPullsItemWithPull_numberPatchRequestBody and sets the default values. +func NewItemItemPullsItemWithPull_numberPatchRequestBody()(*ItemItemPullsItemWithPull_numberPatchRequestBody) { + m := &ItemItemPullsItemWithPull_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsItemWithPull_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsItemWithPull_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsItemWithPull_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBase gets the base property value. The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. +// returns a *string when successful +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) GetBase()(*string) { + return m.base +} +// GetBody gets the body property value. The contents of the pull request. +// returns a *string when successful +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBase(val) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["maintainer_can_modify"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintainerCanModify(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetMaintainerCanModify gets the maintainer_can_modify property value. Indicates whether [maintainers can modify](https://docs.github.com/enterprise-cloud@latest//articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. +// returns a *bool when successful +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) GetMaintainerCanModify()(*bool) { + return m.maintainer_can_modify +} +// GetTitle gets the title property value. The title of the pull request. +// returns a *string when successful +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("base", m.GetBase()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintainer_can_modify", m.GetMaintainerCanModify()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemItemPullsItemWithPull_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBase sets the base property value. The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) SetBase(value *string)() { + m.base = value +} +// SetBody sets the body property value. The contents of the pull request. +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) SetBody(value *string)() { + m.body = value +} +// SetMaintainerCanModify sets the maintainer_can_modify property value. Indicates whether [maintainers can modify](https://docs.github.com/enterprise-cloud@latest//articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) SetMaintainerCanModify(value *bool)() { + m.maintainer_can_modify = value +} +// SetTitle sets the title property value. The title of the pull request. +func (m *ItemItemPullsItemWithPull_numberPatchRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemItemPullsItemWithPull_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBase()(*string) + GetBody()(*string) + GetMaintainerCanModify()(*bool) + GetTitle()(*string) + SetBase(value *string)() + SetBody(value *string)() + SetMaintainerCanModify(value *bool)() + SetTitle(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_post_request_body.go b/pkg/github/repos/item_item_pulls_post_request_body.go new file mode 100644 index 0000000..44fbde8 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_post_request_body.go @@ -0,0 +1,283 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemPullsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. + base *string + // The contents of the pull request. + body *string + // Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/enterprise-cloud@latest//articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + draft *bool + // The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. + head *string + // The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization. + head_repo *string + // An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + issue *int64 + // Indicates whether [maintainers can modify](https://docs.github.com/enterprise-cloud@latest//articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + maintainer_can_modify *bool + // The title of the new pull request. Required unless `issue` is specified. + title *string +} +// NewItemItemPullsPostRequestBody instantiates a new ItemItemPullsPostRequestBody and sets the default values. +func NewItemItemPullsPostRequestBody()(*ItemItemPullsPostRequestBody) { + m := &ItemItemPullsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemPullsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemPullsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemPullsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemPullsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBase gets the base property value. The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. +// returns a *string when successful +func (m *ItemItemPullsPostRequestBody) GetBase()(*string) { + return m.base +} +// GetBody gets the body property value. The contents of the pull request. +// returns a *string when successful +func (m *ItemItemPullsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetDraft gets the draft property value. Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/enterprise-cloud@latest//articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. +// returns a *bool when successful +func (m *ItemItemPullsPostRequestBody) GetDraft()(*bool) { + return m.draft +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemPullsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBase(val) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["head"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHead(val) + } + return nil + } + res["head_repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeadRepo(val) + } + return nil + } + res["issue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIssue(val) + } + return nil + } + res["maintainer_can_modify"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintainerCanModify(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetHead gets the head property value. The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. +// returns a *string when successful +func (m *ItemItemPullsPostRequestBody) GetHead()(*string) { + return m.head +} +// GetHeadRepo gets the head_repo property value. The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization. +// returns a *string when successful +func (m *ItemItemPullsPostRequestBody) GetHeadRepo()(*string) { + return m.head_repo +} +// GetIssue gets the issue property value. An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. +// returns a *int64 when successful +func (m *ItemItemPullsPostRequestBody) GetIssue()(*int64) { + return m.issue +} +// GetMaintainerCanModify gets the maintainer_can_modify property value. Indicates whether [maintainers can modify](https://docs.github.com/enterprise-cloud@latest//articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. +// returns a *bool when successful +func (m *ItemItemPullsPostRequestBody) GetMaintainerCanModify()(*bool) { + return m.maintainer_can_modify +} +// GetTitle gets the title property value. The title of the new pull request. Required unless `issue` is specified. +// returns a *string when successful +func (m *ItemItemPullsPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemItemPullsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("base", m.GetBase()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head", m.GetHead()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("head_repo", m.GetHeadRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("issue", m.GetIssue()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintainer_can_modify", m.GetMaintainerCanModify()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemItemPullsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBase sets the base property value. The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. +func (m *ItemItemPullsPostRequestBody) SetBase(value *string)() { + m.base = value +} +// SetBody sets the body property value. The contents of the pull request. +func (m *ItemItemPullsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetDraft sets the draft property value. Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/enterprise-cloud@latest//articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. +func (m *ItemItemPullsPostRequestBody) SetDraft(value *bool)() { + m.draft = value +} +// SetHead sets the head property value. The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. +func (m *ItemItemPullsPostRequestBody) SetHead(value *string)() { + m.head = value +} +// SetHeadRepo sets the head_repo property value. The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization. +func (m *ItemItemPullsPostRequestBody) SetHeadRepo(value *string)() { + m.head_repo = value +} +// SetIssue sets the issue property value. An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. +func (m *ItemItemPullsPostRequestBody) SetIssue(value *int64)() { + m.issue = value +} +// SetMaintainerCanModify sets the maintainer_can_modify property value. Indicates whether [maintainers can modify](https://docs.github.com/enterprise-cloud@latest//articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. +func (m *ItemItemPullsPostRequestBody) SetMaintainerCanModify(value *bool)() { + m.maintainer_can_modify = value +} +// SetTitle sets the title property value. The title of the new pull request. Required unless `issue` is specified. +func (m *ItemItemPullsPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemItemPullsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBase()(*string) + GetBody()(*string) + GetDraft()(*bool) + GetHead()(*string) + GetHeadRepo()(*string) + GetIssue()(*int64) + GetMaintainerCanModify()(*bool) + GetTitle()(*string) + SetBase(value *string)() + SetBody(value *string)() + SetDraft(value *bool)() + SetHead(value *string)() + SetHeadRepo(value *string)() + SetIssue(value *int64)() + SetMaintainerCanModify(value *bool)() + SetTitle(value *string)() +} diff --git a/pkg/github/repos/item_item_pulls_request_builder.go b/pkg/github/repos/item_item_pulls_request_builder.go new file mode 100644 index 0000000..daa4c54 --- /dev/null +++ b/pkg/github/repos/item_item_pulls_request_builder.go @@ -0,0 +1,135 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i776de166eff3f73b81126ffda958b4440483f3b3d5b1610f180bdd962dda86b3 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/pulls" +) + +// ItemItemPullsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls +type ItemItemPullsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemPullsRequestBuilderGetQueryParameters lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemPullsRequestBuilderGetQueryParameters struct { + // Filter pulls by base branch name. Example: `gh-pages`. + Base *string `uriparametername:"base"` + // The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + Direction *i776de166eff3f73b81126ffda958b4440483f3b3d5b1610f180bdd962dda86b3.GetDirectionQueryParameterType `uriparametername:"direction"` + // Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. + Head *string `uriparametername:"head"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. + Sort *i776de166eff3f73b81126ffda958b4440483f3b3d5b1610f180bdd962dda86b3.GetSortQueryParameterType `uriparametername:"sort"` + // Either `open`, `closed`, or `all` to filter by state. + State *i776de166eff3f73b81126ffda958b4440483f3b3d5b1610f180bdd962dda86b3.GetStateQueryParameterType `uriparametername:"state"` +} +// ByPull_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.pulls.item collection +// returns a *ItemItemPullsWithPull_numberItemRequestBuilder when successful +func (m *ItemItemPullsRequestBuilder) ByPull_number(pull_number int32)(*ItemItemPullsWithPull_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["pull_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(pull_number), 10) + return NewItemItemPullsWithPull_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemItemPullsCommentsRequestBuilder when successful +func (m *ItemItemPullsRequestBuilder) Comments()(*ItemItemPullsCommentsRequestBuilder) { + return NewItemItemPullsCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsRequestBuilderInternal instantiates a new ItemItemPullsRequestBuilder and sets the default values. +func NewItemItemPullsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsRequestBuilder) { + m := &ItemItemPullsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls{?base*,direction*,head*,page*,per_page*,sort*,state*}", pathParameters), + } + return m +} +// NewItemItemPullsRequestBuilder instantiates a new ItemItemPullsRequestBuilder and sets the default values. +func NewItemItemPullsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []PullRequestSimpleable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests +func (m *ItemItemPullsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestSimpleable) + } + } + return val, nil +} +// Post draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#create-a-pull-request +func (m *ItemItemPullsRequestBuilder) Post(ctx context.Context, body ItemItemPullsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestable), nil +} +// ToGetRequestInformation lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemPullsRequestBuilder when successful +func (m *ItemItemPullsRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsRequestBuilder) { + return NewItemItemPullsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go b/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go new file mode 100644 index 0000000..55f133a --- /dev/null +++ b/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go @@ -0,0 +1,144 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemPullsWithPull_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number} +type ItemItemPullsWithPull_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Codespaces the codespaces property +// returns a *ItemItemPullsItemCodespacesRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Codespaces()(*ItemItemPullsItemCodespacesRequestBuilder) { + return NewItemItemPullsItemCodespacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemItemPullsItemCommentsRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Comments()(*ItemItemPullsItemCommentsRequestBuilder) { + return NewItemItemPullsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commits the commits property +// returns a *ItemItemPullsItemCommitsRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Commits()(*ItemItemPullsItemCommitsRequestBuilder) { + return NewItemItemPullsItemCommitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemPullsWithPull_numberItemRequestBuilderInternal instantiates a new ItemItemPullsWithPull_numberItemRequestBuilder and sets the default values. +func NewItemItemPullsWithPull_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsWithPull_numberItemRequestBuilder) { + m := &ItemItemPullsWithPull_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}", pathParameters), + } + return m +} +// NewItemItemPullsWithPull_numberItemRequestBuilder instantiates a new ItemItemPullsWithPull_numberItemRequestBuilder and sets the default values. +func NewItemItemPullsWithPull_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemPullsWithPull_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemPullsWithPull_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Files the files property +// returns a *ItemItemPullsItemFilesRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Files()(*ItemItemPullsItemFilesRequestBuilder) { + return NewItemItemPullsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#update-a-pull-request) a pull request, GitHub Enterprise Cloud creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Cloud has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/enterprise-cloud@latest//articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/enterprise-cloud@latest//articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/enterprise-cloud@latest//articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// returns a PullRequestable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 406 status code +// returns a BasicError error when the service returns a 500 status code +// returns a PullRequest503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#get-a-pull-request +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "406": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequest503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestable), nil +} +// Merge the merge property +// returns a *ItemItemPullsItemMergeRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Merge()(*ItemItemPullsItemMergeRequestBuilder) { + return NewItemItemPullsItemMergeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a PullRequestable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#update-a-pull-request +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Patch(ctx context.Context, body ItemItemPullsItemWithPull_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePullRequestFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PullRequestable), nil +} +// Requested_reviewers the requested_reviewers property +// returns a *ItemItemPullsItemRequested_reviewersRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Requested_reviewers()(*ItemItemPullsItemRequested_reviewersRequestBuilder) { + return NewItemItemPullsItemRequested_reviewersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Reviews the reviews property +// returns a *ItemItemPullsItemReviewsRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Reviews()(*ItemItemPullsItemReviewsRequestBuilder) { + return NewItemItemPullsItemReviewsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#update-a-pull-request) a pull request, GitHub Enterprise Cloud creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Cloud has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/enterprise-cloud@latest//articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/enterprise-cloud@latest//articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/enterprise-cloud@latest//articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// returns a *RequestInformation when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemPullsItemWithPull_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// UpdateBranch the updateBranch property +// returns a *ItemItemPullsItemUpdateBranchRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) UpdateBranch()(*ItemItemPullsItemUpdateBranchRequestBuilder) { + return NewItemItemPullsItemUpdateBranchRequestBuilderInternal(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. +// returns a *ItemItemPullsWithPull_numberItemRequestBuilder when successful +func (m *ItemItemPullsWithPull_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemPullsWithPull_numberItemRequestBuilder) { + return NewItemItemPullsWithPull_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_readme_request_builder.go b/pkg/github/repos/item_item_readme_request_builder.go new file mode 100644 index 0000000..b3a32eb --- /dev/null +++ b/pkg/github/repos/item_item_readme_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReadmeRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\readme +type ItemItemReadmeRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemReadmeRequestBuilderGetQueryParameters gets the preferred README for a repository.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type.- **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +type ItemItemReadmeRequestBuilderGetQueryParameters struct { + // The name of the commit/branch/tag. Default: the repository’s default branch. + Ref *string `uriparametername:"ref"` +} +// ByDir gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.readme.item collection +// returns a *ItemItemReadmeWithDirItemRequestBuilder when successful +func (m *ItemItemReadmeRequestBuilder) ByDir(dir string)(*ItemItemReadmeWithDirItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if dir != "" { + urlTplParams["dir"] = dir + } + return NewItemItemReadmeWithDirItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemReadmeRequestBuilderInternal instantiates a new ItemItemReadmeRequestBuilder and sets the default values. +func NewItemItemReadmeRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReadmeRequestBuilder) { + m := &ItemItemReadmeRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/readme{?ref*}", pathParameters), + } + return m +} +// NewItemItemReadmeRequestBuilder instantiates a new ItemItemReadmeRequestBuilder and sets the default values. +func NewItemItemReadmeRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReadmeRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReadmeRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the preferred README for a repository.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type.- **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +// returns a ContentFileable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#get-a-repository-readme +func (m *ItemItemReadmeRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReadmeRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable), nil +} +// ToGetRequestInformation gets the preferred README for a repository.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type.- **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +// returns a *RequestInformation when successful +func (m *ItemItemReadmeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReadmeRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReadmeRequestBuilder when successful +func (m *ItemItemReadmeRequestBuilder) WithUrl(rawUrl string)(*ItemItemReadmeRequestBuilder) { + return NewItemItemReadmeRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_readme_with_dir_item_request_builder.go b/pkg/github/repos/item_item_readme_with_dir_item_request_builder.go new file mode 100644 index 0000000..06fb36e --- /dev/null +++ b/pkg/github/repos/item_item_readme_with_dir_item_request_builder.go @@ -0,0 +1,68 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReadmeWithDirItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\readme\{dir} +type ItemItemReadmeWithDirItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemReadmeWithDirItemRequestBuilderGetQueryParameters gets the README from a repository directory.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type.- **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +type ItemItemReadmeWithDirItemRequestBuilderGetQueryParameters struct { + // The name of the commit/branch/tag. Default: the repository’s default branch. + Ref *string `uriparametername:"ref"` +} +// NewItemItemReadmeWithDirItemRequestBuilderInternal instantiates a new ItemItemReadmeWithDirItemRequestBuilder and sets the default values. +func NewItemItemReadmeWithDirItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReadmeWithDirItemRequestBuilder) { + m := &ItemItemReadmeWithDirItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/readme/{dir}{?ref*}", pathParameters), + } + return m +} +// NewItemItemReadmeWithDirItemRequestBuilder instantiates a new ItemItemReadmeWithDirItemRequestBuilder and sets the default values. +func NewItemItemReadmeWithDirItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReadmeWithDirItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReadmeWithDirItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the README from a repository directory.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type.- **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +// returns a ContentFileable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#get-a-repository-readme-for-a-directory +func (m *ItemItemReadmeWithDirItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReadmeWithDirItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentFileable), nil +} +// ToGetRequestInformation gets the README from a repository directory.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type.- **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). +// returns a *RequestInformation when successful +func (m *ItemItemReadmeWithDirItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReadmeWithDirItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReadmeWithDirItemRequestBuilder when successful +func (m *ItemItemReadmeWithDirItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemReadmeWithDirItemRequestBuilder) { + return NewItemItemReadmeWithDirItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_assets_item_with_asset_patch_request_body.go b/pkg/github/repos/item_item_releases_assets_item_with_asset_patch_request_body.go new file mode 100644 index 0000000..75327c7 --- /dev/null +++ b/pkg/github/repos/item_item_releases_assets_item_with_asset_patch_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemReleasesAssetsItemWithAsset_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An alternate short description of the asset. Used in place of the filename. + label *string + // The file name of the asset. + name *string + // The state property + state *string +} +// NewItemItemReleasesAssetsItemWithAsset_PatchRequestBody instantiates a new ItemItemReleasesAssetsItemWithAsset_PatchRequestBody and sets the default values. +func NewItemItemReleasesAssetsItemWithAsset_PatchRequestBody()(*ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) { + m := &ItemItemReleasesAssetsItemWithAsset_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemReleasesAssetsItemWithAsset_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemReleasesAssetsItemWithAsset_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemReleasesAssetsItemWithAsset_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetLabel gets the label property value. An alternate short description of the asset. Used in place of the filename. +// returns a *string when successful +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) GetLabel()(*string) { + return m.label +} +// GetName gets the name property value. The file name of the asset. +// returns a *string when successful +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetState gets the state property value. The state property +// returns a *string when successful +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabel sets the label property value. An alternate short description of the asset. Used in place of the filename. +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) SetLabel(value *string)() { + m.label = value +} +// SetName sets the name property value. The file name of the asset. +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetState sets the state property value. The state property +func (m *ItemItemReleasesAssetsItemWithAsset_PatchRequestBody) SetState(value *string)() { + m.state = value +} +type ItemItemReleasesAssetsItemWithAsset_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabel()(*string) + GetName()(*string) + GetState()(*string) + SetLabel(value *string)() + SetName(value *string)() + SetState(value *string)() +} diff --git a/pkg/github/repos/item_item_releases_assets_request_builder.go b/pkg/github/repos/item_item_releases_assets_request_builder.go new file mode 100644 index 0000000..f754dd3 --- /dev/null +++ b/pkg/github/repos/item_item_releases_assets_request_builder.go @@ -0,0 +1,34 @@ +package repos + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemReleasesAssetsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\assets +type ItemItemReleasesAssetsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByAsset_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.releases.assets.item collection +// returns a *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder when successful +func (m *ItemItemReleasesAssetsRequestBuilder) ByAsset_id(asset_id int32)(*ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["asset_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(asset_id), 10) + return NewItemItemReleasesAssetsWithAsset_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemReleasesAssetsRequestBuilderInternal instantiates a new ItemItemReleasesAssetsRequestBuilder and sets the default values. +func NewItemItemReleasesAssetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesAssetsRequestBuilder) { + m := &ItemItemReleasesAssetsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/assets", pathParameters), + } + return m +} +// NewItemItemReleasesAssetsRequestBuilder instantiates a new ItemItemReleasesAssetsRequestBuilder and sets the default values. +func NewItemItemReleasesAssetsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesAssetsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesAssetsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_releases_assets_with_asset_item_request_builder.go b/pkg/github/repos/item_item_releases_assets_with_asset_item_request_builder.go new file mode 100644 index 0000000..ddfd97a --- /dev/null +++ b/pkg/github/repos/item_item_releases_assets_with_asset_item_request_builder.go @@ -0,0 +1,113 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesAssetsWithAsset_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\assets\{asset_id} +type ItemItemReleasesAssetsWithAsset_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemReleasesAssetsWithAsset_ItemRequestBuilderInternal instantiates a new ItemItemReleasesAssetsWithAsset_ItemRequestBuilder and sets the default values. +func NewItemItemReleasesAssetsWithAsset_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) { + m := &ItemItemReleasesAssetsWithAsset_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/assets/{asset_id}", pathParameters), + } + return m +} +// NewItemItemReleasesAssetsWithAsset_ItemRequestBuilder instantiates a new ItemItemReleasesAssetsWithAsset_ItemRequestBuilder and sets the default values. +func NewItemItemReleasesAssetsWithAsset_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesAssetsWithAsset_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a release asset +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#delete-a-release-asset +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get to download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. +// returns a ReleaseAssetable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#get-a-release-asset +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseAssetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable), nil +} +// Patch users with push access to the repository can edit a release asset. +// returns a ReleaseAssetable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#update-a-release-asset +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemReleasesAssetsItemWithAsset_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseAssetFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation to download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation users with push access to the repository can edit a release asset. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemReleasesAssetsItemWithAsset_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder when successful +func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) { + return NewItemItemReleasesAssetsWithAsset_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_generate_notes_post_request_body.go b/pkg/github/repos/item_item_releases_generate_notes_post_request_body.go new file mode 100644 index 0000000..2f1db06 --- /dev/null +++ b/pkg/github/repos/item_item_releases_generate_notes_post_request_body.go @@ -0,0 +1,167 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemReleasesGenerateNotesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. + configuration_file_path *string + // The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. + previous_tag_name *string + // The tag name for the release. This can be an existing tag or a new one. + tag_name *string + // Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. + target_commitish *string +} +// NewItemItemReleasesGenerateNotesPostRequestBody instantiates a new ItemItemReleasesGenerateNotesPostRequestBody and sets the default values. +func NewItemItemReleasesGenerateNotesPostRequestBody()(*ItemItemReleasesGenerateNotesPostRequestBody) { + m := &ItemItemReleasesGenerateNotesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemReleasesGenerateNotesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemReleasesGenerateNotesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemReleasesGenerateNotesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemReleasesGenerateNotesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetConfigurationFilePath gets the configuration_file_path property value. Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. +// returns a *string when successful +func (m *ItemItemReleasesGenerateNotesPostRequestBody) GetConfigurationFilePath()(*string) { + return m.configuration_file_path +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemReleasesGenerateNotesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["configuration_file_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationFilePath(val) + } + return nil + } + res["previous_tag_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviousTagName(val) + } + return nil + } + res["tag_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagName(val) + } + return nil + } + res["target_commitish"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetCommitish(val) + } + return nil + } + return res +} +// GetPreviousTagName gets the previous_tag_name property value. The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. +// returns a *string when successful +func (m *ItemItemReleasesGenerateNotesPostRequestBody) GetPreviousTagName()(*string) { + return m.previous_tag_name +} +// GetTagName gets the tag_name property value. The tag name for the release. This can be an existing tag or a new one. +// returns a *string when successful +func (m *ItemItemReleasesGenerateNotesPostRequestBody) GetTagName()(*string) { + return m.tag_name +} +// GetTargetCommitish gets the target_commitish property value. Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. +// returns a *string when successful +func (m *ItemItemReleasesGenerateNotesPostRequestBody) GetTargetCommitish()(*string) { + return m.target_commitish +} +// Serialize serializes information the current object +func (m *ItemItemReleasesGenerateNotesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("configuration_file_path", m.GetConfigurationFilePath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previous_tag_name", m.GetPreviousTagName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tag_name", m.GetTagName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_commitish", m.GetTargetCommitish()) + 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 *ItemItemReleasesGenerateNotesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetConfigurationFilePath sets the configuration_file_path property value. Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. +func (m *ItemItemReleasesGenerateNotesPostRequestBody) SetConfigurationFilePath(value *string)() { + m.configuration_file_path = value +} +// SetPreviousTagName sets the previous_tag_name property value. The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. +func (m *ItemItemReleasesGenerateNotesPostRequestBody) SetPreviousTagName(value *string)() { + m.previous_tag_name = value +} +// SetTagName sets the tag_name property value. The tag name for the release. This can be an existing tag or a new one. +func (m *ItemItemReleasesGenerateNotesPostRequestBody) SetTagName(value *string)() { + m.tag_name = value +} +// SetTargetCommitish sets the target_commitish property value. Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. +func (m *ItemItemReleasesGenerateNotesPostRequestBody) SetTargetCommitish(value *string)() { + m.target_commitish = value +} +type ItemItemReleasesGenerateNotesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationFilePath()(*string) + GetPreviousTagName()(*string) + GetTagName()(*string) + GetTargetCommitish()(*string) + SetConfigurationFilePath(value *string)() + SetPreviousTagName(value *string)() + SetTagName(value *string)() + SetTargetCommitish(value *string)() +} diff --git a/pkg/github/repos/item_item_releases_generate_notes_request_builder.go b/pkg/github/repos/item_item_releases_generate_notes_request_builder.go new file mode 100644 index 0000000..6e91132 --- /dev/null +++ b/pkg/github/repos/item_item_releases_generate_notes_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesGenerateNotesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\generate-notes +type ItemItemReleasesGenerateNotesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemReleasesGenerateNotesRequestBuilderInternal instantiates a new ItemItemReleasesGenerateNotesRequestBuilder and sets the default values. +func NewItemItemReleasesGenerateNotesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesGenerateNotesRequestBuilder) { + m := &ItemItemReleasesGenerateNotesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/generate-notes", pathParameters), + } + return m +} +// NewItemItemReleasesGenerateNotesRequestBuilder instantiates a new ItemItemReleasesGenerateNotesRequestBuilder and sets the default values. +func NewItemItemReleasesGenerateNotesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesGenerateNotesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesGenerateNotesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post generate a name and body describing a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. +// returns a ReleaseNotesContentable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#generate-release-notes-content-for-a-release +func (m *ItemItemReleasesGenerateNotesRequestBuilder) Post(ctx context.Context, body ItemItemReleasesGenerateNotesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseNotesContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseNotesContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseNotesContentable), nil +} +// ToPostRequestInformation generate a name and body describing a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesGenerateNotesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemReleasesGenerateNotesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesGenerateNotesRequestBuilder when successful +func (m *ItemItemReleasesGenerateNotesRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesGenerateNotesRequestBuilder) { + return NewItemItemReleasesGenerateNotesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_item_assets_request_builder.go b/pkg/github/repos/item_item_releases_item_assets_request_builder.go new file mode 100644 index 0000000..6b84618 --- /dev/null +++ b/pkg/github/repos/item_item_releases_item_assets_request_builder.go @@ -0,0 +1,99 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesItemAssetsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id}\assets +type ItemItemReleasesItemAssetsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemReleasesItemAssetsRequestBuilderGetQueryParameters list release assets +type ItemItemReleasesItemAssetsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ItemItemReleasesItemAssetsRequestBuilderPostQueryParameters this endpoint makes use of a [Hypermedia relation](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned inthe response of the [Create a release endpoint](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#create-a-release) to upload a release asset.You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: `application/zip`GitHub Enterprise Cloud expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,you'll still need to pass your authentication to be able to upload an asset.When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.**Notes:*** GitHub Enterprise Cloud renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#list-release-assets)"endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api).* To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-the-latest-release). * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. +type ItemItemReleasesItemAssetsRequestBuilderPostQueryParameters struct { + Label *string `uriparametername:"label"` + Name *string `uriparametername:"name"` +} +// NewItemItemReleasesItemAssetsRequestBuilderInternal instantiates a new ItemItemReleasesItemAssetsRequestBuilder and sets the default values. +func NewItemItemReleasesItemAssetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemAssetsRequestBuilder) { + m := &ItemItemReleasesItemAssetsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets?name={name}{&label*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemReleasesItemAssetsRequestBuilder instantiates a new ItemItemReleasesItemAssetsRequestBuilder and sets the default values. +func NewItemItemReleasesItemAssetsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemAssetsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesItemAssetsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list release assets +// returns a []ReleaseAssetable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#list-release-assets +func (m *ItemItemReleasesItemAssetsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemAssetsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseAssetFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable) + } + } + return val, nil +} +// Post this endpoint makes use of a [Hypermedia relation](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned inthe response of the [Create a release endpoint](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#create-a-release) to upload a release asset.You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: `application/zip`GitHub Enterprise Cloud expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,you'll still need to pass your authentication to be able to upload an asset.When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.**Notes:*** GitHub Enterprise Cloud renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#list-release-assets)"endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api).* To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-the-latest-release). * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. +// returns a ReleaseAssetable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#upload-a-release-asset +func (m *ItemItemReleasesItemAssetsRequestBuilder) Post(ctx context.Context, body []byte, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemAssetsRequestBuilderPostQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseAssetFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReleaseAssetable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemReleasesItemAssetsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemAssetsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets{?page*,per_page*}", m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation this endpoint makes use of a [Hypermedia relation](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned inthe response of the [Create a release endpoint](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#create-a-release) to upload a release asset.You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: `application/zip`GitHub Enterprise Cloud expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,you'll still need to pass your authentication to be able to upload an asset.When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.**Notes:*** GitHub Enterprise Cloud renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#list-release-assets)"endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Cloud Support](https://support.github.com/contact?tags=dotcom-rest-api).* To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-the-latest-release). * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesItemAssetsRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemAssetsRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets?name={name}{&label*}", m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + requestInfo.SetStreamContentAndContentType(body, "application/octet-stream") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesItemAssetsRequestBuilder when successful +func (m *ItemItemReleasesItemAssetsRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesItemAssetsRequestBuilder) { + return NewItemItemReleasesItemAssetsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_item_reactions_post_request_body.go b/pkg/github/repos/item_item_releases_item_reactions_post_request_body.go new file mode 100644 index 0000000..a7a44a2 --- /dev/null +++ b/pkg/github/repos/item_item_releases_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemReleasesItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemReleasesItemReactionsPostRequestBody instantiates a new ItemItemReleasesItemReactionsPostRequestBody and sets the default values. +func NewItemItemReleasesItemReactionsPostRequestBody()(*ItemItemReleasesItemReactionsPostRequestBody) { + m := &ItemItemReleasesItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemReleasesItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemReleasesItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemReleasesItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemReleasesItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemReleasesItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemReleasesItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemReleasesItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemReleasesItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_releases_item_reactions_request_builder.go b/pkg/github/repos/item_item_releases_item_reactions_request_builder.go new file mode 100644 index 0000000..cbdfffc --- /dev/null +++ b/pkg/github/repos/item_item_releases_item_reactions_request_builder.go @@ -0,0 +1,120 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + id6ba6bd98fe019948a99cacc045fcfbe34bf00e57f6ee834f05a8c38a47e5b48 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/releases/item/reactions" +) + +// ItemItemReleasesItemReactionsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id}\reactions +type ItemItemReleasesItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemReleasesItemReactionsRequestBuilderGetQueryParameters list the reactions to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). +type ItemItemReleasesItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release. + Content *id6ba6bd98fe019948a99cacc045fcfbe34bf00e57f6ee834f05a8c38a47e5b48.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByReaction_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.releases.item.reactions.item collection +// returns a *ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemReleasesItemReactionsRequestBuilder) ByReaction_id(reaction_id int32)(*ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["reaction_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(reaction_id), 10) + return NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemReleasesItemReactionsRequestBuilderInternal instantiates a new ItemItemReleasesItemReactionsRequestBuilder and sets the default values. +func NewItemItemReleasesItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemReactionsRequestBuilder) { + m := &ItemItemReleasesItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemReleasesItemReactionsRequestBuilder instantiates a new ItemItemReleasesItemReactionsRequestBuilder and sets the default values. +func NewItemItemReleasesItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the reactions to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). +// returns a []Reactionable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-release +func (m *ItemItemReleasesItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post create a reaction to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. +// returns a Reactionable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-release +func (m *ItemItemReleasesItemReactionsRequestBuilder) Post(ctx context.Context, body ItemItemReleasesItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation list the reactions to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). +// returns a *RequestInformation when successful +func (m *ItemItemReleasesItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a reaction to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemReleasesItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesItemReactionsRequestBuilder when successful +func (m *ItemItemReleasesItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesItemReactionsRequestBuilder) { + return NewItemItemReleasesItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_item_reactions_with_reaction_item_request_builder.go b/pkg/github/repos/item_item_releases_item_reactions_with_reaction_item_request_builder.go new file mode 100644 index 0000000..a0ca065 --- /dev/null +++ b/pkg/github/repos/item_item_releases_item_reactions_with_reaction_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id}\reactions\{reaction_id} +type ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilderInternal instantiates a new ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) { + m := &ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions/{reaction_id}", pathParameters), + } + return m +} +// NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder instantiates a new ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder and sets the default values. +func NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`.Delete a reaction to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#delete-a-release-reaction +func (m *ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`.Delete a reaction to a [release](https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release). +// returns a *RequestInformation when successful +func (m *ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder when successful +func (m *ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder) { + return NewItemItemReleasesItemReactionsWithReaction_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_item_with_release_patch_request_body.go b/pkg/github/repos/item_item_releases_item_with_release_patch_request_body.go new file mode 100644 index 0000000..ac987e2 --- /dev/null +++ b/pkg/github/repos/item_item_releases_item_with_release_patch_request_body.go @@ -0,0 +1,254 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemReleasesItemWithRelease_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Text describing the contents of the tag. + body *string + // If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/enterprise-cloud@latest//discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." + discussion_category_name *string + // `true` makes the release a draft, and `false` publishes the release. + draft *bool + // The name of the release. + name *string + // `true` to identify the release as a prerelease, `false` to identify the release as a full release. + prerelease *bool + // The name of the tag. + tag_name *string + // Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. + target_commitish *string +} +// NewItemItemReleasesItemWithRelease_PatchRequestBody instantiates a new ItemItemReleasesItemWithRelease_PatchRequestBody and sets the default values. +func NewItemItemReleasesItemWithRelease_PatchRequestBody()(*ItemItemReleasesItemWithRelease_PatchRequestBody) { + m := &ItemItemReleasesItemWithRelease_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemReleasesItemWithRelease_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemReleasesItemWithRelease_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemReleasesItemWithRelease_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. Text describing the contents of the tag. +// returns a *string when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetBody()(*string) { + return m.body +} +// GetDiscussionCategoryName gets the discussion_category_name property value. If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/enterprise-cloud@latest//discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." +// returns a *string when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetDiscussionCategoryName()(*string) { + return m.discussion_category_name +} +// GetDraft gets the draft property value. `true` makes the release a draft, and `false` publishes the release. +// returns a *bool when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetDraft()(*bool) { + return m.draft +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["discussion_category_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionCategoryName(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(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["prerelease"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrerelease(val) + } + return nil + } + res["tag_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagName(val) + } + return nil + } + res["target_commitish"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetCommitish(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the release. +// returns a *string when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetPrerelease gets the prerelease property value. `true` to identify the release as a prerelease, `false` to identify the release as a full release. +// returns a *bool when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetPrerelease()(*bool) { + return m.prerelease +} +// GetTagName gets the tag_name property value. The name of the tag. +// returns a *string when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetTagName()(*string) { + return m.tag_name +} +// GetTargetCommitish gets the target_commitish property value. Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. +// returns a *string when successful +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) GetTargetCommitish()(*string) { + return m.target_commitish +} +// Serialize serializes information the current object +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("discussion_category_name", m.GetDiscussionCategoryName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prerelease", m.GetPrerelease()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tag_name", m.GetTagName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_commitish", m.GetTargetCommitish()) + 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 *ItemItemReleasesItemWithRelease_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. Text describing the contents of the tag. +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetBody(value *string)() { + m.body = value +} +// SetDiscussionCategoryName sets the discussion_category_name property value. If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/enterprise-cloud@latest//discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetDiscussionCategoryName(value *string)() { + m.discussion_category_name = value +} +// SetDraft sets the draft property value. `true` makes the release a draft, and `false` publishes the release. +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetDraft(value *bool)() { + m.draft = value +} +// SetName sets the name property value. The name of the release. +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrerelease sets the prerelease property value. `true` to identify the release as a prerelease, `false` to identify the release as a full release. +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetPrerelease(value *bool)() { + m.prerelease = value +} +// SetTagName sets the tag_name property value. The name of the tag. +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetTagName(value *string)() { + m.tag_name = value +} +// SetTargetCommitish sets the target_commitish property value. Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. +func (m *ItemItemReleasesItemWithRelease_PatchRequestBody) SetTargetCommitish(value *string)() { + m.target_commitish = value +} +type ItemItemReleasesItemWithRelease_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetDiscussionCategoryName()(*string) + GetDraft()(*bool) + GetName()(*string) + GetPrerelease()(*bool) + GetTagName()(*string) + GetTargetCommitish()(*string) + SetBody(value *string)() + SetDiscussionCategoryName(value *string)() + SetDraft(value *bool)() + SetName(value *string)() + SetPrerelease(value *bool)() + SetTagName(value *string)() + SetTargetCommitish(value *string)() +} diff --git a/pkg/github/repos/item_item_releases_latest_request_builder.go b/pkg/github/repos/item_item_releases_latest_request_builder.go new file mode 100644 index 0000000..2ad866a --- /dev/null +++ b/pkg/github/repos/item_item_releases_latest_request_builder.go @@ -0,0 +1,57 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesLatestRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\latest +type ItemItemReleasesLatestRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemReleasesLatestRequestBuilderInternal instantiates a new ItemItemReleasesLatestRequestBuilder and sets the default values. +func NewItemItemReleasesLatestRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesLatestRequestBuilder) { + m := &ItemItemReleasesLatestRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/latest", pathParameters), + } + return m +} +// NewItemItemReleasesLatestRequestBuilder instantiates a new ItemItemReleasesLatestRequestBuilder and sets the default values. +func NewItemItemReleasesLatestRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesLatestRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesLatestRequestBuilderInternal(urlParams, requestAdapter) +} +// Get view the latest published full release for the repository.The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. +// returns a Releaseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-the-latest-release +func (m *ItemItemReleasesLatestRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable), nil +} +// ToGetRequestInformation view the latest published full release for the repository.The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesLatestRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesLatestRequestBuilder when successful +func (m *ItemItemReleasesLatestRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesLatestRequestBuilder) { + return NewItemItemReleasesLatestRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_post_request_body.go b/pkg/github/repos/item_item_releases_post_request_body.go new file mode 100644 index 0000000..4a490cf --- /dev/null +++ b/pkg/github/repos/item_item_releases_post_request_body.go @@ -0,0 +1,283 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemReleasesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Text describing the contents of the tag. + body *string + // If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/enterprise-cloud@latest//discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." + discussion_category_name *string + // `true` to create a draft (unpublished) release, `false` to create a published one. + draft *bool + // Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + generate_release_notes *bool + // The name of the release. + name *string + // `true` to identify the release as a prerelease. `false` to identify the release as a full release. + prerelease *bool + // The name of the tag. + tag_name *string + // Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. + target_commitish *string +} +// NewItemItemReleasesPostRequestBody instantiates a new ItemItemReleasesPostRequestBody and sets the default values. +func NewItemItemReleasesPostRequestBody()(*ItemItemReleasesPostRequestBody) { + m := &ItemItemReleasesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemReleasesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemReleasesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemReleasesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemReleasesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. Text describing the contents of the tag. +// returns a *string when successful +func (m *ItemItemReleasesPostRequestBody) GetBody()(*string) { + return m.body +} +// GetDiscussionCategoryName gets the discussion_category_name property value. If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/enterprise-cloud@latest//discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." +// returns a *string when successful +func (m *ItemItemReleasesPostRequestBody) GetDiscussionCategoryName()(*string) { + return m.discussion_category_name +} +// GetDraft gets the draft property value. `true` to create a draft (unpublished) release, `false` to create a published one. +// returns a *bool when successful +func (m *ItemItemReleasesPostRequestBody) GetDraft()(*bool) { + return m.draft +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemReleasesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["discussion_category_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionCategoryName(val) + } + return nil + } + res["draft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraft(val) + } + return nil + } + res["generate_release_notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGenerateReleaseNotes(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["prerelease"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrerelease(val) + } + return nil + } + res["tag_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTagName(val) + } + return nil + } + res["target_commitish"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetCommitish(val) + } + return nil + } + return res +} +// GetGenerateReleaseNotes gets the generate_release_notes property value. Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. +// returns a *bool when successful +func (m *ItemItemReleasesPostRequestBody) GetGenerateReleaseNotes()(*bool) { + return m.generate_release_notes +} +// GetName gets the name property value. The name of the release. +// returns a *string when successful +func (m *ItemItemReleasesPostRequestBody) GetName()(*string) { + return m.name +} +// GetPrerelease gets the prerelease property value. `true` to identify the release as a prerelease. `false` to identify the release as a full release. +// returns a *bool when successful +func (m *ItemItemReleasesPostRequestBody) GetPrerelease()(*bool) { + return m.prerelease +} +// GetTagName gets the tag_name property value. The name of the tag. +// returns a *string when successful +func (m *ItemItemReleasesPostRequestBody) GetTagName()(*string) { + return m.tag_name +} +// GetTargetCommitish gets the target_commitish property value. Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. +// returns a *string when successful +func (m *ItemItemReleasesPostRequestBody) GetTargetCommitish()(*string) { + return m.target_commitish +} +// Serialize serializes information the current object +func (m *ItemItemReleasesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("discussion_category_name", m.GetDiscussionCategoryName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("draft", m.GetDraft()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("generate_release_notes", m.GetGenerateReleaseNotes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prerelease", m.GetPrerelease()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tag_name", m.GetTagName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_commitish", m.GetTargetCommitish()) + 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 *ItemItemReleasesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. Text describing the contents of the tag. +func (m *ItemItemReleasesPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetDiscussionCategoryName sets the discussion_category_name property value. If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/enterprise-cloud@latest//discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." +func (m *ItemItemReleasesPostRequestBody) SetDiscussionCategoryName(value *string)() { + m.discussion_category_name = value +} +// SetDraft sets the draft property value. `true` to create a draft (unpublished) release, `false` to create a published one. +func (m *ItemItemReleasesPostRequestBody) SetDraft(value *bool)() { + m.draft = value +} +// SetGenerateReleaseNotes sets the generate_release_notes property value. Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. +func (m *ItemItemReleasesPostRequestBody) SetGenerateReleaseNotes(value *bool)() { + m.generate_release_notes = value +} +// SetName sets the name property value. The name of the release. +func (m *ItemItemReleasesPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrerelease sets the prerelease property value. `true` to identify the release as a prerelease. `false` to identify the release as a full release. +func (m *ItemItemReleasesPostRequestBody) SetPrerelease(value *bool)() { + m.prerelease = value +} +// SetTagName sets the tag_name property value. The name of the tag. +func (m *ItemItemReleasesPostRequestBody) SetTagName(value *string)() { + m.tag_name = value +} +// SetTargetCommitish sets the target_commitish property value. Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. +func (m *ItemItemReleasesPostRequestBody) SetTargetCommitish(value *string)() { + m.target_commitish = value +} +type ItemItemReleasesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetDiscussionCategoryName()(*string) + GetDraft()(*bool) + GetGenerateReleaseNotes()(*bool) + GetName()(*string) + GetPrerelease()(*bool) + GetTagName()(*string) + GetTargetCommitish()(*string) + SetBody(value *string)() + SetDiscussionCategoryName(value *string)() + SetDraft(value *bool)() + SetGenerateReleaseNotes(value *bool)() + SetName(value *string)() + SetPrerelease(value *bool)() + SetTagName(value *string)() + SetTargetCommitish(value *string)() +} diff --git a/pkg/github/repos/item_item_releases_request_builder.go b/pkg/github/repos/item_item_releases_request_builder.go new file mode 100644 index 0000000..28c02b2 --- /dev/null +++ b/pkg/github/repos/item_item_releases_request_builder.go @@ -0,0 +1,139 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases +type ItemItemReleasesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemReleasesRequestBuilderGetQueryParameters this returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-tags).Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. +type ItemItemReleasesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// Assets the assets property +// returns a *ItemItemReleasesAssetsRequestBuilder when successful +func (m *ItemItemReleasesRequestBuilder) Assets()(*ItemItemReleasesAssetsRequestBuilder) { + return NewItemItemReleasesAssetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ByRelease_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.releases.item collection +// returns a *ItemItemReleasesWithRelease_ItemRequestBuilder when successful +func (m *ItemItemReleasesRequestBuilder) ByRelease_id(release_id int32)(*ItemItemReleasesWithRelease_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["release_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(release_id), 10) + return NewItemItemReleasesWithRelease_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemReleasesRequestBuilderInternal instantiates a new ItemItemReleasesRequestBuilder and sets the default values. +func NewItemItemReleasesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesRequestBuilder) { + m := &ItemItemReleasesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemReleasesRequestBuilder instantiates a new ItemItemReleasesRequestBuilder and sets the default values. +func NewItemItemReleasesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesRequestBuilderInternal(urlParams, requestAdapter) +} +// GenerateNotes the generateNotes property +// returns a *ItemItemReleasesGenerateNotesRequestBuilder when successful +func (m *ItemItemReleasesRequestBuilder) GenerateNotes()(*ItemItemReleasesGenerateNotesRequestBuilder) { + return NewItemItemReleasesGenerateNotesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get this returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-tags).Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. +// returns a []Releaseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#list-releases +func (m *ItemItemReleasesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable) + } + } + return val, nil +} +// Latest the latest property +// returns a *ItemItemReleasesLatestRequestBuilder when successful +func (m *ItemItemReleasesRequestBuilder) Latest()(*ItemItemReleasesLatestRequestBuilder) { + return NewItemItemReleasesLatestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Post users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)." +// returns a Releaseable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#create-a-release +func (m *ItemItemReleasesRequestBuilder) Post(ctx context.Context, body ItemItemReleasesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable), nil +} +// Tags the tags property +// returns a *ItemItemReleasesTagsRequestBuilder when successful +func (m *ItemItemReleasesRequestBuilder) Tags()(*ItemItemReleasesTagsRequestBuilder) { + return NewItemItemReleasesTagsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation this returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-tags).Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)." +// returns a *RequestInformation when successful +func (m *ItemItemReleasesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemReleasesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesRequestBuilder when successful +func (m *ItemItemReleasesRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesRequestBuilder) { + return NewItemItemReleasesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_tags_request_builder.go b/pkg/github/repos/item_item_releases_tags_request_builder.go new file mode 100644 index 0000000..6231242 --- /dev/null +++ b/pkg/github/repos/item_item_releases_tags_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemReleasesTagsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\tags +type ItemItemReleasesTagsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTag gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.releases.tags.item collection +// returns a *ItemItemReleasesTagsWithTagItemRequestBuilder when successful +func (m *ItemItemReleasesTagsRequestBuilder) ByTag(tag string)(*ItemItemReleasesTagsWithTagItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if tag != "" { + urlTplParams["tag"] = tag + } + return NewItemItemReleasesTagsWithTagItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemReleasesTagsRequestBuilderInternal instantiates a new ItemItemReleasesTagsRequestBuilder and sets the default values. +func NewItemItemReleasesTagsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesTagsRequestBuilder) { + m := &ItemItemReleasesTagsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/tags", pathParameters), + } + return m +} +// NewItemItemReleasesTagsRequestBuilder instantiates a new ItemItemReleasesTagsRequestBuilder and sets the default values. +func NewItemItemReleasesTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesTagsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesTagsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_releases_tags_with_tag_item_request_builder.go b/pkg/github/repos/item_item_releases_tags_with_tag_item_request_builder.go new file mode 100644 index 0000000..a903a65 --- /dev/null +++ b/pkg/github/repos/item_item_releases_tags_with_tag_item_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesTagsWithTagItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\tags\{tag} +type ItemItemReleasesTagsWithTagItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemReleasesTagsWithTagItemRequestBuilderInternal instantiates a new ItemItemReleasesTagsWithTagItemRequestBuilder and sets the default values. +func NewItemItemReleasesTagsWithTagItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesTagsWithTagItemRequestBuilder) { + m := &ItemItemReleasesTagsWithTagItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/tags/{tag}", pathParameters), + } + return m +} +// NewItemItemReleasesTagsWithTagItemRequestBuilder instantiates a new ItemItemReleasesTagsWithTagItemRequestBuilder and sets the default values. +func NewItemItemReleasesTagsWithTagItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesTagsWithTagItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesTagsWithTagItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get a published release with the specified tag. +// returns a Releaseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release-by-tag-name +func (m *ItemItemReleasesTagsWithTagItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable), nil +} +// ToGetRequestInformation get a published release with the specified tag. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesTagsWithTagItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesTagsWithTagItemRequestBuilder when successful +func (m *ItemItemReleasesTagsWithTagItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesTagsWithTagItemRequestBuilder) { + return NewItemItemReleasesTagsWithTagItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_releases_with_release_item_request_builder.go b/pkg/github/repos/item_item_releases_with_release_item_request_builder.go new file mode 100644 index 0000000..21354c5 --- /dev/null +++ b/pkg/github/repos/item_item_releases_with_release_item_request_builder.go @@ -0,0 +1,124 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemReleasesWithRelease_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id} +type ItemItemReleasesWithRelease_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Assets the assets property +// returns a *ItemItemReleasesItemAssetsRequestBuilder when successful +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) Assets()(*ItemItemReleasesItemAssetsRequestBuilder) { + return NewItemItemReleasesItemAssetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemReleasesWithRelease_ItemRequestBuilderInternal instantiates a new ItemItemReleasesWithRelease_ItemRequestBuilder and sets the default values. +func NewItemItemReleasesWithRelease_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesWithRelease_ItemRequestBuilder) { + m := &ItemItemReleasesWithRelease_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}", pathParameters), + } + return m +} +// NewItemItemReleasesWithRelease_ItemRequestBuilder instantiates a new ItemItemReleasesWithRelease_ItemRequestBuilder and sets the default values. +func NewItemItemReleasesWithRelease_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesWithRelease_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemReleasesWithRelease_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete users with push access to the repository can delete a release. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#delete-a-release +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a public release with the specified release ID.**Note:** This returns an `upload_url` key corresponding to the endpointfor uploading release assets. This key is a hypermedia resource. For more information, see"[Getting started with the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." +// returns a Releaseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#get-a-release +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable), nil +} +// Patch users with push access to the repository can edit a release. +// returns a Releaseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/releases/releases#update-a-release +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) Patch(ctx context.Context, body ItemItemReleasesItemWithRelease_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReleaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Releaseable), nil +} +// Reactions the reactions property +// returns a *ItemItemReleasesItemReactionsRequestBuilder when successful +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) Reactions()(*ItemItemReleasesItemReactionsRequestBuilder) { + return NewItemItemReleasesItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation users with push access to the repository can delete a release. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a public release with the specified release ID.**Note:** This returns an `upload_url` key corresponding to the endpointfor uploading release assets. This key is a hypermedia resource. For more information, see"[Getting started with the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." +// returns a *RequestInformation when successful +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation users with push access to the repository can edit a release. +// returns a *RequestInformation when successful +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemReleasesItemWithRelease_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemReleasesWithRelease_ItemRequestBuilder when successful +func (m *ItemItemReleasesWithRelease_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemReleasesWithRelease_ItemRequestBuilder) { + return NewItemItemReleasesWithRelease_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_repo403_error.go b/pkg/github/repos/item_item_repo403_error.go new file mode 100644 index 0000000..6e1369f --- /dev/null +++ b/pkg/github/repos/item_item_repo403_error.go @@ -0,0 +1,117 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemRepo403Error 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 +} +// NewItemItemRepo403Error instantiates a new ItemItemRepo403Error and sets the default values. +func NewItemItemRepo403Error()(*ItemItemRepo403Error) { + m := &ItemItemRepo403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepo403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepo403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepo403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemItemRepo403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemRepo403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemItemRepo403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepo403Error) 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 +// returns a *string when successful +func (m *ItemItemRepo403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemItemRepo403Error) 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 *ItemItemRepo403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemItemRepo403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemItemRepo403Error) SetMessage(value *string)() { + m.message = value +} +type ItemItemRepo403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/repos/item_item_repo_patch_request_body.go b/pkg/github/repos/item_item_repo_patch_request_body.go new file mode 100644 index 0000000..cfa2f61 --- /dev/null +++ b/pkg/github/repos/item_item_repo_patch_request_body.go @@ -0,0 +1,634 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemRepoPatchRequestBody 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/enterprise-cloud@latest//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/enterprise-cloud@latest//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 ItemItemRepoPatchRequestBody_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 +} +// NewItemItemRepoPatchRequestBody instantiates a new ItemItemRepoPatchRequestBody and sets the default values. +func NewItemItemRepoPatchRequestBody()(*ItemItemRepoPatchRequestBody) { + m := &ItemItemRepoPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepoPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepoPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepoPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) GetArchived()(*bool) { + return m.archived +} +// GetDefaultBranch gets the default_branch property value. Updates the default branch for this repository. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDescription gets the description property value. A short description of the repository. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepoPatchRequestBody) 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(CreateItemItemRepoPatchRequestBody_security_and_analysisFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAndAnalysis(val.(ItemItemRepoPatchRequestBody_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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. A URL with more information about the repository. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) GetIsTemplate()(*bool) { + return m.is_template +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody) 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/enterprise-cloud@latest//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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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/enterprise-cloud@latest//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. +// returns a ItemItemRepoPatchRequestBody_security_and_analysisable when successful +func (m *ItemItemRepoPatchRequestBody) GetSecurityAndAnalysis()(ItemItemRepoPatchRequestBody_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: +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) 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. +// returns a *bool when successful +func (m *ItemItemRepoPatchRequestBody) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) SetArchived(value *bool)() { + m.archived = value +} +// SetDefaultBranch sets the default_branch property value. Updates the default branch for this repository. +func (m *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDescription sets the description property value. A short description of the repository. +func (m *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. A URL with more information about the repository. +func (m *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetName sets the name property value. The name of the repository. +func (m *ItemItemRepoPatchRequestBody) 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/enterprise-cloud@latest//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 *ItemItemRepoPatchRequestBody) 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/enterprise-cloud@latest//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 *ItemItemRepoPatchRequestBody) SetSecurityAndAnalysis(value ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody) 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 *ItemItemRepoPatchRequestBody) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +type ItemItemRepoPatchRequestBodyable 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()(ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_security_and_analysisable)() + SetUseSquashPrTitleAsDefault(value *bool)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis.go b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis.go new file mode 100644 index 0000000..8101f04 --- /dev/null +++ b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis.go @@ -0,0 +1,168 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemRepoPatchRequestBody_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/enterprise-cloud@latest//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 ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable + // Use the `status` property to enable or disable secret scanning automatic validity checks on supported partner tokens for this repository. + secret_scanning_validity_checks ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable +} +// NewItemItemRepoPatchRequestBody_security_and_analysis instantiates a new ItemItemRepoPatchRequestBody_security_and_analysis and sets the default values. +func NewItemItemRepoPatchRequestBody_security_and_analysis()(*ItemItemRepoPatchRequestBody_security_and_analysis) { + m := &ItemItemRepoPatchRequestBody_security_and_analysis{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepoPatchRequestBody_security_and_analysisFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepoPatchRequestBody_security_and_analysisFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepoPatchRequestBody_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. +// returns a map[string]any when successful +func (m *ItemItemRepoPatchRequestBody_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)." +// returns a ItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityable when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis) GetAdvancedSecurity()(ItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityable) { + return m.advanced_security +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepoPatchRequestBody_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(CreateItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurity(val.(ItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityable)) + } + return nil + } + res["secret_scanning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanning(val.(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningable)) + } + return nil + } + res["secret_scanning_push_protection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtection(val.(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable)) + } + return nil + } + res["secret_scanning_validity_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningValidityChecks(val.(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable)) + } + 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)." +// returns a ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningable when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis) GetSecretScanning()(ItemItemRepoPatchRequestBody_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)." +// returns a ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis) GetSecretScanningPushProtection()(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable) { + return m.secret_scanning_push_protection +} +// GetSecretScanningValidityChecks gets the secret_scanning_validity_checks property value. Use the `status` property to enable or disable secret scanning automatic validity checks on supported partner tokens for this repository. +// returns a ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis) GetSecretScanningValidityChecks()(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable) { + return m.secret_scanning_validity_checks +} +// Serialize serializes information the current object +func (m *ItemItemRepoPatchRequestBody_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.WriteObjectValue("secret_scanning_validity_checks", m.GetSecretScanningValidityChecks()) + 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 *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_security_and_analysis) SetAdvancedSecurity(value ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_security_and_analysis) SetSecretScanning(value ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_security_and_analysis) SetSecretScanningPushProtection(value ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable)() { + m.secret_scanning_push_protection = value +} +// SetSecretScanningValidityChecks sets the secret_scanning_validity_checks property value. Use the `status` property to enable or disable secret scanning automatic validity checks on supported partner tokens for this repository. +func (m *ItemItemRepoPatchRequestBody_security_and_analysis) SetSecretScanningValidityChecks(value ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable)() { + m.secret_scanning_validity_checks = value +} +type ItemItemRepoPatchRequestBody_security_and_analysisable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurity()(ItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityable) + GetSecretScanning()(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningable) + GetSecretScanningPushProtection()(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable) + GetSecretScanningValidityChecks()(ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable) + SetAdvancedSecurity(value ItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityable)() + SetSecretScanning(value ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningable)() + SetSecretScanningPushProtection(value ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable)() + SetSecretScanningValidityChecks(value ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable)() +} diff --git a/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_advanced_security.go b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_advanced_security.go new file mode 100644 index 0000000..064955b --- /dev/null +++ b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_advanced_security.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_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 +} +// NewItemItemRepoPatchRequestBody_security_and_analysis_advanced_security instantiates a new ItemItemRepoPatchRequestBody_security_and_analysis_advanced_security and sets the default values. +func NewItemItemRepoPatchRequestBody_security_and_analysis_advanced_security()(*ItemItemRepoPatchRequestBody_security_and_analysis_advanced_security) { + m := &ItemItemRepoPatchRequestBody_security_and_analysis_advanced_security{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepoPatchRequestBody_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. +// returns a map[string]any when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_advanced_security) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepoPatchRequestBody_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`. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_advanced_security) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_security_and_analysis_advanced_security) SetStatus(value *string)() { + m.status = value +} +type ItemItemRepoPatchRequestBody_security_and_analysis_advanced_securityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning.go b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning.go new file mode 100644 index 0000000..e12b9ac --- /dev/null +++ b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_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 +} +// NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning instantiates a new ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning and sets the default values. +func NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning()(*ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning) { + m := &ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepoPatchRequestBody_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. +// returns a map[string]any when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepoPatchRequestBody_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`. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning) SetStatus(value *string)() { + m.status = value +} +type ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanningable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning_push_protection.go b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning_push_protection.go new file mode 100644 index 0000000..da569eb --- /dev/null +++ b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning_push_protection.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemRepoPatchRequestBody_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 ItemItemRepoPatchRequestBody_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 +} +// NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection instantiates a new ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection and sets the default values. +func NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection()(*ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection) { + m := &ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepoPatchRequestBody_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. +// returns a map[string]any when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepoPatchRequestBody_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`. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_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 *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection) SetStatus(value *string)() { + m.status = value +} +type ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning_validity_checks.go b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning_validity_checks.go new file mode 100644 index 0000000..b3e91e8 --- /dev/null +++ b/pkg/github/repos/item_item_repo_patch_request_body_security_and_analysis_secret_scanning_validity_checks.go @@ -0,0 +1,81 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks use the `status` property to enable or disable secret scanning automatic validity checks on supported partner tokens for this repository. +type ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks 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 +} +// NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks instantiates a new ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks and sets the default values. +func NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks()(*ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) { + m := &ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) 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`. +// returns a *string when successful +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) 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 *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checks) SetStatus(value *string)() { + m.status = value +} +type ItemItemRepoPatchRequestBody_security_and_analysis_secret_scanning_validity_checksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_item_rules_branches_request_builder.go b/pkg/github/repos/item_item_rules_branches_request_builder.go new file mode 100644 index 0000000..9c2f27a --- /dev/null +++ b/pkg/github/repos/item_item_rules_branches_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemRulesBranchesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rules\branches +type ItemItemRulesBranchesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByBranch gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.rules.branches.item collection +// returns a *ItemItemRulesBranchesWithBranchItemRequestBuilder when successful +func (m *ItemItemRulesBranchesRequestBuilder) ByBranch(branch string)(*ItemItemRulesBranchesWithBranchItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if branch != "" { + urlTplParams["branch"] = branch + } + return NewItemItemRulesBranchesWithBranchItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemRulesBranchesRequestBuilderInternal instantiates a new ItemItemRulesBranchesRequestBuilder and sets the default values. +func NewItemItemRulesBranchesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesBranchesRequestBuilder) { + m := &ItemItemRulesBranchesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules/branches", pathParameters), + } + return m +} +// NewItemItemRulesBranchesRequestBuilder instantiates a new ItemItemRulesBranchesRequestBuilder and sets the default values. +func NewItemItemRulesBranchesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesBranchesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesBranchesRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_rules_branches_with_branch_item_request_builder.go b/pkg/github/repos/item_item_rules_branches_with_branch_item_request_builder.go new file mode 100644 index 0000000..12c6b1f --- /dev/null +++ b/pkg/github/repos/item_item_rules_branches_with_branch_item_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemRulesBranchesWithBranchItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rules\branches\{branch} +type ItemItemRulesBranchesWithBranchItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemRulesBranchesWithBranchItemRequestBuilderGetQueryParameters returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would applyto a branch with that name will be returned. All active rules that apply will be returned, regardless of the levelat which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled"enforcement statuses are not returned. +type ItemItemRulesBranchesWithBranchItemRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemRulesBranchesWithBranchItemRequestBuilderInternal instantiates a new ItemItemRulesBranchesWithBranchItemRequestBuilder and sets the default values. +func NewItemItemRulesBranchesWithBranchItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesBranchesWithBranchItemRequestBuilder) { + m := &ItemItemRulesBranchesWithBranchItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules/branches/{branch}{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemRulesBranchesWithBranchItemRequestBuilder instantiates a new ItemItemRulesBranchesWithBranchItemRequestBuilder and sets the default values. +func NewItemItemRulesBranchesWithBranchItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesBranchesWithBranchItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesBranchesWithBranchItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would applyto a branch with that name will be returned. All active rules that apply will be returned, regardless of the levelat which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled"enforcement statuses are not returned. +// returns a []RepositoryRuleDetailedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#get-rules-for-a-branch +func (m *ItemItemRulesBranchesWithBranchItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesBranchesWithBranchItemRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleDetailedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRuleDetailedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleDetailedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleDetailedable) + } + } + return val, nil +} +// ToGetRequestInformation returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would applyto a branch with that name will be returned. All active rules that apply will be returned, regardless of the levelat which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled"enforcement statuses are not returned. +// returns a *RequestInformation when successful +func (m *ItemItemRulesBranchesWithBranchItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesBranchesWithBranchItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesBranchesWithBranchItemRequestBuilder when successful +func (m *ItemItemRulesBranchesWithBranchItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesBranchesWithBranchItemRequestBuilder) { + return NewItemItemRulesBranchesWithBranchItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_rules_request_builder.go b/pkg/github/repos/item_item_rules_request_builder.go new file mode 100644 index 0000000..7630fad --- /dev/null +++ b/pkg/github/repos/item_item_rules_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemRulesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rules +type ItemItemRulesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Branches the branches property +// returns a *ItemItemRulesBranchesRequestBuilder when successful +func (m *ItemItemRulesRequestBuilder) Branches()(*ItemItemRulesBranchesRequestBuilder) { + return NewItemItemRulesBranchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemRulesRequestBuilderInternal instantiates a new ItemItemRulesRequestBuilder and sets the default values. +func NewItemItemRulesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesRequestBuilder) { + m := &ItemItemRulesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules", pathParameters), + } + return m +} +// NewItemItemRulesRequestBuilder instantiates a new ItemItemRulesRequestBuilder and sets the default values. +func NewItemItemRulesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_rulesets_item_with_ruleset_put_request_body.go b/pkg/github/repos/item_item_rulesets_item_with_ruleset_put_request_body.go new file mode 100644 index 0000000..0c2a563 --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_item_with_ruleset_put_request_body.go @@ -0,0 +1,222 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemRulesetsItemWithRuleset_PutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The actors that can bypass the rules in this ruleset + bypass_actors []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable + // Parameters for a repository ruleset ref name condition + conditions i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + enforcement *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement + // The name of the ruleset. + name *string + // An array of rules within the ruleset. + rules []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable +} +// NewItemItemRulesetsItemWithRuleset_PutRequestBody instantiates a new ItemItemRulesetsItemWithRuleset_PutRequestBody and sets the default values. +func NewItemItemRulesetsItemWithRuleset_PutRequestBody()(*ItemItemRulesetsItemWithRuleset_PutRequestBody) { + m := &ItemItemRulesetsItemWithRuleset_PutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRulesetsItemWithRuleset_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRulesetsItemWithRuleset_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRulesetsItemWithRuleset_PutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassActors gets the bypass_actors property value. The actors that can bypass the rules in this ruleset +// returns a []RepositoryRulesetBypassActorable when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) { + return m.bypass_actors +} +// GetConditions gets the conditions property value. Parameters for a repository ruleset ref name condition +// returns a RepositoryRulesetConditionsable when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable) { + return m.conditions +} +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// returns a *RepositoryRuleEnforcement when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) { + return m.enforcement +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_actors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetBypassActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + } + } + m.SetBypassActors(res) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable)) + } + return nil + } + res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseRepositoryRuleEnforcement) + if err != nil { + return err + } + if val != nil { + m.SetEnforcement(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)) + } + 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["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + } + } + m.SetRules(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the ruleset. +// returns a *string when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetName()(*string) { + return m.name +} +// GetRules gets the rules property value. An array of rules within the ruleset. +// returns a []RepositoryRuleable when successful +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) { + return m.rules +} +// Serialize serializes information the current object +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBypassActors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBypassActors())) + for i, v := range m.GetBypassActors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bypass_actors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + if m.GetEnforcement() != nil { + cast := (*m.GetEnforcement()).String() + err := writer.WriteStringValue("enforcement", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassActors sets the bypass_actors property value. The actors that can bypass the rules in this ruleset +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() { + m.bypass_actors = value +} +// SetConditions sets the conditions property value. Parameters for a repository ruleset ref name condition +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable)() { + m.conditions = value +} +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() { + m.enforcement = value +} +// SetName sets the name property value. The name of the ruleset. +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetName(value *string)() { + m.name = value +} +// SetRules sets the rules property value. An array of rules within the ruleset. +func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() { + m.rules = value +} +type ItemItemRulesetsItemWithRuleset_PutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable) + GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) + GetName()(*string) + GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() + SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable)() + SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() + SetName(value *string)() + SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() +} diff --git a/pkg/github/repos/item_item_rulesets_post_request_body.go b/pkg/github/repos/item_item_rulesets_post_request_body.go new file mode 100644 index 0000000..8fbdb61 --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_post_request_body.go @@ -0,0 +1,222 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemRulesetsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The actors that can bypass the rules in this ruleset + bypass_actors []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable + // Parameters for a repository ruleset ref name condition + conditions i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + enforcement *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement + // The name of the ruleset. + name *string + // An array of rules within the ruleset. + rules []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable +} +// NewItemItemRulesetsPostRequestBody instantiates a new ItemItemRulesetsPostRequestBody and sets the default values. +func NewItemItemRulesetsPostRequestBody()(*ItemItemRulesetsPostRequestBody) { + m := &ItemItemRulesetsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemRulesetsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemRulesetsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemRulesetsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemRulesetsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBypassActors gets the bypass_actors property value. The actors that can bypass the rules in this ruleset +// returns a []RepositoryRulesetBypassActorable when successful +func (m *ItemItemRulesetsPostRequestBody) GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) { + return m.bypass_actors +} +// GetConditions gets the conditions property value. Parameters for a repository ruleset ref name condition +// returns a RepositoryRulesetConditionsable when successful +func (m *ItemItemRulesetsPostRequestBody) GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable) { + return m.conditions +} +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// returns a *RepositoryRuleEnforcement when successful +func (m *ItemItemRulesetsPostRequestBody) GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) { + return m.enforcement +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemRulesetsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bypass_actors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetBypassActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + } + } + m.SetBypassActors(res) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable)) + } + return nil + } + res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseRepositoryRuleEnforcement) + if err != nil { + return err + } + if val != nil { + m.SetEnforcement(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)) + } + 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["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + } + } + m.SetRules(res) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the ruleset. +// returns a *string when successful +func (m *ItemItemRulesetsPostRequestBody) GetName()(*string) { + return m.name +} +// GetRules gets the rules property value. An array of rules within the ruleset. +// returns a []RepositoryRuleable when successful +func (m *ItemItemRulesetsPostRequestBody) GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) { + return m.rules +} +// Serialize serializes information the current object +func (m *ItemItemRulesetsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBypassActors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBypassActors())) + for i, v := range m.GetBypassActors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bypass_actors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + if m.GetEnforcement() != nil { + cast := (*m.GetEnforcement()).String() + err := writer.WriteStringValue("enforcement", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("rules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemRulesetsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBypassActors sets the bypass_actors property value. The actors that can bypass the rules in this ruleset +func (m *ItemItemRulesetsPostRequestBody) SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() { + m.bypass_actors = value +} +// SetConditions sets the conditions property value. Parameters for a repository ruleset ref name condition +func (m *ItemItemRulesetsPostRequestBody) SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable)() { + m.conditions = value +} +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +func (m *ItemItemRulesetsPostRequestBody) SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() { + m.enforcement = value +} +// SetName sets the name property value. The name of the ruleset. +func (m *ItemItemRulesetsPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRules sets the rules property value. An array of rules within the ruleset. +func (m *ItemItemRulesetsPostRequestBody) SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() { + m.rules = value +} +type ItemItemRulesetsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBypassActors()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable) + GetConditions()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable) + GetEnforcement()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement) + GetName()(*string) + GetRules()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable) + SetBypassActors(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetBypassActorable)() + SetConditions(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetConditionsable)() + SetEnforcement(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleEnforcement)() + SetName(value *string)() + SetRules(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRuleable)() +} diff --git a/pkg/github/repos/item_item_rulesets_request_builder.go b/pkg/github/repos/item_item_rulesets_request_builder.go new file mode 100644 index 0000000..f3ec8f1 --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_request_builder.go @@ -0,0 +1,128 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemRulesetsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets +type ItemItemRulesetsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemRulesetsRequestBuilderGetQueryParameters get all the rulesets for a repository. +type ItemItemRulesetsRequestBuilderGetQueryParameters struct { + // Include rulesets configured at higher levels that apply to this repository + Includes_parents *bool `uriparametername:"includes_parents"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRuleset_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.rulesets.item collection +// returns a *ItemItemRulesetsWithRuleset_ItemRequestBuilder when successful +func (m *ItemItemRulesetsRequestBuilder) ByRuleset_id(ruleset_id int32)(*ItemItemRulesetsWithRuleset_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["ruleset_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(ruleset_id), 10) + return NewItemItemRulesetsWithRuleset_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemRulesetsRequestBuilderInternal instantiates a new ItemItemRulesetsRequestBuilder and sets the default values. +func NewItemItemRulesetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsRequestBuilder) { + m := &ItemItemRulesetsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemRulesetsRequestBuilder instantiates a new ItemItemRulesetsRequestBuilder and sets the default values. +func NewItemItemRulesetsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesetsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get all the rulesets for a repository. +// returns a []RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#get-all-repository-rulesets +func (m *ItemItemRulesetsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable) + } + } + return val, nil +} +// Post create a ruleset for a repository. +// returns a RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#create-a-repository-ruleset +func (m *ItemItemRulesetsRequestBuilder) Post(ctx context.Context, body ItemItemRulesetsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable), nil +} +// RuleSuites the ruleSuites property +// returns a *ItemItemRulesetsRuleSuitesRequestBuilder when successful +func (m *ItemItemRulesetsRequestBuilder) RuleSuites()(*ItemItemRulesetsRuleSuitesRequestBuilder) { + return NewItemItemRulesetsRuleSuitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation get all the rulesets for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a ruleset for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemRulesetsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesetsRequestBuilder when successful +func (m *ItemItemRulesetsRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesetsRequestBuilder) { + return NewItemItemRulesetsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_rulesets_rule_suites_request_builder.go b/pkg/github/repos/item_item_rulesets_rule_suites_request_builder.go new file mode 100644 index 0000000..2eb6a37 --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_rule_suites_request_builder.go @@ -0,0 +1,93 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i89e73d086efc86ebad688074e3b9472802ac5a9b821caafcdcb3506fd794d57f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/rulesets/rulesuites" +) + +// ItemItemRulesetsRuleSuitesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\rule-suites +type ItemItemRulesetsRuleSuitesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemRulesetsRuleSuitesRequestBuilderGetQueryParameters lists suites of rule evaluations at the repository level.For more information, see "[Managing rulesets for a repository](https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." +type ItemItemRulesetsRuleSuitesRequestBuilderGetQueryParameters struct { + // The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. + Actor_name *string `uriparametername:"actor_name"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. + Ref *string `uriparametername:"ref"` + // The rule results to filter on. When specified, only suites with this result will be returned. + Rule_suite_result *i89e73d086efc86ebad688074e3b9472802ac5a9b821caafcdcb3506fd794d57f.GetRule_suite_resultQueryParameterType `uriparametername:"rule_suite_result"` + // The time period to filter by.For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + Time_period *i89e73d086efc86ebad688074e3b9472802ac5a9b821caafcdcb3506fd794d57f.GetTime_periodQueryParameterType `uriparametername:"time_period"` +} +// ByRule_suite_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.rulesets.ruleSuites.item collection +// returns a *ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder when successful +func (m *ItemItemRulesetsRuleSuitesRequestBuilder) ByRule_suite_id(rule_suite_id int32)(*ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["rule_suite_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(rule_suite_id), 10) + return NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemRulesetsRuleSuitesRequestBuilderInternal instantiates a new ItemItemRulesetsRuleSuitesRequestBuilder and sets the default values. +func NewItemItemRulesetsRuleSuitesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsRuleSuitesRequestBuilder) { + m := &ItemItemRulesetsRuleSuitesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/rule-suites{?actor_name*,page*,per_page*,ref*,rule_suite_result*,time_period*}", pathParameters), + } + return m +} +// NewItemItemRulesetsRuleSuitesRequestBuilder instantiates a new ItemItemRulesetsRuleSuitesRequestBuilder and sets the default values. +func NewItemItemRulesetsRuleSuitesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsRuleSuitesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesetsRuleSuitesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists suites of rule evaluations at the repository level.For more information, see "[Managing rulesets for a repository](https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." +// returns a []RuleSuitesable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rule-suites#list-repository-rule-suites +func (m *ItemItemRulesetsRuleSuitesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsRuleSuitesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuitesable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRuleSuitesFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuitesable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuitesable) + } + } + return val, nil +} +// ToGetRequestInformation lists suites of rule evaluations at the repository level.For more information, see "[Managing rulesets for a repository](https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsRuleSuitesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsRuleSuitesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesetsRuleSuitesRequestBuilder when successful +func (m *ItemItemRulesetsRuleSuitesRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesetsRuleSuitesRequestBuilder) { + return NewItemItemRulesetsRuleSuitesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_rulesets_rule_suites_with_rule_suite_item_request_builder.go b/pkg/github/repos/item_item_rulesets_rule_suites_with_rule_suite_item_request_builder.go new file mode 100644 index 0000000..d391159 --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_rule_suites_with_rule_suite_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\rule-suites\{rule_suite_id} +type ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal instantiates a new ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder and sets the default values. +func NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + m := &ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/rule-suites/{rule_suite_id}", pathParameters), + } + return m +} +// NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder instantiates a new ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder and sets the default values. +func NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about a suite of rule evaluations from within a repository.For more information, see "[Managing rulesets for a repository](https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." +// returns a RuleSuiteable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rule-suites#get-a-repository-rule-suite +func (m *ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuiteable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRuleSuiteFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RuleSuiteable), nil +} +// ToGetRequestInformation gets information about a suite of rule evaluations from within a repository.For more information, see "[Managing rulesets for a repository](https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder when successful +func (m *ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder) { + return NewItemItemRulesetsRuleSuitesWithRule_suite_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go b/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go new file mode 100644 index 0000000..60b14aa --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go @@ -0,0 +1,134 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemRulesetsWithRuleset_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\{ruleset_id} +type ItemItemRulesetsWithRuleset_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters get a ruleset for a repository. +type ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters struct { + // Include rulesets configured at higher levels that apply to this repository + Includes_parents *bool `uriparametername:"includes_parents"` +} +// NewItemItemRulesetsWithRuleset_ItemRequestBuilderInternal instantiates a new ItemItemRulesetsWithRuleset_ItemRequestBuilder and sets the default values. +func NewItemItemRulesetsWithRuleset_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsWithRuleset_ItemRequestBuilder) { + m := &ItemItemRulesetsWithRuleset_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}{?includes_parents*}", pathParameters), + } + return m +} +// NewItemItemRulesetsWithRuleset_ItemRequestBuilder instantiates a new ItemItemRulesetsWithRuleset_ItemRequestBuilder and sets the default values. +func NewItemItemRulesetsWithRuleset_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsWithRuleset_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesetsWithRuleset_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a ruleset for a repository. +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#delete-a-repository-ruleset +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get a ruleset for a repository. +// returns a RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#get-a-repository-ruleset +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable), nil +} +// Put update a ruleset for a repository. +// returns a RepositoryRulesetable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#update-a-repository-ruleset +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) Put(ctx context.Context, body ItemItemRulesetsItemWithRuleset_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryRulesetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryRulesetable), nil +} +// ToDeleteRequestInformation delete a ruleset for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation get a ruleset for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation update a ruleset for a repository. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemRulesetsItemWithRuleset_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesetsWithRuleset_ItemRequestBuilder when successful +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesetsWithRuleset_ItemRequestBuilder) { + return NewItemItemRulesetsWithRuleset_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_secret_scanning_alerts_item_locations_request_builder.go b/pkg/github/repos/item_item_secret_scanning_alerts_item_locations_request_builder.go new file mode 100644 index 0000000..80fce21 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_alerts_item_locations_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSecretScanningAlertsItemLocationsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\alerts\{alert_number}\locations +type ItemItemSecretScanningAlertsItemLocationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemSecretScanningAlertsItemLocationsRequestBuilderGetQueryParameters lists all locations for a given secret scanning alert for an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +type ItemItemSecretScanningAlertsItemLocationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemSecretScanningAlertsItemLocationsRequestBuilderInternal instantiates a new ItemItemSecretScanningAlertsItemLocationsRequestBuilder and sets the default values. +func NewItemItemSecretScanningAlertsItemLocationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningAlertsItemLocationsRequestBuilder) { + m := &ItemItemSecretScanningAlertsItemLocationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts/{alert_number}/locations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemSecretScanningAlertsItemLocationsRequestBuilder instantiates a new ItemItemSecretScanningAlertsItemLocationsRequestBuilder and sets the default values. +func NewItemItemSecretScanningAlertsItemLocationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningAlertsItemLocationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecretScanningAlertsItemLocationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all locations for a given secret scanning alert for an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a []SecretScanningLocationable when successful +// returns a Locations503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert +func (m *ItemItemSecretScanningAlertsItemLocationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSecretScanningAlertsItemLocationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningLocationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLocations503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSecretScanningLocationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningLocationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningLocationable) + } + } + return val, nil +} +// ToGetRequestInformation lists all locations for a given secret scanning alert for an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemSecretScanningAlertsItemLocationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSecretScanningAlertsItemLocationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecretScanningAlertsItemLocationsRequestBuilder when successful +func (m *ItemItemSecretScanningAlertsItemLocationsRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecretScanningAlertsItemLocationsRequestBuilder) { + return NewItemItemSecretScanningAlertsItemLocationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_secret_scanning_alerts_item_with_alert_number_patch_request_body.go b/pkg/github/repos/item_item_secret_scanning_alerts_item_with_alert_number_patch_request_body.go new file mode 100644 index 0000000..b977f8b --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_alerts_item_with_alert_number_patch_request_body.go @@ -0,0 +1,141 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // **Required when the `state` is `resolved`.** The reason for resolving the alert. + resolution *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertResolution + // An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. + resolution_comment *string + // Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + state *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertState +} +// NewItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody instantiates a new ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody and sets the default values. +func NewItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody()(*ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) { + m := &ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["resolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseSecretScanningAlertResolution) + if err != nil { + return err + } + if val != nil { + m.SetResolution(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertResolution)) + } + return nil + } + res["resolution_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResolutionComment(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParseSecretScanningAlertState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertState)) + } + return nil + } + return res +} +// GetResolution gets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. +// returns a *SecretScanningAlertResolution when successful +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) GetResolution()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertResolution) { + return m.resolution +} +// GetResolutionComment gets the resolution_comment property value. An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. +// returns a *string when successful +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) GetResolutionComment()(*string) { + return m.resolution_comment +} +// GetState gets the state property value. Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +// returns a *SecretScanningAlertState when successful +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) GetState()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertState) { + return m.state +} +// Serialize serializes information the current object +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetResolution() != nil { + cast := (*m.GetResolution()).String() + err := writer.WriteStringValue("resolution", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resolution_comment", m.GetResolutionComment()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetResolution sets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) SetResolution(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertResolution)() { + m.resolution = value +} +// SetResolutionComment sets the resolution_comment property value. An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) SetResolutionComment(value *string)() { + m.resolution_comment = value +} +// SetState sets the state property value. Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. +func (m *ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBody) SetState(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertState)() { + m.state = value +} +type ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResolution()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertResolution) + GetResolutionComment()(*string) + GetState()(*i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertState) + SetResolution(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertResolution)() + SetResolutionComment(value *string)() + SetState(value *i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertState)() +} diff --git a/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go b/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go new file mode 100644 index 0000000..2e157c6 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go @@ -0,0 +1,99 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i8c1d6b64f2513a548228c82e3fd4419e0cd0179685919cf2f705eb427004e7dc "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/secretscanning/alerts" +) + +// ItemItemSecretScanningAlertsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\alerts +type ItemItemSecretScanningAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemSecretScanningAlertsRequestBuilderGetQueryParameters lists secret scanning alerts for an eligible repository, from newest to oldest.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +type ItemItemSecretScanningAlertsRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i8c1d6b64f2513a548228c82e3fd4419e0cd0179685919cf2f705eb427004e7dc.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. + Resolution *string `uriparametername:"resolution"` + // A comma-separated list of secret types to return. By default all secret types are returned.See "[Secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)"for a complete list of secret types. + Secret_type *string `uriparametername:"secret_type"` + // The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + Sort *i8c1d6b64f2513a548228c82e3fd4419e0cd0179685919cf2f705eb427004e7dc.GetSortQueryParameterType `uriparametername:"sort"` + // Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + State *i8c1d6b64f2513a548228c82e3fd4419e0cd0179685919cf2f705eb427004e7dc.GetStateQueryParameterType `uriparametername:"state"` + // A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. + Validity *string `uriparametername:"validity"` +} +// ByAlert_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.secretScanning.alerts.item collection +// returns a *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder when successful +func (m *ItemItemSecretScanningAlertsRequestBuilder) ByAlert_number(alert_number int32)(*ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["alert_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(alert_number), 10) + return NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemSecretScanningAlertsRequestBuilderInternal instantiates a new ItemItemSecretScanningAlertsRequestBuilder and sets the default values. +func NewItemItemSecretScanningAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningAlertsRequestBuilder) { + m := &ItemItemSecretScanningAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts{?after*,before*,direction*,page*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", pathParameters), + } + return m +} +// NewItemItemSecretScanningAlertsRequestBuilder instantiates a new ItemItemSecretScanningAlertsRequestBuilder and sets the default values. +func NewItemItemSecretScanningAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecretScanningAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists secret scanning alerts for an eligible repository, from newest to oldest.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a []SecretScanningAlertable when successful +// returns a Alerts503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository +func (m *ItemItemSecretScanningAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSecretScanningAlertsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAlerts503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSecretScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable) + } + } + return val, nil +} +// ToGetRequestInformation lists secret scanning alerts for an eligible repository, from newest to oldest.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemSecretScanningAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSecretScanningAlertsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecretScanningAlertsRequestBuilder when successful +func (m *ItemItemSecretScanningAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecretScanningAlertsRequestBuilder) { + return NewItemItemSecretScanningAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_secret_scanning_alerts_with_alert_number_item_request_builder.go b/pkg/github/repos/item_item_secret_scanning_alerts_with_alert_number_item_request_builder.go new file mode 100644 index 0000000..b770228 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_alerts_with_alert_number_item_request_builder.go @@ -0,0 +1,101 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\alerts\{alert_number} +type ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilderInternal instantiates a new ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder and sets the default values. +func NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) { + m := &ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts/{alert_number}", pathParameters), + } + return m +} +// NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder instantiates a new ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder and sets the default values. +func NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a single secret scanning alert detected in an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a SecretScanningAlertable when successful +// returns a SecretScanningAlert503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#get-a-secret-scanning-alert +func (m *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSecretScanningAlert503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSecretScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable), nil +} +// Locations the locations property +// returns a *ItemItemSecretScanningAlertsItemLocationsRequestBuilder when successful +func (m *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) Locations()(*ItemItemSecretScanningAlertsItemLocationsRequestBuilder) { + return NewItemItemSecretScanningAlertsItemLocationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch updates the status of a secret scanning alert in an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a SecretScanningAlertable when successful +// returns a SecretScanningAlert503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#update-a-secret-scanning-alert +func (m *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) Patch(ctx context.Context, body ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSecretScanningAlert503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSecretScanningAlertFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SecretScanningAlertable), nil +} +// ToGetRequestInformation gets a single secret scanning alert detected in an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates the status of a secret scanning alert in an eligible repository.The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemSecretScanningAlertsItemWithAlert_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder when successful +func (m *ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder) { + return NewItemItemSecretScanningAlertsWithAlert_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_secret_scanning_request_builder.go b/pkg/github/repos/item_item_secret_scanning_request_builder.go new file mode 100644 index 0000000..6231e77 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_request_builder.go @@ -0,0 +1,28 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemSecretScanningRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning +type ItemItemSecretScanningRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Alerts the alerts property +// returns a *ItemItemSecretScanningAlertsRequestBuilder when successful +func (m *ItemItemSecretScanningRequestBuilder) Alerts()(*ItemItemSecretScanningAlertsRequestBuilder) { + return NewItemItemSecretScanningAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemSecretScanningRequestBuilderInternal instantiates a new ItemItemSecretScanningRequestBuilder and sets the default values. +func NewItemItemSecretScanningRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningRequestBuilder) { + m := &ItemItemSecretScanningRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning", pathParameters), + } + return m +} +// NewItemItemSecretScanningRequestBuilder instantiates a new ItemItemSecretScanningRequestBuilder and sets the default values. +func NewItemItemSecretScanningRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecretScanningRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_security_advisories_item_cve_post_response.go b/pkg/github/repos/item_item_security_advisories_item_cve_post_response.go new file mode 100644 index 0000000..3d59cbf --- /dev/null +++ b/pkg/github/repos/item_item_security_advisories_item_cve_post_response.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemSecurityAdvisoriesItemCvePostResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemSecurityAdvisoriesItemCvePostResponse instantiates a new ItemItemSecurityAdvisoriesItemCvePostResponse and sets the default values. +func NewItemItemSecurityAdvisoriesItemCvePostResponse()(*ItemItemSecurityAdvisoriesItemCvePostResponse) { + m := &ItemItemSecurityAdvisoriesItemCvePostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemSecurityAdvisoriesItemCvePostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemSecurityAdvisoriesItemCvePostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemSecurityAdvisoriesItemCvePostResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemSecurityAdvisoriesItemCvePostResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemSecurityAdvisoriesItemCvePostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemSecurityAdvisoriesItemCvePostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemSecurityAdvisoriesItemCvePostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemSecurityAdvisoriesItemCvePostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_security_advisories_item_cve_request_builder.go b/pkg/github/repos/item_item_security_advisories_item_cve_request_builder.go new file mode 100644 index 0000000..7c8523a --- /dev/null +++ b/pkg/github/repos/item_item_security_advisories_item_cve_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSecurityAdvisoriesItemCveRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\{ghsa_id}\cve +type ItemItemSecurityAdvisoriesItemCveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecurityAdvisoriesItemCveRequestBuilderInternal instantiates a new ItemItemSecurityAdvisoriesItemCveRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesItemCveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesItemCveRequestBuilder) { + m := &ItemItemSecurityAdvisoriesItemCveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}/cve", pathParameters), + } + return m +} +// NewItemItemSecurityAdvisoriesItemCveRequestBuilder instantiates a new ItemItemSecurityAdvisoriesItemCveRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesItemCveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesItemCveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecurityAdvisoriesItemCveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post if you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "[Requesting a CVE identification number](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#requesting-a-cve-identification-number-optional)."You may request a CVE for public repositories, but cannot do so for private repositories.In order to request a CVE for a repository security advisory, the authenticated user must be a security manager or administrator of that repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a ItemItemSecurityAdvisoriesItemCvePostResponseable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#request-a-cve-for-a-repository-security-advisory +func (m *ItemItemSecurityAdvisoriesItemCveRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemSecurityAdvisoriesItemCvePostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemSecurityAdvisoriesItemCvePostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemSecurityAdvisoriesItemCvePostResponseable), nil +} +// ToPostRequestInformation if you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "[Requesting a CVE identification number](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#requesting-a-cve-identification-number-optional)."You may request a CVE for public repositories, but cannot do so for private repositories.In order to request a CVE for a repository security advisory, the authenticated user must be a security manager or administrator of that repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesItemCveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecurityAdvisoriesItemCveRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesItemCveRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecurityAdvisoriesItemCveRequestBuilder) { + return NewItemItemSecurityAdvisoriesItemCveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_security_advisories_item_forks_request_builder.go b/pkg/github/repos/item_item_security_advisories_item_forks_request_builder.go new file mode 100644 index 0000000..8da567a --- /dev/null +++ b/pkg/github/repos/item_item_security_advisories_item_forks_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSecurityAdvisoriesItemForksRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\{ghsa_id}\forks +type ItemItemSecurityAdvisoriesItemForksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal instantiates a new ItemItemSecurityAdvisoriesItemForksRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + m := &ItemItemSecurityAdvisoriesItemForksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}/forks", pathParameters), + } + return m +} +// NewItemItemSecurityAdvisoriesItemForksRequestBuilder instantiates a new ItemItemSecurityAdvisoriesItemForksRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesItemForksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal(urlParams, requestAdapter) +} +// Post create a temporary private fork to collaborate on fixing a security vulnerability in your repository.**Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. +// returns a FullRepositoryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#create-a-temporary-private-fork +func (m *ItemItemSecurityAdvisoriesItemForksRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// ToPostRequestInformation create a temporary private fork to collaborate on fixing a security vulnerability in your repository.**Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesItemForksRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecurityAdvisoriesItemForksRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesItemForksRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + return NewItemItemSecurityAdvisoriesItemForksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_security_advisories_reports_request_builder.go b/pkg/github/repos/item_item_security_advisories_reports_request_builder.go new file mode 100644 index 0000000..027b8e8 --- /dev/null +++ b/pkg/github/repos/item_item_security_advisories_reports_request_builder.go @@ -0,0 +1,69 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSecurityAdvisoriesReportsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\reports +type ItemItemSecurityAdvisoriesReportsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecurityAdvisoriesReportsRequestBuilderInternal instantiates a new ItemItemSecurityAdvisoriesReportsRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesReportsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesReportsRequestBuilder) { + m := &ItemItemSecurityAdvisoriesReportsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/reports", pathParameters), + } + return m +} +// NewItemItemSecurityAdvisoriesReportsRequestBuilder instantiates a new ItemItemSecurityAdvisoriesReportsRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesReportsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesReportsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecurityAdvisoriesReportsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post report a security vulnerability to the maintainers of the repository.See "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. +// returns a RepositoryAdvisoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability +func (m *ItemItemSecurityAdvisoriesReportsRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateVulnerabilityReportCreateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable), nil +} +// ToPostRequestInformation report a security vulnerability to the maintainers of the repository.See "[Privately reporting a security vulnerability](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesReportsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateVulnerabilityReportCreateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecurityAdvisoriesReportsRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesReportsRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecurityAdvisoriesReportsRequestBuilder) { + return NewItemItemSecurityAdvisoriesReportsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_security_advisories_request_builder.go b/pkg/github/repos/item_item_security_advisories_request_builder.go new file mode 100644 index 0000000..675379a --- /dev/null +++ b/pkg/github/repos/item_item_security_advisories_request_builder.go @@ -0,0 +1,138 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i8538eb1710564ac0aee49baa10f67b9b15e4f7272bcddf4eacdfacc69dbe287a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/securityadvisories" +) + +// ItemItemSecurityAdvisoriesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories +type ItemItemSecurityAdvisoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemSecurityAdvisoriesRequestBuilderGetQueryParameters lists security advisories in a repository.The authenticated user can access unpublished security advisories from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on any security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. +type ItemItemSecurityAdvisoriesRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The direction to sort the results by. + Direction *i8538eb1710564ac0aee49baa10f67b9b15e4f7272bcddf4eacdfacc69dbe287a.GetDirectionQueryParameterType `uriparametername:"direction"` + // The number of advisories to return per page. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. + Sort *i8538eb1710564ac0aee49baa10f67b9b15e4f7272bcddf4eacdfacc69dbe287a.GetSortQueryParameterType `uriparametername:"sort"` + // Filter by state of the repository advisories. Only advisories of this state will be returned. + State *i8538eb1710564ac0aee49baa10f67b9b15e4f7272bcddf4eacdfacc69dbe287a.GetStateQueryParameterType `uriparametername:"state"` +} +// ByGhsa_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.securityAdvisories.item collection +// returns a *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesRequestBuilder) ByGhsa_id(ghsa_id string)(*ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ghsa_id != "" { + urlTplParams["ghsa_id"] = ghsa_id + } + return NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemSecurityAdvisoriesRequestBuilderInternal instantiates a new ItemItemSecurityAdvisoriesRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesRequestBuilder) { + m := &ItemItemSecurityAdvisoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories{?after*,before*,direction*,per_page*,sort*,state*}", pathParameters), + } + return m +} +// NewItemItemSecurityAdvisoriesRequestBuilder instantiates a new ItemItemSecurityAdvisoriesRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecurityAdvisoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists security advisories in a repository.The authenticated user can access unpublished security advisories from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on any security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. +// returns a []RepositoryAdvisoryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#list-repository-security-advisories +func (m *ItemItemSecurityAdvisoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSecurityAdvisoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable) + } + } + return val, nil +} +// Post creates a new repository security advisory.In order to create a draft repository security advisory, the authenticated user must be a security manager or administrator of that repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a RepositoryAdvisoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#create-a-repository-security-advisory +func (m *ItemItemSecurityAdvisoriesRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryCreateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable), nil +} +// Reports the reports property +// returns a *ItemItemSecurityAdvisoriesReportsRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesRequestBuilder) Reports()(*ItemItemSecurityAdvisoriesReportsRequestBuilder) { + return NewItemItemSecurityAdvisoriesReportsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists security advisories in a repository.The authenticated user can access unpublished security advisories from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on any security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSecurityAdvisoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new repository security advisory.In order to create a draft repository security advisory, the authenticated user must be a security manager or administrator of that repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryCreateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecurityAdvisoriesRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecurityAdvisoriesRequestBuilder) { + return NewItemItemSecurityAdvisoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_security_advisories_with_ghsa_item_request_builder.go b/pkg/github/repos/item_item_security_advisories_with_ghsa_item_request_builder.go new file mode 100644 index 0000000..339f451 --- /dev/null +++ b/pkg/github/repos/item_item_security_advisories_with_ghsa_item_request_builder.go @@ -0,0 +1,112 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\{ghsa_id} +type ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilderInternal instantiates a new ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) { + m := &ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}", pathParameters), + } + return m +} +// NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder instantiates a new ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Cve the cve property +// returns a *ItemItemSecurityAdvisoriesItemCveRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) Cve()(*ItemItemSecurityAdvisoriesItemCveRequestBuilder) { + return NewItemItemSecurityAdvisoriesItemCveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Forks the forks property +// returns a *ItemItemSecurityAdvisoriesItemForksRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) Forks()(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + return NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a repository security advisory using its GitHub Security Advisory (GHSA) identifier.Anyone can access any published security advisory on a public repository.The authenticated user can access an unpublished security advisory from a repository if they are a security manager or administrator of that repository, or if they are acollaborator on the security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. +// returns a RepositoryAdvisoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#get-a-repository-security-advisory +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable), nil +} +// Patch update a repository security advisory using its GitHub Security Advisory (GHSA) identifier.In order to update any security advisory, the authenticated user must be a security manager or administrator of that repository,or a collaborator on the repository security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a RepositoryAdvisoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/security-advisories/repository-advisories#update-a-repository-security-advisory +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryUpdateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryAdvisoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryable), nil +} +// ToGetRequestInformation get a repository security advisory using its GitHub Security Advisory (GHSA) identifier.Anyone can access any published security advisory on a public repository.The authenticated user can access an unpublished security advisory from a repository if they are a security manager or administrator of that repository, or if they are acollaborator on the security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update a repository security advisory using its GitHub Security Advisory (GHSA) identifier.In order to update any security advisory, the authenticated user must be a security manager or administrator of that repository,or a collaborator on the repository security advisory.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryAdvisoryUpdateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder when successful +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) { + return NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stargazers_request_builder.go b/pkg/github/repos/item_item_stargazers_request_builder.go new file mode 100644 index 0000000..5575059 --- /dev/null +++ b/pkg/github/repos/item_item_stargazers_request_builder.go @@ -0,0 +1,175 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemStargazersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stargazers +type ItemItemStargazersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemStargazersRequestBuilderGetQueryParameters lists the people that have starred the repository.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +type ItemItemStargazersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// StargazersGetResponse composed type wrapper for classes []ItemItemStargazersSimpleUserable, []ItemItemStargazersStargazerable +type StargazersGetResponse struct { + // Composed type representation for type []ItemItemStargazersSimpleUserable + itemItemStargazersSimpleUser []ItemItemStargazersSimpleUserable + // Composed type representation for type []ItemItemStargazersStargazerable + itemItemStargazersStargazer []ItemItemStargazersStargazerable +} +// NewStargazersGetResponse instantiates a new StargazersGetResponse and sets the default values. +func NewStargazersGetResponse()(*StargazersGetResponse) { + m := &StargazersGetResponse{ + } + return m +} +// CreateStargazersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStargazersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStargazersGetResponse() + if parseNode != nil { + if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemStargazersSimpleUserFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemItemStargazersSimpleUserable, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemItemStargazersSimpleUserable) + } + } + result.SetItemItemStargazersSimpleUser(cast) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemStargazersStargazerFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemItemStargazersStargazerable, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemItemStargazersStargazerable) + } + } + result.SetItemItemStargazersStargazer(cast) + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StargazersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StargazersGetResponse) GetIsComposedType()(bool) { + return true +} +// GetItemItemStargazersSimpleUser gets the ItemItemStargazersSimpleUser property value. Composed type representation for type []ItemItemStargazersSimpleUserable +// returns a []ItemItemStargazersSimpleUserable when successful +func (m *StargazersGetResponse) GetItemItemStargazersSimpleUser()([]ItemItemStargazersSimpleUserable) { + return m.itemItemStargazersSimpleUser +} +// GetItemItemStargazersStargazer gets the ItemItemStargazersStargazer property value. Composed type representation for type []ItemItemStargazersStargazerable +// returns a []ItemItemStargazersStargazerable when successful +func (m *StargazersGetResponse) GetItemItemStargazersStargazer()([]ItemItemStargazersStargazerable) { + return m.itemItemStargazersStargazer +} +// Serialize serializes information the current object +func (m *StargazersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemItemStargazersSimpleUser() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemItemStargazersSimpleUser())) + for i, v := range m.GetItemItemStargazersSimpleUser() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } else if m.GetItemItemStargazersStargazer() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemItemStargazersStargazer())) + for i, v := range m.GetItemItemStargazersStargazer() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } + return nil +} +// SetItemItemStargazersSimpleUser sets the ItemItemStargazersSimpleUser property value. Composed type representation for type []ItemItemStargazersSimpleUserable +func (m *StargazersGetResponse) SetItemItemStargazersSimpleUser(value []ItemItemStargazersSimpleUserable)() { + m.itemItemStargazersSimpleUser = value +} +// SetItemItemStargazersStargazer sets the ItemItemStargazersStargazer property value. Composed type representation for type []ItemItemStargazersStargazerable +func (m *StargazersGetResponse) SetItemItemStargazersStargazer(value []ItemItemStargazersStargazerable)() { + m.itemItemStargazersStargazer = value +} +type StargazersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemItemStargazersSimpleUser()([]ItemItemStargazersSimpleUserable) + GetItemItemStargazersStargazer()([]ItemItemStargazersStargazerable) + SetItemItemStargazersSimpleUser(value []ItemItemStargazersSimpleUserable)() + SetItemItemStargazersStargazer(value []ItemItemStargazersStargazerable)() +} +// NewItemItemStargazersRequestBuilderInternal instantiates a new ItemItemStargazersRequestBuilder and sets the default values. +func NewItemItemStargazersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStargazersRequestBuilder) { + m := &ItemItemStargazersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stargazers{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemStargazersRequestBuilder instantiates a new ItemItemStargazersRequestBuilder and sets the default values. +func NewItemItemStargazersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStargazersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStargazersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the people that have starred the repository.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +// returns a StargazersGetResponseable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/starring#list-stargazers +func (m *ItemItemStargazersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemStargazersRequestBuilderGetQueryParameters])(StargazersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateStargazersGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(StargazersGetResponseable), nil +} +// ToGetRequestInformation lists the people that have starred the repository.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +// returns a *RequestInformation when successful +func (m *ItemItemStargazersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemStargazersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStargazersRequestBuilder when successful +func (m *ItemItemStargazersRequestBuilder) WithUrl(rawUrl string)(*ItemItemStargazersRequestBuilder) { + return NewItemItemStargazersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stargazers_simple_user.go b/pkg/github/repos/item_item_stargazers_simple_user.go new file mode 100644 index 0000000..1799046 --- /dev/null +++ b/pkg/github/repos/item_item_stargazers_simple_user.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemStargazersSimpleUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemStargazersSimpleUser instantiates a new ItemItemStargazersSimpleUser and sets the default values. +func NewItemItemStargazersSimpleUser()(*ItemItemStargazersSimpleUser) { + m := &ItemItemStargazersSimpleUser{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemStargazersSimpleUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemStargazersSimpleUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemStargazersSimpleUser(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemStargazersSimpleUser) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemStargazersSimpleUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemStargazersSimpleUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemStargazersSimpleUser) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemStargazersSimpleUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_stargazers_stargazer.go b/pkg/github/repos/item_item_stargazers_stargazer.go new file mode 100644 index 0000000..d8cc702 --- /dev/null +++ b/pkg/github/repos/item_item_stargazers_stargazer.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemStargazersStargazer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemStargazersStargazer instantiates a new ItemItemStargazersStargazer and sets the default values. +func NewItemItemStargazersStargazer()(*ItemItemStargazersStargazer) { + m := &ItemItemStargazersStargazer{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemStargazersStargazerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemStargazersStargazerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemStargazersStargazer(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemStargazersStargazer) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemStargazersStargazer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemStargazersStargazer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemStargazersStargazer) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemStargazersStargazerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_stats_code_frequency_request_builder.go b/pkg/github/repos/item_item_stats_code_frequency_request_builder.go new file mode 100644 index 0000000..54b517c --- /dev/null +++ b/pkg/github/repos/item_item_stats_code_frequency_request_builder.go @@ -0,0 +1,59 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemStatsCode_frequencyRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\code_frequency +type ItemItemStatsCode_frequencyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemStatsCode_frequencyRequestBuilderInternal instantiates a new ItemItemStatsCode_frequencyRequestBuilder and sets the default values. +func NewItemItemStatsCode_frequencyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsCode_frequencyRequestBuilder) { + m := &ItemItemStatsCode_frequencyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/code_frequency", pathParameters), + } + return m +} +// NewItemItemStatsCode_frequencyRequestBuilder instantiates a new ItemItemStatsCode_frequencyRequestBuilder and sets the default values. +func NewItemItemStatsCode_frequencyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsCode_frequencyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatsCode_frequencyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns a weekly aggregate of the number of additions and deletions pushed to a repository.**Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains10,000 or more commits, a 422 status code will be returned. +// returns a []int32 when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/statistics#get-the-weekly-commit-activity +func (m *ItemItemStatsCode_frequencyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "int32", nil) + if err != nil { + return nil, err + } + val := make([]int32, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*int32)) + } + } + return val, nil +} +// ToGetRequestInformation returns a weekly aggregate of the number of additions and deletions pushed to a repository.**Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains10,000 or more commits, a 422 status code will be returned. +// returns a *RequestInformation when successful +func (m *ItemItemStatsCode_frequencyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStatsCode_frequencyRequestBuilder when successful +func (m *ItemItemStatsCode_frequencyRequestBuilder) WithUrl(rawUrl string)(*ItemItemStatsCode_frequencyRequestBuilder) { + return NewItemItemStatsCode_frequencyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stats_commit_activity_request_builder.go b/pkg/github/repos/item_item_stats_commit_activity_request_builder.go new file mode 100644 index 0000000..eb2889d --- /dev/null +++ b/pkg/github/repos/item_item_stats_commit_activity_request_builder.go @@ -0,0 +1,60 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemStatsCommit_activityRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\commit_activity +type ItemItemStatsCommit_activityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemStatsCommit_activityRequestBuilderInternal instantiates a new ItemItemStatsCommit_activityRequestBuilder and sets the default values. +func NewItemItemStatsCommit_activityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsCommit_activityRequestBuilder) { + m := &ItemItemStatsCommit_activityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/commit_activity", pathParameters), + } + return m +} +// NewItemItemStatsCommit_activityRequestBuilder instantiates a new ItemItemStatsCommit_activityRequestBuilder and sets the default values. +func NewItemItemStatsCommit_activityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsCommit_activityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatsCommit_activityRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. +// returns a []CommitActivityable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/statistics#get-the-last-year-of-commit-activity +func (m *ItemItemStatsCommit_activityRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitActivityable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitActivityFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitActivityable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitActivityable) + } + } + return val, nil +} +// ToGetRequestInformation returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. +// returns a *RequestInformation when successful +func (m *ItemItemStatsCommit_activityRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStatsCommit_activityRequestBuilder when successful +func (m *ItemItemStatsCommit_activityRequestBuilder) WithUrl(rawUrl string)(*ItemItemStatsCommit_activityRequestBuilder) { + return NewItemItemStatsCommit_activityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stats_contributors_request_builder.go b/pkg/github/repos/item_item_stats_contributors_request_builder.go new file mode 100644 index 0000000..ca0fcce --- /dev/null +++ b/pkg/github/repos/item_item_stats_contributors_request_builder.go @@ -0,0 +1,60 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemStatsContributorsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\contributors +type ItemItemStatsContributorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemStatsContributorsRequestBuilderInternal instantiates a new ItemItemStatsContributorsRequestBuilder and sets the default values. +func NewItemItemStatsContributorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsContributorsRequestBuilder) { + m := &ItemItemStatsContributorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/contributors", pathParameters), + } + return m +} +// NewItemItemStatsContributorsRequestBuilder instantiates a new ItemItemStatsContributorsRequestBuilder and sets the default values. +func NewItemItemStatsContributorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsContributorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatsContributorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:* `w` - Start of the week, given as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).* `a` - Number of additions* `d` - Number of deletions* `c` - Number of commits**Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. +// returns a []ContributorActivityable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/statistics#get-all-contributor-commit-activity +func (m *ItemItemStatsContributorsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContributorActivityable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateContributorActivityFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContributorActivityable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContributorActivityable) + } + } + return val, nil +} +// ToGetRequestInformation returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:* `w` - Start of the week, given as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).* `a` - Number of additions* `d` - Number of deletions* `c` - Number of commits**Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. +// returns a *RequestInformation when successful +func (m *ItemItemStatsContributorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStatsContributorsRequestBuilder when successful +func (m *ItemItemStatsContributorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemStatsContributorsRequestBuilder) { + return NewItemItemStatsContributorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stats_participation_request_builder.go b/pkg/github/repos/item_item_stats_participation_request_builder.go new file mode 100644 index 0000000..7af355b --- /dev/null +++ b/pkg/github/repos/item_item_stats_participation_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemStatsParticipationRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\participation +type ItemItemStatsParticipationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemStatsParticipationRequestBuilderInternal instantiates a new ItemItemStatsParticipationRequestBuilder and sets the default values. +func NewItemItemStatsParticipationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsParticipationRequestBuilder) { + m := &ItemItemStatsParticipationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/participation", pathParameters), + } + return m +} +// NewItemItemStatsParticipationRequestBuilder instantiates a new ItemItemStatsParticipationRequestBuilder and sets the default values. +func NewItemItemStatsParticipationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsParticipationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatsParticipationRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.The array order is oldest week (index 0) to most recent week.The most recent week is seven days ago at UTC midnight to today at UTC midnight. +// returns a ParticipationStatsable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/statistics#get-the-weekly-commit-count +func (m *ItemItemStatsParticipationRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParticipationStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateParticipationStatsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ParticipationStatsable), nil +} +// ToGetRequestInformation returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.The array order is oldest week (index 0) to most recent week.The most recent week is seven days ago at UTC midnight to today at UTC midnight. +// returns a *RequestInformation when successful +func (m *ItemItemStatsParticipationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStatsParticipationRequestBuilder when successful +func (m *ItemItemStatsParticipationRequestBuilder) WithUrl(rawUrl string)(*ItemItemStatsParticipationRequestBuilder) { + return NewItemItemStatsParticipationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stats_punch_card_request_builder.go b/pkg/github/repos/item_item_stats_punch_card_request_builder.go new file mode 100644 index 0000000..acb03c7 --- /dev/null +++ b/pkg/github/repos/item_item_stats_punch_card_request_builder.go @@ -0,0 +1,59 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemStatsPunch_cardRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\punch_card +type ItemItemStatsPunch_cardRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemStatsPunch_cardRequestBuilderInternal instantiates a new ItemItemStatsPunch_cardRequestBuilder and sets the default values. +func NewItemItemStatsPunch_cardRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsPunch_cardRequestBuilder) { + m := &ItemItemStatsPunch_cardRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/punch_card", pathParameters), + } + return m +} +// NewItemItemStatsPunch_cardRequestBuilder instantiates a new ItemItemStatsPunch_cardRequestBuilder and sets the default values. +func NewItemItemStatsPunch_cardRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsPunch_cardRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatsPunch_cardRequestBuilderInternal(urlParams, requestAdapter) +} +// Get each array contains the day number, hour number, and number of commits:* `0-6`: Sunday - Saturday* `0-23`: Hour of day* Number of commitsFor example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. +// returns a []int32 when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/statistics#get-the-hourly-commit-count-for-each-day +func (m *ItemItemStatsPunch_cardRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "int32", nil) + if err != nil { + return nil, err + } + val := make([]int32, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*int32)) + } + } + return val, nil +} +// ToGetRequestInformation each array contains the day number, hour number, and number of commits:* `0-6`: Sunday - Saturday* `0-23`: Hour of day* Number of commitsFor example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. +// returns a *RequestInformation when successful +func (m *ItemItemStatsPunch_cardRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStatsPunch_cardRequestBuilder when successful +func (m *ItemItemStatsPunch_cardRequestBuilder) WithUrl(rawUrl string)(*ItemItemStatsPunch_cardRequestBuilder) { + return NewItemItemStatsPunch_cardRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_stats_request_builder.go b/pkg/github/repos/item_item_stats_request_builder.go new file mode 100644 index 0000000..d4f3a3d --- /dev/null +++ b/pkg/github/repos/item_item_stats_request_builder.go @@ -0,0 +1,48 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemStatsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats +type ItemItemStatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Code_frequency the code_frequency property +// returns a *ItemItemStatsCode_frequencyRequestBuilder when successful +func (m *ItemItemStatsRequestBuilder) Code_frequency()(*ItemItemStatsCode_frequencyRequestBuilder) { + return NewItemItemStatsCode_frequencyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commit_activity the commit_activity property +// returns a *ItemItemStatsCommit_activityRequestBuilder when successful +func (m *ItemItemStatsRequestBuilder) Commit_activity()(*ItemItemStatsCommit_activityRequestBuilder) { + return NewItemItemStatsCommit_activityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemStatsRequestBuilderInternal instantiates a new ItemItemStatsRequestBuilder and sets the default values. +func NewItemItemStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsRequestBuilder) { + m := &ItemItemStatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats", pathParameters), + } + return m +} +// NewItemItemStatsRequestBuilder instantiates a new ItemItemStatsRequestBuilder and sets the default values. +func NewItemItemStatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatsRequestBuilderInternal(urlParams, requestAdapter) +} +// Contributors the contributors property +// returns a *ItemItemStatsContributorsRequestBuilder when successful +func (m *ItemItemStatsRequestBuilder) Contributors()(*ItemItemStatsContributorsRequestBuilder) { + return NewItemItemStatsContributorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Participation the participation property +// returns a *ItemItemStatsParticipationRequestBuilder when successful +func (m *ItemItemStatsRequestBuilder) Participation()(*ItemItemStatsParticipationRequestBuilder) { + return NewItemItemStatsParticipationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Punch_card the punch_card property +// returns a *ItemItemStatsPunch_cardRequestBuilder when successful +func (m *ItemItemStatsRequestBuilder) Punch_card()(*ItemItemStatsPunch_cardRequestBuilder) { + return NewItemItemStatsPunch_cardRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_statuses_item_with_sha_post_request_body.go b/pkg/github/repos/item_item_statuses_item_with_sha_post_request_body.go new file mode 100644 index 0000000..d19bc06 --- /dev/null +++ b/pkg/github/repos/item_item_statuses_item_with_sha_post_request_body.go @@ -0,0 +1,140 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemStatusesItemWithShaPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A string label to differentiate this status from the status of other systems. This field is case-insensitive. + context *string + // A short description of the status. + description *string + // The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: `http://ci.example.com/user/repo/build/sha` + target_url *string +} +// NewItemItemStatusesItemWithShaPostRequestBody instantiates a new ItemItemStatusesItemWithShaPostRequestBody and sets the default values. +func NewItemItemStatusesItemWithShaPostRequestBody()(*ItemItemStatusesItemWithShaPostRequestBody) { + m := &ItemItemStatusesItemWithShaPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + contextValue := "default" + m.SetContext(&contextValue) + return m +} +// CreateItemItemStatusesItemWithShaPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemStatusesItemWithShaPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemStatusesItemWithShaPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemStatusesItemWithShaPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetContext gets the context property value. A string label to differentiate this status from the status of other systems. This field is case-insensitive. +// returns a *string when successful +func (m *ItemItemStatusesItemWithShaPostRequestBody) GetContext()(*string) { + return m.context +} +// GetDescription gets the description property value. A short description of the status. +// returns a *string when successful +func (m *ItemItemStatusesItemWithShaPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemStatusesItemWithShaPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(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["target_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + return res +} +// GetTargetUrl gets the target_url property value. The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: `http://ci.example.com/user/repo/build/sha` +// returns a *string when successful +func (m *ItemItemStatusesItemWithShaPostRequestBody) GetTargetUrl()(*string) { + return m.target_url +} +// Serialize serializes information the current object +func (m *ItemItemStatusesItemWithShaPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target_url", m.GetTargetUrl()) + 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 *ItemItemStatusesItemWithShaPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetContext sets the context property value. A string label to differentiate this status from the status of other systems. This field is case-insensitive. +func (m *ItemItemStatusesItemWithShaPostRequestBody) SetContext(value *string)() { + m.context = value +} +// SetDescription sets the description property value. A short description of the status. +func (m *ItemItemStatusesItemWithShaPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetTargetUrl sets the target_url property value. The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: `http://ci.example.com/user/repo/build/sha` +func (m *ItemItemStatusesItemWithShaPostRequestBody) SetTargetUrl(value *string)() { + m.target_url = value +} +type ItemItemStatusesItemWithShaPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContext()(*string) + GetDescription()(*string) + GetTargetUrl()(*string) + SetContext(value *string)() + SetDescription(value *string)() + SetTargetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_statuses_request_builder.go b/pkg/github/repos/item_item_statuses_request_builder.go new file mode 100644 index 0000000..5002de5 --- /dev/null +++ b/pkg/github/repos/item_item_statuses_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemStatusesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\statuses +type ItemItemStatusesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySha gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.statuses.item collection +// returns a *ItemItemStatusesWithShaItemRequestBuilder when successful +func (m *ItemItemStatusesRequestBuilder) BySha(sha string)(*ItemItemStatusesWithShaItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if sha != "" { + urlTplParams["sha"] = sha + } + return NewItemItemStatusesWithShaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemStatusesRequestBuilderInternal instantiates a new ItemItemStatusesRequestBuilder and sets the default values. +func NewItemItemStatusesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatusesRequestBuilder) { + m := &ItemItemStatusesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/statuses", pathParameters), + } + return m +} +// NewItemItemStatusesRequestBuilder instantiates a new ItemItemStatusesRequestBuilder and sets the default values. +func NewItemItemStatusesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatusesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatusesRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_statuses_with_sha_item_request_builder.go b/pkg/github/repos/item_item_statuses_with_sha_item_request_builder.go new file mode 100644 index 0000000..bfc7289 --- /dev/null +++ b/pkg/github/repos/item_item_statuses_with_sha_item_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemStatusesWithShaItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\statuses\{sha} +type ItemItemStatusesWithShaItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemStatusesWithShaItemRequestBuilderInternal instantiates a new ItemItemStatusesWithShaItemRequestBuilder and sets the default values. +func NewItemItemStatusesWithShaItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatusesWithShaItemRequestBuilder) { + m := &ItemItemStatusesWithShaItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/statuses/{sha}", pathParameters), + } + return m +} +// NewItemItemStatusesWithShaItemRequestBuilder instantiates a new ItemItemStatusesWithShaItemRequestBuilder and sets the default values. +func NewItemItemStatusesWithShaItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemStatusesWithShaItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemStatusesWithShaItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Post users with push access in a repository can create commit statuses for a given SHA.Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. +// returns a Statusable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses#create-a-commit-status +func (m *ItemItemStatusesWithShaItemRequestBuilder) Post(ctx context.Context, body ItemItemStatusesItemWithShaPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Statusable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateStatusFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Statusable), nil +} +// ToPostRequestInformation users with push access in a repository can create commit statuses for a given SHA.Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. +// returns a *RequestInformation when successful +func (m *ItemItemStatusesWithShaItemRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemStatusesItemWithShaPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemStatusesWithShaItemRequestBuilder when successful +func (m *ItemItemStatusesWithShaItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemStatusesWithShaItemRequestBuilder) { + return NewItemItemStatusesWithShaItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_subscribers_request_builder.go b/pkg/github/repos/item_item_subscribers_request_builder.go new file mode 100644 index 0000000..2ee2be7 --- /dev/null +++ b/pkg/github/repos/item_item_subscribers_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSubscribersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\subscribers +type ItemItemSubscribersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemSubscribersRequestBuilderGetQueryParameters lists the people watching the specified repository. +type ItemItemSubscribersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemSubscribersRequestBuilderInternal instantiates a new ItemItemSubscribersRequestBuilder and sets the default values. +func NewItemItemSubscribersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSubscribersRequestBuilder) { + m := &ItemItemSubscribersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/subscribers{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemSubscribersRequestBuilder instantiates a new ItemItemSubscribersRequestBuilder and sets the default values. +func NewItemItemSubscribersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSubscribersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSubscribersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the people watching the specified repository. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#list-watchers +func (m *ItemItemSubscribersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSubscribersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the people watching the specified repository. +// returns a *RequestInformation when successful +func (m *ItemItemSubscribersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemSubscribersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSubscribersRequestBuilder when successful +func (m *ItemItemSubscribersRequestBuilder) WithUrl(rawUrl string)(*ItemItemSubscribersRequestBuilder) { + return NewItemItemSubscribersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_subscription_put_request_body.go b/pkg/github/repos/item_item_subscription_put_request_body.go new file mode 100644 index 0000000..763e3b2 --- /dev/null +++ b/pkg/github/repos/item_item_subscription_put_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemSubscriptionPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Determines if all notifications should be blocked from this repository. + ignored *bool + // Determines if notifications should be received from this repository. + subscribed *bool +} +// NewItemItemSubscriptionPutRequestBody instantiates a new ItemItemSubscriptionPutRequestBody and sets the default values. +func NewItemItemSubscriptionPutRequestBody()(*ItemItemSubscriptionPutRequestBody) { + m := &ItemItemSubscriptionPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemSubscriptionPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemSubscriptionPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemSubscriptionPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemSubscriptionPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemSubscriptionPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ignored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnored(val) + } + return nil + } + res["subscribed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscribed(val) + } + return nil + } + return res +} +// GetIgnored gets the ignored property value. Determines if all notifications should be blocked from this repository. +// returns a *bool when successful +func (m *ItemItemSubscriptionPutRequestBody) GetIgnored()(*bool) { + return m.ignored +} +// GetSubscribed gets the subscribed property value. Determines if notifications should be received from this repository. +// returns a *bool when successful +func (m *ItemItemSubscriptionPutRequestBody) GetSubscribed()(*bool) { + return m.subscribed +} +// Serialize serializes information the current object +func (m *ItemItemSubscriptionPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("ignored", m.GetIgnored()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("subscribed", m.GetSubscribed()) + 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 *ItemItemSubscriptionPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIgnored sets the ignored property value. Determines if all notifications should be blocked from this repository. +func (m *ItemItemSubscriptionPutRequestBody) SetIgnored(value *bool)() { + m.ignored = value +} +// SetSubscribed sets the subscribed property value. Determines if notifications should be received from this repository. +func (m *ItemItemSubscriptionPutRequestBody) SetSubscribed(value *bool)() { + m.subscribed = value +} +type ItemItemSubscriptionPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIgnored()(*bool) + GetSubscribed()(*bool) + SetIgnored(value *bool)() + SetSubscribed(value *bool)() +} diff --git a/pkg/github/repos/item_item_subscription_request_builder.go b/pkg/github/repos/item_item_subscription_request_builder.go new file mode 100644 index 0000000..cb5ee34 --- /dev/null +++ b/pkg/github/repos/item_item_subscription_request_builder.go @@ -0,0 +1,114 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemSubscriptionRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\subscription +type ItemItemSubscriptionRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSubscriptionRequestBuilderInternal instantiates a new ItemItemSubscriptionRequestBuilder and sets the default values. +func NewItemItemSubscriptionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSubscriptionRequestBuilder) { + m := &ItemItemSubscriptionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/subscription", pathParameters), + } + return m +} +// NewItemItemSubscriptionRequestBuilder instantiates a new ItemItemSubscriptionRequestBuilder and sets the default values. +func NewItemItemSubscriptionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSubscriptionRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSubscriptionRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete this endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#set-a-repository-subscription). +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#delete-a-repository-subscription +func (m *ItemItemSubscriptionRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets information about whether the authenticated user is subscribed to the repository. +// returns a RepositorySubscriptionable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#get-a-repository-subscription +func (m *ItemItemSubscriptionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositorySubscriptionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositorySubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositorySubscriptionable), nil +} +// Put if you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#delete-a-repository-subscription) completely. +// returns a RepositorySubscriptionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#set-a-repository-subscription +func (m *ItemItemSubscriptionRequestBuilder) Put(ctx context.Context, body ItemItemSubscriptionPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositorySubscriptionable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositorySubscriptionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositorySubscriptionable), nil +} +// ToDeleteRequestInformation this endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#set-a-repository-subscription). +// returns a *RequestInformation when successful +func (m *ItemItemSubscriptionRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets information about whether the authenticated user is subscribed to the repository. +// returns a *RequestInformation when successful +func (m *ItemItemSubscriptionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation if you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#delete-a-repository-subscription) completely. +// returns a *RequestInformation when successful +func (m *ItemItemSubscriptionRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemSubscriptionPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSubscriptionRequestBuilder when successful +func (m *ItemItemSubscriptionRequestBuilder) WithUrl(rawUrl string)(*ItemItemSubscriptionRequestBuilder) { + return NewItemItemSubscriptionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_tags_protection_post_request_body.go b/pkg/github/repos/item_item_tags_protection_post_request_body.go new file mode 100644 index 0000000..14928f4 --- /dev/null +++ b/pkg/github/repos/item_item_tags_protection_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemTagsProtectionPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An optional glob pattern to match against when enforcing tag protection. + pattern *string +} +// NewItemItemTagsProtectionPostRequestBody instantiates a new ItemItemTagsProtectionPostRequestBody and sets the default values. +func NewItemItemTagsProtectionPostRequestBody()(*ItemItemTagsProtectionPostRequestBody) { + m := &ItemItemTagsProtectionPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemTagsProtectionPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemTagsProtectionPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemTagsProtectionPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemTagsProtectionPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemTagsProtectionPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPattern(val) + } + return nil + } + return res +} +// GetPattern gets the pattern property value. An optional glob pattern to match against when enforcing tag protection. +// returns a *string when successful +func (m *ItemItemTagsProtectionPostRequestBody) GetPattern()(*string) { + return m.pattern +} +// Serialize serializes information the current object +func (m *ItemItemTagsProtectionPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pattern", m.GetPattern()) + 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 *ItemItemTagsProtectionPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPattern sets the pattern property value. An optional glob pattern to match against when enforcing tag protection. +func (m *ItemItemTagsProtectionPostRequestBody) SetPattern(value *string)() { + m.pattern = value +} +type ItemItemTagsProtectionPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPattern()(*string) + SetPattern(value *string)() +} diff --git a/pkg/github/repos/item_item_tags_protection_request_builder.go b/pkg/github/repos/item_item_tags_protection_request_builder.go new file mode 100644 index 0000000..97d0137 --- /dev/null +++ b/pkg/github/repos/item_item_tags_protection_request_builder.go @@ -0,0 +1,120 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTagsProtectionRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tags\protection +type ItemItemTagsProtectionRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTag_protection_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.tags.protection.item collection +// Deprecated: +// returns a *ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder when successful +func (m *ItemItemTagsProtectionRequestBuilder) ByTag_protection_id(tag_protection_id int32)(*ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["tag_protection_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(tag_protection_id), 10) + return NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemTagsProtectionRequestBuilderInternal instantiates a new ItemItemTagsProtectionRequestBuilder and sets the default values. +func NewItemItemTagsProtectionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTagsProtectionRequestBuilder) { + m := &ItemItemTagsProtectionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags/protection", pathParameters), + } + return m +} +// NewItemItemTagsProtectionRequestBuilder instantiates a new ItemItemTagsProtectionRequestBuilder and sets the default values. +func NewItemItemTagsProtectionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTagsProtectionRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTagsProtectionRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note**: This operation is deprecated and will be removed after August 30th 2024Use the "[Repository Rulesets](https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#get-all-repository-rulesets)" endpoint instead.This returns the tag protection states of a repository.This information is only available to repository administrators. +// Deprecated: +// returns a []TagProtectionable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/tags#deprecated---list-tag-protection-states-for-a-repository +func (m *ItemItemTagsProtectionRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TagProtectionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTagProtectionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TagProtectionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TagProtectionable) + } + } + return val, nil +} +// Post **Note**: This operation is deprecated and will be removed after August 30th 2024Use the "[Repository Rulesets](https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#create-a-repository-ruleset)" endpoint instead.This creates a tag protection state for a repository.This endpoint is only available to repository administrators. +// Deprecated: +// returns a TagProtectionable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/tags#deprecated---create-a-tag-protection-state-for-a-repository +func (m *ItemItemTagsProtectionRequestBuilder) Post(ctx context.Context, body ItemItemTagsProtectionPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TagProtectionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTagProtectionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TagProtectionable), nil +} +// ToGetRequestInformation **Note**: This operation is deprecated and will be removed after August 30th 2024Use the "[Repository Rulesets](https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#get-all-repository-rulesets)" endpoint instead.This returns the tag protection states of a repository.This information is only available to repository administrators. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemTagsProtectionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation **Note**: This operation is deprecated and will be removed after August 30th 2024Use the "[Repository Rulesets](https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#create-a-repository-ruleset)" endpoint instead.This creates a tag protection state for a repository.This endpoint is only available to repository administrators. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemTagsProtectionRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemTagsProtectionPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemTagsProtectionRequestBuilder when successful +func (m *ItemItemTagsProtectionRequestBuilder) WithUrl(rawUrl string)(*ItemItemTagsProtectionRequestBuilder) { + return NewItemItemTagsProtectionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_tags_protection_with_tag_protection_item_request_builder.go b/pkg/github/repos/item_item_tags_protection_with_tag_protection_item_request_builder.go new file mode 100644 index 0000000..f539f16 --- /dev/null +++ b/pkg/github/repos/item_item_tags_protection_with_tag_protection_item_request_builder.go @@ -0,0 +1,62 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tags\protection\{tag_protection_id} +type ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilderInternal instantiates a new ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder and sets the default values. +func NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) { + m := &ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags/protection/{tag_protection_id}", pathParameters), + } + return m +} +// NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilder instantiates a new ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder and sets the default values. +func NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note**: This operation is deprecated and will be removed after August 30th 2024Use the "[Repository Rulesets](https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#delete-a-repository-ruleset)" endpoint instead.This deletes a tag protection state for a repository.This endpoint is only available to repository administrators. +// Deprecated: +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/tags#deprecated---delete-a-tag-protection-state-for-a-repository +func (m *ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Note**: This operation is deprecated and will be removed after August 30th 2024Use the "[Repository Rulesets](https://docs.github.com/enterprise-cloud@latest//rest/repos/rules#delete-a-repository-ruleset)" endpoint instead.This deletes a tag protection state for a repository.This endpoint is only available to repository administrators. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder when successful +func (m *ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemTagsProtectionWithTag_protection_ItemRequestBuilder) { + return NewItemItemTagsProtectionWithTag_protection_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_tags_request_builder.go b/pkg/github/repos/item_item_tags_request_builder.go new file mode 100644 index 0000000..a3257cb --- /dev/null +++ b/pkg/github/repos/item_item_tags_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTagsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tags +type ItemItemTagsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemTagsRequestBuilderGetQueryParameters list repository tags +type ItemItemTagsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemTagsRequestBuilderInternal instantiates a new ItemItemTagsRequestBuilder and sets the default values. +func NewItemItemTagsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTagsRequestBuilder) { + m := &ItemItemTagsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemTagsRequestBuilder instantiates a new ItemItemTagsRequestBuilder and sets the default values. +func NewItemItemTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTagsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTagsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list repository tags +// returns a []Tagable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-tags +func (m *ItemItemTagsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTagsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Tagable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTagFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Tagable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Tagable) + } + } + return val, nil +} +// Protection the protection property +// returns a *ItemItemTagsProtectionRequestBuilder when successful +func (m *ItemItemTagsRequestBuilder) Protection()(*ItemItemTagsProtectionRequestBuilder) { + return NewItemItemTagsProtectionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// returns a *RequestInformation when successful +func (m *ItemItemTagsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTagsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTagsRequestBuilder when successful +func (m *ItemItemTagsRequestBuilder) WithUrl(rawUrl string)(*ItemItemTagsRequestBuilder) { + return NewItemItemTagsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_tarball_request_builder.go b/pkg/github/repos/item_item_tarball_request_builder.go new file mode 100644 index 0000000..3b34e83 --- /dev/null +++ b/pkg/github/repos/item_item_tarball_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemTarballRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tarball +type ItemItemTarballRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRef gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.tarball.item collection +// returns a *ItemItemTarballWithRefItemRequestBuilder when successful +func (m *ItemItemTarballRequestBuilder) ByRef(ref string)(*ItemItemTarballWithRefItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ref != "" { + urlTplParams["ref"] = ref + } + return NewItemItemTarballWithRefItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemTarballRequestBuilderInternal instantiates a new ItemItemTarballRequestBuilder and sets the default values. +func NewItemItemTarballRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTarballRequestBuilder) { + m := &ItemItemTarballRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tarball", pathParameters), + } + return m +} +// NewItemItemTarballRequestBuilder instantiates a new ItemItemTarballRequestBuilder and sets the default values. +func NewItemItemTarballRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTarballRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTarballRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_tarball_with_ref_item_request_builder.go b/pkg/github/repos/item_item_tarball_with_ref_item_request_builder.go new file mode 100644 index 0000000..212e3ca --- /dev/null +++ b/pkg/github/repos/item_item_tarball_with_ref_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemTarballWithRefItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tarball\{ref} +type ItemItemTarballWithRefItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemTarballWithRefItemRequestBuilderInternal instantiates a new ItemItemTarballWithRefItemRequestBuilder and sets the default values. +func NewItemItemTarballWithRefItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTarballWithRefItemRequestBuilder) { + m := &ItemItemTarballWithRefItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tarball/{ref}", pathParameters), + } + return m +} +// NewItemItemTarballWithRefItemRequestBuilder instantiates a new ItemItemTarballWithRefItemRequestBuilder and sets the default values. +func NewItemItemTarballWithRefItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTarballWithRefItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTarballWithRefItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually`main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to usethe `Location` header to make a second `GET` request.**Note**: For private repositories, these links are temporary and expire after five minutes. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#download-a-repository-archive-tar +func (m *ItemItemTarballWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually`main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to usethe `Location` header to make a second `GET` request.**Note**: For private repositories, these links are temporary and expire after five minutes. +// returns a *RequestInformation when successful +func (m *ItemItemTarballWithRefItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTarballWithRefItemRequestBuilder when successful +func (m *ItemItemTarballWithRefItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemTarballWithRefItemRequestBuilder) { + return NewItemItemTarballWithRefItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_teams_request_builder.go b/pkg/github/repos/item_item_teams_request_builder.go new file mode 100644 index 0000000..b0eb055 --- /dev/null +++ b/pkg/github/repos/item_item_teams_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTeamsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\teams +type ItemItemTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemTeamsRequestBuilderGetQueryParameters lists the teams that have access to the specified repository and that are also visible to the authenticated user.For a public repository, a team is listed only if that team added the public repository explicitly.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to use this endpoint with a public repository, and `repo` scope to use this endpoint with a private repository. +type ItemItemTeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemTeamsRequestBuilderInternal instantiates a new ItemItemTeamsRequestBuilder and sets the default values. +func NewItemItemTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTeamsRequestBuilder) { + m := &ItemItemTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemTeamsRequestBuilder instantiates a new ItemItemTeamsRequestBuilder and sets the default values. +func NewItemItemTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the teams that have access to the specified repository and that are also visible to the authenticated user.For a public repository, a team is listed only if that team added the public repository explicitly.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to use this endpoint with a public repository, and `repo` scope to use this endpoint with a private repository. +// returns a []Teamable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repository-teams +func (m *ItemItemTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// ToGetRequestInformation lists the teams that have access to the specified repository and that are also visible to the authenticated user.For a public repository, a team is listed only if that team added the public repository explicitly.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to use this endpoint with a public repository, and `repo` scope to use this endpoint with a private repository. +// returns a *RequestInformation when successful +func (m *ItemItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTeamsRequestBuilder when successful +func (m *ItemItemTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemItemTeamsRequestBuilder) { + return NewItemItemTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_topics_put_request_body.go b/pkg/github/repos/item_item_topics_put_request_body.go new file mode 100644 index 0000000..7d6c7c6 --- /dev/null +++ b/pkg/github/repos/item_item_topics_put_request_body.go @@ -0,0 +1,86 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemTopicsPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. + names []string +} +// NewItemItemTopicsPutRequestBody instantiates a new ItemItemTopicsPutRequestBody and sets the default values. +func NewItemItemTopicsPutRequestBody()(*ItemItemTopicsPutRequestBody) { + m := &ItemItemTopicsPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemTopicsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemTopicsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemTopicsPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemTopicsPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemTopicsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetNames(res) + } + return nil + } + return res +} +// GetNames gets the names property value. An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. +// returns a []string when successful +func (m *ItemItemTopicsPutRequestBody) GetNames()([]string) { + return m.names +} +// Serialize serializes information the current object +func (m *ItemItemTopicsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetNames() != nil { + err := writer.WriteCollectionOfStringValues("names", m.GetNames()) + 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 *ItemItemTopicsPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNames sets the names property value. An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. +func (m *ItemItemTopicsPutRequestBody) SetNames(value []string)() { + m.names = value +} +type ItemItemTopicsPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNames()([]string) + SetNames(value []string)() +} diff --git a/pkg/github/repos/item_item_topics_request_builder.go b/pkg/github/repos/item_item_topics_request_builder.go new file mode 100644 index 0000000..8494fed --- /dev/null +++ b/pkg/github/repos/item_item_topics_request_builder.go @@ -0,0 +1,103 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTopicsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\topics +type ItemItemTopicsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemTopicsRequestBuilderGetQueryParameters get all repository topics +type ItemItemTopicsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemTopicsRequestBuilderInternal instantiates a new ItemItemTopicsRequestBuilder and sets the default values. +func NewItemItemTopicsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTopicsRequestBuilder) { + m := &ItemItemTopicsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/topics{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemTopicsRequestBuilder instantiates a new ItemItemTopicsRequestBuilder and sets the default values. +func NewItemItemTopicsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTopicsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTopicsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get all repository topics +// returns a Topicable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#get-all-repository-topics +func (m *ItemItemTopicsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTopicsRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Topicable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTopicFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Topicable), nil +} +// Put replace all repository topics +// returns a Topicable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#replace-all-repository-topics +func (m *ItemItemTopicsRequestBuilder) Put(ctx context.Context, body ItemItemTopicsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Topicable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTopicFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Topicable), nil +} +// returns a *RequestInformation when successful +func (m *ItemItemTopicsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTopicsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *ItemItemTopicsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemTopicsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTopicsRequestBuilder when successful +func (m *ItemItemTopicsRequestBuilder) WithUrl(rawUrl string)(*ItemItemTopicsRequestBuilder) { + return NewItemItemTopicsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_traffic_clones_request_builder.go b/pkg/github/repos/item_item_traffic_clones_request_builder.go new file mode 100644 index 0000000..79d0e0f --- /dev/null +++ b/pkg/github/repos/item_item_traffic_clones_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i4d9c2a1d9d9a5c0921332f4a1fdd0cc3c7676d7aff750f24006f853283ee3665 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/traffic/clones" +) + +// ItemItemTrafficClonesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\clones +type ItemItemTrafficClonesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemTrafficClonesRequestBuilderGetQueryParameters get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. +type ItemItemTrafficClonesRequestBuilderGetQueryParameters struct { + // The time frame to display results for. + Per *i4d9c2a1d9d9a5c0921332f4a1fdd0cc3c7676d7aff750f24006f853283ee3665.GetPerQueryParameterType `uriparametername:"per"` +} +// NewItemItemTrafficClonesRequestBuilderInternal instantiates a new ItemItemTrafficClonesRequestBuilder and sets the default values. +func NewItemItemTrafficClonesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficClonesRequestBuilder) { + m := &ItemItemTrafficClonesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/clones{?per*}", pathParameters), + } + return m +} +// NewItemItemTrafficClonesRequestBuilder instantiates a new ItemItemTrafficClonesRequestBuilder and sets the default values. +func NewItemItemTrafficClonesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficClonesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTrafficClonesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. +// returns a CloneTrafficable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/traffic#get-repository-clones +func (m *ItemItemTrafficClonesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTrafficClonesRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CloneTrafficable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCloneTrafficFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CloneTrafficable), nil +} +// ToGetRequestInformation get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. +// returns a *RequestInformation when successful +func (m *ItemItemTrafficClonesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTrafficClonesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTrafficClonesRequestBuilder when successful +func (m *ItemItemTrafficClonesRequestBuilder) WithUrl(rawUrl string)(*ItemItemTrafficClonesRequestBuilder) { + return NewItemItemTrafficClonesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_traffic_popular_paths_request_builder.go b/pkg/github/repos/item_item_traffic_popular_paths_request_builder.go new file mode 100644 index 0000000..985c4c7 --- /dev/null +++ b/pkg/github/repos/item_item_traffic_popular_paths_request_builder.go @@ -0,0 +1,64 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTrafficPopularPathsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\popular\paths +type ItemItemTrafficPopularPathsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemTrafficPopularPathsRequestBuilderInternal instantiates a new ItemItemTrafficPopularPathsRequestBuilder and sets the default values. +func NewItemItemTrafficPopularPathsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficPopularPathsRequestBuilder) { + m := &ItemItemTrafficPopularPathsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular/paths", pathParameters), + } + return m +} +// NewItemItemTrafficPopularPathsRequestBuilder instantiates a new ItemItemTrafficPopularPathsRequestBuilder and sets the default values. +func NewItemItemTrafficPopularPathsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficPopularPathsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTrafficPopularPathsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the top 10 popular contents over the last 14 days. +// returns a []ContentTrafficable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/traffic#get-top-referral-paths +func (m *ItemItemTrafficPopularPathsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentTrafficable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateContentTrafficFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentTrafficable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ContentTrafficable) + } + } + return val, nil +} +// ToGetRequestInformation get the top 10 popular contents over the last 14 days. +// returns a *RequestInformation when successful +func (m *ItemItemTrafficPopularPathsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTrafficPopularPathsRequestBuilder when successful +func (m *ItemItemTrafficPopularPathsRequestBuilder) WithUrl(rawUrl string)(*ItemItemTrafficPopularPathsRequestBuilder) { + return NewItemItemTrafficPopularPathsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_traffic_popular_referrers_request_builder.go b/pkg/github/repos/item_item_traffic_popular_referrers_request_builder.go new file mode 100644 index 0000000..83f3148 --- /dev/null +++ b/pkg/github/repos/item_item_traffic_popular_referrers_request_builder.go @@ -0,0 +1,64 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTrafficPopularReferrersRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\popular\referrers +type ItemItemTrafficPopularReferrersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemTrafficPopularReferrersRequestBuilderInternal instantiates a new ItemItemTrafficPopularReferrersRequestBuilder and sets the default values. +func NewItemItemTrafficPopularReferrersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficPopularReferrersRequestBuilder) { + m := &ItemItemTrafficPopularReferrersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular/referrers", pathParameters), + } + return m +} +// NewItemItemTrafficPopularReferrersRequestBuilder instantiates a new ItemItemTrafficPopularReferrersRequestBuilder and sets the default values. +func NewItemItemTrafficPopularReferrersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficPopularReferrersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTrafficPopularReferrersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the top 10 referrers over the last 14 days. +// returns a []ReferrerTrafficable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/traffic#get-top-referral-sources +func (m *ItemItemTrafficPopularReferrersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReferrerTrafficable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReferrerTrafficFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReferrerTrafficable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ReferrerTrafficable) + } + } + return val, nil +} +// ToGetRequestInformation get the top 10 referrers over the last 14 days. +// returns a *RequestInformation when successful +func (m *ItemItemTrafficPopularReferrersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTrafficPopularReferrersRequestBuilder when successful +func (m *ItemItemTrafficPopularReferrersRequestBuilder) WithUrl(rawUrl string)(*ItemItemTrafficPopularReferrersRequestBuilder) { + return NewItemItemTrafficPopularReferrersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_traffic_popular_request_builder.go b/pkg/github/repos/item_item_traffic_popular_request_builder.go new file mode 100644 index 0000000..d3df233 --- /dev/null +++ b/pkg/github/repos/item_item_traffic_popular_request_builder.go @@ -0,0 +1,33 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemTrafficPopularRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\popular +type ItemItemTrafficPopularRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemTrafficPopularRequestBuilderInternal instantiates a new ItemItemTrafficPopularRequestBuilder and sets the default values. +func NewItemItemTrafficPopularRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficPopularRequestBuilder) { + m := &ItemItemTrafficPopularRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular", pathParameters), + } + return m +} +// NewItemItemTrafficPopularRequestBuilder instantiates a new ItemItemTrafficPopularRequestBuilder and sets the default values. +func NewItemItemTrafficPopularRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficPopularRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTrafficPopularRequestBuilderInternal(urlParams, requestAdapter) +} +// Paths the paths property +// returns a *ItemItemTrafficPopularPathsRequestBuilder when successful +func (m *ItemItemTrafficPopularRequestBuilder) Paths()(*ItemItemTrafficPopularPathsRequestBuilder) { + return NewItemItemTrafficPopularPathsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Referrers the referrers property +// returns a *ItemItemTrafficPopularReferrersRequestBuilder when successful +func (m *ItemItemTrafficPopularRequestBuilder) Referrers()(*ItemItemTrafficPopularReferrersRequestBuilder) { + return NewItemItemTrafficPopularReferrersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_traffic_request_builder.go b/pkg/github/repos/item_item_traffic_request_builder.go new file mode 100644 index 0000000..37ec873 --- /dev/null +++ b/pkg/github/repos/item_item_traffic_request_builder.go @@ -0,0 +1,38 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemTrafficRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic +type ItemItemTrafficRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Clones the clones property +// returns a *ItemItemTrafficClonesRequestBuilder when successful +func (m *ItemItemTrafficRequestBuilder) Clones()(*ItemItemTrafficClonesRequestBuilder) { + return NewItemItemTrafficClonesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemTrafficRequestBuilderInternal instantiates a new ItemItemTrafficRequestBuilder and sets the default values. +func NewItemItemTrafficRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficRequestBuilder) { + m := &ItemItemTrafficRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic", pathParameters), + } + return m +} +// NewItemItemTrafficRequestBuilder instantiates a new ItemItemTrafficRequestBuilder and sets the default values. +func NewItemItemTrafficRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTrafficRequestBuilderInternal(urlParams, requestAdapter) +} +// Popular the popular property +// returns a *ItemItemTrafficPopularRequestBuilder when successful +func (m *ItemItemTrafficRequestBuilder) Popular()(*ItemItemTrafficPopularRequestBuilder) { + return NewItemItemTrafficPopularRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Views the views property +// returns a *ItemItemTrafficViewsRequestBuilder when successful +func (m *ItemItemTrafficRequestBuilder) Views()(*ItemItemTrafficViewsRequestBuilder) { + return NewItemItemTrafficViewsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_traffic_views_request_builder.go b/pkg/github/repos/item_item_traffic_views_request_builder.go new file mode 100644 index 0000000..ce05535 --- /dev/null +++ b/pkg/github/repos/item_item_traffic_views_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ifb4cfe7c901d2331df71b28fc61e92324d6f4a70d5441f083e8f2085cd449400 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/repos/item/item/traffic/views" +) + +// ItemItemTrafficViewsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\views +type ItemItemTrafficViewsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemTrafficViewsRequestBuilderGetQueryParameters get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. +type ItemItemTrafficViewsRequestBuilderGetQueryParameters struct { + // The time frame to display results for. + Per *ifb4cfe7c901d2331df71b28fc61e92324d6f4a70d5441f083e8f2085cd449400.GetPerQueryParameterType `uriparametername:"per"` +} +// NewItemItemTrafficViewsRequestBuilderInternal instantiates a new ItemItemTrafficViewsRequestBuilder and sets the default values. +func NewItemItemTrafficViewsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficViewsRequestBuilder) { + m := &ItemItemTrafficViewsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/views{?per*}", pathParameters), + } + return m +} +// NewItemItemTrafficViewsRequestBuilder instantiates a new ItemItemTrafficViewsRequestBuilder and sets the default values. +func NewItemItemTrafficViewsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTrafficViewsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTrafficViewsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. +// returns a ViewTrafficable when successful +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/metrics/traffic#get-page-views +func (m *ItemItemTrafficViewsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTrafficViewsRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ViewTrafficable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateViewTrafficFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ViewTrafficable), nil +} +// ToGetRequestInformation get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. +// returns a *RequestInformation when successful +func (m *ItemItemTrafficViewsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemTrafficViewsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTrafficViewsRequestBuilder when successful +func (m *ItemItemTrafficViewsRequestBuilder) WithUrl(rawUrl string)(*ItemItemTrafficViewsRequestBuilder) { + return NewItemItemTrafficViewsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_transfer_post_request_body.go b/pkg/github/repos/item_item_transfer_post_request_body.go new file mode 100644 index 0000000..09df893 --- /dev/null +++ b/pkg/github/repos/item_item_transfer_post_request_body.go @@ -0,0 +1,144 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemTransferPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new name to be given to the repository. + new_name *string + // The username or organization name the repository will be transferred to. + new_owner *string + // ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + team_ids []int32 +} +// NewItemItemTransferPostRequestBody instantiates a new ItemItemTransferPostRequestBody and sets the default values. +func NewItemItemTransferPostRequestBody()(*ItemItemTransferPostRequestBody) { + m := &ItemItemTransferPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemTransferPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemTransferPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemTransferPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemTransferPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemTransferPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["new_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewName(val) + } + return nil + } + res["new_owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewOwner(val) + } + return nil + } + res["team_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetTeamIds(res) + } + return nil + } + return res +} +// GetNewName gets the new_name property value. The new name to be given to the repository. +// returns a *string when successful +func (m *ItemItemTransferPostRequestBody) GetNewName()(*string) { + return m.new_name +} +// GetNewOwner gets the new_owner property value. The username or organization name the repository will be transferred to. +// returns a *string when successful +func (m *ItemItemTransferPostRequestBody) GetNewOwner()(*string) { + return m.new_owner +} +// GetTeamIds gets the team_ids property value. ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. +// returns a []int32 when successful +func (m *ItemItemTransferPostRequestBody) GetTeamIds()([]int32) { + return m.team_ids +} +// Serialize serializes information the current object +func (m *ItemItemTransferPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("new_name", m.GetNewName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("new_owner", m.GetNewOwner()) + if err != nil { + return err + } + } + if m.GetTeamIds() != nil { + err := writer.WriteCollectionOfInt32Values("team_ids", m.GetTeamIds()) + 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 *ItemItemTransferPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNewName sets the new_name property value. The new name to be given to the repository. +func (m *ItemItemTransferPostRequestBody) SetNewName(value *string)() { + m.new_name = value +} +// SetNewOwner sets the new_owner property value. The username or organization name the repository will be transferred to. +func (m *ItemItemTransferPostRequestBody) SetNewOwner(value *string)() { + m.new_owner = value +} +// SetTeamIds sets the team_ids property value. ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. +func (m *ItemItemTransferPostRequestBody) SetTeamIds(value []int32)() { + m.team_ids = value +} +type ItemItemTransferPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNewName()(*string) + GetNewOwner()(*string) + GetTeamIds()([]int32) + SetNewName(value *string)() + SetNewOwner(value *string)() + SetTeamIds(value []int32)() +} diff --git a/pkg/github/repos/item_item_transfer_request_builder.go b/pkg/github/repos/item_item_transfer_request_builder.go new file mode 100644 index 0000000..81e5104 --- /dev/null +++ b/pkg/github/repos/item_item_transfer_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemItemTransferRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\transfer +type ItemItemTransferRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemTransferRequestBuilderInternal instantiates a new ItemItemTransferRequestBuilder and sets the default values. +func NewItemItemTransferRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTransferRequestBuilder) { + m := &ItemItemTransferRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/transfer", pathParameters), + } + return m +} +// NewItemItemTransferRequestBuilder instantiates a new ItemItemTransferRequestBuilder and sets the default values. +func NewItemItemTransferRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemTransferRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemTransferRequestBuilderInternal(urlParams, requestAdapter) +} +// Post a transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/enterprise-cloud@latest//articles/about-repository-transfers/). +// returns a MinimalRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#transfer-a-repository +func (m *ItemItemTransferRequestBuilder) Post(ctx context.Context, body ItemItemTransferPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable), nil +} +// ToPostRequestInformation a transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/enterprise-cloud@latest//articles/about-repository-transfers/). +// returns a *RequestInformation when successful +func (m *ItemItemTransferRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemTransferPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemTransferRequestBuilder when successful +func (m *ItemItemTransferRequestBuilder) WithUrl(rawUrl string)(*ItemItemTransferRequestBuilder) { + return NewItemItemTransferRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_vulnerability_alerts_request_builder.go b/pkg/github/repos/item_item_vulnerability_alerts_request_builder.go new file mode 100644 index 0000000..53b9909 --- /dev/null +++ b/pkg/github/repos/item_item_vulnerability_alerts_request_builder.go @@ -0,0 +1,95 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemVulnerabilityAlertsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\vulnerability-alerts +type ItemItemVulnerabilityAlertsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemVulnerabilityAlertsRequestBuilderInternal instantiates a new ItemItemVulnerabilityAlertsRequestBuilder and sets the default values. +func NewItemItemVulnerabilityAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemVulnerabilityAlertsRequestBuilder) { + m := &ItemItemVulnerabilityAlertsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/vulnerability-alerts", pathParameters), + } + return m +} +// NewItemItemVulnerabilityAlertsRequestBuilder instantiates a new ItemItemVulnerabilityAlertsRequestBuilder and sets the default values. +func NewItemItemVulnerabilityAlertsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemVulnerabilityAlertsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemVulnerabilityAlertsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete disables dependency alerts and the dependency graph for a repository.The authenticated user must have admin access to the repository. For more information,see "[About security alerts for vulnerable dependencies](https://docs.github.com/enterprise-cloud@latest//articles/about-security-alerts-for-vulnerable-dependencies)". +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#disable-vulnerability-alerts +func (m *ItemItemVulnerabilityAlertsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/enterprise-cloud@latest//articles/about-security-alerts-for-vulnerable-dependencies)". +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository +func (m *ItemItemVulnerabilityAlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/enterprise-cloud@latest//articles/about-security-alerts-for-vulnerable-dependencies)". +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#enable-vulnerability-alerts +func (m *ItemItemVulnerabilityAlertsRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation disables dependency alerts and the dependency graph for a repository.The authenticated user must have admin access to the repository. For more information,see "[About security alerts for vulnerable dependencies](https://docs.github.com/enterprise-cloud@latest//articles/about-security-alerts-for-vulnerable-dependencies)". +// returns a *RequestInformation when successful +func (m *ItemItemVulnerabilityAlertsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/enterprise-cloud@latest//articles/about-security-alerts-for-vulnerable-dependencies)". +// returns a *RequestInformation when successful +func (m *ItemItemVulnerabilityAlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/enterprise-cloud@latest//articles/about-security-alerts-for-vulnerable-dependencies)". +// returns a *RequestInformation when successful +func (m *ItemItemVulnerabilityAlertsRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemVulnerabilityAlertsRequestBuilder when successful +func (m *ItemItemVulnerabilityAlertsRequestBuilder) WithUrl(rawUrl string)(*ItemItemVulnerabilityAlertsRequestBuilder) { + return NewItemItemVulnerabilityAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_zipball_request_builder.go b/pkg/github/repos/item_item_zipball_request_builder.go new file mode 100644 index 0000000..9bb6441 --- /dev/null +++ b/pkg/github/repos/item_item_zipball_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemZipballRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\zipball +type ItemItemZipballRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRef gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item.zipball.item collection +// returns a *ItemItemZipballWithRefItemRequestBuilder when successful +func (m *ItemItemZipballRequestBuilder) ByRef(ref string)(*ItemItemZipballWithRefItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ref != "" { + urlTplParams["ref"] = ref + } + return NewItemItemZipballWithRefItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemZipballRequestBuilderInternal instantiates a new ItemItemZipballRequestBuilder and sets the default values. +func NewItemItemZipballRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemZipballRequestBuilder) { + m := &ItemItemZipballRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/zipball", pathParameters), + } + return m +} +// NewItemItemZipballRequestBuilder instantiates a new ItemItemZipballRequestBuilder and sets the default values. +func NewItemItemZipballRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemZipballRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemZipballRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_zipball_with_ref_item_request_builder.go b/pkg/github/repos/item_item_zipball_with_ref_item_request_builder.go new file mode 100644 index 0000000..9729c46 --- /dev/null +++ b/pkg/github/repos/item_item_zipball_with_ref_item_request_builder.go @@ -0,0 +1,51 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemZipballWithRefItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\zipball\{ref} +type ItemItemZipballWithRefItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemZipballWithRefItemRequestBuilderInternal instantiates a new ItemItemZipballWithRefItemRequestBuilder and sets the default values. +func NewItemItemZipballWithRefItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemZipballWithRefItemRequestBuilder) { + m := &ItemItemZipballWithRefItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/zipball/{ref}", pathParameters), + } + return m +} +// NewItemItemZipballWithRefItemRequestBuilder instantiates a new ItemItemZipballWithRefItemRequestBuilder and sets the default values. +func NewItemItemZipballWithRefItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemZipballWithRefItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemZipballWithRefItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually`main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to usethe `Location` header to make a second `GET` request.**Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#download-a-repository-archive-zip +func (m *ItemItemZipballWithRefItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually`main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to usethe `Location` header to make a second `GET` request.**Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. +// returns a *RequestInformation when successful +func (m *ItemItemZipballWithRefItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemZipballWithRefItemRequestBuilder when successful +func (m *ItemItemZipballWithRefItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemZipballWithRefItemRequestBuilder) { + return NewItemItemZipballWithRefItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_repo_item_request_builder.go b/pkg/github/repos/item_repo_item_request_builder.go new file mode 100644 index 0000000..b6d7c44 --- /dev/null +++ b/pkg/github/repos/item_repo_item_request_builder.go @@ -0,0 +1,466 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemRepoItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id} +type ItemRepoItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Actions the actions property +// returns a *ItemItemActionsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Actions()(*ItemItemActionsRequestBuilder) { + return NewItemItemActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Activity the activity property +// returns a *ItemItemActivityRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Activity()(*ItemItemActivityRequestBuilder) { + return NewItemItemActivityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Assignees the assignees property +// returns a *ItemItemAssigneesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Assignees()(*ItemItemAssigneesRequestBuilder) { + return NewItemItemAssigneesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Attestations the attestations property +// returns a *ItemItemAttestationsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Attestations()(*ItemItemAttestationsRequestBuilder) { + return NewItemItemAttestationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Autolinks the autolinks property +// returns a *ItemItemAutolinksRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Autolinks()(*ItemItemAutolinksRequestBuilder) { + return NewItemItemAutolinksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AutomatedSecurityFixes the automatedSecurityFixes property +// returns a *ItemItemAutomatedSecurityFixesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) AutomatedSecurityFixes()(*ItemItemAutomatedSecurityFixesRequestBuilder) { + return NewItemItemAutomatedSecurityFixesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Branches the branches property +// returns a *ItemItemBranchesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Branches()(*ItemItemBranchesRequestBuilder) { + return NewItemItemBranchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckRuns the checkRuns property +// returns a *ItemItemCheckRunsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) CheckRuns()(*ItemItemCheckRunsRequestBuilder) { + return NewItemItemCheckRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckSuites the checkSuites property +// returns a *ItemItemCheckSuitesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) CheckSuites()(*ItemItemCheckSuitesRequestBuilder) { + return NewItemItemCheckSuitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codeowners the codeowners property +// returns a *ItemItemCodeownersRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Codeowners()(*ItemItemCodeownersRequestBuilder) { + return NewItemItemCodeownersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CodeScanning the codeScanning property +// returns a *ItemItemCodeScanningRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) CodeScanning()(*ItemItemCodeScanningRequestBuilder) { + return NewItemItemCodeScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codespaces the codespaces property +// returns a *ItemItemCodespacesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Codespaces()(*ItemItemCodespacesRequestBuilder) { + return NewItemItemCodespacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Collaborators the collaborators property +// returns a *ItemItemCollaboratorsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Collaborators()(*ItemItemCollaboratorsRequestBuilder) { + return NewItemItemCollaboratorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +// returns a *ItemItemCommentsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Comments()(*ItemItemCommentsRequestBuilder) { + return NewItemItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commits the commits property +// returns a *ItemItemCommitsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Commits()(*ItemItemCommitsRequestBuilder) { + return NewItemItemCommitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Community the community property +// returns a *ItemItemCommunityRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Community()(*ItemItemCommunityRequestBuilder) { + return NewItemItemCommunityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Compare the compare property +// returns a *ItemItemCompareRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Compare()(*ItemItemCompareRequestBuilder) { + return NewItemItemCompareRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemRepoItemRequestBuilderInternal instantiates a new ItemRepoItemRequestBuilder and sets the default values. +func NewItemRepoItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRepoItemRequestBuilder) { + m := &ItemRepoItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}", pathParameters), + } + return m +} +// NewItemRepoItemRequestBuilder instantiates a new ItemRepoItemRequestBuilder and sets the default values. +func NewItemRepoItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRepoItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRepoItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Contents the contents property +// returns a *ItemItemContentsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Contents()(*ItemItemContentsRequestBuilder) { + return NewItemItemContentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Contributors the contributors property +// returns a *ItemItemContributorsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Contributors()(*ItemItemContributorsRequestBuilder) { + return NewItemItemContributorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete deleting a repository requires admin access.If an organization owner has configured the organization to prevent members from deleting organization-ownedrepositories, you will get a `403 Forbidden` response.OAuth app tokens and personal access tokens (classic) need the `delete_repo` scope to use this endpoint. +// returns a ItemItemRepo403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#delete-a-repository +func (m *ItemRepoItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": CreateItemItemRepo403ErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Dependabot the dependabot property +// returns a *ItemItemDependabotRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Dependabot()(*ItemItemDependabotRequestBuilder) { + return NewItemItemDependabotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// DependencyGraph the dependencyGraph property +// returns a *ItemItemDependencyGraphRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) DependencyGraph()(*ItemItemDependencyGraphRequestBuilder) { + return NewItemItemDependencyGraphRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Deployments the deployments property +// returns a *ItemItemDeploymentsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Deployments()(*ItemItemDeploymentsRequestBuilder) { + return NewItemItemDeploymentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Dispatches the dispatches property +// returns a *ItemItemDispatchesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Dispatches()(*ItemItemDispatchesRequestBuilder) { + return NewItemItemDispatchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Environments the environments property +// returns a *ItemItemEnvironmentsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Environments()(*ItemItemEnvironmentsRequestBuilder) { + return NewItemItemEnvironmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Events the events property +// returns a *ItemItemEventsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Events()(*ItemItemEventsRequestBuilder) { + return NewItemItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Forks the forks property +// returns a *ItemItemForksRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Forks()(*ItemItemForksRequestBuilder) { + return NewItemItemForksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Generate the generate property +// returns a *ItemItemGenerateRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) 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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +// returns a FullRepositoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#get-a-repository +func (m *ItemRepoItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// Git the git property +// returns a *ItemItemGitRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Git()(*ItemItemGitRequestBuilder) { + return NewItemItemGitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Hooks the hooks property +// returns a *ItemItemHooksRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Hooks()(*ItemItemHooksRequestBuilder) { + return NewItemItemHooksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ImportEscaped the import property +// returns a *ItemItemImportRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) ImportEscaped()(*ItemItemImportRequestBuilder) { + return NewItemItemImportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installation the installation property +// returns a *ItemItemInstallationRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Installation()(*ItemItemInstallationRequestBuilder) { + return NewItemItemInstallationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// InteractionLimits the interactionLimits property +// returns a *ItemItemInteractionLimitsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) InteractionLimits()(*ItemItemInteractionLimitsRequestBuilder) { + return NewItemItemInteractionLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Invitations the invitations property +// returns a *ItemItemInvitationsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Invitations()(*ItemItemInvitationsRequestBuilder) { + return NewItemItemInvitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Issues the issues property +// returns a *ItemItemIssuesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Issues()(*ItemItemIssuesRequestBuilder) { + return NewItemItemIssuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Keys the keys property +// returns a *ItemItemKeysRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Keys()(*ItemItemKeysRequestBuilder) { + return NewItemItemKeysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Labels the labels property +// returns a *ItemItemLabelsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Labels()(*ItemItemLabelsRequestBuilder) { + return NewItemItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Languages the languages property +// returns a *ItemItemLanguagesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Languages()(*ItemItemLanguagesRequestBuilder) { + return NewItemItemLanguagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Lfs the lfs property +// returns a *ItemItemLfsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Lfs()(*ItemItemLfsRequestBuilder) { + return NewItemItemLfsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// License the license property +// returns a *ItemItemLicenseRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) License()(*ItemItemLicenseRequestBuilder) { + return NewItemItemLicenseRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Merges the merges property +// returns a *ItemItemMergesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Merges()(*ItemItemMergesRequestBuilder) { + return NewItemItemMergesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// MergeUpstream the mergeUpstream property +// returns a *ItemItemMergeUpstreamRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) MergeUpstream()(*ItemItemMergeUpstreamRequestBuilder) { + return NewItemItemMergeUpstreamRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Milestones the milestones property +// returns a *ItemItemMilestonesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Milestones()(*ItemItemMilestonesRequestBuilder) { + return NewItemItemMilestonesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Notifications the notifications property +// returns a *ItemItemNotificationsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Notifications()(*ItemItemNotificationsRequestBuilder) { + return NewItemItemNotificationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Pages the pages property +// returns a *ItemItemPagesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) 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/enterprise-cloud@latest//rest/repos/repos#replace-all-repository-topics) endpoint. +// returns a FullRepositoryable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#update-a-repository +func (m *ItemRepoItemRequestBuilder) Patch(ctx context.Context, body ItemItemRepoPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// PrivateVulnerabilityReporting the privateVulnerabilityReporting property +// returns a *ItemItemPrivateVulnerabilityReportingRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) PrivateVulnerabilityReporting()(*ItemItemPrivateVulnerabilityReportingRequestBuilder) { + return NewItemItemPrivateVulnerabilityReportingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Projects the projects property +// returns a *ItemItemProjectsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Projects()(*ItemItemProjectsRequestBuilder) { + return NewItemItemProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Properties the properties property +// returns a *ItemItemPropertiesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Properties()(*ItemItemPropertiesRequestBuilder) { + return NewItemItemPropertiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Pulls the pulls property +// returns a *ItemItemPullsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Pulls()(*ItemItemPullsRequestBuilder) { + return NewItemItemPullsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Readme the readme property +// returns a *ItemItemReadmeRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Readme()(*ItemItemReadmeRequestBuilder) { + return NewItemItemReadmeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Releases the releases property +// returns a *ItemItemReleasesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Releases()(*ItemItemReleasesRequestBuilder) { + return NewItemItemReleasesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rules the rules property +// returns a *ItemItemRulesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Rules()(*ItemItemRulesRequestBuilder) { + return NewItemItemRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rulesets the rulesets property +// returns a *ItemItemRulesetsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Rulesets()(*ItemItemRulesetsRequestBuilder) { + return NewItemItemRulesetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecretScanning the secretScanning property +// returns a *ItemItemSecretScanningRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) SecretScanning()(*ItemItemSecretScanningRequestBuilder) { + return NewItemItemSecretScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecurityAdvisories the securityAdvisories property +// returns a *ItemItemSecurityAdvisoriesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) SecurityAdvisories()(*ItemItemSecurityAdvisoriesRequestBuilder) { + return NewItemItemSecurityAdvisoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stargazers the stargazers property +// returns a *ItemItemStargazersRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Stargazers()(*ItemItemStargazersRequestBuilder) { + return NewItemItemStargazersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stats the stats property +// returns a *ItemItemStatsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Stats()(*ItemItemStatsRequestBuilder) { + return NewItemItemStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Statuses the statuses property +// returns a *ItemItemStatusesRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Statuses()(*ItemItemStatusesRequestBuilder) { + return NewItemItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Subscribers the subscribers property +// returns a *ItemItemSubscribersRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Subscribers()(*ItemItemSubscribersRequestBuilder) { + return NewItemItemSubscribersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Subscription the subscription property +// returns a *ItemItemSubscriptionRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Subscription()(*ItemItemSubscriptionRequestBuilder) { + return NewItemItemSubscriptionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tags the tags property +// returns a *ItemItemTagsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Tags()(*ItemItemTagsRequestBuilder) { + return NewItemItemTagsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tarball the tarball property +// returns a *ItemItemTarballRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Tarball()(*ItemItemTarballRequestBuilder) { + return NewItemItemTarballRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +// returns a *ItemItemTeamsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Teams()(*ItemItemTeamsRequestBuilder) { + return NewItemItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deleting a repository requires admin access.If an organization owner has configured the organization to prevent members from deleting organization-ownedrepositories, you will get a `403 Forbidden` response.OAuth app tokens and personal access tokens (classic) need the `delete_repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemRepoItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + 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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +// returns a *RequestInformation when successful +func (m *ItemRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#replace-all-repository-topics) endpoint. +// returns a *RequestInformation when successful +func (m *ItemRepoItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemRepoPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// Topics the topics property +// returns a *ItemItemTopicsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Topics()(*ItemItemTopicsRequestBuilder) { + return NewItemItemTopicsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Traffic the traffic property +// returns a *ItemItemTrafficRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Traffic()(*ItemItemTrafficRequestBuilder) { + return NewItemItemTrafficRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Transfer the transfer property +// returns a *ItemItemTransferRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Transfer()(*ItemItemTransferRequestBuilder) { + return NewItemItemTransferRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// VulnerabilityAlerts the vulnerabilityAlerts property +// returns a *ItemItemVulnerabilityAlertsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) 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. +// returns a *ItemRepoItemRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) WithUrl(rawUrl string)(*ItemRepoItemRequestBuilder) { + return NewItemRepoItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} +// Zipball the zipball property +// returns a *ItemItemZipballRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Zipball()(*ItemItemZipballRequestBuilder) { + return NewItemItemZipballRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/owner_item_request_builder.go b/pkg/github/repos/owner_item_request_builder.go new file mode 100644 index 0000000..bb72511 --- /dev/null +++ b/pkg/github/repos/owner_item_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// OwnerItemRequestBuilder builds and executes requests for operations under \repos\{owner-id} +type OwnerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepoId gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item.item collection +// returns a *ItemRepoItemRequestBuilder when successful +func (m *OwnerItemRequestBuilder) ByRepoId(repoId string)(*ItemRepoItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repoId != "" { + urlTplParams["repo%2Did"] = repoId + } + return NewItemRepoItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewOwnerItemRequestBuilderInternal instantiates a new OwnerItemRequestBuilder and sets the default values. +func NewOwnerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OwnerItemRequestBuilder) { + m := &OwnerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}", pathParameters), + } + return m +} +// NewOwnerItemRequestBuilder instantiates a new OwnerItemRequestBuilder and sets the default values. +func NewOwnerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OwnerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewOwnerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/repos_request_builder.go b/pkg/github/repos/repos_request_builder.go new file mode 100644 index 0000000..2e89713 --- /dev/null +++ b/pkg/github/repos/repos_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ReposRequestBuilder builds and executes requests for operations under \repos +type ReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByOwnerId gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.repos.item collection +// returns a *OwnerItemRequestBuilder when successful +func (m *ReposRequestBuilder) ByOwnerId(ownerId string)(*OwnerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ownerId != "" { + urlTplParams["owner%2Did"] = ownerId + } + return NewOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewReposRequestBuilderInternal instantiates a new ReposRequestBuilder and sets the default values. +func NewReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposRequestBuilder) { + m := &ReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos", pathParameters), + } + return m +} +// NewReposRequestBuilder instantiates a new ReposRequestBuilder and sets the default values. +func NewReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewReposRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repositories/repositories_request_builder.go b/pkg/github/repositories/repositories_request_builder.go new file mode 100644 index 0000000..af787bc --- /dev/null +++ b/pkg/github/repositories/repositories_request_builder.go @@ -0,0 +1,69 @@ +package repositories + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// RepositoriesRequestBuilder builds and executes requests for operations under \repositories +type RepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// RepositoriesRequestBuilderGetQueryParameters lists all public repositories in the order that they were created.Note:- For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.- Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. +type RepositoriesRequestBuilderGetQueryParameters struct { + // A repository ID. Only return repositories with an ID greater than this ID. + Since *int32 `uriparametername:"since"` +} +// NewRepositoriesRequestBuilderInternal instantiates a new RepositoriesRequestBuilder and sets the default values. +func NewRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RepositoriesRequestBuilder) { + m := &RepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repositories{?since*}", pathParameters), + } + return m +} +// NewRepositoriesRequestBuilder instantiates a new RepositoriesRequestBuilder and sets the default values. +func NewRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all public repositories in the order that they were created.Note:- For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.- Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. +// returns a []MinimalRepositoryable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-public-repositories +func (m *RepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[RepositoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists all public repositories in the order that they were created.Note:- For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.- Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. +// returns a *RequestInformation when successful +func (m *RepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[RepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RepositoriesRequestBuilder when successful +func (m *RepositoriesRequestBuilder) WithUrl(rawUrl string)(*RepositoriesRequestBuilder) { + return NewRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/scim_request_builder.go b/pkg/github/scim/scim_request_builder.go new file mode 100644 index 0000000..1543940 --- /dev/null +++ b/pkg/github/scim/scim_request_builder.go @@ -0,0 +1,28 @@ +package scim + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ScimRequestBuilder builds and executes requests for operations under \scim +type ScimRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewScimRequestBuilderInternal instantiates a new ScimRequestBuilder and sets the default values. +func NewScimRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ScimRequestBuilder) { + m := &ScimRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim", pathParameters), + } + return m +} +// NewScimRequestBuilder instantiates a new ScimRequestBuilder and sets the default values. +func NewScimRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ScimRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewScimRequestBuilderInternal(urlParams, requestAdapter) +} +// V2 the v2 property +// returns a *V2RequestBuilder when successful +func (m *ScimRequestBuilder) V2()(*V2RequestBuilder) { + return NewV2RequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/scim/v2/organizations/item/users/item/with_scim_user_patch_request_body_operations_op.go b/pkg/github/scim/v2/organizations/item/users/item/with_scim_user_patch_request_body_operations_op.go new file mode 100644 index 0000000..7ce7506 --- /dev/null +++ b/pkg/github/scim/v2/organizations/item/users/item/with_scim_user_patch_request_body_operations_op.go @@ -0,0 +1,39 @@ +package item +import ( + "errors" +) +type WithScim_user_PatchRequestBody_Operations_op int + +const ( + ADD_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP WithScim_user_PatchRequestBody_Operations_op = iota + REMOVE_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP + REPLACE_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP +) + +func (i WithScim_user_PatchRequestBody_Operations_op) String() string { + return []string{"add", "remove", "replace"}[i] +} +func ParseWithScim_user_PatchRequestBody_Operations_op(v string) (any, error) { + result := ADD_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP + switch v { + case "add": + result = ADD_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP + case "remove": + result = REMOVE_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP + case "replace": + result = REPLACE_WITHSCIM_USER_PATCHREQUESTBODY_OPERATIONS_OP + default: + return 0, errors.New("Unknown WithScim_user_PatchRequestBody_Operations_op value: " + v) + } + return &result, nil +} +func SerializeWithScim_user_PatchRequestBody_Operations_op(values []WithScim_user_PatchRequestBody_Operations_op) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithScim_user_PatchRequestBody_Operations_op) isMultiValue() bool { + return false +} diff --git a/pkg/github/scim/v2_enterprises_item_groups_request_builder.go b/pkg/github/scim/v2_enterprises_item_groups_request_builder.go new file mode 100644 index 0000000..9e70e8b --- /dev/null +++ b/pkg/github/scim/v2_enterprises_item_groups_request_builder.go @@ -0,0 +1,127 @@ +package scim + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// V2EnterprisesItemGroupsRequestBuilder builds and executes requests for operations under \scim\v2\enterprises\{enterprise}\Groups +type V2EnterprisesItemGroupsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// V2EnterprisesItemGroupsRequestBuilderGetQueryParameters **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. +type V2EnterprisesItemGroupsRequestBuilderGetQueryParameters struct { + // Used for pagination: the number of results to return per page. + Count *int32 `uriparametername:"count"` + // Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time. + ExcludedAttributes *string `uriparametername:"excludedAttributes"` + // If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are `externalId`, `id`, and `displayName`. For example, `?filter="externalId eq '9138790-10932-109120392-12321'"`. + Filter *string `uriparametername:"filter"` + // Used for pagination: the starting index of the first result to return when paginating through values. + StartIndex *int32 `uriparametername:"startIndex"` +} +// ByScim_group_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.scim.v2.enterprises.item.Groups.item collection +// returns a *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder when successful +func (m *V2EnterprisesItemGroupsRequestBuilder) ByScim_group_id(scim_group_id string)(*V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if scim_group_id != "" { + urlTplParams["scim_group_id"] = scim_group_id + } + return NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewV2EnterprisesItemGroupsRequestBuilderInternal instantiates a new V2EnterprisesItemGroupsRequestBuilder and sets the default values. +func NewV2EnterprisesItemGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemGroupsRequestBuilder) { + m := &V2EnterprisesItemGroupsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/enterprises/{enterprise}/Groups{?count*,excludedAttributes*,filter*,startIndex*}", pathParameters), + } + return m +} +// NewV2EnterprisesItemGroupsRequestBuilder instantiates a new V2EnterprisesItemGroupsRequestBuilder and sets the default values. +func NewV2EnterprisesItemGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemGroupsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2EnterprisesItemGroupsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. +// returns a ScimEnterpriseGroupListable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#list-provisioned-scim-groups-for-an-enterprise +func (m *V2EnterprisesItemGroupsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2EnterprisesItemGroupsRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupListable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseGroupListFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupListable), nil +} +// Post **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Creates a SCIM group for an enterprise.When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the `externalId` and `id` for each user. +// returns a ScimEnterpriseGroupResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#provision-a-scim-enterprise-group +func (m *V2EnterprisesItemGroupsRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Groupable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseGroupResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable), nil +} +// ToGetRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemGroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2EnterprisesItemGroupsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + return requestInfo, nil +} +// ToPostRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Creates a SCIM group for an enterprise.When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the `externalId` and `id` for each user. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Groupable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *V2EnterprisesItemGroupsRequestBuilder when successful +func (m *V2EnterprisesItemGroupsRequestBuilder) WithUrl(rawUrl string)(*V2EnterprisesItemGroupsRequestBuilder) { + return NewV2EnterprisesItemGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/v2_enterprises_item_groups_with_scim_group_item_request_builder.go b/pkg/github/scim/v2_enterprises_item_groups_with_scim_group_item_request_builder.go new file mode 100644 index 0000000..1511778 --- /dev/null +++ b/pkg/github/scim/v2_enterprises_item_groups_with_scim_group_item_request_builder.go @@ -0,0 +1,187 @@ +package scim + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder builds and executes requests for operations under \scim\v2\enterprises\{enterprise}\Groups\{scim_group_id} +type V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderGetQueryParameters **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Gets information about a SCIM group. +type V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderGetQueryParameters struct { + // Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time. + ExcludedAttributes *string `uriparametername:"excludedAttributes"` +} +// NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderInternal instantiates a new V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder and sets the default values. +func NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) { + m := &V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}{?excludedAttributes*}", pathParameters), + } + return m +} +// NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder instantiates a new V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder and sets the default values. +func NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** SCIM provisioning using the REST API is in public beta and subject to change.Deletes a SCIM group from an enterprise. +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#delete-a-scim-group-from-an-enterprise +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Gets information about a SCIM group. +// returns a ScimEnterpriseGroupResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#get-scim-provisioning-information-for-an-enterprise-group +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseGroupResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable), nil +} +// Patch **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Update a provisioned group’s individual attributes.To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). The update function can also be used to add group memberships.You can submit group memberships individually or in batches for improved efficiency.**Note**: Memberships are referenced via a local user id. Ensure users are created before referencing them here. +// returns a ScimEnterpriseGroupResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#update-an-attribute-for-a-scim-enterprise-group +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PatchSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseGroupResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable), nil +} +// Put **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Replaces an existing provisioned group’s information.You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. +// returns a ScimEnterpriseGroupResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#set-scim-information-for-a-provisioned-enterprise-group +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Groupable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseGroupResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseGroupResponseable), nil +} +// ToDeleteRequestInformation **Note:** SCIM provisioning using the REST API is in public beta and subject to change.Deletes a SCIM group from an enterprise. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + return requestInfo, nil +} +// ToGetRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Gets information about a SCIM group. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + return requestInfo, nil +} +// ToPatchRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Update a provisioned group’s individual attributes.To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). The update function can also be used to add group memberships.You can submit group memberships individually or in batches for improved efficiency.**Note**: Memberships are referenced via a local user id. Ensure users are created before referencing them here. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PatchSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Replaces an existing provisioned group’s information.You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Groupable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder when successful +func (m *V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) WithUrl(rawUrl string)(*V2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder) { + return NewV2EnterprisesItemGroupsWithScim_group_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/v2_enterprises_item_users_request_builder.go b/pkg/github/scim/v2_enterprises_item_users_request_builder.go new file mode 100644 index 0000000..38524d7 --- /dev/null +++ b/pkg/github/scim/v2_enterprises_item_users_request_builder.go @@ -0,0 +1,125 @@ +package scim + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// V2EnterprisesItemUsersRequestBuilder builds and executes requests for operations under \scim\v2\enterprises\{enterprise}\Users +type V2EnterprisesItemUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// V2EnterprisesItemUsersRequestBuilderGetQueryParameters **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. +type V2EnterprisesItemUsersRequestBuilderGetQueryParameters struct { + // Used for pagination: the number of results to return per page. + Count *int32 `uriparametername:"count"` + // If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are `userName`, `externalId`, `id`, and `displayName`. For example, `?filter="externalId eq '9138790-10932-109120392-12321'"`. + Filter *string `uriparametername:"filter"` + // Used for pagination: the starting index of the first result to return when paginating through values. + StartIndex *int32 `uriparametername:"startIndex"` +} +// ByScim_user_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.scim.v2.enterprises.item.Users.item collection +// returns a *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder when successful +func (m *V2EnterprisesItemUsersRequestBuilder) ByScim_user_id(scim_user_id string)(*V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if scim_user_id != "" { + urlTplParams["scim_user_id"] = scim_user_id + } + return NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewV2EnterprisesItemUsersRequestBuilderInternal instantiates a new V2EnterprisesItemUsersRequestBuilder and sets the default values. +func NewV2EnterprisesItemUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemUsersRequestBuilder) { + m := &V2EnterprisesItemUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/enterprises/{enterprise}/Users{?count*,filter*,startIndex*}", pathParameters), + } + return m +} +// NewV2EnterprisesItemUsersRequestBuilder instantiates a new V2EnterprisesItemUsersRequestBuilder and sets the default values. +func NewV2EnterprisesItemUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2EnterprisesItemUsersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. +// returns a ScimEnterpriseUserListable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#list-scim-provisioned-identities-for-an-enterprise +func (m *V2EnterprisesItemUsersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2EnterprisesItemUsersRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserListable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseUserListFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserListable), nil +} +// Post **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Creates an external identity for a new SCIM enterprise user.SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML. +// returns a ScimEnterpriseUserResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#provision-a-scim-enterprise-user +func (m *V2EnterprisesItemUsersRequestBuilder) Post(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Userable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseUserResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable), nil +} +// ToGetRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemUsersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2EnterprisesItemUsersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + return requestInfo, nil +} +// ToPostRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Creates an external identity for a new SCIM enterprise user.SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemUsersRequestBuilder) ToPostRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Userable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *V2EnterprisesItemUsersRequestBuilder when successful +func (m *V2EnterprisesItemUsersRequestBuilder) WithUrl(rawUrl string)(*V2EnterprisesItemUsersRequestBuilder) { + return NewV2EnterprisesItemUsersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/v2_enterprises_item_users_with_scim_user_item_request_builder.go b/pkg/github/scim/v2_enterprises_item_users_with_scim_user_item_request_builder.go new file mode 100644 index 0000000..88998f2 --- /dev/null +++ b/pkg/github/scim/v2_enterprises_item_users_with_scim_user_item_request_builder.go @@ -0,0 +1,182 @@ +package scim + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder builds and executes requests for operations under \scim\v2\enterprises\{enterprise}\Users\{scim_user_id} +type V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilderInternal instantiates a new V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder and sets the default values. +func NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) { + m := &V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", pathParameters), + } + return m +} +// NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilder instantiates a new V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder and sets the default values. +func NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Note:** SCIM provisioning using the REST API is in public beta and subject to change.Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible. +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#delete-a-scim-user-from-an-enterprise +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Gets information about a SCIM user. +// returns a ScimEnterpriseUserResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#get-scim-provisioning-information-for-an-enterprise-user +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseUserResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable), nil +} +// Patch **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Update a provisioned user's individual attributes.To modify a user's attributes, you'll need to provide a `Operations` JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).**Note:** Complex SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will be ineffective.**Warning:** Setting `active: false` will suspend a user, and their handle and email will be obfuscated.```{ "Operations":[{ "op":"replace", "value":{ "active":false } }]}``` +// returns a ScimEnterpriseUserResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#update-an-attribute-for-a-scim-enterprise-user +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) Patch(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PatchSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseUserResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable), nil +} +// Put **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Replaces an existing provisioned user's information.You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the [Update an attribute for a SCIM user](#update-an-attribute-for-a-scim-enterprise-user) endpoint.**Warning:** Setting `active: false` will suspend a user, and their handle and email will be obfuscated. +// returns a ScimEnterpriseUserResponseable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#set-scim-information-for-a-provisioned-enterprise-user +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Userable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimEnterpriseUserResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimEnterpriseUserResponseable), nil +} +// ToDeleteRequestInformation **Note:** SCIM provisioning using the REST API is in public beta and subject to change.Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + return requestInfo, nil +} +// ToGetRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Gets information about a SCIM user. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + return requestInfo, nil +} +// ToPatchRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Update a provisioned user's individual attributes.To modify a user's attributes, you'll need to provide a `Operations` JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).**Note:** Complex SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will be ineffective.**Warning:** Setting `active: false` will suspend a user, and their handle and email will be obfuscated.```{ "Operations":[{ "op":"replace", "value":{ "active":false } }]}``` +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PatchSchemaable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation **Note:** SCIM provisioning for users and groups using the REST API is in public beta and subject to change.Replaces an existing provisioned user's information.You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the [Update an attribute for a SCIM user](#update-an-attribute-for-a-scim-enterprise-user) endpoint.**Warning:** Setting `active: false` will suspend a user, and their handle and email will be obfuscated. +// returns a *RequestInformation when successful +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Userable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder when successful +func (m *V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) WithUrl(rawUrl string)(*V2EnterprisesItemUsersWithScim_user_ItemRequestBuilder) { + return NewV2EnterprisesItemUsersWithScim_user_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/v2_enterprises_request_builder.go b/pkg/github/scim/v2_enterprises_request_builder.go new file mode 100644 index 0000000..c81cd0d --- /dev/null +++ b/pkg/github/scim/v2_enterprises_request_builder.go @@ -0,0 +1,35 @@ +package scim + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// V2EnterprisesRequestBuilder builds and executes requests for operations under \scim\v2\enterprises +type V2EnterprisesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByEnterprise gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.scim.v2.enterprises.item collection +// returns a *V2EnterprisesWithEnterpriseItemRequestBuilder when successful +func (m *V2EnterprisesRequestBuilder) ByEnterprise(enterprise string)(*V2EnterprisesWithEnterpriseItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if enterprise != "" { + urlTplParams["enterprise"] = enterprise + } + return NewV2EnterprisesWithEnterpriseItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewV2EnterprisesRequestBuilderInternal instantiates a new V2EnterprisesRequestBuilder and sets the default values. +func NewV2EnterprisesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesRequestBuilder) { + m := &V2EnterprisesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/enterprises", pathParameters), + } + return m +} +// NewV2EnterprisesRequestBuilder instantiates a new V2EnterprisesRequestBuilder and sets the default values. +func NewV2EnterprisesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2EnterprisesRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/scim/v2_enterprises_with_enterprise_item_request_builder.go b/pkg/github/scim/v2_enterprises_with_enterprise_item_request_builder.go new file mode 100644 index 0000000..e0022b4 --- /dev/null +++ b/pkg/github/scim/v2_enterprises_with_enterprise_item_request_builder.go @@ -0,0 +1,33 @@ +package scim + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// V2EnterprisesWithEnterpriseItemRequestBuilder builds and executes requests for operations under \scim\v2\enterprises\{enterprise} +type V2EnterprisesWithEnterpriseItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewV2EnterprisesWithEnterpriseItemRequestBuilderInternal instantiates a new V2EnterprisesWithEnterpriseItemRequestBuilder and sets the default values. +func NewV2EnterprisesWithEnterpriseItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesWithEnterpriseItemRequestBuilder) { + m := &V2EnterprisesWithEnterpriseItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/enterprises/{enterprise}", pathParameters), + } + return m +} +// NewV2EnterprisesWithEnterpriseItemRequestBuilder instantiates a new V2EnterprisesWithEnterpriseItemRequestBuilder and sets the default values. +func NewV2EnterprisesWithEnterpriseItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2EnterprisesWithEnterpriseItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2EnterprisesWithEnterpriseItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Groups the Groups property +// returns a *V2EnterprisesItemGroupsRequestBuilder when successful +func (m *V2EnterprisesWithEnterpriseItemRequestBuilder) Groups()(*V2EnterprisesItemGroupsRequestBuilder) { + return NewV2EnterprisesItemGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Users the Users property +// returns a *V2EnterprisesItemUsersRequestBuilder when successful +func (m *V2EnterprisesWithEnterpriseItemRequestBuilder) Users()(*V2EnterprisesItemUsersRequestBuilder) { + return NewV2EnterprisesItemUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body.go new file mode 100644 index 0000000..c07fe22 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body.go @@ -0,0 +1,127 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Set of operations to be performed + operations []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable + // The schemas property + schemas []string +} +// NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody instantiates a new V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody()(*V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) { + m := &V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["Operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_OperationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable) + } + } + m.SetOperations(res) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSchemas(res) + } + return nil + } + return res +} +// GetOperations gets the Operations property value. Set of operations to be performed +// returns a []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) GetOperations()([]V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable) { + return m.operations +} +// GetSchemas gets the schemas property value. The schemas property +// returns a []string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) GetSchemas()([]string) { + return m.schemas +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("Operations", cast) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", m.GetSchemas()) + 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 *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetOperations sets the Operations property value. Set of operations to be performed +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) SetOperations(value []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable)() { + m.operations = value +} +// SetSchemas sets the schemas property value. The schemas property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody) SetSchemas(value []string)() { + m.schemas = value +} +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOperations()([]V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable) + GetSchemas()([]string) + SetOperations(value []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable)() + SetSchemas(value []string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations.go new file mode 100644 index 0000000..89927ab --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations.go @@ -0,0 +1,233 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The path property + path *string + // The value property + value V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable +} +// V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value composed type wrapper for classes string, V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able, []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value struct { + // Composed type representation for type string + string *string + // Composed type representation for type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able + v2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able + // Composed type representation for type []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able + v2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able +} +// NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value instantiates a new V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value()(*V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) { + m := &V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value{ + } + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2FromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able) + } + } + result.SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2(cast) + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) GetString()(*string) { + return m.string +} +// GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1 gets the V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 property value. Composed type representation for type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able +// returns a V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1()(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able) { + return m.v2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 +} +// GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2 gets the V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 property value. Composed type representation for type []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able +// returns a []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2()([]V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able) { + return m.v2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1() != nil { + err := writer.WriteObjectValue("", m.GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } else if m.GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2())) + for i, v := range m.GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } + return nil +} +// SetString sets the string property value. Composed type representation for type string +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) SetString(value *string)() { + m.string = value +} +// SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1 sets the V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 property value. Composed type representation for type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1(value V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able)() { + m.v2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 = value +} +// SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2 sets the V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 property value. Composed type representation for type []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_value) SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2(value []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able)() { + m.v2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 = value +} +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetString()(*string) + GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1()(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able) + GetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2()([]V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able) + SetString(value *string)() + SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember1(value V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able)() + SetV2OrganizationsItemUsersItemWithScimUserPatchRequestBodyOperationsValueMember2(value []V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able)() +} +// NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations instantiates a new V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations()(*V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) { + m := &V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_OperationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_OperationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable)) + } + return nil + } + return res +} +// GetPath gets the path property value. The path property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) GetPath()(*string) { + return m.path +} +// GetValue gets the value property value. The value property +// returns a V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) GetValue()(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable) { + return m.value +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("value", m.GetValue()) + 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 *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPath sets the path property value. The path property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) SetPath(value *string)() { + m.path = value +} +// SetValue sets the value property value. The value property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations) SetValue(value V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable)() { + m.value = value +} +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPath()(*string) + GetValue()(V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable) + SetPath(value *string)() + SetValue(value V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_WithScim_user_PatchRequestBody_Operations_valueable)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations_value_member1.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations_value_member1.go new file mode 100644 index 0000000..813b154 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations_value_member1.go @@ -0,0 +1,196 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 struct { + // The active property + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The externalId property + externalId *string + // The familyName property + familyName *string + // The givenName property + givenName *string + // The userName property + userName *string +} +// NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 instantiates a new V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1 and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1()(*V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) { + m := &V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1(), nil +} +// GetActive gets the active property value. The active property +// returns a *bool when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExternalId gets the externalId property value. The externalId property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetExternalId()(*string) { + return m.externalId +} +// GetFamilyName gets the familyName property value. The familyName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetFamilyName()(*string) { + return m.familyName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["familyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamilyName(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetGivenName gets the givenName property value. The givenName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetGivenName()(*string) { + return m.givenName +} +// GetUserName gets the userName property value. The userName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("familyName", m.GetFamilyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The active property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExternalId sets the externalId property value. The externalId property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) SetExternalId(value *string)() { + m.externalId = value +} +// SetFamilyName sets the familyName property value. The familyName property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) SetFamilyName(value *string)() { + m.familyName = value +} +// SetGivenName sets the givenName property value. The givenName property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) SetGivenName(value *string)() { + m.givenName = value +} +// SetUserName sets the userName property value. The userName property +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1) SetUserName(value *string)() { + m.userName = value +} +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetExternalId()(*string) + GetFamilyName()(*string) + GetGivenName()(*string) + GetUserName()(*string) + SetActive(value *bool)() + SetExternalId(value *string)() + SetFamilyName(value *string)() + SetGivenName(value *string)() + SetUserName(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations_value_member2.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations_value_member2.go new file mode 100644 index 0000000..96684f7 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_patch_request_body_operations_value_member2.go @@ -0,0 +1,51 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 instantiates a new V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2 and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2()(*V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2) { + m := &V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type V2OrganizationsItemUsersItemWithScim_user_PatchRequestBody_Operations_valueMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body.go new file mode 100644 index 0000000..9a63a81 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body.go @@ -0,0 +1,307 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PutRequestBody struct { + // The active property + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the user, suitable for display to end-users + displayName *string + // user emails + emails []V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable + // The externalId property + externalId *string + // The groups property + groups []string + // The name property + name V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable + // The schemas property + schemas []string + // Configured by the admin. Could be an email, login, or username + userName *string +} +// NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody instantiates a new V2OrganizationsItemUsersItemWithScim_user_PutRequestBody and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody()(*V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) { + m := &V2OrganizationsItemUsersItemWithScim_user_PutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody(), nil +} +// GetActive gets the active property value. The active property +// returns a *bool when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The name of the user, suitable for display to end-users +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetDisplayName()(*string) { + return m.displayName +} +// GetEmails gets the emails property value. user emails +// returns a []V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetEmails()([]V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable) { + return m.emails +} +// GetExternalId gets the externalId property value. The externalId property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable) + } + } + m.SetEmails(res) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGroups(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetName(val.(V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable)) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSchemas(res) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The groups property +// returns a []string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetGroups()([]string) { + return m.groups +} +// GetName gets the name property value. The name property +// returns a V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetName()(V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable) { + return m.name +} +// GetSchemas gets the schemas property value. The schemas property +// returns a []string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetSchemas()([]string) { + return m.schemas +} +// GetUserName gets the userName property value. Configured by the admin. Could be an email, login, or username +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + err := writer.WriteCollectionOfStringValues("groups", m.GetGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", m.GetSchemas()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The active property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The name of the user, suitable for display to end-users +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmails sets the emails property value. user emails +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetEmails(value []V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable)() { + m.emails = value +} +// SetExternalId sets the externalId property value. The externalId property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetExternalId(value *string)() { + m.externalId = value +} +// SetGroups sets the groups property value. The groups property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetGroups(value []string)() { + m.groups = value +} +// SetName sets the name property value. The name property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetName(value V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable)() { + m.name = value +} +// SetSchemas sets the schemas property value. The schemas property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetSchemas(value []string)() { + m.schemas = value +} +// SetUserName sets the userName property value. Configured by the admin. Could be an email, login, or username +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody) SetUserName(value *string)() { + m.userName = value +} +type V2OrganizationsItemUsersItemWithScim_user_PutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetDisplayName()(*string) + GetEmails()([]V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable) + GetExternalId()(*string) + GetGroups()([]string) + GetName()(V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable) + GetSchemas()([]string) + GetUserName()(*string) + SetActive(value *bool)() + SetDisplayName(value *string)() + SetEmails(value []V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable)() + SetExternalId(value *string)() + SetGroups(value []string)() + SetName(value V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable)() + SetSchemas(value []string)() + SetUserName(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body_emails.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body_emails.go new file mode 100644 index 0000000..9483e22 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body_emails.go @@ -0,0 +1,138 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The primary property + primary *bool + // The type property + typeEscaped *string + // The value property + value *string +} +// NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails instantiates a new V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails()(*V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) { + m := &V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetPrimary gets the primary property value. The primary property +// returns a *bool when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) GetPrimary()(*bool) { + return m.primary +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("primary", m.GetPrimary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPrimary sets the primary property value. The primary property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) SetPrimary(value *bool)() { + m.primary = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The value property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emails) SetValue(value *string)() { + m.value = value +} +type V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_emailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrimary()(*bool) + GetTypeEscaped()(*string) + GetValue()(*string) + SetPrimary(value *bool)() + SetTypeEscaped(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body_name.go b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body_name.go new file mode 100644 index 0000000..97ff916 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_item_with_scim_user_put_request_body_name.go @@ -0,0 +1,138 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The familyName property + familyName *string + // The formatted property + formatted *string + // The givenName property + givenName *string +} +// NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name instantiates a new V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name and sets the default values. +func NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name()(*V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) { + m := &V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFamilyName gets the familyName property value. The familyName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) GetFamilyName()(*string) { + return m.familyName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["familyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamilyName(val) + } + return nil + } + res["formatted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormatted(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + return res +} +// GetFormatted gets the formatted property value. The formatted property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) GetFormatted()(*string) { + return m.formatted +} +// GetGivenName gets the givenName property value. The givenName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) GetGivenName()(*string) { + return m.givenName +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("familyName", m.GetFamilyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formatted", m.GetFormatted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + 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 *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFamilyName sets the familyName property value. The familyName property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) SetFamilyName(value *string)() { + m.familyName = value +} +// SetFormatted sets the formatted property value. The formatted property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) SetFormatted(value *string)() { + m.formatted = value +} +// SetGivenName sets the givenName property value. The givenName property +func (m *V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_name) SetGivenName(value *string)() { + m.givenName = value +} +type V2OrganizationsItemUsersItemWithScim_user_PutRequestBody_nameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFamilyName()(*string) + GetFormatted()(*string) + GetGivenName()(*string) + SetFamilyName(value *string)() + SetFormatted(value *string)() + SetGivenName(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_post_request_body.go b/pkg/github/scim/v2_organizations_item_users_post_request_body.go new file mode 100644 index 0000000..f00a604 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_post_request_body.go @@ -0,0 +1,307 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersPostRequestBody struct { + // The active property + active *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The name of the user, suitable for display to end-users + displayName *string + // user emails + emails []V2OrganizationsItemUsersPostRequestBody_emailsable + // The externalId property + externalId *string + // The groups property + groups []string + // The name property + name V2OrganizationsItemUsersPostRequestBody_nameable + // The schemas property + schemas []string + // Configured by the admin. Could be an email, login, or username + userName *string +} +// NewV2OrganizationsItemUsersPostRequestBody instantiates a new V2OrganizationsItemUsersPostRequestBody and sets the default values. +func NewV2OrganizationsItemUsersPostRequestBody()(*V2OrganizationsItemUsersPostRequestBody) { + m := &V2OrganizationsItemUsersPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersPostRequestBody(), nil +} +// GetActive gets the active property value. The active property +// returns a *bool when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetActive()(*bool) { + return m.active +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The name of the user, suitable for display to end-users +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetDisplayName()(*string) { + return m.displayName +} +// GetEmails gets the emails property value. user emails +// returns a []V2OrganizationsItemUsersPostRequestBody_emailsable when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetEmails()([]V2OrganizationsItemUsersPostRequestBody_emailsable) { + return m.emails +} +// GetExternalId gets the externalId property value. The externalId property +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateV2OrganizationsItemUsersPostRequestBody_emailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]V2OrganizationsItemUsersPostRequestBody_emailsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(V2OrganizationsItemUsersPostRequestBody_emailsable) + } + } + m.SetEmails(res) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGroups(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateV2OrganizationsItemUsersPostRequestBody_nameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetName(val.(V2OrganizationsItemUsersPostRequestBody_nameable)) + } + return nil + } + res["schemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSchemas(res) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The groups property +// returns a []string when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetGroups()([]string) { + return m.groups +} +// GetName gets the name property value. The name property +// returns a V2OrganizationsItemUsersPostRequestBody_nameable when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetName()(V2OrganizationsItemUsersPostRequestBody_nameable) { + return m.name +} +// GetSchemas gets the schemas property value. The schemas property +// returns a []string when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetSchemas()([]string) { + return m.schemas +} +// GetUserName gets the userName property value. Configured by the admin. Could be an email, login, or username +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + err := writer.WriteCollectionOfStringValues("groups", m.GetGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetSchemas() != nil { + err := writer.WriteCollectionOfStringValues("schemas", m.GetSchemas()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The active property +func (m *V2OrganizationsItemUsersPostRequestBody) SetActive(value *bool)() { + m.active = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *V2OrganizationsItemUsersPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The name of the user, suitable for display to end-users +func (m *V2OrganizationsItemUsersPostRequestBody) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmails sets the emails property value. user emails +func (m *V2OrganizationsItemUsersPostRequestBody) SetEmails(value []V2OrganizationsItemUsersPostRequestBody_emailsable)() { + m.emails = value +} +// SetExternalId sets the externalId property value. The externalId property +func (m *V2OrganizationsItemUsersPostRequestBody) SetExternalId(value *string)() { + m.externalId = value +} +// SetGroups sets the groups property value. The groups property +func (m *V2OrganizationsItemUsersPostRequestBody) SetGroups(value []string)() { + m.groups = value +} +// SetName sets the name property value. The name property +func (m *V2OrganizationsItemUsersPostRequestBody) SetName(value V2OrganizationsItemUsersPostRequestBody_nameable)() { + m.name = value +} +// SetSchemas sets the schemas property value. The schemas property +func (m *V2OrganizationsItemUsersPostRequestBody) SetSchemas(value []string)() { + m.schemas = value +} +// SetUserName sets the userName property value. Configured by the admin. Could be an email, login, or username +func (m *V2OrganizationsItemUsersPostRequestBody) SetUserName(value *string)() { + m.userName = value +} +type V2OrganizationsItemUsersPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*bool) + GetDisplayName()(*string) + GetEmails()([]V2OrganizationsItemUsersPostRequestBody_emailsable) + GetExternalId()(*string) + GetGroups()([]string) + GetName()(V2OrganizationsItemUsersPostRequestBody_nameable) + GetSchemas()([]string) + GetUserName()(*string) + SetActive(value *bool)() + SetDisplayName(value *string)() + SetEmails(value []V2OrganizationsItemUsersPostRequestBody_emailsable)() + SetExternalId(value *string)() + SetGroups(value []string)() + SetName(value V2OrganizationsItemUsersPostRequestBody_nameable)() + SetSchemas(value []string)() + SetUserName(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_post_request_body_emails.go b/pkg/github/scim/v2_organizations_item_users_post_request_body_emails.go new file mode 100644 index 0000000..9ebbb79 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_post_request_body_emails.go @@ -0,0 +1,138 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersPostRequestBody_emails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The primary property + primary *bool + // The type property + typeEscaped *string + // The value property + value *string +} +// NewV2OrganizationsItemUsersPostRequestBody_emails instantiates a new V2OrganizationsItemUsersPostRequestBody_emails and sets the default values. +func NewV2OrganizationsItemUsersPostRequestBody_emails()(*V2OrganizationsItemUsersPostRequestBody_emails) { + m := &V2OrganizationsItemUsersPostRequestBody_emails{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersPostRequestBody_emailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersPostRequestBody_emailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersPostRequestBody_emails(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersPostRequestBody_emails) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersPostRequestBody_emails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimary(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetPrimary gets the primary property value. The primary property +// returns a *bool when successful +func (m *V2OrganizationsItemUsersPostRequestBody_emails) GetPrimary()(*bool) { + return m.primary +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody_emails) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody_emails) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersPostRequestBody_emails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("primary", m.GetPrimary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *V2OrganizationsItemUsersPostRequestBody_emails) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPrimary sets the primary property value. The primary property +func (m *V2OrganizationsItemUsersPostRequestBody_emails) SetPrimary(value *bool)() { + m.primary = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *V2OrganizationsItemUsersPostRequestBody_emails) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +// SetValue sets the value property value. The value property +func (m *V2OrganizationsItemUsersPostRequestBody_emails) SetValue(value *string)() { + m.value = value +} +type V2OrganizationsItemUsersPostRequestBody_emailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrimary()(*bool) + GetTypeEscaped()(*string) + GetValue()(*string) + SetPrimary(value *bool)() + SetTypeEscaped(value *string)() + SetValue(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_post_request_body_name.go b/pkg/github/scim/v2_organizations_item_users_post_request_body_name.go new file mode 100644 index 0000000..e8bab8b --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_post_request_body_name.go @@ -0,0 +1,138 @@ +package scim + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type V2OrganizationsItemUsersPostRequestBody_name struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The familyName property + familyName *string + // The formatted property + formatted *string + // The givenName property + givenName *string +} +// NewV2OrganizationsItemUsersPostRequestBody_name instantiates a new V2OrganizationsItemUsersPostRequestBody_name and sets the default values. +func NewV2OrganizationsItemUsersPostRequestBody_name()(*V2OrganizationsItemUsersPostRequestBody_name) { + m := &V2OrganizationsItemUsersPostRequestBody_name{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateV2OrganizationsItemUsersPostRequestBody_nameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateV2OrganizationsItemUsersPostRequestBody_nameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewV2OrganizationsItemUsersPostRequestBody_name(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *V2OrganizationsItemUsersPostRequestBody_name) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFamilyName gets the familyName property value. The familyName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody_name) GetFamilyName()(*string) { + return m.familyName +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *V2OrganizationsItemUsersPostRequestBody_name) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["familyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamilyName(val) + } + return nil + } + res["formatted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormatted(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + return res +} +// GetFormatted gets the formatted property value. The formatted property +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody_name) GetFormatted()(*string) { + return m.formatted +} +// GetGivenName gets the givenName property value. The givenName property +// returns a *string when successful +func (m *V2OrganizationsItemUsersPostRequestBody_name) GetGivenName()(*string) { + return m.givenName +} +// Serialize serializes information the current object +func (m *V2OrganizationsItemUsersPostRequestBody_name) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("familyName", m.GetFamilyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formatted", m.GetFormatted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + 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 *V2OrganizationsItemUsersPostRequestBody_name) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFamilyName sets the familyName property value. The familyName property +func (m *V2OrganizationsItemUsersPostRequestBody_name) SetFamilyName(value *string)() { + m.familyName = value +} +// SetFormatted sets the formatted property value. The formatted property +func (m *V2OrganizationsItemUsersPostRequestBody_name) SetFormatted(value *string)() { + m.formatted = value +} +// SetGivenName sets the givenName property value. The givenName property +func (m *V2OrganizationsItemUsersPostRequestBody_name) SetGivenName(value *string)() { + m.givenName = value +} +type V2OrganizationsItemUsersPostRequestBody_nameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFamilyName()(*string) + GetFormatted()(*string) + GetGivenName()(*string) + SetFamilyName(value *string)() + SetFormatted(value *string)() + SetGivenName(value *string)() +} diff --git a/pkg/github/scim/v2_organizations_item_users_request_builder.go b/pkg/github/scim/v2_organizations_item_users_request_builder.go new file mode 100644 index 0000000..40a3a09 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_request_builder.go @@ -0,0 +1,131 @@ +package scim + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// V2OrganizationsItemUsersRequestBuilder builds and executes requests for operations under \scim\v2\organizations\{org}\Users +type V2OrganizationsItemUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// V2OrganizationsItemUsersRequestBuilderGetQueryParameters retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub Enterprise Cloud. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub Enterprise Cloud account after completing SSO:1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Cloud organization.1. The user attempts to access the GitHub Enterprise Cloud organization and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Cloud account.1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub Enterprise Cloud account: - If the user signs in, their GitHub Enterprise Cloud account is linked to this entry. - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub Enterprise Cloud organization, and the external identity `null` entry remains in place. +type V2OrganizationsItemUsersRequestBuilderGetQueryParameters struct { + // Used for pagination: the number of results to return. + Count *int32 `uriparametername:"count"` + // Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `externalId`. For example, to search for an identity with the `userName` Octocat, you would use this query:`?filter=userName%20eq%20\"Octocat\"`.To filter results for the identity with the email `octocat@github.com`, you would use this query:`?filter=emails%20eq%20\"octocat@github.com\"`. + Filter *string `uriparametername:"filter"` + // Used for pagination: the index of the first result to return. + StartIndex *int32 `uriparametername:"startIndex"` +} +// ByScim_user_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.scim.v2.organizations.item.Users.item collection +// returns a *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder when successful +func (m *V2OrganizationsItemUsersRequestBuilder) ByScim_user_id(scim_user_id string)(*V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if scim_user_id != "" { + urlTplParams["scim_user_id"] = scim_user_id + } + return NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewV2OrganizationsItemUsersRequestBuilderInternal instantiates a new V2OrganizationsItemUsersRequestBuilder and sets the default values. +func NewV2OrganizationsItemUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsItemUsersRequestBuilder) { + m := &V2OrganizationsItemUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/organizations/{org}/Users{?count*,filter*,startIndex*}", pathParameters), + } + return m +} +// NewV2OrganizationsItemUsersRequestBuilder instantiates a new V2OrganizationsItemUsersRequestBuilder and sets the default values. +func NewV2OrganizationsItemUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsItemUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2OrganizationsItemUsersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub Enterprise Cloud. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub Enterprise Cloud account after completing SSO:1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Cloud organization.1. The user attempts to access the GitHub Enterprise Cloud organization and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Cloud account.1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub Enterprise Cloud account: - If the user signs in, their GitHub Enterprise Cloud account is linked to this entry. - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub Enterprise Cloud organization, and the external identity `null` entry remains in place. +// returns a ScimUserListable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 403 status code +// returns a ScimError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 429 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#list-scim-provisioned-identities +func (m *V2OrganizationsItemUsersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2OrganizationsItemUsersRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserListable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimUserListFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserListable), nil +} +// Post provisions organization membership for a user, and sends an activation email to the email address. If the user was previously a member of the organization, the invitation will reinstate any former privileges that the user had. For more information about reinstating former members, see "[Reinstating a former member of your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-membership-in-your-organization/reinstating-a-former-member-of-your-organization)." +// returns a ScimUserable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 403 status code +// returns a ScimError error when the service returns a 404 status code +// returns a ScimError error when the service returns a 409 status code +// returns a ScimError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#provision-and-invite-a-scim-user +func (m *V2OrganizationsItemUsersRequestBuilder) Post(ctx context.Context, body V2OrganizationsItemUsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable), nil +} +// ToGetRequestInformation retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub Enterprise Cloud. This can happen in certain cases where an external identity associated with an organization will not match an organization member: - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub Enterprise Cloud account after completing SSO:1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Cloud organization.1. The user attempts to access the GitHub Enterprise Cloud organization and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Cloud account.1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub Enterprise Cloud account: - If the user signs in, their GitHub Enterprise Cloud account is linked to this entry. - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub Enterprise Cloud organization, and the external identity `null` entry remains in place. +// returns a *RequestInformation when successful +func (m *V2OrganizationsItemUsersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V2OrganizationsItemUsersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + return requestInfo, nil +} +// ToPostRequestInformation provisions organization membership for a user, and sends an activation email to the email address. If the user was previously a member of the organization, the invitation will reinstate any former privileges that the user had. For more information about reinstating former members, see "[Reinstating a former member of your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-membership-in-your-organization/reinstating-a-former-member-of-your-organization)." +// returns a *RequestInformation when successful +func (m *V2OrganizationsItemUsersRequestBuilder) ToPostRequestInformation(ctx context.Context, body V2OrganizationsItemUsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *V2OrganizationsItemUsersRequestBuilder when successful +func (m *V2OrganizationsItemUsersRequestBuilder) WithUrl(rawUrl string)(*V2OrganizationsItemUsersRequestBuilder) { + return NewV2OrganizationsItemUsersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/v2_organizations_item_users_with_scim_user_item_request_builder.go b/pkg/github/scim/v2_organizations_item_users_with_scim_user_item_request_builder.go new file mode 100644 index 0000000..fab4a66 --- /dev/null +++ b/pkg/github/scim/v2_organizations_item_users_with_scim_user_item_request_builder.go @@ -0,0 +1,168 @@ +package scim + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder builds and executes requests for operations under \scim\v2\organizations\{org}\Users\{scim_user_id} +type V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilderInternal instantiates a new V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder and sets the default values. +func NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) { + m := &V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/organizations/{org}/Users/{scim_user_id}", pathParameters), + } + return m +} +// NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilder instantiates a new V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder and sets the default values. +func NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a SCIM user from an organization +// returns a ScimError error when the service returns a 403 status code +// returns a ScimError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#delete-a-scim-user-from-an-organization +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get SCIM provisioning information for a user +// returns a ScimUserable when successful +// returns a ScimError error when the service returns a 403 status code +// returns a ScimError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#get-scim-provisioning-information-for-a-user +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable), nil +} +// Patch allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).**Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.**Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.```{ "Operations":[{ "op":"replace", "value":{ "active":false } }]}``` +// returns a ScimUserable when successful +// returns a ScimError error when the service returns a 400 status code +// returns a ScimError error when the service returns a 403 status code +// returns a ScimError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 429 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#update-an-attribute-for-a-scim-user +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) Patch(ctx context.Context, body V2OrganizationsItemUsersItemWithScim_user_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "429": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable), nil +} +// Put replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#update-an-attribute-for-a-scim-user) endpoint instead.You must at least provide the required values for the user: `userName`, `name`, and `emails`.**Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. +// returns a ScimUserable when successful +// returns a ScimError error when the service returns a 403 status code +// returns a ScimError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#update-a-provisioned-organization-membership +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) Put(ctx context.Context, body V2OrganizationsItemUsersItemWithScim_user_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateScimUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ScimUserable), nil +} +// returns a *RequestInformation when successful +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + return requestInfo, nil +} +// ToPatchRequestInformation allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).**Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.**Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.```{ "Operations":[{ "op":"replace", "value":{ "active":false } }]}``` +// returns a *RequestInformation when successful +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body V2OrganizationsItemUsersItemWithScim_user_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToPutRequestInformation replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#update-an-attribute-for-a-scim-user) endpoint instead.You must at least provide the required values for the user: `userName`, `name`, and `emails`.**Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. +// returns a *RequestInformation when successful +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body V2OrganizationsItemUsersItemWithScim_user_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder when successful +func (m *V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) WithUrl(rawUrl string)(*V2OrganizationsItemUsersWithScim_user_ItemRequestBuilder) { + return NewV2OrganizationsItemUsersWithScim_user_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/scim/v2_organizations_request_builder.go b/pkg/github/scim/v2_organizations_request_builder.go new file mode 100644 index 0000000..3c62f1b --- /dev/null +++ b/pkg/github/scim/v2_organizations_request_builder.go @@ -0,0 +1,35 @@ +package scim + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// V2OrganizationsRequestBuilder builds and executes requests for operations under \scim\v2\organizations +type V2OrganizationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByOrg gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.scim.v2.organizations.item collection +// returns a *V2OrganizationsWithOrgItemRequestBuilder when successful +func (m *V2OrganizationsRequestBuilder) ByOrg(org string)(*V2OrganizationsWithOrgItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if org != "" { + urlTplParams["org"] = org + } + return NewV2OrganizationsWithOrgItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewV2OrganizationsRequestBuilderInternal instantiates a new V2OrganizationsRequestBuilder and sets the default values. +func NewV2OrganizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsRequestBuilder) { + m := &V2OrganizationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/organizations", pathParameters), + } + return m +} +// NewV2OrganizationsRequestBuilder instantiates a new V2OrganizationsRequestBuilder and sets the default values. +func NewV2OrganizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2OrganizationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/scim/v2_organizations_with_org_item_request_builder.go b/pkg/github/scim/v2_organizations_with_org_item_request_builder.go new file mode 100644 index 0000000..bd15946 --- /dev/null +++ b/pkg/github/scim/v2_organizations_with_org_item_request_builder.go @@ -0,0 +1,28 @@ +package scim + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// V2OrganizationsWithOrgItemRequestBuilder builds and executes requests for operations under \scim\v2\organizations\{org} +type V2OrganizationsWithOrgItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewV2OrganizationsWithOrgItemRequestBuilderInternal instantiates a new V2OrganizationsWithOrgItemRequestBuilder and sets the default values. +func NewV2OrganizationsWithOrgItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsWithOrgItemRequestBuilder) { + m := &V2OrganizationsWithOrgItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2/organizations/{org}", pathParameters), + } + return m +} +// NewV2OrganizationsWithOrgItemRequestBuilder instantiates a new V2OrganizationsWithOrgItemRequestBuilder and sets the default values. +func NewV2OrganizationsWithOrgItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2OrganizationsWithOrgItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2OrganizationsWithOrgItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Users the Users property +// returns a *V2OrganizationsItemUsersRequestBuilder when successful +func (m *V2OrganizationsWithOrgItemRequestBuilder) Users()(*V2OrganizationsItemUsersRequestBuilder) { + return NewV2OrganizationsItemUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/scim/v2_request_builder.go b/pkg/github/scim/v2_request_builder.go new file mode 100644 index 0000000..0704e28 --- /dev/null +++ b/pkg/github/scim/v2_request_builder.go @@ -0,0 +1,33 @@ +package scim + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// V2RequestBuilder builds and executes requests for operations under \scim\v2 +type V2RequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewV2RequestBuilderInternal instantiates a new V2RequestBuilder and sets the default values. +func NewV2RequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2RequestBuilder) { + m := &V2RequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/scim/v2", pathParameters), + } + return m +} +// NewV2RequestBuilder instantiates a new V2RequestBuilder and sets the default values. +func NewV2RequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*V2RequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewV2RequestBuilderInternal(urlParams, requestAdapter) +} +// Enterprises the enterprises property +// returns a *V2EnterprisesRequestBuilder when successful +func (m *V2RequestBuilder) Enterprises()(*V2EnterprisesRequestBuilder) { + return NewV2EnterprisesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Organizations the organizations property +// returns a *V2OrganizationsRequestBuilder when successful +func (m *V2RequestBuilder) Organizations()(*V2OrganizationsRequestBuilder) { + return NewV2OrganizationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/search/code/get_order_query_parameter_type.go b/pkg/github/search/code/get_order_query_parameter_type.go new file mode 100644 index 0000000..d8bb791 --- /dev/null +++ b/pkg/github/search/code/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package code +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/code/get_sort_query_parameter_type.go b/pkg/github/search/code/get_sort_query_parameter_type.go new file mode 100644 index 0000000..0fa7836 --- /dev/null +++ b/pkg/github/search/code/get_sort_query_parameter_type.go @@ -0,0 +1,33 @@ +package code +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + INDEXED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota +) + +func (i GetSortQueryParameterType) String() string { + return []string{"indexed"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := INDEXED_GETSORTQUERYPARAMETERTYPE + switch v { + case "indexed": + result = INDEXED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/code_get_response.go b/pkg/github/search/code_get_response.go new file mode 100644 index 0000000..4ca8c53 --- /dev/null +++ b/pkg/github/search/code_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type CodeGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable + // The total_count property + total_count *int32 +} +// NewCodeGetResponse instantiates a new CodeGetResponse and sets the default values. +func NewCodeGetResponse()(*CodeGetResponse) { + m := &CodeGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodeSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *CodeGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []CodeSearchResultItemable when successful +func (m *CodeGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CodeGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *CodeGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *CodeGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *CodeGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *CodeGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CodeGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type CodeGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodeSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/code_request_builder.go b/pkg/github/search/code_request_builder.go new file mode 100644 index 0000000..900c3d8 --- /dev/null +++ b/pkg/github/search/code_request_builder.go @@ -0,0 +1,81 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i488b8ec37254243162d6b625a22705270909f64fc7109322166a0ed909198e56 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search/code" +) + +// CodeRequestBuilder builds and executes requests for operations under \search\code +type CodeRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CodeRequestBuilderGetQueryParameters searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:`q=addClass+in:file+language:js+repo:jquery/jquery`This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.Considerations for code search:Due to the complexity of searching code, there are a few restrictions on how searches are performed:* Only the _default branch_ is considered. In most cases, this will be the `master` branch.* Only files smaller than 384 KB are searchable.* You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazinglanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.This endpoint requires you to authenticate and limits you to 10 requests per minute. +type CodeRequestBuilderGetQueryParameters struct { + // **This field is deprecated.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + // Deprecated: + Order *i488b8ec37254243162d6b625a22705270909f64fc7109322166a0ed909198e56.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/enterprise-cloud@latest//search-github/searching-on-github/searching-code)" for a detailed list of qualifiers. + Q *string `uriparametername:"q"` + // **This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Cloud search infrastructure. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/search/search#ranking-search-results) + // Deprecated: + Sort *i488b8ec37254243162d6b625a22705270909f64fc7109322166a0ed909198e56.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewCodeRequestBuilderInternal instantiates a new CodeRequestBuilder and sets the default values. +func NewCodeRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodeRequestBuilder) { + m := &CodeRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/code?q={q}{&order*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewCodeRequestBuilder instantiates a new CodeRequestBuilder and sets the default values. +func NewCodeRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodeRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodeRequestBuilderInternal(urlParams, requestAdapter) +} +// Get searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:`q=addClass+in:file+language:js+repo:jquery/jquery`This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.Considerations for code search:Due to the complexity of searching code, there are a few restrictions on how searches are performed:* Only the _default branch_ is considered. In most cases, this will be the `master` branch.* Only files smaller than 384 KB are searchable.* You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazinglanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.This endpoint requires you to authenticate and limits you to 10 requests per minute. +// returns a CodeGetResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a Code503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-code +func (m *CodeRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CodeRequestBuilderGetQueryParameters])(CodeGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCode503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCodeGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CodeGetResponseable), nil +} +// ToGetRequestInformation searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:`q=addClass+in:file+language:js+repo:jquery/jquery`This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.Considerations for code search:Due to the complexity of searching code, there are a few restrictions on how searches are performed:* Only the _default branch_ is considered. In most cases, this will be the `master` branch.* Only files smaller than 384 KB are searchable.* You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazinglanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.This endpoint requires you to authenticate and limits you to 10 requests per minute. +// returns a *RequestInformation when successful +func (m *CodeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CodeRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodeRequestBuilder when successful +func (m *CodeRequestBuilder) WithUrl(rawUrl string)(*CodeRequestBuilder) { + return NewCodeRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/search/commits/get_order_query_parameter_type.go b/pkg/github/search/commits/get_order_query_parameter_type.go new file mode 100644 index 0000000..be4e597 --- /dev/null +++ b/pkg/github/search/commits/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package commits +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/commits/get_sort_query_parameter_type.go b/pkg/github/search/commits/get_sort_query_parameter_type.go new file mode 100644 index 0000000..7126aa6 --- /dev/null +++ b/pkg/github/search/commits/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package commits +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + AUTHORDATE_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + COMMITTERDATE_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"author-date", "committer-date"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := AUTHORDATE_GETSORTQUERYPARAMETERTYPE + switch v { + case "author-date": + result = AUTHORDATE_GETSORTQUERYPARAMETERTYPE + case "committer-date": + result = COMMITTERDATE_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/commits_get_response.go b/pkg/github/search/commits_get_response.go new file mode 100644 index 0000000..b6aa7c9 --- /dev/null +++ b/pkg/github/search/commits_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type CommitsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable + // The total_count property + total_count *int32 +} +// NewCommitsGetResponse instantiates a new CommitsGetResponse and sets the default values. +func NewCommitsGetResponse()(*CommitsGetResponse) { + m := &CommitsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCommitsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommitsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommitsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CommitsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CommitsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCommitSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *CommitsGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []CommitSearchResultItemable when successful +func (m *CommitsGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CommitsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *CommitsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *CommitsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *CommitsGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *CommitsGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CommitsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type CommitsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CommitSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/commits_request_builder.go b/pkg/github/search/commits_request_builder.go new file mode 100644 index 0000000..007cd47 --- /dev/null +++ b/pkg/github/search/commits_request_builder.go @@ -0,0 +1,70 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i0e912ee9b5d0ddd25cb2c0551e5151ad2ba9e55b6635357ebf3961fc887df2bb "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search/commits" +) + +// CommitsRequestBuilder builds and executes requests for operations under \search\commits +type CommitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommitsRequestBuilderGetQueryParameters find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text matchmetadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:`q=repo:octocat/Spoon-Knife+css` +type CommitsRequestBuilderGetQueryParameters struct { + // Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + Order *i0e912ee9b5d0ddd25cb2c0551e5151ad2ba9e55b6635357ebf3961fc887df2bb.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/enterprise-cloud@latest//search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. + Q *string `uriparametername:"q"` + // Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/search/search#ranking-search-results) + Sort *i0e912ee9b5d0ddd25cb2c0551e5151ad2ba9e55b6635357ebf3961fc887df2bb.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewCommitsRequestBuilderInternal instantiates a new CommitsRequestBuilder and sets the default values. +func NewCommitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommitsRequestBuilder) { + m := &CommitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/commits?q={q}{&order*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewCommitsRequestBuilder instantiates a new CommitsRequestBuilder and sets the default values. +func NewCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text matchmetadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:`q=repo:octocat/Spoon-Knife+css` +// returns a CommitsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-commits +func (m *CommitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CommitsRequestBuilderGetQueryParameters])(CommitsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCommitsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CommitsGetResponseable), nil +} +// ToGetRequestInformation find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text matchmetadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:`q=repo:octocat/Spoon-Knife+css` +// returns a *RequestInformation when successful +func (m *CommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CommitsRequestBuilder when successful +func (m *CommitsRequestBuilder) WithUrl(rawUrl string)(*CommitsRequestBuilder) { + return NewCommitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/search/issues/get_order_query_parameter_type.go b/pkg/github/search/issues/get_order_query_parameter_type.go new file mode 100644 index 0000000..ce4e43f --- /dev/null +++ b/pkg/github/search/issues/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package issues +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/issues/get_sort_query_parameter_type.go b/pkg/github/search/issues/get_sort_query_parameter_type.go new file mode 100644 index 0000000..9ccb41c --- /dev/null +++ b/pkg/github/search/issues/get_sort_query_parameter_type.go @@ -0,0 +1,63 @@ +package issues +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + COMMENTS_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + REACTIONS_GETSORTQUERYPARAMETERTYPE + REACTIONS_PLUS_1_GETSORTQUERYPARAMETERTYPE + REACTIONS1_GETSORTQUERYPARAMETERTYPE + REACTIONSSMILE_GETSORTQUERYPARAMETERTYPE + REACTIONSTHINKING_FACE_GETSORTQUERYPARAMETERTYPE + REACTIONSHEART_GETSORTQUERYPARAMETERTYPE + REACTIONSTADA_GETSORTQUERYPARAMETERTYPE + INTERACTIONS_GETSORTQUERYPARAMETERTYPE + CREATED_GETSORTQUERYPARAMETERTYPE + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := COMMENTS_GETSORTQUERYPARAMETERTYPE + switch v { + case "comments": + result = COMMENTS_GETSORTQUERYPARAMETERTYPE + case "reactions": + result = REACTIONS_GETSORTQUERYPARAMETERTYPE + case "reactions-+1": + result = REACTIONS_PLUS_1_GETSORTQUERYPARAMETERTYPE + case "reactions--1": + result = REACTIONS1_GETSORTQUERYPARAMETERTYPE + case "reactions-smile": + result = REACTIONSSMILE_GETSORTQUERYPARAMETERTYPE + case "reactions-thinking_face": + result = REACTIONSTHINKING_FACE_GETSORTQUERYPARAMETERTYPE + case "reactions-heart": + result = REACTIONSHEART_GETSORTQUERYPARAMETERTYPE + case "reactions-tada": + result = REACTIONSTADA_GETSORTQUERYPARAMETERTYPE + case "interactions": + result = INTERACTIONS_GETSORTQUERYPARAMETERTYPE + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/issues_get_response.go b/pkg/github/search/issues_get_response.go new file mode 100644 index 0000000..d1f82fc --- /dev/null +++ b/pkg/github/search/issues_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type IssuesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable + // The total_count property + total_count *int32 +} +// NewIssuesGetResponse instantiates a new IssuesGetResponse and sets the default values. +func NewIssuesGetResponse()(*IssuesGetResponse) { + m := &IssuesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssuesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssuesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssuesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssuesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssuesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *IssuesGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []IssueSearchResultItemable when successful +func (m *IssuesGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *IssuesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *IssuesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *IssuesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *IssuesGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *IssuesGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *IssuesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type IssuesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.IssueSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/issues_request_builder.go b/pkg/github/search/issues_request_builder.go new file mode 100644 index 0000000..1312e39 --- /dev/null +++ b/pkg/github/search/issues_request_builder.go @@ -0,0 +1,79 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i3e2edbd634cff9e942e443075aff88f6e2831f06d459d0fdfd91aac38eef8bea "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search/issues" +) + +// IssuesRequestBuilder builds and executes requests for operations under \search\issues +type IssuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// IssuesRequestBuilderGetQueryParameters find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlightedsearch results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.`q=windows+label:bug+language:python+state:open&sort=created&order=asc`This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.**Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/enterprise-cloud@latest//github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." +type IssuesRequestBuilderGetQueryParameters struct { + // Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + Order *i3e2edbd634cff9e942e443075aff88f6e2831f06d459d0fdfd91aac38eef8bea.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/enterprise-cloud@latest//search-github/searching-on-github/searching-issues-and-pull-requests)" for a detailed list of qualifiers. + Q *string `uriparametername:"q"` + // Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/search/search#ranking-search-results) + Sort *i3e2edbd634cff9e942e443075aff88f6e2831f06d459d0fdfd91aac38eef8bea.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewIssuesRequestBuilderInternal instantiates a new IssuesRequestBuilder and sets the default values. +func NewIssuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { + m := &IssuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/issues?q={q}{&order*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewIssuesRequestBuilder instantiates a new IssuesRequestBuilder and sets the default values. +func NewIssuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewIssuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlightedsearch results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.`q=windows+label:bug+language:python+state:open&sort=created&order=asc`This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.**Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/enterprise-cloud@latest//github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." +// returns a IssuesGetResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a Issues503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-issues-and-pull-requests +func (m *IssuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])(IssuesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssues503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateIssuesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(IssuesGetResponseable), nil +} +// ToGetRequestInformation find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlightedsearch results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.`q=windows+label:bug+language:python+state:open&sort=created&order=asc`This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.**Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/enterprise-cloud@latest//github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." +// returns a *RequestInformation when successful +func (m *IssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *IssuesRequestBuilder when successful +func (m *IssuesRequestBuilder) WithUrl(rawUrl string)(*IssuesRequestBuilder) { + return NewIssuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/search/labels/get_order_query_parameter_type.go b/pkg/github/search/labels/get_order_query_parameter_type.go new file mode 100644 index 0000000..b362c2e --- /dev/null +++ b/pkg/github/search/labels/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package labels +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/labels/get_sort_query_parameter_type.go b/pkg/github/search/labels/get_sort_query_parameter_type.go new file mode 100644 index 0000000..37816f7 --- /dev/null +++ b/pkg/github/search/labels/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package labels +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/labels_get_response.go b/pkg/github/search/labels_get_response.go new file mode 100644 index 0000000..803f8c8 --- /dev/null +++ b/pkg/github/search/labels_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type LabelsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable + // The total_count property + total_count *int32 +} +// NewLabelsGetResponse instantiates a new LabelsGetResponse and sets the default values. +func NewLabelsGetResponse()(*LabelsGetResponse) { + m := &LabelsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateLabelsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateLabelsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *LabelsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *LabelsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateLabelSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *LabelsGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []LabelSearchResultItemable when successful +func (m *LabelsGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *LabelsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *LabelsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *LabelsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *LabelsGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *LabelsGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *LabelsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type LabelsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.LabelSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/labels_request_builder.go b/pkg/github/search/labels_request_builder.go new file mode 100644 index 0000000..82651d5 --- /dev/null +++ b/pkg/github/search/labels_request_builder.go @@ -0,0 +1,81 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ie3a2e865da3d7d469127cbe864453af4780291170fa5de6c71c0135abf3036f4 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search/labels" +) + +// LabelsRequestBuilder builds and executes requests for operations under \search\labels +type LabelsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LabelsRequestBuilderGetQueryParameters find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:`q=bug+defect+enhancement&repository_id=64778136`The labels that best match the query appear first in the search results. +type LabelsRequestBuilderGetQueryParameters struct { + // Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + Order *ie3a2e865da3d7d469127cbe864453af4780291170fa5de6c71c0135abf3036f4.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). + Q *string `uriparametername:"q"` + // The id of the repository. + Repository_id *int32 `uriparametername:"repository_id"` + // Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/search/search#ranking-search-results) + Sort *ie3a2e865da3d7d469127cbe864453af4780291170fa5de6c71c0135abf3036f4.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewLabelsRequestBuilderInternal instantiates a new LabelsRequestBuilder and sets the default values. +func NewLabelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LabelsRequestBuilder) { + m := &LabelsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/labels?q={q}&repository_id={repository_id}{&order*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewLabelsRequestBuilder instantiates a new LabelsRequestBuilder and sets the default values. +func NewLabelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LabelsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLabelsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:`q=bug+defect+enhancement&repository_id=64778136`The labels that best match the query appear first in the search results. +// returns a LabelsGetResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-labels +func (m *LabelsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[LabelsRequestBuilderGetQueryParameters])(LabelsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateLabelsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(LabelsGetResponseable), nil +} +// ToGetRequestInformation find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:`q=bug+defect+enhancement&repository_id=64778136`The labels that best match the query appear first in the search results. +// returns a *RequestInformation when successful +func (m *LabelsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[LabelsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *LabelsRequestBuilder when successful +func (m *LabelsRequestBuilder) WithUrl(rawUrl string)(*LabelsRequestBuilder) { + return NewLabelsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/search/repositories/get_order_query_parameter_type.go b/pkg/github/search/repositories/get_order_query_parameter_type.go new file mode 100644 index 0000000..3933a58 --- /dev/null +++ b/pkg/github/search/repositories/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package repositories +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/repositories/get_sort_query_parameter_type.go b/pkg/github/search/repositories/get_sort_query_parameter_type.go new file mode 100644 index 0000000..8fcb5c2 --- /dev/null +++ b/pkg/github/search/repositories/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package repositories +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + STARS_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + FORKS_GETSORTQUERYPARAMETERTYPE + HELPWANTEDISSUES_GETSORTQUERYPARAMETERTYPE + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"stars", "forks", "help-wanted-issues", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := STARS_GETSORTQUERYPARAMETERTYPE + switch v { + case "stars": + result = STARS_GETSORTQUERYPARAMETERTYPE + case "forks": + result = FORKS_GETSORTQUERYPARAMETERTYPE + case "help-wanted-issues": + result = HELPWANTEDISSUES_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/repositories_get_response.go b/pkg/github/search/repositories_get_response.go new file mode 100644 index 0000000..eb89f16 --- /dev/null +++ b/pkg/github/search/repositories_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type RepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable + // The total_count property + total_count *int32 +} +// NewRepositoriesGetResponse instantiates a new RepositoriesGetResponse and sets the default values. +func NewRepositoriesGetResponse()(*RepositoriesGetResponse) { + m := &RepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *RepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepoSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *RepositoriesGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []RepoSearchResultItemable when successful +func (m *RepositoriesGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *RepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *RepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *RepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *RepositoriesGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *RepositoriesGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *RepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type RepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepoSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/repositories_request_builder.go b/pkg/github/search/repositories_request_builder.go new file mode 100644 index 0000000..d2a0e45 --- /dev/null +++ b/pkg/github/search/repositories_request_builder.go @@ -0,0 +1,77 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i890c9716ce04aa7efa4609d56b5b916d368eb72e245831b067173d022cefbff5 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search/repositories" +) + +// RepositoriesRequestBuilder builds and executes requests for operations under \search\repositories +type RepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// RepositoriesRequestBuilderGetQueryParameters find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:`q=tetris+language:assembly&sort=stars&order=desc`This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. +type RepositoriesRequestBuilderGetQueryParameters struct { + // Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + Order *i890c9716ce04aa7efa4609d56b5b916d368eb72e245831b067173d022cefbff5.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/enterprise-cloud@latest//articles/searching-for-repositories/)" for a detailed list of qualifiers. + Q *string `uriparametername:"q"` + // Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/search/search#ranking-search-results) + Sort *i890c9716ce04aa7efa4609d56b5b916d368eb72e245831b067173d022cefbff5.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewRepositoriesRequestBuilderInternal instantiates a new RepositoriesRequestBuilder and sets the default values. +func NewRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RepositoriesRequestBuilder) { + m := &RepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/repositories?q={q}{&order*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewRepositoriesRequestBuilder instantiates a new RepositoriesRequestBuilder and sets the default values. +func NewRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:`q=tetris+language:assembly&sort=stars&order=desc`This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. +// returns a RepositoriesGetResponseable when successful +// returns a ValidationError error when the service returns a 422 status code +// returns a Repositories503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-repositories +func (m *RepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[RepositoriesRequestBuilderGetQueryParameters])(RepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositories503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateRepositoriesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(RepositoriesGetResponseable), nil +} +// ToGetRequestInformation find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:`q=tetris+language:assembly&sort=stars&order=desc`This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. +// returns a *RequestInformation when successful +func (m *RepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[RepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *RepositoriesRequestBuilder when successful +func (m *RepositoriesRequestBuilder) WithUrl(rawUrl string)(*RepositoriesRequestBuilder) { + return NewRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/search/search_request_builder.go b/pkg/github/search/search_request_builder.go new file mode 100644 index 0000000..81f859a --- /dev/null +++ b/pkg/github/search/search_request_builder.go @@ -0,0 +1,58 @@ +package search + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// SearchRequestBuilder builds and executes requests for operations under \search +type SearchRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Code the code property +// returns a *CodeRequestBuilder when successful +func (m *SearchRequestBuilder) Code()(*CodeRequestBuilder) { + return NewCodeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commits the commits property +// returns a *CommitsRequestBuilder when successful +func (m *SearchRequestBuilder) Commits()(*CommitsRequestBuilder) { + return NewCommitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewSearchRequestBuilderInternal instantiates a new SearchRequestBuilder and sets the default values. +func NewSearchRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SearchRequestBuilder) { + m := &SearchRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search", pathParameters), + } + return m +} +// NewSearchRequestBuilder instantiates a new SearchRequestBuilder and sets the default values. +func NewSearchRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SearchRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSearchRequestBuilderInternal(urlParams, requestAdapter) +} +// Issues the issues property +// returns a *IssuesRequestBuilder when successful +func (m *SearchRequestBuilder) Issues()(*IssuesRequestBuilder) { + return NewIssuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Labels the labels property +// returns a *LabelsRequestBuilder when successful +func (m *SearchRequestBuilder) Labels()(*LabelsRequestBuilder) { + return NewLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repositories the repositories property +// returns a *RepositoriesRequestBuilder when successful +func (m *SearchRequestBuilder) Repositories()(*RepositoriesRequestBuilder) { + return NewRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Topics the topics property +// returns a *TopicsRequestBuilder when successful +func (m *SearchRequestBuilder) Topics()(*TopicsRequestBuilder) { + return NewTopicsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Users the users property +// returns a *UsersRequestBuilder when successful +func (m *SearchRequestBuilder) Users()(*UsersRequestBuilder) { + return NewUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/search/topics_get_response.go b/pkg/github/search/topics_get_response.go new file mode 100644 index 0000000..7be4c85 --- /dev/null +++ b/pkg/github/search/topics_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type TopicsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable + // The total_count property + total_count *int32 +} +// NewTopicsGetResponse instantiates a new TopicsGetResponse and sets the default values. +func NewTopicsGetResponse()(*TopicsGetResponse) { + m := &TopicsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTopicsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTopicsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *TopicsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TopicsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTopicSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *TopicsGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []TopicSearchResultItemable when successful +func (m *TopicsGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *TopicsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *TopicsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *TopicsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *TopicsGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *TopicsGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *TopicsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type TopicsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TopicSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/topics_request_builder.go b/pkg/github/search/topics_request_builder.go new file mode 100644 index 0000000..0bbd48d --- /dev/null +++ b/pkg/github/search/topics_request_builder.go @@ -0,0 +1,65 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// TopicsRequestBuilder builds and executes requests for operations under \search\topics +type TopicsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TopicsRequestBuilderGetQueryParameters find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/enterprise-cloud@latest//articles/searching-topics/)" for a detailed list of qualifiers.When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:`q=ruby+is:featured`This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. +type TopicsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). + Q *string `uriparametername:"q"` +} +// NewTopicsRequestBuilderInternal instantiates a new TopicsRequestBuilder and sets the default values. +func NewTopicsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TopicsRequestBuilder) { + m := &TopicsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/topics?q={q}{&page*,per_page*}", pathParameters), + } + return m +} +// NewTopicsRequestBuilder instantiates a new TopicsRequestBuilder and sets the default values. +func NewTopicsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TopicsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTopicsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/enterprise-cloud@latest//articles/searching-topics/)" for a detailed list of qualifiers.When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:`q=ruby+is:featured`This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. +// returns a TopicsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-topics +func (m *TopicsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TopicsRequestBuilderGetQueryParameters])(TopicsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateTopicsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(TopicsGetResponseable), nil +} +// ToGetRequestInformation find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/enterprise-cloud@latest//articles/searching-topics/)" for a detailed list of qualifiers.When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:`q=ruby+is:featured`This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. +// returns a *RequestInformation when successful +func (m *TopicsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TopicsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TopicsRequestBuilder when successful +func (m *TopicsRequestBuilder) WithUrl(rawUrl string)(*TopicsRequestBuilder) { + return NewTopicsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/search/users/get_order_query_parameter_type.go b/pkg/github/search/users/get_order_query_parameter_type.go new file mode 100644 index 0000000..30eed7b --- /dev/null +++ b/pkg/github/search/users/get_order_query_parameter_type.go @@ -0,0 +1,36 @@ +package users +import ( + "errors" +) +type GetOrderQueryParameterType int + +const ( + DESC_GETORDERQUERYPARAMETERTYPE GetOrderQueryParameterType = iota + ASC_GETORDERQUERYPARAMETERTYPE +) + +func (i GetOrderQueryParameterType) String() string { + return []string{"desc", "asc"}[i] +} +func ParseGetOrderQueryParameterType(v string) (any, error) { + result := DESC_GETORDERQUERYPARAMETERTYPE + switch v { + case "desc": + result = DESC_GETORDERQUERYPARAMETERTYPE + case "asc": + result = ASC_GETORDERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetOrderQueryParameterType(values []GetOrderQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetOrderQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/users/get_sort_query_parameter_type.go b/pkg/github/search/users/get_sort_query_parameter_type.go new file mode 100644 index 0000000..3479260 --- /dev/null +++ b/pkg/github/search/users/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package users +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + FOLLOWERS_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + REPOSITORIES_GETSORTQUERYPARAMETERTYPE + JOINED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"followers", "repositories", "joined"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := FOLLOWERS_GETSORTQUERYPARAMETERTYPE + switch v { + case "followers": + result = FOLLOWERS_GETSORTQUERYPARAMETERTYPE + case "repositories": + result = REPOSITORIES_GETSORTQUERYPARAMETERTYPE + case "joined": + result = JOINED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/search/users_get_response.go b/pkg/github/search/users_get_response.go new file mode 100644 index 0000000..44bfe79 --- /dev/null +++ b/pkg/github/search/users_get_response.go @@ -0,0 +1,151 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type UsersGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The incomplete_results property + incomplete_results *bool + // The items property + items []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable + // The total_count property + total_count *int32 +} +// NewUsersGetResponse instantiates a new UsersGetResponse and sets the default values. +func NewUsersGetResponse()(*UsersGetResponse) { + m := &UsersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUsersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUsersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUsersGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UsersGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UsersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["incomplete_results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteResults(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateUserSearchResultItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable) + } + } + m.SetItems(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetIncompleteResults gets the incomplete_results property value. The incomplete_results property +// returns a *bool when successful +func (m *UsersGetResponse) GetIncompleteResults()(*bool) { + return m.incomplete_results +} +// GetItems gets the items property value. The items property +// returns a []UserSearchResultItemable when successful +func (m *UsersGetResponse) GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable) { + return m.items +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *UsersGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *UsersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("incomplete_results", m.GetIncompleteResults()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *UsersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIncompleteResults sets the incomplete_results property value. The incomplete_results property +func (m *UsersGetResponse) SetIncompleteResults(value *bool)() { + m.incomplete_results = value +} +// SetItems sets the items property value. The items property +func (m *UsersGetResponse) SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable)() { + m.items = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *UsersGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type UsersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncompleteResults()(*bool) + GetItems()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable) + GetTotalCount()(*int32) + SetIncompleteResults(value *bool)() + SetItems(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserSearchResultItemable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/search/users_request_builder.go b/pkg/github/search/users_request_builder.go new file mode 100644 index 0000000..5d9a848 --- /dev/null +++ b/pkg/github/search/users_request_builder.go @@ -0,0 +1,77 @@ +package search + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + if5b70a464d755088a2d07c2e602eb48468d8a6f7fa95524819c6d02befb43ef1 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/search/users" +) + +// UsersRequestBuilder builds and executes requests for operations under \search\users +type UsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// UsersRequestBuilderGetQueryParameters find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you're looking for a list of popular users, you might try this query:`q=tom+repos:%3E42+followers:%3E1000`This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/enterprise-cloud@latest//graphql/reference/queries#search)." +type UsersRequestBuilderGetQueryParameters struct { + // Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + Order *if5b70a464d755088a2d07c2e602eb48468d8a6f7fa95524819c6d02befb43ef1.GetOrderQueryParameterType `uriparametername:"order"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Cloud. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Cloud. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-cloud@latest//rest/search/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/enterprise-cloud@latest//search-github/searching-on-github/searching-users)" for a detailed list of qualifiers. + Q *string `uriparametername:"q"` + // Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub Enterprise Cloud. Default: [best match](https://docs.github.com/enterprise-cloud@latest//rest/search/search#ranking-search-results) + Sort *if5b70a464d755088a2d07c2e602eb48468d8a6f7fa95524819c6d02befb43ef1.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewUsersRequestBuilderInternal instantiates a new UsersRequestBuilder and sets the default values. +func NewUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersRequestBuilder) { + m := &UsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/users?q={q}{&order*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewUsersRequestBuilder instantiates a new UsersRequestBuilder and sets the default values. +func NewUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewUsersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you're looking for a list of popular users, you might try this query:`q=tom+repos:%3E42+followers:%3E1000`This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/enterprise-cloud@latest//graphql/reference/queries#search)." +// returns a UsersGetResponseable when successful +// returns a ValidationError error when the service returns a 422 status code +// returns a Users503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/search/search#search-users +func (m *UsersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[UsersRequestBuilderGetQueryParameters])(UsersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateUsers503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateUsersGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(UsersGetResponseable), nil +} +// ToGetRequestInformation find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api).When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-cloud@latest//rest/search/search#text-match-metadata).For example, if you're looking for a list of popular users, you might try this query:`q=tom+repos:%3E42+followers:%3E1000`This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/enterprise-cloud@latest//graphql/reference/queries#search)." +// returns a *RequestInformation when successful +func (m *UsersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[UsersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *UsersRequestBuilder when successful +func (m *UsersRequestBuilder) WithUrl(rawUrl string)(*UsersRequestBuilder) { + return NewUsersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go b/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go new file mode 100644 index 0000000..9b51962 --- /dev/null +++ b/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package discussions +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go b/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go new file mode 100644 index 0000000..ac25506 --- /dev/null +++ b/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package comments +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..1a5bfb1 --- /dev/null +++ b/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the team discussion comment. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go b/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go new file mode 100644 index 0000000..7aef65a --- /dev/null +++ b/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go @@ -0,0 +1,54 @@ +package reactions +import ( + "errors" +) +type GetContentQueryParameterType int + +const ( + PLUS_1_GETCONTENTQUERYPARAMETERTYPE GetContentQueryParameterType = iota + MINUS_1_GETCONTENTQUERYPARAMETERTYPE + LAUGH_GETCONTENTQUERYPARAMETERTYPE + CONFUSED_GETCONTENTQUERYPARAMETERTYPE + HEART_GETCONTENTQUERYPARAMETERTYPE + HOORAY_GETCONTENTQUERYPARAMETERTYPE + ROCKET_GETCONTENTQUERYPARAMETERTYPE + EYES_GETCONTENTQUERYPARAMETERTYPE +) + +func (i GetContentQueryParameterType) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseGetContentQueryParameterType(v string) (any, error) { + result := PLUS_1_GETCONTENTQUERYPARAMETERTYPE + switch v { + case "+1": + result = PLUS_1_GETCONTENTQUERYPARAMETERTYPE + case "-1": + result = MINUS_1_GETCONTENTQUERYPARAMETERTYPE + case "laugh": + result = LAUGH_GETCONTENTQUERYPARAMETERTYPE + case "confused": + result = CONFUSED_GETCONTENTQUERYPARAMETERTYPE + case "heart": + result = HEART_GETCONTENTQUERYPARAMETERTYPE + case "hooray": + result = HOORAY_GETCONTENTQUERYPARAMETERTYPE + case "rocket": + result = ROCKET_GETCONTENTQUERYPARAMETERTYPE + case "eyes": + result = EYES_GETCONTENTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetContentQueryParameterType(values []GetContentQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetContentQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go b/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go new file mode 100644 index 0000000..b6a7f32 --- /dev/null +++ b/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go @@ -0,0 +1,55 @@ +package reactions +import ( + "errors" +) +// The [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions) to add to the team discussion. +type ReactionsPostRequestBody_content int + +const ( + PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT ReactionsPostRequestBody_content = iota + MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + HEART_REACTIONSPOSTREQUESTBODY_CONTENT + HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + EYES_REACTIONSPOSTREQUESTBODY_CONTENT +) + +func (i ReactionsPostRequestBody_content) String() string { + return []string{"+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"}[i] +} +func ParseReactionsPostRequestBody_content(v string) (any, error) { + result := PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + switch v { + case "+1": + result = PLUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "-1": + result = MINUS_1_REACTIONSPOSTREQUESTBODY_CONTENT + case "laugh": + result = LAUGH_REACTIONSPOSTREQUESTBODY_CONTENT + case "confused": + result = CONFUSED_REACTIONSPOSTREQUESTBODY_CONTENT + case "heart": + result = HEART_REACTIONSPOSTREQUESTBODY_CONTENT + case "hooray": + result = HOORAY_REACTIONSPOSTREQUESTBODY_CONTENT + case "rocket": + result = ROCKET_REACTIONSPOSTREQUESTBODY_CONTENT + case "eyes": + result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT + default: + return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + } + return &result, nil +} +func SerializeReactionsPostRequestBody_content(values []ReactionsPostRequestBody_content) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReactionsPostRequestBody_content) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/members/get_role_query_parameter_type.go b/pkg/github/teams/item/members/get_role_query_parameter_type.go new file mode 100644 index 0000000..d4e359b --- /dev/null +++ b/pkg/github/teams/item/members/get_role_query_parameter_type.go @@ -0,0 +1,39 @@ +package members +import ( + "errors" +) +type GetRoleQueryParameterType int + +const ( + MEMBER_GETROLEQUERYPARAMETERTYPE GetRoleQueryParameterType = iota + MAINTAINER_GETROLEQUERYPARAMETERTYPE + ALL_GETROLEQUERYPARAMETERTYPE +) + +func (i GetRoleQueryParameterType) String() string { + return []string{"member", "maintainer", "all"}[i] +} +func ParseGetRoleQueryParameterType(v string) (any, error) { + result := MEMBER_GETROLEQUERYPARAMETERTYPE + switch v { + case "member": + result = MEMBER_GETROLEQUERYPARAMETERTYPE + case "maintainer": + result = MAINTAINER_GETROLEQUERYPARAMETERTYPE + case "all": + result = ALL_GETROLEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetRoleQueryParameterType(values []GetRoleQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetRoleQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go b/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go new file mode 100644 index 0000000..33df378 --- /dev/null +++ b/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The role that this user should have in the team. +type WithUsernamePutRequestBody_role int + +const ( + MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE WithUsernamePutRequestBody_role = iota + MAINTAINER_WITHUSERNAMEPUTREQUESTBODY_ROLE +) + +func (i WithUsernamePutRequestBody_role) String() string { + return []string{"member", "maintainer"}[i] +} +func ParseWithUsernamePutRequestBody_role(v string) (any, error) { + result := MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE + switch v { + case "member": + result = MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE + case "maintainer": + result = MAINTAINER_WITHUSERNAMEPUTREQUESTBODY_ROLE + default: + return 0, errors.New("Unknown WithUsernamePutRequestBody_role value: " + v) + } + return &result, nil +} +func SerializeWithUsernamePutRequestBody_role(values []WithUsernamePutRequestBody_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithUsernamePutRequestBody_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go b/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go new file mode 100644 index 0000000..2b4ef3e --- /dev/null +++ b/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +type WithProject_PutRequestBody_permission int + +const ( + READ_WITHPROJECT_PUTREQUESTBODY_PERMISSION WithProject_PutRequestBody_permission = iota + WRITE_WITHPROJECT_PUTREQUESTBODY_PERMISSION + ADMIN_WITHPROJECT_PUTREQUESTBODY_PERMISSION +) + +func (i WithProject_PutRequestBody_permission) String() string { + return []string{"read", "write", "admin"}[i] +} +func ParseWithProject_PutRequestBody_permission(v string) (any, error) { + result := READ_WITHPROJECT_PUTREQUESTBODY_PERMISSION + switch v { + case "read": + result = READ_WITHPROJECT_PUTREQUESTBODY_PERMISSION + case "write": + result = WRITE_WITHPROJECT_PUTREQUESTBODY_PERMISSION + case "admin": + result = ADMIN_WITHPROJECT_PUTREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown WithProject_PutRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeWithProject_PutRequestBody_permission(values []WithProject_PutRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithProject_PutRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go b/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go new file mode 100644 index 0000000..2d8cc21 --- /dev/null +++ b/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. +type WithRepoPutRequestBody_permission int + +const ( + PULL_WITHREPOPUTREQUESTBODY_PERMISSION WithRepoPutRequestBody_permission = iota + PUSH_WITHREPOPUTREQUESTBODY_PERMISSION + ADMIN_WITHREPOPUTREQUESTBODY_PERMISSION +) + +func (i WithRepoPutRequestBody_permission) String() string { + return []string{"pull", "push", "admin"}[i] +} +func ParseWithRepoPutRequestBody_permission(v string) (any, error) { + result := PULL_WITHREPOPUTREQUESTBODY_PERMISSION + switch v { + case "pull": + result = PULL_WITHREPOPUTREQUESTBODY_PERMISSION + case "push": + result = PUSH_WITHREPOPUTREQUESTBODY_PERMISSION + case "admin": + result = ADMIN_WITHREPOPUTREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown WithRepoPutRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeWithRepoPutRequestBody_permission(values []WithRepoPutRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithRepoPutRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go b/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go new file mode 100644 index 0000000..aab33e5 --- /dev/null +++ b/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications. +type WithTeam_PatchRequestBody_notification_setting int + +const ( + NOTIFICATIONS_ENABLED_WITHTEAM_PATCHREQUESTBODY_NOTIFICATION_SETTING WithTeam_PatchRequestBody_notification_setting = iota + NOTIFICATIONS_DISABLED_WITHTEAM_PATCHREQUESTBODY_NOTIFICATION_SETTING +) + +func (i WithTeam_PatchRequestBody_notification_setting) String() string { + return []string{"notifications_enabled", "notifications_disabled"}[i] +} +func ParseWithTeam_PatchRequestBody_notification_setting(v string) (any, error) { + result := NOTIFICATIONS_ENABLED_WITHTEAM_PATCHREQUESTBODY_NOTIFICATION_SETTING + switch v { + case "notifications_enabled": + result = NOTIFICATIONS_ENABLED_WITHTEAM_PATCHREQUESTBODY_NOTIFICATION_SETTING + case "notifications_disabled": + result = NOTIFICATIONS_DISABLED_WITHTEAM_PATCHREQUESTBODY_NOTIFICATION_SETTING + default: + return 0, errors.New("Unknown WithTeam_PatchRequestBody_notification_setting value: " + v) + } + return &result, nil +} +func SerializeWithTeam_PatchRequestBody_notification_setting(values []WithTeam_PatchRequestBody_notification_setting) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithTeam_PatchRequestBody_notification_setting) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/with_team_patch_request_body_permission.go b/pkg/github/teams/item/with_team_patch_request_body_permission.go new file mode 100644 index 0000000..e2cc7ad --- /dev/null +++ b/pkg/github/teams/item/with_team_patch_request_body_permission.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// **Deprecated**. The permission that new repositories will be added to the team with when none is specified. +type WithTeam_PatchRequestBody_permission int + +const ( + PULL_WITHTEAM_PATCHREQUESTBODY_PERMISSION WithTeam_PatchRequestBody_permission = iota + PUSH_WITHTEAM_PATCHREQUESTBODY_PERMISSION + ADMIN_WITHTEAM_PATCHREQUESTBODY_PERMISSION +) + +func (i WithTeam_PatchRequestBody_permission) String() string { + return []string{"pull", "push", "admin"}[i] +} +func ParseWithTeam_PatchRequestBody_permission(v string) (any, error) { + result := PULL_WITHTEAM_PATCHREQUESTBODY_PERMISSION + switch v { + case "pull": + result = PULL_WITHTEAM_PATCHREQUESTBODY_PERMISSION + case "push": + result = PUSH_WITHTEAM_PATCHREQUESTBODY_PERMISSION + case "admin": + result = ADMIN_WITHTEAM_PATCHREQUESTBODY_PERMISSION + default: + return 0, errors.New("Unknown WithTeam_PatchRequestBody_permission value: " + v) + } + return &result, nil +} +func SerializeWithTeam_PatchRequestBody_permission(values []WithTeam_PatchRequestBody_permission) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithTeam_PatchRequestBody_permission) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item/with_team_patch_request_body_privacy.go b/pkg/github/teams/item/with_team_patch_request_body_privacy.go new file mode 100644 index 0000000..9b2f1bd --- /dev/null +++ b/pkg/github/teams/item/with_team_patch_request_body_privacy.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. **For a parent or child team:** * `closed` - visible to all members of this organization. +type WithTeam_PatchRequestBody_privacy int + +const ( + SECRET_WITHTEAM_PATCHREQUESTBODY_PRIVACY WithTeam_PatchRequestBody_privacy = iota + CLOSED_WITHTEAM_PATCHREQUESTBODY_PRIVACY +) + +func (i WithTeam_PatchRequestBody_privacy) String() string { + return []string{"secret", "closed"}[i] +} +func ParseWithTeam_PatchRequestBody_privacy(v string) (any, error) { + result := SECRET_WITHTEAM_PATCHREQUESTBODY_PRIVACY + switch v { + case "secret": + result = SECRET_WITHTEAM_PATCHREQUESTBODY_PRIVACY + case "closed": + result = CLOSED_WITHTEAM_PATCHREQUESTBODY_PRIVACY + default: + return 0, errors.New("Unknown WithTeam_PatchRequestBody_privacy value: " + v) + } + return &result, nil +} +func SerializeWithTeam_PatchRequestBody_privacy(values []WithTeam_PatchRequestBody_privacy) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithTeam_PatchRequestBody_privacy) isMultiValue() bool { + return false +} diff --git a/pkg/github/teams/item_discussions_item_comments_item_reactions_post_request_body.go b/pkg/github/teams/item_discussions_item_comments_item_reactions_post_request_body.go new file mode 100644 index 0000000..df7c80e --- /dev/null +++ b/pkg/github/teams/item_discussions_item_comments_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDiscussionsItemCommentsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemDiscussionsItemCommentsItemReactionsPostRequestBody instantiates a new ItemDiscussionsItemCommentsItemReactionsPostRequestBody and sets the default values. +func NewItemDiscussionsItemCommentsItemReactionsPostRequestBody()(*ItemDiscussionsItemCommentsItemReactionsPostRequestBody) { + m := &ItemDiscussionsItemCommentsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDiscussionsItemCommentsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDiscussionsItemCommentsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDiscussionsItemCommentsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDiscussionsItemCommentsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDiscussionsItemCommentsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemDiscussionsItemCommentsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemDiscussionsItemCommentsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemDiscussionsItemCommentsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go b/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go new file mode 100644 index 0000000..cfb73fd --- /dev/null +++ b/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go @@ -0,0 +1,106 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i5e713172d547368561cb53637c6f2ef918d3efe3a8ec80c37f08773cf4e5890a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/teams/item/discussions/item/comments/item/reactions" +) + +// ItemDiscussionsItemCommentsItemReactionsRequestBuilder builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\comments\{comment_number}\reactions +type ItemDiscussionsItemCommentsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint.List the reactions to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. + Content *i5e713172d547368561cb53637c6f2ef918d3efe3a8ec80c37f08773cf4e5890a.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal instantiates a new ItemDiscussionsItemCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + m := &ItemDiscussionsItemCommentsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemDiscussionsItemCommentsItemReactionsRequestBuilder instantiates a new ItemDiscussionsItemCommentsItemReactionsRequestBuilder and sets the default values. +func NewItemDiscussionsItemCommentsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint.List the reactions to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a []Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion-comment-legacy +func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion-comment-legacy +func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemDiscussionsItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint.List the reactions to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsItemCommentsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment).A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemDiscussionsItemCommentsItemReactionsRequestBuilder when successful +func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + return NewItemDiscussionsItemCommentsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_discussions_item_comments_item_with_comment_number_patch_request_body.go b/pkg/github/teams/item_discussions_item_comments_item_with_comment_number_patch_request_body.go new file mode 100644 index 0000000..74f0d6d --- /dev/null +++ b/pkg/github/teams/item_discussions_item_comments_item_with_comment_number_patch_request_body.go @@ -0,0 +1,80 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion comment's body text. + body *string +} +// NewItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody instantiates a new ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody and sets the default values. +func NewItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody()(*ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) { + m := &ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion comment's body text. +// returns a *string when successful +func (m *ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion comment's body text. +func (m *ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/teams/item_discussions_item_comments_post_request_body.go b/pkg/github/teams/item_discussions_item_comments_post_request_body.go new file mode 100644 index 0000000..93b1509 --- /dev/null +++ b/pkg/github/teams/item_discussions_item_comments_post_request_body.go @@ -0,0 +1,80 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDiscussionsItemCommentsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion comment's body text. + body *string +} +// NewItemDiscussionsItemCommentsPostRequestBody instantiates a new ItemDiscussionsItemCommentsPostRequestBody and sets the default values. +func NewItemDiscussionsItemCommentsPostRequestBody()(*ItemDiscussionsItemCommentsPostRequestBody) { + m := &ItemDiscussionsItemCommentsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDiscussionsItemCommentsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDiscussionsItemCommentsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDiscussionsItemCommentsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDiscussionsItemCommentsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion comment's body text. +// returns a *string when successful +func (m *ItemDiscussionsItemCommentsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDiscussionsItemCommentsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemDiscussionsItemCommentsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + 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 *ItemDiscussionsItemCommentsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion comment's body text. +func (m *ItemDiscussionsItemCommentsPostRequestBody) SetBody(value *string)() { + m.body = value +} +type ItemDiscussionsItemCommentsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + SetBody(value *string)() +} diff --git a/pkg/github/teams/item_discussions_item_comments_request_builder.go b/pkg/github/teams/item_discussions_item_comments_request_builder.go new file mode 100644 index 0000000..eef4efb --- /dev/null +++ b/pkg/github/teams/item_discussions_item_comments_request_builder.go @@ -0,0 +1,118 @@ +package teams + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + iae2370292aad88fb026aab31bced866db9290855566de8f3b2d3e6b4330af70c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/teams/item/discussions/item/comments" +) + +// ItemDiscussionsItemCommentsRequestBuilder builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\comments +type ItemDiscussionsItemCommentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDiscussionsItemCommentsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#list-discussion-comments) endpoint.List all comments on a team discussion.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemDiscussionsItemCommentsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *iae2370292aad88fb026aab31bced866db9290855566de8f3b2d3e6b4330af70c.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByComment_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.discussions.item.comments.item collection +// Deprecated: +// returns a *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder when successful +func (m *ItemDiscussionsItemCommentsRequestBuilder) ByComment_number(comment_number int32)(*ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["comment_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_number), 10) + return NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDiscussionsItemCommentsRequestBuilderInternal instantiates a new ItemDiscussionsItemCommentsRequestBuilder and sets the default values. +func NewItemDiscussionsItemCommentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemCommentsRequestBuilder) { + m := &ItemDiscussionsItemCommentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments{?direction*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemDiscussionsItemCommentsRequestBuilder instantiates a new ItemDiscussionsItemCommentsRequestBuilder and sets the default values. +func NewItemDiscussionsItemCommentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemCommentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDiscussionsItemCommentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#list-discussion-comments) endpoint.List all comments on a team discussion.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a []TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#list-discussion-comments-legacy +func (m *ItemDiscussionsItemCommentsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsItemCommentsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable) + } + } + return val, nil +} +// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#create-a-discussion-comment-legacy +func (m *ItemDiscussionsItemCommentsRequestBuilder) Post(ctx context.Context, body ItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable), nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#list-discussion-comments) endpoint.List all comments on a team discussion.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsItemCommentsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemDiscussionsItemCommentsRequestBuilder when successful +func (m *ItemDiscussionsItemCommentsRequestBuilder) WithUrl(rawUrl string)(*ItemDiscussionsItemCommentsRequestBuilder) { + return NewItemDiscussionsItemCommentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_discussions_item_comments_with_comment_number_item_request_builder.go b/pkg/github/teams/item_discussions_item_comments_with_comment_number_item_request_builder.go new file mode 100644 index 0000000..963750f --- /dev/null +++ b/pkg/github/teams/item_discussions_item_comments_with_comment_number_item_request_builder.go @@ -0,0 +1,122 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\comments\{comment_number} +type ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal instantiates a new ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder and sets the default values. +func NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + m := &ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", pathParameters), + } + return m +} +// NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder instantiates a new ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder and sets the default values. +func NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#delete-a-discussion-comment) endpoint.Deletes a comment on a team discussion.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#delete-a-discussion-comment-legacy +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment) endpoint.Get a specific comment on a team discussion.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment-legacy +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable), nil +} +// Patch **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#update-a-discussion-comment) endpoint.Edits the body text of a discussion comment.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a TeamDiscussionCommentable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#update-a-discussion-comment-legacy +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Patch(ctx context.Context, body ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionCommentFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionCommentable), nil +} +// Reactions the reactions property +// returns a *ItemDiscussionsItemCommentsItemReactionsRequestBuilder when successful +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) Reactions()(*ItemDiscussionsItemCommentsItemReactionsRequestBuilder) { + return NewItemDiscussionsItemCommentsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#delete-a-discussion-comment) endpoint.Deletes a comment on a team discussion.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#get-a-discussion-comment) endpoint.Get a specific comment on a team discussion.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussion-comments#update-a-discussion-comment) endpoint.Edits the body text of a discussion comment.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemDiscussionsItemCommentsItemWithComment_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder when successful +func (m *ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder) { + return NewItemDiscussionsItemCommentsWithComment_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_discussions_item_reactions_post_request_body.go b/pkg/github/teams/item_discussions_item_reactions_post_request_body.go new file mode 100644 index 0000000..1745132 --- /dev/null +++ b/pkg/github/teams/item_discussions_item_reactions_post_request_body.go @@ -0,0 +1,51 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDiscussionsItemReactionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemDiscussionsItemReactionsPostRequestBody instantiates a new ItemDiscussionsItemReactionsPostRequestBody and sets the default values. +func NewItemDiscussionsItemReactionsPostRequestBody()(*ItemDiscussionsItemReactionsPostRequestBody) { + m := &ItemDiscussionsItemReactionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDiscussionsItemReactionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDiscussionsItemReactionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDiscussionsItemReactionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDiscussionsItemReactionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDiscussionsItemReactionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemDiscussionsItemReactionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemDiscussionsItemReactionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemDiscussionsItemReactionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/teams/item_discussions_item_reactions_request_builder.go b/pkg/github/teams/item_discussions_item_reactions_request_builder.go new file mode 100644 index 0000000..f755028 --- /dev/null +++ b/pkg/github/teams/item_discussions_item_reactions_request_builder.go @@ -0,0 +1,106 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ib31ac189171b0fe4b57cce81e7455929005bc8f2b687cc9e203825feb6b2644b "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/teams/item/discussions/item/reactions" +) + +// ItemDiscussionsItemReactionsRequestBuilder builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\reactions +type ItemDiscussionsItemReactionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDiscussionsItemReactionsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint.List the reactions to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemDiscussionsItemReactionsRequestBuilderGetQueryParameters struct { + // Returns a single [reaction type](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. + Content *ib31ac189171b0fe4b57cce81e7455929005bc8f2b687cc9e203825feb6b2644b.GetContentQueryParameterType `uriparametername:"content"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemDiscussionsItemReactionsRequestBuilderInternal instantiates a new ItemDiscussionsItemReactionsRequestBuilder and sets the default values. +func NewItemDiscussionsItemReactionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemReactionsRequestBuilder) { + m := &ItemDiscussionsItemReactionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/reactions{?content*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemDiscussionsItemReactionsRequestBuilder instantiates a new ItemDiscussionsItemReactionsRequestBuilder and sets the default values. +func NewItemDiscussionsItemReactionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsItemReactionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDiscussionsItemReactionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint.List the reactions to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a []Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion-legacy +func (m *ItemDiscussionsItemReactionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsItemReactionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable) + } + } + return val, nil +} +// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint.Create a reaction to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).A response with an HTTP `200` status means that you already added the reaction type to this team discussion.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a Reactionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion-legacy +func (m *ItemDiscussionsItemReactionsRequestBuilder) Post(ctx context.Context, body ItemDiscussionsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateReactionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Reactionable), nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint.List the reactions to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemReactionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsItemReactionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/enterprise-cloud@latest//rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint.Create a reaction to a [team discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion).A response with an HTTP `200` status means that you already added the reaction type to this team discussion.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemDiscussionsItemReactionsRequestBuilder when successful +func (m *ItemDiscussionsItemReactionsRequestBuilder) WithUrl(rawUrl string)(*ItemDiscussionsItemReactionsRequestBuilder) { + return NewItemDiscussionsItemReactionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_discussions_item_with_discussion_number_patch_request_body.go b/pkg/github/teams/item_discussions_item_with_discussion_number_patch_request_body.go new file mode 100644 index 0000000..6922f18 --- /dev/null +++ b/pkg/github/teams/item_discussions_item_with_discussion_number_patch_request_body.go @@ -0,0 +1,109 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDiscussionsItemWithDiscussion_numberPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion post's body text. + body *string + // The discussion post's title. + title *string +} +// NewItemDiscussionsItemWithDiscussion_numberPatchRequestBody instantiates a new ItemDiscussionsItemWithDiscussion_numberPatchRequestBody and sets the default values. +func NewItemDiscussionsItemWithDiscussion_numberPatchRequestBody()(*ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) { + m := &ItemDiscussionsItemWithDiscussion_numberPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDiscussionsItemWithDiscussion_numberPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDiscussionsItemWithDiscussion_numberPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDiscussionsItemWithDiscussion_numberPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion post's body text. +// returns a *string when successful +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The discussion post's title. +// returns a *string when successful +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion post's body text. +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) SetBody(value *string)() { + m.body = value +} +// SetTitle sets the title property value. The discussion post's title. +func (m *ItemDiscussionsItemWithDiscussion_numberPatchRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemDiscussionsItemWithDiscussion_numberPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetTitle()(*string) + SetBody(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/teams/item_discussions_post_request_body.go b/pkg/github/teams/item_discussions_post_request_body.go new file mode 100644 index 0000000..118eabb --- /dev/null +++ b/pkg/github/teams/item_discussions_post_request_body.go @@ -0,0 +1,138 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemDiscussionsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The discussion post's body text. + body *string + // Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + private *bool + // The discussion post's title. + title *string +} +// NewItemDiscussionsPostRequestBody instantiates a new ItemDiscussionsPostRequestBody and sets the default values. +func NewItemDiscussionsPostRequestBody()(*ItemDiscussionsPostRequestBody) { + m := &ItemDiscussionsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemDiscussionsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemDiscussionsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemDiscussionsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemDiscussionsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. The discussion post's body text. +// returns a *string when successful +func (m *ItemDiscussionsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemDiscussionsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetPrivate gets the private property value. Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. +// returns a *bool when successful +func (m *ItemDiscussionsPostRequestBody) GetPrivate()(*bool) { + return m.private +} +// GetTitle gets the title property value. The discussion post's title. +// returns a *string when successful +func (m *ItemDiscussionsPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ItemDiscussionsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *ItemDiscussionsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. The discussion post's body text. +func (m *ItemDiscussionsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetPrivate sets the private property value. Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. +func (m *ItemDiscussionsPostRequestBody) SetPrivate(value *bool)() { + m.private = value +} +// SetTitle sets the title property value. The discussion post's title. +func (m *ItemDiscussionsPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type ItemDiscussionsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetPrivate()(*bool) + GetTitle()(*string) + SetBody(value *string)() + SetPrivate(value *bool)() + SetTitle(value *string)() +} diff --git a/pkg/github/teams/item_discussions_request_builder.go b/pkg/github/teams/item_discussions_request_builder.go new file mode 100644 index 0000000..4e1483d --- /dev/null +++ b/pkg/github/teams/item_discussions_request_builder.go @@ -0,0 +1,118 @@ +package teams + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i1bcdfb438edb9e6635b54455e3aa5d62b7e5a697e736397b6689168a038a02d6 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/teams/item/discussions" +) + +// ItemDiscussionsRequestBuilder builds and executes requests for operations under \teams\{team_id}\discussions +type ItemDiscussionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemDiscussionsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#list-discussions) endpoint.List all discussions on a team's page.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +type ItemDiscussionsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i1bcdfb438edb9e6635b54455e3aa5d62b7e5a697e736397b6689168a038a02d6.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByDiscussion_number gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.discussions.item collection +// Deprecated: +// returns a *ItemDiscussionsWithDiscussion_numberItemRequestBuilder when successful +func (m *ItemDiscussionsRequestBuilder) ByDiscussion_number(discussion_number int32)(*ItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["discussion_number"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(discussion_number), 10) + return NewItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDiscussionsRequestBuilderInternal instantiates a new ItemDiscussionsRequestBuilder and sets the default values. +func NewItemDiscussionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsRequestBuilder) { + m := &ItemDiscussionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/discussions{?direction*,page*,per_page*}", pathParameters), + } + return m +} +// NewItemDiscussionsRequestBuilder instantiates a new ItemDiscussionsRequestBuilder and sets the default values. +func NewItemDiscussionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDiscussionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#list-discussions) endpoint.List all discussions on a team's page.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a []TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#list-discussions-legacy +func (m *ItemDiscussionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable) + } + } + return val, nil +} +// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#create-a-discussion-legacy +func (m *ItemDiscussionsRequestBuilder) Post(ctx context.Context, body ItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable), nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#list-discussions) endpoint.List all discussions on a team's page.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemDiscussionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/enterprise-cloud@latest//github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemDiscussionsRequestBuilder when successful +func (m *ItemDiscussionsRequestBuilder) WithUrl(rawUrl string)(*ItemDiscussionsRequestBuilder) { + return NewItemDiscussionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_discussions_with_discussion_number_item_request_builder.go b/pkg/github/teams/item_discussions_with_discussion_number_item_request_builder.go new file mode 100644 index 0000000..910bfbe --- /dev/null +++ b/pkg/github/teams/item_discussions_with_discussion_number_item_request_builder.go @@ -0,0 +1,127 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemDiscussionsWithDiscussion_numberItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number} +type ItemDiscussionsWithDiscussion_numberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Comments the comments property +// returns a *ItemDiscussionsItemCommentsRequestBuilder when successful +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) Comments()(*ItemDiscussionsItemCommentsRequestBuilder) { + return NewItemDiscussionsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal instantiates a new ItemDiscussionsWithDiscussion_numberItemRequestBuilder and sets the default values. +func NewItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + m := &ItemDiscussionsWithDiscussion_numberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}", pathParameters), + } + return m +} +// NewItemDiscussionsWithDiscussion_numberItemRequestBuilder instantiates a new ItemDiscussionsWithDiscussion_numberItemRequestBuilder and sets the default values. +func NewItemDiscussionsWithDiscussion_numberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDiscussionsWithDiscussion_numberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#delete-a-discussion) endpoint.Delete a discussion from a team's page.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#delete-a-discussion-legacy +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion) endpoint.Get a specific discussion on a team's page.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion-legacy +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable), nil +} +// Patch **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#update-a-discussion) endpoint.Edits the title and body text of a discussion post. Only the parameters you provide are updated.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a TeamDiscussionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#update-a-discussion-legacy +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) Patch(ctx context.Context, body ItemDiscussionsItemWithDiscussion_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamDiscussionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamDiscussionable), nil +} +// Reactions the reactions property +// returns a *ItemDiscussionsItemReactionsRequestBuilder when successful +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) Reactions()(*ItemDiscussionsItemReactionsRequestBuilder) { + return NewItemDiscussionsItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#delete-a-discussion) endpoint.Delete a discussion from a team's page.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#get-a-discussion) endpoint.Get a specific discussion on a team's page.OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/enterprise-cloud@latest//rest/teams/discussions#update-a-discussion) endpoint.Edits the title and body text of a discussion post. Only the parameters you provide are updated.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemDiscussionsItemWithDiscussion_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemDiscussionsWithDiscussion_numberItemRequestBuilder when successful +func (m *ItemDiscussionsWithDiscussion_numberItemRequestBuilder) WithUrl(rawUrl string)(*ItemDiscussionsWithDiscussion_numberItemRequestBuilder) { + return NewItemDiscussionsWithDiscussion_numberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_invitations_request_builder.go b/pkg/github/teams/item_invitations_request_builder.go new file mode 100644 index 0000000..ef6612f --- /dev/null +++ b/pkg/github/teams/item_invitations_request_builder.go @@ -0,0 +1,70 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemInvitationsRequestBuilder builds and executes requests for operations under \teams\{team_id}\invitations +type ItemInvitationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInvitationsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-pending-team-invitations) endpoint.The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub Enterprise Cloud member, the `login` field in the return hash will be `null`. +type ItemInvitationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemInvitationsRequestBuilderInternal instantiates a new ItemInvitationsRequestBuilder and sets the default values. +func NewItemInvitationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsRequestBuilder) { + m := &ItemInvitationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/invitations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemInvitationsRequestBuilder instantiates a new ItemInvitationsRequestBuilder and sets the default values. +func NewItemInvitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInvitationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-pending-team-invitations) endpoint.The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub Enterprise Cloud member, the `login` field in the return hash will be `null`. +// Deprecated: +// returns a []OrganizationInvitationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-pending-team-invitations-legacy +func (m *ItemInvitationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationInvitationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationInvitationable) + } + } + return val, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-pending-team-invitations) endpoint.The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub Enterprise Cloud member, the `login` field in the return hash will be `null`. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemInvitationsRequestBuilder when successful +func (m *ItemInvitationsRequestBuilder) WithUrl(rawUrl string)(*ItemInvitationsRequestBuilder) { + return NewItemInvitationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_members_request_builder.go b/pkg/github/teams/item_members_request_builder.go new file mode 100644 index 0000000..26df035 --- /dev/null +++ b/pkg/github/teams/item_members_request_builder.go @@ -0,0 +1,90 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + iafee9186e97e0c33bcdb118d0c00fe5a4f9e6493b2506f25cfcc1b9ff0626f5e "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/teams/item/members" +) + +// ItemMembersRequestBuilder builds and executes requests for operations under \teams\{team_id}\members +type ItemMembersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemMembersRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-team-members) endpoint.Team members will include the members of child teams. +type ItemMembersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Filters members returned by their role in the team. + Role *iafee9186e97e0c33bcdb118d0c00fe5a4f9e6493b2506f25cfcc1b9ff0626f5e.GetRoleQueryParameterType `uriparametername:"role"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.members.item collection +// Deprecated: +// returns a *ItemMembersWithUsernameItemRequestBuilder when successful +func (m *ItemMembersRequestBuilder) ByUsername(username string)(*ItemMembersWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemMembersWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMembersRequestBuilderInternal instantiates a new ItemMembersRequestBuilder and sets the default values. +func NewItemMembersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersRequestBuilder) { + m := &ItemMembersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/members{?page*,per_page*,role*}", pathParameters), + } + return m +} +// NewItemMembersRequestBuilder instantiates a new ItemMembersRequestBuilder and sets the default values. +func NewItemMembersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-team-members) endpoint.Team members will include the members of child teams. +// Deprecated: +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-team-members-legacy +func (m *ItemMembersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMembersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#list-team-members) endpoint.Team members will include the members of child teams. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemMembersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemMembersRequestBuilder when successful +func (m *ItemMembersRequestBuilder) WithUrl(rawUrl string)(*ItemMembersRequestBuilder) { + return NewItemMembersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_members_with_username_item_request_builder.go b/pkg/github/teams/item_members_with_username_item_request_builder.go new file mode 100644 index 0000000..a71d8fc --- /dev/null +++ b/pkg/github/teams/item_members_with_username_item_request_builder.go @@ -0,0 +1,108 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembersWithUsernameItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\members\{username} +type ItemMembersWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMembersWithUsernameItemRequestBuilderInternal instantiates a new ItemMembersWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembersWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersWithUsernameItemRequestBuilder) { + m := &ItemMembersWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/members/{username}", pathParameters), + } + return m +} +// NewItemMembersWithUsernameItemRequestBuilder instantiates a new ItemMembersWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembersWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembersWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembersWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete the "Remove team member" endpoint (described below) is deprecated.We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)." +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-member-legacy +func (m *ItemMembersWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get the "Get team member" endpoint (described below) is deprecated.We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.To list members in a team, the team must be visible to the authenticated user. +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-member-legacy +func (m *ItemMembersWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Put the "Add team member" endpoint (described below) is deprecated.We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// Deprecated: +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-team-member-legacy +func (m *ItemMembersWithUsernameItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation the "Remove team member" endpoint (described below) is deprecated.We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)." +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation the "Get team member" endpoint (described below) is deprecated.We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.To list members in a team, the team must be visible to the authenticated user. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToPutRequestInformation the "Add team member" endpoint (described below) is deprecated.We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + 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. +// Deprecated: +// returns a *ItemMembersWithUsernameItemRequestBuilder when successful +func (m *ItemMembersWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemMembersWithUsernameItemRequestBuilder) { + return NewItemMembersWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_memberships_item_with_username_put_request_body.go b/pkg/github/teams/item_memberships_item_with_username_put_request_body.go new file mode 100644 index 0000000..a584645 --- /dev/null +++ b/pkg/github/teams/item_memberships_item_with_username_put_request_body.go @@ -0,0 +1,51 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemMembershipsItemWithUsernamePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemMembershipsItemWithUsernamePutRequestBody instantiates a new ItemMembershipsItemWithUsernamePutRequestBody and sets the default values. +func NewItemMembershipsItemWithUsernamePutRequestBody()(*ItemMembershipsItemWithUsernamePutRequestBody) { + m := &ItemMembershipsItemWithUsernamePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemMembershipsItemWithUsernamePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemMembershipsItemWithUsernamePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemMembershipsItemWithUsernamePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemMembershipsItemWithUsernamePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemMembershipsItemWithUsernamePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemMembershipsItemWithUsernamePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemMembershipsItemWithUsernamePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemMembershipsItemWithUsernamePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/teams/item_memberships_request_builder.go b/pkg/github/teams/item_memberships_request_builder.go new file mode 100644 index 0000000..a48fcc2 --- /dev/null +++ b/pkg/github/teams/item_memberships_request_builder.go @@ -0,0 +1,36 @@ +package teams + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemMembershipsRequestBuilder builds and executes requests for operations under \teams\{team_id}\memberships +type ItemMembershipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.memberships.item collection +// Deprecated: +// returns a *ItemMembershipsWithUsernameItemRequestBuilder when successful +func (m *ItemMembershipsRequestBuilder) ByUsername(username string)(*ItemMembershipsWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewItemMembershipsWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemMembershipsRequestBuilderInternal instantiates a new ItemMembershipsRequestBuilder and sets the default values. +func NewItemMembershipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsRequestBuilder) { + m := &ItemMembershipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/memberships", pathParameters), + } + return m +} +// NewItemMembershipsRequestBuilder instantiates a new ItemMembershipsRequestBuilder and sets the default values. +func NewItemMembershipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembershipsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/teams/item_memberships_with_username_item_request_builder.go b/pkg/github/teams/item_memberships_with_username_item_request_builder.go new file mode 100644 index 0000000..ed3018b --- /dev/null +++ b/pkg/github/teams/item_memberships_with_username_item_request_builder.go @@ -0,0 +1,125 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemMembershipsWithUsernameItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\memberships\{username} +type ItemMembershipsWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemMembershipsWithUsernameItemRequestBuilderInternal instantiates a new ItemMembershipsWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembershipsWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsWithUsernameItemRequestBuilder) { + m := &ItemMembershipsWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/memberships/{username}", pathParameters), + } + return m +} +// NewItemMembershipsWithUsernameItemRequestBuilder instantiates a new ItemMembershipsWithUsernameItemRequestBuilder and sets the default values. +func NewItemMembershipsWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemMembershipsWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemMembershipsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-membership-for-a-user) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)." +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-membership-for-a-user-legacy +func (m *ItemMembershipsWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-membership-for-a-user) endpoint.Team members will include the members of child teams.To get a user's membership with a team, the team must be visible to the authenticated user.**Note:**The response contains the `state` of the membership and the member's `role`.The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#create-a-team). +// Deprecated: +// returns a TeamMembershipable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-membership-for-a-user-legacy +func (m *ItemMembershipsWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable), nil +} +// Put **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-or-update-team-membership-for-a-user) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. +// Deprecated: +// returns a TeamMembershipable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-or-update-team-membership-for-a-user-legacy +func (m *ItemMembershipsWithUsernameItemRequestBuilder) Put(ctx context.Context, body ItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamMembershipable), nil +} +// ToDeleteRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#remove-team-membership-for-a-user) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)." +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#get-team-membership-for-a-user) endpoint.Team members will include the members of child teams.To get a user's membership with a team, the team must be visible to the authenticated user.**Note:**The response contains the `state` of the membership and the member's `role`.The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#create-a-team). +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/enterprise-cloud@latest//rest/teams/members#add-or-update-team-membership-for-a-user) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Cloud team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub Enterprise Cloud](https://docs.github.com/enterprise-cloud@latest//articles/synchronizing-teams-between-your-identity-provider-and-github/)."If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemMembershipsWithUsernameItemRequestBuilder when successful +func (m *ItemMembershipsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemMembershipsWithUsernameItemRequestBuilder) { + return NewItemMembershipsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_projects_item_with_project_403_error.go b/pkg/github/teams/item_projects_item_with_project_403_error.go new file mode 100644 index 0000000..a05755e --- /dev/null +++ b/pkg/github/teams/item_projects_item_with_project_403_error.go @@ -0,0 +1,117 @@ +package teams + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemProjectsItemWithProject_403Error 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 +} +// NewItemProjectsItemWithProject_403Error instantiates a new ItemProjectsItemWithProject_403Error and sets the default values. +func NewItemProjectsItemWithProject_403Error()(*ItemProjectsItemWithProject_403Error) { + m := &ItemProjectsItemWithProject_403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemProjectsItemWithProject_403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProjectsItemWithProject_403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProjectsItemWithProject_403Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *ItemProjectsItemWithProject_403Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemProjectsItemWithProject_403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *ItemProjectsItemWithProject_403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProjectsItemWithProject_403Error) 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 +// returns a *string when successful +func (m *ItemProjectsItemWithProject_403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemProjectsItemWithProject_403Error) 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 *ItemProjectsItemWithProject_403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemProjectsItemWithProject_403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemProjectsItemWithProject_403Error) SetMessage(value *string)() { + m.message = value +} +type ItemProjectsItemWithProject_403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/teams/item_projects_item_with_project_put_request_body.go b/pkg/github/teams/item_projects_item_with_project_put_request_body.go new file mode 100644 index 0000000..173232a --- /dev/null +++ b/pkg/github/teams/item_projects_item_with_project_put_request_body.go @@ -0,0 +1,51 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemProjectsItemWithProject_PutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemProjectsItemWithProject_PutRequestBody instantiates a new ItemProjectsItemWithProject_PutRequestBody and sets the default values. +func NewItemProjectsItemWithProject_PutRequestBody()(*ItemProjectsItemWithProject_PutRequestBody) { + m := &ItemProjectsItemWithProject_PutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemProjectsItemWithProject_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemProjectsItemWithProject_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemProjectsItemWithProject_PutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemProjectsItemWithProject_PutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemProjectsItemWithProject_PutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemProjectsItemWithProject_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemProjectsItemWithProject_PutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemProjectsItemWithProject_PutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/teams/item_projects_request_builder.go b/pkg/github/teams/item_projects_request_builder.go new file mode 100644 index 0000000..86705e6 --- /dev/null +++ b/pkg/github/teams/item_projects_request_builder.go @@ -0,0 +1,86 @@ +package teams + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemProjectsRequestBuilder builds and executes requests for operations under \teams\{team_id}\projects +type ItemProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemProjectsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-projects) endpoint.Lists the organization projects for a team. +type ItemProjectsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByProject_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.projects.item collection +// Deprecated: +// returns a *ItemProjectsWithProject_ItemRequestBuilder when successful +func (m *ItemProjectsRequestBuilder) ByProject_id(project_id int32)(*ItemProjectsWithProject_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["project_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(project_id), 10) + return NewItemProjectsWithProject_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemProjectsRequestBuilderInternal instantiates a new ItemProjectsRequestBuilder and sets the default values. +func NewItemProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { + m := &ItemProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/projects{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemProjectsRequestBuilder instantiates a new ItemProjectsRequestBuilder and sets the default values. +func NewItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemProjectsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-projects) endpoint.Lists the organization projects for a team. +// Deprecated: +// returns a []TeamProjectable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-projects-legacy +func (m *ItemProjectsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable) + } + } + return val, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-projects) endpoint.Lists the organization projects for a team. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemProjectsRequestBuilder when successful +func (m *ItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemProjectsRequestBuilder) { + return NewItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_projects_with_project_item_request_builder.go b/pkg/github/teams/item_projects_with_project_item_request_builder.go new file mode 100644 index 0000000..f70f6da --- /dev/null +++ b/pkg/github/teams/item_projects_with_project_item_request_builder.go @@ -0,0 +1,128 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemProjectsWithProject_ItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\projects\{project_id} +type ItemProjectsWithProject_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemProjectsWithProject_ItemRequestBuilderInternal instantiates a new ItemProjectsWithProject_ItemRequestBuilder and sets the default values. +func NewItemProjectsWithProject_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsWithProject_ItemRequestBuilder) { + m := &ItemProjectsWithProject_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/projects/{project_id}", pathParameters), + } + return m +} +// NewItemProjectsWithProject_ItemRequestBuilder instantiates a new ItemProjectsWithProject_ItemRequestBuilder and sets the default values. +func NewItemProjectsWithProject_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsWithProject_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemProjectsWithProject_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-project-from-a-team) endpoint.Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. +// Deprecated: +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-project-from-a-team-legacy +func (m *ItemProjectsWithProject_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-project) endpoint.Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. +// Deprecated: +// returns a TeamProjectable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-project-legacy +func (m *ItemProjectsWithProject_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamProjectFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamProjectable), nil +} +// Put **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-project-permissions) endpoint.Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. +// Deprecated: +// returns a ItemProjectsItemWithProject_403Error error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-project-permissions-legacy +func (m *ItemProjectsWithProject_ItemRequestBuilder) Put(ctx context.Context, body ItemProjectsItemWithProject_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": CreateItemProjectsItemWithProject_403ErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-project-from-a-team) endpoint.Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemProjectsWithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-project) endpoint.Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemProjectsWithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-project-permissions) endpoint.Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemProjectsWithProject_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemProjectsItemWithProject_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemProjectsWithProject_ItemRequestBuilder when successful +func (m *ItemProjectsWithProject_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemProjectsWithProject_ItemRequestBuilder) { + return NewItemProjectsWithProject_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_repos_item_item_with_repo_put_request_body.go b/pkg/github/teams/item_repos_item_item_with_repo_put_request_body.go new file mode 100644 index 0000000..978ca7c --- /dev/null +++ b/pkg/github/teams/item_repos_item_item_with_repo_put_request_body.go @@ -0,0 +1,51 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemReposItemItemWithRepoPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemReposItemItemWithRepoPutRequestBody instantiates a new ItemReposItemItemWithRepoPutRequestBody and sets the default values. +func NewItemReposItemItemWithRepoPutRequestBody()(*ItemReposItemItemWithRepoPutRequestBody) { + m := &ItemReposItemItemWithRepoPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemReposItemItemWithRepoPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemReposItemItemWithRepoPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemReposItemItemWithRepoPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemReposItemItemWithRepoPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemReposItemItemWithRepoPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemReposItemItemWithRepoPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemReposItemItemWithRepoPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemReposItemItemWithRepoPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go b/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go new file mode 100644 index 0000000..095a830 --- /dev/null +++ b/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go @@ -0,0 +1,119 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemReposItemWithRepoItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\repos\{owner}\{repo} +type ItemReposItemWithRepoItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemReposItemWithRepoItemRequestBuilderInternal instantiates a new ItemReposItemWithRepoItemRequestBuilder and sets the default values. +func NewItemReposItemWithRepoItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposItemWithRepoItemRequestBuilder) { + m := &ItemReposItemWithRepoItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/repos/{owner}/{repo}", pathParameters), + } + return m +} +// NewItemReposItemWithRepoItemRequestBuilder instantiates a new ItemReposItemWithRepoItemRequestBuilder and sets the default values. +func NewItemReposItemWithRepoItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposItemWithRepoItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReposItemWithRepoItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-repository-from-a-team) endpoint.If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. +// Deprecated: +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-repository-from-a-team-legacy +func (m *ItemReposItemWithRepoItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get **Note**: Repositories inherited through a parent team will also be checked.**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-repository) endpoint.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: +// Deprecated: +// returns a TeamRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-repository-legacy +func (m *ItemReposItemWithRepoItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamRepositoryable), nil +} +// Put **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-repository-permissions)" endpoint.To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// Deprecated: +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-repository-permissions-legacy +func (m *ItemReposItemWithRepoItemRequestBuilder) Put(ctx context.Context, body ItemReposItemItemWithRepoPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#remove-a-repository-from-a-team) endpoint.If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemReposItemWithRepoItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation **Note**: Repositories inherited through a parent team will also be checked.**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#check-team-permissions-for-a-repository) endpoint.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemReposItemWithRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#add-or-update-team-repository-permissions)" endpoint.To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemReposItemWithRepoItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemReposItemItemWithRepoPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemReposItemWithRepoItemRequestBuilder when successful +func (m *ItemReposItemWithRepoItemRequestBuilder) WithUrl(rawUrl string)(*ItemReposItemWithRepoItemRequestBuilder) { + return NewItemReposItemWithRepoItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_repos_request_builder.go b/pkg/github/teams/item_repos_request_builder.go new file mode 100644 index 0000000..ad3e47b --- /dev/null +++ b/pkg/github/teams/item_repos_request_builder.go @@ -0,0 +1,86 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemReposRequestBuilder builds and executes requests for operations under \teams\{team_id}\repos +type ItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemReposRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-repositories) endpoint. +type ItemReposRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByOwner gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.repos.item collection +// returns a *ItemReposWithOwnerItemRequestBuilder when successful +func (m *ItemReposRequestBuilder) ByOwner(owner string)(*ItemReposWithOwnerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if owner != "" { + urlTplParams["owner"] = owner + } + return NewItemReposWithOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemReposRequestBuilderInternal instantiates a new ItemReposRequestBuilder and sets the default values. +func NewItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposRequestBuilder) { + m := &ItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/repos{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemReposRequestBuilder instantiates a new ItemReposRequestBuilder and sets the default values. +func NewItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReposRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-repositories) endpoint. +// Deprecated: +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-repositories-legacy +func (m *ItemReposRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReposRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-team-repositories) endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReposRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemReposRequestBuilder when successful +func (m *ItemReposRequestBuilder) WithUrl(rawUrl string)(*ItemReposRequestBuilder) { + return NewItemReposRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_repos_with_owner_item_request_builder.go b/pkg/github/teams/item_repos_with_owner_item_request_builder.go new file mode 100644 index 0000000..160076a --- /dev/null +++ b/pkg/github/teams/item_repos_with_owner_item_request_builder.go @@ -0,0 +1,36 @@ +package teams + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemReposWithOwnerItemRequestBuilder builds and executes requests for operations under \teams\{team_id}\repos\{owner} +type ItemReposWithOwnerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item.repos.item.item collection +// Deprecated: +// returns a *ItemReposItemWithRepoItemRequestBuilder when successful +func (m *ItemReposWithOwnerItemRequestBuilder) ByRepo(repo string)(*ItemReposItemWithRepoItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo != "" { + urlTplParams["repo"] = repo + } + return NewItemReposItemWithRepoItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemReposWithOwnerItemRequestBuilderInternal instantiates a new ItemReposWithOwnerItemRequestBuilder and sets the default values. +func NewItemReposWithOwnerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposWithOwnerItemRequestBuilder) { + m := &ItemReposWithOwnerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/repos/{owner}", pathParameters), + } + return m +} +// NewItemReposWithOwnerItemRequestBuilder instantiates a new ItemReposWithOwnerItemRequestBuilder and sets the default values. +func NewItemReposWithOwnerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposWithOwnerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReposWithOwnerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/teams/item_team_sync_group_mappings_patch_request_body.go b/pkg/github/teams/item_team_sync_group_mappings_patch_request_body.go new file mode 100644 index 0000000..c689746 --- /dev/null +++ b/pkg/github/teams/item_team_sync_group_mappings_patch_request_body.go @@ -0,0 +1,121 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamSyncGroupMappingsPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. + groups []ItemTeamSyncGroupMappingsPatchRequestBody_groupsable + // The synced_at property + synced_at *string +} +// NewItemTeamSyncGroupMappingsPatchRequestBody instantiates a new ItemTeamSyncGroupMappingsPatchRequestBody and sets the default values. +func NewItemTeamSyncGroupMappingsPatchRequestBody()(*ItemTeamSyncGroupMappingsPatchRequestBody) { + m := &ItemTeamSyncGroupMappingsPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamSyncGroupMappingsPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamSyncGroupMappingsPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamSyncGroupMappingsPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemTeamSyncGroupMappingsPatchRequestBody_groupsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemTeamSyncGroupMappingsPatchRequestBody_groupsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemTeamSyncGroupMappingsPatchRequestBody_groupsable) + } + } + m.SetGroups(res) + } + return nil + } + res["synced_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncedAt(val) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. +// returns a []ItemTeamSyncGroupMappingsPatchRequestBody_groupsable when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) GetGroups()([]ItemTeamSyncGroupMappingsPatchRequestBody_groupsable) { + return m.groups +} +// GetSyncedAt gets the synced_at property value. The synced_at property +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) GetSyncedAt()(*string) { + return m.synced_at +} +// Serialize serializes information the current object +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("synced_at", m.GetSyncedAt()) + 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 *ItemTeamSyncGroupMappingsPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetGroups sets the groups property value. The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) SetGroups(value []ItemTeamSyncGroupMappingsPatchRequestBody_groupsable)() { + m.groups = value +} +// SetSyncedAt sets the synced_at property value. The synced_at property +func (m *ItemTeamSyncGroupMappingsPatchRequestBody) SetSyncedAt(value *string)() { + m.synced_at = value +} +type ItemTeamSyncGroupMappingsPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroups()([]ItemTeamSyncGroupMappingsPatchRequestBody_groupsable) + GetSyncedAt()(*string) + SetGroups(value []ItemTeamSyncGroupMappingsPatchRequestBody_groupsable)() + SetSyncedAt(value *string)() +} diff --git a/pkg/github/teams/item_team_sync_group_mappings_patch_request_body_groups.go b/pkg/github/teams/item_team_sync_group_mappings_patch_request_body_groups.go new file mode 100644 index 0000000..7d093ce --- /dev/null +++ b/pkg/github/teams/item_team_sync_group_mappings_patch_request_body_groups.go @@ -0,0 +1,225 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemTeamSyncGroupMappingsPatchRequestBody_groups struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description property + description *string + // Description of the IdP group. + group_description *string + // ID of the IdP group. + group_id *string + // Name of the IdP group. + group_name *string + // The id property + id *string + // The name property + name *string +} +// NewItemTeamSyncGroupMappingsPatchRequestBody_groups instantiates a new ItemTeamSyncGroupMappingsPatchRequestBody_groups and sets the default values. +func NewItemTeamSyncGroupMappingsPatchRequestBody_groups()(*ItemTeamSyncGroupMappingsPatchRequestBody_groups) { + m := &ItemTeamSyncGroupMappingsPatchRequestBody_groups{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamSyncGroupMappingsPatchRequestBody_groupsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemTeamSyncGroupMappingsPatchRequestBody_groupsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamSyncGroupMappingsPatchRequestBody_groups(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["group_description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupDescription(val) + } + return nil + } + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetGroupDescription gets the group_description property value. Description of the IdP group. +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetGroupDescription()(*string) { + return m.group_description +} +// GetGroupId gets the group_id property value. ID of the IdP group. +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetGroupId()(*string) { + return m.group_id +} +// GetGroupName gets the group_name property value. Name of the IdP group. +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetGroupName()(*string) { + return m.group_name +} +// GetId gets the id property value. The id property +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_description", m.GetGroupDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetDescription(value *string)() { + m.description = value +} +// SetGroupDescription sets the group_description property value. Description of the IdP group. +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetGroupDescription(value *string)() { + m.group_description = value +} +// SetGroupId sets the group_id property value. ID of the IdP group. +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetGroupId(value *string)() { + m.group_id = value +} +// SetGroupName sets the group_name property value. Name of the IdP group. +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetGroupName(value *string)() { + m.group_name = value +} +// SetId sets the id property value. The id property +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *ItemTeamSyncGroupMappingsPatchRequestBody_groups) SetName(value *string)() { + m.name = value +} +type ItemTeamSyncGroupMappingsPatchRequestBody_groupsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetGroupDescription()(*string) + GetGroupId()(*string) + GetGroupName()(*string) + GetId()(*string) + GetName()(*string) + SetDescription(value *string)() + SetGroupDescription(value *string)() + SetGroupId(value *string)() + SetGroupName(value *string)() + SetId(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/teams/item_team_sync_group_mappings_request_builder.go b/pkg/github/teams/item_team_sync_group_mappings_request_builder.go new file mode 100644 index 0000000..1524b51 --- /dev/null +++ b/pkg/github/teams/item_team_sync_group_mappings_request_builder.go @@ -0,0 +1,105 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamSyncGroupMappingsRequestBuilder builds and executes requests for operations under \teams\{team_id}\team-sync\group-mappings +type ItemTeamSyncGroupMappingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamSyncGroupMappingsRequestBuilderInternal instantiates a new ItemTeamSyncGroupMappingsRequestBuilder and sets the default values. +func NewItemTeamSyncGroupMappingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncGroupMappingsRequestBuilder) { + m := &ItemTeamSyncGroupMappingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/team-sync/group-mappings", pathParameters), + } + return m +} +// NewItemTeamSyncGroupMappingsRequestBuilder instantiates a new ItemTeamSyncGroupMappingsRequestBuilder and sets the default values. +func NewItemTeamSyncGroupMappingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncGroupMappingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamSyncGroupMappingsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-a-team) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.List IdP groups connected to a team on GitHub Enterprise Cloud. +// Deprecated: +// returns a GroupMappingable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-a-team-legacy +func (m *ItemTeamSyncGroupMappingsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGroupMappingFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable), nil +} +// Patch **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#create-or-update-idp-group-connections) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. +// Deprecated: +// returns a GroupMappingable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#create-or-update-idp-group-connections-legacy +func (m *ItemTeamSyncGroupMappingsRequestBuilder) Patch(ctx context.Context, body ItemTeamSyncGroupMappingsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGroupMappingFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GroupMappingable), nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-a-team) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.List IdP groups connected to a team on GitHub Enterprise Cloud. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemTeamSyncGroupMappingsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#create-or-update-idp-group-connections) endpoint.Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-cloud@latest//github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemTeamSyncGroupMappingsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTeamSyncGroupMappingsPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemTeamSyncGroupMappingsRequestBuilder when successful +func (m *ItemTeamSyncGroupMappingsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamSyncGroupMappingsRequestBuilder) { + return NewItemTeamSyncGroupMappingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_team_sync_request_builder.go b/pkg/github/teams/item_team_sync_request_builder.go new file mode 100644 index 0000000..284a4be --- /dev/null +++ b/pkg/github/teams/item_team_sync_request_builder.go @@ -0,0 +1,28 @@ +package teams + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamSyncRequestBuilder builds and executes requests for operations under \teams\{team_id}\team-sync +type ItemTeamSyncRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamSyncRequestBuilderInternal instantiates a new ItemTeamSyncRequestBuilder and sets the default values. +func NewItemTeamSyncRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncRequestBuilder) { + m := &ItemTeamSyncRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/team-sync", pathParameters), + } + return m +} +// NewItemTeamSyncRequestBuilder instantiates a new ItemTeamSyncRequestBuilder and sets the default values. +func NewItemTeamSyncRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamSyncRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamSyncRequestBuilderInternal(urlParams, requestAdapter) +} +// GroupMappings the groupMappings property +// returns a *ItemTeamSyncGroupMappingsRequestBuilder when successful +func (m *ItemTeamSyncRequestBuilder) GroupMappings()(*ItemTeamSyncGroupMappingsRequestBuilder) { + return NewItemTeamSyncGroupMappingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/teams/item_teams_request_builder.go b/pkg/github/teams/item_teams_request_builder.go new file mode 100644 index 0000000..658671e --- /dev/null +++ b/pkg/github/teams/item_teams_request_builder.go @@ -0,0 +1,78 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemTeamsRequestBuilder builds and executes requests for operations under \teams\{team_id}\teams +type ItemTeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamsRequestBuilderGetQueryParameters **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-child-teams) endpoint. +type ItemTeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemTeamsRequestBuilderInternal instantiates a new ItemTeamsRequestBuilder and sets the default values. +func NewItemTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsRequestBuilder) { + m := &ItemTeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemTeamsRequestBuilder instantiates a new ItemTeamsRequestBuilder and sets the default values. +func NewItemTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-child-teams) endpoint. +// Deprecated: +// returns a []Teamable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-child-teams-legacy +func (m *ItemTeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Teamable) + } + } + return val, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-child-teams) endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *ItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *ItemTeamsRequestBuilder when successful +func (m *ItemTeamsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsRequestBuilder) { + return NewItemTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/teams/item_with_team_patch_request_body.go b/pkg/github/teams/item_with_team_patch_request_body.go new file mode 100644 index 0000000..f037c20 --- /dev/null +++ b/pkg/github/teams/item_with_team_patch_request_body.go @@ -0,0 +1,138 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemWithTeam_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The description of the team. + description *string + // The name of the team. + name *string + // The ID of a team to set as the parent team. + parent_team_id *int32 +} +// NewItemWithTeam_PatchRequestBody instantiates a new ItemWithTeam_PatchRequestBody and sets the default values. +func NewItemWithTeam_PatchRequestBody()(*ItemWithTeam_PatchRequestBody) { + m := &ItemWithTeam_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemWithTeam_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemWithTeam_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemWithTeam_PatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemWithTeam_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDescription gets the description property value. The description of the team. +// returns a *string when successful +func (m *ItemWithTeam_PatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemWithTeam_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parent_team_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetParentTeamId(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the team. +// returns a *string when successful +func (m *ItemWithTeam_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetParentTeamId gets the parent_team_id property value. The ID of a team to set as the parent team. +// returns a *int32 when successful +func (m *ItemWithTeam_PatchRequestBody) GetParentTeamId()(*int32) { + return m.parent_team_id +} +// Serialize serializes information the current object +func (m *ItemWithTeam_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("parent_team_id", m.GetParentTeamId()) + 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 *ItemWithTeam_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of the team. +func (m *ItemWithTeam_PatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of the team. +func (m *ItemWithTeam_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetParentTeamId sets the parent_team_id property value. The ID of a team to set as the parent team. +func (m *ItemWithTeam_PatchRequestBody) SetParentTeamId(value *int32)() { + m.parent_team_id = value +} +type ItemWithTeam_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetParentTeamId()(*int32) + SetDescription(value *string)() + SetName(value *string)() + SetParentTeamId(value *int32)() +} diff --git a/pkg/github/teams/teams_request_builder.go b/pkg/github/teams/teams_request_builder.go new file mode 100644 index 0000000..16c8c6e --- /dev/null +++ b/pkg/github/teams/teams_request_builder.go @@ -0,0 +1,35 @@ +package teams + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// TeamsRequestBuilder builds and executes requests for operations under \teams +type TeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTeam_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.teams.item collection +// Deprecated: +// returns a *WithTeam_ItemRequestBuilder when successful +func (m *TeamsRequestBuilder) ByTeam_id(team_id int32)(*WithTeam_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["team_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(team_id), 10) + return NewWithTeam_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewTeamsRequestBuilderInternal instantiates a new TeamsRequestBuilder and sets the default values. +func NewTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamsRequestBuilder) { + m := &TeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams", pathParameters), + } + return m +} +// NewTeamsRequestBuilder instantiates a new TeamsRequestBuilder and sets the default values. +func NewTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/teams/with_team_item_request_builder.go b/pkg/github/teams/with_team_item_request_builder.go new file mode 100644 index 0000000..251fc68 --- /dev/null +++ b/pkg/github/teams/with_team_item_request_builder.go @@ -0,0 +1,176 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithTeam_ItemRequestBuilder builds and executes requests for operations under \teams\{team_id} +type WithTeam_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithTeam_ItemRequestBuilderInternal instantiates a new WithTeam_ItemRequestBuilder and sets the default values. +func NewWithTeam_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithTeam_ItemRequestBuilder) { + m := &WithTeam_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team_id}", pathParameters), + } + return m +} +// NewWithTeam_ItemRequestBuilder instantiates a new WithTeam_ItemRequestBuilder and sets the default values. +func NewWithTeam_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithTeam_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithTeam_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#delete-a-team) endpoint.To delete a team, the authenticated user must be an organization owner or team maintainer.If you are an organization owner, deleting a parent team will delete all of its child teams as well. +// Deprecated: +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#delete-a-team-legacy +func (m *WithTeam_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Discussions the discussions property +// returns a *ItemDiscussionsRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Discussions()(*ItemDiscussionsRequestBuilder) { + return NewItemDiscussionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#get-a-team-by-name) endpoint. +// Deprecated: +// returns a TeamFullable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#get-a-team-legacy +func (m *WithTeam_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable), nil +} +// Invitations the invitations property +// returns a *ItemInvitationsRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Invitations()(*ItemInvitationsRequestBuilder) { + return NewItemInvitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Members the members property +// returns a *ItemMembersRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Members()(*ItemMembersRequestBuilder) { + return NewItemMembersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Memberships the memberships property +// returns a *ItemMembershipsRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Memberships()(*ItemMembershipsRequestBuilder) { + return NewItemMembershipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#update-a-team) endpoint.To edit a team, the authenticated user must either be an organization owner or a team maintainer.**Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. +// Deprecated: +// returns a TeamFullable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#update-a-team-legacy +func (m *WithTeam_ItemRequestBuilder) Patch(ctx context.Context, body ItemWithTeam_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable), nil +} +// Projects the projects property +// returns a *ItemProjectsRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Projects()(*ItemProjectsRequestBuilder) { + return NewItemProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repos the repos property +// returns a *ItemReposRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Repos()(*ItemReposRequestBuilder) { + return NewItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +// returns a *ItemTeamsRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) Teams()(*ItemTeamsRequestBuilder) { + return NewItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// TeamSync the teamSync property +// returns a *ItemTeamSyncRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) TeamSync()(*ItemTeamSyncRequestBuilder) { + return NewItemTeamSyncRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#delete-a-team) endpoint.To delete a team, the authenticated user must be an organization owner or team maintainer.If you are an organization owner, deleting a parent team will delete all of its child teams as well. +// Deprecated: +// returns a *RequestInformation when successful +func (m *WithTeam_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#get-a-team-by-name) endpoint. +// Deprecated: +// returns a *RequestInformation when successful +func (m *WithTeam_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#update-a-team) endpoint.To edit a team, the authenticated user must either be an organization owner or a team maintainer.**Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. +// Deprecated: +// returns a *RequestInformation when successful +func (m *WithTeam_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithTeam_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: +// returns a *WithTeam_ItemRequestBuilder when successful +func (m *WithTeam_ItemRequestBuilder) WithUrl(rawUrl string)(*WithTeam_ItemRequestBuilder) { + return NewWithTeam_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/blocks_request_builder.go b/pkg/github/user/blocks_request_builder.go new file mode 100644 index 0000000..9d829fe --- /dev/null +++ b/pkg/github/user/blocks_request_builder.go @@ -0,0 +1,87 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// BlocksRequestBuilder builds and executes requests for operations under \user\blocks +type BlocksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BlocksRequestBuilderGetQueryParameters list the users you've blocked on your personal account. +type BlocksRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.blocks.item collection +// returns a *BlocksWithUsernameItemRequestBuilder when successful +func (m *BlocksRequestBuilder) ByUsername(username string)(*BlocksWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewBlocksWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBlocksRequestBuilderInternal instantiates a new BlocksRequestBuilder and sets the default values. +func NewBlocksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BlocksRequestBuilder) { + m := &BlocksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/blocks{?page*,per_page*}", pathParameters), + } + return m +} +// NewBlocksRequestBuilder instantiates a new BlocksRequestBuilder and sets the default values. +func NewBlocksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BlocksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBlocksRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the users you've blocked on your personal account. +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/blocking#list-users-blocked-by-the-authenticated-user +func (m *BlocksRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[BlocksRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation list the users you've blocked on your personal account. +// returns a *RequestInformation when successful +func (m *BlocksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[BlocksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *BlocksRequestBuilder when successful +func (m *BlocksRequestBuilder) WithUrl(rawUrl string)(*BlocksRequestBuilder) { + return NewBlocksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/blocks_with_username_item_request_builder.go b/pkg/github/user/blocks_with_username_item_request_builder.go new file mode 100644 index 0000000..1917d2e --- /dev/null +++ b/pkg/github/user/blocks_with_username_item_request_builder.go @@ -0,0 +1,125 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// BlocksWithUsernameItemRequestBuilder builds and executes requests for operations under \user\blocks\{username} +type BlocksWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewBlocksWithUsernameItemRequestBuilderInternal instantiates a new BlocksWithUsernameItemRequestBuilder and sets the default values. +func NewBlocksWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BlocksWithUsernameItemRequestBuilder) { + m := &BlocksWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/blocks/{username}", pathParameters), + } + return m +} +// NewBlocksWithUsernameItemRequestBuilder instantiates a new BlocksWithUsernameItemRequestBuilder and sets the default values. +func NewBlocksWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BlocksWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBlocksWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete unblocks the given user and returns a 204. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/blocking#unblock-a-user +func (m *BlocksWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/blocking#check-if-a-user-is-blocked-by-the-authenticated-user +func (m *BlocksWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/blocking#block-a-user +func (m *BlocksWithUsernameItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation unblocks the given user and returns a 204. +// returns a *RequestInformation when successful +func (m *BlocksWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub. +// returns a *RequestInformation when successful +func (m *BlocksWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. +// returns a *RequestInformation when successful +func (m *BlocksWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *BlocksWithUsernameItemRequestBuilder when successful +func (m *BlocksWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*BlocksWithUsernameItemRequestBuilder) { + return NewBlocksWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go b/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go new file mode 100644 index 0000000..bebc89e --- /dev/null +++ b/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go @@ -0,0 +1,43 @@ +package codespaces +import ( + "errors" +) +// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. +type CodespacesPostRequestBodyMember1_geo int + +const ( + EUROPEWEST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO CodespacesPostRequestBodyMember1_geo = iota + SOUTHEASTASIA_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + USEAST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + USWEST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO +) + +func (i CodespacesPostRequestBodyMember1_geo) String() string { + return []string{"EuropeWest", "SoutheastAsia", "UsEast", "UsWest"}[i] +} +func ParseCodespacesPostRequestBodyMember1_geo(v string) (any, error) { + result := EUROPEWEST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + switch v { + case "EuropeWest": + result = EUROPEWEST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + case "SoutheastAsia": + result = SOUTHEASTASIA_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + case "UsEast": + result = USEAST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + case "UsWest": + result = USWEST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO + default: + return 0, errors.New("Unknown CodespacesPostRequestBodyMember1_geo value: " + v) + } + return &result, nil +} +func SerializeCodespacesPostRequestBodyMember1_geo(values []CodespacesPostRequestBodyMember1_geo) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespacesPostRequestBodyMember1_geo) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go b/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go new file mode 100644 index 0000000..91ffbe9 --- /dev/null +++ b/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go @@ -0,0 +1,43 @@ +package codespaces +import ( + "errors" +) +// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. +type CodespacesPostRequestBodyMember2_geo int + +const ( + EUROPEWEST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO CodespacesPostRequestBodyMember2_geo = iota + SOUTHEASTASIA_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + USEAST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + USWEST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO +) + +func (i CodespacesPostRequestBodyMember2_geo) String() string { + return []string{"EuropeWest", "SoutheastAsia", "UsEast", "UsWest"}[i] +} +func ParseCodespacesPostRequestBodyMember2_geo(v string) (any, error) { + result := EUROPEWEST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + switch v { + case "EuropeWest": + result = EUROPEWEST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + case "SoutheastAsia": + result = SOUTHEASTASIA_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + case "UsEast": + result = USEAST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + case "UsWest": + result = USWEST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO + default: + return 0, errors.New("Unknown CodespacesPostRequestBodyMember2_geo value: " + v) + } + return &result, nil +} +func SerializeCodespacesPostRequestBodyMember2_geo(values []CodespacesPostRequestBodyMember2_geo) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodespacesPostRequestBodyMember2_geo) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/codespaces_get_response.go b/pkg/github/user/codespaces_get_response.go new file mode 100644 index 0000000..bad0dd6 --- /dev/null +++ b/pkg/github/user/codespaces_get_response.go @@ -0,0 +1,122 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type CodespacesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The codespaces property + codespaces []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable + // The total_count property + total_count *int32 +} +// NewCodespacesGetResponse instantiates a new CodespacesGetResponse and sets the default values. +func NewCodespacesGetResponse()(*CodespacesGetResponse) { + m := &CodespacesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCodespaces gets the codespaces property value. The codespaces property +// returns a []Codespaceable when successful +func (m *CodespacesGetResponse) GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) { + return m.codespaces +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + } + } + m.SetCodespaces(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CodespacesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *CodespacesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCodespaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCodespaces())) + for i, v := range m.GetCodespaces() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("codespaces", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *CodespacesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCodespaces sets the codespaces property value. The codespaces property +func (m *CodespacesGetResponse) SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() { + m.codespaces = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CodespacesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type CodespacesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodespaces()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable) + GetTotalCount()(*int32) + SetCodespaces(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/user/codespaces_item_exports_request_builder.go b/pkg/github/user/codespaces_item_exports_request_builder.go new file mode 100644 index 0000000..d006c46 --- /dev/null +++ b/pkg/github/user/codespaces_item_exports_request_builder.go @@ -0,0 +1,81 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesItemExportsRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name}\exports +type CodespacesItemExportsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByExport_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.codespaces.item.exports.item collection +// returns a *CodespacesItemExportsWithExport_ItemRequestBuilder when successful +func (m *CodespacesItemExportsRequestBuilder) ByExport_id(export_id string)(*CodespacesItemExportsWithExport_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if export_id != "" { + urlTplParams["export_id"] = export_id + } + return NewCodespacesItemExportsWithExport_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCodespacesItemExportsRequestBuilderInternal instantiates a new CodespacesItemExportsRequestBuilder and sets the default values. +func NewCodespacesItemExportsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemExportsRequestBuilder) { + m := &CodespacesItemExportsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/exports", pathParameters), + } + return m +} +// NewCodespacesItemExportsRequestBuilder instantiates a new CodespacesItemExportsRequestBuilder and sets the default values. +func NewCodespacesItemExportsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemExportsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesItemExportsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespaceExportDetailsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user +func (m *CodespacesItemExportsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceExportDetailsable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceExportDetailsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceExportDetailsable), nil +} +// ToPostRequestInformation triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesItemExportsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesItemExportsRequestBuilder when successful +func (m *CodespacesItemExportsRequestBuilder) WithUrl(rawUrl string)(*CodespacesItemExportsRequestBuilder) { + return NewCodespacesItemExportsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_item_exports_with_export_item_request_builder.go b/pkg/github/user/codespaces_item_exports_with_export_item_request_builder.go new file mode 100644 index 0000000..d170fd3 --- /dev/null +++ b/pkg/github/user/codespaces_item_exports_with_export_item_request_builder.go @@ -0,0 +1,61 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesItemExportsWithExport_ItemRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name}\exports\{export_id} +type CodespacesItemExportsWithExport_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesItemExportsWithExport_ItemRequestBuilderInternal instantiates a new CodespacesItemExportsWithExport_ItemRequestBuilder and sets the default values. +func NewCodespacesItemExportsWithExport_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemExportsWithExport_ItemRequestBuilder) { + m := &CodespacesItemExportsWithExport_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/exports/{export_id}", pathParameters), + } + return m +} +// NewCodespacesItemExportsWithExport_ItemRequestBuilder instantiates a new CodespacesItemExportsWithExport_ItemRequestBuilder and sets the default values. +func NewCodespacesItemExportsWithExport_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemExportsWithExport_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesItemExportsWithExport_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets information about an export of a codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespaceExportDetailsable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#get-details-about-a-codespace-export +func (m *CodespacesItemExportsWithExport_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceExportDetailsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceExportDetailsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceExportDetailsable), nil +} +// ToGetRequestInformation gets information about an export of a codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesItemExportsWithExport_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesItemExportsWithExport_ItemRequestBuilder when successful +func (m *CodespacesItemExportsWithExport_ItemRequestBuilder) WithUrl(rawUrl string)(*CodespacesItemExportsWithExport_ItemRequestBuilder) { + return NewCodespacesItemExportsWithExport_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_item_machines_get_response.go b/pkg/github/user/codespaces_item_machines_get_response.go new file mode 100644 index 0000000..5361d98 --- /dev/null +++ b/pkg/github/user/codespaces_item_machines_get_response.go @@ -0,0 +1,122 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type CodespacesItemMachinesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The machines property + machines []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable + // The total_count property + total_count *int32 +} +// NewCodespacesItemMachinesGetResponse instantiates a new CodespacesItemMachinesGetResponse and sets the default values. +func NewCodespacesItemMachinesGetResponse()(*CodespacesItemMachinesGetResponse) { + m := &CodespacesItemMachinesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesItemMachinesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesItemMachinesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesItemMachinesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesItemMachinesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesItemMachinesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["machines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceMachineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable) + } + } + m.SetMachines(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetMachines gets the machines property value. The machines property +// returns a []CodespaceMachineable when successful +func (m *CodespacesItemMachinesGetResponse) GetMachines()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable) { + return m.machines +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CodespacesItemMachinesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *CodespacesItemMachinesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMachines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMachines())) + for i, v := range m.GetMachines() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("machines", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *CodespacesItemMachinesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMachines sets the machines property value. The machines property +func (m *CodespacesItemMachinesGetResponse) SetMachines(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable)() { + m.machines = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CodespacesItemMachinesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type CodespacesItemMachinesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMachines()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable) + GetTotalCount()(*int32) + SetMachines(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceMachineable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/user/codespaces_item_machines_request_builder.go b/pkg/github/user/codespaces_item_machines_request_builder.go new file mode 100644 index 0000000..e1f8139 --- /dev/null +++ b/pkg/github/user/codespaces_item_machines_request_builder.go @@ -0,0 +1,67 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesItemMachinesRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name}\machines +type CodespacesItemMachinesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesItemMachinesRequestBuilderInternal instantiates a new CodespacesItemMachinesRequestBuilder and sets the default values. +func NewCodespacesItemMachinesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemMachinesRequestBuilder) { + m := &CodespacesItemMachinesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/machines", pathParameters), + } + return m +} +// NewCodespacesItemMachinesRequestBuilder instantiates a new CodespacesItemMachinesRequestBuilder and sets the default values. +func NewCodespacesItemMachinesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemMachinesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesItemMachinesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the machine types a codespace can transition to use.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespacesItemMachinesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/machines#list-machine-types-for-a-codespace +func (m *CodespacesItemMachinesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(CodespacesItemMachinesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCodespacesItemMachinesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CodespacesItemMachinesGetResponseable), nil +} +// ToGetRequestInformation list the machine types a codespace can transition to use.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesItemMachinesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesItemMachinesRequestBuilder when successful +func (m *CodespacesItemMachinesRequestBuilder) WithUrl(rawUrl string)(*CodespacesItemMachinesRequestBuilder) { + return NewCodespacesItemMachinesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_item_publish_post_request_body.go b/pkg/github/user/codespaces_item_publish_post_request_body.go new file mode 100644 index 0000000..7f89447 --- /dev/null +++ b/pkg/github/user/codespaces_item_publish_post_request_body.go @@ -0,0 +1,109 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesItemPublishPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A name for the new repository. + name *string + // Whether the new repository should be private. + private *bool +} +// NewCodespacesItemPublishPostRequestBody instantiates a new CodespacesItemPublishPostRequestBody and sets the default values. +func NewCodespacesItemPublishPostRequestBody()(*CodespacesItemPublishPostRequestBody) { + m := &CodespacesItemPublishPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesItemPublishPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesItemPublishPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesItemPublishPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesItemPublishPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesItemPublishPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + return res +} +// GetName gets the name property value. A name for the new repository. +// returns a *string when successful +func (m *CodespacesItemPublishPostRequestBody) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Whether the new repository should be private. +// returns a *bool when successful +func (m *CodespacesItemPublishPostRequestBody) GetPrivate()(*bool) { + return m.private +} +// Serialize serializes information the current object +func (m *CodespacesItemPublishPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + 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 *CodespacesItemPublishPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. A name for the new repository. +func (m *CodespacesItemPublishPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Whether the new repository should be private. +func (m *CodespacesItemPublishPostRequestBody) SetPrivate(value *bool)() { + m.private = value +} +type CodespacesItemPublishPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetPrivate()(*bool) + SetName(value *string)() + SetPrivate(value *bool)() +} diff --git a/pkg/github/user/codespaces_item_publish_request_builder.go b/pkg/github/user/codespaces_item_publish_request_builder.go new file mode 100644 index 0000000..8fac336 --- /dev/null +++ b/pkg/github/user/codespaces_item_publish_request_builder.go @@ -0,0 +1,71 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesItemPublishRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name}\publish +type CodespacesItemPublishRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesItemPublishRequestBuilderInternal instantiates a new CodespacesItemPublishRequestBuilder and sets the default values. +func NewCodespacesItemPublishRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemPublishRequestBuilder) { + m := &CodespacesItemPublishRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/publish", pathParameters), + } + return m +} +// NewCodespacesItemPublishRequestBuilder instantiates a new CodespacesItemPublishRequestBuilder and sets the default values. +func NewCodespacesItemPublishRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemPublishRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesItemPublishRequestBuilderInternal(urlParams, requestAdapter) +} +// Post publishes an unpublished codespace, creating a new repository and assigning it to the codespace.The codespace's token is granted write permissions to the repository, allowing the user to push their changes.This will fail for a codespace that is already published, meaning it has an associated repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespaceWithFullRepositoryable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace +func (m *CodespacesItemPublishRequestBuilder) Post(ctx context.Context, body CodespacesItemPublishPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceWithFullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceWithFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespaceWithFullRepositoryable), nil +} +// ToPostRequestInformation publishes an unpublished codespace, creating a new repository and assigning it to the codespace.The codespace's token is granted write permissions to the repository, allowing the user to push their changes.This will fail for a codespace that is already published, meaning it has an associated repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesItemPublishRequestBuilder) ToPostRequestInformation(ctx context.Context, body CodespacesItemPublishPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesItemPublishRequestBuilder when successful +func (m *CodespacesItemPublishRequestBuilder) WithUrl(rawUrl string)(*CodespacesItemPublishRequestBuilder) { + return NewCodespacesItemPublishRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_item_start_request_builder.go b/pkg/github/user/codespaces_item_start_request_builder.go new file mode 100644 index 0000000..15deb55 --- /dev/null +++ b/pkg/github/user/codespaces_item_start_request_builder.go @@ -0,0 +1,73 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesItemStartRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name}\start +type CodespacesItemStartRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesItemStartRequestBuilderInternal instantiates a new CodespacesItemStartRequestBuilder and sets the default values. +func NewCodespacesItemStartRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemStartRequestBuilder) { + m := &CodespacesItemStartRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/start", pathParameters), + } + return m +} +// NewCodespacesItemStartRequestBuilder instantiates a new CodespacesItemStartRequestBuilder and sets the default values. +func NewCodespacesItemStartRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemStartRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesItemStartRequestBuilderInternal(urlParams, requestAdapter) +} +// Post starts a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 402 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#start-a-codespace-for-the-authenticated-user +func (m *CodespacesItemStartRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "402": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// ToPostRequestInformation starts a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesItemStartRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesItemStartRequestBuilder when successful +func (m *CodespacesItemStartRequestBuilder) WithUrl(rawUrl string)(*CodespacesItemStartRequestBuilder) { + return NewCodespacesItemStartRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_item_stop_request_builder.go b/pkg/github/user/codespaces_item_stop_request_builder.go new file mode 100644 index 0000000..ae3174f --- /dev/null +++ b/pkg/github/user/codespaces_item_stop_request_builder.go @@ -0,0 +1,67 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesItemStopRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name}\stop +type CodespacesItemStopRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesItemStopRequestBuilderInternal instantiates a new CodespacesItemStopRequestBuilder and sets the default values. +func NewCodespacesItemStopRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemStopRequestBuilder) { + m := &CodespacesItemStopRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/stop", pathParameters), + } + return m +} +// NewCodespacesItemStopRequestBuilder instantiates a new CodespacesItemStopRequestBuilder and sets the default values. +func NewCodespacesItemStopRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesItemStopRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesItemStopRequestBuilderInternal(urlParams, requestAdapter) +} +// Post stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#stop-a-codespace-for-the-authenticated-user +func (m *CodespacesItemStopRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// ToPostRequestInformation stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesItemStopRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesItemStopRequestBuilder when successful +func (m *CodespacesItemStopRequestBuilder) WithUrl(rawUrl string)(*CodespacesItemStopRequestBuilder) { + return NewCodespacesItemStopRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_item_with_codespace_name_delete_response.go b/pkg/github/user/codespaces_item_with_codespace_name_delete_response.go new file mode 100644 index 0000000..8cb0f6e --- /dev/null +++ b/pkg/github/user/codespaces_item_with_codespace_name_delete_response.go @@ -0,0 +1,51 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesItemWithCodespace_nameDeleteResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewCodespacesItemWithCodespace_nameDeleteResponse instantiates a new CodespacesItemWithCodespace_nameDeleteResponse and sets the default values. +func NewCodespacesItemWithCodespace_nameDeleteResponse()(*CodespacesItemWithCodespace_nameDeleteResponse) { + m := &CodespacesItemWithCodespace_nameDeleteResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesItemWithCodespace_nameDeleteResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesItemWithCodespace_nameDeleteResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesItemWithCodespace_nameDeleteResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesItemWithCodespace_nameDeleteResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesItemWithCodespace_nameDeleteResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *CodespacesItemWithCodespace_nameDeleteResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodespacesItemWithCodespace_nameDeleteResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type CodespacesItemWithCodespace_nameDeleteResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/user/codespaces_item_with_codespace_name_patch_request_body.go b/pkg/github/user/codespaces_item_with_codespace_name_patch_request_body.go new file mode 100644 index 0000000..09e4aa7 --- /dev/null +++ b/pkg/github/user/codespaces_item_with_codespace_name_patch_request_body.go @@ -0,0 +1,144 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesItemWithCodespace_namePatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Display name for this codespace + display_name *string + // A valid machine to transition this codespace to. + machine *string + // Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. + recent_folders []string +} +// NewCodespacesItemWithCodespace_namePatchRequestBody instantiates a new CodespacesItemWithCodespace_namePatchRequestBody and sets the default values. +func NewCodespacesItemWithCodespace_namePatchRequestBody()(*CodespacesItemWithCodespace_namePatchRequestBody) { + m := &CodespacesItemWithCodespace_namePatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesItemWithCodespace_namePatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesItemWithCodespace_namePatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesItemWithCodespace_namePatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesItemWithCodespace_namePatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the display_name property value. Display name for this codespace +// returns a *string when successful +func (m *CodespacesItemWithCodespace_namePatchRequestBody) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesItemWithCodespace_namePatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachine(val) + } + return nil + } + res["recent_folders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRecentFolders(res) + } + return nil + } + return res +} +// GetMachine gets the machine property value. A valid machine to transition this codespace to. +// returns a *string when successful +func (m *CodespacesItemWithCodespace_namePatchRequestBody) GetMachine()(*string) { + return m.machine +} +// GetRecentFolders gets the recent_folders property value. Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. +// returns a []string when successful +func (m *CodespacesItemWithCodespace_namePatchRequestBody) GetRecentFolders()([]string) { + return m.recent_folders +} +// Serialize serializes information the current object +func (m *CodespacesItemWithCodespace_namePatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + if m.GetRecentFolders() != nil { + err := writer.WriteCollectionOfStringValues("recent_folders", m.GetRecentFolders()) + 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 *CodespacesItemWithCodespace_namePatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the display_name property value. Display name for this codespace +func (m *CodespacesItemWithCodespace_namePatchRequestBody) SetDisplayName(value *string)() { + m.display_name = value +} +// SetMachine sets the machine property value. A valid machine to transition this codespace to. +func (m *CodespacesItemWithCodespace_namePatchRequestBody) SetMachine(value *string)() { + m.machine = value +} +// SetRecentFolders sets the recent_folders property value. Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. +func (m *CodespacesItemWithCodespace_namePatchRequestBody) SetRecentFolders(value []string)() { + m.recent_folders = value +} +type CodespacesItemWithCodespace_namePatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetMachine()(*string) + GetRecentFolders()([]string) + SetDisplayName(value *string)() + SetMachine(value *string)() + SetRecentFolders(value []string)() +} diff --git a/pkg/github/user/codespaces_post_request_body_member1.go b/pkg/github/user/codespaces_post_request_body_member1.go new file mode 100644 index 0000000..44060a3 --- /dev/null +++ b/pkg/github/user/codespaces_post_request_body_member1.go @@ -0,0 +1,370 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // IP for location auto-detection when proxying a request + client_ip *string + // Path to devcontainer.json config to use for this codespace + devcontainer_path *string + // Display name for this codespace + display_name *string + // Time in minutes before codespace stops from inactivity + idle_timeout_minutes *int32 + // The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. + location *string + // Machine type to use for this codespace + machine *string + // Whether to authorize requested permissions from devcontainer.json + multi_repo_permissions_opt_out *bool + // Git ref (typically a branch name) for this codespace + ref *string + // Repository id for this codespace + repository_id *int32 + // Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + retention_period_minutes *int32 + // Working directory for this codespace + working_directory *string +} +// NewCodespacesPostRequestBodyMember1 instantiates a new CodespacesPostRequestBodyMember1 and sets the default values. +func NewCodespacesPostRequestBodyMember1()(*CodespacesPostRequestBodyMember1) { + m := &CodespacesPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetClientIp gets the client_ip property value. IP for location auto-detection when proxying a request +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetClientIp()(*string) { + return m.client_ip +} +// GetDevcontainerPath gets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetDisplayName gets the display_name property value. Display name for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientIp(val) + } + return nil + } + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["idle_timeout_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutMinutes(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachine(val) + } + return nil + } + res["multi_repo_permissions_opt_out"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMultiRepoPermissionsOptOut(val) + } + return nil + } + res["ref"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRef(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + res["retention_period_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRetentionPeriodMinutes(val) + } + return nil + } + res["working_directory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkingDirectory(val) + } + return nil + } + return res +} +// GetIdleTimeoutMinutes gets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +// returns a *int32 when successful +func (m *CodespacesPostRequestBodyMember1) GetIdleTimeoutMinutes()(*int32) { + return m.idle_timeout_minutes +} +// GetLocation gets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetLocation()(*string) { + return m.location +} +// GetMachine gets the machine property value. Machine type to use for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetMachine()(*string) { + return m.machine +} +// GetMultiRepoPermissionsOptOut gets the multi_repo_permissions_opt_out property value. Whether to authorize requested permissions from devcontainer.json +// returns a *bool when successful +func (m *CodespacesPostRequestBodyMember1) GetMultiRepoPermissionsOptOut()(*bool) { + return m.multi_repo_permissions_opt_out +} +// GetRef gets the ref property value. Git ref (typically a branch name) for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetRef()(*string) { + return m.ref +} +// GetRepositoryId gets the repository_id property value. Repository id for this codespace +// returns a *int32 when successful +func (m *CodespacesPostRequestBodyMember1) GetRepositoryId()(*int32) { + return m.repository_id +} +// GetRetentionPeriodMinutes gets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +// returns a *int32 when successful +func (m *CodespacesPostRequestBodyMember1) GetRetentionPeriodMinutes()(*int32) { + return m.retention_period_minutes +} +// GetWorkingDirectory gets the working_directory property value. Working directory for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember1) GetWorkingDirectory()(*string) { + return m.working_directory +} +// Serialize serializes information the current object +func (m *CodespacesPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client_ip", m.GetClientIp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("idle_timeout_minutes", m.GetIdleTimeoutMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("multi_repo_permissions_opt_out", m.GetMultiRepoPermissionsOptOut()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ref", m.GetRef()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("retention_period_minutes", m.GetRetentionPeriodMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("working_directory", m.GetWorkingDirectory()) + 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 *CodespacesPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetClientIp sets the client_ip property value. IP for location auto-detection when proxying a request +func (m *CodespacesPostRequestBodyMember1) SetClientIp(value *string)() { + m.client_ip = value +} +// SetDevcontainerPath sets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +func (m *CodespacesPostRequestBodyMember1) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetDisplayName sets the display_name property value. Display name for this codespace +func (m *CodespacesPostRequestBodyMember1) SetDisplayName(value *string)() { + m.display_name = value +} +// SetIdleTimeoutMinutes sets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +func (m *CodespacesPostRequestBodyMember1) SetIdleTimeoutMinutes(value *int32)() { + m.idle_timeout_minutes = value +} +// SetLocation sets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +func (m *CodespacesPostRequestBodyMember1) SetLocation(value *string)() { + m.location = value +} +// SetMachine sets the machine property value. Machine type to use for this codespace +func (m *CodespacesPostRequestBodyMember1) SetMachine(value *string)() { + m.machine = value +} +// SetMultiRepoPermissionsOptOut sets the multi_repo_permissions_opt_out property value. Whether to authorize requested permissions from devcontainer.json +func (m *CodespacesPostRequestBodyMember1) SetMultiRepoPermissionsOptOut(value *bool)() { + m.multi_repo_permissions_opt_out = value +} +// SetRef sets the ref property value. Git ref (typically a branch name) for this codespace +func (m *CodespacesPostRequestBodyMember1) SetRef(value *string)() { + m.ref = value +} +// SetRepositoryId sets the repository_id property value. Repository id for this codespace +func (m *CodespacesPostRequestBodyMember1) SetRepositoryId(value *int32)() { + m.repository_id = value +} +// SetRetentionPeriodMinutes sets the retention_period_minutes property value. Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). +func (m *CodespacesPostRequestBodyMember1) SetRetentionPeriodMinutes(value *int32)() { + m.retention_period_minutes = value +} +// SetWorkingDirectory sets the working_directory property value. Working directory for this codespace +func (m *CodespacesPostRequestBodyMember1) SetWorkingDirectory(value *string)() { + m.working_directory = value +} +type CodespacesPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientIp()(*string) + GetDevcontainerPath()(*string) + GetDisplayName()(*string) + GetIdleTimeoutMinutes()(*int32) + GetLocation()(*string) + GetMachine()(*string) + GetMultiRepoPermissionsOptOut()(*bool) + GetRef()(*string) + GetRepositoryId()(*int32) + GetRetentionPeriodMinutes()(*int32) + GetWorkingDirectory()(*string) + SetClientIp(value *string)() + SetDevcontainerPath(value *string)() + SetDisplayName(value *string)() + SetIdleTimeoutMinutes(value *int32)() + SetLocation(value *string)() + SetMachine(value *string)() + SetMultiRepoPermissionsOptOut(value *bool)() + SetRef(value *string)() + SetRepositoryId(value *int32)() + SetRetentionPeriodMinutes(value *int32)() + SetWorkingDirectory(value *string)() +} diff --git a/pkg/github/user/codespaces_post_request_body_member2.go b/pkg/github/user/codespaces_post_request_body_member2.go new file mode 100644 index 0000000..d8962cc --- /dev/null +++ b/pkg/github/user/codespaces_post_request_body_member2.go @@ -0,0 +1,225 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesPostRequestBodyMember2 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Path to devcontainer.json config to use for this codespace + devcontainer_path *string + // Time in minutes before codespace stops from inactivity + idle_timeout_minutes *int32 + // The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. + location *string + // Machine type to use for this codespace + machine *string + // Pull request number for this codespace + pull_request CodespacesPostRequestBodyMember2_pull_requestable + // Working directory for this codespace + working_directory *string +} +// NewCodespacesPostRequestBodyMember2 instantiates a new CodespacesPostRequestBodyMember2 and sets the default values. +func NewCodespacesPostRequestBodyMember2()(*CodespacesPostRequestBodyMember2) { + m := &CodespacesPostRequestBodyMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesPostRequestBodyMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPostRequestBodyMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesPostRequestBodyMember2(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesPostRequestBodyMember2) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDevcontainerPath gets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember2) GetDevcontainerPath()(*string) { + return m.devcontainer_path +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPostRequestBodyMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["devcontainer_path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevcontainerPath(val) + } + return nil + } + res["idle_timeout_minutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeoutMinutes(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["machine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachine(val) + } + return nil + } + res["pull_request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodespacesPostRequestBodyMember2_pull_requestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPullRequest(val.(CodespacesPostRequestBodyMember2_pull_requestable)) + } + return nil + } + res["working_directory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkingDirectory(val) + } + return nil + } + return res +} +// GetIdleTimeoutMinutes gets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +// returns a *int32 when successful +func (m *CodespacesPostRequestBodyMember2) GetIdleTimeoutMinutes()(*int32) { + return m.idle_timeout_minutes +} +// GetLocation gets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember2) GetLocation()(*string) { + return m.location +} +// GetMachine gets the machine property value. Machine type to use for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember2) GetMachine()(*string) { + return m.machine +} +// GetPullRequest gets the pull_request property value. Pull request number for this codespace +// returns a CodespacesPostRequestBodyMember2_pull_requestable when successful +func (m *CodespacesPostRequestBodyMember2) GetPullRequest()(CodespacesPostRequestBodyMember2_pull_requestable) { + return m.pull_request +} +// GetWorkingDirectory gets the working_directory property value. Working directory for this codespace +// returns a *string when successful +func (m *CodespacesPostRequestBodyMember2) GetWorkingDirectory()(*string) { + return m.working_directory +} +// Serialize serializes information the current object +func (m *CodespacesPostRequestBodyMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("devcontainer_path", m.GetDevcontainerPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("idle_timeout_minutes", m.GetIdleTimeoutMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("machine", m.GetMachine()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pull_request", m.GetPullRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("working_directory", m.GetWorkingDirectory()) + 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 *CodespacesPostRequestBodyMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDevcontainerPath sets the devcontainer_path property value. Path to devcontainer.json config to use for this codespace +func (m *CodespacesPostRequestBodyMember2) SetDevcontainerPath(value *string)() { + m.devcontainer_path = value +} +// SetIdleTimeoutMinutes sets the idle_timeout_minutes property value. Time in minutes before codespace stops from inactivity +func (m *CodespacesPostRequestBodyMember2) SetIdleTimeoutMinutes(value *int32)() { + m.idle_timeout_minutes = value +} +// SetLocation sets the location property value. The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +func (m *CodespacesPostRequestBodyMember2) SetLocation(value *string)() { + m.location = value +} +// SetMachine sets the machine property value. Machine type to use for this codespace +func (m *CodespacesPostRequestBodyMember2) SetMachine(value *string)() { + m.machine = value +} +// SetPullRequest sets the pull_request property value. Pull request number for this codespace +func (m *CodespacesPostRequestBodyMember2) SetPullRequest(value CodespacesPostRequestBodyMember2_pull_requestable)() { + m.pull_request = value +} +// SetWorkingDirectory sets the working_directory property value. Working directory for this codespace +func (m *CodespacesPostRequestBodyMember2) SetWorkingDirectory(value *string)() { + m.working_directory = value +} +type CodespacesPostRequestBodyMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevcontainerPath()(*string) + GetIdleTimeoutMinutes()(*int32) + GetLocation()(*string) + GetMachine()(*string) + GetPullRequest()(CodespacesPostRequestBodyMember2_pull_requestable) + GetWorkingDirectory()(*string) + SetDevcontainerPath(value *string)() + SetIdleTimeoutMinutes(value *int32)() + SetLocation(value *string)() + SetMachine(value *string)() + SetPullRequest(value CodespacesPostRequestBodyMember2_pull_requestable)() + SetWorkingDirectory(value *string)() +} diff --git a/pkg/github/user/codespaces_post_request_body_member2_pull_request.go b/pkg/github/user/codespaces_post_request_body_member2_pull_request.go new file mode 100644 index 0000000..5d4e3b9 --- /dev/null +++ b/pkg/github/user/codespaces_post_request_body_member2_pull_request.go @@ -0,0 +1,110 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodespacesPostRequestBodyMember2_pull_request pull request number for this codespace +type CodespacesPostRequestBodyMember2_pull_request struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Pull request number + pull_request_number *int32 + // Repository id for this codespace + repository_id *int32 +} +// NewCodespacesPostRequestBodyMember2_pull_request instantiates a new CodespacesPostRequestBodyMember2_pull_request and sets the default values. +func NewCodespacesPostRequestBodyMember2_pull_request()(*CodespacesPostRequestBodyMember2_pull_request) { + m := &CodespacesPostRequestBodyMember2_pull_request{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesPostRequestBodyMember2_pull_requestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPostRequestBodyMember2_pull_requestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesPostRequestBodyMember2_pull_request(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesPostRequestBodyMember2_pull_request) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPostRequestBodyMember2_pull_request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestNumber(val) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetPullRequestNumber gets the pull_request_number property value. Pull request number +// returns a *int32 when successful +func (m *CodespacesPostRequestBodyMember2_pull_request) GetPullRequestNumber()(*int32) { + return m.pull_request_number +} +// GetRepositoryId gets the repository_id property value. Repository id for this codespace +// returns a *int32 when successful +func (m *CodespacesPostRequestBodyMember2_pull_request) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *CodespacesPostRequestBodyMember2_pull_request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("pull_request_number", m.GetPullRequestNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *CodespacesPostRequestBodyMember2_pull_request) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestNumber sets the pull_request_number property value. Pull request number +func (m *CodespacesPostRequestBodyMember2_pull_request) SetPullRequestNumber(value *int32)() { + m.pull_request_number = value +} +// SetRepositoryId sets the repository_id property value. Repository id for this codespace +func (m *CodespacesPostRequestBodyMember2_pull_request) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type CodespacesPostRequestBodyMember2_pull_requestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestNumber()(*int32) + GetRepositoryId()(*int32) + SetPullRequestNumber(value *int32)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/user/codespaces_request_builder.go b/pkg/github/user/codespaces_request_builder.go new file mode 100644 index 0000000..78ff79a --- /dev/null +++ b/pkg/github/user/codespaces_request_builder.go @@ -0,0 +1,254 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesRequestBuilder builds and executes requests for operations under \user\codespaces +type CodespacesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CodespacesPostRequestBody composed type wrapper for classes CodespacesPostRequestBodyMember1able, CodespacesPostRequestBodyMember2able +type CodespacesPostRequestBody struct { + // Composed type representation for type CodespacesPostRequestBodyMember1able + codespacesPostRequestBodyCodespacesPostRequestBodyMember1 CodespacesPostRequestBodyMember1able + // Composed type representation for type CodespacesPostRequestBodyMember2able + codespacesPostRequestBodyCodespacesPostRequestBodyMember2 CodespacesPostRequestBodyMember2able + // Composed type representation for type CodespacesPostRequestBodyMember1able + codespacesPostRequestBodyMember1 CodespacesPostRequestBodyMember1able + // Composed type representation for type CodespacesPostRequestBodyMember2able + codespacesPostRequestBodyMember2 CodespacesPostRequestBodyMember2able +} +// NewCodespacesPostRequestBody instantiates a new CodespacesPostRequestBody and sets the default values. +func NewCodespacesPostRequestBody()(*CodespacesPostRequestBody) { + m := &CodespacesPostRequestBody{ + } + return m +} +// CreateCodespacesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCodespacesPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1 gets the CodespacesPostRequestBodyMember1 property value. Composed type representation for type CodespacesPostRequestBodyMember1able +// returns a CodespacesPostRequestBodyMember1able when successful +func (m *CodespacesPostRequestBody) GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1()(CodespacesPostRequestBodyMember1able) { + return m.codespacesPostRequestBodyCodespacesPostRequestBodyMember1 +} +// GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2 gets the CodespacesPostRequestBodyMember2 property value. Composed type representation for type CodespacesPostRequestBodyMember2able +// returns a CodespacesPostRequestBodyMember2able when successful +func (m *CodespacesPostRequestBody) GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2()(CodespacesPostRequestBodyMember2able) { + return m.codespacesPostRequestBodyCodespacesPostRequestBodyMember2 +} +// GetCodespacesPostRequestBodyMember1 gets the CodespacesPostRequestBodyMember1 property value. Composed type representation for type CodespacesPostRequestBodyMember1able +// returns a CodespacesPostRequestBodyMember1able when successful +func (m *CodespacesPostRequestBody) GetCodespacesPostRequestBodyMember1()(CodespacesPostRequestBodyMember1able) { + return m.codespacesPostRequestBodyMember1 +} +// GetCodespacesPostRequestBodyMember2 gets the CodespacesPostRequestBodyMember2 property value. Composed type representation for type CodespacesPostRequestBodyMember2able +// returns a CodespacesPostRequestBodyMember2able when successful +func (m *CodespacesPostRequestBody) GetCodespacesPostRequestBodyMember2()(CodespacesPostRequestBodyMember2able) { + return m.codespacesPostRequestBodyMember2 +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CodespacesPostRequestBody) GetIsComposedType()(bool) { + return true +} +// Serialize serializes information the current object +func (m *CodespacesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2()) + if err != nil { + return err + } + } else if m.GetCodespacesPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetCodespacesPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetCodespacesPostRequestBodyMember2() != nil { + err := writer.WriteObjectValue("", m.GetCodespacesPostRequestBodyMember2()) + if err != nil { + return err + } + } + return nil +} +// SetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1 sets the CodespacesPostRequestBodyMember1 property value. Composed type representation for type CodespacesPostRequestBodyMember1able +func (m *CodespacesPostRequestBody) SetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1(value CodespacesPostRequestBodyMember1able)() { + m.codespacesPostRequestBodyCodespacesPostRequestBodyMember1 = value +} +// SetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2 sets the CodespacesPostRequestBodyMember2 property value. Composed type representation for type CodespacesPostRequestBodyMember2able +func (m *CodespacesPostRequestBody) SetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2(value CodespacesPostRequestBodyMember2able)() { + m.codespacesPostRequestBodyCodespacesPostRequestBodyMember2 = value +} +// SetCodespacesPostRequestBodyMember1 sets the CodespacesPostRequestBodyMember1 property value. Composed type representation for type CodespacesPostRequestBodyMember1able +func (m *CodespacesPostRequestBody) SetCodespacesPostRequestBodyMember1(value CodespacesPostRequestBodyMember1able)() { + m.codespacesPostRequestBodyMember1 = value +} +// SetCodespacesPostRequestBodyMember2 sets the CodespacesPostRequestBodyMember2 property value. Composed type representation for type CodespacesPostRequestBodyMember2able +func (m *CodespacesPostRequestBody) SetCodespacesPostRequestBodyMember2(value CodespacesPostRequestBodyMember2able)() { + m.codespacesPostRequestBodyMember2 = value +} +// CodespacesRequestBuilderGetQueryParameters lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +type CodespacesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // ID of the Repository to filter on + Repository_id *int32 `uriparametername:"repository_id"` +} +type CodespacesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1()(CodespacesPostRequestBodyMember1able) + GetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2()(CodespacesPostRequestBodyMember2able) + GetCodespacesPostRequestBodyMember1()(CodespacesPostRequestBodyMember1able) + GetCodespacesPostRequestBodyMember2()(CodespacesPostRequestBodyMember2able) + SetCodespacesPostRequestBodyCodespacesPostRequestBodyMember1(value CodespacesPostRequestBodyMember1able)() + SetCodespacesPostRequestBodyCodespacesPostRequestBodyMember2(value CodespacesPostRequestBodyMember2able)() + SetCodespacesPostRequestBodyMember1(value CodespacesPostRequestBodyMember1able)() + SetCodespacesPostRequestBodyMember2(value CodespacesPostRequestBodyMember2able)() +} +// ByCodespace_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.codespaces.item collection +// returns a *CodespacesWithCodespace_nameItemRequestBuilder when successful +func (m *CodespacesRequestBuilder) ByCodespace_name(codespace_name string)(*CodespacesWithCodespace_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if codespace_name != "" { + urlTplParams["codespace_name"] = codespace_name + } + return NewCodespacesWithCodespace_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCodespacesRequestBuilderInternal instantiates a new CodespacesRequestBuilder and sets the default values. +func NewCodespacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesRequestBuilder) { + m := &CodespacesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces{?page*,per_page*,repository_id*}", pathParameters), + } + return m +} +// NewCodespacesRequestBuilder instantiates a new CodespacesRequestBuilder and sets the default values. +func NewCodespacesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespacesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#list-codespaces-for-the-authenticated-user +func (m *CodespacesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CodespacesRequestBuilderGetQueryParameters])(CodespacesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCodespacesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CodespacesGetResponseable), nil +} +// Post creates a new codespace, owned by the authenticated user.This endpoint requires either a `repository_id` OR a `pull_request` but not both.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a Codespace503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#create-a-codespace-for-the-authenticated-user +func (m *CodespacesRequestBuilder) Post(ctx context.Context, body CodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "503": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespace503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// Secrets the secrets property +// returns a *CodespacesSecretsRequestBuilder when successful +func (m *CodespacesRequestBuilder) Secrets()(*CodespacesSecretsRequestBuilder) { + return NewCodespacesSecretsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CodespacesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new codespace, owned by the authenticated user.This endpoint requires either a `repository_id` OR a `pull_request` but not both.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesRequestBuilder) ToPostRequestInformation(ctx context.Context, body CodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesRequestBuilder when successful +func (m *CodespacesRequestBuilder) WithUrl(rawUrl string)(*CodespacesRequestBuilder) { + return NewCodespacesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_secrets_get_response.go b/pkg/github/user/codespaces_secrets_get_response.go new file mode 100644 index 0000000..135835b --- /dev/null +++ b/pkg/github/user/codespaces_secrets_get_response.go @@ -0,0 +1,122 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type CodespacesSecretsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The secrets property + secrets []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable + // The total_count property + total_count *int32 +} +// NewCodespacesSecretsGetResponse instantiates a new CodespacesSecretsGetResponse and sets the default values. +func NewCodespacesSecretsGetResponse()(*CodespacesSecretsGetResponse) { + m := &CodespacesSecretsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesSecretsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesSecretsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesSecretsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesSecretsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesSecretsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesSecretFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable) + } + } + m.SetSecrets(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetSecrets gets the secrets property value. The secrets property +// returns a []CodespacesSecretable when successful +func (m *CodespacesSecretsGetResponse) GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable) { + return m.secrets +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CodespacesSecretsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *CodespacesSecretsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSecrets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecrets())) + for i, v := range m.GetSecrets() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("secrets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *CodespacesSecretsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSecrets sets the secrets property value. The secrets property +func (m *CodespacesSecretsGetResponse) SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable)() { + m.secrets = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CodespacesSecretsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type CodespacesSecretsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSecrets()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable) + GetTotalCount()(*int32) + SetSecrets(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/user/codespaces_secrets_item_repositories_get_response.go b/pkg/github/user/codespaces_secrets_item_repositories_get_response.go new file mode 100644 index 0000000..03508ed --- /dev/null +++ b/pkg/github/user/codespaces_secrets_item_repositories_get_response.go @@ -0,0 +1,122 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type CodespacesSecretsItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable + // The total_count property + total_count *int32 +} +// NewCodespacesSecretsItemRepositoriesGetResponse instantiates a new CodespacesSecretsItemRepositoriesGetResponse and sets the default values. +func NewCodespacesSecretsItemRepositoriesGetResponse()(*CodespacesSecretsItemRepositoriesGetResponse) { + m := &CodespacesSecretsItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesSecretsItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesSecretsItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesSecretsItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesSecretsItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesSecretsItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []MinimalRepositoryable when successful +func (m *CodespacesSecretsItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) { + return m.repositories +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *CodespacesSecretsItemRepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *CodespacesSecretsItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *CodespacesSecretsItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *CodespacesSecretsItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() { + m.repositories = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *CodespacesSecretsItemRepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type CodespacesSecretsItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/user/codespaces_secrets_item_repositories_put_request_body.go b/pkg/github/user/codespaces_secrets_item_repositories_put_request_body.go new file mode 100644 index 0000000..cf0f440 --- /dev/null +++ b/pkg/github/user/codespaces_secrets_item_repositories_put_request_body.go @@ -0,0 +1,86 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesSecretsItemRepositoriesPutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. + selected_repository_ids []int32 +} +// NewCodespacesSecretsItemRepositoriesPutRequestBody instantiates a new CodespacesSecretsItemRepositoriesPutRequestBody and sets the default values. +func NewCodespacesSecretsItemRepositoriesPutRequestBody()(*CodespacesSecretsItemRepositoriesPutRequestBody) { + m := &CodespacesSecretsItemRepositoriesPutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesSecretsItemRepositoriesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesSecretsItemRepositoriesPutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesSecretsItemRepositoriesPutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesSecretsItemRepositoriesPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. +// returns a []int32 when successful +func (m *CodespacesSecretsItemRepositoriesPutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *CodespacesSecretsItemRepositoriesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *CodespacesSecretsItemRepositoriesPutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. +func (m *CodespacesSecretsItemRepositoriesPutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type CodespacesSecretsItemRepositoriesPutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/user/codespaces_secrets_item_repositories_request_builder.go b/pkg/github/user/codespaces_secrets_item_repositories_request_builder.go new file mode 100644 index 0000000..1db86cb --- /dev/null +++ b/pkg/github/user/codespaces_secrets_item_repositories_request_builder.go @@ -0,0 +1,115 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesSecretsItemRepositoriesRequestBuilder builds and executes requests for operations under \user\codespaces\secrets\{secret_name}\repositories +type CodespacesSecretsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.codespaces.secrets.item.repositories.item collection +// returns a *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *CodespacesSecretsItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCodespacesSecretsItemRepositoriesRequestBuilderInternal instantiates a new CodespacesSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewCodespacesSecretsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsItemRepositoriesRequestBuilder) { + m := &CodespacesSecretsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}/repositories", pathParameters), + } + return m +} +// NewCodespacesSecretsItemRepositoriesRequestBuilder instantiates a new CodespacesSecretsItemRepositoriesRequestBuilder and sets the default values. +func NewCodespacesSecretsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesSecretsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list the repositories that have been granted the ability to use a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a CodespacesSecretsItemRepositoriesGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret +func (m *CodespacesSecretsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(CodespacesSecretsItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCodespacesSecretsItemRepositoriesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CodespacesSecretsItemRepositoriesGetResponseable), nil +} +// Put select the repositories that will use a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#set-selected-repositories-for-a-user-secret +func (m *CodespacesSecretsItemRepositoriesRequestBuilder) Put(ctx context.Context, body CodespacesSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToGetRequestInformation list the repositories that have been granted the ability to use a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation select the repositories that will use a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body CodespacesSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesSecretsItemRepositoriesRequestBuilder when successful +func (m *CodespacesSecretsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*CodespacesSecretsItemRepositoriesRequestBuilder) { + return NewCodespacesSecretsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_secrets_item_repositories_with_repository_item_request_builder.go b/pkg/github/user/codespaces_secrets_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..60b0954 --- /dev/null +++ b/pkg/github/user/codespaces_secrets_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,96 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \user\codespaces\secrets\{secret_name}\repositories\{repository_id} +type CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a repository from the selected repositories for a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret +func (m *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put adds a repository to the selected repositories for a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret +func (m *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation removes a repository from the selected repositories for a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation adds a repository to the selected repositories for a user's development environment secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*CodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewCodespacesSecretsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_secrets_item_with_secret_name_put_request_body.go b/pkg/github/user/codespaces_secrets_item_with_secret_name_put_request_body.go new file mode 100644 index 0000000..a063c67 --- /dev/null +++ b/pkg/github/user/codespaces_secrets_item_with_secret_name_put_request_body.go @@ -0,0 +1,144 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodespacesSecretsItemWithSecret_namePutRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#get-public-key-for-the-authenticated-user) endpoint. + encrypted_value *string + // ID of the key you used to encrypt the secret. + key_id *string + // An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. + selected_repository_ids []int32 +} +// NewCodespacesSecretsItemWithSecret_namePutRequestBody instantiates a new CodespacesSecretsItemWithSecret_namePutRequestBody and sets the default values. +func NewCodespacesSecretsItemWithSecret_namePutRequestBody()(*CodespacesSecretsItemWithSecret_namePutRequestBody) { + m := &CodespacesSecretsItemWithSecret_namePutRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodespacesSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodespacesSecretsItemWithSecret_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodespacesSecretsItemWithSecret_namePutRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEncryptedValue gets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#get-public-key-for-the-authenticated-user) endpoint. +// returns a *string when successful +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) GetEncryptedValue()(*string) { + return m.encrypted_value +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encrypted_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedValue(val) + } + return nil + } + res["key_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetKeyId gets the key_id property value. ID of the key you used to encrypt the secret. +// returns a *string when successful +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) GetKeyId()(*string) { + return m.key_id +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. +// returns a []int32 when successful +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("encrypted_value", m.GetEncryptedValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("key_id", m.GetKeyId()) + if err != nil { + return err + } + } + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + 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 *CodespacesSecretsItemWithSecret_namePutRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEncryptedValue sets the encrypted_value property value. Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#get-public-key-for-the-authenticated-user) endpoint. +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) SetEncryptedValue(value *string)() { + m.encrypted_value = value +} +// SetKeyId sets the key_id property value. ID of the key you used to encrypt the secret. +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) SetKeyId(value *string)() { + m.key_id = value +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. +func (m *CodespacesSecretsItemWithSecret_namePutRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type CodespacesSecretsItemWithSecret_namePutRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedValue()(*string) + GetKeyId()(*string) + GetSelectedRepositoryIds()([]int32) + SetEncryptedValue(value *string)() + SetKeyId(value *string)() + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/user/codespaces_secrets_public_key_request_builder.go b/pkg/github/user/codespaces_secrets_public_key_request_builder.go new file mode 100644 index 0000000..97fa7fa --- /dev/null +++ b/pkg/github/user/codespaces_secrets_public_key_request_builder.go @@ -0,0 +1,57 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesSecretsPublicKeyRequestBuilder builds and executes requests for operations under \user\codespaces\secrets\public-key +type CodespacesSecretsPublicKeyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesSecretsPublicKeyRequestBuilderInternal instantiates a new CodespacesSecretsPublicKeyRequestBuilder and sets the default values. +func NewCodespacesSecretsPublicKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsPublicKeyRequestBuilder) { + m := &CodespacesSecretsPublicKeyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/secrets/public-key", pathParameters), + } + return m +} +// NewCodespacesSecretsPublicKeyRequestBuilder instantiates a new CodespacesSecretsPublicKeyRequestBuilder and sets the default values. +func NewCodespacesSecretsPublicKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsPublicKeyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesSecretsPublicKeyRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a CodespacesUserPublicKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#get-public-key-for-the-authenticated-user +func (m *CodespacesSecretsPublicKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesUserPublicKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesUserPublicKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesUserPublicKeyable), nil +} +// ToGetRequestInformation gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsPublicKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesSecretsPublicKeyRequestBuilder when successful +func (m *CodespacesSecretsPublicKeyRequestBuilder) WithUrl(rawUrl string)(*CodespacesSecretsPublicKeyRequestBuilder) { + return NewCodespacesSecretsPublicKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_secrets_request_builder.go b/pkg/github/user/codespaces_secrets_request_builder.go new file mode 100644 index 0000000..4785f6e --- /dev/null +++ b/pkg/github/user/codespaces_secrets_request_builder.go @@ -0,0 +1,80 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// CodespacesSecretsRequestBuilder builds and executes requests for operations under \user\codespaces\secrets +type CodespacesSecretsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CodespacesSecretsRequestBuilderGetQueryParameters lists all development environment secrets available for a user's codespaces without revealing theirencrypted values.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +type CodespacesSecretsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySecret_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.codespaces.secrets.item collection +// returns a *CodespacesSecretsWithSecret_nameItemRequestBuilder when successful +func (m *CodespacesSecretsRequestBuilder) BySecret_name(secret_name string)(*CodespacesSecretsWithSecret_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if secret_name != "" { + urlTplParams["secret_name"] = secret_name + } + return NewCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCodespacesSecretsRequestBuilderInternal instantiates a new CodespacesSecretsRequestBuilder and sets the default values. +func NewCodespacesSecretsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsRequestBuilder) { + m := &CodespacesSecretsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/secrets{?page*,per_page*}", pathParameters), + } + return m +} +// NewCodespacesSecretsRequestBuilder instantiates a new CodespacesSecretsRequestBuilder and sets the default values. +func NewCodespacesSecretsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesSecretsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all development environment secrets available for a user's codespaces without revealing theirencrypted values.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a CodespacesSecretsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#list-secrets-for-the-authenticated-user +func (m *CodespacesSecretsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CodespacesSecretsRequestBuilderGetQueryParameters])(CodespacesSecretsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCodespacesSecretsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CodespacesSecretsGetResponseable), nil +} +// PublicKey the publicKey property +// returns a *CodespacesSecretsPublicKeyRequestBuilder when successful +func (m *CodespacesSecretsRequestBuilder) PublicKey()(*CodespacesSecretsPublicKeyRequestBuilder) { + return NewCodespacesSecretsPublicKeyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists all development environment secrets available for a user's codespaces without revealing theirencrypted values.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[CodespacesSecretsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesSecretsRequestBuilder when successful +func (m *CodespacesSecretsRequestBuilder) WithUrl(rawUrl string)(*CodespacesSecretsRequestBuilder) { + return NewCodespacesSecretsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_secrets_with_secret_name_item_request_builder.go b/pkg/github/user/codespaces_secrets_with_secret_name_item_request_builder.go new file mode 100644 index 0000000..c79da28 --- /dev/null +++ b/pkg/github/user/codespaces_secrets_with_secret_name_item_request_builder.go @@ -0,0 +1,121 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesSecretsWithSecret_nameItemRequestBuilder builds and executes requests for operations under \user\codespaces\secrets\{secret_name} +type CodespacesSecretsWithSecret_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesSecretsWithSecret_nameItemRequestBuilderInternal instantiates a new CodespacesSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsWithSecret_nameItemRequestBuilder) { + m := &CodespacesSecretsWithSecret_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}", pathParameters), + } + return m +} +// NewCodespacesSecretsWithSecret_nameItemRequestBuilder instantiates a new CodespacesSecretsWithSecret_nameItemRequestBuilder and sets the default values. +func NewCodespacesSecretsWithSecret_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesSecretsWithSecret_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesSecretsWithSecret_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a development environment secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#delete-a-secret-for-the-authenticated-user +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a development environment secret available to a user's codespaces without revealing its encrypted value.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a CodespacesSecretable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#get-a-secret-for-the-authenticated-user +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespacesSecretFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CodespacesSecretable), nil +} +// Put creates or updates a development environment secret for a user's codespace with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a EmptyObjectable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/secrets#create-or-update-a-secret-for-the-authenticated-user +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) Put(ctx context.Context, body CodespacesSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmptyObjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.EmptyObjectable), nil +} +// Repositories the repositories property +// returns a *CodespacesSecretsItemRepositoriesRequestBuilder when successful +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) Repositories()(*CodespacesSecretsItemRepositoriesRequestBuilder) { + return NewCodespacesSecretsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a development environment secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a development environment secret available to a user's codespaces without revealing its encrypted value.The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation creates or updates a development environment secret for a user's codespace with an encrypted value. Encrypt your secret using[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)."The authenticated user must have Codespaces access to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body CodespacesSecretsItemWithSecret_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesSecretsWithSecret_nameItemRequestBuilder when successful +func (m *CodespacesSecretsWithSecret_nameItemRequestBuilder) WithUrl(rawUrl string)(*CodespacesSecretsWithSecret_nameItemRequestBuilder) { + return NewCodespacesSecretsWithSecret_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/codespaces_with_codespace_name_item_request_builder.go b/pkg/github/user/codespaces_with_codespace_name_item_request_builder.go new file mode 100644 index 0000000..eda97aa --- /dev/null +++ b/pkg/github/user/codespaces_with_codespace_name_item_request_builder.go @@ -0,0 +1,168 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// CodespacesWithCodespace_nameItemRequestBuilder builds and executes requests for operations under \user\codespaces\{codespace_name} +type CodespacesWithCodespace_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewCodespacesWithCodespace_nameItemRequestBuilderInternal instantiates a new CodespacesWithCodespace_nameItemRequestBuilder and sets the default values. +func NewCodespacesWithCodespace_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesWithCodespace_nameItemRequestBuilder) { + m := &CodespacesWithCodespace_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}", pathParameters), + } + return m +} +// NewCodespacesWithCodespace_nameItemRequestBuilder instantiates a new CodespacesWithCodespace_nameItemRequestBuilder and sets the default values. +func NewCodespacesWithCodespace_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CodespacesWithCodespace_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCodespacesWithCodespace_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a CodespacesItemWithCodespace_nameDeleteResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#delete-a-codespace-for-the-authenticated-user +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(CodespacesItemWithCodespace_nameDeleteResponseable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateCodespacesItemWithCodespace_nameDeleteResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(CodespacesItemWithCodespace_nameDeleteResponseable), nil +} +// Exports the exports property +// returns a *CodespacesItemExportsRequestBuilder when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Exports()(*CodespacesItemExportsRequestBuilder) { + return NewCodespacesItemExportsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get gets information about a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#get-a-codespace-for-the-authenticated-user +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "500": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// Machines the machines property +// returns a *CodespacesItemMachinesRequestBuilder when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Machines()(*CodespacesItemMachinesRequestBuilder) { + return NewCodespacesItemMachinesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.If you specify a new machine type it will be applied the next time your codespace is started.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a Codespaceable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/codespaces/codespaces#update-a-codespace-for-the-authenticated-user +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Patch(ctx context.Context, body CodespacesItemWithCodespace_namePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCodespaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Codespaceable), nil +} +// Publish the publish property +// returns a *CodespacesItemPublishRequestBuilder when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Publish()(*CodespacesItemPublishRequestBuilder) { + return NewCodespacesItemPublishRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Start the start property +// returns a *CodespacesItemStartRequestBuilder when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Start()(*CodespacesItemStartRequestBuilder) { + return NewCodespacesItemStartRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stop the stop property +// returns a *CodespacesItemStopRequestBuilder when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) Stop()(*CodespacesItemStopRequestBuilder) { + return NewCodespacesItemStopRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets information about a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.If you specify a new machine type it will be applied the next time your codespace is started.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body CodespacesItemWithCodespace_namePatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CodespacesWithCodespace_nameItemRequestBuilder when successful +func (m *CodespacesWithCodespace_nameItemRequestBuilder) WithUrl(rawUrl string)(*CodespacesWithCodespace_nameItemRequestBuilder) { + return NewCodespacesWithCodespace_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/docker_conflicts_request_builder.go b/pkg/github/user/docker_conflicts_request_builder.go new file mode 100644 index 0000000..b714296 --- /dev/null +++ b/pkg/github/user/docker_conflicts_request_builder.go @@ -0,0 +1,60 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// DockerConflictsRequestBuilder builds and executes requests for operations under \user\docker\conflicts +type DockerConflictsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewDockerConflictsRequestBuilderInternal instantiates a new DockerConflictsRequestBuilder and sets the default values. +func NewDockerConflictsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DockerConflictsRequestBuilder) { + m := &DockerConflictsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/docker/conflicts", pathParameters), + } + return m +} +// NewDockerConflictsRequestBuilder instantiates a new DockerConflictsRequestBuilder and sets the default values. +func NewDockerConflictsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DockerConflictsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDockerConflictsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. +// returns a []PackageEscapedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-authenticated-user +func (m *DockerConflictsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable) + } + } + return val, nil +} +// ToGetRequestInformation lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *DockerConflictsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *DockerConflictsRequestBuilder when successful +func (m *DockerConflictsRequestBuilder) WithUrl(rawUrl string)(*DockerConflictsRequestBuilder) { + return NewDockerConflictsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/docker_request_builder.go b/pkg/github/user/docker_request_builder.go new file mode 100644 index 0000000..b099b53 --- /dev/null +++ b/pkg/github/user/docker_request_builder.go @@ -0,0 +1,28 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// DockerRequestBuilder builds and executes requests for operations under \user\docker +type DockerRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Conflicts the conflicts property +// returns a *DockerConflictsRequestBuilder when successful +func (m *DockerRequestBuilder) Conflicts()(*DockerConflictsRequestBuilder) { + return NewDockerConflictsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewDockerRequestBuilderInternal instantiates a new DockerRequestBuilder and sets the default values. +func NewDockerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DockerRequestBuilder) { + m := &DockerRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/docker", pathParameters), + } + return m +} +// NewDockerRequestBuilder instantiates a new DockerRequestBuilder and sets the default values. +func NewDockerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DockerRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDockerRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go b/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go new file mode 100644 index 0000000..2bc1637 --- /dev/null +++ b/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go @@ -0,0 +1,37 @@ +package visibility +import ( + "errors" +) +// Denotes whether an email is publicly visible. +type VisibilityPatchRequestBody_visibility int + +const ( + PUBLIC_VISIBILITYPATCHREQUESTBODY_VISIBILITY VisibilityPatchRequestBody_visibility = iota + PRIVATE_VISIBILITYPATCHREQUESTBODY_VISIBILITY +) + +func (i VisibilityPatchRequestBody_visibility) String() string { + return []string{"public", "private"}[i] +} +func ParseVisibilityPatchRequestBody_visibility(v string) (any, error) { + result := PUBLIC_VISIBILITYPATCHREQUESTBODY_VISIBILITY + switch v { + case "public": + result = PUBLIC_VISIBILITYPATCHREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_VISIBILITYPATCHREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown VisibilityPatchRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeVisibilityPatchRequestBody_visibility(values []VisibilityPatchRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i VisibilityPatchRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/email_request_builder.go b/pkg/github/user/email_request_builder.go new file mode 100644 index 0000000..b9f58a2 --- /dev/null +++ b/pkg/github/user/email_request_builder.go @@ -0,0 +1,28 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// EmailRequestBuilder builds and executes requests for operations under \user\email +type EmailRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewEmailRequestBuilderInternal instantiates a new EmailRequestBuilder and sets the default values. +func NewEmailRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailRequestBuilder) { + m := &EmailRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/email", pathParameters), + } + return m +} +// NewEmailRequestBuilder instantiates a new EmailRequestBuilder and sets the default values. +func NewEmailRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEmailRequestBuilderInternal(urlParams, requestAdapter) +} +// Visibility the visibility property +// returns a *EmailVisibilityRequestBuilder when successful +func (m *EmailRequestBuilder) Visibility()(*EmailVisibilityRequestBuilder) { + return NewEmailVisibilityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/user/email_visibility_patch_request_body.go b/pkg/github/user/email_visibility_patch_request_body.go new file mode 100644 index 0000000..e34aa04 --- /dev/null +++ b/pkg/github/user/email_visibility_patch_request_body.go @@ -0,0 +1,51 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type EmailVisibilityPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewEmailVisibilityPatchRequestBody instantiates a new EmailVisibilityPatchRequestBody and sets the default values. +func NewEmailVisibilityPatchRequestBody()(*EmailVisibilityPatchRequestBody) { + m := &EmailVisibilityPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEmailVisibilityPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmailVisibilityPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailVisibilityPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EmailVisibilityPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmailVisibilityPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *EmailVisibilityPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *EmailVisibilityPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type EmailVisibilityPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/user/email_visibility_request_builder.go b/pkg/github/user/email_visibility_request_builder.go new file mode 100644 index 0000000..63493e7 --- /dev/null +++ b/pkg/github/user/email_visibility_request_builder.go @@ -0,0 +1,74 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// EmailVisibilityRequestBuilder builds and executes requests for operations under \user\email\visibility +type EmailVisibilityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewEmailVisibilityRequestBuilderInternal instantiates a new EmailVisibilityRequestBuilder and sets the default values. +func NewEmailVisibilityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailVisibilityRequestBuilder) { + m := &EmailVisibilityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/email/visibility", pathParameters), + } + return m +} +// NewEmailVisibilityRequestBuilder instantiates a new EmailVisibilityRequestBuilder and sets the default values. +func NewEmailVisibilityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailVisibilityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEmailVisibilityRequestBuilderInternal(urlParams, requestAdapter) +} +// Patch sets the visibility for your primary email addresses. +// returns a []Emailable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/emails#set-primary-email-visibility-for-the-authenticated-user +func (m *EmailVisibilityRequestBuilder) Patch(ctx context.Context, body EmailVisibilityPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmailFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable) + } + } + return val, nil +} +// ToPatchRequestInformation sets the visibility for your primary email addresses. +// returns a *RequestInformation when successful +func (m *EmailVisibilityRequestBuilder) ToPatchRequestInformation(ctx context.Context, body EmailVisibilityPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *EmailVisibilityRequestBuilder when successful +func (m *EmailVisibilityRequestBuilder) WithUrl(rawUrl string)(*EmailVisibilityRequestBuilder) { + return NewEmailVisibilityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/emails_delete_request_body_member1.go b/pkg/github/user/emails_delete_request_body_member1.go new file mode 100644 index 0000000..f9fc2a7 --- /dev/null +++ b/pkg/github/user/emails_delete_request_body_member1.go @@ -0,0 +1,87 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailsDeleteRequestBodyMember1 deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. +type EmailsDeleteRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Email addresses associated with the GitHub user account. + emails []string +} +// NewEmailsDeleteRequestBodyMember1 instantiates a new EmailsDeleteRequestBodyMember1 and sets the default values. +func NewEmailsDeleteRequestBodyMember1()(*EmailsDeleteRequestBodyMember1) { + m := &EmailsDeleteRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEmailsDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmailsDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailsDeleteRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EmailsDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmails gets the emails property value. Email addresses associated with the GitHub user account. +// returns a []string when successful +func (m *EmailsDeleteRequestBodyMember1) GetEmails()([]string) { + return m.emails +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmailsDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEmails(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EmailsDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEmails() != nil { + err := writer.WriteCollectionOfStringValues("emails", m.GetEmails()) + 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 *EmailsDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmails sets the emails property value. Email addresses associated with the GitHub user account. +func (m *EmailsDeleteRequestBodyMember1) SetEmails(value []string)() { + m.emails = value +} +type EmailsDeleteRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmails()([]string) + SetEmails(value []string)() +} diff --git a/pkg/github/user/emails_post_request_body_member1.go b/pkg/github/user/emails_post_request_body_member1.go new file mode 100644 index 0000000..a43702b --- /dev/null +++ b/pkg/github/user/emails_post_request_body_member1.go @@ -0,0 +1,86 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type EmailsPostRequestBodyMember1 struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + emails []string +} +// NewEmailsPostRequestBodyMember1 instantiates a new EmailsPostRequestBodyMember1 and sets the default values. +func NewEmailsPostRequestBodyMember1()(*EmailsPostRequestBodyMember1) { + m := &EmailsPostRequestBodyMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEmailsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmailsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailsPostRequestBodyMember1(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *EmailsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEmails gets the emails property value. Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. +// returns a []string when successful +func (m *EmailsPostRequestBodyMember1) GetEmails()([]string) { + return m.emails +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmailsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetEmails(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EmailsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEmails() != nil { + err := writer.WriteCollectionOfStringValues("emails", m.GetEmails()) + 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 *EmailsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEmails sets the emails property value. Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. +func (m *EmailsPostRequestBodyMember1) SetEmails(value []string)() { + m.emails = value +} +type EmailsPostRequestBodyMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmails()([]string) + SetEmails(value []string)() +} diff --git a/pkg/github/user/emails_request_builder.go b/pkg/github/user/emails_request_builder.go new file mode 100644 index 0000000..123030c --- /dev/null +++ b/pkg/github/user/emails_request_builder.go @@ -0,0 +1,417 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// EmailsRequestBuilder builds and executes requests for operations under \user\emails +type EmailsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EmailsDeleteRequestBody composed type wrapper for classes EmailsDeleteRequestBodyMember1able, string +type EmailsDeleteRequestBody struct { + // Composed type representation for type EmailsDeleteRequestBodyMember1able + emailsDeleteRequestBodyEmailsDeleteRequestBodyMember1 EmailsDeleteRequestBodyMember1able + // Composed type representation for type EmailsDeleteRequestBodyMember1able + emailsDeleteRequestBodyMember1 EmailsDeleteRequestBodyMember1able + // Composed type representation for type string + emailsDeleteRequestBodyString *string + // Composed type representation for type string + string *string +} +// NewEmailsDeleteRequestBody instantiates a new EmailsDeleteRequestBody and sets the default values. +func NewEmailsDeleteRequestBody()(*EmailsDeleteRequestBody) { + m := &EmailsDeleteRequestBody{ + } + return m +} +// CreateEmailsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmailsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewEmailsDeleteRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetEmailsDeleteRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1 gets the EmailsDeleteRequestBodyMember1 property value. Composed type representation for type EmailsDeleteRequestBodyMember1able +// returns a EmailsDeleteRequestBodyMember1able when successful +func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1()(EmailsDeleteRequestBodyMember1able) { + return m.emailsDeleteRequestBodyEmailsDeleteRequestBodyMember1 +} +// GetEmailsDeleteRequestBodyMember1 gets the EmailsDeleteRequestBodyMember1 property value. Composed type representation for type EmailsDeleteRequestBodyMember1able +// returns a EmailsDeleteRequestBodyMember1able when successful +func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyMember1()(EmailsDeleteRequestBodyMember1able) { + return m.emailsDeleteRequestBodyMember1 +} +// GetEmailsDeleteRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyString()(*string) { + return m.emailsDeleteRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmailsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *EmailsDeleteRequestBody) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *EmailsDeleteRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *EmailsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetEmailsDeleteRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetEmailsDeleteRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetEmailsDeleteRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetEmailsDeleteRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1 sets the EmailsDeleteRequestBodyMember1 property value. Composed type representation for type EmailsDeleteRequestBodyMember1able +func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1(value EmailsDeleteRequestBodyMember1able)() { + m.emailsDeleteRequestBodyEmailsDeleteRequestBodyMember1 = value +} +// SetEmailsDeleteRequestBodyMember1 sets the EmailsDeleteRequestBodyMember1 property value. Composed type representation for type EmailsDeleteRequestBodyMember1able +func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyMember1(value EmailsDeleteRequestBodyMember1able)() { + m.emailsDeleteRequestBodyMember1 = value +} +// SetEmailsDeleteRequestBodyString sets the string property value. Composed type representation for type string +func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyString(value *string)() { + m.emailsDeleteRequestBodyString = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *EmailsDeleteRequestBody) SetString(value *string)() { + m.string = value +} +// EmailsPostRequestBody composed type wrapper for classes EmailsPostRequestBodyMember1able, string +type EmailsPostRequestBody struct { + // Composed type representation for type EmailsPostRequestBodyMember1able + emailsPostRequestBodyEmailsPostRequestBodyMember1 EmailsPostRequestBodyMember1able + // Composed type representation for type EmailsPostRequestBodyMember1able + emailsPostRequestBodyMember1 EmailsPostRequestBodyMember1able + // Composed type representation for type string + emailsPostRequestBodyString *string + // Composed type representation for type string + string *string +} +// NewEmailsPostRequestBody instantiates a new EmailsPostRequestBody and sets the default values. +func NewEmailsPostRequestBody()(*EmailsPostRequestBody) { + m := &EmailsPostRequestBody{ + } + return m +} +// CreateEmailsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEmailsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewEmailsPostRequestBody() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetEmailsPostRequestBodyString(val) + } else if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetString(val) + } + return result, nil +} +// GetEmailsPostRequestBodyEmailsPostRequestBodyMember1 gets the EmailsPostRequestBodyMember1 property value. Composed type representation for type EmailsPostRequestBodyMember1able +// returns a EmailsPostRequestBodyMember1able when successful +func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyEmailsPostRequestBodyMember1()(EmailsPostRequestBodyMember1able) { + return m.emailsPostRequestBodyEmailsPostRequestBodyMember1 +} +// GetEmailsPostRequestBodyMember1 gets the EmailsPostRequestBodyMember1 property value. Composed type representation for type EmailsPostRequestBodyMember1able +// returns a EmailsPostRequestBodyMember1able when successful +func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyMember1()(EmailsPostRequestBodyMember1able) { + return m.emailsPostRequestBodyMember1 +} +// GetEmailsPostRequestBodyString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyString()(*string) { + return m.emailsPostRequestBodyString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EmailsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *EmailsPostRequestBody) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *EmailsPostRequestBody) GetString()(*string) { + return m.string +} +// Serialize serializes information the current object +func (m *EmailsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEmailsPostRequestBodyEmailsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetEmailsPostRequestBodyEmailsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetEmailsPostRequestBodyMember1() != nil { + err := writer.WriteObjectValue("", m.GetEmailsPostRequestBodyMember1()) + if err != nil { + return err + } + } else if m.GetEmailsPostRequestBodyString() != nil { + err := writer.WriteStringValue("", m.GetEmailsPostRequestBodyString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteStringValue("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetEmailsPostRequestBodyEmailsPostRequestBodyMember1 sets the EmailsPostRequestBodyMember1 property value. Composed type representation for type EmailsPostRequestBodyMember1able +func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyEmailsPostRequestBodyMember1(value EmailsPostRequestBodyMember1able)() { + m.emailsPostRequestBodyEmailsPostRequestBodyMember1 = value +} +// SetEmailsPostRequestBodyMember1 sets the EmailsPostRequestBodyMember1 property value. Composed type representation for type EmailsPostRequestBodyMember1able +func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyMember1(value EmailsPostRequestBodyMember1able)() { + m.emailsPostRequestBodyMember1 = value +} +// SetEmailsPostRequestBodyString sets the string property value. Composed type representation for type string +func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyString(value *string)() { + m.emailsPostRequestBodyString = value +} +// SetString sets the string property value. Composed type representation for type string +func (m *EmailsPostRequestBody) SetString(value *string)() { + m.string = value +} +// EmailsRequestBuilderGetQueryParameters lists all of your email addresses, and specifies which one is visibleto the public.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. +type EmailsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +type EmailsDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1()(EmailsDeleteRequestBodyMember1able) + GetEmailsDeleteRequestBodyMember1()(EmailsDeleteRequestBodyMember1able) + GetEmailsDeleteRequestBodyString()(*string) + GetString()(*string) + SetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1(value EmailsDeleteRequestBodyMember1able)() + SetEmailsDeleteRequestBodyMember1(value EmailsDeleteRequestBodyMember1able)() + SetEmailsDeleteRequestBodyString(value *string)() + SetString(value *string)() +} +type EmailsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailsPostRequestBodyEmailsPostRequestBodyMember1()(EmailsPostRequestBodyMember1able) + GetEmailsPostRequestBodyMember1()(EmailsPostRequestBodyMember1able) + GetEmailsPostRequestBodyString()(*string) + GetString()(*string) + SetEmailsPostRequestBodyEmailsPostRequestBodyMember1(value EmailsPostRequestBodyMember1able)() + SetEmailsPostRequestBodyMember1(value EmailsPostRequestBodyMember1able)() + SetEmailsPostRequestBodyString(value *string)() + SetString(value *string)() +} +// NewEmailsRequestBuilderInternal instantiates a new EmailsRequestBuilder and sets the default values. +func NewEmailsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailsRequestBuilder) { + m := &EmailsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/emails{?page*,per_page*}", pathParameters), + } + return m +} +// NewEmailsRequestBuilder instantiates a new EmailsRequestBuilder and sets the default values. +func NewEmailsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEmailsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete oAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/emails#delete-an-email-address-for-the-authenticated-user +func (m *EmailsRequestBuilder) Delete(ctx context.Context, body EmailsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get lists all of your email addresses, and specifies which one is visibleto the public.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. +// returns a []Emailable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/emails#list-email-addresses-for-the-authenticated-user +func (m *EmailsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[EmailsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmailFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable) + } + } + return val, nil +} +// Post oAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a []Emailable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/emails#add-an-email-address-for-the-authenticated-user +func (m *EmailsRequestBuilder) Post(ctx context.Context, body EmailsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmailFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable) + } + } + return val, nil +} +// ToDeleteRequestInformation oAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *EmailsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body EmailsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation lists all of your email addresses, and specifies which one is visibleto the public.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *EmailsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[EmailsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation oAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *EmailsRequestBuilder) ToPostRequestInformation(ctx context.Context, body EmailsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *EmailsRequestBuilder when successful +func (m *EmailsRequestBuilder) WithUrl(rawUrl string)(*EmailsRequestBuilder) { + return NewEmailsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/followers_request_builder.go b/pkg/github/user/followers_request_builder.go new file mode 100644 index 0000000..df5d535 --- /dev/null +++ b/pkg/github/user/followers_request_builder.go @@ -0,0 +1,73 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// FollowersRequestBuilder builds and executes requests for operations under \user\followers +type FollowersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// FollowersRequestBuilderGetQueryParameters lists the people following the authenticated user. +type FollowersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewFollowersRequestBuilderInternal instantiates a new FollowersRequestBuilder and sets the default values. +func NewFollowersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FollowersRequestBuilder) { + m := &FollowersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/followers{?page*,per_page*}", pathParameters), + } + return m +} +// NewFollowersRequestBuilder instantiates a new FollowersRequestBuilder and sets the default values. +func NewFollowersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FollowersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFollowersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the people following the authenticated user. +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#list-followers-of-the-authenticated-user +func (m *FollowersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[FollowersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the people following the authenticated user. +// returns a *RequestInformation when successful +func (m *FollowersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[FollowersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FollowersRequestBuilder when successful +func (m *FollowersRequestBuilder) WithUrl(rawUrl string)(*FollowersRequestBuilder) { + return NewFollowersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/following_request_builder.go b/pkg/github/user/following_request_builder.go new file mode 100644 index 0000000..5bb56d8 --- /dev/null +++ b/pkg/github/user/following_request_builder.go @@ -0,0 +1,85 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// FollowingRequestBuilder builds and executes requests for operations under \user\following +type FollowingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// FollowingRequestBuilderGetQueryParameters lists the people who the authenticated user follows. +type FollowingRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.following.item collection +// returns a *FollowingWithUsernameItemRequestBuilder when successful +func (m *FollowingRequestBuilder) ByUsername(username string)(*FollowingWithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewFollowingWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewFollowingRequestBuilderInternal instantiates a new FollowingRequestBuilder and sets the default values. +func NewFollowingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FollowingRequestBuilder) { + m := &FollowingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/following{?page*,per_page*}", pathParameters), + } + return m +} +// NewFollowingRequestBuilder instantiates a new FollowingRequestBuilder and sets the default values. +func NewFollowingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FollowingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFollowingRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the people who the authenticated user follows. +// returns a []SimpleUserable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#list-the-people-the-authenticated-user-follows +func (m *FollowingRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[FollowingRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the people who the authenticated user follows. +// returns a *RequestInformation when successful +func (m *FollowingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[FollowingRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FollowingRequestBuilder when successful +func (m *FollowingRequestBuilder) WithUrl(rawUrl string)(*FollowingRequestBuilder) { + return NewFollowingRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/following_with_username_item_request_builder.go b/pkg/github/user/following_with_username_item_request_builder.go new file mode 100644 index 0000000..1801558 --- /dev/null +++ b/pkg/github/user/following_with_username_item_request_builder.go @@ -0,0 +1,122 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// FollowingWithUsernameItemRequestBuilder builds and executes requests for operations under \user\following\{username} +type FollowingWithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewFollowingWithUsernameItemRequestBuilderInternal instantiates a new FollowingWithUsernameItemRequestBuilder and sets the default values. +func NewFollowingWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FollowingWithUsernameItemRequestBuilder) { + m := &FollowingWithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/following/{username}", pathParameters), + } + return m +} +// NewFollowingWithUsernameItemRequestBuilder instantiates a new FollowingWithUsernameItemRequestBuilder and sets the default values. +func NewFollowingWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FollowingWithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFollowingWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete oAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#unfollow-a-user +func (m *FollowingWithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get check if a person is followed by the authenticated user +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#check-if-a-person-is-followed-by-the-authenticated-user +func (m *FollowingWithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)."OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#follow-a-user +func (m *FollowingWithUsernameItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation oAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *FollowingWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *FollowingWithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)."OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *FollowingWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FollowingWithUsernameItemRequestBuilder when successful +func (m *FollowingWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*FollowingWithUsernameItemRequestBuilder) { + return NewFollowingWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/gpg_keys_post_request_body.go b/pkg/github/user/gpg_keys_post_request_body.go new file mode 100644 index 0000000..2e080f9 --- /dev/null +++ b/pkg/github/user/gpg_keys_post_request_body.go @@ -0,0 +1,109 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Gpg_keysPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A GPG key in ASCII-armored format. + armored_public_key *string + // A descriptive name for the new key. + name *string +} +// NewGpg_keysPostRequestBody instantiates a new Gpg_keysPostRequestBody and sets the default values. +func NewGpg_keysPostRequestBody()(*Gpg_keysPostRequestBody) { + m := &Gpg_keysPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateGpg_keysPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGpg_keysPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGpg_keysPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Gpg_keysPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetArmoredPublicKey gets the armored_public_key property value. A GPG key in ASCII-armored format. +// returns a *string when successful +func (m *Gpg_keysPostRequestBody) GetArmoredPublicKey()(*string) { + return m.armored_public_key +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Gpg_keysPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["armored_public_key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArmoredPublicKey(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 + } + return res +} +// GetName gets the name property value. A descriptive name for the new key. +// returns a *string when successful +func (m *Gpg_keysPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *Gpg_keysPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("armored_public_key", m.GetArmoredPublicKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *Gpg_keysPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetArmoredPublicKey sets the armored_public_key property value. A GPG key in ASCII-armored format. +func (m *Gpg_keysPostRequestBody) SetArmoredPublicKey(value *string)() { + m.armored_public_key = value +} +// SetName sets the name property value. A descriptive name for the new key. +func (m *Gpg_keysPostRequestBody) SetName(value *string)() { + m.name = value +} +type Gpg_keysPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArmoredPublicKey()(*string) + GetName()(*string) + SetArmoredPublicKey(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/user/gpg_keys_request_builder.go b/pkg/github/user/gpg_keys_request_builder.go new file mode 100644 index 0000000..dcc3fa1 --- /dev/null +++ b/pkg/github/user/gpg_keys_request_builder.go @@ -0,0 +1,127 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Gpg_keysRequestBuilder builds and executes requests for operations under \user\gpg_keys +type Gpg_keysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Gpg_keysRequestBuilderGetQueryParameters lists the current user's GPG keys.OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. +type Gpg_keysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByGpg_key_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.gpg_keys.item collection +// returns a *Gpg_keysWithGpg_key_ItemRequestBuilder when successful +func (m *Gpg_keysRequestBuilder) ByGpg_key_id(gpg_key_id int32)(*Gpg_keysWithGpg_key_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["gpg_key_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(gpg_key_id), 10) + return NewGpg_keysWithGpg_key_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewGpg_keysRequestBuilderInternal instantiates a new Gpg_keysRequestBuilder and sets the default values. +func NewGpg_keysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Gpg_keysRequestBuilder) { + m := &Gpg_keysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/gpg_keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewGpg_keysRequestBuilder instantiates a new Gpg_keysRequestBuilder and sets the default values. +func NewGpg_keysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Gpg_keysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGpg_keysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the current user's GPG keys.OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. +// returns a []GpgKeyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/gpg-keys#list-gpg-keys-for-the-authenticated-user +func (m *Gpg_keysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Gpg_keysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGpgKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable) + } + } + return val, nil +} +// Post adds a GPG key to the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. +// returns a GpgKeyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/gpg-keys#create-a-gpg-key-for-the-authenticated-user +func (m *Gpg_keysRequestBuilder) Post(ctx context.Context, body Gpg_keysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGpgKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable), nil +} +// ToGetRequestInformation lists the current user's GPG keys.OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Gpg_keysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Gpg_keysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation adds a GPG key to the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Gpg_keysRequestBuilder) ToPostRequestInformation(ctx context.Context, body Gpg_keysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Gpg_keysRequestBuilder when successful +func (m *Gpg_keysRequestBuilder) WithUrl(rawUrl string)(*Gpg_keysRequestBuilder) { + return NewGpg_keysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/gpg_keys_with_gpg_key_item_request_builder.go b/pkg/github/user/gpg_keys_with_gpg_key_item_request_builder.go new file mode 100644 index 0000000..2c47182 --- /dev/null +++ b/pkg/github/user/gpg_keys_with_gpg_key_item_request_builder.go @@ -0,0 +1,98 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Gpg_keysWithGpg_key_ItemRequestBuilder builds and executes requests for operations under \user\gpg_keys\{gpg_key_id} +type Gpg_keysWithGpg_key_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewGpg_keysWithGpg_key_ItemRequestBuilderInternal instantiates a new Gpg_keysWithGpg_key_ItemRequestBuilder and sets the default values. +func NewGpg_keysWithGpg_key_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Gpg_keysWithGpg_key_ItemRequestBuilder) { + m := &Gpg_keysWithGpg_key_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/gpg_keys/{gpg_key_id}", pathParameters), + } + return m +} +// NewGpg_keysWithGpg_key_ItemRequestBuilder instantiates a new Gpg_keysWithGpg_key_ItemRequestBuilder and sets the default values. +func NewGpg_keysWithGpg_key_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Gpg_keysWithGpg_key_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGpg_keysWithGpg_key_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a GPG key from the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/gpg-keys#delete-a-gpg-key-for-the-authenticated-user +func (m *Gpg_keysWithGpg_key_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get view extended details for a single GPG key.OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. +// returns a GpgKeyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/gpg-keys#get-a-gpg-key-for-the-authenticated-user +func (m *Gpg_keysWithGpg_key_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGpgKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable), nil +} +// ToDeleteRequestInformation removes a GPG key from the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Gpg_keysWithGpg_key_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation view extended details for a single GPG key.OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Gpg_keysWithGpg_key_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Gpg_keysWithGpg_key_ItemRequestBuilder when successful +func (m *Gpg_keysWithGpg_key_ItemRequestBuilder) WithUrl(rawUrl string)(*Gpg_keysWithGpg_key_ItemRequestBuilder) { + return NewGpg_keysWithGpg_key_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/installations_get_response.go b/pkg/github/user/installations_get_response.go new file mode 100644 index 0000000..4c2c0e1 --- /dev/null +++ b/pkg/github/user/installations_get_response.go @@ -0,0 +1,122 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type InstallationsGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The installations property + installations []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable + // The total_count property + total_count *int32 +} +// NewInstallationsGetResponse instantiates a new InstallationsGetResponse and sets the default values. +func NewInstallationsGetResponse()(*InstallationsGetResponse) { + m := &InstallationsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInstallationsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstallationsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstallationsGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *InstallationsGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *InstallationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["installations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) + } + } + m.SetInstallations(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetInstallations gets the installations property value. The installations property +// returns a []Installationable when successful +func (m *InstallationsGetResponse) GetInstallations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) { + return m.installations +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *InstallationsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *InstallationsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInstallations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstallations())) + for i, v := range m.GetInstallations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("installations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *InstallationsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetInstallations sets the installations property value. The installations property +func (m *InstallationsGetResponse) SetInstallations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable)() { + m.installations = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *InstallationsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type InstallationsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInstallations()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable) + GetTotalCount()(*int32) + SetInstallations(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/user/installations_item_repositories_get_response.go b/pkg/github/user/installations_item_repositories_get_response.go new file mode 100644 index 0000000..50ef68d --- /dev/null +++ b/pkg/github/user/installations_item_repositories_get_response.go @@ -0,0 +1,151 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type InstallationsItemRepositoriesGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The repositories property + repositories []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable + // The repository_selection property + repository_selection *string + // The total_count property + total_count *int32 +} +// NewInstallationsItemRepositoriesGetResponse instantiates a new InstallationsItemRepositoriesGetResponse and sets the default values. +func NewInstallationsItemRepositoriesGetResponse()(*InstallationsItemRepositoriesGetResponse) { + m := &InstallationsItemRepositoriesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInstallationsItemRepositoriesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInstallationsItemRepositoriesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstallationsItemRepositoriesGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *InstallationsItemRepositoriesGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *InstallationsItemRepositoriesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_selection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositorySelection(val) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []Repositoryable when successful +func (m *InstallationsItemRepositoriesGetResponse) GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) { + return m.repositories +} +// GetRepositorySelection gets the repository_selection property value. The repository_selection property +// returns a *string when successful +func (m *InstallationsItemRepositoriesGetResponse) GetRepositorySelection()(*string) { + return m.repository_selection +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *InstallationsItemRepositoriesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *InstallationsItemRepositoriesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repository_selection", m.GetRepositorySelection()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *InstallationsItemRepositoriesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *InstallationsItemRepositoriesGetResponse) SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable)() { + m.repositories = value +} +// SetRepositorySelection sets the repository_selection property value. The repository_selection property +func (m *InstallationsItemRepositoriesGetResponse) SetRepositorySelection(value *string)() { + m.repository_selection = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *InstallationsItemRepositoriesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type InstallationsItemRepositoriesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + GetRepositorySelection()(*string) + GetTotalCount()(*int32) + SetRepositories(value []i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable)() + SetRepositorySelection(value *string)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/user/installations_item_repositories_request_builder.go b/pkg/github/user/installations_item_repositories_request_builder.go new file mode 100644 index 0000000..317e168 --- /dev/null +++ b/pkg/github/user/installations_item_repositories_request_builder.go @@ -0,0 +1,81 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsItemRepositoriesRequestBuilder builds and executes requests for operations under \user\installations\{installation_id}\repositories +type InstallationsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// InstallationsItemRepositoriesRequestBuilderGetQueryParameters list repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.The access the user has to each repository is included in the hash under the `permissions` key. +type InstallationsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByRepository_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.installations.item.repositories.item collection +// returns a *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *InstallationsItemRepositoriesRequestBuilder) ByRepository_id(repository_id int32)(*InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["repository_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(repository_id), 10) + return NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewInstallationsItemRepositoriesRequestBuilderInternal instantiates a new InstallationsItemRepositoriesRequestBuilder and sets the default values. +func NewInstallationsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemRepositoriesRequestBuilder) { + m := &InstallationsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/installations/{installation_id}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewInstallationsItemRepositoriesRequestBuilder instantiates a new InstallationsItemRepositoriesRequestBuilder and sets the default values. +func NewInstallationsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.The access the user has to each repository is included in the hash under the `permissions` key. +// returns a InstallationsItemRepositoriesGetResponseable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/installations#list-repositories-accessible-to-the-user-access-token +func (m *InstallationsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationsItemRepositoriesRequestBuilderGetQueryParameters])(InstallationsItemRepositoriesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateInstallationsItemRepositoriesGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(InstallationsItemRepositoriesGetResponseable), nil +} +// ToGetRequestInformation list repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.The access the user has to each repository is included in the hash under the `permissions` key. +// returns a *RequestInformation when successful +func (m *InstallationsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsItemRepositoriesRequestBuilder when successful +func (m *InstallationsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*InstallationsItemRepositoriesRequestBuilder) { + return NewInstallationsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/installations_item_repositories_with_repository_item_request_builder.go b/pkg/github/user/installations_item_repositories_with_repository_item_request_builder.go new file mode 100644 index 0000000..360181a --- /dev/null +++ b/pkg/github/user/installations_item_repositories_with_repository_item_request_builder.go @@ -0,0 +1,88 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsItemRepositoriesWithRepository_ItemRequestBuilder builds and executes requests for operations under \user\installations\{installation_id}\repositories\{repository_id} +type InstallationsItemRepositoriesWithRepository_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilderInternal instantiates a new InstallationsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) { + m := &InstallationsItemRepositoriesWithRepository_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/installations/{installation_id}/repositories/{repository_id}", pathParameters), + } + return m +} +// NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilder instantiates a new InstallationsItemRepositoriesWithRepository_ItemRequestBuilder and sets the default values. +func NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. This endpoint only works for PATs (classic) with the `repo` scope. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/installations#remove-a-repository-from-an-app-installation +func (m *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put add a single repository to an installation. The authenticated user must have admin access to the repository. This endpoint only works for PATs (classic) with the `repo` scope. +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/installations#add-a-repository-to-an-app-installation +func (m *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`. This endpoint only works for PATs (classic) with the `repo` scope. +// returns a *RequestInformation when successful +func (m *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation add a single repository to an installation. The authenticated user must have admin access to the repository. This endpoint only works for PATs (classic) with the `repo` scope. +// returns a *RequestInformation when successful +func (m *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder when successful +func (m *InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) WithUrl(rawUrl string)(*InstallationsItemRepositoriesWithRepository_ItemRequestBuilder) { + return NewInstallationsItemRepositoriesWithRepository_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/installations_request_builder.go b/pkg/github/user/installations_request_builder.go new file mode 100644 index 0000000..7a1651d --- /dev/null +++ b/pkg/github/user/installations_request_builder.go @@ -0,0 +1,81 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InstallationsRequestBuilder builds and executes requests for operations under \user\installations +type InstallationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// InstallationsRequestBuilderGetQueryParameters lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.You can find the permissions for the installation under the `permissions` key. +type InstallationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByInstallation_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.installations.item collection +// returns a *InstallationsWithInstallation_ItemRequestBuilder when successful +func (m *InstallationsRequestBuilder) ByInstallation_id(installation_id int32)(*InstallationsWithInstallation_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["installation_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(installation_id), 10) + return NewInstallationsWithInstallation_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewInstallationsRequestBuilderInternal instantiates a new InstallationsRequestBuilder and sets the default values. +func NewInstallationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsRequestBuilder) { + m := &InstallationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/installations{?page*,per_page*}", pathParameters), + } + return m +} +// NewInstallationsRequestBuilder instantiates a new InstallationsRequestBuilder and sets the default values. +func NewInstallationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.You can find the permissions for the installation under the `permissions` key. +// returns a InstallationsGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/installations#list-app-installations-accessible-to-the-user-access-token +func (m *InstallationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationsRequestBuilderGetQueryParameters])(InstallationsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateInstallationsGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(InstallationsGetResponseable), nil +} +// ToGetRequestInformation lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.You can find the permissions for the installation under the `permissions` key. +// returns a *RequestInformation when successful +func (m *InstallationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[InstallationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InstallationsRequestBuilder when successful +func (m *InstallationsRequestBuilder) WithUrl(rawUrl string)(*InstallationsRequestBuilder) { + return NewInstallationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/installations_with_installation_item_request_builder.go b/pkg/github/user/installations_with_installation_item_request_builder.go new file mode 100644 index 0000000..e69d370 --- /dev/null +++ b/pkg/github/user/installations_with_installation_item_request_builder.go @@ -0,0 +1,28 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// InstallationsWithInstallation_ItemRequestBuilder builds and executes requests for operations under \user\installations\{installation_id} +type InstallationsWithInstallation_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewInstallationsWithInstallation_ItemRequestBuilderInternal instantiates a new InstallationsWithInstallation_ItemRequestBuilder and sets the default values. +func NewInstallationsWithInstallation_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsWithInstallation_ItemRequestBuilder) { + m := &InstallationsWithInstallation_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/installations/{installation_id}", pathParameters), + } + return m +} +// NewInstallationsWithInstallation_ItemRequestBuilder instantiates a new InstallationsWithInstallation_ItemRequestBuilder and sets the default values. +func NewInstallationsWithInstallation_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InstallationsWithInstallation_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInstallationsWithInstallation_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Repositories the repositories property +// returns a *InstallationsItemRepositoriesRequestBuilder when successful +func (m *InstallationsWithInstallation_ItemRequestBuilder) Repositories()(*InstallationsItemRepositoriesRequestBuilder) { + return NewInstallationsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/user/interaction_limits_request_builder.go b/pkg/github/user/interaction_limits_request_builder.go new file mode 100644 index 0000000..b87de6d --- /dev/null +++ b/pkg/github/user/interaction_limits_request_builder.go @@ -0,0 +1,114 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// InteractionLimitsRequestBuilder builds and executes requests for operations under \user\interaction-limits +type InteractionLimitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewInteractionLimitsRequestBuilderInternal instantiates a new InteractionLimitsRequestBuilder and sets the default values. +func NewInteractionLimitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InteractionLimitsRequestBuilder) { + m := &InteractionLimitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/interaction-limits", pathParameters), + } + return m +} +// NewInteractionLimitsRequestBuilder instantiates a new InteractionLimitsRequestBuilder and sets the default values. +func NewInteractionLimitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*InteractionLimitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewInteractionLimitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes any interaction restrictions from your public repositories. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/user#remove-interaction-restrictions-from-your-public-repositories +func (m *InteractionLimitsRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get shows which type of GitHub user can interact with your public repositories and when the restriction expires. +// returns a InteractionLimitResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/user#get-interaction-restrictions-for-your-public-repositories +func (m *InteractionLimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInteractionLimitResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable), nil +} +// Put temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. +// returns a InteractionLimitResponseable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/interactions/user#set-interaction-restrictions-for-your-public-repositories +func (m *InteractionLimitsRequestBuilder) Put(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInteractionLimitResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitResponseable), nil +} +// ToDeleteRequestInformation removes any interaction restrictions from your public repositories. +// returns a *RequestInformation when successful +func (m *InteractionLimitsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation shows which type of GitHub user can interact with your public repositories and when the restriction expires. +// returns a *RequestInformation when successful +func (m *InteractionLimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. +// returns a *RequestInformation when successful +func (m *InteractionLimitsRequestBuilder) ToPutRequestInformation(ctx context.Context, body i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.InteractionLimitable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *InteractionLimitsRequestBuilder when successful +func (m *InteractionLimitsRequestBuilder) WithUrl(rawUrl string)(*InteractionLimitsRequestBuilder) { + return NewInteractionLimitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/issues/get_direction_query_parameter_type.go b/pkg/github/user/issues/get_direction_query_parameter_type.go new file mode 100644 index 0000000..6aca6ec --- /dev/null +++ b/pkg/github/user/issues/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package issues +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/issues/get_filter_query_parameter_type.go b/pkg/github/user/issues/get_filter_query_parameter_type.go new file mode 100644 index 0000000..bd35fa0 --- /dev/null +++ b/pkg/github/user/issues/get_filter_query_parameter_type.go @@ -0,0 +1,48 @@ +package issues +import ( + "errors" +) +type GetFilterQueryParameterType int + +const ( + ASSIGNED_GETFILTERQUERYPARAMETERTYPE GetFilterQueryParameterType = iota + CREATED_GETFILTERQUERYPARAMETERTYPE + MENTIONED_GETFILTERQUERYPARAMETERTYPE + SUBSCRIBED_GETFILTERQUERYPARAMETERTYPE + REPOS_GETFILTERQUERYPARAMETERTYPE + ALL_GETFILTERQUERYPARAMETERTYPE +) + +func (i GetFilterQueryParameterType) String() string { + return []string{"assigned", "created", "mentioned", "subscribed", "repos", "all"}[i] +} +func ParseGetFilterQueryParameterType(v string) (any, error) { + result := ASSIGNED_GETFILTERQUERYPARAMETERTYPE + switch v { + case "assigned": + result = ASSIGNED_GETFILTERQUERYPARAMETERTYPE + case "created": + result = CREATED_GETFILTERQUERYPARAMETERTYPE + case "mentioned": + result = MENTIONED_GETFILTERQUERYPARAMETERTYPE + case "subscribed": + result = SUBSCRIBED_GETFILTERQUERYPARAMETERTYPE + case "repos": + result = REPOS_GETFILTERQUERYPARAMETERTYPE + case "all": + result = ALL_GETFILTERQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetFilterQueryParameterType(values []GetFilterQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetFilterQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/issues/get_sort_query_parameter_type.go b/pkg/github/user/issues/get_sort_query_parameter_type.go new file mode 100644 index 0000000..ba962ac --- /dev/null +++ b/pkg/github/user/issues/get_sort_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + COMMENTS_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "comments"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "comments": + result = COMMENTS_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/issues/get_state_query_parameter_type.go b/pkg/github/user/issues/get_state_query_parameter_type.go new file mode 100644 index 0000000..5541510 --- /dev/null +++ b/pkg/github/user/issues/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package issues +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/issues_request_builder.go b/pkg/github/user/issues_request_builder.go new file mode 100644 index 0000000..31e1fd8 --- /dev/null +++ b/pkg/github/user/issues_request_builder.go @@ -0,0 +1,85 @@ +package user + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i733f9ebf17e6dda0b0aad599060aa6fea3a4a4e7cc6e57356c3f2101628dfc4f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user/issues" +) + +// IssuesRequestBuilder builds and executes requests for operations under \user\issues +type IssuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// IssuesRequestBuilderGetQueryParameters list issues across owned and member repositories assigned to the authenticated user.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type IssuesRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i733f9ebf17e6dda0b0aad599060aa6fea3a4a4e7cc6e57356c3f2101628dfc4f.GetDirectionQueryParameterType `uriparametername:"direction"` + // Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. + Filter *i733f9ebf17e6dda0b0aad599060aa6fea3a4a4e7cc6e57356c3f2101628dfc4f.GetFilterQueryParameterType `uriparametername:"filter"` + // A list of comma separated label names. Example: `bug,ui,@high` + Labels *string `uriparametername:"labels"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // What to sort results by. + Sort *i733f9ebf17e6dda0b0aad599060aa6fea3a4a4e7cc6e57356c3f2101628dfc4f.GetSortQueryParameterType `uriparametername:"sort"` + // Indicates the state of the issues to return. + State *i733f9ebf17e6dda0b0aad599060aa6fea3a4a4e7cc6e57356c3f2101628dfc4f.GetStateQueryParameterType `uriparametername:"state"` +} +// NewIssuesRequestBuilderInternal instantiates a new IssuesRequestBuilder and sets the default values. +func NewIssuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { + m := &IssuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/issues{?direction*,filter*,labels*,page*,per_page*,since*,sort*,state*}", pathParameters), + } + return m +} +// NewIssuesRequestBuilder instantiates a new IssuesRequestBuilder and sets the default values. +func NewIssuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewIssuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list issues across owned and member repositories assigned to the authenticated user.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []Issueable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/issues/issues#list-user-account-issues-assigned-to-the-authenticated-user +func (m *IssuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Issueable) + } + } + return val, nil +} +// ToGetRequestInformation list issues across owned and member repositories assigned to the authenticated user.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#list-pull-requests)" endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *IssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *IssuesRequestBuilder when successful +func (m *IssuesRequestBuilder) WithUrl(rawUrl string)(*IssuesRequestBuilder) { + return NewIssuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/keys_post_request_body.go b/pkg/github/user/keys_post_request_body.go new file mode 100644 index 0000000..be7c1d2 --- /dev/null +++ b/pkg/github/user/keys_post_request_body.go @@ -0,0 +1,109 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type KeysPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The public SSH key to add to your GitHub account. + key *string + // A descriptive name for the new key. + title *string +} +// NewKeysPostRequestBody instantiates a new KeysPostRequestBody and sets the default values. +func NewKeysPostRequestBody()(*KeysPostRequestBody) { + m := &KeysPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateKeysPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateKeysPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeysPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *KeysPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *KeysPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The public SSH key to add to your GitHub account. +// returns a *string when successful +func (m *KeysPostRequestBody) GetKey()(*string) { + return m.key +} +// GetTitle gets the title property value. A descriptive name for the new key. +// returns a *string when successful +func (m *KeysPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *KeysPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *KeysPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The public SSH key to add to your GitHub account. +func (m *KeysPostRequestBody) SetKey(value *string)() { + m.key = value +} +// SetTitle sets the title property value. A descriptive name for the new key. +func (m *KeysPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type KeysPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetTitle()(*string) + SetKey(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/user/keys_request_builder.go b/pkg/github/user/keys_request_builder.go new file mode 100644 index 0000000..8c45832 --- /dev/null +++ b/pkg/github/user/keys_request_builder.go @@ -0,0 +1,127 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// KeysRequestBuilder builds and executes requests for operations under \user\keys +type KeysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// KeysRequestBuilderGetQueryParameters lists the public SSH keys for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. +type KeysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByKey_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.keys.item collection +// returns a *KeysWithKey_ItemRequestBuilder when successful +func (m *KeysRequestBuilder) ByKey_id(key_id int32)(*KeysWithKey_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["key_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(key_id), 10) + return NewKeysWithKey_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewKeysRequestBuilderInternal instantiates a new KeysRequestBuilder and sets the default values. +func NewKeysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*KeysRequestBuilder) { + m := &KeysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewKeysRequestBuilder instantiates a new KeysRequestBuilder and sets the default values. +func NewKeysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*KeysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewKeysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the public SSH keys for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. +// returns a []Keyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/keys#list-public-ssh-keys-for-the-authenticated-user +func (m *KeysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[KeysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable) + } + } + return val, nil +} +// Post adds a public SSH key to the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. +// returns a Keyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/keys#create-a-public-ssh-key-for-the-authenticated-user +func (m *KeysRequestBuilder) Post(ctx context.Context, body KeysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable), nil +} +// ToGetRequestInformation lists the public SSH keys for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *KeysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[KeysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation adds a public SSH key to the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *KeysRequestBuilder) ToPostRequestInformation(ctx context.Context, body KeysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *KeysRequestBuilder when successful +func (m *KeysRequestBuilder) WithUrl(rawUrl string)(*KeysRequestBuilder) { + return NewKeysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/keys_with_key_item_request_builder.go b/pkg/github/user/keys_with_key_item_request_builder.go new file mode 100644 index 0000000..a602c89 --- /dev/null +++ b/pkg/github/user/keys_with_key_item_request_builder.go @@ -0,0 +1,96 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// KeysWithKey_ItemRequestBuilder builds and executes requests for operations under \user\keys\{key_id} +type KeysWithKey_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewKeysWithKey_ItemRequestBuilderInternal instantiates a new KeysWithKey_ItemRequestBuilder and sets the default values. +func NewKeysWithKey_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*KeysWithKey_ItemRequestBuilder) { + m := &KeysWithKey_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/keys/{key_id}", pathParameters), + } + return m +} +// NewKeysWithKey_ItemRequestBuilder instantiates a new KeysWithKey_ItemRequestBuilder and sets the default values. +func NewKeysWithKey_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*KeysWithKey_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewKeysWithKey_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete removes a public SSH key from the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/keys#delete-a-public-ssh-key-for-the-authenticated-user +func (m *KeysWithKey_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get view extended details for a single public SSH key.OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. +// returns a Keyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/keys#get-a-public-ssh-key-for-the-authenticated-user +func (m *KeysWithKey_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Keyable), nil +} +// ToDeleteRequestInformation removes a public SSH key from the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *KeysWithKey_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation view extended details for a single public SSH key.OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *KeysWithKey_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *KeysWithKey_ItemRequestBuilder when successful +func (m *KeysWithKey_ItemRequestBuilder) WithUrl(rawUrl string)(*KeysWithKey_ItemRequestBuilder) { + return NewKeysWithKey_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/marketplace_purchases_request_builder.go b/pkg/github/user/marketplace_purchases_request_builder.go new file mode 100644 index 0000000..294b450 --- /dev/null +++ b/pkg/github/user/marketplace_purchases_request_builder.go @@ -0,0 +1,78 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Marketplace_purchasesRequestBuilder builds and executes requests for operations under \user\marketplace_purchases +type Marketplace_purchasesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Marketplace_purchasesRequestBuilderGetQueryParameters lists the active subscriptions for the authenticated user. +type Marketplace_purchasesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewMarketplace_purchasesRequestBuilderInternal instantiates a new Marketplace_purchasesRequestBuilder and sets the default values. +func NewMarketplace_purchasesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Marketplace_purchasesRequestBuilder) { + m := &Marketplace_purchasesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/marketplace_purchases{?page*,per_page*}", pathParameters), + } + return m +} +// NewMarketplace_purchasesRequestBuilder instantiates a new Marketplace_purchasesRequestBuilder and sets the default values. +func NewMarketplace_purchasesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Marketplace_purchasesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMarketplace_purchasesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the active subscriptions for the authenticated user. +// returns a []UserMarketplacePurchaseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#list-subscriptions-for-the-authenticated-user +func (m *Marketplace_purchasesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Marketplace_purchasesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserMarketplacePurchaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateUserMarketplacePurchaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserMarketplacePurchaseable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserMarketplacePurchaseable) + } + } + return val, nil +} +// Stubbed the stubbed property +// returns a *Marketplace_purchasesStubbedRequestBuilder when successful +func (m *Marketplace_purchasesRequestBuilder) Stubbed()(*Marketplace_purchasesStubbedRequestBuilder) { + return NewMarketplace_purchasesStubbedRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation lists the active subscriptions for the authenticated user. +// returns a *RequestInformation when successful +func (m *Marketplace_purchasesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Marketplace_purchasesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Marketplace_purchasesRequestBuilder when successful +func (m *Marketplace_purchasesRequestBuilder) WithUrl(rawUrl string)(*Marketplace_purchasesRequestBuilder) { + return NewMarketplace_purchasesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/marketplace_purchases_stubbed_request_builder.go b/pkg/github/user/marketplace_purchases_stubbed_request_builder.go new file mode 100644 index 0000000..4251414 --- /dev/null +++ b/pkg/github/user/marketplace_purchases_stubbed_request_builder.go @@ -0,0 +1,71 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Marketplace_purchasesStubbedRequestBuilder builds and executes requests for operations under \user\marketplace_purchases\stubbed +type Marketplace_purchasesStubbedRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Marketplace_purchasesStubbedRequestBuilderGetQueryParameters lists the active subscriptions for the authenticated user. +type Marketplace_purchasesStubbedRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewMarketplace_purchasesStubbedRequestBuilderInternal instantiates a new Marketplace_purchasesStubbedRequestBuilder and sets the default values. +func NewMarketplace_purchasesStubbedRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Marketplace_purchasesStubbedRequestBuilder) { + m := &Marketplace_purchasesStubbedRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/marketplace_purchases/stubbed{?page*,per_page*}", pathParameters), + } + return m +} +// NewMarketplace_purchasesStubbedRequestBuilder instantiates a new Marketplace_purchasesStubbedRequestBuilder and sets the default values. +func NewMarketplace_purchasesStubbedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Marketplace_purchasesStubbedRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMarketplace_purchasesStubbedRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the active subscriptions for the authenticated user. +// returns a []UserMarketplacePurchaseable when successful +// returns a BasicError error when the service returns a 401 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/marketplace#list-subscriptions-for-the-authenticated-user-stubbed +func (m *Marketplace_purchasesStubbedRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Marketplace_purchasesStubbedRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserMarketplacePurchaseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateUserMarketplacePurchaseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserMarketplacePurchaseable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.UserMarketplacePurchaseable) + } + } + return val, nil +} +// ToGetRequestInformation lists the active subscriptions for the authenticated user. +// returns a *RequestInformation when successful +func (m *Marketplace_purchasesStubbedRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Marketplace_purchasesStubbedRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Marketplace_purchasesStubbedRequestBuilder when successful +func (m *Marketplace_purchasesStubbedRequestBuilder) WithUrl(rawUrl string)(*Marketplace_purchasesStubbedRequestBuilder) { + return NewMarketplace_purchasesStubbedRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go b/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go new file mode 100644 index 0000000..d160652 --- /dev/null +++ b/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go @@ -0,0 +1,36 @@ +package orgs +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + ACTIVE_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + PENDING_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"active", "pending"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := ACTIVE_GETSTATEQUERYPARAMETERTYPE + switch v { + case "active": + result = ACTIVE_GETSTATEQUERYPARAMETERTYPE + case "pending": + result = PENDING_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go b/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go new file mode 100644 index 0000000..ba2ff30 --- /dev/null +++ b/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go @@ -0,0 +1,34 @@ +package item +import ( + "errors" +) +// The state that the membership should be in. Only `"active"` will be accepted. +type WithOrgPatchRequestBody_state int + +const ( + ACTIVE_WITHORGPATCHREQUESTBODY_STATE WithOrgPatchRequestBody_state = iota +) + +func (i WithOrgPatchRequestBody_state) String() string { + return []string{"active"}[i] +} +func ParseWithOrgPatchRequestBody_state(v string) (any, error) { + result := ACTIVE_WITHORGPATCHREQUESTBODY_STATE + switch v { + case "active": + result = ACTIVE_WITHORGPATCHREQUESTBODY_STATE + default: + return 0, errors.New("Unknown WithOrgPatchRequestBody_state value: " + v) + } + return &result, nil +} +func SerializeWithOrgPatchRequestBody_state(values []WithOrgPatchRequestBody_state) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithOrgPatchRequestBody_state) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/memberships_orgs_item_with_org_patch_request_body.go b/pkg/github/user/memberships_orgs_item_with_org_patch_request_body.go new file mode 100644 index 0000000..1fc6deb --- /dev/null +++ b/pkg/github/user/memberships_orgs_item_with_org_patch_request_body.go @@ -0,0 +1,51 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MembershipsOrgsItemWithOrgPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewMembershipsOrgsItemWithOrgPatchRequestBody instantiates a new MembershipsOrgsItemWithOrgPatchRequestBody and sets the default values. +func NewMembershipsOrgsItemWithOrgPatchRequestBody()(*MembershipsOrgsItemWithOrgPatchRequestBody) { + m := &MembershipsOrgsItemWithOrgPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMembershipsOrgsItemWithOrgPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMembershipsOrgsItemWithOrgPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembershipsOrgsItemWithOrgPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MembershipsOrgsItemWithOrgPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MembershipsOrgsItemWithOrgPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *MembershipsOrgsItemWithOrgPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MembershipsOrgsItemWithOrgPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type MembershipsOrgsItemWithOrgPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/user/memberships_orgs_request_builder.go b/pkg/github/user/memberships_orgs_request_builder.go new file mode 100644 index 0000000..2f8274f --- /dev/null +++ b/pkg/github/user/memberships_orgs_request_builder.go @@ -0,0 +1,90 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + iab218f191aab400be8a49163b913210d4aca678e9cf94f280e6e9fa5d4aefc8d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user/memberships/orgs" +) + +// MembershipsOrgsRequestBuilder builds and executes requests for operations under \user\memberships\orgs +type MembershipsOrgsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MembershipsOrgsRequestBuilderGetQueryParameters lists all of the authenticated user's organization memberships. +type MembershipsOrgsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. + State *iab218f191aab400be8a49163b913210d4aca678e9cf94f280e6e9fa5d4aefc8d.GetStateQueryParameterType `uriparametername:"state"` +} +// ByOrg gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.memberships.orgs.item collection +// returns a *MembershipsOrgsWithOrgItemRequestBuilder when successful +func (m *MembershipsOrgsRequestBuilder) ByOrg(org string)(*MembershipsOrgsWithOrgItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if org != "" { + urlTplParams["org"] = org + } + return NewMembershipsOrgsWithOrgItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMembershipsOrgsRequestBuilderInternal instantiates a new MembershipsOrgsRequestBuilder and sets the default values. +func NewMembershipsOrgsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MembershipsOrgsRequestBuilder) { + m := &MembershipsOrgsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/memberships/orgs{?page*,per_page*,state*}", pathParameters), + } + return m +} +// NewMembershipsOrgsRequestBuilder instantiates a new MembershipsOrgsRequestBuilder and sets the default values. +func NewMembershipsOrgsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MembershipsOrgsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMembershipsOrgsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all of the authenticated user's organization memberships. +// returns a []OrgMembershipable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#list-organization-memberships-for-the-authenticated-user +func (m *MembershipsOrgsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MembershipsOrgsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable) + } + } + return val, nil +} +// ToGetRequestInformation lists all of the authenticated user's organization memberships. +// returns a *RequestInformation when successful +func (m *MembershipsOrgsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MembershipsOrgsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MembershipsOrgsRequestBuilder when successful +func (m *MembershipsOrgsRequestBuilder) WithUrl(rawUrl string)(*MembershipsOrgsRequestBuilder) { + return NewMembershipsOrgsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/memberships_orgs_with_org_item_request_builder.go b/pkg/github/user/memberships_orgs_with_org_item_request_builder.go new file mode 100644 index 0000000..9856dfe --- /dev/null +++ b/pkg/github/user/memberships_orgs_with_org_item_request_builder.go @@ -0,0 +1,102 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MembershipsOrgsWithOrgItemRequestBuilder builds and executes requests for operations under \user\memberships\orgs\{org} +type MembershipsOrgsWithOrgItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMembershipsOrgsWithOrgItemRequestBuilderInternal instantiates a new MembershipsOrgsWithOrgItemRequestBuilder and sets the default values. +func NewMembershipsOrgsWithOrgItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MembershipsOrgsWithOrgItemRequestBuilder) { + m := &MembershipsOrgsWithOrgItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/memberships/orgs/{org}", pathParameters), + } + return m +} +// NewMembershipsOrgsWithOrgItemRequestBuilder instantiates a new MembershipsOrgsWithOrgItemRequestBuilder and sets the default values. +func NewMembershipsOrgsWithOrgItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MembershipsOrgsWithOrgItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMembershipsOrgsWithOrgItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get if the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization. +// returns a OrgMembershipable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#get-an-organization-membership-for-the-authenticated-user +func (m *MembershipsOrgsWithOrgItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable), nil +} +// Patch converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. +// returns a OrgMembershipable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/members#update-an-organization-membership-for-the-authenticated-user +func (m *MembershipsOrgsWithOrgItemRequestBuilder) Patch(ctx context.Context, body MembershipsOrgsItemWithOrgPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrgMembershipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrgMembershipable), nil +} +// ToGetRequestInformation if the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization. +// returns a *RequestInformation when successful +func (m *MembershipsOrgsWithOrgItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. +// returns a *RequestInformation when successful +func (m *MembershipsOrgsWithOrgItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body MembershipsOrgsItemWithOrgPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MembershipsOrgsWithOrgItemRequestBuilder when successful +func (m *MembershipsOrgsWithOrgItemRequestBuilder) WithUrl(rawUrl string)(*MembershipsOrgsWithOrgItemRequestBuilder) { + return NewMembershipsOrgsWithOrgItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/memberships_request_builder.go b/pkg/github/user/memberships_request_builder.go new file mode 100644 index 0000000..f865a11 --- /dev/null +++ b/pkg/github/user/memberships_request_builder.go @@ -0,0 +1,28 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// MembershipsRequestBuilder builds and executes requests for operations under \user\memberships +type MembershipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMembershipsRequestBuilderInternal instantiates a new MembershipsRequestBuilder and sets the default values. +func NewMembershipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MembershipsRequestBuilder) { + m := &MembershipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/memberships", pathParameters), + } + return m +} +// NewMembershipsRequestBuilder instantiates a new MembershipsRequestBuilder and sets the default values. +func NewMembershipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MembershipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMembershipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Orgs the orgs property +// returns a *MembershipsOrgsRequestBuilder when successful +func (m *MembershipsRequestBuilder) Orgs()(*MembershipsOrgsRequestBuilder) { + return NewMembershipsOrgsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/user/migrations/migrations_post_request_body_exclude.go b/pkg/github/user/migrations/migrations_post_request_body_exclude.go new file mode 100644 index 0000000..f0c88b9 --- /dev/null +++ b/pkg/github/user/migrations/migrations_post_request_body_exclude.go @@ -0,0 +1,34 @@ +package migrations +import ( + "errors" +) +// Allowed values that can be passed to the exclude param. +type MigrationsPostRequestBody_exclude int + +const ( + REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE MigrationsPostRequestBody_exclude = iota +) + +func (i MigrationsPostRequestBody_exclude) String() string { + return []string{"repositories"}[i] +} +func ParseMigrationsPostRequestBody_exclude(v string) (any, error) { + result := REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE + switch v { + case "repositories": + result = REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE + default: + return 0, errors.New("Unknown MigrationsPostRequestBody_exclude value: " + v) + } + return &result, nil +} +func SerializeMigrationsPostRequestBody_exclude(values []MigrationsPostRequestBody_exclude) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MigrationsPostRequestBody_exclude) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/migrations_item_archive_request_builder.go b/pkg/github/user/migrations_item_archive_request_builder.go new file mode 100644 index 0000000..7a3819c --- /dev/null +++ b/pkg/github/user/migrations_item_archive_request_builder.go @@ -0,0 +1,90 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MigrationsItemArchiveRequestBuilder builds and executes requests for operations under \user\migrations\{migration_id}\archive +type MigrationsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMigrationsItemArchiveRequestBuilderInternal instantiates a new MigrationsItemArchiveRequestBuilder and sets the default values. +func NewMigrationsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemArchiveRequestBuilder) { + m := &MigrationsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/archive", pathParameters), + } + return m +} +// NewMigrationsItemArchiveRequestBuilder instantiates a new MigrationsItemArchiveRequestBuilder and sets the default values. +func NewMigrationsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#delete-a-user-migration-archive +func (m *MigrationsItemArchiveRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:* attachments* bases* commit\_comments* issue\_comments* issue\_events* issues* milestones* organizations* projects* protected\_branches* pull\_request\_reviews* pull\_requests* releases* repositories* review\_comments* schema* usersThe archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#download-a-user-migration-archive +func (m *MigrationsItemArchiveRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. +// returns a *RequestInformation when successful +func (m *MigrationsItemArchiveRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:* attachments* bases* commit\_comments* issue\_comments* issue\_events* issues* milestones* organizations* projects* protected\_branches* pull\_request\_reviews* pull\_requests* releases* repositories* review\_comments* schema* usersThe archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. +// returns a *RequestInformation when successful +func (m *MigrationsItemArchiveRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MigrationsItemArchiveRequestBuilder when successful +func (m *MigrationsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*MigrationsItemArchiveRequestBuilder) { + return NewMigrationsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/migrations_item_repos_item_lock_request_builder.go b/pkg/github/user/migrations_item_repos_item_lock_request_builder.go new file mode 100644 index 0000000..b4f81f0 --- /dev/null +++ b/pkg/github/user/migrations_item_repos_item_lock_request_builder.go @@ -0,0 +1,61 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MigrationsItemReposItemLockRequestBuilder builds and executes requests for operations under \user\migrations\{migration_id}\repos\{repo_name}\lock +type MigrationsItemReposItemLockRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMigrationsItemReposItemLockRequestBuilderInternal instantiates a new MigrationsItemReposItemLockRequestBuilder and sets the default values. +func NewMigrationsItemReposItemLockRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemReposItemLockRequestBuilder) { + m := &MigrationsItemReposItemLockRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos/{repo_name}/lock", pathParameters), + } + return m +} +// NewMigrationsItemReposItemLockRequestBuilder instantiates a new MigrationsItemReposItemLockRequestBuilder and sets the default values. +func NewMigrationsItemReposItemLockRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemReposItemLockRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsItemReposItemLockRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#unlock-a-user-repository +func (m *MigrationsItemReposItemLockRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. +// returns a *RequestInformation when successful +func (m *MigrationsItemReposItemLockRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MigrationsItemReposItemLockRequestBuilder when successful +func (m *MigrationsItemReposItemLockRequestBuilder) WithUrl(rawUrl string)(*MigrationsItemReposItemLockRequestBuilder) { + return NewMigrationsItemReposItemLockRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/migrations_item_repos_request_builder.go b/pkg/github/user/migrations_item_repos_request_builder.go new file mode 100644 index 0000000..196db45 --- /dev/null +++ b/pkg/github/user/migrations_item_repos_request_builder.go @@ -0,0 +1,35 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// MigrationsItemReposRequestBuilder builds and executes requests for operations under \user\migrations\{migration_id}\repos +type MigrationsItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.migrations.item.repos.item collection +// returns a *MigrationsItemReposWithRepo_nameItemRequestBuilder when successful +func (m *MigrationsItemReposRequestBuilder) ByRepo_name(repo_name string)(*MigrationsItemReposWithRepo_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo_name != "" { + urlTplParams["repo_name"] = repo_name + } + return NewMigrationsItemReposWithRepo_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMigrationsItemReposRequestBuilderInternal instantiates a new MigrationsItemReposRequestBuilder and sets the default values. +func NewMigrationsItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemReposRequestBuilder) { + m := &MigrationsItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos", pathParameters), + } + return m +} +// NewMigrationsItemReposRequestBuilder instantiates a new MigrationsItemReposRequestBuilder and sets the default values. +func NewMigrationsItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsItemReposRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/user/migrations_item_repos_with_repo_name_item_request_builder.go b/pkg/github/user/migrations_item_repos_with_repo_name_item_request_builder.go new file mode 100644 index 0000000..f4232cd --- /dev/null +++ b/pkg/github/user/migrations_item_repos_with_repo_name_item_request_builder.go @@ -0,0 +1,28 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// MigrationsItemReposWithRepo_nameItemRequestBuilder builds and executes requests for operations under \user\migrations\{migration_id}\repos\{repo_name} +type MigrationsItemReposWithRepo_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewMigrationsItemReposWithRepo_nameItemRequestBuilderInternal instantiates a new MigrationsItemReposWithRepo_nameItemRequestBuilder and sets the default values. +func NewMigrationsItemReposWithRepo_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemReposWithRepo_nameItemRequestBuilder) { + m := &MigrationsItemReposWithRepo_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos/{repo_name}", pathParameters), + } + return m +} +// NewMigrationsItemReposWithRepo_nameItemRequestBuilder instantiates a new MigrationsItemReposWithRepo_nameItemRequestBuilder and sets the default values. +func NewMigrationsItemReposWithRepo_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemReposWithRepo_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsItemReposWithRepo_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Lock the lock property +// returns a *MigrationsItemReposItemLockRequestBuilder when successful +func (m *MigrationsItemReposWithRepo_nameItemRequestBuilder) Lock()(*MigrationsItemReposItemLockRequestBuilder) { + return NewMigrationsItemReposItemLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/user/migrations_item_repositories_request_builder.go b/pkg/github/user/migrations_item_repositories_request_builder.go new file mode 100644 index 0000000..27a36eb --- /dev/null +++ b/pkg/github/user/migrations_item_repositories_request_builder.go @@ -0,0 +1,71 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MigrationsItemRepositoriesRequestBuilder builds and executes requests for operations under \user\migrations\{migration_id}\repositories +type MigrationsItemRepositoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MigrationsItemRepositoriesRequestBuilderGetQueryParameters lists all the repositories for this user migration. +type MigrationsItemRepositoriesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewMigrationsItemRepositoriesRequestBuilderInternal instantiates a new MigrationsItemRepositoriesRequestBuilder and sets the default values. +func NewMigrationsItemRepositoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemRepositoriesRequestBuilder) { + m := &MigrationsItemRepositoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repositories{?page*,per_page*}", pathParameters), + } + return m +} +// NewMigrationsItemRepositoriesRequestBuilder instantiates a new MigrationsItemRepositoriesRequestBuilder and sets the default values. +func NewMigrationsItemRepositoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsItemRepositoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsItemRepositoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all the repositories for this user migration. +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#list-repositories-for-a-user-migration +func (m *MigrationsItemRepositoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MigrationsItemRepositoriesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists all the repositories for this user migration. +// returns a *RequestInformation when successful +func (m *MigrationsItemRepositoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MigrationsItemRepositoriesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MigrationsItemRepositoriesRequestBuilder when successful +func (m *MigrationsItemRepositoriesRequestBuilder) WithUrl(rawUrl string)(*MigrationsItemRepositoriesRequestBuilder) { + return NewMigrationsItemRepositoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/migrations_post_request_body.go b/pkg/github/user/migrations_post_request_body.go new file mode 100644 index 0000000..29914cc --- /dev/null +++ b/pkg/github/user/migrations_post_request_body.go @@ -0,0 +1,289 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MigrationsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Do not include attachments in the migration + exclude_attachments *bool + // Indicates whether the repository git data should be excluded from the migration. + exclude_git_data *bool + // Indicates whether metadata should be excluded and only git source should be included for the migration. + exclude_metadata *bool + // Indicates whether projects owned by the organization or users should be excluded. + exclude_owner_projects *bool + // Do not include releases in the migration + exclude_releases *bool + // Lock the repositories being migrated at the start of the migration + lock_repositories *bool + // Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + org_metadata_only *bool + // The repositories property + repositories []string +} +// NewMigrationsPostRequestBody instantiates a new MigrationsPostRequestBody and sets the default values. +func NewMigrationsPostRequestBody()(*MigrationsPostRequestBody) { + m := &MigrationsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMigrationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMigrationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMigrationsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MigrationsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExcludeAttachments gets the exclude_attachments property value. Do not include attachments in the migration +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetExcludeAttachments()(*bool) { + return m.exclude_attachments +} +// GetExcludeGitData gets the exclude_git_data property value. Indicates whether the repository git data should be excluded from the migration. +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetExcludeGitData()(*bool) { + return m.exclude_git_data +} +// GetExcludeMetadata gets the exclude_metadata property value. Indicates whether metadata should be excluded and only git source should be included for the migration. +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetExcludeMetadata()(*bool) { + return m.exclude_metadata +} +// GetExcludeOwnerProjects gets the exclude_owner_projects property value. Indicates whether projects owned by the organization or users should be excluded. +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetExcludeOwnerProjects()(*bool) { + return m.exclude_owner_projects +} +// GetExcludeReleases gets the exclude_releases property value. Do not include releases in the migration +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetExcludeReleases()(*bool) { + return m.exclude_releases +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MigrationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["exclude_attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeAttachments(val) + } + return nil + } + res["exclude_git_data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeGitData(val) + } + return nil + } + res["exclude_metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeMetadata(val) + } + return nil + } + res["exclude_owner_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeOwnerProjects(val) + } + return nil + } + res["exclude_releases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeReleases(val) + } + return nil + } + res["lock_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockRepositories(val) + } + return nil + } + res["org_metadata_only"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOrgMetadataOnly(val) + } + return nil + } + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRepositories(res) + } + return nil + } + return res +} +// GetLockRepositories gets the lock_repositories property value. Lock the repositories being migrated at the start of the migration +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetLockRepositories()(*bool) { + return m.lock_repositories +} +// GetOrgMetadataOnly gets the org_metadata_only property value. Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). +// returns a *bool when successful +func (m *MigrationsPostRequestBody) GetOrgMetadataOnly()(*bool) { + return m.org_metadata_only +} +// GetRepositories gets the repositories property value. The repositories property +// returns a []string when successful +func (m *MigrationsPostRequestBody) GetRepositories()([]string) { + return m.repositories +} +// Serialize serializes information the current object +func (m *MigrationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("exclude_attachments", m.GetExcludeAttachments()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_git_data", m.GetExcludeGitData()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_metadata", m.GetExcludeMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_owner_projects", m.GetExcludeOwnerProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exclude_releases", m.GetExcludeReleases()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("lock_repositories", m.GetLockRepositories()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("org_metadata_only", m.GetOrgMetadataOnly()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + err := writer.WriteCollectionOfStringValues("repositories", m.GetRepositories()) + 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 *MigrationsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExcludeAttachments sets the exclude_attachments property value. Do not include attachments in the migration +func (m *MigrationsPostRequestBody) SetExcludeAttachments(value *bool)() { + m.exclude_attachments = value +} +// SetExcludeGitData sets the exclude_git_data property value. Indicates whether the repository git data should be excluded from the migration. +func (m *MigrationsPostRequestBody) SetExcludeGitData(value *bool)() { + m.exclude_git_data = value +} +// SetExcludeMetadata sets the exclude_metadata property value. Indicates whether metadata should be excluded and only git source should be included for the migration. +func (m *MigrationsPostRequestBody) SetExcludeMetadata(value *bool)() { + m.exclude_metadata = value +} +// SetExcludeOwnerProjects sets the exclude_owner_projects property value. Indicates whether projects owned by the organization or users should be excluded. +func (m *MigrationsPostRequestBody) SetExcludeOwnerProjects(value *bool)() { + m.exclude_owner_projects = value +} +// SetExcludeReleases sets the exclude_releases property value. Do not include releases in the migration +func (m *MigrationsPostRequestBody) SetExcludeReleases(value *bool)() { + m.exclude_releases = value +} +// SetLockRepositories sets the lock_repositories property value. Lock the repositories being migrated at the start of the migration +func (m *MigrationsPostRequestBody) SetLockRepositories(value *bool)() { + m.lock_repositories = value +} +// SetOrgMetadataOnly sets the org_metadata_only property value. Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). +func (m *MigrationsPostRequestBody) SetOrgMetadataOnly(value *bool)() { + m.org_metadata_only = value +} +// SetRepositories sets the repositories property value. The repositories property +func (m *MigrationsPostRequestBody) SetRepositories(value []string)() { + m.repositories = value +} +type MigrationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeAttachments()(*bool) + GetExcludeGitData()(*bool) + GetExcludeMetadata()(*bool) + GetExcludeOwnerProjects()(*bool) + GetExcludeReleases()(*bool) + GetLockRepositories()(*bool) + GetOrgMetadataOnly()(*bool) + GetRepositories()([]string) + SetExcludeAttachments(value *bool)() + SetExcludeGitData(value *bool)() + SetExcludeMetadata(value *bool)() + SetExcludeOwnerProjects(value *bool)() + SetExcludeReleases(value *bool)() + SetLockRepositories(value *bool)() + SetOrgMetadataOnly(value *bool)() + SetRepositories(value []string)() +} diff --git a/pkg/github/user/migrations_request_builder.go b/pkg/github/user/migrations_request_builder.go new file mode 100644 index 0000000..a42d2f9 --- /dev/null +++ b/pkg/github/user/migrations_request_builder.go @@ -0,0 +1,123 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MigrationsRequestBuilder builds and executes requests for operations under \user\migrations +type MigrationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MigrationsRequestBuilderGetQueryParameters lists all migrations a user has started. +type MigrationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByMigration_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.migrations.item collection +// returns a *MigrationsWithMigration_ItemRequestBuilder when successful +func (m *MigrationsRequestBuilder) ByMigration_id(migration_id int32)(*MigrationsWithMigration_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["migration_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(migration_id), 10) + return NewMigrationsWithMigration_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMigrationsRequestBuilderInternal instantiates a new MigrationsRequestBuilder and sets the default values. +func NewMigrationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsRequestBuilder) { + m := &MigrationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations{?page*,per_page*}", pathParameters), + } + return m +} +// NewMigrationsRequestBuilder instantiates a new MigrationsRequestBuilder and sets the default values. +func NewMigrationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all migrations a user has started. +// returns a []Migrationable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#list-user-migrations +func (m *MigrationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MigrationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMigrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable) + } + } + return val, nil +} +// Post initiates the generation of a user migration archive. +// returns a Migrationable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#start-a-user-migration +func (m *MigrationsRequestBuilder) Post(ctx context.Context, body MigrationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMigrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable), nil +} +// ToGetRequestInformation lists all migrations a user has started. +// returns a *RequestInformation when successful +func (m *MigrationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MigrationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation initiates the generation of a user migration archive. +// returns a *RequestInformation when successful +func (m *MigrationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body MigrationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MigrationsRequestBuilder when successful +func (m *MigrationsRequestBuilder) WithUrl(rawUrl string)(*MigrationsRequestBuilder) { + return NewMigrationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/migrations_with_migration_item_request_builder.go b/pkg/github/user/migrations_with_migration_item_request_builder.go new file mode 100644 index 0000000..0371a02 --- /dev/null +++ b/pkg/github/user/migrations_with_migration_item_request_builder.go @@ -0,0 +1,84 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// MigrationsWithMigration_ItemRequestBuilder builds and executes requests for operations under \user\migrations\{migration_id} +type MigrationsWithMigration_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MigrationsWithMigration_ItemRequestBuilderGetQueryParameters fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:* `pending` - the migration hasn't started yet.* `exporting` - the migration is in progress.* `exported` - the migration finished successfully.* `failed` - the migration failed.Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#download-a-user-migration-archive). +type MigrationsWithMigration_ItemRequestBuilderGetQueryParameters struct { + Exclude []string `uriparametername:"exclude"` +} +// Archive the archive property +// returns a *MigrationsItemArchiveRequestBuilder when successful +func (m *MigrationsWithMigration_ItemRequestBuilder) Archive()(*MigrationsItemArchiveRequestBuilder) { + return NewMigrationsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMigrationsWithMigration_ItemRequestBuilderInternal instantiates a new MigrationsWithMigration_ItemRequestBuilder and sets the default values. +func NewMigrationsWithMigration_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsWithMigration_ItemRequestBuilder) { + m := &MigrationsWithMigration_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/migrations/{migration_id}{?exclude*}", pathParameters), + } + return m +} +// NewMigrationsWithMigration_ItemRequestBuilder instantiates a new MigrationsWithMigration_ItemRequestBuilder and sets the default values. +func NewMigrationsWithMigration_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MigrationsWithMigration_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMigrationsWithMigration_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:* `pending` - the migration hasn't started yet.* `exporting` - the migration is in progress.* `exported` - the migration finished successfully.* `failed` - the migration failed.Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#download-a-user-migration-archive). +// returns a Migrationable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#get-a-user-migration-status +func (m *MigrationsWithMigration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MigrationsWithMigration_ItemRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMigrationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Migrationable), nil +} +// Repos the repos property +// returns a *MigrationsItemReposRequestBuilder when successful +func (m *MigrationsWithMigration_ItemRequestBuilder) Repos()(*MigrationsItemReposRequestBuilder) { + return NewMigrationsItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repositories the repositories property +// returns a *MigrationsItemRepositoriesRequestBuilder when successful +func (m *MigrationsWithMigration_ItemRequestBuilder) Repositories()(*MigrationsItemRepositoriesRequestBuilder) { + return NewMigrationsItemRepositoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:* `pending` - the migration hasn't started yet.* `exporting` - the migration is in progress.* `exported` - the migration finished successfully.* `failed` - the migration failed.Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/enterprise-cloud@latest//rest/migrations/users#download-a-user-migration-archive). +// returns a *RequestInformation when successful +func (m *MigrationsWithMigration_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[MigrationsWithMigration_ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *MigrationsWithMigration_ItemRequestBuilder when successful +func (m *MigrationsWithMigration_ItemRequestBuilder) WithUrl(rawUrl string)(*MigrationsWithMigration_ItemRequestBuilder) { + return NewMigrationsWithMigration_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/orgs_request_builder.go b/pkg/github/user/orgs_request_builder.go new file mode 100644 index 0000000..c14609d --- /dev/null +++ b/pkg/github/user/orgs_request_builder.go @@ -0,0 +1,73 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// OrgsRequestBuilder builds and executes requests for operations under \user\orgs +type OrgsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// OrgsRequestBuilderGetQueryParameters list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. +type OrgsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewOrgsRequestBuilderInternal instantiates a new OrgsRequestBuilder and sets the default values. +func NewOrgsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrgsRequestBuilder) { + m := &OrgsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/orgs{?page*,per_page*}", pathParameters), + } + return m +} +// NewOrgsRequestBuilder instantiates a new OrgsRequestBuilder and sets the default values. +func NewOrgsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrgsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewOrgsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. +// returns a []OrganizationSimpleable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-organizations-for-the-authenticated-user +func (m *OrgsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OrgsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSimpleFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + } + } + return val, nil +} +// ToGetRequestInformation list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. +// returns a *RequestInformation when successful +func (m *OrgsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OrgsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *OrgsRequestBuilder when successful +func (m *OrgsRequestBuilder) WithUrl(rawUrl string)(*OrgsRequestBuilder) { + return NewOrgsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages/get_package_type_query_parameter_type.go b/pkg/github/user/packages/get_package_type_query_parameter_type.go new file mode 100644 index 0000000..ae4025d --- /dev/null +++ b/pkg/github/user/packages/get_package_type_query_parameter_type.go @@ -0,0 +1,48 @@ +package packages +import ( + "errors" +) +type GetPackage_typeQueryParameterType int + +const ( + NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE GetPackage_typeQueryParameterType = iota + MAVEN_GETPACKAGE_TYPEQUERYPARAMETERTYPE + RUBYGEMS_GETPACKAGE_TYPEQUERYPARAMETERTYPE + DOCKER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + NUGET_GETPACKAGE_TYPEQUERYPARAMETERTYPE + CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE +) + +func (i GetPackage_typeQueryParameterType) String() string { + return []string{"npm", "maven", "rubygems", "docker", "nuget", "container"}[i] +} +func ParseGetPackage_typeQueryParameterType(v string) (any, error) { + result := NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE + switch v { + case "npm": + result = NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "maven": + result = MAVEN_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "rubygems": + result = RUBYGEMS_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "docker": + result = DOCKER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "nuget": + result = NUGET_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "container": + result = CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetPackage_typeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetPackage_typeQueryParameterType(values []GetPackage_typeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetPackage_typeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/packages/get_visibility_query_parameter_type.go b/pkg/github/user/packages/get_visibility_query_parameter_type.go new file mode 100644 index 0000000..daf1c43 --- /dev/null +++ b/pkg/github/user/packages/get_visibility_query_parameter_type.go @@ -0,0 +1,39 @@ +package packages +import ( + "errors" +) +type GetVisibilityQueryParameterType int + +const ( + PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE GetVisibilityQueryParameterType = iota + PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE +) + +func (i GetVisibilityQueryParameterType) String() string { + return []string{"public", "private", "internal"}[i] +} +func ParseGetVisibilityQueryParameterType(v string) (any, error) { + result := PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + switch v { + case "public": + result = PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + case "private": + result = PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + case "internal": + result = INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetVisibilityQueryParameterType(values []GetVisibilityQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetVisibilityQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go b/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go new file mode 100644 index 0000000..cf4ef3c --- /dev/null +++ b/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go @@ -0,0 +1,36 @@ +package versions +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + ACTIVE_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + DELETED_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"active", "deleted"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := ACTIVE_GETSTATEQUERYPARAMETERTYPE + switch v { + case "active": + result = ACTIVE_GETSTATEQUERYPARAMETERTYPE + case "deleted": + result = DELETED_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/packages_item_item_restore_request_builder.go b/pkg/github/user/packages_item_item_restore_request_builder.go new file mode 100644 index 0000000..a3a7016 --- /dev/null +++ b/pkg/github/user/packages_item_item_restore_request_builder.go @@ -0,0 +1,66 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// PackagesItemItemRestoreRequestBuilder builds and executes requests for operations under \user\packages\{package_type}\{package_name}\restore +type PackagesItemItemRestoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PackagesItemItemRestoreRequestBuilderPostQueryParameters restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type PackagesItemItemRestoreRequestBuilderPostQueryParameters struct { + // package token + Token *string `uriparametername:"token"` +} +// NewPackagesItemItemRestoreRequestBuilderInternal instantiates a new PackagesItemItemRestoreRequestBuilder and sets the default values. +func NewPackagesItemItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemRestoreRequestBuilder) { + m := &PackagesItemItemRestoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/restore{?token*}", pathParameters), + } + return m +} +// NewPackagesItemItemRestoreRequestBuilder instantiates a new PackagesItemItemRestoreRequestBuilder and sets the default values. +func NewPackagesItemItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemRestoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesItemItemRestoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Post restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#restore-a-package-for-the-authenticated-user +func (m *PackagesItemItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesItemItemRestoreRequestBuilderPostQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesItemItemRestoreRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PackagesItemItemRestoreRequestBuilder when successful +func (m *PackagesItemItemRestoreRequestBuilder) WithUrl(rawUrl string)(*PackagesItemItemRestoreRequestBuilder) { + return NewPackagesItemItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go b/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go new file mode 100644 index 0000000..43aa64e --- /dev/null +++ b/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go @@ -0,0 +1,61 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// PackagesItemItemVersionsItemRestoreRequestBuilder builds and executes requests for operations under \user\packages\{package_type}\{package_name}\versions\{package_version_id}\restore +type PackagesItemItemVersionsItemRestoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewPackagesItemItemVersionsItemRestoreRequestBuilderInternal instantiates a new PackagesItemItemVersionsItemRestoreRequestBuilder and sets the default values. +func NewPackagesItemItemVersionsItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemVersionsItemRestoreRequestBuilder) { + m := &PackagesItemItemVersionsItemRestoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", pathParameters), + } + return m +} +// NewPackagesItemItemVersionsItemRestoreRequestBuilder instantiates a new PackagesItemItemVersionsItemRestoreRequestBuilder and sets the default values. +func NewPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemVersionsItemRestoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesItemItemVersionsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Post restores a package version owned by the authenticated user.You can restore a deleted package version under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#restore-a-package-version-for-the-authenticated-user +func (m *PackagesItemItemVersionsItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation restores a package version owned by the authenticated user.You can restore a deleted package version under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemItemVersionsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PackagesItemItemVersionsItemRestoreRequestBuilder when successful +func (m *PackagesItemItemVersionsItemRestoreRequestBuilder) WithUrl(rawUrl string)(*PackagesItemItemVersionsItemRestoreRequestBuilder) { + return NewPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages_item_item_versions_request_builder.go b/pkg/github/user/packages_item_item_versions_request_builder.go new file mode 100644 index 0000000..fe88230 --- /dev/null +++ b/pkg/github/user/packages_item_item_versions_request_builder.go @@ -0,0 +1,89 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i46bc095d8d4b8696bfce1ad7fb3e2e8188d3a31309d0f172088364f4ad1f8d1c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user/packages/item/item/versions" +) + +// PackagesItemItemVersionsRequestBuilder builds and executes requests for operations under \user\packages\{package_type}\{package_name}\versions +type PackagesItemItemVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PackagesItemItemVersionsRequestBuilderGetQueryParameters lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type PackagesItemItemVersionsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The state of the package, either active or deleted. + State *i46bc095d8d4b8696bfce1ad7fb3e2e8188d3a31309d0f172088364f4ad1f8d1c.GetStateQueryParameterType `uriparametername:"state"` +} +// ByPackage_version_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.packages.item.item.versions.item collection +// returns a *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder when successful +func (m *PackagesItemItemVersionsRequestBuilder) ByPackage_version_id(package_version_id int32)(*PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["package_version_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(package_version_id), 10) + return NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewPackagesItemItemVersionsRequestBuilderInternal instantiates a new PackagesItemItemVersionsRequestBuilder and sets the default values. +func NewPackagesItemItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemVersionsRequestBuilder) { + m := &PackagesItemItemVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions{?page*,per_page*,state*}", pathParameters), + } + return m +} +// NewPackagesItemItemVersionsRequestBuilder instantiates a new PackagesItemItemVersionsRequestBuilder and sets the default values. +func NewPackagesItemItemVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesItemItemVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a []PackageVersionable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#list-package-versions-for-a-package-owned-by-the-authenticated-user +func (m *PackagesItemItemVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesItemItemVersionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageVersionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable) + } + } + return val, nil +} +// ToGetRequestInformation lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesItemItemVersionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PackagesItemItemVersionsRequestBuilder when successful +func (m *PackagesItemItemVersionsRequestBuilder) WithUrl(rawUrl string)(*PackagesItemItemVersionsRequestBuilder) { + return NewPackagesItemItemVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages_item_item_versions_with_package_version_item_request_builder.go b/pkg/github/user/packages_item_item_versions_with_package_version_item_request_builder.go new file mode 100644 index 0000000..5c4f3f6 --- /dev/null +++ b/pkg/github/user/packages_item_item_versions_with_package_version_item_request_builder.go @@ -0,0 +1,93 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder builds and executes requests for operations under \user\packages\{package_type}\{package_name}\versions\{package_version_id} +type PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal instantiates a new PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder and sets the default values. +func NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + m := &PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions/{package_version_id}", pathParameters), + } + return m +} +// NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder instantiates a new PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder and sets the default values. +func NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#delete-a-package-version-for-the-authenticated-user +func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specific package version for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a PackageVersionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-a-package-version-for-the-authenticated-user +func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageVersionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable), nil +} +// Restore the restore property +// returns a *PackagesItemItemVersionsItemRestoreRequestBuilder when successful +func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Restore()(*PackagesItemItemVersionsItemRestoreRequestBuilder) { + return NewPackagesItemItemVersionsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specific package version for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder when successful +func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) WithUrl(rawUrl string)(*PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + return NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages_item_with_package_name_item_request_builder.go b/pkg/github/user/packages_item_with_package_name_item_request_builder.go new file mode 100644 index 0000000..d0a2da7 --- /dev/null +++ b/pkg/github/user/packages_item_with_package_name_item_request_builder.go @@ -0,0 +1,98 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// PackagesItemWithPackage_nameItemRequestBuilder builds and executes requests for operations under \user\packages\{package_type}\{package_name} +type PackagesItemWithPackage_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewPackagesItemWithPackage_nameItemRequestBuilderInternal instantiates a new PackagesItemWithPackage_nameItemRequestBuilder and sets the default values. +func NewPackagesItemWithPackage_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemWithPackage_nameItemRequestBuilder) { + m := &PackagesItemWithPackage_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}", pathParameters), + } + return m +} +// NewPackagesItemWithPackage_nameItemRequestBuilder instantiates a new PackagesItemWithPackage_nameItemRequestBuilder and sets the default values. +func NewPackagesItemWithPackage_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesItemWithPackage_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesItemWithPackage_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#delete-a-package-for-the-authenticated-user +func (m *PackagesItemWithPackage_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specific package for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a PackageEscapedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-a-package-for-the-authenticated-user +func (m *PackagesItemWithPackage_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable), nil +} +// Restore the restore property +// returns a *PackagesItemItemRestoreRequestBuilder when successful +func (m *PackagesItemWithPackage_nameItemRequestBuilder) Restore()(*PackagesItemItemRestoreRequestBuilder) { + return NewPackagesItemItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specific package for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesItemWithPackage_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// Versions the versions property +// returns a *PackagesItemItemVersionsRequestBuilder when successful +func (m *PackagesItemWithPackage_nameItemRequestBuilder) Versions()(*PackagesItemItemVersionsRequestBuilder) { + return NewPackagesItemItemVersionsRequestBuilderInternal(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. +// returns a *PackagesItemWithPackage_nameItemRequestBuilder when successful +func (m *PackagesItemWithPackage_nameItemRequestBuilder) WithUrl(rawUrl string)(*PackagesItemWithPackage_nameItemRequestBuilder) { + return NewPackagesItemWithPackage_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages_request_builder.go b/pkg/github/user/packages_request_builder.go new file mode 100644 index 0000000..a685803 --- /dev/null +++ b/pkg/github/user/packages_request_builder.go @@ -0,0 +1,84 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i16df432fa09f3e82ff14962a2a572c893ae306937b5c66a816b790042b70958d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user/packages" +) + +// PackagesRequestBuilder builds and executes requests for operations under \user\packages +type PackagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PackagesRequestBuilderGetQueryParameters lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type PackagesRequestBuilderGetQueryParameters struct { + // The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. + Package_type *i16df432fa09f3e82ff14962a2a572c893ae306937b5c66a816b790042b70958d.GetPackage_typeQueryParameterType `uriparametername:"package_type"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The selected visibility of the packages. This parameter is optional and only filters an existing result set.The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`.For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + Visibility *i16df432fa09f3e82ff14962a2a572c893ae306937b5c66a816b790042b70958d.GetVisibilityQueryParameterType `uriparametername:"visibility"` +} +// ByPackage_type gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.packages.item collection +// returns a *PackagesWithPackage_typeItemRequestBuilder when successful +func (m *PackagesRequestBuilder) ByPackage_type(package_type string)(*PackagesWithPackage_typeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if package_type != "" { + urlTplParams["package_type"] = package_type + } + return NewPackagesWithPackage_typeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewPackagesRequestBuilderInternal instantiates a new PackagesRequestBuilder and sets the default values. +func NewPackagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesRequestBuilder) { + m := &PackagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages?package_type={package_type}{&page*,per_page*,visibility*}", pathParameters), + } + return m +} +// NewPackagesRequestBuilder instantiates a new PackagesRequestBuilder and sets the default values. +func NewPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a []PackageEscapedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#list-packages-for-the-authenticated-users-namespace +func (m *PackagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable) + } + } + return val, nil +} +// ToGetRequestInformation lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *PackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *PackagesRequestBuilder when successful +func (m *PackagesRequestBuilder) WithUrl(rawUrl string)(*PackagesRequestBuilder) { + return NewPackagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/packages_with_package_type_item_request_builder.go b/pkg/github/user/packages_with_package_type_item_request_builder.go new file mode 100644 index 0000000..30fd049 --- /dev/null +++ b/pkg/github/user/packages_with_package_type_item_request_builder.go @@ -0,0 +1,35 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// PackagesWithPackage_typeItemRequestBuilder builds and executes requests for operations under \user\packages\{package_type} +type PackagesWithPackage_typeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByPackage_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.packages.item.item collection +// returns a *PackagesItemWithPackage_nameItemRequestBuilder when successful +func (m *PackagesWithPackage_typeItemRequestBuilder) ByPackage_name(package_name string)(*PackagesItemWithPackage_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if package_name != "" { + urlTplParams["package_name"] = package_name + } + return NewPackagesItemWithPackage_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewPackagesWithPackage_typeItemRequestBuilderInternal instantiates a new PackagesWithPackage_typeItemRequestBuilder and sets the default values. +func NewPackagesWithPackage_typeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesWithPackage_typeItemRequestBuilder) { + m := &PackagesWithPackage_typeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/packages/{package_type}", pathParameters), + } + return m +} +// NewPackagesWithPackage_typeItemRequestBuilder instantiates a new PackagesWithPackage_typeItemRequestBuilder and sets the default values. +func NewPackagesWithPackage_typeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PackagesWithPackage_typeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPackagesWithPackage_typeItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/user/projects_post_request_body.go b/pkg/github/user/projects_post_request_body.go new file mode 100644 index 0000000..1c18aca --- /dev/null +++ b/pkg/github/user/projects_post_request_body.go @@ -0,0 +1,109 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ProjectsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Body of the project + body *string + // Name of the project + name *string +} +// NewProjectsPostRequestBody instantiates a new ProjectsPostRequestBody and sets the default values. +func NewProjectsPostRequestBody()(*ProjectsPostRequestBody) { + m := &ProjectsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateProjectsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateProjectsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProjectsPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ProjectsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBody gets the body property value. Body of the project +// returns a *string when successful +func (m *ProjectsPostRequestBody) GetBody()(*string) { + return m.body +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ProjectsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBody(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 + } + return res +} +// GetName gets the name property value. Name of the project +// returns a *string when successful +func (m *ProjectsPostRequestBody) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ProjectsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *ProjectsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBody sets the body property value. Body of the project +func (m *ProjectsPostRequestBody) SetBody(value *string)() { + m.body = value +} +// SetName sets the name property value. Name of the project +func (m *ProjectsPostRequestBody) SetName(value *string)() { + m.name = value +} +type ProjectsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(*string) + GetName()(*string) + SetBody(value *string)() + SetName(value *string)() +} diff --git a/pkg/github/user/projects_request_builder.go b/pkg/github/user/projects_request_builder.go new file mode 100644 index 0000000..451c090 --- /dev/null +++ b/pkg/github/user/projects_request_builder.go @@ -0,0 +1,69 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ProjectsRequestBuilder builds and executes requests for operations under \user\projects +type ProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewProjectsRequestBuilderInternal instantiates a new ProjectsRequestBuilder and sets the default values. +func NewProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ProjectsRequestBuilder) { + m := &ProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/projects", pathParameters), + } + return m +} +// NewProjectsRequestBuilder instantiates a new ProjectsRequestBuilder and sets the default values. +func NewProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewProjectsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a Projectable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#create-a-user-project +func (m *ProjectsRequestBuilder) Post(ctx context.Context, body ProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorSimpleFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable), nil +} +// ToPostRequestInformation creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// returns a *RequestInformation when successful +func (m *ProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ProjectsRequestBuilder when successful +func (m *ProjectsRequestBuilder) WithUrl(rawUrl string)(*ProjectsRequestBuilder) { + return NewProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/public_emails_request_builder.go b/pkg/github/user/public_emails_request_builder.go new file mode 100644 index 0000000..c77c16b --- /dev/null +++ b/pkg/github/user/public_emails_request_builder.go @@ -0,0 +1,75 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Public_emailsRequestBuilder builds and executes requests for operations under \user\public_emails +type Public_emailsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Public_emailsRequestBuilderGetQueryParameters lists your publicly visible email address, which you can set with the[Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/users/emails#set-primary-email-visibility-for-the-authenticated-user)endpoint.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. +type Public_emailsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewPublic_emailsRequestBuilderInternal instantiates a new Public_emailsRequestBuilder and sets the default values. +func NewPublic_emailsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Public_emailsRequestBuilder) { + m := &Public_emailsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/public_emails{?page*,per_page*}", pathParameters), + } + return m +} +// NewPublic_emailsRequestBuilder instantiates a new Public_emailsRequestBuilder and sets the default values. +func NewPublic_emailsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Public_emailsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPublic_emailsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists your publicly visible email address, which you can set with the[Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/users/emails#set-primary-email-visibility-for-the-authenticated-user)endpoint.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. +// returns a []Emailable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/emails#list-public-email-addresses-for-the-authenticated-user +func (m *Public_emailsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Public_emailsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEmailFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Emailable) + } + } + return val, nil +} +// ToGetRequestInformation lists your publicly visible email address, which you can set with the[Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/users/emails#set-primary-email-visibility-for-the-authenticated-user)endpoint.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Public_emailsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Public_emailsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Public_emailsRequestBuilder when successful +func (m *Public_emailsRequestBuilder) WithUrl(rawUrl string)(*Public_emailsRequestBuilder) { + return NewPublic_emailsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/repos/get_direction_query_parameter_type.go b/pkg/github/user/repos/get_direction_query_parameter_type.go new file mode 100644 index 0000000..afa5d0f --- /dev/null +++ b/pkg/github/user/repos/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package repos +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/get_sort_query_parameter_type.go b/pkg/github/user/repos/get_sort_query_parameter_type.go new file mode 100644 index 0000000..8dee1bb --- /dev/null +++ b/pkg/github/user/repos/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package repos +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + PUSHED_GETSORTQUERYPARAMETERTYPE + FULL_NAME_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "pushed", "full_name"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "pushed": + result = PUSHED_GETSORTQUERYPARAMETERTYPE + case "full_name": + result = FULL_NAME_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/get_type_query_parameter_type.go b/pkg/github/user/repos/get_type_query_parameter_type.go new file mode 100644 index 0000000..9272720 --- /dev/null +++ b/pkg/github/user/repos/get_type_query_parameter_type.go @@ -0,0 +1,45 @@ +package repos +import ( + "errors" +) +type GetTypeQueryParameterType int + +const ( + ALL_GETTYPEQUERYPARAMETERTYPE GetTypeQueryParameterType = iota + OWNER_GETTYPEQUERYPARAMETERTYPE + PUBLIC_GETTYPEQUERYPARAMETERTYPE + PRIVATE_GETTYPEQUERYPARAMETERTYPE + MEMBER_GETTYPEQUERYPARAMETERTYPE +) + +func (i GetTypeQueryParameterType) String() string { + return []string{"all", "owner", "public", "private", "member"}[i] +} +func ParseGetTypeQueryParameterType(v string) (any, error) { + result := ALL_GETTYPEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETTYPEQUERYPARAMETERTYPE + case "owner": + result = OWNER_GETTYPEQUERYPARAMETERTYPE + case "public": + result = PUBLIC_GETTYPEQUERYPARAMETERTYPE + case "private": + result = PRIVATE_GETTYPEQUERYPARAMETERTYPE + case "member": + result = MEMBER_GETTYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTypeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/get_visibility_query_parameter_type.go b/pkg/github/user/repos/get_visibility_query_parameter_type.go new file mode 100644 index 0000000..73b6341 --- /dev/null +++ b/pkg/github/user/repos/get_visibility_query_parameter_type.go @@ -0,0 +1,39 @@ +package repos +import ( + "errors" +) +type GetVisibilityQueryParameterType int + +const ( + ALL_GETVISIBILITYQUERYPARAMETERTYPE GetVisibilityQueryParameterType = iota + PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE +) + +func (i GetVisibilityQueryParameterType) String() string { + return []string{"all", "public", "private"}[i] +} +func ParseGetVisibilityQueryParameterType(v string) (any, error) { + result := ALL_GETVISIBILITYQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETVISIBILITYQUERYPARAMETERTYPE + case "public": + result = PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + case "private": + result = PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetVisibilityQueryParameterType(values []GetVisibilityQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetVisibilityQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go b/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go new file mode 100644 index 0000000..50a0ccf --- /dev/null +++ b/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go @@ -0,0 +1,40 @@ +package repos +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type ReposPostRequestBody_merge_commit_message int + +const ( + PR_BODY_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE ReposPostRequestBody_merge_commit_message = iota + PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + BLANK_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE +) + +func (i ReposPostRequestBody_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseReposPostRequestBody_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_merge_commit_message(values []ReposPostRequestBody_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go b/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go new file mode 100644 index 0000000..dd1e4b9 --- /dev/null +++ b/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go @@ -0,0 +1,37 @@ +package repos +import ( + "errors" +) +// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +type ReposPostRequestBody_merge_commit_title int + +const ( + PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE ReposPostRequestBody_merge_commit_title = iota + MERGE_MESSAGE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE +) + +func (i ReposPostRequestBody_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseReposPostRequestBody_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_merge_commit_title(values []ReposPostRequestBody_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go new file mode 100644 index 0000000..0ecd209 --- /dev/null +++ b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package repos +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type ReposPostRequestBody_squash_merge_commit_message int + +const ( + PR_BODY_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE ReposPostRequestBody_squash_merge_commit_message = iota + COMMIT_MESSAGES_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i ReposPostRequestBody_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseReposPostRequestBody_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_squash_merge_commit_message(values []ReposPostRequestBody_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go new file mode 100644 index 0000000..51ceb4f --- /dev/null +++ b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package repos +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type ReposPostRequestBody_squash_merge_commit_title int + +const ( + PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE ReposPostRequestBody_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i ReposPostRequestBody_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseReposPostRequestBody_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeReposPostRequestBody_squash_merge_commit_title(values []ReposPostRequestBody_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ReposPostRequestBody_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/repos_post_request_body.go b/pkg/github/user/repos_post_request_body.go new file mode 100644 index 0000000..eddc2cf --- /dev/null +++ b/pkg/github/user/repos_post_request_body.go @@ -0,0 +1,602 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ReposPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to allow Auto-merge to be used on pull requests. + allow_auto_merge *bool + // Whether to allow merge commits for pull requests. + allow_merge_commit *bool + // Whether to allow rebase merges for pull requests. + allow_rebase_merge *bool + // Whether to allow squash merges for pull requests. + allow_squash_merge *bool + // Whether the repository is initialized with a minimal README. + auto_init *bool + // Whether to delete head branches when pull requests are merged + delete_branch_on_merge *bool + // A short description of the repository. + description *string + // The desired language or platform to apply to the .gitignore. + gitignore_template *string + // Whether discussions are enabled. + has_discussions *bool + // Whether downloads are enabled. + has_downloads *bool + // Whether issues are enabled. + has_issues *bool + // Whether projects are enabled. + has_projects *bool + // Whether the wiki is enabled. + has_wiki *bool + // A URL with more information about the repository. + homepage *string + // Whether this repository acts as a template that can be used to generate new repositories. + is_template *bool + // The license keyword of the open source license for this repository. + license_template *string + // The name of the repository. + name *string + // Whether the repository is private. + private *bool + // The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + team_id *int32 +} +// NewReposPostRequestBody instantiates a new ReposPostRequestBody and sets the default values. +func NewReposPostRequestBody()(*ReposPostRequestBody) { + m := &ReposPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateReposPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateReposPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReposPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ReposPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowMergeCommit gets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetAutoInit gets the auto_init property value. Whether the repository is initialized with a minimal README. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetAutoInit()(*bool) { + return m.auto_init +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +// returns a *bool when successful +func (m *ReposPostRequestBody) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDescription gets the description property value. A short description of the repository. +// returns a *string when successful +func (m *ReposPostRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ReposPostRequestBody) 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_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["auto_init"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoInit(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["gitignore_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGitignoreTemplate(val) + } + return nil + } + res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDiscussions(val) + } + return nil + } + res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDownloads(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_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["license_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicenseTemplate(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["team_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamId(val) + } + return nil + } + return res +} +// GetGitignoreTemplate gets the gitignore_template property value. The desired language or platform to apply to the .gitignore. +// returns a *string when successful +func (m *ReposPostRequestBody) GetGitignoreTemplate()(*string) { + return m.gitignore_template +} +// GetHasDiscussions gets the has_discussions property value. Whether discussions are enabled. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetHasDiscussions()(*bool) { + return m.has_discussions +} +// GetHasDownloads gets the has_downloads property value. Whether downloads are enabled. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetHasDownloads()(*bool) { + return m.has_downloads +} +// GetHasIssues gets the has_issues property value. Whether issues are enabled. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasProjects gets the has_projects property value. Whether projects are enabled. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. Whether the wiki is enabled. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. A URL with more information about the repository. +// returns a *string when successful +func (m *ReposPostRequestBody) GetHomepage()(*string) { + return m.homepage +} +// GetIsTemplate gets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetIsTemplate()(*bool) { + return m.is_template +} +// GetLicenseTemplate gets the license_template property value. The license keyword of the open source license for this repository. +// returns a *string when successful +func (m *ReposPostRequestBody) GetLicenseTemplate()(*string) { + return m.license_template +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *ReposPostRequestBody) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Whether the repository is private. +// returns a *bool when successful +func (m *ReposPostRequestBody) GetPrivate()(*bool) { + return m.private +} +// GetTeamId gets the team_id property value. The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. +// returns a *int32 when successful +func (m *ReposPostRequestBody) GetTeamId()(*int32) { + return m.team_id +} +// Serialize serializes information the current object +func (m *ReposPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_auto_merge", m.GetAllowAutoMerge()) + 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("auto_init", m.GetAutoInit()) + 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.WriteStringValue("gitignore_template", m.GetGitignoreTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_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("license_template", m.GetLicenseTemplate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("team_id", m.GetTeamId()) + 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 *ReposPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Whether to allow Auto-merge to be used on pull requests. +func (m *ReposPostRequestBody) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. Whether to allow merge commits for pull requests. +func (m *ReposPostRequestBody) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. Whether to allow rebase merges for pull requests. +func (m *ReposPostRequestBody) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. Whether to allow squash merges for pull requests. +func (m *ReposPostRequestBody) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetAutoInit sets the auto_init property value. Whether the repository is initialized with a minimal README. +func (m *ReposPostRequestBody) SetAutoInit(value *bool)() { + m.auto_init = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged +func (m *ReposPostRequestBody) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDescription sets the description property value. A short description of the repository. +func (m *ReposPostRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetGitignoreTemplate sets the gitignore_template property value. The desired language or platform to apply to the .gitignore. +func (m *ReposPostRequestBody) SetGitignoreTemplate(value *string)() { + m.gitignore_template = value +} +// SetHasDiscussions sets the has_discussions property value. Whether discussions are enabled. +func (m *ReposPostRequestBody) SetHasDiscussions(value *bool)() { + m.has_discussions = value +} +// SetHasDownloads sets the has_downloads property value. Whether downloads are enabled. +func (m *ReposPostRequestBody) SetHasDownloads(value *bool)() { + m.has_downloads = value +} +// SetHasIssues sets the has_issues property value. Whether issues are enabled. +func (m *ReposPostRequestBody) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasProjects sets the has_projects property value. Whether projects are enabled. +func (m *ReposPostRequestBody) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. Whether the wiki is enabled. +func (m *ReposPostRequestBody) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. A URL with more information about the repository. +func (m *ReposPostRequestBody) SetHomepage(value *string)() { + m.homepage = value +} +// SetIsTemplate sets the is_template property value. Whether this repository acts as a template that can be used to generate new repositories. +func (m *ReposPostRequestBody) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetLicenseTemplate sets the license_template property value. The license keyword of the open source license for this repository. +func (m *ReposPostRequestBody) SetLicenseTemplate(value *string)() { + m.license_template = value +} +// SetName sets the name property value. The name of the repository. +func (m *ReposPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Whether the repository is private. +func (m *ReposPostRequestBody) SetPrivate(value *bool)() { + m.private = value +} +// SetTeamId sets the team_id property value. The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. +func (m *ReposPostRequestBody) SetTeamId(value *int32)() { + m.team_id = value +} +type ReposPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetAutoInit()(*bool) + GetDeleteBranchOnMerge()(*bool) + GetDescription()(*string) + GetGitignoreTemplate()(*string) + GetHasDiscussions()(*bool) + GetHasDownloads()(*bool) + GetHasIssues()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetIsTemplate()(*bool) + GetLicenseTemplate()(*string) + GetName()(*string) + GetPrivate()(*bool) + GetTeamId()(*int32) + SetAllowAutoMerge(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetAutoInit(value *bool)() + SetDeleteBranchOnMerge(value *bool)() + SetDescription(value *string)() + SetGitignoreTemplate(value *string)() + SetHasDiscussions(value *bool)() + SetHasDownloads(value *bool)() + SetHasIssues(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetIsTemplate(value *bool)() + SetLicenseTemplate(value *string)() + SetName(value *string)() + SetPrivate(value *bool)() + SetTeamId(value *int32)() +} diff --git a/pkg/github/user/repos_request_builder.go b/pkg/github/user/repos_request_builder.go new file mode 100644 index 0000000..1e398c3 --- /dev/null +++ b/pkg/github/user/repos_request_builder.go @@ -0,0 +1,134 @@ +package user + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + ie24f8389c7561da4c79e16e644cb29d097a8aeeb8716a056378cb57a13a353ed "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user/repos" +) + +// ReposRequestBuilder builds and executes requests for operations under \user\repos +type ReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ReposRequestBuilderGetQueryParameters lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. +type ReposRequestBuilderGetQueryParameters struct { + // Comma-separated list of values. Can include: * `owner`: Repositories that are owned by the authenticated user. * `collaborator`: Repositories that the user has been added to as a collaborator. * `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + Affiliation *string `uriparametername:"affiliation"` + // Only show repositories updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Before *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"before"` + // The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + Direction *ie24f8389c7561da4c79e16e644cb29d097a8aeeb8716a056378cb57a13a353ed.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show repositories updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` + // The property to sort the results by. + Sort *ie24f8389c7561da4c79e16e644cb29d097a8aeeb8716a056378cb57a13a353ed.GetSortQueryParameterType `uriparametername:"sort"` + // Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + Type *ie24f8389c7561da4c79e16e644cb29d097a8aeeb8716a056378cb57a13a353ed.GetTypeQueryParameterType `uriparametername:"type"` + // Limit results to repositories with the specified visibility. + Visibility *ie24f8389c7561da4c79e16e644cb29d097a8aeeb8716a056378cb57a13a353ed.GetVisibilityQueryParameterType `uriparametername:"visibility"` +} +// NewReposRequestBuilderInternal instantiates a new ReposRequestBuilder and sets the default values. +func NewReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposRequestBuilder) { + m := &ReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/repos{?affiliation*,before*,direction*,page*,per_page*,since*,sort*,type*,visibility*}", pathParameters), + } + return m +} +// NewReposRequestBuilder instantiates a new ReposRequestBuilder and sets the default values. +func NewReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewReposRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. +// returns a []Repositoryable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repositories-for-the-authenticated-user +func (m *ReposRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ReposRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + } + } + return val, nil +} +// Post creates a new repository for the authenticated user.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. +// returns a FullRepositoryable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#create-a-repository-for-the-authenticated-user +func (m *ReposRequestBuilder) Post(ctx context.Context, body ReposPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.FullRepositoryable), nil +} +// ToGetRequestInformation lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. +// returns a *RequestInformation when successful +func (m *ReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ReposRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a new repository for the authenticated user.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. +// returns a *RequestInformation when successful +func (m *ReposRequestBuilder) ToPostRequestInformation(ctx context.Context, body ReposPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ReposRequestBuilder when successful +func (m *ReposRequestBuilder) WithUrl(rawUrl string)(*ReposRequestBuilder) { + return NewReposRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/repository_invitations_request_builder.go b/pkg/github/user/repository_invitations_request_builder.go new file mode 100644 index 0000000..534e24c --- /dev/null +++ b/pkg/github/user/repository_invitations_request_builder.go @@ -0,0 +1,86 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Repository_invitationsRequestBuilder builds and executes requests for operations under \user\repository_invitations +type Repository_invitationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Repository_invitationsRequestBuilderGetQueryParameters when authenticating as a user, this endpoint will list all currently open repository invitations for that user. +type Repository_invitationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByInvitation_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.repository_invitations.item collection +// returns a *Repository_invitationsWithInvitation_ItemRequestBuilder when successful +func (m *Repository_invitationsRequestBuilder) ByInvitation_id(invitation_id int32)(*Repository_invitationsWithInvitation_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["invitation_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(invitation_id), 10) + return NewRepository_invitationsWithInvitation_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewRepository_invitationsRequestBuilderInternal instantiates a new Repository_invitationsRequestBuilder and sets the default values. +func NewRepository_invitationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Repository_invitationsRequestBuilder) { + m := &Repository_invitationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/repository_invitations{?page*,per_page*}", pathParameters), + } + return m +} +// NewRepository_invitationsRequestBuilder instantiates a new Repository_invitationsRequestBuilder and sets the default values. +func NewRepository_invitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Repository_invitationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRepository_invitationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get when authenticating as a user, this endpoint will list all currently open repository invitations for that user. +// returns a []RepositoryInvitationable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user +func (m *Repository_invitationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Repository_invitationsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryInvitationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.RepositoryInvitationable) + } + } + return val, nil +} +// ToGetRequestInformation when authenticating as a user, this endpoint will list all currently open repository invitations for that user. +// returns a *RequestInformation when successful +func (m *Repository_invitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Repository_invitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Repository_invitationsRequestBuilder when successful +func (m *Repository_invitationsRequestBuilder) WithUrl(rawUrl string)(*Repository_invitationsRequestBuilder) { + return NewRepository_invitationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/repository_invitations_with_invitation_item_request_builder.go b/pkg/github/user/repository_invitations_with_invitation_item_request_builder.go new file mode 100644 index 0000000..5bcdb68 --- /dev/null +++ b/pkg/github/user/repository_invitations_with_invitation_item_request_builder.go @@ -0,0 +1,90 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Repository_invitationsWithInvitation_ItemRequestBuilder builds and executes requests for operations under \user\repository_invitations\{invitation_id} +type Repository_invitationsWithInvitation_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewRepository_invitationsWithInvitation_ItemRequestBuilderInternal instantiates a new Repository_invitationsWithInvitation_ItemRequestBuilder and sets the default values. +func NewRepository_invitationsWithInvitation_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Repository_invitationsWithInvitation_ItemRequestBuilder) { + m := &Repository_invitationsWithInvitation_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/repository_invitations/{invitation_id}", pathParameters), + } + return m +} +// NewRepository_invitationsWithInvitation_ItemRequestBuilder instantiates a new Repository_invitationsWithInvitation_ItemRequestBuilder and sets the default values. +func NewRepository_invitationsWithInvitation_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Repository_invitationsWithInvitation_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewRepository_invitationsWithInvitation_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete decline a repository invitation +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations#decline-a-repository-invitation +func (m *Repository_invitationsWithInvitation_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Patch accept a repository invitation +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/collaborators/invitations#accept-a-repository-invitation +func (m *Repository_invitationsWithInvitation_ItemRequestBuilder) Patch(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "409": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// returns a *RequestInformation when successful +func (m *Repository_invitationsWithInvitation_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// returns a *RequestInformation when successful +func (m *Repository_invitationsWithInvitation_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Repository_invitationsWithInvitation_ItemRequestBuilder when successful +func (m *Repository_invitationsWithInvitation_ItemRequestBuilder) WithUrl(rawUrl string)(*Repository_invitationsWithInvitation_ItemRequestBuilder) { + return NewRepository_invitationsWithInvitation_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/social_accounts_delete_request_body.go b/pkg/github/user/social_accounts_delete_request_body.go new file mode 100644 index 0000000..90237df --- /dev/null +++ b/pkg/github/user/social_accounts_delete_request_body.go @@ -0,0 +1,86 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Social_accountsDeleteRequestBody struct { + // Full URLs for the social media profiles to delete. + account_urls []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewSocial_accountsDeleteRequestBody instantiates a new Social_accountsDeleteRequestBody and sets the default values. +func NewSocial_accountsDeleteRequestBody()(*Social_accountsDeleteRequestBody) { + m := &Social_accountsDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSocial_accountsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSocial_accountsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSocial_accountsDeleteRequestBody(), nil +} +// GetAccountUrls gets the account_urls property value. Full URLs for the social media profiles to delete. +// returns a []string when successful +func (m *Social_accountsDeleteRequestBody) GetAccountUrls()([]string) { + return m.account_urls +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Social_accountsDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Social_accountsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["account_urls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAccountUrls(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Social_accountsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccountUrls() != nil { + err := writer.WriteCollectionOfStringValues("account_urls", m.GetAccountUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountUrls sets the account_urls property value. Full URLs for the social media profiles to delete. +func (m *Social_accountsDeleteRequestBody) SetAccountUrls(value []string)() { + m.account_urls = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Social_accountsDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type Social_accountsDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountUrls()([]string) + SetAccountUrls(value []string)() +} diff --git a/pkg/github/user/social_accounts_post_request_body.go b/pkg/github/user/social_accounts_post_request_body.go new file mode 100644 index 0000000..37aeb9d --- /dev/null +++ b/pkg/github/user/social_accounts_post_request_body.go @@ -0,0 +1,86 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Social_accountsPostRequestBody struct { + // Full URLs for the social media profiles to add. + account_urls []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewSocial_accountsPostRequestBody instantiates a new Social_accountsPostRequestBody and sets the default values. +func NewSocial_accountsPostRequestBody()(*Social_accountsPostRequestBody) { + m := &Social_accountsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSocial_accountsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSocial_accountsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSocial_accountsPostRequestBody(), nil +} +// GetAccountUrls gets the account_urls property value. Full URLs for the social media profiles to add. +// returns a []string when successful +func (m *Social_accountsPostRequestBody) GetAccountUrls()([]string) { + return m.account_urls +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Social_accountsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Social_accountsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["account_urls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetAccountUrls(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Social_accountsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccountUrls() != nil { + err := writer.WriteCollectionOfStringValues("account_urls", m.GetAccountUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountUrls sets the account_urls property value. Full URLs for the social media profiles to add. +func (m *Social_accountsPostRequestBody) SetAccountUrls(value []string)() { + m.account_urls = value +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *Social_accountsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type Social_accountsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountUrls()([]string) + SetAccountUrls(value []string)() +} diff --git a/pkg/github/user/social_accounts_request_builder.go b/pkg/github/user/social_accounts_request_builder.go new file mode 100644 index 0000000..9c03918 --- /dev/null +++ b/pkg/github/user/social_accounts_request_builder.go @@ -0,0 +1,156 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Social_accountsRequestBuilder builds and executes requests for operations under \user\social_accounts +type Social_accountsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Social_accountsRequestBuilderGetQueryParameters lists all of your social accounts. +type Social_accountsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewSocial_accountsRequestBuilderInternal instantiates a new Social_accountsRequestBuilder and sets the default values. +func NewSocial_accountsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Social_accountsRequestBuilder) { + m := &Social_accountsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/social_accounts{?page*,per_page*}", pathParameters), + } + return m +} +// NewSocial_accountsRequestBuilder instantiates a new Social_accountsRequestBuilder and sets the default values. +func NewSocial_accountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Social_accountsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSocial_accountsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes one or more social accounts from the authenticated user's profile.OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/social-accounts#delete-social-accounts-for-the-authenticated-user +func (m *Social_accountsRequestBuilder) Delete(ctx context.Context, body Social_accountsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get lists all of your social accounts. +// returns a []SocialAccountable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/social-accounts#list-social-accounts-for-the-authenticated-user +func (m *Social_accountsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Social_accountsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSocialAccountFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable) + } + } + return val, nil +} +// Post add one or more social accounts to the authenticated user's profile.OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a []SocialAccountable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/social-accounts#add-social-accounts-for-the-authenticated-user +func (m *Social_accountsRequestBuilder) Post(ctx context.Context, body Social_accountsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSocialAccountFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable) + } + } + return val, nil +} +// ToDeleteRequestInformation deletes one or more social accounts from the authenticated user's profile.OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Social_accountsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body Social_accountsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// ToGetRequestInformation lists all of your social accounts. +// returns a *RequestInformation when successful +func (m *Social_accountsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Social_accountsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation add one or more social accounts to the authenticated user's profile.OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Social_accountsRequestBuilder) ToPostRequestInformation(ctx context.Context, body Social_accountsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Social_accountsRequestBuilder when successful +func (m *Social_accountsRequestBuilder) WithUrl(rawUrl string)(*Social_accountsRequestBuilder) { + return NewSocial_accountsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/ssh_signing_keys_post_request_body.go b/pkg/github/user/ssh_signing_keys_post_request_body.go new file mode 100644 index 0000000..7fa37bc --- /dev/null +++ b/pkg/github/user/ssh_signing_keys_post_request_body.go @@ -0,0 +1,109 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Ssh_signing_keysPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/enterprise-cloud@latest//authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." + key *string + // A descriptive name for the new key. + title *string +} +// NewSsh_signing_keysPostRequestBody instantiates a new Ssh_signing_keysPostRequestBody and sets the default values. +func NewSsh_signing_keysPostRequestBody()(*Ssh_signing_keysPostRequestBody) { + m := &Ssh_signing_keysPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSsh_signing_keysPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSsh_signing_keysPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSsh_signing_keysPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *Ssh_signing_keysPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Ssh_signing_keysPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/enterprise-cloud@latest//authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." +// returns a *string when successful +func (m *Ssh_signing_keysPostRequestBody) GetKey()(*string) { + return m.key +} +// GetTitle gets the title property value. A descriptive name for the new key. +// returns a *string when successful +func (m *Ssh_signing_keysPostRequestBody) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *Ssh_signing_keysPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *Ssh_signing_keysPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKey sets the key property value. The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/enterprise-cloud@latest//authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." +func (m *Ssh_signing_keysPostRequestBody) SetKey(value *string)() { + m.key = value +} +// SetTitle sets the title property value. A descriptive name for the new key. +func (m *Ssh_signing_keysPostRequestBody) SetTitle(value *string)() { + m.title = value +} +type Ssh_signing_keysPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetTitle()(*string) + SetKey(value *string)() + SetTitle(value *string)() +} diff --git a/pkg/github/user/ssh_signing_keys_request_builder.go b/pkg/github/user/ssh_signing_keys_request_builder.go new file mode 100644 index 0000000..614ca0a --- /dev/null +++ b/pkg/github/user/ssh_signing_keys_request_builder.go @@ -0,0 +1,127 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Ssh_signing_keysRequestBuilder builds and executes requests for operations under \user\ssh_signing_keys +type Ssh_signing_keysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Ssh_signing_keysRequestBuilderGetQueryParameters lists the SSH signing keys for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. +type Ssh_signing_keysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// BySsh_signing_key_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.ssh_signing_keys.item collection +// returns a *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder when successful +func (m *Ssh_signing_keysRequestBuilder) BySsh_signing_key_id(ssh_signing_key_id int32)(*Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["ssh_signing_key_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(ssh_signing_key_id), 10) + return NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewSsh_signing_keysRequestBuilderInternal instantiates a new Ssh_signing_keysRequestBuilder and sets the default values. +func NewSsh_signing_keysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Ssh_signing_keysRequestBuilder) { + m := &Ssh_signing_keysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/ssh_signing_keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewSsh_signing_keysRequestBuilder instantiates a new Ssh_signing_keysRequestBuilder and sets the default values. +func NewSsh_signing_keysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Ssh_signing_keysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSsh_signing_keysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the SSH signing keys for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. +// returns a []SshSigningKeyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/ssh-signing-keys#list-ssh-signing-keys-for-the-authenticated-user +func (m *Ssh_signing_keysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Ssh_signing_keysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSshSigningKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable) + } + } + return val, nil +} +// Post creates an SSH signing key for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint. +// returns a SshSigningKeyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/ssh-signing-keys#create-a-ssh-signing-key-for-the-authenticated-user +func (m *Ssh_signing_keysRequestBuilder) Post(ctx context.Context, body Ssh_signing_keysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSshSigningKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable), nil +} +// ToGetRequestInformation lists the SSH signing keys for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Ssh_signing_keysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[Ssh_signing_keysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates an SSH signing key for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Ssh_signing_keysRequestBuilder) ToPostRequestInformation(ctx context.Context, body Ssh_signing_keysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Ssh_signing_keysRequestBuilder when successful +func (m *Ssh_signing_keysRequestBuilder) WithUrl(rawUrl string)(*Ssh_signing_keysRequestBuilder) { + return NewSsh_signing_keysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/ssh_signing_keys_with_ssh_signing_key_item_request_builder.go b/pkg/github/user/ssh_signing_keys_with_ssh_signing_key_item_request_builder.go new file mode 100644 index 0000000..aa9a722 --- /dev/null +++ b/pkg/github/user/ssh_signing_keys_with_ssh_signing_key_item_request_builder.go @@ -0,0 +1,96 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder builds and executes requests for operations under \user\ssh_signing_keys\{ssh_signing_key_id} +type Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilderInternal instantiates a new Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder and sets the default values. +func NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) { + m := &Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/ssh_signing_keys/{ssh_signing_key_id}", pathParameters), + } + return m +} +// NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilder instantiates a new Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder and sets the default values. +func NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an SSH signing key from the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/ssh-signing-keys#delete-an-ssh-signing-key-for-the-authenticated-user +func (m *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets extended details for an SSH signing key.OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. +// returns a SshSigningKeyable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/ssh-signing-keys#get-an-ssh-signing-key-for-the-authenticated-user +func (m *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSshSigningKeyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable), nil +} +// ToDeleteRequestInformation deletes an SSH signing key from the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets extended details for an SSH signing key.OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder when successful +func (m *Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) WithUrl(rawUrl string)(*Ssh_signing_keysWithSsh_signing_key_ItemRequestBuilder) { + return NewSsh_signing_keysWithSsh_signing_key_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/starred/get_direction_query_parameter_type.go b/pkg/github/user/starred/get_direction_query_parameter_type.go new file mode 100644 index 0000000..3ac3d71 --- /dev/null +++ b/pkg/github/user/starred/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package starred +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/starred/get_sort_query_parameter_type.go b/pkg/github/user/starred/get_sort_query_parameter_type.go new file mode 100644 index 0000000..604bb06 --- /dev/null +++ b/pkg/github/user/starred/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package starred +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/user/starred_item_with_repo_item_request_builder.go b/pkg/github/user/starred_item_with_repo_item_request_builder.go new file mode 100644 index 0000000..1ee6fea --- /dev/null +++ b/pkg/github/user/starred_item_with_repo_item_request_builder.go @@ -0,0 +1,123 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// StarredItemWithRepoItemRequestBuilder builds and executes requests for operations under \user\starred\{owner}\{repo} +type StarredItemWithRepoItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewStarredItemWithRepoItemRequestBuilderInternal instantiates a new StarredItemWithRepoItemRequestBuilder and sets the default values. +func NewStarredItemWithRepoItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredItemWithRepoItemRequestBuilder) { + m := &StarredItemWithRepoItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/starred/{owner}/{repo}", pathParameters), + } + return m +} +// NewStarredItemWithRepoItemRequestBuilder instantiates a new StarredItemWithRepoItemRequestBuilder and sets the default values. +func NewStarredItemWithRepoItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredItemWithRepoItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStarredItemWithRepoItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete unstar a repository that the authenticated user has previously starred. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/starring#unstar-a-repository-for-the-authenticated-user +func (m *StarredItemWithRepoItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get whether the authenticated user has starred the repository. +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/starring#check-if-a-repository-is-starred-by-the-authenticated-user +func (m *StarredItemWithRepoItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Put note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/starring#star-a-repository-for-the-authenticated-user +func (m *StarredItemWithRepoItemRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation unstar a repository that the authenticated user has previously starred. +// returns a *RequestInformation when successful +func (m *StarredItemWithRepoItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation whether the authenticated user has starred the repository. +// returns a *RequestInformation when successful +func (m *StarredItemWithRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPutRequestInformation note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#http-method)." +// returns a *RequestInformation when successful +func (m *StarredItemWithRepoItemRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *StarredItemWithRepoItemRequestBuilder when successful +func (m *StarredItemWithRepoItemRequestBuilder) WithUrl(rawUrl string)(*StarredItemWithRepoItemRequestBuilder) { + return NewStarredItemWithRepoItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/starred_request_builder.go b/pkg/github/user/starred_request_builder.go new file mode 100644 index 0000000..acb15e5 --- /dev/null +++ b/pkg/github/user/starred_request_builder.go @@ -0,0 +1,90 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i1c1b27518614576f20f13513d3f98635c027fb2ce39dfa851ecde9fe543ac09c "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/user/starred" +) + +// StarredRequestBuilder builds and executes requests for operations under \user\starred +type StarredRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// StarredRequestBuilderGetQueryParameters lists repositories the authenticated user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +type StarredRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i1c1b27518614576f20f13513d3f98635c027fb2ce39dfa851ecde9fe543ac09c.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. + Sort *i1c1b27518614576f20f13513d3f98635c027fb2ce39dfa851ecde9fe543ac09c.GetSortQueryParameterType `uriparametername:"sort"` +} +// ByOwner gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.starred.item collection +// returns a *StarredWithOwnerItemRequestBuilder when successful +func (m *StarredRequestBuilder) ByOwner(owner string)(*StarredWithOwnerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if owner != "" { + urlTplParams["owner"] = owner + } + return NewStarredWithOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewStarredRequestBuilderInternal instantiates a new StarredRequestBuilder and sets the default values. +func NewStarredRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredRequestBuilder) { + m := &StarredRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/starred{?direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewStarredRequestBuilder instantiates a new StarredRequestBuilder and sets the default values. +func NewStarredRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStarredRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories the authenticated user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +// returns a []Repositoryable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/starring#list-repositories-starred-by-the-authenticated-user +func (m *StarredRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StarredRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Repositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists repositories the authenticated user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +// returns a *RequestInformation when successful +func (m *StarredRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StarredRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *StarredRequestBuilder when successful +func (m *StarredRequestBuilder) WithUrl(rawUrl string)(*StarredRequestBuilder) { + return NewStarredRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/starred_with_owner_item_request_builder.go b/pkg/github/user/starred_with_owner_item_request_builder.go new file mode 100644 index 0000000..e2367fb --- /dev/null +++ b/pkg/github/user/starred_with_owner_item_request_builder.go @@ -0,0 +1,35 @@ +package user + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// StarredWithOwnerItemRequestBuilder builds and executes requests for operations under \user\starred\{owner} +type StarredWithOwnerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.starred.item.item collection +// returns a *StarredItemWithRepoItemRequestBuilder when successful +func (m *StarredWithOwnerItemRequestBuilder) ByRepo(repo string)(*StarredItemWithRepoItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo != "" { + urlTplParams["repo"] = repo + } + return NewStarredItemWithRepoItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewStarredWithOwnerItemRequestBuilderInternal instantiates a new StarredWithOwnerItemRequestBuilder and sets the default values. +func NewStarredWithOwnerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredWithOwnerItemRequestBuilder) { + m := &StarredWithOwnerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/starred/{owner}", pathParameters), + } + return m +} +// NewStarredWithOwnerItemRequestBuilder instantiates a new StarredWithOwnerItemRequestBuilder and sets the default values. +func NewStarredWithOwnerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*StarredWithOwnerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewStarredWithOwnerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/user/subscriptions_request_builder.go b/pkg/github/user/subscriptions_request_builder.go new file mode 100644 index 0000000..8a3b53b --- /dev/null +++ b/pkg/github/user/subscriptions_request_builder.go @@ -0,0 +1,73 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// SubscriptionsRequestBuilder builds and executes requests for operations under \user\subscriptions +type SubscriptionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubscriptionsRequestBuilderGetQueryParameters lists repositories the authenticated user is watching. +type SubscriptionsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewSubscriptionsRequestBuilderInternal instantiates a new SubscriptionsRequestBuilder and sets the default values. +func NewSubscriptionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsRequestBuilder) { + m := &SubscriptionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/subscriptions{?page*,per_page*}", pathParameters), + } + return m +} +// NewSubscriptionsRequestBuilder instantiates a new SubscriptionsRequestBuilder and sets the default values. +func NewSubscriptionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubscriptionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories the authenticated user is watching. +// returns a []MinimalRepositoryable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#list-repositories-watched-by-the-authenticated-user +func (m *SubscriptionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists repositories the authenticated user is watching. +// returns a *RequestInformation when successful +func (m *SubscriptionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *SubscriptionsRequestBuilder when successful +func (m *SubscriptionsRequestBuilder) WithUrl(rawUrl string)(*SubscriptionsRequestBuilder) { + return NewSubscriptionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/teams_request_builder.go b/pkg/github/user/teams_request_builder.go new file mode 100644 index 0000000..8248fda --- /dev/null +++ b/pkg/github/user/teams_request_builder.go @@ -0,0 +1,73 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// TeamsRequestBuilder builds and executes requests for operations under \user\teams +type TeamsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamsRequestBuilderGetQueryParameters list all of the teams across all of the organizations to which the authenticateduser belongs.OAuth app tokens and personal access tokens (classic) need the `user`, `repo`, or `read:org` scope to use this endpoint.When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization. +type TeamsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewTeamsRequestBuilderInternal instantiates a new TeamsRequestBuilder and sets the default values. +func NewTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamsRequestBuilder) { + m := &TeamsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/teams{?page*,per_page*}", pathParameters), + } + return m +} +// NewTeamsRequestBuilder instantiates a new TeamsRequestBuilder and sets the default values. +func NewTeamsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list all of the teams across all of the organizations to which the authenticateduser belongs.OAuth app tokens and personal access tokens (classic) need the `user`, `repo`, or `read:org` scope to use this endpoint.When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization. +// returns a []TeamFullable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/teams/teams#list-teams-for-the-authenticated-user +func (m *TeamsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TeamsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateTeamFullFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.TeamFullable) + } + } + return val, nil +} +// ToGetRequestInformation list all of the teams across all of the organizations to which the authenticateduser belongs.OAuth app tokens and personal access tokens (classic) need the `user`, `repo`, or `read:org` scope to use this endpoint.When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization. +// returns a *RequestInformation when successful +func (m *TeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[TeamsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *TeamsRequestBuilder when successful +func (m *TeamsRequestBuilder) WithUrl(rawUrl string)(*TeamsRequestBuilder) { + return NewTeamsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/user_patch_request_body.go b/pkg/github/user/user_patch_request_body.go new file mode 100644 index 0000000..03387dc --- /dev/null +++ b/pkg/github/user/user_patch_request_body.go @@ -0,0 +1,283 @@ +package user + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type UserPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new short biography of the user. + bio *string + // The new blog URL of the user. + blog *string + // The new company of the user. + company *string + // The publicly visible email address of the user. + email *string + // The new hiring availability of the user. + hireable *bool + // The new location of the user. + location *string + // The new name of the user. + name *string + // The new Twitter username of the user. + twitter_username *string +} +// NewUserPatchRequestBody instantiates a new UserPatchRequestBody and sets the default values. +func NewUserPatchRequestBody()(*UserPatchRequestBody) { + m := &UserPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateUserPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *UserPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBio gets the bio property value. The new short biography of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetBio()(*string) { + return m.bio +} +// GetBlog gets the blog property value. The new blog URL of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetBlog()(*string) { + return m.blog +} +// GetCompany gets the company property value. The new company of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetCompany()(*string) { + return m.company +} +// GetEmail gets the email property value. The publicly visible email address of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBio(val) + } + return nil + } + res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlog(val) + } + return nil + } + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompany(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["hireable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHireable(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["twitter_username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTwitterUsername(val) + } + return nil + } + return res +} +// GetHireable gets the hireable property value. The new hiring availability of the user. +// returns a *bool when successful +func (m *UserPatchRequestBody) GetHireable()(*bool) { + return m.hireable +} +// GetLocation gets the location property value. The new location of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetLocation()(*string) { + return m.location +} +// GetName gets the name property value. The new name of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetName()(*string) { + return m.name +} +// GetTwitterUsername gets the twitter_username property value. The new Twitter username of the user. +// returns a *string when successful +func (m *UserPatchRequestBody) GetTwitterUsername()(*string) { + return m.twitter_username +} +// Serialize serializes information the current object +func (m *UserPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("bio", m.GetBio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("blog", m.GetBlog()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hireable", m.GetHireable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("twitter_username", m.GetTwitterUsername()) + 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 *UserPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBio sets the bio property value. The new short biography of the user. +func (m *UserPatchRequestBody) SetBio(value *string)() { + m.bio = value +} +// SetBlog sets the blog property value. The new blog URL of the user. +func (m *UserPatchRequestBody) SetBlog(value *string)() { + m.blog = value +} +// SetCompany sets the company property value. The new company of the user. +func (m *UserPatchRequestBody) SetCompany(value *string)() { + m.company = value +} +// SetEmail sets the email property value. The publicly visible email address of the user. +func (m *UserPatchRequestBody) SetEmail(value *string)() { + m.email = value +} +// SetHireable sets the hireable property value. The new hiring availability of the user. +func (m *UserPatchRequestBody) SetHireable(value *bool)() { + m.hireable = value +} +// SetLocation sets the location property value. The new location of the user. +func (m *UserPatchRequestBody) SetLocation(value *string)() { + m.location = value +} +// SetName sets the name property value. The new name of the user. +func (m *UserPatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetTwitterUsername sets the twitter_username property value. The new Twitter username of the user. +func (m *UserPatchRequestBody) SetTwitterUsername(value *string)() { + m.twitter_username = value +} +type UserPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBio()(*string) + GetBlog()(*string) + GetCompany()(*string) + GetEmail()(*string) + GetHireable()(*bool) + GetLocation()(*string) + GetName()(*string) + GetTwitterUsername()(*string) + SetBio(value *string)() + SetBlog(value *string)() + SetCompany(value *string)() + SetEmail(value *string)() + SetHireable(value *bool)() + SetLocation(value *string)() + SetName(value *string)() + SetTwitterUsername(value *string)() +} diff --git a/pkg/github/user/user_request_builder.go b/pkg/github/user/user_request_builder.go new file mode 100644 index 0000000..3083985 --- /dev/null +++ b/pkg/github/user/user_request_builder.go @@ -0,0 +1,329 @@ +package user + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// UserRequestBuilder builds and executes requests for operations under \user +type UserRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// UserGetResponse composed type wrapper for classes i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +type UserGetResponse struct { + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable + privateUser i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable + publicUser i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +} +// NewUserGetResponse instantiates a new UserGetResponse and sets the default values. +func NewUserGetResponse()(*UserGetResponse) { + m := &UserGetResponse{ + } + return m +} +// CreateUserGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateUserGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewUserGetResponse() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *UserGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *UserGetResponse) GetIsComposedType()(bool) { + return true +} +// GetPrivateUser gets the privateUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable +// returns a PrivateUserable when successful +func (m *UserGetResponse) GetPrivateUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable) { + return m.privateUser +} +// GetPublicUser gets the publicUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +// returns a PublicUserable when successful +func (m *UserGetResponse) GetPublicUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable) { + return m.publicUser +} +// Serialize serializes information the current object +func (m *UserGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPrivateUser() != nil { + err := writer.WriteObjectValue("", m.GetPrivateUser()) + if err != nil { + return err + } + } else if m.GetPublicUser() != nil { + err := writer.WriteObjectValue("", m.GetPublicUser()) + if err != nil { + return err + } + } + return nil +} +// SetPrivateUser sets the privateUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable +func (m *UserGetResponse) SetPrivateUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable)() { + m.privateUser = value +} +// SetPublicUser sets the publicUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +func (m *UserGetResponse) SetPublicUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable)() { + m.publicUser = value +} +type UserGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrivateUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable) + GetPublicUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable) + SetPrivateUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable)() + SetPublicUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable)() +} +// Blocks the blocks property +// returns a *BlocksRequestBuilder when successful +func (m *UserRequestBuilder) Blocks()(*BlocksRequestBuilder) { + return NewBlocksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ByAccount_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.user.item collection +// returns a *WithAccount_ItemRequestBuilder when successful +func (m *UserRequestBuilder) ByAccount_id(account_id int32)(*WithAccount_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["account_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(account_id), 10) + return NewWithAccount_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// Codespaces the codespaces property +// returns a *CodespacesRequestBuilder when successful +func (m *UserRequestBuilder) Codespaces()(*CodespacesRequestBuilder) { + return NewCodespacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewUserRequestBuilderInternal instantiates a new UserRequestBuilder and sets the default values. +func NewUserRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UserRequestBuilder) { + m := &UserRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user", pathParameters), + } + return m +} +// NewUserRequestBuilder instantiates a new UserRequestBuilder and sets the default values. +func NewUserRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UserRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewUserRequestBuilderInternal(urlParams, requestAdapter) +} +// Docker the docker property +// returns a *DockerRequestBuilder when successful +func (m *UserRequestBuilder) Docker()(*DockerRequestBuilder) { + return NewDockerRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Email the email property +// returns a *EmailRequestBuilder when successful +func (m *UserRequestBuilder) Email()(*EmailRequestBuilder) { + return NewEmailRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Emails the emails property +// returns a *EmailsRequestBuilder when successful +func (m *UserRequestBuilder) Emails()(*EmailsRequestBuilder) { + return NewEmailsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Followers the followers property +// returns a *FollowersRequestBuilder when successful +func (m *UserRequestBuilder) Followers()(*FollowersRequestBuilder) { + return NewFollowersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Following the following property +// returns a *FollowingRequestBuilder when successful +func (m *UserRequestBuilder) Following()(*FollowingRequestBuilder) { + return NewFollowingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get oAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. +// returns a UserGetResponseable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/users#get-the-authenticated-user +func (m *UserRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(UserGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateUserGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(UserGetResponseable), nil +} +// Gpg_keys the gpg_keys property +// returns a *Gpg_keysRequestBuilder when successful +func (m *UserRequestBuilder) Gpg_keys()(*Gpg_keysRequestBuilder) { + return NewGpg_keysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installations the installations property +// returns a *InstallationsRequestBuilder when successful +func (m *UserRequestBuilder) Installations()(*InstallationsRequestBuilder) { + return NewInstallationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// InteractionLimits the interactionLimits property +// returns a *InteractionLimitsRequestBuilder when successful +func (m *UserRequestBuilder) InteractionLimits()(*InteractionLimitsRequestBuilder) { + return NewInteractionLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Issues the issues property +// returns a *IssuesRequestBuilder when successful +func (m *UserRequestBuilder) Issues()(*IssuesRequestBuilder) { + return NewIssuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Keys the keys property +// returns a *KeysRequestBuilder when successful +func (m *UserRequestBuilder) Keys()(*KeysRequestBuilder) { + return NewKeysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Marketplace_purchases the marketplace_purchases property +// returns a *Marketplace_purchasesRequestBuilder when successful +func (m *UserRequestBuilder) Marketplace_purchases()(*Marketplace_purchasesRequestBuilder) { + return NewMarketplace_purchasesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Memberships the memberships property +// returns a *MembershipsRequestBuilder when successful +func (m *UserRequestBuilder) Memberships()(*MembershipsRequestBuilder) { + return NewMembershipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Migrations the migrations property +// returns a *MigrationsRequestBuilder when successful +func (m *UserRequestBuilder) Migrations()(*MigrationsRequestBuilder) { + return NewMigrationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Orgs the orgs property +// returns a *OrgsRequestBuilder when successful +func (m *UserRequestBuilder) Orgs()(*OrgsRequestBuilder) { + return NewOrgsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Packages the packages property +// returns a *PackagesRequestBuilder when successful +func (m *UserRequestBuilder) Packages()(*PackagesRequestBuilder) { + return NewPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. +// returns a PrivateUserable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/users#update-the-authenticated-user +func (m *UserRequestBuilder) Patch(ctx context.Context, body UserPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePrivateUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable), nil +} +// Projects the projects property +// returns a *ProjectsRequestBuilder when successful +func (m *UserRequestBuilder) Projects()(*ProjectsRequestBuilder) { + return NewProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Public_emails the public_emails property +// returns a *Public_emailsRequestBuilder when successful +func (m *UserRequestBuilder) Public_emails()(*Public_emailsRequestBuilder) { + return NewPublic_emailsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repos the repos property +// returns a *ReposRequestBuilder when successful +func (m *UserRequestBuilder) Repos()(*ReposRequestBuilder) { + return NewReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repository_invitations the repository_invitations property +// returns a *Repository_invitationsRequestBuilder when successful +func (m *UserRequestBuilder) Repository_invitations()(*Repository_invitationsRequestBuilder) { + return NewRepository_invitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Social_accounts the social_accounts property +// returns a *Social_accountsRequestBuilder when successful +func (m *UserRequestBuilder) Social_accounts()(*Social_accountsRequestBuilder) { + return NewSocial_accountsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Ssh_signing_keys the ssh_signing_keys property +// returns a *Ssh_signing_keysRequestBuilder when successful +func (m *UserRequestBuilder) Ssh_signing_keys()(*Ssh_signing_keysRequestBuilder) { + return NewSsh_signing_keysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Starred the starred property +// returns a *StarredRequestBuilder when successful +func (m *UserRequestBuilder) Starred()(*StarredRequestBuilder) { + return NewStarredRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Subscriptions the subscriptions property +// returns a *SubscriptionsRequestBuilder when successful +func (m *UserRequestBuilder) Subscriptions()(*SubscriptionsRequestBuilder) { + return NewSubscriptionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +// returns a *TeamsRequestBuilder when successful +func (m *UserRequestBuilder) Teams()(*TeamsRequestBuilder) { + return NewTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation oAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. +// returns a *RequestInformation when successful +func (m *UserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. +// returns a *RequestInformation when successful +func (m *UserRequestBuilder) ToPatchRequestInformation(ctx context.Context, body UserPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *UserRequestBuilder when successful +func (m *UserRequestBuilder) WithUrl(rawUrl string)(*UserRequestBuilder) { + return NewUserRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/user/with_account_item_request_builder.go b/pkg/github/user/with_account_item_request_builder.go new file mode 100644 index 0000000..df0933b --- /dev/null +++ b/pkg/github/user/with_account_item_request_builder.go @@ -0,0 +1,145 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithAccount_ItemRequestBuilder builds and executes requests for operations under \user\{account_id} +type WithAccount_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// WithAccount_GetResponse composed type wrapper for classes i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +type WithAccount_GetResponse struct { + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable + privateUser i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable + publicUser i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +} +// NewWithAccount_GetResponse instantiates a new WithAccount_GetResponse and sets the default values. +func NewWithAccount_GetResponse()(*WithAccount_GetResponse) { + m := &WithAccount_GetResponse{ + } + return m +} +// CreateWithAccount_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWithAccount_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWithAccount_GetResponse() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WithAccount_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WithAccount_GetResponse) GetIsComposedType()(bool) { + return true +} +// GetPrivateUser gets the privateUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable +// returns a PrivateUserable when successful +func (m *WithAccount_GetResponse) GetPrivateUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable) { + return m.privateUser +} +// GetPublicUser gets the publicUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +// returns a PublicUserable when successful +func (m *WithAccount_GetResponse) GetPublicUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable) { + return m.publicUser +} +// Serialize serializes information the current object +func (m *WithAccount_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPrivateUser() != nil { + err := writer.WriteObjectValue("", m.GetPrivateUser()) + if err != nil { + return err + } + } else if m.GetPublicUser() != nil { + err := writer.WriteObjectValue("", m.GetPublicUser()) + if err != nil { + return err + } + } + return nil +} +// SetPrivateUser sets the privateUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable +func (m *WithAccount_GetResponse) SetPrivateUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable)() { + m.privateUser = value +} +// SetPublicUser sets the publicUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +func (m *WithAccount_GetResponse) SetPublicUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable)() { + m.publicUser = value +} +type WithAccount_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrivateUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable) + GetPublicUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable) + SetPrivateUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable)() + SetPublicUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable)() +} +// NewWithAccount_ItemRequestBuilderInternal instantiates a new WithAccount_ItemRequestBuilder and sets the default values. +func NewWithAccount_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAccount_ItemRequestBuilder) { + m := &WithAccount_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/{account_id}", pathParameters), + } + return m +} +// NewWithAccount_ItemRequestBuilder instantiates a new WithAccount_ItemRequestBuilder and sets the default values. +func NewWithAccount_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAccount_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub Enterprise Cloud [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub Enterprise Cloud. For more information, see [Authentication](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/enterprise-cloud@latest//rest/users/emails)". +// returns a WithAccount_GetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/users#get-a-user-using-their-id +func (m *WithAccount_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(WithAccount_GetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateWithAccount_GetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(WithAccount_GetResponseable), nil +} +// ToGetRequestInformation provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub Enterprise Cloud [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub Enterprise Cloud. For more information, see [Authentication](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/enterprise-cloud@latest//rest/users/emails)". +// returns a *RequestInformation when successful +func (m *WithAccount_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithAccount_ItemRequestBuilder when successful +func (m *WithAccount_ItemRequestBuilder) WithUrl(rawUrl string)(*WithAccount_ItemRequestBuilder) { + return NewWithAccount_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go b/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go new file mode 100644 index 0000000..d9ad67a --- /dev/null +++ b/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go @@ -0,0 +1,42 @@ +package hovercard +import ( + "errors" +) +type GetSubject_typeQueryParameterType int + +const ( + ORGANIZATION_GETSUBJECT_TYPEQUERYPARAMETERTYPE GetSubject_typeQueryParameterType = iota + REPOSITORY_GETSUBJECT_TYPEQUERYPARAMETERTYPE + ISSUE_GETSUBJECT_TYPEQUERYPARAMETERTYPE + PULL_REQUEST_GETSUBJECT_TYPEQUERYPARAMETERTYPE +) + +func (i GetSubject_typeQueryParameterType) String() string { + return []string{"organization", "repository", "issue", "pull_request"}[i] +} +func ParseGetSubject_typeQueryParameterType(v string) (any, error) { + result := ORGANIZATION_GETSUBJECT_TYPEQUERYPARAMETERTYPE + switch v { + case "organization": + result = ORGANIZATION_GETSUBJECT_TYPEQUERYPARAMETERTYPE + case "repository": + result = REPOSITORY_GETSUBJECT_TYPEQUERYPARAMETERTYPE + case "issue": + result = ISSUE_GETSUBJECT_TYPEQUERYPARAMETERTYPE + case "pull_request": + result = PULL_REQUEST_GETSUBJECT_TYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSubject_typeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSubject_typeQueryParameterType(values []GetSubject_typeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSubject_typeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/packages/get_package_type_query_parameter_type.go b/pkg/github/users/item/packages/get_package_type_query_parameter_type.go new file mode 100644 index 0000000..ae4025d --- /dev/null +++ b/pkg/github/users/item/packages/get_package_type_query_parameter_type.go @@ -0,0 +1,48 @@ +package packages +import ( + "errors" +) +type GetPackage_typeQueryParameterType int + +const ( + NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE GetPackage_typeQueryParameterType = iota + MAVEN_GETPACKAGE_TYPEQUERYPARAMETERTYPE + RUBYGEMS_GETPACKAGE_TYPEQUERYPARAMETERTYPE + DOCKER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + NUGET_GETPACKAGE_TYPEQUERYPARAMETERTYPE + CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE +) + +func (i GetPackage_typeQueryParameterType) String() string { + return []string{"npm", "maven", "rubygems", "docker", "nuget", "container"}[i] +} +func ParseGetPackage_typeQueryParameterType(v string) (any, error) { + result := NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE + switch v { + case "npm": + result = NPM_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "maven": + result = MAVEN_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "rubygems": + result = RUBYGEMS_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "docker": + result = DOCKER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "nuget": + result = NUGET_GETPACKAGE_TYPEQUERYPARAMETERTYPE + case "container": + result = CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetPackage_typeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetPackage_typeQueryParameterType(values []GetPackage_typeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetPackage_typeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/packages/get_visibility_query_parameter_type.go b/pkg/github/users/item/packages/get_visibility_query_parameter_type.go new file mode 100644 index 0000000..daf1c43 --- /dev/null +++ b/pkg/github/users/item/packages/get_visibility_query_parameter_type.go @@ -0,0 +1,39 @@ +package packages +import ( + "errors" +) +type GetVisibilityQueryParameterType int + +const ( + PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE GetVisibilityQueryParameterType = iota + PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE +) + +func (i GetVisibilityQueryParameterType) String() string { + return []string{"public", "private", "internal"}[i] +} +func ParseGetVisibilityQueryParameterType(v string) (any, error) { + result := PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + switch v { + case "public": + result = PUBLIC_GETVISIBILITYQUERYPARAMETERTYPE + case "private": + result = PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE + case "internal": + result = INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetVisibilityQueryParameterType(values []GetVisibilityQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetVisibilityQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/projects/get_state_query_parameter_type.go b/pkg/github/users/item/projects/get_state_query_parameter_type.go new file mode 100644 index 0000000..985374b --- /dev/null +++ b/pkg/github/users/item/projects/get_state_query_parameter_type.go @@ -0,0 +1,39 @@ +package projects +import ( + "errors" +) +type GetStateQueryParameterType int + +const ( + OPEN_GETSTATEQUERYPARAMETERTYPE GetStateQueryParameterType = iota + CLOSED_GETSTATEQUERYPARAMETERTYPE + ALL_GETSTATEQUERYPARAMETERTYPE +) + +func (i GetStateQueryParameterType) String() string { + return []string{"open", "closed", "all"}[i] +} +func ParseGetStateQueryParameterType(v string) (any, error) { + result := OPEN_GETSTATEQUERYPARAMETERTYPE + switch v { + case "open": + result = OPEN_GETSTATEQUERYPARAMETERTYPE + case "closed": + result = CLOSED_GETSTATEQUERYPARAMETERTYPE + case "all": + result = ALL_GETSTATEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetStateQueryParameterType(values []GetStateQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetStateQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/repos/get_direction_query_parameter_type.go b/pkg/github/users/item/repos/get_direction_query_parameter_type.go new file mode 100644 index 0000000..afa5d0f --- /dev/null +++ b/pkg/github/users/item/repos/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package repos +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/repos/get_sort_query_parameter_type.go b/pkg/github/users/item/repos/get_sort_query_parameter_type.go new file mode 100644 index 0000000..8dee1bb --- /dev/null +++ b/pkg/github/users/item/repos/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package repos +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE + PUSHED_GETSORTQUERYPARAMETERTYPE + FULL_NAME_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated", "pushed", "full_name"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "pushed": + result = PUSHED_GETSORTQUERYPARAMETERTYPE + case "full_name": + result = FULL_NAME_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/repos/get_type_query_parameter_type.go b/pkg/github/users/item/repos/get_type_query_parameter_type.go new file mode 100644 index 0000000..6ae776f --- /dev/null +++ b/pkg/github/users/item/repos/get_type_query_parameter_type.go @@ -0,0 +1,39 @@ +package repos +import ( + "errors" +) +type GetTypeQueryParameterType int + +const ( + ALL_GETTYPEQUERYPARAMETERTYPE GetTypeQueryParameterType = iota + OWNER_GETTYPEQUERYPARAMETERTYPE + MEMBER_GETTYPEQUERYPARAMETERTYPE +) + +func (i GetTypeQueryParameterType) String() string { + return []string{"all", "owner", "member"}[i] +} +func ParseGetTypeQueryParameterType(v string) (any, error) { + result := ALL_GETTYPEQUERYPARAMETERTYPE + switch v { + case "all": + result = ALL_GETTYPEQUERYPARAMETERTYPE + case "owner": + result = OWNER_GETTYPEQUERYPARAMETERTYPE + case "member": + result = MEMBER_GETTYPEQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetTypeQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/starred/get_direction_query_parameter_type.go b/pkg/github/users/item/starred/get_direction_query_parameter_type.go new file mode 100644 index 0000000..3ac3d71 --- /dev/null +++ b/pkg/github/users/item/starred/get_direction_query_parameter_type.go @@ -0,0 +1,36 @@ +package starred +import ( + "errors" +) +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item/starred/get_sort_query_parameter_type.go b/pkg/github/users/item/starred/get_sort_query_parameter_type.go new file mode 100644 index 0000000..604bb06 --- /dev/null +++ b/pkg/github/users/item/starred/get_sort_query_parameter_type.go @@ -0,0 +1,36 @@ +package starred +import ( + "errors" +) +type GetSortQueryParameterType int + +const ( + CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + UPDATED_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"created", "updated"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := CREATED_GETSORTQUERYPARAMETERTYPE + switch v { + case "created": + result = CREATED_GETSORTQUERYPARAMETERTYPE + case "updated": + result = UPDATED_GETSORTQUERYPARAMETERTYPE + default: + return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/users/item_attestations_item_with_subject_digest_get_response.go b/pkg/github/users/item_attestations_item_with_subject_digest_get_response.go new file mode 100644 index 0000000..8ede31c --- /dev/null +++ b/pkg/github/users/item_attestations_item_with_subject_digest_get_response.go @@ -0,0 +1,92 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The attestations property + attestations []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable +} +// NewItemAttestationsItemWithSubject_digestGetResponse instantiates a new ItemAttestationsItemWithSubject_digestGetResponse and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse()(*ItemAttestationsItemWithSubject_digestGetResponse) { + m := &ItemAttestationsItemWithSubject_digestGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttestations gets the attestations property value. The attestations property +// returns a []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) { + return m.attestations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + } + } + m.SetAttestations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttestations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttestations())) + for i, v := range m.GetAttestations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attestations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemAttestationsItemWithSubject_digestGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttestations sets the attestations property value. The attestations property +func (m *ItemAttestationsItemWithSubject_digestGetResponse) SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() { + m.attestations = value +} +type ItemAttestationsItemWithSubject_digestGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() +} diff --git a/pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go b/pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go new file mode 100644 index 0000000..c181377 --- /dev/null +++ b/pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go @@ -0,0 +1,110 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Sigstore Bundle v0.1 + bundle i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SigstoreBundle0able + // The repository_id property + repository_id *int32 +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. Sigstore Bundle v0.1 +// returns a SigstoreBundle0able when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SigstoreBundle0able) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSigstoreBundle0FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SigstoreBundle0able)) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. Sigstore Bundle v0.1 +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SigstoreBundle0able)() { + m.bundle = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SigstoreBundle0able) + GetRepositoryId()(*int32) + SetBundle(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SigstoreBundle0able)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/users/item_attestations_request_builder.go b/pkg/github/users/item_attestations_request_builder.go new file mode 100644 index 0000000..efd8d93 --- /dev/null +++ b/pkg/github/users/item_attestations_request_builder.go @@ -0,0 +1,35 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemAttestationsRequestBuilder builds and executes requests for operations under \users\{username}\attestations +type ItemAttestationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySubject_digest gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item.attestations.item collection +// returns a *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsRequestBuilder) BySubject_digest(subject_digest string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if subject_digest != "" { + urlTplParams["subject_digest"] = subject_digest + } + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemAttestationsRequestBuilderInternal instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + m := &ItemAttestationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/attestations", pathParameters), + } + return m +} +// NewItemAttestationsRequestBuilder instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go b/pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go new file mode 100644 index 0000000..c0455b9 --- /dev/null +++ b/pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go @@ -0,0 +1,70 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemAttestationsWithSubject_digestItemRequestBuilder builds and executes requests for operations under \users\{username}\attestations\{subject_digest} +type ItemAttestationsWithSubject_digestItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters list a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +type ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Before *string `uriparametername:"before"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + m := &ItemAttestationsWithSubject_digestItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + } + return m +} +// NewItemAttestationsWithSubject_digestItemRequestBuilder instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemAttestationsItemWithSubject_digestGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/attestations#list-attestations +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(ItemAttestationsItemWithSubject_digestGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemAttestationsItemWithSubject_digestGetResponseable), nil +} +// ToGetRequestInformation list a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/enterprise-cloud@latest//actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) WithUrl(rawUrl string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + return NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_docker_conflicts_request_builder.go b/pkg/github/users/item_docker_conflicts_request_builder.go new file mode 100644 index 0000000..d7c2c44 --- /dev/null +++ b/pkg/github/users/item_docker_conflicts_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemDockerConflictsRequestBuilder builds and executes requests for operations under \users\{username}\docker\conflicts +type ItemDockerConflictsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemDockerConflictsRequestBuilderInternal instantiates a new ItemDockerConflictsRequestBuilder and sets the default values. +func NewItemDockerConflictsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerConflictsRequestBuilder) { + m := &ItemDockerConflictsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/docker/conflicts", pathParameters), + } + return m +} +// NewItemDockerConflictsRequestBuilder instantiates a new ItemDockerConflictsRequestBuilder and sets the default values. +func NewItemDockerConflictsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerConflictsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDockerConflictsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all packages that are in a specific user's namespace, that the requesting user has access to, and that encountered a conflict during Docker migration.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. +// returns a []PackageEscapedable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-user +func (m *ItemDockerConflictsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable) + } + } + return val, nil +} +// ToGetRequestInformation lists all packages that are in a specific user's namespace, that the requesting user has access to, and that encountered a conflict during Docker migration.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemDockerConflictsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemDockerConflictsRequestBuilder when successful +func (m *ItemDockerConflictsRequestBuilder) WithUrl(rawUrl string)(*ItemDockerConflictsRequestBuilder) { + return NewItemDockerConflictsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_docker_request_builder.go b/pkg/github/users/item_docker_request_builder.go new file mode 100644 index 0000000..7b9159d --- /dev/null +++ b/pkg/github/users/item_docker_request_builder.go @@ -0,0 +1,28 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemDockerRequestBuilder builds and executes requests for operations under \users\{username}\docker +type ItemDockerRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Conflicts the conflicts property +// returns a *ItemDockerConflictsRequestBuilder when successful +func (m *ItemDockerRequestBuilder) Conflicts()(*ItemDockerConflictsRequestBuilder) { + return NewItemDockerConflictsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemDockerRequestBuilderInternal instantiates a new ItemDockerRequestBuilder and sets the default values. +func NewItemDockerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerRequestBuilder) { + m := &ItemDockerRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/docker", pathParameters), + } + return m +} +// NewItemDockerRequestBuilder instantiates a new ItemDockerRequestBuilder and sets the default values. +func NewItemDockerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDockerRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemDockerRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/users/item_events_orgs_request_builder.go b/pkg/github/users/item_events_orgs_request_builder.go new file mode 100644 index 0000000..936bf64 --- /dev/null +++ b/pkg/github/users/item_events_orgs_request_builder.go @@ -0,0 +1,35 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemEventsOrgsRequestBuilder builds and executes requests for operations under \users\{username}\events\orgs +type ItemEventsOrgsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByOrg gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item.events.orgs.item collection +// returns a *ItemEventsOrgsWithOrgItemRequestBuilder when successful +func (m *ItemEventsOrgsRequestBuilder) ByOrg(org string)(*ItemEventsOrgsWithOrgItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if org != "" { + urlTplParams["org"] = org + } + return NewItemEventsOrgsWithOrgItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemEventsOrgsRequestBuilderInternal instantiates a new ItemEventsOrgsRequestBuilder and sets the default values. +func NewItemEventsOrgsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsOrgsRequestBuilder) { + m := &ItemEventsOrgsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/events/orgs", pathParameters), + } + return m +} +// NewItemEventsOrgsRequestBuilder instantiates a new ItemEventsOrgsRequestBuilder and sets the default values. +func NewItemEventsOrgsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsOrgsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemEventsOrgsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/users/item_events_orgs_with_org_item_request_builder.go b/pkg/github/users/item_events_orgs_with_org_item_request_builder.go new file mode 100644 index 0000000..0ff7f82 --- /dev/null +++ b/pkg/github/users/item_events_orgs_with_org_item_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemEventsOrgsWithOrgItemRequestBuilder builds and executes requests for operations under \users\{username}\events\orgs\{org} +type ItemEventsOrgsWithOrgItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemEventsOrgsWithOrgItemRequestBuilderGetQueryParameters this is the user's organization dashboard. You must be authenticated as the user to view this. +type ItemEventsOrgsWithOrgItemRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemEventsOrgsWithOrgItemRequestBuilderInternal instantiates a new ItemEventsOrgsWithOrgItemRequestBuilder and sets the default values. +func NewItemEventsOrgsWithOrgItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsOrgsWithOrgItemRequestBuilder) { + m := &ItemEventsOrgsWithOrgItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/events/orgs/{org}{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemEventsOrgsWithOrgItemRequestBuilder instantiates a new ItemEventsOrgsWithOrgItemRequestBuilder and sets the default values. +func NewItemEventsOrgsWithOrgItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsOrgsWithOrgItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemEventsOrgsWithOrgItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get this is the user's organization dashboard. You must be authenticated as the user to view this. +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-organization-events-for-the-authenticated-user +func (m *ItemEventsOrgsWithOrgItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsOrgsWithOrgItemRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// ToGetRequestInformation this is the user's organization dashboard. You must be authenticated as the user to view this. +// returns a *RequestInformation when successful +func (m *ItemEventsOrgsWithOrgItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsOrgsWithOrgItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemEventsOrgsWithOrgItemRequestBuilder when successful +func (m *ItemEventsOrgsWithOrgItemRequestBuilder) WithUrl(rawUrl string)(*ItemEventsOrgsWithOrgItemRequestBuilder) { + return NewItemEventsOrgsWithOrgItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_events_public_request_builder.go b/pkg/github/users/item_events_public_request_builder.go new file mode 100644 index 0000000..67c0f06 --- /dev/null +++ b/pkg/github/users/item_events_public_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemEventsPublicRequestBuilder builds and executes requests for operations under \users\{username}\events\public +type ItemEventsPublicRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemEventsPublicRequestBuilderGetQueryParameters list public events for a user +type ItemEventsPublicRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemEventsPublicRequestBuilderInternal instantiates a new ItemEventsPublicRequestBuilder and sets the default values. +func NewItemEventsPublicRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsPublicRequestBuilder) { + m := &ItemEventsPublicRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/events/public{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemEventsPublicRequestBuilder instantiates a new ItemEventsPublicRequestBuilder and sets the default values. +func NewItemEventsPublicRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsPublicRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemEventsPublicRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list public events for a user +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-public-events-for-a-user +func (m *ItemEventsPublicRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsPublicRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// returns a *RequestInformation when successful +func (m *ItemEventsPublicRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsPublicRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemEventsPublicRequestBuilder when successful +func (m *ItemEventsPublicRequestBuilder) WithUrl(rawUrl string)(*ItemEventsPublicRequestBuilder) { + return NewItemEventsPublicRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_events_request_builder.go b/pkg/github/users/item_events_request_builder.go new file mode 100644 index 0000000..d6f7c16 --- /dev/null +++ b/pkg/github/users/item_events_request_builder.go @@ -0,0 +1,77 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemEventsRequestBuilder builds and executes requests for operations under \users\{username}\events +type ItemEventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemEventsRequestBuilderGetQueryParameters if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. +type ItemEventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemEventsRequestBuilderInternal instantiates a new ItemEventsRequestBuilder and sets the default values. +func NewItemEventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsRequestBuilder) { + m := &ItemEventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemEventsRequestBuilder instantiates a new ItemEventsRequestBuilder and sets the default values. +func NewItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemEventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemEventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-events-for-the-authenticated-user +func (m *ItemEventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// Orgs the orgs property +// returns a *ItemEventsOrgsRequestBuilder when successful +func (m *ItemEventsRequestBuilder) Orgs()(*ItemEventsOrgsRequestBuilder) { + return NewItemEventsOrgsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Public the public property +// returns a *ItemEventsPublicRequestBuilder when successful +func (m *ItemEventsRequestBuilder) Public()(*ItemEventsPublicRequestBuilder) { + return NewItemEventsPublicRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. +// returns a *RequestInformation when successful +func (m *ItemEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemEventsRequestBuilder when successful +func (m *ItemEventsRequestBuilder) WithUrl(rawUrl string)(*ItemEventsRequestBuilder) { + return NewItemEventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_followers_request_builder.go b/pkg/github/users/item_followers_request_builder.go new file mode 100644 index 0000000..2993456 --- /dev/null +++ b/pkg/github/users/item_followers_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemFollowersRequestBuilder builds and executes requests for operations under \users\{username}\followers +type ItemFollowersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemFollowersRequestBuilderGetQueryParameters lists the people following the specified user. +type ItemFollowersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemFollowersRequestBuilderInternal instantiates a new ItemFollowersRequestBuilder and sets the default values. +func NewItemFollowersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFollowersRequestBuilder) { + m := &ItemFollowersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/followers{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemFollowersRequestBuilder instantiates a new ItemFollowersRequestBuilder and sets the default values. +func NewItemFollowersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFollowersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemFollowersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the people following the specified user. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#list-followers-of-a-user +func (m *ItemFollowersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemFollowersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the people following the specified user. +// returns a *RequestInformation when successful +func (m *ItemFollowersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemFollowersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemFollowersRequestBuilder when successful +func (m *ItemFollowersRequestBuilder) WithUrl(rawUrl string)(*ItemFollowersRequestBuilder) { + return NewItemFollowersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_following_request_builder.go b/pkg/github/users/item_following_request_builder.go new file mode 100644 index 0000000..cd54364 --- /dev/null +++ b/pkg/github/users/item_following_request_builder.go @@ -0,0 +1,79 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemFollowingRequestBuilder builds and executes requests for operations under \users\{username}\following +type ItemFollowingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemFollowingRequestBuilderGetQueryParameters lists the people who the specified user follows. +type ItemFollowingRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByTarget_user gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item.following.item collection +// returns a *ItemFollowingWithTarget_userItemRequestBuilder when successful +func (m *ItemFollowingRequestBuilder) ByTarget_user(target_user string)(*ItemFollowingWithTarget_userItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if target_user != "" { + urlTplParams["target_user"] = target_user + } + return NewItemFollowingWithTarget_userItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemFollowingRequestBuilderInternal instantiates a new ItemFollowingRequestBuilder and sets the default values. +func NewItemFollowingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFollowingRequestBuilder) { + m := &ItemFollowingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/following{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemFollowingRequestBuilder instantiates a new ItemFollowingRequestBuilder and sets the default values. +func NewItemFollowingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFollowingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemFollowingRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the people who the specified user follows. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#list-the-people-a-user-follows +func (m *ItemFollowingRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemFollowingRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists the people who the specified user follows. +// returns a *RequestInformation when successful +func (m *ItemFollowingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemFollowingRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemFollowingRequestBuilder when successful +func (m *ItemFollowingRequestBuilder) WithUrl(rawUrl string)(*ItemFollowingRequestBuilder) { + return NewItemFollowingRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_following_with_target_user_item_request_builder.go b/pkg/github/users/item_following_with_target_user_item_request_builder.go new file mode 100644 index 0000000..701e53d --- /dev/null +++ b/pkg/github/users/item_following_with_target_user_item_request_builder.go @@ -0,0 +1,50 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemFollowingWithTarget_userItemRequestBuilder builds and executes requests for operations under \users\{username}\following\{target_user} +type ItemFollowingWithTarget_userItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemFollowingWithTarget_userItemRequestBuilderInternal instantiates a new ItemFollowingWithTarget_userItemRequestBuilder and sets the default values. +func NewItemFollowingWithTarget_userItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFollowingWithTarget_userItemRequestBuilder) { + m := &ItemFollowingWithTarget_userItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/following/{target_user}", pathParameters), + } + return m +} +// NewItemFollowingWithTarget_userItemRequestBuilder instantiates a new ItemFollowingWithTarget_userItemRequestBuilder and sets the default values. +func NewItemFollowingWithTarget_userItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemFollowingWithTarget_userItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemFollowingWithTarget_userItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get check if a user follows another user +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/followers#check-if-a-user-follows-another-user +func (m *ItemFollowingWithTarget_userItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// returns a *RequestInformation when successful +func (m *ItemFollowingWithTarget_userItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemFollowingWithTarget_userItemRequestBuilder when successful +func (m *ItemFollowingWithTarget_userItemRequestBuilder) WithUrl(rawUrl string)(*ItemFollowingWithTarget_userItemRequestBuilder) { + return NewItemFollowingWithTarget_userItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_gists_request_builder.go b/pkg/github/users/item_gists_request_builder.go new file mode 100644 index 0000000..7d69027 --- /dev/null +++ b/pkg/github/users/item_gists_request_builder.go @@ -0,0 +1,74 @@ +package users + +import ( + "context" + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemGistsRequestBuilder builds and executes requests for operations under \users\{username}\gists +type ItemGistsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGistsRequestBuilderGetQueryParameters lists public gists for the specified user: +type ItemGistsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` +} +// NewItemGistsRequestBuilderInternal instantiates a new ItemGistsRequestBuilder and sets the default values. +func NewItemGistsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGistsRequestBuilder) { + m := &ItemGistsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/gists{?page*,per_page*,since*}", pathParameters), + } + return m +} +// NewItemGistsRequestBuilder instantiates a new ItemGistsRequestBuilder and sets the default values. +func NewItemGistsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGistsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGistsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists public gists for the specified user: +// returns a []BaseGistable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/gists/gists#list-gists-for-a-user +func (m *ItemGistsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemGistsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBaseGistFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BaseGistable) + } + } + return val, nil +} +// ToGetRequestInformation lists public gists for the specified user: +// returns a *RequestInformation when successful +func (m *ItemGistsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemGistsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemGistsRequestBuilder when successful +func (m *ItemGistsRequestBuilder) WithUrl(rawUrl string)(*ItemGistsRequestBuilder) { + return NewItemGistsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_gpg_keys_request_builder.go b/pkg/github/users/item_gpg_keys_request_builder.go new file mode 100644 index 0000000..e45671e --- /dev/null +++ b/pkg/github/users/item_gpg_keys_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemGpg_keysRequestBuilder builds and executes requests for operations under \users\{username}\gpg_keys +type ItemGpg_keysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGpg_keysRequestBuilderGetQueryParameters lists the GPG keys for a user. This information is accessible by anyone. +type ItemGpg_keysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemGpg_keysRequestBuilderInternal instantiates a new ItemGpg_keysRequestBuilder and sets the default values. +func NewItemGpg_keysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGpg_keysRequestBuilder) { + m := &ItemGpg_keysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/gpg_keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemGpg_keysRequestBuilder instantiates a new ItemGpg_keysRequestBuilder and sets the default values. +func NewItemGpg_keysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGpg_keysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGpg_keysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the GPG keys for a user. This information is accessible by anyone. +// returns a []GpgKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/gpg-keys#list-gpg-keys-for-a-user +func (m *ItemGpg_keysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemGpg_keysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateGpgKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.GpgKeyable) + } + } + return val, nil +} +// ToGetRequestInformation lists the GPG keys for a user. This information is accessible by anyone. +// returns a *RequestInformation when successful +func (m *ItemGpg_keysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemGpg_keysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemGpg_keysRequestBuilder when successful +func (m *ItemGpg_keysRequestBuilder) WithUrl(rawUrl string)(*ItemGpg_keysRequestBuilder) { + return NewItemGpg_keysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_hovercard_request_builder.go b/pkg/github/users/item_hovercard_request_builder.go new file mode 100644 index 0000000..b7483cd --- /dev/null +++ b/pkg/github/users/item_hovercard_request_builder.go @@ -0,0 +1,71 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + icb8b2c63d089ed45c42537efabe6761ef5ff556b8e01f9d13f79e9bbd9f326cf "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/users/item/hovercard" +) + +// ItemHovercardRequestBuilder builds and executes requests for operations under \users\{username}\hovercard +type ItemHovercardRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemHovercardRequestBuilderGetQueryParameters provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +type ItemHovercardRequestBuilderGetQueryParameters struct { + // Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. + Subject_id *string `uriparametername:"subject_id"` + // Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. + Subject_type *icb8b2c63d089ed45c42537efabe6761ef5ff556b8e01f9d13f79e9bbd9f326cf.GetSubject_typeQueryParameterType `uriparametername:"subject_type"` +} +// NewItemHovercardRequestBuilderInternal instantiates a new ItemHovercardRequestBuilder and sets the default values. +func NewItemHovercardRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHovercardRequestBuilder) { + m := &ItemHovercardRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/hovercard{?subject_id*,subject_type*}", pathParameters), + } + return m +} +// NewItemHovercardRequestBuilder instantiates a new ItemHovercardRequestBuilder and sets the default values. +func NewItemHovercardRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHovercardRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemHovercardRequestBuilderInternal(urlParams, requestAdapter) +} +// Get provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a Hovercardable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/users#get-contextual-information-for-a-user +func (m *ItemHovercardRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHovercardRequestBuilderGetQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hovercardable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateHovercardFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Hovercardable), nil +} +// ToGetRequestInformation provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemHovercardRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHovercardRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemHovercardRequestBuilder when successful +func (m *ItemHovercardRequestBuilder) WithUrl(rawUrl string)(*ItemHovercardRequestBuilder) { + return NewItemHovercardRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_installation_request_builder.go b/pkg/github/users/item_installation_request_builder.go new file mode 100644 index 0000000..4f759d3 --- /dev/null +++ b/pkg/github/users/item_installation_request_builder.go @@ -0,0 +1,57 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemInstallationRequestBuilder builds and executes requests for operations under \users\{username}\installation +type ItemInstallationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemInstallationRequestBuilderInternal instantiates a new ItemInstallationRequestBuilder and sets the default values. +func NewItemInstallationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInstallationRequestBuilder) { + m := &ItemInstallationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/installation", pathParameters), + } + return m +} +// NewItemInstallationRequestBuilder instantiates a new ItemInstallationRequestBuilder and sets the default values. +func NewItemInstallationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInstallationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInstallationRequestBuilderInternal(urlParams, requestAdapter) +} +// Get enables an authenticated GitHub App to find the user’s installation information.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a Installationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-a-user-installation-for-the-authenticated-app +func (m *ItemInstallationRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateInstallationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Installationable), nil +} +// ToGetRequestInformation enables an authenticated GitHub App to find the user’s installation information.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// returns a *RequestInformation when successful +func (m *ItemInstallationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInstallationRequestBuilder when successful +func (m *ItemInstallationRequestBuilder) WithUrl(rawUrl string)(*ItemInstallationRequestBuilder) { + return NewItemInstallationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_keys_request_builder.go b/pkg/github/users/item_keys_request_builder.go new file mode 100644 index 0000000..8f487a2 --- /dev/null +++ b/pkg/github/users/item_keys_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemKeysRequestBuilder builds and executes requests for operations under \users\{username}\keys +type ItemKeysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemKeysRequestBuilderGetQueryParameters lists the _verified_ public SSH keys for a user. This is accessible by anyone. +type ItemKeysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemKeysRequestBuilderInternal instantiates a new ItemKeysRequestBuilder and sets the default values. +func NewItemKeysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemKeysRequestBuilder) { + m := &ItemKeysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemKeysRequestBuilder instantiates a new ItemKeysRequestBuilder and sets the default values. +func NewItemKeysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemKeysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemKeysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the _verified_ public SSH keys for a user. This is accessible by anyone. +// returns a []KeySimpleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/keys#list-public-keys-for-a-user +func (m *ItemKeysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemKeysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.KeySimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateKeySimpleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.KeySimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.KeySimpleable) + } + } + return val, nil +} +// ToGetRequestInformation lists the _verified_ public SSH keys for a user. This is accessible by anyone. +// returns a *RequestInformation when successful +func (m *ItemKeysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemKeysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemKeysRequestBuilder when successful +func (m *ItemKeysRequestBuilder) WithUrl(rawUrl string)(*ItemKeysRequestBuilder) { + return NewItemKeysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_orgs_request_builder.go b/pkg/github/users/item_orgs_request_builder.go new file mode 100644 index 0000000..1220a99 --- /dev/null +++ b/pkg/github/users/item_orgs_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemOrgsRequestBuilder builds and executes requests for operations under \users\{username}\orgs +type ItemOrgsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOrgsRequestBuilderGetQueryParameters list [public organization memberships](https://docs.github.com/enterprise-cloud@latest//articles/publicizing-or-concealing-organization-membership) for the specified user.This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. +type ItemOrgsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemOrgsRequestBuilderInternal instantiates a new ItemOrgsRequestBuilder and sets the default values. +func NewItemOrgsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrgsRequestBuilder) { + m := &ItemOrgsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/orgs{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemOrgsRequestBuilder instantiates a new ItemOrgsRequestBuilder and sets the default values. +func NewItemOrgsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOrgsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOrgsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list [public organization memberships](https://docs.github.com/enterprise-cloud@latest//articles/publicizing-or-concealing-organization-membership) for the specified user.This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. +// returns a []OrganizationSimpleable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-organizations-for-a-user +func (m *ItemOrgsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOrgsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateOrganizationSimpleFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.OrganizationSimpleable) + } + } + return val, nil +} +// ToGetRequestInformation list [public organization memberships](https://docs.github.com/enterprise-cloud@latest//articles/publicizing-or-concealing-organization-membership) for the specified user.This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. +// returns a *RequestInformation when successful +func (m *ItemOrgsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemOrgsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemOrgsRequestBuilder when successful +func (m *ItemOrgsRequestBuilder) WithUrl(rawUrl string)(*ItemOrgsRequestBuilder) { + return NewItemOrgsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_item_item_restore_request_builder.go b/pkg/github/users/item_packages_item_item_restore_request_builder.go new file mode 100644 index 0000000..048ffe8 --- /dev/null +++ b/pkg/github/users/item_packages_item_item_restore_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemRestoreRequestBuilder builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\restore +type ItemPackagesItemItemRestoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters struct { + // package token + Token *string `uriparametername:"token"` +} +// NewItemPackagesItemItemRestoreRequestBuilderInternal instantiates a new ItemPackagesItemItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemRestoreRequestBuilder) { + m := &ItemPackagesItemItemRestoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/restore{?token*}", pathParameters), + } + return m +} +// NewItemPackagesItemItemRestoreRequestBuilder instantiates a new ItemPackagesItemItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemRestoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemRestoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Post restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#restore-a-package-for-a-user +func (m *ItemPackagesItemItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemItemRestoreRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemRestoreRequestBuilder) { + return NewItemPackagesItemItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go b/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go new file mode 100644 index 0000000..8d96a34 --- /dev/null +++ b/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go @@ -0,0 +1,61 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemVersionsItemRestoreRequestBuilder builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\versions\{package_version_id}\restore +type ItemPackagesItemItemVersionsItemRestoreRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal instantiates a new ItemPackagesItemItemVersionsItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + m := &ItemPackagesItemItemVersionsItemRestoreRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", pathParameters), + } + return m +} +// NewItemPackagesItemItemVersionsItemRestoreRequestBuilder instantiates a new ItemPackagesItemItemVersionsItemRestoreRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) +} +// Post restores a specific package version for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#restore-package-version-for-a-user +func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation restores a specific package version for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemVersionsItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + return NewItemPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_item_item_versions_request_builder.go b/pkg/github/users/item_packages_item_item_versions_request_builder.go new file mode 100644 index 0000000..494cf5b --- /dev/null +++ b/pkg/github/users/item_packages_item_item_versions_request_builder.go @@ -0,0 +1,79 @@ +package users + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemVersionsRequestBuilder builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\versions +type ItemPackagesItemItemVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByPackage_version_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item.packages.item.item.versions.item collection +// returns a *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsRequestBuilder) ByPackage_version_id(package_version_id int32)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["package_version_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(package_version_id), 10) + return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPackagesItemItemVersionsRequestBuilderInternal instantiates a new ItemPackagesItemItemVersionsRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsRequestBuilder) { + m := &ItemPackagesItemItemVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions", pathParameters), + } + return m +} +// NewItemPackagesItemItemVersionsRequestBuilder instantiates a new ItemPackagesItemItemVersionsRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists package versions for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a []PackageVersionable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#list-package-versions-for-a-package-owned-by-a-user +func (m *ItemPackagesItemItemVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageVersionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable) + } + } + return val, nil +} +// ToGetRequestInformation lists package versions for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemVersionsRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemVersionsRequestBuilder) { + return NewItemPackagesItemItemVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_item_item_versions_with_package_version_item_request_builder.go b/pkg/github/users/item_packages_item_item_versions_with_package_version_item_request_builder.go new file mode 100644 index 0000000..b8f6fe7 --- /dev/null +++ b/pkg/github/users/item_packages_item_item_versions_with_package_version_item_request_builder.go @@ -0,0 +1,93 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\versions\{package_version_id} +type ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal instantiates a new ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + m := &ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", pathParameters), + } + return m +} +// NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder instantiates a new ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder and sets the default values. +func NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#delete-package-version-for-a-user +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specific package version for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a PackageVersionable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-a-package-version-for-a-user +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageVersionFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageVersionable), nil +} +// Restore the restore property +// returns a *ItemPackagesItemItemVersionsItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Restore()(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { + return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specific package version for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder when successful +func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) { + return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_item_with_package_name_item_request_builder.go b/pkg/github/users/item_packages_item_with_package_name_item_request_builder.go new file mode 100644 index 0000000..2d0f0fb --- /dev/null +++ b/pkg/github/users/item_packages_item_with_package_name_item_request_builder.go @@ -0,0 +1,98 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemPackagesItemWithPackage_nameItemRequestBuilder builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name} +type ItemPackagesItemWithPackage_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal instantiates a new ItemPackagesItemWithPackage_nameItemRequestBuilder and sets the default values. +func NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + m := &ItemPackagesItemWithPackage_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}", pathParameters), + } + return m +} +// NewItemPackagesItemWithPackage_nameItemRequestBuilder instantiates a new ItemPackagesItemWithPackage_nameItemRequestBuilder and sets the default values. +func NewItemPackagesItemWithPackage_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#delete-a-package-for-a-user +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get gets a specific package metadata for a public package owned by a user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a PackageEscapedable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#get-a-package-for-a-user +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable), nil +} +// Restore the restore property +// returns a *ItemPackagesItemItemRestoreRequestBuilder when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Restore()(*ItemPackagesItemItemRestoreRequestBuilder) { + return NewItemPackagesItemItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a specific package metadata for a public package owned by a user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// Versions the versions property +// returns a *ItemPackagesItemItemVersionsRequestBuilder when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Versions()(*ItemPackagesItemItemVersionsRequestBuilder) { + return NewItemPackagesItemItemVersionsRequestBuilderInternal(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. +// returns a *ItemPackagesItemWithPackage_nameItemRequestBuilder when successful +func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + return NewItemPackagesItemWithPackage_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_request_builder.go b/pkg/github/users/item_packages_request_builder.go new file mode 100644 index 0000000..c35b2b1 --- /dev/null +++ b/pkg/github/users/item_packages_request_builder.go @@ -0,0 +1,90 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + iae3ed480971cc60ee161db59c693510e3b039f18d57ae5cdae97ff8338479914 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/users/item/packages" +) + +// ItemPackagesRequestBuilder builds and executes requests for operations under \users\{username}\packages +type ItemPackagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPackagesRequestBuilderGetQueryParameters lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +type ItemPackagesRequestBuilderGetQueryParameters struct { + // The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. + Package_type *iae3ed480971cc60ee161db59c693510e3b039f18d57ae5cdae97ff8338479914.GetPackage_typeQueryParameterType `uriparametername:"package_type"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The selected visibility of the packages. This parameter is optional and only filters an existing result set.The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`.For the list of GitHub Packages registries that support granular permissions, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + Visibility *iae3ed480971cc60ee161db59c693510e3b039f18d57ae5cdae97ff8338479914.GetVisibilityQueryParameterType `uriparametername:"visibility"` +} +// ByPackage_type gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item.packages.item collection +// returns a *ItemPackagesWithPackage_typeItemRequestBuilder when successful +func (m *ItemPackagesRequestBuilder) ByPackage_type(package_type string)(*ItemPackagesWithPackage_typeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if package_type != "" { + urlTplParams["package_type"] = package_type + } + return NewItemPackagesWithPackage_typeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPackagesRequestBuilderInternal instantiates a new ItemPackagesRequestBuilder and sets the default values. +func NewItemPackagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesRequestBuilder) { + m := &ItemPackagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages?package_type={package_type}{&page*,per_page*,visibility*}", pathParameters), + } + return m +} +// NewItemPackagesRequestBuilder instantiates a new ItemPackagesRequestBuilder and sets the default values. +func NewItemPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a []PackageEscapedable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/packages/packages#list-packages-for-a-user +func (m *ItemPackagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + "403": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackageEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackageEscapedable) + } + } + return val, nil +} +// ToGetRequestInformation lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// returns a *RequestInformation when successful +func (m *ItemPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemPackagesRequestBuilder when successful +func (m *ItemPackagesRequestBuilder) WithUrl(rawUrl string)(*ItemPackagesRequestBuilder) { + return NewItemPackagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_packages_with_package_type_item_request_builder.go b/pkg/github/users/item_packages_with_package_type_item_request_builder.go new file mode 100644 index 0000000..7576647 --- /dev/null +++ b/pkg/github/users/item_packages_with_package_type_item_request_builder.go @@ -0,0 +1,35 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemPackagesWithPackage_typeItemRequestBuilder builds and executes requests for operations under \users\{username}\packages\{package_type} +type ItemPackagesWithPackage_typeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByPackage_name gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item.packages.item.item collection +// returns a *ItemPackagesItemWithPackage_nameItemRequestBuilder when successful +func (m *ItemPackagesWithPackage_typeItemRequestBuilder) ByPackage_name(package_name string)(*ItemPackagesItemWithPackage_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if package_name != "" { + urlTplParams["package_name"] = package_name + } + return NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPackagesWithPackage_typeItemRequestBuilderInternal instantiates a new ItemPackagesWithPackage_typeItemRequestBuilder and sets the default values. +func NewItemPackagesWithPackage_typeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesWithPackage_typeItemRequestBuilder) { + m := &ItemPackagesWithPackage_typeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}", pathParameters), + } + return m +} +// NewItemPackagesWithPackage_typeItemRequestBuilder instantiates a new ItemPackagesWithPackage_typeItemRequestBuilder and sets the default values. +func NewItemPackagesWithPackage_typeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPackagesWithPackage_typeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPackagesWithPackage_typeItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/users/item_projects_request_builder.go b/pkg/github/users/item_projects_request_builder.go new file mode 100644 index 0000000..2b243df --- /dev/null +++ b/pkg/github/users/item_projects_request_builder.go @@ -0,0 +1,74 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + i7b34850208ccb9073f2f73e5c9bddf683ac1a17af4b3a31c72745011f99720c4 "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/users/item/projects" +) + +// ItemProjectsRequestBuilder builds and executes requests for operations under \users\{username}\projects +type ItemProjectsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemProjectsRequestBuilderGetQueryParameters lists projects for a user. +type ItemProjectsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Indicates the state of the projects to return. + State *i7b34850208ccb9073f2f73e5c9bddf683ac1a17af4b3a31c72745011f99720c4.GetStateQueryParameterType `uriparametername:"state"` +} +// NewItemProjectsRequestBuilderInternal instantiates a new ItemProjectsRequestBuilder and sets the default values. +func NewItemProjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { + m := &ItemProjectsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/projects{?page*,per_page*,state*}", pathParameters), + } + return m +} +// NewItemProjectsRequestBuilder instantiates a new ItemProjectsRequestBuilder and sets the default values. +func NewItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemProjectsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemProjectsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists projects for a user. +// returns a []Projectable when successful +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/projects/projects#list-user-projects +func (m *ItemProjectsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "422": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateProjectFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Projectable) + } + } + return val, nil +} +// ToGetRequestInformation lists projects for a user. +// returns a *RequestInformation when successful +func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemProjectsRequestBuilder when successful +func (m *ItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemProjectsRequestBuilder) { + return NewItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_received_events_public_request_builder.go b/pkg/github/users/item_received_events_public_request_builder.go new file mode 100644 index 0000000..9268a6e --- /dev/null +++ b/pkg/github/users/item_received_events_public_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemReceived_eventsPublicRequestBuilder builds and executes requests for operations under \users\{username}\received_events\public +type ItemReceived_eventsPublicRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemReceived_eventsPublicRequestBuilderGetQueryParameters list public events received by a user +type ItemReceived_eventsPublicRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemReceived_eventsPublicRequestBuilderInternal instantiates a new ItemReceived_eventsPublicRequestBuilder and sets the default values. +func NewItemReceived_eventsPublicRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReceived_eventsPublicRequestBuilder) { + m := &ItemReceived_eventsPublicRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/received_events/public{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemReceived_eventsPublicRequestBuilder instantiates a new ItemReceived_eventsPublicRequestBuilder and sets the default values. +func NewItemReceived_eventsPublicRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReceived_eventsPublicRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReceived_eventsPublicRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list public events received by a user +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-public-events-received-by-a-user +func (m *ItemReceived_eventsPublicRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReceived_eventsPublicRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// returns a *RequestInformation when successful +func (m *ItemReceived_eventsPublicRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReceived_eventsPublicRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemReceived_eventsPublicRequestBuilder when successful +func (m *ItemReceived_eventsPublicRequestBuilder) WithUrl(rawUrl string)(*ItemReceived_eventsPublicRequestBuilder) { + return NewItemReceived_eventsPublicRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_received_events_request_builder.go b/pkg/github/users/item_received_events_request_builder.go new file mode 100644 index 0000000..e5fc30c --- /dev/null +++ b/pkg/github/users/item_received_events_request_builder.go @@ -0,0 +1,72 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemReceived_eventsRequestBuilder builds and executes requests for operations under \users\{username}\received_events +type ItemReceived_eventsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemReceived_eventsRequestBuilderGetQueryParameters these are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. +type ItemReceived_eventsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemReceived_eventsRequestBuilderInternal instantiates a new ItemReceived_eventsRequestBuilder and sets the default values. +func NewItemReceived_eventsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReceived_eventsRequestBuilder) { + m := &ItemReceived_eventsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/received_events{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemReceived_eventsRequestBuilder instantiates a new ItemReceived_eventsRequestBuilder and sets the default values. +func NewItemReceived_eventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReceived_eventsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReceived_eventsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get these are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. +// returns a []Eventable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/events#list-events-received-by-the-authenticated-user +func (m *ItemReceived_eventsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReceived_eventsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateEventFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.Eventable) + } + } + return val, nil +} +// Public the public property +// returns a *ItemReceived_eventsPublicRequestBuilder when successful +func (m *ItemReceived_eventsRequestBuilder) Public()(*ItemReceived_eventsPublicRequestBuilder) { + return NewItemReceived_eventsPublicRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation these are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. +// returns a *RequestInformation when successful +func (m *ItemReceived_eventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReceived_eventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemReceived_eventsRequestBuilder when successful +func (m *ItemReceived_eventsRequestBuilder) WithUrl(rawUrl string)(*ItemReceived_eventsRequestBuilder) { + return NewItemReceived_eventsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_repos_request_builder.go b/pkg/github/users/item_repos_request_builder.go new file mode 100644 index 0000000..61efeba --- /dev/null +++ b/pkg/github/users/item_repos_request_builder.go @@ -0,0 +1,74 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" + if18d80c7d3e88b7e1c7c31437e5f1a9faf62a17a6f3a44839327c5becd16624a "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/users/item/repos" +) + +// ItemReposRequestBuilder builds and executes requests for operations under \users\{username}\repos +type ItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemReposRequestBuilderGetQueryParameters lists public repositories for the specified user. +type ItemReposRequestBuilderGetQueryParameters struct { + // The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + Direction *if18d80c7d3e88b7e1c7c31437e5f1a9faf62a17a6f3a44839327c5becd16624a.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. + Sort *if18d80c7d3e88b7e1c7c31437e5f1a9faf62a17a6f3a44839327c5becd16624a.GetSortQueryParameterType `uriparametername:"sort"` + // Limit results to repositories of the specified type. + Type *if18d80c7d3e88b7e1c7c31437e5f1a9faf62a17a6f3a44839327c5becd16624a.GetTypeQueryParameterType `uriparametername:"type"` +} +// NewItemReposRequestBuilderInternal instantiates a new ItemReposRequestBuilder and sets the default values. +func NewItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposRequestBuilder) { + m := &ItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/repos{?direction*,page*,per_page*,sort*,type*}", pathParameters), + } + return m +} +// NewItemReposRequestBuilder instantiates a new ItemReposRequestBuilder and sets the default values. +func NewItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemReposRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists public repositories for the specified user. +// returns a []MinimalRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/repos/repos#list-repositories-for-a-user +func (m *ItemReposRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReposRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists public repositories for the specified user. +// returns a *RequestInformation when successful +func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemReposRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemReposRequestBuilder when successful +func (m *ItemReposRequestBuilder) WithUrl(rawUrl string)(*ItemReposRequestBuilder) { + return NewItemReposRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_settings_billing_actions_request_builder.go b/pkg/github/users/item_settings_billing_actions_request_builder.go new file mode 100644 index 0000000..9bd325f --- /dev/null +++ b/pkg/github/users/item_settings_billing_actions_request_builder.go @@ -0,0 +1,57 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingActionsRequestBuilder builds and executes requests for operations under \users\{username}\settings\billing\actions +type ItemSettingsBillingActionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingActionsRequestBuilderInternal instantiates a new ItemSettingsBillingActionsRequestBuilder and sets the default values. +func NewItemSettingsBillingActionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingActionsRequestBuilder) { + m := &ItemSettingsBillingActionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/settings/billing/actions", pathParameters), + } + return m +} +// NewItemSettingsBillingActionsRequestBuilder instantiates a new ItemSettingsBillingActionsRequestBuilder and sets the default values. +func NewItemSettingsBillingActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingActionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingActionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the summary of the free and paid GitHub Actions minutes used.Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a ActionsBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-github-actions-billing-for-a-user +func (m *ItemSettingsBillingActionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateActionsBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.ActionsBillingUsageable), nil +} +// ToGetRequestInformation gets the summary of the free and paid GitHub Actions minutes used.Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingActionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingActionsRequestBuilder when successful +func (m *ItemSettingsBillingActionsRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingActionsRequestBuilder) { + return NewItemSettingsBillingActionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_settings_billing_packages_request_builder.go b/pkg/github/users/item_settings_billing_packages_request_builder.go new file mode 100644 index 0000000..aaf9223 --- /dev/null +++ b/pkg/github/users/item_settings_billing_packages_request_builder.go @@ -0,0 +1,57 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingPackagesRequestBuilder builds and executes requests for operations under \users\{username}\settings\billing\packages +type ItemSettingsBillingPackagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingPackagesRequestBuilderInternal instantiates a new ItemSettingsBillingPackagesRequestBuilder and sets the default values. +func NewItemSettingsBillingPackagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingPackagesRequestBuilder) { + m := &ItemSettingsBillingPackagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/settings/billing/packages", pathParameters), + } + return m +} +// NewItemSettingsBillingPackagesRequestBuilder instantiates a new ItemSettingsBillingPackagesRequestBuilder and sets the default values. +func NewItemSettingsBillingPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingPackagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingPackagesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the free and paid storage used for GitHub Packages in gigabytes.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a PackagesBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-github-packages-billing-for-a-user +func (m *ItemSettingsBillingPackagesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackagesBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreatePackagesBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PackagesBillingUsageable), nil +} +// ToGetRequestInformation gets the free and paid storage used for GitHub Packages in gigabytes.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingPackagesRequestBuilder when successful +func (m *ItemSettingsBillingPackagesRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingPackagesRequestBuilder) { + return NewItemSettingsBillingPackagesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_settings_billing_request_builder.go b/pkg/github/users/item_settings_billing_request_builder.go new file mode 100644 index 0000000..f4b8a95 --- /dev/null +++ b/pkg/github/users/item_settings_billing_request_builder.go @@ -0,0 +1,38 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsBillingRequestBuilder builds and executes requests for operations under \users\{username}\settings\billing +type ItemSettingsBillingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Actions the actions property +// returns a *ItemSettingsBillingActionsRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Actions()(*ItemSettingsBillingActionsRequestBuilder) { + return NewItemSettingsBillingActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsBillingRequestBuilderInternal instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + m := &ItemSettingsBillingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/settings/billing", pathParameters), + } + return m +} +// NewItemSettingsBillingRequestBuilder instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingRequestBuilderInternal(urlParams, requestAdapter) +} +// Packages the packages property +// returns a *ItemSettingsBillingPackagesRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Packages()(*ItemSettingsBillingPackagesRequestBuilder) { + return NewItemSettingsBillingPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SharedStorage the sharedStorage property +// returns a *ItemSettingsBillingSharedStorageRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) SharedStorage()(*ItemSettingsBillingSharedStorageRequestBuilder) { + return NewItemSettingsBillingSharedStorageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/users/item_settings_billing_shared_storage_request_builder.go b/pkg/github/users/item_settings_billing_shared_storage_request_builder.go new file mode 100644 index 0000000..636503c --- /dev/null +++ b/pkg/github/users/item_settings_billing_shared_storage_request_builder.go @@ -0,0 +1,57 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSettingsBillingSharedStorageRequestBuilder builds and executes requests for operations under \users\{username}\settings\billing\shared-storage +type ItemSettingsBillingSharedStorageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingSharedStorageRequestBuilderInternal instantiates a new ItemSettingsBillingSharedStorageRequestBuilder and sets the default values. +func NewItemSettingsBillingSharedStorageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingSharedStorageRequestBuilder) { + m := &ItemSettingsBillingSharedStorageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/settings/billing/shared-storage", pathParameters), + } + return m +} +// NewItemSettingsBillingSharedStorageRequestBuilder instantiates a new ItemSettingsBillingSharedStorageRequestBuilder and sets the default values. +func NewItemSettingsBillingSharedStorageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingSharedStorageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingSharedStorageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a CombinedBillingUsageable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-shared-storage-billing-for-a-user +func (m *ItemSettingsBillingSharedStorageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedBillingUsageable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateCombinedBillingUsageFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CombinedBillingUsageable), nil +} +// ToGetRequestInformation gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/enterprise-cloud@latest//github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingSharedStorageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingSharedStorageRequestBuilder when successful +func (m *ItemSettingsBillingSharedStorageRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingSharedStorageRequestBuilder) { + return NewItemSettingsBillingSharedStorageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_settings_request_builder.go b/pkg/github/users/item_settings_request_builder.go new file mode 100644 index 0000000..e93e186 --- /dev/null +++ b/pkg/github/users/item_settings_request_builder.go @@ -0,0 +1,28 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsRequestBuilder builds and executes requests for operations under \users\{username}\settings +type ItemSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Billing the billing property +// returns a *ItemSettingsBillingRequestBuilder when successful +func (m *ItemSettingsRequestBuilder) Billing()(*ItemSettingsBillingRequestBuilder) { + return NewItemSettingsBillingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsRequestBuilderInternal instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + m := &ItemSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/settings", pathParameters), + } + return m +} +// NewItemSettingsRequestBuilder instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/users/item_social_accounts_request_builder.go b/pkg/github/users/item_social_accounts_request_builder.go new file mode 100644 index 0000000..52e1770 --- /dev/null +++ b/pkg/github/users/item_social_accounts_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSocial_accountsRequestBuilder builds and executes requests for operations under \users\{username}\social_accounts +type ItemSocial_accountsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSocial_accountsRequestBuilderGetQueryParameters lists social media accounts for a user. This endpoint is accessible by anyone. +type ItemSocial_accountsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemSocial_accountsRequestBuilderInternal instantiates a new ItemSocial_accountsRequestBuilder and sets the default values. +func NewItemSocial_accountsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSocial_accountsRequestBuilder) { + m := &ItemSocial_accountsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/social_accounts{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemSocial_accountsRequestBuilder instantiates a new ItemSocial_accountsRequestBuilder and sets the default values. +func NewItemSocial_accountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSocial_accountsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSocial_accountsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists social media accounts for a user. This endpoint is accessible by anyone. +// returns a []SocialAccountable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/social-accounts#list-social-accounts-for-a-user +func (m *ItemSocial_accountsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSocial_accountsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSocialAccountFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SocialAccountable) + } + } + return val, nil +} +// ToGetRequestInformation lists social media accounts for a user. This endpoint is accessible by anyone. +// returns a *RequestInformation when successful +func (m *ItemSocial_accountsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSocial_accountsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSocial_accountsRequestBuilder when successful +func (m *ItemSocial_accountsRequestBuilder) WithUrl(rawUrl string)(*ItemSocial_accountsRequestBuilder) { + return NewItemSocial_accountsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_ssh_signing_keys_request_builder.go b/pkg/github/users/item_ssh_signing_keys_request_builder.go new file mode 100644 index 0000000..7b3c5cd --- /dev/null +++ b/pkg/github/users/item_ssh_signing_keys_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSsh_signing_keysRequestBuilder builds and executes requests for operations under \users\{username}\ssh_signing_keys +type ItemSsh_signing_keysRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSsh_signing_keysRequestBuilderGetQueryParameters lists the SSH signing keys for a user. This operation is accessible by anyone. +type ItemSsh_signing_keysRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemSsh_signing_keysRequestBuilderInternal instantiates a new ItemSsh_signing_keysRequestBuilder and sets the default values. +func NewItemSsh_signing_keysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSsh_signing_keysRequestBuilder) { + m := &ItemSsh_signing_keysRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/ssh_signing_keys{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemSsh_signing_keysRequestBuilder instantiates a new ItemSsh_signing_keysRequestBuilder and sets the default values. +func NewItemSsh_signing_keysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSsh_signing_keysRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSsh_signing_keysRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the SSH signing keys for a user. This operation is accessible by anyone. +// returns a []SshSigningKeyable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/ssh-signing-keys#list-ssh-signing-keys-for-a-user +func (m *ItemSsh_signing_keysRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSsh_signing_keysRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSshSigningKeyFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SshSigningKeyable) + } + } + return val, nil +} +// ToGetRequestInformation lists the SSH signing keys for a user. This operation is accessible by anyone. +// returns a *RequestInformation when successful +func (m *ItemSsh_signing_keysRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSsh_signing_keysRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSsh_signing_keysRequestBuilder when successful +func (m *ItemSsh_signing_keysRequestBuilder) WithUrl(rawUrl string)(*ItemSsh_signing_keysRequestBuilder) { + return NewItemSsh_signing_keysRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_starred_repository.go b/pkg/github/users/item_starred_repository.go new file mode 100644 index 0000000..4bb8484 --- /dev/null +++ b/pkg/github/users/item_starred_repository.go @@ -0,0 +1,51 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemStarredRepository struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemStarredRepository instantiates a new ItemStarredRepository and sets the default values. +func NewItemStarredRepository()(*ItemStarredRepository) { + m := &ItemStarredRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemStarredRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemStarredRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemStarredRepository(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemStarredRepository) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemStarredRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemStarredRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemStarredRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemStarredRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/users/item_starred_request_builder.go b/pkg/github/users/item_starred_request_builder.go new file mode 100644 index 0000000..0a5b5ef --- /dev/null +++ b/pkg/github/users/item_starred_request_builder.go @@ -0,0 +1,175 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + idb94c4e220b49cc1749fa9741500cbf99275f162e482503103c0c383fd7e491f "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/users/item/starred" +) + +// ItemStarredRequestBuilder builds and executes requests for operations under \users\{username}\starred +type ItemStarredRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemStarredRequestBuilderGetQueryParameters lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +type ItemStarredRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *idb94c4e220b49cc1749fa9741500cbf99275f162e482503103c0c383fd7e491f.GetDirectionQueryParameterType `uriparametername:"direction"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. + Sort *idb94c4e220b49cc1749fa9741500cbf99275f162e482503103c0c383fd7e491f.GetSortQueryParameterType `uriparametername:"sort"` +} +// StarredGetResponse composed type wrapper for classes []ItemStarredRepositoryable, []ItemStarredRepositoryable +type StarredGetResponse struct { + // Composed type representation for type []ItemStarredRepositoryable + itemStarredRepository []ItemStarredRepositoryable + // Composed type representation for type []ItemStarredRepositoryable + starredGetResponseItemStarredRepository []ItemStarredRepositoryable +} +// NewStarredGetResponse instantiates a new StarredGetResponse and sets the default values. +func NewStarredGetResponse()(*StarredGetResponse) { + m := &StarredGetResponse{ + } + return m +} +// CreateStarredGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStarredGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewStarredGetResponse() + if parseNode != nil { + if val, err := parseNode.GetCollectionOfObjectValues(CreateItemStarredRepositoryFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemStarredRepositoryable, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemStarredRepositoryable) + } + } + result.SetItemStarredRepository(cast) + } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemStarredRepositoryFromDiscriminatorValue); val != nil { + if err != nil { + return nil, err + } + cast := make([]ItemStarredRepositoryable, len(val)) + for i, v := range val { + if v != nil { + cast[i] = v.(ItemStarredRepositoryable) + } + } + result.SetStarredGetResponseItemStarredRepository(cast) + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StarredGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *StarredGetResponse) GetIsComposedType()(bool) { + return true +} +// GetItemStarredRepository gets the ItemStarredRepository property value. Composed type representation for type []ItemStarredRepositoryable +// returns a []ItemStarredRepositoryable when successful +func (m *StarredGetResponse) GetItemStarredRepository()([]ItemStarredRepositoryable) { + return m.itemStarredRepository +} +// GetStarredGetResponseItemStarredRepository gets the ItemStarredRepository property value. Composed type representation for type []ItemStarredRepositoryable +// returns a []ItemStarredRepositoryable when successful +func (m *StarredGetResponse) GetStarredGetResponseItemStarredRepository()([]ItemStarredRepositoryable) { + return m.starredGetResponseItemStarredRepository +} +// Serialize serializes information the current object +func (m *StarredGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetItemStarredRepository() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemStarredRepository())) + for i, v := range m.GetItemStarredRepository() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } else if m.GetStarredGetResponseItemStarredRepository() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStarredGetResponseItemStarredRepository())) + for i, v := range m.GetStarredGetResponseItemStarredRepository() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("", cast) + if err != nil { + return err + } + } + return nil +} +// SetItemStarredRepository sets the ItemStarredRepository property value. Composed type representation for type []ItemStarredRepositoryable +func (m *StarredGetResponse) SetItemStarredRepository(value []ItemStarredRepositoryable)() { + m.itemStarredRepository = value +} +// SetStarredGetResponseItemStarredRepository sets the ItemStarredRepository property value. Composed type representation for type []ItemStarredRepositoryable +func (m *StarredGetResponse) SetStarredGetResponseItemStarredRepository(value []ItemStarredRepositoryable)() { + m.starredGetResponseItemStarredRepository = value +} +type StarredGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemStarredRepository()([]ItemStarredRepositoryable) + GetStarredGetResponseItemStarredRepository()([]ItemStarredRepositoryable) + SetItemStarredRepository(value []ItemStarredRepositoryable)() + SetStarredGetResponseItemStarredRepository(value []ItemStarredRepositoryable)() +} +// NewItemStarredRequestBuilderInternal instantiates a new ItemStarredRequestBuilder and sets the default values. +func NewItemStarredRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStarredRequestBuilder) { + m := &ItemStarredRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/starred{?direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewItemStarredRequestBuilder instantiates a new ItemStarredRequestBuilder and sets the default values. +func NewItemStarredRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemStarredRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemStarredRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +// returns a StarredGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/starring#list-repositories-starred-by-a-user +func (m *ItemStarredRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStarredRequestBuilderGetQueryParameters])(StarredGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateStarredGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(StarredGetResponseable), nil +} +// ToGetRequestInformation lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. +// returns a *RequestInformation when successful +func (m *ItemStarredRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemStarredRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemStarredRequestBuilder when successful +func (m *ItemStarredRequestBuilder) WithUrl(rawUrl string)(*ItemStarredRequestBuilder) { + return NewItemStarredRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_subscriptions_request_builder.go b/pkg/github/users/item_subscriptions_request_builder.go new file mode 100644 index 0000000..e517c33 --- /dev/null +++ b/pkg/github/users/item_subscriptions_request_builder.go @@ -0,0 +1,67 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// ItemSubscriptionsRequestBuilder builds and executes requests for operations under \users\{username}\subscriptions +type ItemSubscriptionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSubscriptionsRequestBuilderGetQueryParameters lists repositories a user is watching. +type ItemSubscriptionsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemSubscriptionsRequestBuilderInternal instantiates a new ItemSubscriptionsRequestBuilder and sets the default values. +func NewItemSubscriptionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSubscriptionsRequestBuilder) { + m := &ItemSubscriptionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/subscriptions{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemSubscriptionsRequestBuilder instantiates a new ItemSubscriptionsRequestBuilder and sets the default values. +func NewItemSubscriptionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSubscriptionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSubscriptionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists repositories a user is watching. +// returns a []MinimalRepositoryable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/activity/watching#list-repositories-watched-by-a-user +func (m *ItemSubscriptionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSubscriptionsRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateMinimalRepositoryFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.MinimalRepositoryable) + } + } + return val, nil +} +// ToGetRequestInformation lists repositories a user is watching. +// returns a *RequestInformation when successful +func (m *ItemSubscriptionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSubscriptionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSubscriptionsRequestBuilder when successful +func (m *ItemSubscriptionsRequestBuilder) WithUrl(rawUrl string)(*ItemSubscriptionsRequestBuilder) { + return NewItemSubscriptionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/users_request_builder.go b/pkg/github/users/users_request_builder.go new file mode 100644 index 0000000..2264454 --- /dev/null +++ b/pkg/github/users/users_request_builder.go @@ -0,0 +1,79 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// UsersRequestBuilder builds and executes requests for operations under \users +type UsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// UsersRequestBuilderGetQueryParameters lists all users, in the order that they signed up on GitHub Enterprise Cloud. This list includes personal user accounts and organization accounts.Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. +type UsersRequestBuilderGetQueryParameters struct { + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // A user ID. Only return users with an ID greater than this ID. + Since *int32 `uriparametername:"since"` +} +// ByUsername gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.users.item collection +// returns a *WithUsernameItemRequestBuilder when successful +func (m *UsersRequestBuilder) ByUsername(username string)(*WithUsernameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if username != "" { + urlTplParams["username"] = username + } + return NewWithUsernameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewUsersRequestBuilderInternal instantiates a new UsersRequestBuilder and sets the default values. +func NewUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersRequestBuilder) { + m := &UsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users{?per_page*,since*}", pathParameters), + } + return m +} +// NewUsersRequestBuilder instantiates a new UsersRequestBuilder and sets the default values. +func NewUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewUsersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all users, in the order that they signed up on GitHub Enterprise Cloud. This list includes personal user accounts and organization accounts.Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. +// returns a []SimpleUserable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/users#list-users +func (m *UsersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[UsersRequestBuilderGetQueryParameters])([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateSimpleUserFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.SimpleUserable) + } + } + return val, nil +} +// ToGetRequestInformation lists all users, in the order that they signed up on GitHub Enterprise Cloud. This list includes personal user accounts and organization accounts.Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. +// returns a *RequestInformation when successful +func (m *UsersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[UsersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *UsersRequestBuilder when successful +func (m *UsersRequestBuilder) WithUrl(rawUrl string)(*UsersRequestBuilder) { + return NewUsersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/with_username_item_request_builder.go b/pkg/github/users/with_username_item_request_builder.go new file mode 100644 index 0000000..2475f6a --- /dev/null +++ b/pkg/github/users/with_username_item_request_builder.go @@ -0,0 +1,245 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// WithUsernameItemRequestBuilder builds and executes requests for operations under \users\{username} +type WithUsernameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// WithUsernameGetResponse composed type wrapper for classes i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +type WithUsernameGetResponse struct { + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable + privateUser i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable + // Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable + publicUser i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +} +// NewWithUsernameGetResponse instantiates a new WithUsernameGetResponse and sets the default values. +func NewWithUsernameGetResponse()(*WithUsernameGetResponse) { + m := &WithUsernameGetResponse{ + } + return m +} +// CreateWithUsernameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWithUsernameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWithUsernameGetResponse() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WithUsernameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WithUsernameGetResponse) GetIsComposedType()(bool) { + return true +} +// GetPrivateUser gets the privateUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable +// returns a PrivateUserable when successful +func (m *WithUsernameGetResponse) GetPrivateUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable) { + return m.privateUser +} +// GetPublicUser gets the publicUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +// returns a PublicUserable when successful +func (m *WithUsernameGetResponse) GetPublicUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable) { + return m.publicUser +} +// Serialize serializes information the current object +func (m *WithUsernameGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPrivateUser() != nil { + err := writer.WriteObjectValue("", m.GetPrivateUser()) + if err != nil { + return err + } + } else if m.GetPublicUser() != nil { + err := writer.WriteObjectValue("", m.GetPublicUser()) + if err != nil { + return err + } + } + return nil +} +// SetPrivateUser sets the privateUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable +func (m *WithUsernameGetResponse) SetPrivateUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable)() { + m.privateUser = value +} +// SetPublicUser sets the publicUser property value. Composed type representation for type i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable +func (m *WithUsernameGetResponse) SetPublicUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable)() { + m.publicUser = value +} +type WithUsernameGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrivateUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable) + GetPublicUser()(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable) + SetPrivateUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PrivateUserable)() + SetPublicUser(value i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.PublicUserable)() +} +// Attestations the attestations property +// returns a *ItemAttestationsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Attestations()(*ItemAttestationsRequestBuilder) { + return NewItemAttestationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewWithUsernameItemRequestBuilderInternal instantiates a new WithUsernameItemRequestBuilder and sets the default values. +func NewWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithUsernameItemRequestBuilder) { + m := &WithUsernameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}", pathParameters), + } + return m +} +// NewWithUsernameItemRequestBuilder instantiates a new WithUsernameItemRequestBuilder and sets the default values. +func NewWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithUsernameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Docker the docker property +// returns a *ItemDockerRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Docker()(*ItemDockerRequestBuilder) { + return NewItemDockerRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Events the events property +// returns a *ItemEventsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Events()(*ItemEventsRequestBuilder) { + return NewItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Followers the followers property +// returns a *ItemFollowersRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Followers()(*ItemFollowersRequestBuilder) { + return NewItemFollowersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Following the following property +// returns a *ItemFollowingRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Following()(*ItemFollowingRequestBuilder) { + return NewItemFollowingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get provides publicly available information about someone with a GitHub account.The `email` key in the following response is the publicly visible email address from your GitHub Enterprise Cloud [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub Enterprise Cloud. For more information, see [Authentication](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/enterprise-cloud@latest//rest/users/emails)". +// returns a WithUsernameGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/users/users#get-a-user +func (m *WithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(WithUsernameGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateWithUsernameGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(WithUsernameGetResponseable), nil +} +// Gists the gists property +// returns a *ItemGistsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Gists()(*ItemGistsRequestBuilder) { + return NewItemGistsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Gpg_keys the gpg_keys property +// returns a *ItemGpg_keysRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Gpg_keys()(*ItemGpg_keysRequestBuilder) { + return NewItemGpg_keysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Hovercard the hovercard property +// returns a *ItemHovercardRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Hovercard()(*ItemHovercardRequestBuilder) { + return NewItemHovercardRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installation the installation property +// returns a *ItemInstallationRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Installation()(*ItemInstallationRequestBuilder) { + return NewItemInstallationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Keys the keys property +// returns a *ItemKeysRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Keys()(*ItemKeysRequestBuilder) { + return NewItemKeysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Orgs the orgs property +// returns a *ItemOrgsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Orgs()(*ItemOrgsRequestBuilder) { + return NewItemOrgsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Packages the packages property +// returns a *ItemPackagesRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Packages()(*ItemPackagesRequestBuilder) { + return NewItemPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Projects the projects property +// returns a *ItemProjectsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Projects()(*ItemProjectsRequestBuilder) { + return NewItemProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Received_events the received_events property +// returns a *ItemReceived_eventsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Received_events()(*ItemReceived_eventsRequestBuilder) { + return NewItemReceived_eventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Repos the repos property +// returns a *ItemReposRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Repos()(*ItemReposRequestBuilder) { + return NewItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Settings the settings property +// returns a *ItemSettingsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { + return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Social_accounts the social_accounts property +// returns a *ItemSocial_accountsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Social_accounts()(*ItemSocial_accountsRequestBuilder) { + return NewItemSocial_accountsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Ssh_signing_keys the ssh_signing_keys property +// returns a *ItemSsh_signing_keysRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Ssh_signing_keys()(*ItemSsh_signing_keysRequestBuilder) { + return NewItemSsh_signing_keysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Starred the starred property +// returns a *ItemStarredRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Starred()(*ItemStarredRequestBuilder) { + return NewItemStarredRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Subscriptions the subscriptions property +// returns a *ItemSubscriptionsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Subscriptions()(*ItemSubscriptionsRequestBuilder) { + return NewItemSubscriptionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation provides publicly available information about someone with a GitHub account.The `email` key in the following response is the publicly visible email address from your GitHub Enterprise Cloud [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub Enterprise Cloud. For more information, see [Authentication](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/enterprise-cloud@latest//rest/users/emails)". +// returns a *RequestInformation when successful +func (m *WithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *WithUsernameItemRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*WithUsernameItemRequestBuilder) { + return NewWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/versions/versions_request_builder.go b/pkg/github/versions/versions_request_builder.go new file mode 100644 index 0000000..6d4c767 --- /dev/null +++ b/pkg/github/versions/versions_request_builder.go @@ -0,0 +1,65 @@ +package versions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" +) + +// VersionsRequestBuilder builds and executes requests for operations under \versions +type VersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewVersionsRequestBuilderInternal instantiates a new VersionsRequestBuilder and sets the default values. +func NewVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VersionsRequestBuilder) { + m := &VersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/versions", pathParameters), + } + return m +} +// NewVersionsRequestBuilder instantiates a new VersionsRequestBuilder and sets the default values. +func NewVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get all supported GitHub Enterprise Cloud API versions. +// returns a []DateOnly when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/meta/meta#get-all-api-versions +func (m *VersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "dateonly", errorMapping) + if err != nil { + return nil, err + } + val := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly, len(res)) + for i, v := range res { + if v != nil { + val[i] = *(v.(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)) + } + } + return val, nil +} +// ToGetRequestInformation get all supported GitHub Enterprise Cloud API versions. +// returns a *RequestInformation when successful +func (m *VersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *VersionsRequestBuilder when successful +func (m *VersionsRequestBuilder) WithUrl(rawUrl string)(*VersionsRequestBuilder) { + return NewVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/zen/zen_request_builder.go b/pkg/github/zen/zen_request_builder.go new file mode 100644 index 0000000..da1d773 --- /dev/null +++ b/pkg/github/zen/zen_request_builder.go @@ -0,0 +1,56 @@ +package zen + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ZenRequestBuilder builds and executes requests for operations under \zen +type ZenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewZenRequestBuilderInternal instantiates a new ZenRequestBuilder and sets the default values. +func NewZenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ZenRequestBuilder) { + m := &ZenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/zen", pathParameters), + } + return m +} +// NewZenRequestBuilder instantiates a new ZenRequestBuilder and sets the default values. +func NewZenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ZenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewZenRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get a random sentence from the Zen of GitHub +// returns a *string when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/meta/meta#get-the-zen-of-github +func (m *ZenRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*string, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "string", nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*string), nil +} +// ToGetRequestInformation get a random sentence from the Zen of GitHub +// returns a *RequestInformation when successful +func (m *ZenRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ZenRequestBuilder when successful +func (m *ZenRequestBuilder) WithUrl(rawUrl string)(*ZenRequestBuilder) { + return NewZenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/handlers/rate_limit_handler.go b/pkg/handlers/rate_limit_handler.go new file mode 100644 index 0000000..43b4178 --- /dev/null +++ b/pkg/handlers/rate_limit_handler.go @@ -0,0 +1,177 @@ +package handlers + +import ( + "context" + "fmt" + "log" + netHttp "net/http" + "strconv" + "time" + + abs "github.com/microsoft/kiota-abstractions-go" + kiotaHttp "github.com/microsoft/kiota-http-go" + "github.com/octokit/go-sdk-enterprise-cloud/pkg/headers" +) + +// RateLimitHandler is a middleware that detects primary and secondary rate +// limits and retries requests after the appropriate time when necessary. +type RateLimitHandler struct { + options RateLimitHandlerOptions +} + +// RateLimitHandlerOptions is a struct that holds options for the RateLimitHandler. +// In the future, this could hold different strategies for handling rate limits: +// e.g. exponential backoff, jitter, throttling, etc. +type RateLimitHandlerOptions struct{} + +// rateLimitHandlerOptions (lowercase, private) that RateLimitHandlerOptions +// (uppercase, public) implements. +type rateLimitHandlerOptions interface { + abs.RequestOption + IsRateLimited() func(req *netHttp.Request, res *netHttp.Response) RateLimitType +} + +// RateLimitType is an enum that represents either None, Primary, +// or Secondary rate limiting +type RateLimitType int + +const ( + None RateLimitType = iota + Primary + Secondary +) + +var rateLimitKeyValue = abs.RequestOptionKey{ + Key: "RateLimitHandler", +} + +// GetKey returns the unique RateLimitHandler key, used by Kiota to store +// request options. +func (options *RateLimitHandlerOptions) GetKey() abs.RequestOptionKey { + return rateLimitKeyValue +} + +// IsRateLimited returns a function that determines if an HTTP response was +// rate-limited, and if so, what type of rate limit was hit. +func (options *RateLimitHandlerOptions) IsRateLimited() func(req *netHttp.Request, resp *netHttp.Response) RateLimitType { + return func(req *netHttp.Request, resp *netHttp.Response) RateLimitType { + if resp.StatusCode != 429 && resp.StatusCode != 403 { + return None + } + + if resp.Header.Get(headers.RetryAfterKey) != "" { + return Secondary // secondary rate limits are abuse limits + } + + if resp.Header.Get(headers.XRateLimitRemainingKey) == "0" { + return Primary + } + + return None + } +} + +// NewRateLimitHandler creates a new RateLimitHandler with default options. +func NewRateLimitHandler() *RateLimitHandler { + return &RateLimitHandler{} +} + +// Intercept tries a request. If the response shows it was rate-limited, it +// retries the request after the appropriate period of time. +func (handler RateLimitHandler) Intercept(pipeline kiotaHttp.Pipeline, middlewareIndex int, request *netHttp.Request) (*netHttp.Response, error) { + resp, err := pipeline.Next(request, middlewareIndex) + if err != nil { + return resp, err + } + + rateLimit := handler.options.IsRateLimited()(request, resp) + + if rateLimit == Primary || rateLimit == Secondary { + reqOption, ok := request.Context().Value(rateLimitKeyValue).(rateLimitHandlerOptions) + if !ok { + reqOption = &handler.options + } + return handler.retryRequest(request.Context(), pipeline, middlewareIndex, reqOption, rateLimit, request, resp) + } + return resp, nil +} + +// retryRequest retries a request if it has been rate-limited. +func (handler RateLimitHandler) retryRequest(ctx context.Context, pipeline kiotaHttp.Pipeline, middlewareIndex int, + options rateLimitHandlerOptions, rateLimitType RateLimitType, request *netHttp.Request, resp *netHttp.Response) (*netHttp.Response, error) { + + if rateLimitType == Secondary || rateLimitType == Primary { + retryAfterDuration, err := parseRateLimit(resp) + if err != nil { + return nil, fmt.Errorf("failed to parse retry-after header into duration: %v", err) + } + if *retryAfterDuration < 0 { + log.Printf("retry-after duration is negative: %s; sleeping until next request will be a no-op", *retryAfterDuration) + } + if rateLimitType == Secondary { + log.Printf("Abuse detection mechanism (secondary rate limit) triggered, sleeping for %s before retrying\n", *retryAfterDuration) + } else if rateLimitType == Primary { + log.Printf("Primary rate limit (reset: %s) reached, sleeping for %s before retrying\n", resp.Header.Get(headers.XRateLimitResetKey), *retryAfterDuration) + log.Printf("Rate limit information: %s: %s, %s: %s, %s: %s\n", headers.XRateLimitLimitKey, resp.Header.Get(headers.XRateLimitLimitKey), headers.XRateLimitUsedKey, resp.Header.Get(headers.XRateLimitUsedKey), headers.XRateLimitResourceKey, resp.Header.Get(headers.XRateLimitResourceKey)) + } + time.Sleep(*retryAfterDuration) + log.Printf("Retrying request after rate limit sleep\n") + return handler.Intercept(pipeline, middlewareIndex, request) + } + + return handler.retryRequest(ctx, pipeline, middlewareIndex, options, rateLimitType, request, resp) +} + +// parseRateLimit parses rate-limit related headers and returns an appropriate +// time.Duration to retry the request after based on the header information. +// Much of this code was taken from the google/go-github library: +// see https://github.com/google/go-github/blob/0e3ab5807f0e9bc6ea690f1b49e94b78259f3681/github/github.go +// Note that "Retry-After" headers correspond to secondary rate limits and +// "x-ratelimit-reset" headers to primary rate limits. +// Docs for rate limit headers: +// https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28#handle-rate-limit-errors-appropriately +func parseRateLimit(r *netHttp.Response) (*time.Duration, error) { + + // "If the retry-after response header is present, you should not retry + // your request until after that many seconds has elapsed." + // (see docs link above) + if v := r.Header.Get(headers.RetryAfterKey); v != "" { + return parseRetryAfter(v) + } + + // "If the x-ratelimit-remaining header is 0, you should not make another + // request until after the time specified by the x-ratelimit-reset + // header. The x-ratelimit-reset header is in UTC epoch seconds."" + // (see docs link above) + if v := r.Header.Get(headers.XRateLimitResetKey); v != "" { + return parseXRateLimitReset(v) + } + + return nil, nil +} + +// parseRetryAfter parses the "Retry-After" header used for secondary +// rate limits. +func parseRetryAfter(retryAfterValue string) (*time.Duration, error) { + if retryAfterValue == "" { + return nil, fmt.Errorf("could not parse emtpy RetryAfter string") + } + + retryAfterSeconds, err := strconv.ParseInt(retryAfterValue, 10, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse retry-after header into duration: %v", err) + } + retryAfter := time.Duration(retryAfterSeconds) * time.Second + return &retryAfter, nil +} + +// parseXRateLimitReset parses the "x-ratelimit-reset" header used for primary +// rate limits +func parseXRateLimitReset(rateLimitResetValue string) (*time.Duration, error) { + secondsSinceEpoch, err := strconv.ParseInt(rateLimitResetValue, 10, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse x-ratelimit-reset header into duration: %v", err) + } + retryAfter := time.Until(time.Unix(secondsSinceEpoch, 0)) + return &retryAfter, nil +} diff --git a/pkg/handlers/rate_limit_handler_test.go b/pkg/handlers/rate_limit_handler_test.go new file mode 100644 index 0000000..09923c2 --- /dev/null +++ b/pkg/handlers/rate_limit_handler_test.go @@ -0,0 +1,463 @@ +package handlers + +import ( + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "sync" + "testing" + "time" + + "github.com/octokit/go-sdk-enterprise-cloud/pkg/headers" +) + +// NoopPipeline code for testing taken from our colleagues at Kiota: +// see https://github.com/microsoft/kiota-http-go/blob/main/retry_handler_test.go#L15-L26 +// for the original source. +type NoopPipeline struct { + client *http.Client +} + +func (pipeline *NoopPipeline) Next(req *http.Request, middlewareIndex int) (*http.Response, error) { + return pipeline.client.Do(req) +} + +func newNoopPipeline() *NoopPipeline { + return &NoopPipeline{ + client: getDefaultClientWithoutMiddleware(), + } +} + +// used for internal unit testing +func getDefaultClientWithoutMiddleware() *http.Client { + // the default client doesn't come with any other settings than making a new one does, and using the default client impacts behavior for non-kiota requests + return &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + }, + Timeout: time.Second * 100, + } +} + +// paired with 200 status code +var happyPathTestHeaders = `{ + "Access-Control-Allow-Origin": [ + "*" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Connection": [ + "keep-alive" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Thu, 28 Mar 2024 20:20:55 GMT" + ], + "Etag": [ + "W/\"513ca5822992932a02050bbecb8c58a75cc211fb7ef0d597b6a3119c9fb45e94\"" + ], + "Github-Authentication-Token-Expiration": [ + "2024-04-27 20:14:21 UTC" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Server": [ + "nginx/1.18.0 (Ubuntu)" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept, X-Requested-With" + ], + "X-Accepted-Oauth-Scopes": [ + "" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Github-Media-Type": [ + "github.v3" + ], + "X-Github-Request-Id": [ + "488c61a3-2ad6-4182-a16e-299d4cbd5c3c" + ], + "X-Github-Sso": [ + "partial-results; organizations=136,137,138" + ], + "X-Glb-Log-Append": [ + "rails_request_category=api rails_method=get rails_controller=api_repositories rails_action=/user/repos rails_catalog_service=github/repos rails_request_queued_time=691 rails_request_time=5747" + ], + "X-Oauth-Scopes": [ + "repo" + ], + "X-Xss-Protection": [ + "0" + ] +}` + +// example primary rate-limited headers (paired with 403 status code) +var primaryRateLimitHeaders = `{ + "Access-Control-Allow-Origin": [ + "*" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Connection": [ + "keep-alive" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Thu, 28 Mar 2024 20:16:11 GMT" + ], + "Github-Authentication-Token-Expiration": [ + "2024-04-27 20:14:21 UTC" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Server": [ + "nginx/1.18.0 (Ubuntu)" + ], + "Vary": [ + "Accept, X-Requested-With" + ], + "X-Accepted-Oauth-Scopes": [ + "repo" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Github-Media-Type": [ + "github.v3" + ], + "X-Github-Request-Id": [ + "d283bbfe-d024-4334-9bd1-284ff860fe3e" + ], + "X-Glb-Log-Append": [ + "rails_request_category=api rails_method=get rails_controller=api_repositories rails_action=/user/repos rails_catalog_service=github/repos rails_request_queued_time=513 rails_request_time=13" + ], + "X-Oauth-Scopes": [ + "repo" + ], + "X-Ratelimit-Limit": [ + "100" + ], + "X-Ratelimit-Remaining": [ + "0" + ], + "X-Ratelimit-Reset": [ + "1711656978" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "X-Ratelimit-Used": [ + "103" + ], + "X-Xss-Protection": [ + "0" + ] +}` + +// example secondary rate-limited headers (paired with 403 status code) +var secondaryRateLimitHeaders = `{ + "Access-Control-Allow-Origin": [ + "*" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Connection": [ + "keep-alive" + ], + "Content-Security-Policy": [ + "default-src 'none'; base-uri 'self'; child-src github.localhost/assets-cdn/worker/; connect-src 'self' http://alambic.github.localhost https://www.githubstatus.com http://collector.github.localhost ws://127.0.0.1:35729/livereload ws://github.localhost raw.github.localhost api.github.localhost https://github-cloud.s3.amazonaws.com https://github-development-repository-file-5c1aeb.s3.amazonaws.com https://github-development-upload-manifest-file-7fdce7.s3.amazonaws.com https://github-development-user-asset-6210df.s3.amazonaws.com http://localhost:2206 http://objects-staging-origin.githubusercontent.com; font-src 'self'; form-action 'self' github.localhost copilot-workspace.githubnext.com http://objects-staging-origin.githubusercontent.com; frame-ancestors 'none'; frame-src http://viewscreen.githubusercontent.localhost:9494 http://notebooks.githubusercontent.localhost:8888; img-src 'self' data: http://alambic.github.localhost http://github.localhost:8081 https://identicons.github.com http://alambic.github.localhost/avatars https://github-dev.s3.amazonaws.com https://objects-staging.githubusercontent.com http://localhost:7071 https://github-development-user-asset-6210df.s3.amazonaws.com https://customer-stories-feed.github.com https://spotlights-feed.github.com http://objects-staging-origin.githubusercontent.com; manifest-src 'self'; media-src http://github.localhost http://alambic.github.localhost https://github-development-user-asset-6210df.s3.amazonaws.com; script-src 'self'; style-src 'unsafe-inline' 'self'; worker-src github.localhost/assets-cdn/worker/" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Thu, 28 Mar 2024 20:22:54 GMT" + ], + "Gh-Limited-By": [ + "time-based" + ], + "Gh-Limited-Group": [ + "api" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "nginx/1.18.0 (Ubuntu)" + ], + "Vary": [ + "Accept, X-Requested-With" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Request-Id": [ + "47dae098-2903-4a0a-835d-d7de10368f0f" + ], + "X-Glb-Log-Append": [ + "rails_request_category=api rails_method=get rails_controller=api_repositories rails_action=/user/repos rails_catalog_service=github/rest_api rails_request_queued_time=4 rails_request_time=12" + ], + "X-Xss-Protection": [ + "0" + ] +}` + +func TestParseRateLimitHappyPath(t *testing.T) { + resp, err := setupHeaderMap(happyPathTestHeaders, 200) + if err != nil { + t.Errorf("Failed to set up headers: %v", err) + } + + result, err := parseRateLimit(resp) + if err != nil { + t.Errorf("Expected no error, got %v", err) + } + if result != nil { + t.Errorf("Expected nil result, got %v", result) + } +} + +func TestParseRateLimitPrimaryRateLimit(t *testing.T) { + resp, err := setupHeaderMap(primaryRateLimitHeaders, 403) + if err != nil { + t.Errorf("Failed to set up headers: %v", err) + } + + result, err := parseRateLimit(resp) + if err != nil { + t.Errorf("Expected no error, got %v", err) + } + + // TODO(kfcampbell): fix tests to use fixed times, not current times (will fix negative time issue in tests) + if result == nil { + t.Errorf("Expected non-nil result, got %v", result) + } +} + +func TestParseRateLimitSecondaryRateLimit(t *testing.T) { + resp, err := setupHeaderMap(secondaryRateLimitHeaders, 403) + if err != nil { + t.Errorf("Failed to set up headers: %v", err) + } + + result, err := parseRateLimit(resp) + if err != nil { + t.Errorf("Expected no error, got %v", err) + } + + if *result != time.Minute { + t.Errorf("Expected one minute, got %v", result) + } +} + +func TestIsRateLimitedHappyPath(t *testing.T) { + resp, err := setupHeaderMap(happyPathTestHeaders, 200) + if err != nil { + t.Errorf("Failed to set up headers: %v", err) + } + + handler := NewRateLimitHandler() + + rateLimit := handler.options.IsRateLimited()(nil, resp) + if rateLimit != None { + t.Errorf("Expected no rate limit, got %v", rateLimit) + } +} + +func TestIsRateLimitedPrimaryRateLimit(t *testing.T) { + resp, err := setupHeaderMap(primaryRateLimitHeaders, 403) + if err != nil { + t.Errorf("Failed to set up headers: %v", err) + } + + handler := NewRateLimitHandler() + + rateLimit := handler.options.IsRateLimited()(nil, resp) + if rateLimit != Primary { + t.Errorf("Expected primary rate limit, got %v", rateLimit) + } +} + +func TestIsRateLimitedSecondaryRateLimit(t *testing.T) { + resp, err := setupHeaderMap(secondaryRateLimitHeaders, 403) + if err != nil { + t.Errorf("Failed to set up headers: %v", err) + } + + handler := NewRateLimitHandler() + + rateLimit := handler.options.IsRateLimited()(nil, resp) + if rateLimit != Secondary { + t.Errorf("Expected secondary rate limit, got %v", rateLimit) + } +} + +func TestParseRetryAfterBlankString(t *testing.T) { + retryAfterValue := "" + result, err := parseRetryAfter(retryAfterValue) + if err == nil { + t.Errorf("Expected error, got %v", result) + } +} + +func TestParseRetryAfterInvalidString(t *testing.T) { + retryAfterValue := "xxx_invalid_string_xxx" + result, err := parseRetryAfter(retryAfterValue) + if err == nil { + t.Errorf("Expected error, got %v", result) + } +} + +func TestParseXRateLimitResetInvalidString(t *testing.T) { + xRateLimitResetValue := "xxx_invalid_string_xxx" + result, err := parseXRateLimitReset(xRateLimitResetValue) + if err == nil { + t.Errorf("Expected error, got %v", result) + } +} + +func TestInterceptRateLimitHappyPath(t *testing.T) { + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write([]byte("test 200 response")) + w.WriteHeader(200) + })) + defer func() { testServer.Close() }() + + handler := NewRateLimitHandler() + req, err := http.NewRequest("GET", testServer.URL, nil) + if err != nil { + t.Errorf("Failed to create request: %v", err) + } + resp, err := handler.Intercept(newNoopPipeline(), 0, req) + if err != nil { + t.Errorf("Expected no error, got %v", err) + } + if resp.StatusCode != 200 { + t.Errorf("Expected status code 200, got %v", resp.StatusCode) + } +} + +func TestInterceptRateLimitPrimaryRateLimit(t *testing.T) { + initialRateLimit := sync.Once{} + // since it's a test, only sleep 5 seconds before returning the + // primary rate limit response in the interest of time + resetTime := time.Now().Add(5 * time.Second).Unix() + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + initialRateLimit.Do(func() { + w.Header().Set(headers.XRateLimitRemainingKey, "0") + w.Header().Set(headers.XRateLimitResetKey, fmt.Sprintf("%d", resetTime)) + w.WriteHeader(403) + _, _ = w.Write([]byte("test primary rate limit 403 response")) + }) + + w.WriteHeader(200) + _, _ = w.Write([]byte("test primary rate limit 200 response")) + })) + defer func() { testServer.Close() }() + + handler := NewRateLimitHandler() + req, err := http.NewRequest("GET", testServer.URL, nil) + if err != nil { + t.Errorf("Failed to create request: %v", err) + } + resp, err := handler.Intercept(newNoopPipeline(), 0, req) + if err != nil { + t.Errorf("Expected no error, got %v", err) + } + if resp.StatusCode != 200 { + t.Errorf("Expected status code 200, got %v", resp.StatusCode) + } +} + +func TestInterceptRateLimitSecondaryRateLimit(t *testing.T) { + initialRateLimit := sync.Once{} + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + initialRateLimit.Do(func() { + // since it's a test, only sleep 5 seconds before returning the + // secondary rate limit response in the interest of time + w.Header().Set(headers.RetryAfterKey, "5") + w.WriteHeader(403) + _, _ = w.Write([]byte("test secondary rate limit 403 response")) + }) + + w.WriteHeader(200) + _, _ = w.Write([]byte("test secondary rate limit 200 response")) + })) + defer func() { testServer.Close() }() + + handler := NewRateLimitHandler() + req, err := http.NewRequest("GET", testServer.URL, nil) + if err != nil { + t.Errorf("Failed to create request: %v", err) + } + resp, err := handler.Intercept(newNoopPipeline(), 0, req) + if err != nil { + t.Errorf("Expected no error, got %v", err) + } + if resp.StatusCode != 200 { + t.Errorf("Expected status code 200, got %v", resp.StatusCode) + } +} + +// setupHeaderMap is a utility function that takes in a JSON string of headers and +// a status code and returns a hydrated http.Response object. +func setupHeaderMap(headers string, statusCode int) (*http.Response, error) { + headerMap := make(map[string][]string) + err := json.Unmarshal([]byte(headers), &headerMap) + if err != nil { + return nil, err + } + + resp := &http.Response{ + Header: make(http.Header), + StatusCode: statusCode, + } + + for key, values := range headerMap { + for _, value := range values { + resp.Header.Add(key, value) + } + } + + return resp, nil +} diff --git a/pkg/headers/header_contents.go b/pkg/headers/header_contents.go new file mode 100644 index 0000000..53d7f3d --- /dev/null +++ b/pkg/headers/header_contents.go @@ -0,0 +1,23 @@ +package headers + +const AuthorizationKey = "Authorization" +const AuthType = "bearer" +const UserAgentKey = "User-Agent" + +// TODO(kfcampbell): get the version and binary name from build settings rather than hard-coding +const UserAgentValue = "go-sdk@v0.0.0" + +const APIVersionKey = "X-GitHub-Api-Version" + +// TODO(kfcampbell): get the version from the generated code somehow +const APIVersionValue = "2022-11-28" + +// documentation on rate limit headers is available here: +// https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#checking-the-status-of-your-rate-limit +const XRateLimitRemainingKey = "X-Ratelimit-Remaining" +const XRateLimitResetKey = "X-Ratelimit-Reset" +const RetryAfterKey = "Retry-After" + +const XRateLimitLimitKey = "X-Ratelimit-Limit" +const XRateLimitUsedKey = "X-Ratelimit-Used" +const XRateLimitResourceKey = "X-Ratelimit-Resource" diff --git a/script/lint.sh b/script/lint.sh new file mode 100755 index 0000000..1bc7782 --- /dev/null +++ b/script/lint.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# GitHub Actions runs linting checks from .github/workflows/lint.yml. +# This script may be used to detect issues before pushing to a PR check. + +# note: check the version of golangci-lint used in .github/workflows/lint.yml to ensure accuracy +go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55 + +golangci-lint run ./...